diff --git a/iframe.html b/iframe.html index da8b9e7c2fd..84ed1a863c9 100644 --- a/iframe.html +++ b/iframe.html @@ -352,4 +352,4 @@ import './8323.bd0ef8f0.iframe.bundle.js'; - import './main.ed5ebacc.iframe.bundle.js'; \ No newline at end of file + import './main.b83baeb3.iframe.bundle.js'; \ No newline at end of file diff --git a/main.ed5ebacc.iframe.bundle.js b/main.b83baeb3.iframe.bundle.js similarity index 90% rename from main.ed5ebacc.iframe.bundle.js rename to main.b83baeb3.iframe.bundle.js index 45eb94cfa1f..fd5775f88f3 100644 --- a/main.ed5ebacc.iframe.bundle.js +++ b/main.b83baeb3.iframe.bundle.js @@ -1,2 +1,2 @@ -/*! For license information please see main.ed5ebacc.iframe.bundle.js.LICENSE.txt */ -(self.webpackChunkdata_hub_frontend=self.webpackChunkdata_hub_frontend||[]).push([[179],{"./.storybook/preview.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{__namedExportsOrder:()=>__namedExportsOrder,decorators:()=>decorators});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var react=__webpack_require__("./node_modules/react/index.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),components=__webpack_require__("./src/client/components/index.jsx"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lodash_default=__webpack_require__.n(lodash),esm=__webpack_require__("./node_modules/connected-react-router/esm/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),redux_saga_effects_npm_proxy_esm=(__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/redux-saga/dist/redux-saga-effects-npm-proxy.esm.js")),actions=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./src/client/actions.js"));function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var _marked=_regeneratorRuntime().mark(startTask),_marked2=_regeneratorRuntime().mark(manageTask),_marked3=_regeneratorRuntime().mark(subscribeToDismiss),_marked4=_regeneratorRuntime().mark(subscribeToStart);function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var saga_marked=saga_regeneratorRuntime().mark(_callee);function saga_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function saga_objectSpread(e){for(var r=1;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var HardRedirect_saga_marked=HardRedirect_saga_regeneratorRuntime().mark(redirect);function redirect(){return HardRedirect_saga_regeneratorRuntime().wrap((function redirect$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=3,(0,redux_saga_effects_npm_proxy_esm.qn)(actions.Cq2);case 3:window.location.href=_context.sent.to,_context.next=0;break;case 6:case"end":return _context.stop()}}),HardRedirect_saga_marked)}__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var KEY="flash-messages",getMessages=function getMessages(){var items=window.sessionStorage.getItem(KEY);if(items)try{return JSON.parse(items)}catch(e){console.error("Cannot get messages from session storage",e)}return{}},addMessage=function addMessage(messageType,message){var messages=getMessages();messages[messageType]=messages[messageType]||[],messages[messageType].push(message);try{window.sessionStorage.setItem(KEY,JSON.stringify(messages))}catch(e){console.error("Cannot set messages to session storage",e)}},addMessageWithBody=function addMessageWithBody(type,heading,body){addMessage("".concat(type,":with-body"),{heading,body})},clearMessages=function clearMessages(){return window.sessionStorage.removeItem(KEY)},writeToLocalStorage=function writeToLocalStorage(announcementLink){window.localStorage.setItem("announcement-link",announcementLink)},readFromLocalStorage=function readFromLocalStorage(){try{return window.localStorage.getItem("announcement-link")}catch(_unused){return{}}};function sagas_typeof(o){return sagas_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},sagas_typeof(o)}function sagas_regeneratorRuntime(){sagas_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==sagas_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var sagas_marked=sagas_regeneratorRuntime().mark(writeFlashMessages),sagas_marked2=sagas_regeneratorRuntime().mark(readFlashMesages),sagas_marked3=sagas_regeneratorRuntime().mark(writeAnnouncementLinkToLocalStorage),sagas_marked4=sagas_regeneratorRuntime().mark(readAnnouncementLinkFromLocalStorage);function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var MyInvestmentProjects_sagas_marked=MyInvestmentProjects_sagas_regeneratorRuntime().mark(writeMyInvestmentsToSession),MyInvestmentProjects_sagas_marked2=MyInvestmentProjects_sagas_regeneratorRuntime().mark(readMyInvestmentsFromSession);function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function writeMyInvestmentsToSession(){var _yield$take,payload;return MyInvestmentProjects_sagas_regeneratorRuntime().wrap((function writeMyInvestmentsToSession$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=3,(0,redux_saga_effects_npm_proxy_esm.qn)(actions.S77);case 3:_yield$take=_context.sent,_yield$take.type,payload=_objectWithoutProperties(_yield$take,_excluded),saveToSession(payload),_context.next=0;break;case 9:case"end":return _context.stop()}}),MyInvestmentProjects_sagas_marked)}function readMyInvestmentsFromSession(){var sessionState;return MyInvestmentProjects_sagas_regeneratorRuntime().wrap((function readMyInvestmentsFromSession$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.next=3,(0,redux_saga_effects_npm_proxy_esm.qn)(actions.gUm);case 3:if(sessionState=getFromSession(),!Object.keys(sessionState).length){_context2.next=7;break}return _context2.next=7,(0,redux_saga_effects_npm_proxy_esm.gz)({type:actions.TJt,sessionState});case 7:_context2.next=0;break;case 9:case"end":return _context2.stop()}}),MyInvestmentProjects_sagas_marked2)}function root_saga_typeof(o){return root_saga_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},root_saga_typeof(o)}function root_saga_regeneratorRuntime(){root_saga_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==root_saga_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),runMiddlewareOnce=lodash_default().once((function(tasks,sagaMiddleware){return sagaMiddleware.run(function(tasks){return root_saga_regeneratorRuntime().mark((function rootSaga(){return root_saga_regeneratorRuntime().wrap((function rootSaga$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,(0,redux_saga_effects_npm_proxy_esm.rM)(saga(tasks));case 2:return _context.next=4,(0,redux_saga_effects_npm_proxy_esm.rM)(_callee);case 4:return _context.next=6,(0,redux_saga_effects_npm_proxy_esm.rM)(redirect);case 6:return _context.next=8,(0,redux_saga_effects_npm_proxy_esm.rM)(readFlashMesages);case 8:return _context.next=10,(0,redux_saga_effects_npm_proxy_esm.rM)(writeFlashMessages);case 10:return _context.next=12,(0,redux_saga_effects_npm_proxy_esm.rM)(writeAnnouncementLinkToLocalStorage);case 12:return _context.next=14,(0,redux_saga_effects_npm_proxy_esm.rM)(readAnnouncementLinkFromLocalStorage);case 14:return _context.next=16,(0,redux_saga_effects_npm_proxy_esm.rM)(readMyInvestmentsFromSession);case 16:return _context.next=18,(0,redux_saga_effects_npm_proxy_esm.rM)(writeMyInvestmentsToSession);case 18:case"end":return _context.stop()}}),rootSaga)}))}(tasks))})),DataHubProvider=function DataHubProvider(_ref){var tasks=_ref.tasks,store=_ref.store,history=_ref.history,sagaMiddleware=_ref.sagaMiddleware,children=_ref.children;return runMiddlewareOnce(tasks,sagaMiddleware),(0,jsx_runtime.jsx)(es.Provider,{store,children:(0,jsx_runtime.jsx)(esm.xI,{history,children})})};DataHubProvider.displayName="DataHubProvider",DataHubProvider.__docgenInfo={description:"Provides state management and routing infrastructure required by the\nstateful/routed components.\n@param {Object} props\n@param {Object} props.tasks - A map of _task_ names to _tasks_, if required\nby the wrapped components.\n@example\nimport ReferralList from 'components/ReferralList'\nimport dummyReferralListTask from 'components/ReferralList/task/dummy'\n\n// ReferralList is a stateful component,\n// which also requires the Referrals task.\n\n \n",methods:[],displayName:"DataHubProvider"};const provider=DataHubProvider;__webpack_require__("./node_modules/core-js/modules/web.url.js"),__webpack_require__("./node_modules/core-js/modules/web.url-search-params.js");var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),redux_saga_core_npm_proxy_esm=__webpack_require__("./node_modules/redux-saga/dist/redux-saga-core-npm-proxy.esm.js"),middleware=__webpack_require__("./node_modules/connected-react-router/esm/middleware.js"),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),esm_history=__webpack_require__("./node_modules/history/esm/history.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),DropdownMenu=__webpack_require__("./src/client/components/DropdownMenu/index.jsx");function ConnectedDropdownMenu_typeof(o){return ConnectedDropdownMenu_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ConnectedDropdownMenu_typeof(o)}var ConnectedDropdownMenu_excluded=["type"];function ConnectedDropdownMenu_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ConnectedDropdownMenu_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var toggle={type:actions.lic},ConnectedDropdownMenu_open={type:actions.vQM},ConnectedDropdownMenu_close={type:actions.vmK};const ConnectedDropdownMenu=(0,multiinstance.ZP)({name:"DropdownMenu",actionPattern:"DROP_DOWN_MENU",component:function component(props){return(0,jsx_runtime.jsx)(DropdownMenu.Z,ConnectedDropdownMenu_objectSpread(ConnectedDropdownMenu_objectSpread({},props),{},{onClick:function onClick(){return props.toggleMenu()}}))},reducer:function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,rest=ConnectedDropdownMenu_objectWithoutProperties(_ref,ConnectedDropdownMenu_excluded);switch(type){case actions.vQM:return{open:!0};case actions.vmK:return{open:!1};case actions.lic:return{open:!state.open};case actions.mV:return ConnectedDropdownMenu_objectSpread(ConnectedDropdownMenu_objectSpread({},state),{},{activeIndex:rest.activeIndex})}return state},dispatchToProps:function dispatchToProps(dispatch){return{openMenu:dispatch.bind(void 0,ConnectedDropdownMenu_open),closeMenu:dispatch.bind(void 0,ConnectedDropdownMenu_close),toggleMenu:dispatch.bind(void 0,toggle),onUpdateIndex:function onUpdateIndex(activeIndex){return dispatch(function updateIndex(activeIndex){return{type:actions.mV,activeIndex}}(activeIndex))}}}});function reducer_typeof(o){return reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},reducer_typeof(o)}var reducer_excluded=["name","id"],_excluded2=["type"];function reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function reducer_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var setTaskState=function setTaskState(state,_ref,status){var name=_ref.name,id=_ref.id,action=reducer_objectWithoutProperties(_ref,reducer_excluded),currentTaskGroup=state[name]||{},currentTask=currentTaskGroup[id];return reducer_objectSpread(reducer_objectSpread({},state),{},reducer_defineProperty({},name,reducer_objectSpread(reducer_objectSpread({},currentTaskGroup),{},reducer_defineProperty({},id,reducer_objectSpread(reducer_objectSpread(reducer_objectSpread({},currentTask),action),{},{status})))))},remove=function remove(state,_ref2){var name=_ref2.name,id=_ref2.id,taskState=state[name];return taskState?lodash_default().omit(state,lodash_default().isEqual(lodash_default().keys(taskState),[name])?name:"".concat(name,".").concat(id)):state};var state=__webpack_require__("./src/client/components/CompanyLists/state.js");function CompanyLists_reducer_typeof(o){return CompanyLists_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyLists_reducer_typeof(o)}function CompanyLists_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function CompanyLists_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:PersonalisedDashboard_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.VfH:var hasInvestmentProjects=result.hasInvestmentProjects,summary=result.summary;return PersonalisedDashboard_reducer_objectSpread(PersonalisedDashboard_reducer_objectSpread({},state),{},{hasInvestmentProjects,summary});case actions.rZB:var dataHubFeed=result.dataHubFeed;return PersonalisedDashboard_reducer_objectSpread(PersonalisedDashboard_reducer_objectSpread({},state),{},{dataHubFeed});default:return state}};var MyInvestmentProjects_state=__webpack_require__("./src/client/components/MyInvestmentProjects/state.js");function MyInvestmentProjects_reducer_typeof(o){return MyInvestmentProjects_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},MyInvestmentProjects_reducer_typeof(o)}function MyInvestmentProjects_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function MyInvestmentProjects_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:create_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,searchTerm=_ref.searchTerm;switch(type){case actions.boT:return create_reducer_objectSpread(create_reducer_objectSpread({},state),{},{companyInvestmentCount:result.count});case actions.RDn:return create_reducer_objectSpread(create_reducer_objectSpread({},state),{},{results:result.results});case actions.oNU:return create_reducer_objectSpread(create_reducer_objectSpread({},state),{},{searchTerm});default:return state}};var InvestmentReminders_state=__webpack_require__("./src/client/components/InvestmentReminders/state.js"),InvestmentReminders_reducer_initialState={count:0,results:[]};var NotificationAlert_state=__webpack_require__("./src/client/components/NotificationAlert/state.js");function NotificationAlert_reducer_typeof(o){return NotificationAlert_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},NotificationAlert_reducer_typeof(o)}function NotificationAlert_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function NotificationAlert_reducer_defineProperty(obj,key,value){return(key=function NotificationAlert_reducer_toPropertyKey(arg){var key=function NotificationAlert_reducer_toPrimitive(input,hint){if("object"!==NotificationAlert_reducer_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==NotificationAlert_reducer_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===NotificationAlert_reducer_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var NotificationAlert_reducer_initialState={count:0,investment:{estimated_land_date:0,no_recent_interaction:0,outstanding_propositions:0},export:{no_recent_interaction:0,new_interaction:0},my_tasks:{due_date_approaching:0}};__webpack_require__("./node_modules/core-js/modules/es.string.trim.js"),__webpack_require__("./src/client/utils/colours.js");var lib_urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(lib_urls);function Contacts_CollectionList_reducer_typeof(o){return Contacts_CollectionList_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Contacts_CollectionList_reducer_typeof(o)}function Contacts_CollectionList_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Contacts_CollectionList_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:Contacts_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.ko6:return Contacts_CollectionList_reducer_objectSpread(Contacts_CollectionList_reducer_objectSpread(Contacts_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.Mae:return Contacts_CollectionList_reducer_objectSpread(Contacts_CollectionList_reducer_objectSpread({},state),{},{metadata:result});default:return state}};__webpack_require__("./node_modules/core-js/modules/es.array.includes.js");function Interactions_CollectionList_reducer_typeof(o){return Interactions_CollectionList_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Interactions_CollectionList_reducer_typeof(o)}function Interactions_CollectionList_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Interactions_CollectionList_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:Omis_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.rMO:return Omis_CollectionList_reducer_objectSpread(Omis_CollectionList_reducer_objectSpread(Omis_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.eGJ:return Omis_CollectionList_reducer_objectSpread(Omis_CollectionList_reducer_objectSpread({},state),{},{metadata:result});default:return state}};var RoutedInput=__webpack_require__("./src/client/components/RoutedInput/index.jsx"),Resource=__webpack_require__("./src/client/components/Resource/Resource.jsx"),prop_types=(__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/prop-types/index.js")),prop_types_default=__webpack_require__.n(prop_types),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),govuk_react_label_esm=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),Form=__webpack_require__("./src/client/components/Form/index.jsx"),LocalHeader=__webpack_require__("./src/client/components/LocalHeader/LocalHeader.jsx"),components_Resource=__webpack_require__("./src/client/components/Resource/index.jsx"),validators=__webpack_require__("./src/client/components/Form/validators.js");const State=(0,es.connect)((function(state){return{state}}))((function(_ref){var state=_ref.state;return(0,_ref.children)(state)}));var common_constants=__webpack_require__("./src/common/constants.js"),useAdministrativeAreaLookup=__webpack_require__("./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaLookup.js"),useAdministrativeAreaSearch=__webpack_require__("./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaSearch.js");function ContactForm_typeof(o){return ContactForm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ContactForm_typeof(o)}var _templateObject,ContactForm_excluded=["update","contactId","companyId","primary","addressSameAsCompany","acceptsDitEmailMarketing","addressPostcode","addressTown","addressCounty","addressArea","addressCountry","dispatch","id","notes"],ContactForm_excluded2=["address1","address2","city","county","postcode","acceptsDitEmailMarketing","addressSameAsCompany","primary","email","valid_email","moreDetails"];function ContactForm_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ContactForm_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var YES="Yes",NO="No",boolToYesNo=function boolToYesNo(x){return!0===x?YES:!1===x?NO:null},keysToSnakeCase=function keysToSnakeCase(o){return lodash_default().mapKeys(o,(function(v,k){return lodash_default().snakeCase(k)}))},StyledLabel=(0,styled_components_browser_esm.ZP)(govuk_react_label_esm.Z)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n padding-bottom: ",";\n font-weight: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5,govuk_react_constants_esm.Xw.bold),_ContactForm=function _ContactForm(_ref){var update=_ref.update,contactId=_ref.contactId,companyId=_ref.companyId,primary=_ref.primary,addressSameAsCompany=_ref.addressSameAsCompany,acceptsDitEmailMarketing=_ref.acceptsDitEmailMarketing,postcode=_ref.addressPostcode,city=_ref.addressTown,county=_ref.addressCounty,addressArea=_ref.addressArea,addressCountry=_ref.addressCountry,moreDetails=(_ref.dispatch,_ref.id,_ref.notes),props=ContactForm_objectWithoutProperties(_ref,ContactForm_excluded),findAdministrativeAreas=(0,useAdministrativeAreaLookup.Z)(),onAdministrativeAreaSearch=(0,useAdministrativeAreaSearch.Z)(findAdministrativeAreas).onAdministrativeAreaSearch;(0,react.useEffect)((function(){onAdministrativeAreaSearch()}),[]);var areaUS=function areaUS(addressArea){return(null==addressCountry?void 0:addressCountry.id)===common_constants.UNITED_STATES_ID?null==addressArea?void 0:addressArea.id:null},areaCanada=function areaCanada(addressArea){return(null==addressCountry?void 0:addressCountry.id)===common_constants.CANADA_ID?null==addressArea?void 0:addressArea.id:null},getAreaValue=function getAreaValue(values){return values.country===common_constants.UNITED_STATES_ID?values.area:values.country===common_constants.CANADA_ID?values.areaCanada:null};return(0,jsx_runtime.jsx)(components_Resource.qN,{id:companyId,children:function children(company){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LocalHeader.Z,{superheading:update&&(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:"/companies/".concat(company.id),children:company.name}),heading:"".concat(update?"Edit":"Add"," contact"),breadcrumbs:[{link:"/",text:"Home"},{link:"/contacts/",text:"Contacts"}].concat(ContactForm_toConsumableArray(update?[{link:urls_default().contacts.details(contactId),text:props.name},{text:"Edit"}]:[{text:"Add contact at ".concat(company.name)}]))}),(0,jsx_runtime.jsx)(components.or,{children:(0,jsx_runtime.jsx)(State,{children:function children(_ref2){var referrerUrl=_ref2.referrerUrl,router=_ref2.router,_qs$parse=lib_default().parse(router.location.search),origin_url=_qs$parse.origin_url,origin_search=_qs$parse.origin_search,redirectTo=function redirectTo(_ref3){var name=_ref3.name,id=_ref3.id;return origin_url?function appendParamsToUrl(origin_url,origin_search,id,name){var url=new URL(origin_url,window.location.origin),inputParams=new URLSearchParams(origin_search?atob(origin_search):"");return inputParams.append("new-contact-id",id),inputParams.append("new-contact-name",name),url.search=inputParams,url.pathname+url.search}(origin_url,origin_search,id,name):urls_default().contacts.details(id)};return(0,jsx_runtime.jsx)(components.lt,{setWidth:common_constants.FORM_LAYOUT.THREE_QUARTERS,children:(0,jsx_runtime.jsx)(Form.Z,{id:"add-contact-form",analyticsFormName:update?"editContact":"addContact",submissionTaskName:"Save contact",transformPayload:function transformPayload(_ref4){var address1=_ref4.address1,address2=_ref4.address2,city=_ref4.city,county=_ref4.county,postcode=_ref4.postcode,acceptsDitEmailMarketing=_ref4.acceptsDitEmailMarketing,addressSameAsCompany=_ref4.addressSameAsCompany,primary=_ref4.primary,email=_ref4.email,moreDetails=(_ref4.valid_email,_ref4.moreDetails),values=ContactForm_objectWithoutProperties(_ref4,ContactForm_excluded2);return{contactId,values:ContactForm_objectSpread(ContactForm_objectSpread({},keysToSnakeCase(values)),{},{email,valid_email:!0,notes:moreDetails,accepts_dit_email_marketing:acceptsDitEmailMarketing.includes(YES),primary,company,address_same_as_company:addressSameAsCompany.includes(YES)},addressSameAsCompany==YES?{address_1:null,address_2:null,address_town:null,address_county:null,address_postcode:null,address_area:null,address_country:null}:{address_1:address1||" ",address_2:address2,address_town:city||" ",address_county:county,address_postcode:postcode,address_area:getAreaValue(values),address_country:values.country})}},onSuccess:function onSuccess(result,values,_ref5){var hardRedirect=_ref5.hardRedirect;(0,_ref5.flashMessage)(update?"Contact record updated":"You have successfully added a new contact ".concat(result.name)),hardRedirect(redirectTo(result))},submitButtonLabel:update?"Save and return":"Add contact",cancelRedirectTo:function cancelRedirectTo(){return referrerUrl?function stripHost(u){var url=new URL(u);return url.pathname+url.search}(referrerUrl):"/"},cancelButtonLabel:update?"Return without saving":"Cancel",initialValues:ContactForm_objectSpread(ContactForm_objectSpread({},props),{},{moreDetails,postcode,county,city,area:null==addressArea?void 0:addressArea.id,areaUS:areaUS(addressArea),areaCanada:areaCanada(addressArea),country:null==addressCountry?void 0:addressCountry.id,primary:boolToYesNo(primary),addressSameAsCompany:boolToYesNo(addressSameAsCompany),acceptsDitEmailMarketing:[boolToYesNo(acceptsDitEmailMarketing)].filter(Boolean)}),children:function children(_ref6){var _values$acceptsDitEma,values=_ref6.values;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components._s,{label:"First name",name:"firstName",type:"text",required:"Enter a first name","data-test":"group-field-first_name"}),(0,jsx_runtime.jsx)(components._s,{label:"Last name",name:"lastName",type:"text",required:"Enter a last name","data-test":"group-field-last_name"}),(0,jsx_runtime.jsx)(components._s,{label:"Job title",name:"jobTitle",type:"text",required:"Enter a job title"}),(0,jsx_runtime.jsx)(components._s,{label:"Email address",name:"email",type:"email",required:"Enter an email address",validate:validators.D}),(0,jsx_runtime.jsx)(components._s,{label:"Phone number (optional)",hint:"For international numbers include the country code",name:"fullTelephoneNumber",type:"text",validate:function validate(x){return!(null!=x&&x.match(common_constants.GENERIC_PHONE_NUMBER_REGEX))&&"Phone number should consist of numbers"}}),(0,jsx_runtime.jsx)(components.k2,{legend:"Is this contact’s work address the same as the company address?",name:"addressSameAsCompany",required:"Select yes if the contact's work address is the same as the company address",options:[{value:YES,label:YES},{value:NO,label:NO,children:(0,jsx_runtime.jsxs)("fieldset",{children:[(0,jsx_runtime.jsx)(StyledLabel,{children:"What is the contact's work address?"}),(0,jsx_runtime.jsx)(components.k1,{name:"",apiEndpoint:"/api/postcodelookup",isCountrySelectable:!0,fontWeights:govuk_react_constants_esm.Xw.regular})]})}]}),(0,jsx_runtime.jsx)(components.k2,{legend:"Is this person a primary contact?",name:"primary",required:"Select yes if this person is the company's primary contact",options:[{value:YES,label:YES},{value:NO,label:NO}]}),(0,jsx_runtime.jsx)(components.YU,{name:"acceptsDitEmailMarketing",options:[{value:YES,label:"The company contact does accept email marketing",hint:(null==values||null===(_values$acceptsDitEma=values.acceptsDitEmailMarketing)||void 0===_values$acceptsDitEma?void 0:_values$acceptsDitEma.includes(YES))&&"By checking this box, you confirm that the contact has opted in to email marketing."}]}),(0,jsx_runtime.jsx)(components.E9,{label:"More details (optional)",name:"moreDetails",hint:"\nAdd anything you think is important about the contact, for example, an alternative\nphone number or email address.\n"})]})}})})}})})]})}})};_ContactForm.displayName="_ContactForm";var ContactForm=(0,multiinstance.ZP)({name:"ContactForm",actionPattern:"CONTACT_FORM__",reducer:function reducer(state,_ref7){return _ref7.type===actions.aYo?{}:state},component:_ContactForm}),requiredProps={update:prop_types_default().any,company:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired})};ContactForm.propTypes=ContactForm_objectSpread(ContactForm_objectSpread({},requiredProps),{},{contactId:prop_types_default().string,firstName:prop_types_default().string,lastName:prop_types_default().string,jobTitle:prop_types_default().string,primary:prop_types_default().bool,fullTelephoneNumber:prop_types_default().string,email:prop_types_default().string,acceptsDitEmailMarketing:prop_types_default().bool,addressSameAsCompany:prop_types_default().bool,address1:prop_types_default().string,address2:prop_types_default().string,addressTown:prop_types_default().string,addressCounty:prop_types_default().string,addressPostcode:prop_types_default().string,notes:prop_types_default().string});var CreateContactForm=function CreateContactForm(_ref8){var companyId=_ref8.companyId,id=_ref8.id;return(0,jsx_runtime.jsx)(ContactForm,{companyId,id})};CreateContactForm.displayName="CreateContactForm",CreateContactForm.propTypes=requiredProps;var UpdateContactForm=function UpdateContactForm(_ref9){var contactId=_ref9.contactId,id=_ref9.id;return(0,jsx_runtime.jsx)(components_Resource.SF,{id:contactId,children:function children(contact){return(0,jsx_runtime.jsx)(ContactForm,ContactForm_objectSpread(ContactForm_objectSpread({},contact),{},{id,contactId:contact.id,update:!0,companyId:contact.company.id}))}})};UpdateContactForm.displayName="UpdateContactForm",UpdateContactForm.propTypes=ContactForm_objectSpread(ContactForm_objectSpread({},requiredProps),{},{contactId:prop_types_default().string.isRequired});CreateContactForm.__docgenInfo={description:"",methods:[],displayName:"CreateContactForm",props:{update:{description:"",type:{name:"any"},required:!1},company:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0}}},required:!1}}},UpdateContactForm.__docgenInfo={description:"",methods:[],displayName:"UpdateContactForm",props:{update:{description:"",type:{name:"any"},required:!1},company:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0}}},required:!1},contactId:{description:"",type:{name:"string"},required:!0}}};var LocalHeader_state=__webpack_require__("./src/client/components/LocalHeader/state.js");function LocalHeader_reducer_typeof(o){return LocalHeader_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},LocalHeader_reducer_typeof(o)}function LocalHeader_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function LocalHeader_reducer_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==arguments[0]?arguments[0]:{},_ref3=arguments.length>1?arguments[1]:void 0,type=_ref3.type,action=reducer_objectWithoutProperties(_ref3,_excluded2);switch(type){case actions.zj3:return setTaskState(state,action,"progress");case actions.Z90:return setTaskState(state,action,"error");case actions.Zo7:case actions.oV1:return remove(state,action);default:return state}}},reducers_defineProperty(_objectSpread2,LocalHeader_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,flashMessages=_ref.flashMessages,announcementLink=_ref.announcementLink;switch(type){case actions.iSD:return LocalHeader_reducer_objectSpread(LocalHeader_reducer_objectSpread({},state),{},{flashMessages});case actions.RJR:return LocalHeader_reducer_objectSpread(LocalHeader_reducer_objectSpread({},state),{},{flashMessages:{}});case actions.Ody:return LocalHeader_reducer_objectSpread(LocalHeader_reducer_objectSpread({},state),{},{announcementLink});default:return state}})),reducers_defineProperty(_objectSpread2,state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,id=_ref.id,result=_ref.result,payload=_ref.payload,query=_ref.query,orderBy=_ref.orderBy;switch(type){case actions.Og6:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{lists:(0,lodash.mapValues)(result,(function(name){return{name}})),selectedId:Object.keys(result)[0]});case actions.WhS:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{lists:CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state.lists),{},CompanyLists_reducer_defineProperty({},payload,CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state.lists[payload]),{},{companies:result})))});case actions.Cb4:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{selectedId:id,query:""});case actions.sb0:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{query});case actions.k$I:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{orderBy});default:return state}})),reducers_defineProperty(_objectSpread2,CollectionList_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.hWh:return CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread({},state),{},{selectedLeadItaOrGlobalAccountManagers:result});default:return state}})),reducers_defineProperty(_objectSpread2,"exportsHistory",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,page=_ref.page;switch(type){case actions.iX0:var count=result.count,results=result.results;return ExportsHistory_reducer_objectSpread(ExportsHistory_reducer_objectSpread({},state),{},{count,results,isComplete:!0});case actions.FeB:return ExportsHistory_reducer_objectSpread(ExportsHistory_reducer_objectSpread({},state),{},{activePage:page});default:return state}})),reducers_defineProperty(_objectSpread2,client_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.moN?result:state})),reducers_defineProperty(_objectSpread2,"referralForm",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch((arguments.length>1?arguments[1]:void 0).type){case actions.Z90:return client_reducer_objectSpread(client_reducer_objectSpread({},state),{},{progress:!1});case actions.WJs:return client_reducer_objectSpread(client_reducer_objectSpread({},state),{},{progress:!0,formSubmitted:!0});default:return state}})),reducers_defineProperty(_objectSpread2,"exportWins",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ExportWins_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,page=_ref.page;switch(type){case actions.wm$:if(result.notImplemented)return ExportWins_reducer_objectSpread(ExportWins_reducer_objectSpread({},state),{},ExportWins_reducer_defineProperty({},"notImplemented",!0));var count=result.count,results=result.results;return ExportWins_reducer_objectSpread(ExportWins_reducer_objectSpread({},state),{},{count,results,isComplete:!0});case actions._Yb:return ExportWins_reducer_objectSpread(ExportWins_reducer_objectSpread({},state),{},{activePage:page});default:return state}})),reducers_defineProperty(_objectSpread2,"addCompany",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.fpo?add_company_client_reducer_objectSpread(add_company_client_reducer_objectSpread({},state),{},{region:result}):state})),_objectSpread2),TabNav.Z.reducerSpread),ReferralList.Z.reducerSpread),ConnectedDropdownMenu.reducerSpread),BaseToggleSection.ZP.reducerSpread),Typeahead.Z.reducerSpread),RoutedInput.Z.reducerSpread),Resource.ZP.reducerSpread),ContactForm.reducerSpread),Form.Z.reducerSpread),FieldAddAnother.Z.reducerSpread),{},(reducers_defineProperty(_objectSpread3={referrerUrl:function referrerUrl(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},"dnbCheckPendingRequest",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isDnbPending:!1},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.LCU?business_details_client_reducer_objectSpread(business_details_client_reducer_objectSpread({},state),{},{isDnbPending:result}):state})),reducers_defineProperty(_objectSpread3,"opportunitiesList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Opportunities_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,page=_ref.page,result=_ref.result;switch(type){case actions.RHb:var count=result.count,results=result.results;return Opportunities_reducer_objectSpread(Opportunities_reducer_objectSpread({},state),{},{count,results,isComplete:!0});case actions.MYm:return Opportunities_reducer_objectSpread(Opportunities_reducer_objectSpread({},state),{},{activePage:page});default:return state}})),reducers_defineProperty(_objectSpread3,"opportunityDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Details_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,opportunity=_ref.opportunity;switch(type){case actions.IX2:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),opportunity),{},{isEditingDetails:!1,isEditingRequirements:!1})});case actions.Qu9:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:result});case actions.Xm$:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{metadata:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.metadata),{},{investmentTypes:result.investmentTypes,returnRates:result.returnRates,timeScales:result.timeScales})});case actions.g2S:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),{},{isEditingDetails:!0,isEditingRequirements:!1})});case actions.DpK:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),{},{isEditingDetails:!1,isEditingRequirements:!0})});case actions.PhE:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),{},{isEditingDetails:!1,isEditingRequirements:!1})});case actions.Ggs:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),result),{},{isEditingDetails:!1,isEditingRequirements:!1})});default:return state}})),reducers_defineProperty(_objectSpread3,"profilesList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Profiles_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.LYg:return Profiles_reducer_objectSpread(Profiles_reducer_objectSpread({},state),{},{count:result.count,results:result.results,isComplete:!0});case actions.dpe:return Profiles_reducer_objectSpread(Profiles_reducer_objectSpread({},state),{},{filterOptions:result});default:return state}})),reducers_defineProperty(_objectSpread3,"projectsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Projects_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.o1j:return Projects_reducer_objectSpread(Projects_reducer_objectSpread({},state),{},{count:result.count,results:result.results,isComplete:!0});case actions.aji:return Projects_reducer_objectSpread(Projects_reducer_objectSpread({},state),{},{selectedAdvisers:result});case actions.hnA:return Projects_reducer_objectSpread(Projects_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"investmentProject",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:investmentProjectReducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.l28?investmentProjectReducer_objectSpread(investmentProjectReducer_objectSpread({},state),{},{project:(0,utils.lI)(result)}):state})),reducers_defineProperty(_objectSpread3,"overviewCompanyExportWinsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{initialState:exportStatusReducer_initialState},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,data=_ref.result;return type===actions.hIS?exportStatusReducer_objectSpread(exportStatusReducer_objectSpread({},state),{},{count:data.count,latestExportWin:data.result}):state})),reducers_defineProperty(_objectSpread3,"overviewCompanyProjectsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{initialState:overview_table_cards_reducer_initialState},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;if(type===actions.$n7){var resultList=[],stageList={},statusList={},stageListAll=[],statusListAll=[],upcomingActiveInvestments=[];result.results.map((function(investment){return resultList.push(investment)})),resultList.map((function(investment){return stageListAll.push(investment.stage.name)})),resultList.map((function(investment){return statusListAll.push(investment.status)}));for(var statusNames=statusListAll.filter((function(item,i,ar){return ar.indexOf(item)===i})),stageNames=stageListAll.filter((function(item,i,ar){return ar.indexOf(item)===i})),_loop=function _loop(i){var name=(0,lodash.camelCase)(statusNames[i]);statusList[name]=resultList.filter((function(investment){return investment.status===statusNames[i]})).length},i=0;i3?allActiveInvestments.slice(0,3):allActiveInvestments,overview_table_cards_reducer_objectSpread(overview_table_cards_reducer_objectSpread({},state),{},{stageList,statusList,resultList,summary:result.summary,upcomingActiveInvestments,isComplete:!0})}return state})),reducers_defineProperty(_objectSpread3,MyInvestmentProjects_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:MyInvestmentProjects_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,page=_ref.page,stage=_ref.stage,status=_ref.status,landDate=_ref.landDate,sort=_ref.sort,showDetails=_ref.showDetails,sessionState=_ref.sessionState;switch(type){case actions.STt:var results=result.results,count=result.count,summary=result.summary;return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{results,count,summary});case actions.l1G:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{sort,page});case actions.bgc:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{stage,page});case actions.YWR:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{status,page});case actions.yFd:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{landDate,page});case actions.mUn:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{page});case actions.pb3:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{showDetails});case actions.TJt:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),sessionState);default:return state}})),reducers_defineProperty(_objectSpread3,"createInvestmentProject",create_reducer),reducers_defineProperty(_objectSpread3,"companyInvestmentCount",create_reducer),reducers_defineProperty(_objectSpread3,"checkInvestmentProjects",PersonalisedDashboard_reducer),reducers_defineProperty(_objectSpread3,"checkDataHubFeed",PersonalisedDashboard_reducer),reducers_defineProperty(_objectSpread3,InvestmentReminders_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:InvestmentReminders_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.qzL?{results:result.results,count:result.count}:state})),reducers_defineProperty(_objectSpread3,NotificationAlert_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NotificationAlert_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.SqW?function NotificationAlert_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:defaultState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.h0j?ContactActivity_reducer_objectSpread(ContactActivity_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"companyContactsList",Contacts_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"interactionsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Interactions_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.yR5:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.APp:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{selectedAdvisers:result});case actions.JzB:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{selectedCompanies:result});case actions.uqm:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.p2g:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{selectedTeams:result});default:return state}})),reducers_defineProperty(_objectSpread3,"companyActivitiesList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ActivityFeed_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.M0d:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.Oiz:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{selectedAdvisers:result});case actions.XaB:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{selectedCompanies:result});case actions.b0f:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.ITR:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{selectedTeams:result});default:return state}})),reducers_defineProperty(_objectSpread3,"eventsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Events_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.d$R:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.GPR:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.Cxq:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),{},{selectedOrganisers:result});case actions.TaK:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),result);default:return state}})),reducers_defineProperty(_objectSpread3,"eventDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.Q9S?EventDetails_reducer_objectSpread(EventDetails_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"eventAventriDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.OiA?EventAventriDetails_reducer_objectSpread(EventAventriDetails_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"eventAventriRegistrationStatusAttendees",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.tjD?EventAventriRegistrationStatus_reducer_objectSpread(EventAventriRegistrationStatus_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"essInteractionDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.cBe?ESSInteractionDetails_reducer_objectSpread(ESSInteractionDetails_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"findAttendees",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AttendeeSearch_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.y6W:return AttendeeSearch_reducer_objectSpread(AttendeeSearch_reducer_objectSpread(AttendeeSearch_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.CHH:return AttendeeSearch_reducer_objectSpread(AttendeeSearch_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"ordersList",Omis_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"companyOrdersList",Omis_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"reconciliationOrdersList",Omis_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"reminders",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Reminders_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,payload=_ref.payload;switch(type){case actions.tDb:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{estimatedLandDateReminders:result});case actions.zrS:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{estimatedLandDateReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.estimatedLandDateReminders),{},{results:state.estimatedLandDateReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.estimatedLandDateReminders.count-1,nextPending:!0})});case actions.KnU:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{estimatedLandDateReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.estimatedLandDateReminders),{},{results:[].concat(reducer_toConsumableArray(state.estimatedLandDateReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.nE_:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{noRecentInteractionReminders:result});case actions.SC8:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{noRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.noRecentInteractionReminders),{},{results:state.noRecentInteractionReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.noRecentInteractionReminders.count-1,nextPending:!0})});case actions.YMQ:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{noRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.noRecentInteractionReminders),{},{results:[].concat(reducer_toConsumableArray(state.noRecentInteractionReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.kY:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{outstandingPropositionsReminders:result});case actions.mSO:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNoRecentInteractionReminders:result});case actions.Z1l:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNoRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNoRecentInteractionReminders),{},{results:state.exportsNoRecentInteractionReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.exportsNoRecentInteractionReminders.count-1,nextPending:!0})});case actions.vOm:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNoRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNoRecentInteractionReminders),{},{results:[].concat(reducer_toConsumableArray(state.exportsNoRecentInteractionReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.DLw:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNewInteractionReminders:result});case actions.wmK:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNewInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNewInteractionReminders),{},{results:state.exportsNewInteractionReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.exportsNewInteractionReminders.count-1,nextPending:!0})});case actions.OX5:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNewInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNewInteractionReminders),{},{results:[].concat(reducer_toConsumableArray(state.exportsNewInteractionReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.vST:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{dueDateApproachingReminders:result});case actions._b:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{dueDateApproachingReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.dueDateApproachingReminders),{},{results:[].concat(reducer_toConsumableArray(state.dueDateApproachingReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.PwC:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{dueDateApproachingReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.dueDateApproachingReminders),{},{results:state.dueDateApproachingReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.dueDateApproachingReminders.count-1,nextPending:!0})});default:return state}})),reducers_defineProperty(_objectSpread3,"companyDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CompanyDetails_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.e8c?CompanyDetails_reducer_objectSpread(CompanyDetails_reducer_objectSpread({},state),{},{company:result}):state})),reducers_defineProperty(_objectSpread3,"exportDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ExportDetails_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.LZZ?ExportDetails_reducer_objectSpread(ExportDetails_reducer_objectSpread({},state),{},{exportItem:result}):state})),reducers_defineProperty(_objectSpread3,ExportList_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ExportList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.mep:case actions.iDm:return ExportList_reducer_objectSpread(ExportList_reducer_objectSpread({},state),result);default:return state}})),reducers_defineProperty(_objectSpread3,CompanyLocalHeader_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CompanyLocalHeader_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.aab?CompanyLocalHeader_reducer_objectSpread(CompanyLocalHeader_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"companyHierarchy",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CompanyHierarchy_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.hFh?CompanyHierarchy_reducer_objectSpread(CompanyHierarchy_reducer_objectSpread({},state),{},{familyTree:result}):state})),reducers_defineProperty(_objectSpread3,"linkGlobalHQ",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:LinkGlobalHQ_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return LinkGlobalHQ_reducer_objectSpread(LinkGlobalHQ_reducer_objectSpread(LinkGlobalHQ_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return LinkGlobalHQ_reducer_objectSpread(LinkGlobalHQ_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"linkSubsidiary",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:LinkSubsidiary_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return LinkSubsidiary_reducer_objectSpread(LinkSubsidiary_reducer_objectSpread(LinkSubsidiary_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return LinkSubsidiary_reducer_objectSpread(LinkSubsidiary_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"objective",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AccountManagement_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.jf1?AccountManagement_reducer_objectSpread(AccountManagement_reducer_objectSpread({},state),{},{objectiveItem:result}):state})),reducers_defineProperty(_objectSpread3,"nonFdiProjectsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EditAssociatedProject_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.o1j:return EditAssociatedProject_reducer_objectSpread(EditAssociatedProject_reducer_objectSpread({},state),{},{count:result.count,results:result.results,isComplete:!0});case actions.hnA:return EditAssociatedProject_reducer_objectSpread(EditAssociatedProject_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"recipientCompanyList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EditRecipientCompany_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return EditRecipientCompany_reducer_objectSpread(EditRecipientCompany_reducer_objectSpread(EditRecipientCompany_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return EditRecipientCompany_reducer_objectSpread(EditRecipientCompany_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"oneListDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CoreTeam_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.L5Y?CoreTeam_reducer_objectSpread(CoreTeam_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"taskDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:TaskDetails_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.Gbi?TaskDetails_reducer_objectSpread(TaskDetails_reducer_objectSpread({},state),{},{task:(0,utils.lI)(result)}):state})),reducers_defineProperty(_objectSpread3,"exportWinsConfirmed",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Confirmed_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.eTX?Confirmed_reducer_objectSpread(Confirmed_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"exportWinsUnconfirmed",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Unconfirmed_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.awF?Unconfirmed_reducer_objectSpread(Unconfirmed_reducer_objectSpread({},state),result):state})),_objectSpread3));function middleware_typeof(o){return middleware_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},middleware_typeof(o)}function middleware_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function middleware_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:"";return new Promise((function(resolve,reject){return"reject"===query?setTimeout(reject,1e3,"Something went horribly wrong"):setTimeout(resolve,1e3,OPTIONS.filter((function(x){return x.toLowerCase().includes(query.toLowerCase())})).slice(0,10).map((function(x){return{value:lodash_default().snakeCase(x),label:x}})))}))}};function tasks_typeof(o){return tasks_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},tasks_typeof(o)}const Typeahead_tasks=function tasks_defineProperty(obj,key,value){return(key=function tasks_toPropertyKey(arg){var key=function tasks_toPrimitive(input,hint){if("object"!==tasks_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==tasks_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===tasks_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({},__webpack_require__("./src/client/components/Typeahead/state.js").n,(function getTypeaheadOptions(_ref){var loadOptions=_ref.loadOptions,options=_ref.options,autocomplete=_ref.autocomplete;return loadOptions?(0,lodash.throttle)(loadOptions,500)(autocomplete):new Promise((function(resolve){return resolve(options)}))})),_stories_tasks={"Resource example":function ResourceExample(payload,id){return new Promise((function(resolve,reject){return id.match("reject")?setTimeout(reject,1e3,"Could not load resource"):setTimeout(resolve,1e3,{example:"This is a dummy resource representation example",id,payload})}))},Contact:function Contact(id){return new Promise((function(resolve){return setTimeout((function(){return resolve({id,companyId:"008ba003-b528-4e79-b209-49fcfcceb371",companyName:"Little Britain",firstName:"Andy",lastName:"Pipkin",jobTitle:"Unemployed",primary:!1,telephoneCountrycode:"123",telephoneNumber:"456789",email:"andy.pipkin@littlebritain.co.uk",acceptsDitEmailMarketing:!0,addressSameAsCompany:!0,address1:"Foo",address2:"Bar",addressTown:"Town",addressCounty:"County",addressPostcode:null,addressCountry:"87756b9a-5d95-e211-a939-e4115bead28a",notes:"Notes"})}),2e3)}))},Company:function Company(id){return new Promise((function(resolve){return setTimeout((function(){return resolve({id,referenceCode:"",name:"Zboncak Group|271eb29e-425b-4cd8-b386-3208c3a5f978",tradingName:"",tradingNames:[],ukBased:!0,companyNumber:"BR100000",vatNumber:"",dunsNumber:null,createdOn:"2019-01-09T09:45:06.080938Z",modifiedOn:"2019-01-09T09:45:06.080969Z",archived:!1,archivedDocumentsUrlPath:"",archivedOn:null,archivedReason:null,archivedBy:null,description:"Doloribus accusamus qui non nam et earum inventore.",transferredBy:null,transferredOn:null,transferredTo:null,transferReason:"",website:"http://jamaal.biz",businessType:{name:"UK branch of foreign company (BR)",id:"b0730fc6-fcce-4071-bdab-ba8de4f4fc98"},oneListGroupTier:null,contacts:[{id:"0e75d636-1d24-416a-aaf0-3fb220d594ce",title:null,firstName:"Bob",lastName:"lawson",name:"Bob lawson",jobTitle:"Magician",company:{name:"Zboncak Group|271eb29e-425b-4cd8-b386-3208c3a5f978",id:"4cd4128b-1bad-4f1e-9146-5d4678c6a018"},adviser:{name:"DBT Staff",firstName:"DBT",lastName:"Staff",id:"7d19d407-9aec-4d06-b190-d3f404627f21"},primary:!0,telephoneCountrycode:"222",telephoneNumber:"3453454",email:"contact@bob.com",addressSameAsCompany:!0,address1:null,address2:null,addressTown:null,addressCounty:null,addressCountry:null,addressPostcode:null,notes:null,acceptsDitEmailMarketing:!1,archived:!1,archivedDocumentsUrlPath:"",archivedOn:null,archivedReason:null,archivedBy:null,createdOn:"2019-02-04T15:59:14.267412Z",modifiedOn:"2019-02-05T13:17:23.112153Z"}],employeeRange:{name:"50 to 249",id:"3fafd8d0-5d95-e211-a939-e4115bead28a"},numberOfEmployees:null,isNumberOfEmployeesEstimated:null,exportToCountries:[],futureInterestCountries:[],headquarterType:null,oneListGroupGlobalAccountManager:null,globalHeadquarters:null,sector:{name:"Biotechnology and Pharmaceuticals : Bio and Pharma Marketing and Sales : Bio and Pharma Retail",id:"70f7ffde-5f95-e211-a939-e4115bead28a"},turnoverRange:{name:"£1.34 to £6.7M",id:"784cd12a-6095-e211-a939-e4115bead28a"},turnover:null,isTurnoverEstimated:null,ukRegion:{name:"London",id:"874cd12a-6095-e211-a939-e4115bead28a"},exportExperienceCategory:null,address:{line1:"3 Priory Court",line2:"Kingshill Road",town:"Dursley",county:"Gloucestershire",postcode:"GL11 4DH",country:{name:"United Kingdom",id:"80756b9a-5d95-e211-a939-e4115bead28a"}},registeredAddress:{line1:"3 Priory Court",line2:"Kingshill Road",town:"Dursley",county:"Gloucestershire",postcode:"GL11 4DH",country:{name:"United Kingdom",id:"80756b9a-5d95-e211-a939-e4115bead28a"}}})}),2e3)}))}},Form_stories_tasks={"Load initial values":function LoadInitialValues(payload){return new Promise((function(resolve,reject){return"reject"===payload?setTimeout(reject,2e3,"You broke the internet!"):setTimeout(resolve,2e3,{foo:"Blah blah",bar:"b"})}))},"Submit Form example":function SubmitFormExample(formValues){return new Promise((function(resolve,reject){return"yes"===formValues.reject?setTimeout(reject,2e3,"You broke the internet!"):setTimeout(resolve,2e3,{task:"result"})}))},"Load options":function LoadOptions(payload,id){return new Promise((function(resolve,reject){return id.includes("reject")?setTimeout(reject,2e3,"You broke the internet!"):setTimeout(resolve,5e3,payload)}))}};function preview_typeof(o){return preview_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},preview_typeof(o)}var preview_templateObject;function preview_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function preview_objectSpread(e){for(var r=1;r{function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict"},"./src/apps/companies/apps/referrals/details/client/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ID:()=>ID});var ID="referralDetails"},"./src/apps/companies/constants.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.object.values.js");var QUERY_FIELDS_MAP={leadIta:"one_list_group_global_account_manager",archived:"archived",name:"name",sectorDescends:"sector_descends",country:"country",ukRegion:"uk_region",headquarterType:"headquarter_type",exportingTo:"export_to_countries",interestedIn:"future_interest_countries",lastInteractionDate:"interaction_between",ukPostcode:"uk_postcode",usState:"us_state",canadianProvince:"canadian_province",area:"area"},GLOBAL_NAV_ITEM={path:"/companies",headerKey:"datahub-companies",permissions:["company.view_company"],key:"datahub-crm",order:1},LOCAL_NAV=[{path:"overview",label:"Overview",permissions:["company.view_contact"]},{path:"activity",label:"Activity",search:"?activityType%5B0%5D=dataHubActivity&page=1",permissions:["interaction.view_all_interaction"]},{path:"business-details",label:"Business details"},{path:"contacts",label:"Contacts",search:"?archived%5B0%5D=false&sortby=modified_on%3Adesc&page=1",permissions:["company.view_contact"],ariaDescription:"Company contacts"},{path:"account-management",label:"Account management",ariaDescription:"Account management"},{path:"investments",label:"Investment",search:"/projects?page=1&sortby=created_on%3Adesc",permissions:["investment.view_all_investmentproject","investment.view_associated_investmentproject"],ariaDescription:"Company investments"},{path:"exports",label:"Export",permissions:["company.view_companyexportcountry"]},{path:"orders",label:"Orders",permissions:["order.view_order"],ariaDescription:"Company orders"}],APP_PERMISSIONS=(0,__webpack_require__("./node_modules/lodash/lodash.js").concat)(LOCAL_NAV,GLOBAL_NAV_ITEM),QUERY_FIELDS=Object.values(QUERY_FIELDS_MAP);module.exports={GLOBAL_NAV_ITEM,LOCAL_NAV,APP_PERMISSIONS,QUERY_FIELDS,QUERY_FIELDS_MAP,NONE_TEXT:"None",NOT_SET_TEXT:"Not set",NOT_AVAILABLE_TEXT:"Not available",COMPANY_DISSOLVED_OPTION:"Company is dissolved"}},"./src/apps/companies/labels.js":module=>{module.exports={companyDetailsLabels:{business_type:"Business type",name:"Name",registered_address:"Registered address",trading_names:"Trading names",address:"Address",uk_region:"UK region",headquarter_type:"Headquarter type",global_headquarters:"Global HQ",ultimate_hq:"Ultimate HQ",sector:"Sector",website:"Website",description:"Business description",employee_range:"Number of employees",turnover_range:"Annual turnover",subsidiaries:"Subsidiaries",link_a_subsidiary:"Link a subsidiary",link_subsidiary:"Link subsidiary",country:"Country",business_type_for_other:"Type of organisation",business_type_uk_other:"Type of organisation",archived:"Archived status",archived_on:"Archive date",archived_reason:"Archived reason",archived_by_id:"Archived by",company_number:"Companies House number",vat_number:"VAT number",reference_code:"CDMS reference"},companyTypeOptions:{ltd:"UK private or public limited company",ukother:"Other type of UK organisation",foreign:"Foreign organisation"},hqLabels:{ehq:"European HQ",ghq:"Global HQ",ukhq:"UK HQ",trading_names:"Trading names"},accountManagementDisplayLabels:{one_list_tier:"One List tier",one_list_group_global_account_manager:"Global Account Manager"},exportDetailsLabels:{exportExperienceCategory:"Export win category",exportToCountries:"Currently exporting to",futureInterestCountries:"Future countries of interest",noInterestCountries:"Countries of no interest",greatProfile:"great.gov.uk business profile",exportPotential:"Export potential"},address:{companyAddress:"Address",companyRegisteredAddress:"Registered address",companiesHouseRegisteredAddress:"Registered address"},aboutLabels:{business_type:"Business type",trading_names:"Trading names",company_number:"Companies House number",vat_number:"VAT number",reference_code:"CDMS reference",turnover:"Annual turnover",number_of_employees:"Number of employees",website:"Website",description:"Description"},businessHierarchyLabels:{headquarter_type:"Headquarter type",subsidiaries:"Subsidiaries",global_headquarters:"Global HQ"},exportPotentialLabels:{very_high:{text:"Very High",description:"Most companies like this one are exporters"},high:{text:"High",description:"This business shares some features with successful exporters"},medium:{text:"Medium",description:"Some businesses that look like this one export, others don't"},low:{text:"Low",description:"This business shares many features with companies that do not export"},very_low:{text:"Very Low",description:"Most of the businesses like this aren't exporters"}},exportSegmentsLabels:{hep:"High export potential","non-hep":"Not high export potential"},exportSubSegmentsLabels:{sustain_nurture_and_grow:"Sustain: nurture & grow",sustain_develop_export_capability:"Sustain: develop export capability",sustain_communicate_benefits:"Sustain: communicate benefits",sustain_increase_competitiveness:"Sustain: increase competitiveness",reassure_nurture_and_grow:"Reassure: nurture & grow",reassure_develop_export_capability:"Reassure: develop export capability",reassure_leave_be:"Reassure: leave be",reassure_change_the_game:"Reassure: change the game",promote_develop_export_capability:"Promote: develop export capability",promote_communicate_benefits:"Promote: communicate benefits",promote_change_the_game:"Promote: change the game",challenge:"Challenge"}}},"./src/apps/transformers.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var _require=__webpack_require__("./node_modules/lodash/lodash.js"),filter=_require.filter,upperFirst=_require.upperFirst,_require2=__webpack_require__("./src/client/utils/date.js"),format=_require2.format,isDateValid=_require2.isDateValid,_require3=__webpack_require__("./src/common/constants.js"),OPTION_NO=_require3.OPTION_NO,OPTION_YES=_require3.OPTION_YES,hqLabels=__webpack_require__("./src/apps/companies/labels.js").hqLabels,groupExportCountries=__webpack_require__("./src/lib/group-export-countries.js");function transformObjectToOption(_ref){return{value:_ref.id,label:_ref.name}}var transformOptionToValue=function transformOptionToValue(option){return option&&option.value?option.value:null};module.exports={transformHQCodeToLabelledOption:function transformHQCodeToLabelledOption(_ref2){var id=_ref2.id;switch(_ref2.name){case"ehq":return{value:id,label:hqLabels.ehq};case"ghq":return{value:id,label:hqLabels.ghq};case"ukhq":return{value:id,label:hqLabels.ukhq}}},transformObjectToOption,transformStringToOption:function transformStringToOption(string){return{value:string,label:string}},transformExportCountriesToGroupStatus:function transformExportCountriesToGroupStatus(countries){return groupExportCountries(countries)},transformContactToOption:function transformContactToOption(_ref3){var id=_ref3.id,first_name=_ref3.first_name,last_name=_ref3.last_name,job_title=_ref3.job_title;return{value:id,label:upperFirst(filter(["".concat(first_name," ").concat(last_name),job_title]).join(", "))}},transformCountryToOptionWithIsoCode:function transformCountryToOptionWithIsoCode(_ref4){return{key:_ref4.id,label:_ref4.name,value:_ref4.iso_alpha2_code}},transformIdToObject:function transformIdToObject(id){return{id}},transformDateObjectToDateString:function transformDateObjectToDateString(key){if(!key)throw Error("date object key is required to transform date");return function transformDateObjectToStringWithKey(){var props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},dateString=["year","month","day"].map((function(x){return props["".concat(key,"_").concat(x)]})).join("-");return"--"===dateString?null:dateString}},transformDateStringToDateObject:function transformDateStringToDateObject(dateString){var isValidDate=dateString&&isDateValid(dateString);return{year:isValidDate?format(dateString,"yyyy"):"",month:isValidDate?format(dateString,"MM"):"",day:isValidDate?format(dateString,"dd"):""}},transformOptionToValue,transformArrayOfOptionsToValues:function transformArrayOfOptionsToValues(options){return options&&options.length?options.map(transformOptionToValue):[]},transformToYesNo:function transformToYesNo(value){return value?OPTION_YES:OPTION_NO},transformToID:function transformToID(value){return value?Array.isArray(value)?value.map((function(optionFromArrayOfOptions){return optionFromArrayOfOptions.id})):value.id:value},transformObjectToTypeahead:function transformObjectToTypeahead(value){return value?Array.isArray(value)?value.map(transformObjectToOption):transformObjectToOption(value):value}}},"./src/client/actions.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$n7:()=>OVERVIEW__COMPANY_INVESTMENT_WON_COUNT,APp:()=>INTERACTIONS_SELECTED_ADVISERS,AcS:()=>TAB_NAV__FOCUS,BWt:()=>TYPEAHEAD__INPUT,CHH:()=>EVENTS__ATTENDEE_METADATA_LOADED,Cb4:()=>COMPANY_LISTS__SELECT,CjI:()=>FORM__FIELD_DEREGISTER,CnO:()=>TAB_NAV__SELECT,Cq2:()=>HARD_REDIRECT,Cxq:()=>EVENTS__SELECTED_ORGANISER,DLw:()=>REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_LOADED,DpK:()=>INVESTMENT_OPPORTUNITY__EDIT_REQUIREMENTS,FeB:()=>EXPORTS_HISTORY__SELECT_PAGE,Fis:()=>FORM__LOADED,GPR:()=>EVENTS__METADATA_LOADED,GRb:()=>TYPEAHEAD__OPTIONS_LOADED,Gbi:()=>TASK_DETAILS_LOADED,Ggs:()=>INVESTMENT_OPPORTUNITY__REQUIREMENTS_CHANGE,Gh5:()=>TYPEAHEAD__INITIALISE,H3x:()=>FORM__FORWARD,HIy:()=>FORM__FIELDS__RESET,Hef:()=>FORM__STEP_DEREGISTER,HyB:()=>COMPANIES__LOADED,ITR:()=>COMPANY_ACTIVITIES_SELECTED_TEAMS,IX2:()=>INVESTMENT_OPPORTUNITY__UPDATED,JzB:()=>INTERACTIONS_SELECTED_COMPANIES,Kfu:()=>TYPEAHEAD__MENU_CLOSE,KnU:()=>REMINDERS__ESTIMATED_LAND_DATE_REMINDER_GOT_NEXT,Kp3:()=>ROUTED_INPUT__RESET,L5Y:()=>ONE_LIST_DETAILS_LOADED,LCU:()=>DNB__CHECK_PENDING_REQUEST,LYg:()=>INVESTMENTS__PROFILES_LOADED,LZZ:()=>EXPORT_LOADED,M0d:()=>COMPANY_ACTIVITIES__LOADED,MYm:()=>INVESTMENTS__OPPORTUNITIES_SELECT_PAGE,Mae:()=>CONTACTS__METADATA_LOADED,NTO:()=>TYPEAHEAD__OPTION_MOUSE_DOWN,OX5:()=>REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_GOT_NEXT,Ody:()=>LATEST_ANNOUNCEMENT__UPDATE_STATE,Og6:()=>COMPANY_LISTS__LISTS_LOADED,OiA:()=>EVENTS__AVENTRI_DETAILS_LOADED,Oiz:()=>COMPANY_ACTIVITIES_SELECTED_ADVISERS,PhE:()=>INVESTMENT_OPPORTUNITY__CANCEL_EDIT,PwC:()=>REMINDERS__DUE_DATE_APPROACHING_REMINDERS_DELETED,Q9S:()=>EVENTS__DETAILS_LOADED,QhV:()=>FORM__GO_TO_STEP,Qlv:()=>FORM__ERRORED,Qu9:()=>INVESTMENT_OPPORTUNITY_DETAILS__LOADED,RDn:()=>INVESTMENT__SEARCH_COMPANY_LIST_LOADED,RHb:()=>INVESTMENTS__OPPORTUNITIES_LOADED,RJR:()=>FLASH_MESSAGE__CLEAR_FROM_STATE,S77:()=>MY_INVESTMENTS__SAVE_TO_SESSION,SC8:()=>REMINDERS__NO_RECENT_INTERACTION_REMINDER_DELETED,STt:()=>MY_INVESTMENTS__LIST_LOADED,SqW:()=>REMINDER_SUMMARY__LOADED,St0:()=>FORM__RESOLVED,TJt:()=>MY_INVESTMENTS__ADD_TO_STATE,TZF:()=>TYPEAHEAD__OPTION_TOGGLE,TaK:()=>EVENTS__ALL_ACTIVITY_FEED_EVENTS_LOADED,TpS:()=>TASK__START,VfH:()=>MY_INVESTMENTS__CHECK_COMPLETE,WJs:()=>SEND_REFERRAL_FORM__SUBMIT,WhS:()=>COMPANY_LISTS__COMPANIES_LOADED,XaB:()=>COMPANY_ACTIVITIES_SELECTED_COMPANIES,Xm$:()=>INVESTMENT_OPPORTUNITY__REQUIREMENTS_METADATA_LOADED,Y$Y:()=>ANALYTICS__PUSH,Y3Q:()=>LATEST_ANNOUNCEMENT__READ_FROM_LOCALSTORAGE,YJ:()=>FLASH_MESSAGE__GET_FROM_SESSION,YMQ:()=>REMINDERS__NO_RECENT_INTERACTION_REMINDER_GOT_NEXT,YWR:()=>MY_INVESTMENTS__STATUS_CHANGE,Yf4:()=>ROUTED_INPUT__SELECT,Z1l:()=>REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_DELETED,Z90:()=>TASK__ERROR,Zo7:()=>TASK__CANCEL,_Yb:()=>EXPORT_WINS__SELECT_PAGE,_b:()=>REMINDERS__DUE_DATE_APPROACHING_REMINDERS_GOT_NEXT,_zA:()=>TYPEAHEAD__OPTION_REMOVE,aAd:()=>TYPEAHEAD__SET_ACTIVE_OPTION,aYo:()=>CONTACT_FORM__SUBMIT,aab:()=>COMPANY_LISTS__COMPANY_IN_LOADED,aji:()=>INVESTMENTS__PROJECTS_SELECTED_ADVISERS,awF:()=>EXPORT_WINS__UNCONFIRMED_LOADED,b0f:()=>COMPANY_ACTIVITIES__METADATA_LOADED,bgc:()=>MY_INVESTMENTS__STAGE_CHANGE,boT:()=>INVESTMENT__COMPANY_INVESTMENT_COUNT,cBe:()=>INTERACTION__ESS_DETAILS_LOADED,cdq:()=>FIELD_ADD_ANOTHER__INITIALISE,d$R:()=>EVENTS__LOADED,dBj:()=>FORM__FIELD_REGISTER,dpe:()=>INVESTMENTS_PROFILES__FILTER_OPTIONS_LOADED,e8c:()=>COMPANY_LOADED,eGJ:()=>ORDERS__METADATA_LOADED,eTX:()=>EXPORT_WINS__CONFIRMED_LOADED,f3J:()=>REFERRAL_LIST__LOADED,fpo:()=>ADD_COMPANY__REGION_LOADED,g2S:()=>INVESTMENT_OPPORTUNITY__EDIT_DETAILS,gUm:()=>MY_INVESTMENTS__GET_FROM_SESSION,gZL:()=>FORM__FIELD_TOUCHED,h0j:()=>CONTACTS__ACTIVITIES_LOADED,hFh:()=>DNB_FAMILY_TREE_LOADED,hIS:()=>OVERVIEW__EXPORT_WINS_SUMMARY,hWh:()=>COMPANIES__SELECTED_LEAD_ITA_OR_GLOBAL_ACCOUNT_MANAGER,hnA:()=>INVESTMENTS__SET_PROJECTS_METADATA,iDm:()=>EXPORT__PIPELINE_METADATA_LOADED,iSD:()=>FLASH_MESSAGE__ADD_TO_STATE,iX0:()=>EXPORTS_HISTORY__LOADED,j9t:()=>LATEST_ANNOUNCEMENT__WRITE_TO_LOCALSTORAGE,jNH:()=>TYPEAHEAD__MENU_OPEN,jf1:()=>OBJECTIVE_LOADED,k$I:()=>COMPANY_LISTS__ORDER,kB3:()=>ROUTED_INPUT__CHANGE,kQc:()=>TYPEAHEAD__BLUR,kQr:()=>REFERRAL_LIST__FILTER_CHANGE,kY:()=>REMINDERS__OUTSTANDING_PROPOSITIONS_LOADED,ko6:()=>CONTACTS__LOADED,l1G:()=>MY_INVESTMENTS__SORT_CHANGE,l28:()=>INVESTMENT__PROJECT_LOADED,lic:()=>DROP_DOWN_MENU_TOGGLE,mSO:()=>REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_LOADED,mUn:()=>MY_INVESTMENTS__PAGINATION_CLICK,mV:()=>DROP_DOWN_MENU_UPDATE_INDEX,mep:()=>EXPORT__PIPELINE_LIST_LOADED,moN:()=>REFERRAL_DETAILS,nBD:()=>COMPANIES__METADATA_LOADED,nE_:()=>REMINDERS__NO_RECENT_INTERACTION_REMINDERS_LOADED,o1j:()=>INVESTMENTS__PROJECTS_LOADED,oNU:()=>INVESTMENT__COMPANY_SEARCH_TERM,oV1:()=>TASK__CLEAR,p2g:()=>INTERACTIONS_SELECTED_TEAMS,pb3:()=>MY_INVESTMENTS__SHOW_DETAILS_CHANGE,pdV:()=>FORM__STEP_REGISTER,pe8:()=>FORM__FIELD_SET_VALUE,pyx:()=>TOGGLE_SECTION__TOGGLE,q3y:()=>FLASH_MESSAGE__WRITE_TO_SESSION,qre:()=>FORM__VALIDATE,qzL:()=>OUTSTANDING_PROPOSITIONS__LOADED,rMO:()=>ORDERS__LOADED,rZB:()=>DATA_HUB_FEED__FETCHED,s_5:()=>FIELD_ADD_ANOTHER__ADD,sb0:()=>COMPANY_LISTS__FILTER,tDb:()=>REMINDERS__ESTIMATED_LAND_DATE_REMINDERS_LOADED,tjD:()=>EVENTS__AVENTRI_REGISTRATION_STATUS_ATTENDEES_LOADED,ukg:()=>TYPEAHEAD__OPTIONS_CLEAR,uqm:()=>INTERACTIONS__METADATA_LOADED,vOm:()=>REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_GOT_NEXT,vQM:()=>DROP_DOWN_MENU_OPEN,vST:()=>REMINDERS__DUE_DATE_APPROACHING_REMINDERS_LOADED,vmK:()=>DROP_DOWN_MENU_CLOSED,wm$:()=>EXPORT_WINS__LOADED,wmK:()=>REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_DELETED,x7:()=>FIELD_ADD_ANOTHER__REMOVE,y6W:()=>EVENTS__SEARCH_ATTENDEE_LIST_LOADED,yFd:()=>MY_INVESTMENTS__LAND_DATE_CHANGE,yR5:()=>INTERACTIONS__LOADED,yTt:()=>FORM__BACK,zIU:()=>TASK__DISMISS_ERROR,zj3:()=>TASK__PROGRESS,zrS:()=>REMINDERS__ESTIMATED_LAND_DATE_REMINDER_DELETED});var INTERACTIONS__LOADED="INTERACTIONS__LOADED",INTERACTIONS__METADATA_LOADED="INTERACTIONS__METADATA_LOADED",INTERACTIONS_SELECTED_ADVISERS="INTERACTIONS_SELECTED_ADVISERS",INTERACTIONS_SELECTED_COMPANIES="INTERACTIONS_SELECTED_COMPANIES",INTERACTIONS_SELECTED_TEAMS="INTERACTIONS_SELECTED_TEAMS",COMPANIES__LOADED="COMPANIES__LOADED",COMPANIES__METADATA_LOADED="COMPANIES__METADATA_LOADED",COMPANIES__SELECTED_LEAD_ITA_OR_GLOBAL_ACCOUNT_MANAGER="COMPANIES__SELECTED_LEAD_ITA_OR_GLOBAL_ACCOUNT_MANAGER",COMPANY_LISTS__LISTS_LOADED="COMPANY_LISTS__LISTS_LOADED",COMPANY_LISTS__SELECT="COMPANY_LISTS__SELECT",COMPANY_LISTS__COMPANIES_LOADED="COMPANY_LISTS__COMPANIES_LOADED",COMPANY_LISTS__FILTER="COMPANY_LISTS__FILTER",COMPANY_LISTS__ORDER="COMPANY_LISTS__ORDER",CONTACTS__LOADED="CONTACTS__LOADED",CONTACTS__METADATA_LOADED="CONTACTS__METADATA_LOADED",CONTACTS__ACTIVITIES_LOADED="CONTACTS__ACTIVITIES_LOADED",ORDERS__LOADED="ORDERS__LOADED",ORDERS__METADATA_LOADED="ORDERS__METADATA_LOADED",EVENTS__LOADED="EVENTS__LOADED",EVENTS__METADATA_LOADED="EVENTS__METADATA_LOADED",EVENTS__ALL_ACTIVITY_FEED_EVENTS_LOADED="EVENTS__ALL_ACTIVITY_FEED_EVENTS_LOADED",EVENTS__SELECTED_ORGANISER="EVENTS__SELECTED_ORGANISER",EVENTS__DETAILS_LOADED="EVENTS__DETAILS_LOADED",EVENTS__AVENTRI_DETAILS_LOADED="EVENTS__AVENTRI_DETAILS_LOADED",EVENTS__AVENTRI_REGISTRATION_STATUS_ATTENDEES_LOADED="EVENTS__AVENTRI_REGISTRATION_STATUS_ATTENDEES_LOADED",EVENTS__SEARCH_ATTENDEE_LIST_LOADED="EVENTS__SEARCH_ATTENDEE_LIST_LOADED",EVENTS__ATTENDEE_METADATA_LOADED="EVENTS__ATTENDEE_METADATA_LOADED",INTERACTION__ESS_DETAILS_LOADED="INTERACTION__ESS_DETAILS_LOADED",REMINDERS__ESTIMATED_LAND_DATE_REMINDERS_LOADED="REMINDERS__ESTIMATED_LAND_DATE_REMINDERS_LOADED",REMINDERS__ESTIMATED_LAND_DATE_REMINDER_DELETED="REMINDERS__ESTIMATED_LAND_DATE_REMINDER_DELETED",REMINDERS__ESTIMATED_LAND_DATE_REMINDER_GOT_NEXT="REMINDERS__ESTIMATED_LAND_DATE_REMINDER_GOT_NEXT",REMINDERS__NO_RECENT_INTERACTION_REMINDERS_LOADED="REMINDERS__NO_RECENT_INTERACTION_REMINDERS_LOADED",REMINDERS__NO_RECENT_INTERACTION_REMINDER_DELETED="REMINDERS__NO_RECENT_INTERACTION_REMINDER_DELETED",REMINDERS__NO_RECENT_INTERACTION_REMINDER_GOT_NEXT="REMINDERS__NO_RECENT_INTERACTION_REMINDER_GOT_NEXT",REMINDERS__OUTSTANDING_PROPOSITIONS_LOADED="REMINDERS__OUTSTANDING_PROPOSITIONS_LOADED",REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_LOADED="REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_LOADED",REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_DELETED="REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_DELETED",REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_GOT_NEXT="REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_GOT_NEXT",REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_LOADED="REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_LOADED",REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_DELETED="REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_DELETED",REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_GOT_NEXT="REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_GOT_NEXT",REMINDERS__DUE_DATE_APPROACHING_REMINDERS_LOADED="REMINDERS__DUE_DATE_APPROACHING_REMINDERS_LOADED",REMINDERS__DUE_DATE_APPROACHING_REMINDERS_GOT_NEXT="REMINDERS__DUE_DATE_APPROACHING_REMINDERS_GOT_NEXT",REMINDERS__DUE_DATE_APPROACHING_REMINDERS_DELETED="REMINDERS__DUE_DATE_APPROACHING_REMINDERS_DELETED",REFERRAL_DETAILS="REFERRAL_DETAILS",TASK__START="TASK__START",TASK__PROGRESS="TASK__PROGRESS",TASK__CANCEL="TASK__CANCEL",TASK__ERROR="TASK__ERROR",TASK__DISMISS_ERROR="TASK__DISMISS_ERROR",TASK__CLEAR="TASK__CLEAR",EXPORTS_HISTORY__LOADED="EXPORTS_HISTORY__LOADED",EXPORTS_HISTORY__SELECT_PAGE="EXPORTS_HISTORY__SELECT_PAGE",TAB_NAV__SELECT="TAB_NAV__SELECT",TAB_NAV__FOCUS="TAB_NAV__FOCUS",SEND_REFERRAL_FORM__SUBMIT="SEND_REFERRAL_FORM__SUBMIT",REFERRAL_LIST__LOADED="REFERRAL_LIST__LOADED",REFERRAL_LIST__FILTER_CHANGE="REFERRAL_LIST__FILTER_CHANGE",EXPORT_WINS__LOADED="EXPORT_WINS__LOADED",EXPORT_WINS__SELECT_PAGE="EXPORT_WINS__SELECT_PAGE",FORM__LOADED="FORM__LOADED",FORM__FIELD_SET_VALUE="FORM__FIELD_SET_VALUE",FORM__FIELD_TOUCHED="FORM__FIELD_TOUCHED",FORM__FIELD_REGISTER="FORM__FIELD_REGISTER",FORM__FIELD_DEREGISTER="FORM__FIELD_DEREGISTER",FORM__STEP_REGISTER="FORM__STEP_REGISTER",FORM__STEP_DEREGISTER="FORM__STEP_DEREGISTER",FORM__FIELDS__RESET="FORM__FIELDS__RESET",FORM__FORWARD="FORM__FORWARD",FORM__BACK="FORM__BACK",FORM__GO_TO_STEP="FORM__GO_TO_STEP",FORM__VALIDATE="FORM__VALIDATE",FORM__RESOLVED="FORM__RESOLVED",FORM__ERRORED="FORM__ERRORED",ADD_COMPANY__REGION_LOADED="ADD_COMPANY__REGION_LOADED",DROP_DOWN_MENU_TOGGLE="DROP_DOWN_MENU_TOGGLE",DROP_DOWN_MENU_OPEN="DROP_DOWN_MENU_OPEN",DROP_DOWN_MENU_CLOSED="DROP_DOWN_MENU_CLOSED",DROP_DOWN_MENU_UPDATE_INDEX="DROP_DOWN_MENU_UPDATE_INDEX",ANALYTICS__PUSH="ANALYTICS__PUSH",DNB__CHECK_PENDING_REQUEST="DNB__CHECK_PENDING_REQUEST",TOGGLE_SECTION__TOGGLE="TOGGLE_SECTION__TOGGLE",INVESTMENTS__PROJECTS_LOADED="INVESTMENTS__PROJECTS_LOADED",INVESTMENTS__PROJECTS_SELECTED_ADVISERS="INVESTMENTS__PROJECTS_SELECTED_ADVISERS",INVESTMENTS__PROFILES_LOADED="INVESTMENTS__PROFILES_LOADED",INVESTMENTS__SET_PROJECTS_METADATA="INVESTMENTS__SET_PROJECTS_METADATA",INVESTMENT__SEARCH_COMPANY_LIST_LOADED="INVESTMENT__SEARCH_COMPANY_LIST_LOADED",INVESTMENT__COMPANY_INVESTMENT_COUNT="INVESTMENT__COMPANY_INVESTMENT_COUNT",INVESTMENT__COMPANY_SEARCH_TERM="INVESTMENT__COMPANY_SEARCH_TERM",INVESTMENTS_PROFILES__FILTER_OPTIONS_LOADED="INVESTMENTS_PROFILES__FILTER_OPTIONS_LOADED",INVESTMENT_OPPORTUNITY_DETAILS__LOADED="INVESTMENT_OPPORTUNITY_DETAILS__LOADED",INVESTMENTS__OPPORTUNITIES_LOADED="INVESTMENTS__OPPORTUNITIES_LOADED",INVESTMENTS__OPPORTUNITIES_SELECT_PAGE="INVESTMENTS__OPPORTUNITIES_SELECT_PAGE",INVESTMENT_OPPORTUNITY__REQUIREMENTS_METADATA_LOADED="INVESTMENT_OPPORTUNITY__REQUIREMENTS_METADATA_LOADED",INVESTMENT_OPPORTUNITY__EDIT_DETAILS="INVESTMENT_OPPORTUNITY__EDIT_DETAILS",INVESTMENT_OPPORTUNITY__EDIT_REQUIREMENTS="INVESTMENT_OPPORTUNITY__EDIT_REQUIREMENTS",INVESTMENT_OPPORTUNITY__CANCEL_EDIT="INVESTMENT_OPPORTUNITY__CANCEL_EDIT",INVESTMENT_OPPORTUNITY__REQUIREMENTS_CHANGE="INVESTMENT_OPPORTUNITY__REQUIREMENTS_CHANGE",INVESTMENT_OPPORTUNITY__UPDATED="INVESTMENT_OPPORTUNITY__UPDATED",MY_INVESTMENTS__LIST_LOADED="MY_INVESTMENTS__LIST_LOADED",MY_INVESTMENTS__CHECK_COMPLETE="MY_INVESTMENTS__CHECK_COMPLETE",MY_INVESTMENTS__PAGINATION_CLICK="MY_INVESTMENTS__PAGINATION_CLICK",MY_INVESTMENTS__STAGE_CHANGE="MY_INVESTMENTS__STAGE_CHANGE",MY_INVESTMENTS__STATUS_CHANGE="MY_INVESTMENTS__STATUS_CHANGE",MY_INVESTMENTS__LAND_DATE_CHANGE="MY_INVESTMENTS__LAND_DATE_CHANGE",MY_INVESTMENTS__SORT_CHANGE="MY_INVESTMENTS__SORT_CHANGE",MY_INVESTMENTS__SHOW_DETAILS_CHANGE="MY_INVESTMENTS__SHOW_DETAILS_CHANGE",MY_INVESTMENTS__SAVE_TO_SESSION="MY_INVESTMENTS__SAVE_TO_SESSION",MY_INVESTMENTS__GET_FROM_SESSION="MY_INVESTMENTS__GET_FROM_SESSION",MY_INVESTMENTS__ADD_TO_STATE="MY_INVESTMENTS__ADD_TO_STATE",OUTSTANDING_PROPOSITIONS__LOADED="OUTSTANDING_PROPOSITIONS__LOADED",REMINDER_SUMMARY__LOADED="REMINDER_SUMMARY__LOADED",ROUTED_INPUT__CHANGE="ROUTED_INPUT__CHANGE",ROUTED_INPUT__SELECT="ROUTED_INPUT__SELECT",ROUTED_INPUT__RESET="ROUTED_INPUT__RESET",HARD_REDIRECT="HARD_REDIRECT",CONTACT_FORM__SUBMIT="CONTACT_FORM__SUBMIT",TYPEAHEAD__BLUR="TYPEAHEAD__BLUR",TYPEAHEAD__SET_ACTIVE_OPTION="TYPEAHEAD__SET_ACTIVE_OPTION",TYPEAHEAD__INPUT="TYPEAHEAD__INPUT",TYPEAHEAD__INITIALISE="TYPEAHEAD__INITIALISE",TYPEAHEAD__MENU_CLOSE="TYPEAHEAD__MENU_CLOSE",TYPEAHEAD__MENU_OPEN="TYPEAHEAD__MENU_OPEN",TYPEAHEAD__OPTION_MOUSE_DOWN="TYPEAHEAD__OPTION_MOUSE_DOWN",TYPEAHEAD__OPTIONS_LOADED="TYPEAHEAD__OPTIONS_LOADED",TYPEAHEAD__OPTIONS_CLEAR="TYPEAHEAD__OPTIONS_CLEAR",TYPEAHEAD__OPTION_TOGGLE="TYPEAHEAD__OPTION_TOGGLE",TYPEAHEAD__OPTION_REMOVE="TYPEAHEAD__OPTION_REMOVE",FLASH_MESSAGE__WRITE_TO_SESSION="FLASH_MESSAGE__WRITE_TO_SESSION",FLASH_MESSAGE__ADD_TO_STATE="FLASH_MESSAGE__ADD_TO_STATE",FLASH_MESSAGE__GET_FROM_SESSION="FLASH_MESSAGE__GET_FROM_SESSION",FLASH_MESSAGE__CLEAR_FROM_STATE="FLASH_MESSAGE__CLEAR_FROM_STATE",FIELD_ADD_ANOTHER__INITIALISE="FIELD_ADD_ANOTHER__INITIALISE",FIELD_ADD_ANOTHER__ADD="FIELD_ADD_ANOTHER__ADD",FIELD_ADD_ANOTHER__REMOVE="FIELD_ADD_ANOTHER__REMOVE",DATA_HUB_FEED__FETCHED="DATA_HUB_FEED__FETCHED",LATEST_ANNOUNCEMENT__WRITE_TO_LOCALSTORAGE="LATEST_ANNOUNCEMENT__WRITE_TO_LOCALSTORAGE",LATEST_ANNOUNCEMENT__READ_FROM_LOCALSTORAGE="LATEST_ANNOUNCEMENT__READ_FROM_LOCALSTORAGE",LATEST_ANNOUNCEMENT__UPDATE_STATE="LATEST_ANNOUNCEMENT__UPDATE_STATE",COMPANY_LOADED="COMPANY_LOADED",COMPANY_ACTIVITIES__LOADED="COMPANY_ACTIVITIES__LOADED",COMPANY_ACTIVITIES__METADATA_LOADED="COMPANY_ACTIVITIES__METADATA_LOADED",COMPANY_ACTIVITIES_SELECTED_ADVISERS="COMPANY_ACTIVITIES_SELECTED_ADVISERS",COMPANY_ACTIVITIES_SELECTED_COMPANIES="COMPANY_ACTIVITIES_SELECTED_COMPANIES",COMPANY_ACTIVITIES_SELECTED_TEAMS="COMPANY_ACTIVITIES_SELECTED_TEAMS",EXPORT_LOADED="EXPORT_LOADED",OVERVIEW__COMPANY_INVESTMENT_WON_COUNT="OVERVIEW__COMPANY_INVESTMENT_WON_COUNT",OVERVIEW__EXPORT_WINS_SUMMARY="OVERVIEW__EXPORT_WINS_SUMMARY",EXPORT__PIPELINE_LIST_LOADED="EXPORT__PIPELINE_LIST_LOADED",EXPORT__PIPELINE_METADATA_LOADED="EXPORT__PIPELINE_METADATA_LOADED",COMPANY_LISTS__COMPANY_IN_LOADED="COMPANY_LISTS__COMPANY_IN_LOADED",DNB_FAMILY_TREE_LOADED="DNB_FAMILY_TREE_LOADED",OBJECTIVE_LOADED="OBJECTIVE_LOADED",ONE_LIST_DETAILS_LOADED="ONE_LIST_DETAILS_LOADED",TASK_DETAILS_LOADED="TASK_DETAILS_LOADED",INVESTMENT__PROJECT_LOADED="INVESTMENT__PROJECT_LOADED",EXPORT_WINS__CONFIRMED_LOADED="EXPORT_WINS__CONFIRMED_LOADED",EXPORT_WINS__UNCONFIRMED_LOADED="EXPORT_WINS__UNCONFIRMED_LOADED"},"./src/client/components/AccessDenied/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/react/index.js");var _Layout_DefaultLayout__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/components/Layout/DefaultLayout.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js"),AccessDenied=function AccessDenied(_ref){var breadcrumbs=_ref.breadcrumbs;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Layout_DefaultLayout__WEBPACK_IMPORTED_MODULE_1__.Z,{heading:"You don't have permission to view this page",pageTitle:"Access denied",breadcrumbs,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{"data-test":"access-denied",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p",{children:["If you think you should have access or need to sign up to a DBT system then ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("a",{href:"/support",children:"request access"}),"."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p",{children:["You can also ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("a",{href:"/",children:"browse or search from the homepage"})," to find the information you need."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("strong",{children:"403"})})]})})};AccessDenied.displayName="AccessDenied",AccessDenied.__docgenInfo={description:"",methods:[],displayName:"AccessDenied"};const __WEBPACK_DEFAULT_EXPORT__=AccessDenied},"./src/client/components/ActivityFeed/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{EB:()=>SOURCE_TYPES,QV:()=>BADGES,Q_:()=>STATUS,_h:()=>INTERACTION_SERVICES,qU:()=>INTERACTION_SERVICEOTHER,x8:()=>ACTIVITY_TYPE});__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var _INTERACTION_SERVICES,_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/client/utils/colours.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var STATUS={DRAFT:"draft",COMPLETE:"complete",UPCOMING:"upcoming",INCOMPLETE:"incomplete",CANCELLED:"cancelled"},BADGES={INTERACTION:{COMPLETE:{text:"Interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.ZA},UPCOMING:{text:"Upcoming interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.Ej},INCOMPLETE:{text:"Incomplete interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.Ej},CANCELLED:{text:"Cancelled interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.hM},SERVICE_DELIVERY:{text:"Service delivery",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.ZA}},REFERRAL:{COMPLETE:{text:"Completed referral",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.ZA},OUTSTANDING:{text:"Outstanding referral",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.Ej}}},SOURCE_TYPES={external:"externalDataSource"},ACTIVITY_TYPE={AventriAttendee:["dit:aventri:Attendee"],CompaniesHouseAccount:["dit:Accounts"],CompaniesHouseCompany:["dit:Company"],DataHubEvent:["dit:dataHub:Event"],AventriEvent:["dit:aventri:Event"],HmrcExporter:["dit:Export"],Interaction:["dit:Interaction","dit:ServiceDelivery"],InvestmentProject:["dit:InvestmentProject"],Omis:["dit:OMISOrder"],Referral:["dit:CompanyReferral"],DirectoryFormsApi:["dit:directoryFormsApi:Submission"],MaxemailCampaign:["dit:maxemail:Campaign"]},INTERACTION_SERVICES=(_defineProperty(_INTERACTION_SERVICES={"Account Management":"Account Management","A Specific Service":"Specific Service","A Specific DBT Export Service or Funding":"Service or Funding",COP26:"COP26","Enquiry received":"Enquiry","Enquiry or Referral Received":"Enquiry or Referral",Events:"Event","Export Win":"Export Win","Global Investment Summit (2021)":"Global Investment Summit (2021)","Investment Enquiry":"Enquiry","Investment - IST Aftercare Offered (IST use only)":"IST Aftercare","Investment - Services":"Service","IST Specific Service":"IST Service","Proposition Development":"Proposition Development","Trade Agreement Implementation Activity":"Implementation","GREAT - Unicorn Kingdom Campaign - North America (2023)":"GREAT - Unicorn Kingdom Campaign","Account management":"Account management","Specific service":"Specific service","DBT export service or funding":"DBT export service or funding"},"Enquiry received","Enquiry"),_defineProperty(_INTERACTION_SERVICES,"Enquiry or referral","Enquiry or referral"),_defineProperty(_INTERACTION_SERVICES,"Export win","Export win"),_defineProperty(_INTERACTION_SERVICES,"Global Investment Summit (2021)","Global Investment Summit (2021)"),_defineProperty(_INTERACTION_SERVICES,"Investment Enquiry","Enquiry"),_defineProperty(_INTERACTION_SERVICES,"Investment - IST aftercare offered (IST use only)","IST Aftercare"),_defineProperty(_INTERACTION_SERVICES,"Investment - services","Service"),_defineProperty(_INTERACTION_SERVICES,"IST service","IST service"),_defineProperty(_INTERACTION_SERVICES,"Proposition development","Proposition development"),_defineProperty(_INTERACTION_SERVICES,"Trade agreement implementation activity","Implementation"),_INTERACTION_SERVICES),INTERACTION_SERVICEOTHER={"Export Support Service - International Markets":"Export Support Service: International","Global Growth Service: Diagnostic and Output Report Completed by DBT":"Global Growth: Diagnostic and Output Report","Global Growth Service: engagement letter signed by company":"Global Growth: Engagement Letter Signed","Global Growth Service: project closed":"Global Growth: Project Closed","Global Growth Service: signed export growth plan received from company":"Global Growth: Export Growth Plan Received","Overseas Business Network chargeable services (OBN)":"OBN Chargeable Services","Participation at Glasgow/getting involved with COP26":"Participation at Glasgow/COP26 involvement","DBT Middle East & Pakistan Comms & Marketing campaigns":"DBT Middle East & Pakistan Comms & Marketing","Commonwealth Games 2022 - BATP Programme":"Commonwealth Games 2022 – BATP","Commonwealth Games 2022 - GEP Programme":"Commonwealth Games 2022 – GEP","HPO High Potential Opportunity investment enquiry from IIGB":"HPO Investment Enquiry via IIGB","HPO High Potential Opportunity investment enquiry from IST target company":"HPO Investment Enquiry via IST Target Company","Abandoned - no investor response (ERU Use)":"Abandoned - No Response (ERU Use)","Follow up email - no investor response (ERU Use)":"Follow Up Email - No Response (ERU Use)","Business partners (such as distributors or manufacturers)":"Business Partners","Financial and professional service providers":"Financial + Professional Service Providers","Engagement with Local Enterprise Partnerships (LEPs)":"Engagement: Local Enterprise Partnerships","Engaging with devolved authorities on trade agreements":"Engagement: Devolved Authorities Trade Agreements","Informing key stakeholder groups of opportunities and gathering business intelligence":"Informing stakeholders + gathering intelligence","Negotiating rounds - pre-ratification and negotiating amendments":"Negotiating: pre-ratification + amendments","One-to-one with exporters explaining new trade agreement opportunities, messages and resources":"121 with exporters: new trade agreement opportunities","One-to-one with investors explaining new trade agreement opportunities, messages and resources":"121 with investors: new trade agreement opportunities","Partner country interaction - post-ratification (trade agreement related)":"Partner country interaction: post-ratification","Partner country interaction - related to Market Access Barriers":"Partner country interaction: Market Access Barriers"}},"./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaLookup.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>useAdministrativeAreaLookup,d:()=>filterAreaDataByCountry});__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var axios__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/axios/index.js"),axios__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_18__),_lib_urls__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/lib/urls.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function useAdministrativeAreaLookup(){return function(){var _findAreaByCountryId=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var countryId,_yield$axios,data,_args=arguments;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return countryId=_args.length>0&&void 0!==_args[0]?_args[0]:void 0,_context.next=3,axios__WEBPACK_IMPORTED_MODULE_18___default()(_lib_urls__WEBPACK_IMPORTED_MODULE_19__.metadata.administrativeArea());case 3:return _yield$axios=_context.sent,data=_yield$axios.data,_context.abrupt("return",countryId?filterAreaDataByCountry(data,countryId):data);case 6:case"end":return _context.stop()}}),_callee)})));return function findAreaByCountryId(){return _findAreaByCountryId.apply(this,arguments)}}()}function filterAreaDataByCountry(data,countryId){return data.filter((function(area){return null===area.disabled_on})).filter((function(area){return area.country.id===countryId}))}},"./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaSearch.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js");var react__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/index.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==_args[0]?_args[0]:void 0,_context.prev=1,setIsSubmitting(!0),setAdministrativeAreaSearchError(null),_context.t0=setAdministrativeAreaList,_context.next=7,areaSearchCallback(countryId);case 7:_context.t1=_context.sent,(0,_context.t0)(_context.t1),_context.next=15;break;case 11:_context.prev=11,_context.t2=_context.catch(1),setAdministrativeAreaList(null),setAdministrativeAreaSearchError("Error occurred while searching for an administrative area.");case 15:return _context.prev=15,setIsSubmitting(!1),_context.finish(15);case 18:case"end":return _context.stop()}}),_callee,null,[[1,11,15,18]])}))),_onAdministrativeAreaSearch.apply(this,arguments)}return{administrativeAreaSearchError,administrativeAreaList,isAreaFilterSubmitting:isSubmitting,onAdministrativeAreaSearch:function onAdministrativeAreaSearch(){return _onAdministrativeAreaSearch.apply(this,arguments)}}}},"./src/client/components/Analytics/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),_actions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/actions.js");const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)()((function(_ref){var children=_ref.children,dispatch=_ref.dispatch;return children((function(_ref2){var category=_ref2.category,action=_ref2.action,label=_ref2.label,extra=_ref2.extra,_ref2$event=_ref2.event,event=void 0===_ref2$event?"gaEvent":_ref2$event;return dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_1__.Y$Y,category,action,label,extra,event})}))}))},"./src/client/components/ArchivePanel/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,prop_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__),styled_components__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_main__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@govuk-react/main/dist/govuk-react-main.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_client_components_StatusMessage__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/client/components/StatusMessage/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var format=__webpack_require__("./src/client/utils/date.js").format,negativeSpacing="-"+_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_4,StyledMain=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(_govuk_react_main__WEBPACK_IMPORTED_MODULE_5__.Z)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n padding-top: ",";\n div {\n font-size: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_1,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.Kt.SIZE_20),StyledMessage=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)("p")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n font-weight: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.Xw.bold),StyledReason=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(StyledMessage)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n margin-top: ",";\n"])),negativeSpacing),ArchivePanel=function ArchivePanel(_ref){var _ref$archivedBy=_ref.archivedBy,archivedBy=void 0===_ref$archivedBy?null:_ref$archivedBy,archivedOn=_ref.archivedOn,archiveReason=_ref.archiveReason,unarchiveUrl=_ref.unarchiveUrl,_ref$onClick=_ref.onClick,onClick=void 0===_ref$onClick?null:_ref$onClick,type=_ref.type,_ref$archiveMessage=_ref.archiveMessage,archiveMessage=void 0===_ref$archiveMessage?"archived":_ref$archiveMessage;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledMain,{"data-test":"archive-panel",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(_client_components_StatusMessage__WEBPACK_IMPORTED_MODULE_8__.Z,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledMessage,{"data-test":"archive-message",children:archivedBy?"This ".concat(type," was ").concat(archiveMessage," on ").concat(format(archivedOn)," by ").concat(archivedBy.first_name||archivedBy.firstName," ").concat(archivedBy.last_name||archivedBy.lastName,"."):"This ".concat(type," was automatically archived on ").concat(format(archivedOn),".")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledReason,{"data-test":"archive-reason",children:"Reason: ".concat(archiveReason)}),unarchiveUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_7__.Z,{"data-test":"unarchive-link",onClick,href:unarchiveUrl,children:"Unarchive"})]})})};ArchivePanel.displayName="ArchivePanel",ArchivePanel.propTypes={archivedBy:prop_types__WEBPACK_IMPORTED_MODULE_11___default().object,archivedOn:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired,archiveReason:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired,unarchiveUrl:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,onClick:prop_types__WEBPACK_IMPORTED_MODULE_11___default().func,type:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired},ArchivePanel.__docgenInfo={description:"An extension of `StatusMessage` that is used to denote whether a record has been archived.",methods:[],displayName:"ArchivePanel",props:{archivedBy:{defaultValue:{value:"null",computed:!1},description:"An object containg the first and last name of the person who archived the record. If this is not defined, the automatic archive text will appear.",type:{name:"object"},required:!1},onClick:{defaultValue:{value:"null",computed:!1},description:"This is used when the unarchive link needs to contain an `onClick` event (such as displaying a flash message).",type:{name:"func"},required:!1},archiveMessage:{defaultValue:{value:"'archived'",computed:!1},required:!1},archivedOn:{description:"The date the record was archived.",type:{name:"string"},required:!0},archiveReason:{description:"The reason why the record was archived.",type:{name:"string"},required:!0},unarchiveUrl:{description:"The URL to unarchive the record.",type:{name:"string"},required:!1},type:{description:"The type of record.",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=ArchivePanel},"./src/client/components/Badge/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_visually_hidden__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/visually-hidden/dist/govuk-react-visually-hidden.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledBadge=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("span")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border: ",";\n border-radius: 4px;\n padding: 2px 4px;\n font-size: ",";\n white-space: nowrap;\n color: ",";\n"])),(function(_ref){var borderColour=_ref.borderColour;return"2px solid ".concat(borderColour)}),(function(props){return props.fontSize?props.fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.Kt.SIZE_14}),(function(props){return props.textColour?props.textColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.cK})),Badge=function Badge(_ref2){var label=_ref2.label,_ref2$borderColour=_ref2.borderColour,borderColour=void 0===_ref2$borderColour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.FU:_ref2$borderColour,_ref2$textColour=_ref2.textColour,textColour=void 0===_ref2$textColour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.cK:_ref2$textColour,_ref2$fontSize=_ref2.fontSize,fontSize=void 0===_ref2$fontSize?_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.Kt.SIZE_14:_ref2$fontSize,children=_ref2.children;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(StyledBadge,{"data-test":"badge",borderColour,textColour,fontSize,children:[label&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_govuk_react_visually_hidden__WEBPACK_IMPORTED_MODULE_4__.Z,{children:label}),children]})};Badge.displayName="Badge",Badge.propTypes={label:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,borderColour:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,textColour:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,fontSize:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node.isRequired},Badge.__docgenInfo={description:"A component to display the type of an element.",methods:[],displayName:"Badge",props:{borderColour:{defaultValue:{value:"GREY_2",computed:!0},description:"A custom colour for the border.",type:{name:"string"},required:!1},textColour:{defaultValue:{value:"TEXT_COLOUR",computed:!0},description:"A custom colour for the badge text.",type:{name:"string"},required:!1},fontSize:{defaultValue:{value:"FONT_SIZE.SIZE_14",computed:!0},description:"A custom size for the text of the badge.",type:{name:"string"},required:!1},label:{description:"",type:{name:"string"},required:!1},children:{description:"The text that will be displayed on the badge.",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Badge},"./src/client/components/ButtonLink/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/client/utils/colours.js");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_5__.ZP)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__.Z).attrs((function(props){return props}))(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n &,\n &:hover,\n &:focus {\n background: transparent;\n box-shadow: none;\n color: ",";\n cursor: pointer;\n text-decoration: underline;\n ","\n }\n"])),_client_utils_colours__WEBPACK_IMPORTED_MODULE_4__.su,(function(props){return props.inline&&"\n padding: 0;\n margin: 0 0 0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.N_.SCALE_1,";\n border: 0;\n width: auto;\n font: inherit;\n ")}))},"./src/client/components/Checkbox/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/index.js"),styled_components__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["onChange","name","initialChecked","value"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledGovCheckbox=(0,styled_components__WEBPACK_IMPORTED_MODULE_25__.ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_22__.XZ)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n"])),(function(props){return props.reduced&&"\n padding: 8px 0 8px 33px !important;\n min-height: auto;\n margin-bottom: 1px;\n\n input {\n width: 18px;\n height: 18px;\n }\n input + span {\n padding: 0;\n &:before {\n margin: 8px 0 0 8px;\n height: 18px;\n width: 18px;\n border-width: 1px;\n }\n &:after {\n border-width: 0 0 2px 2px;\n width: 10px;\n height: 5px;\n left: 11px;\n }\n }\n input + span + span {\n padding-left: 0;\n font-size: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.VN.S,"px;\n }\n ")})),Checkbox=function Checkbox(_ref){var _onChange=_ref.onChange,name=_ref.name,_ref$initialChecked=_ref.initialChecked,initialChecked=void 0!==_ref$initialChecked&&_ref$initialChecked,value=_ref.value,props=_objectWithoutProperties(_ref,_excluded),_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_21__.useState)(initialChecked),2),checked=_useState2[0],setChecked=_useState2[1];return(0,react__WEBPACK_IMPORTED_MODULE_21__.useEffect)((function(){return setChecked(initialChecked)}),[initialChecked]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_24__.jsx)(StyledGovCheckbox,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js");var react__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/index.js"),_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@govuk-react/multi-choice/dist/govuk-react-multi-choice.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_34__),styled_components__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/utils/colours.js"),_Checkbox__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Checkbox/index.jsx"),_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_excluded=["legend","name","hint","options","loadOptions","selectedOptions","onChange","id","groupId","maxScrollHeight"],_excluded2=["value","label"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var checkboxGroupElementStyles=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.iv)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n legend {\n font-size: ",";\n font-weight: ",";\n }\n label {\n font-weight: normal;\n margin-bottom: 4px;\n padding-left: 0;\n }\n li label {\n padding-left: 20px;\n }\n input {\n + span {\n padding: 10px 15px 5px;\n &::before {\n top: 8px;\n width: 24px;\n height: 24px;\n }\n &::after {\n top: 14px;\n left: 5px;\n width: 10px;\n height: 4.5px;\n border-width: 0 0 3px 3px;\n }\n }\n &:hover {\n + span {\n &::before {\n outline: 10px solid ",";\n }\n }\n }\n &:focus {\n + span {\n &::before {\n box-shadow: 0 0 0 4px ",";\n }\n }\n }\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Xw.bold,_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__.FU,_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__.$R),StyledFieldWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)(_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_31__.Z)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin-bottom: 14px;\n\n "," {\n margin-bottom: 14px;\n }\n\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.qk.TABLET,(function(_ref){var maxScrollHeight=_ref.maxScrollHeight;return maxScrollHeight?"\n fieldset > legend {\n font-size: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_16,";\n font-weight: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Xw.bold,";\n }\n fieldset > div {\n overflow-y: scroll;\n max-height: ").concat(maxScrollHeight,"px;\n padding-left: 10px;\n margin-left: -10px;\n /* Taken from Gov.uk, these rules allow us to retain a permanent scrollbar */\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 7px;\n }\n &::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, 0.5);\n -webkit-box-shadow: 0 0 1px rgb(255 255 255 / 87%);\n }\n }\n ").concat(checkboxGroupElementStyles):checkboxGroupElementStyles})),SelectedCount=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("span")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ",";\n display: block;\n padding: "," 0;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_14,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.N_.SCALE_1),StyledList=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("ul")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n list-style: none;\n"]))),StyledCheckbox=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)(_Checkbox__WEBPACK_IMPORTED_MODULE_30__.Z)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n "," {\n font-size: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_16),CheckboxGroupField=function CheckboxGroupField(_ref2){var legend=_ref2.legend,name=_ref2.name,hint=_ref2.hint,_ref2$options=_ref2.options,initialOptions=void 0===_ref2$options?[]:_ref2$options,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?null:_ref2$loadOptions,_ref2$selectedOptions=_ref2.selectedOptions,selectedOptions=void 0===_ref2$selectedOptions?[]:_ref2$selectedOptions,_ref2$onChange=_ref2.onChange,onChange=void 0===_ref2$onChange?function(){return null}:_ref2$onChange,_ref2$groupId=(_ref2.id,_ref2.groupId),groupId=void 0===_ref2$groupId?"":_ref2$groupId,_ref2$maxScrollHeight=_ref2.maxScrollHeight,maxScrollHeight=void 0===_ref2$maxScrollHeight?0:_ref2$maxScrollHeight,props=_objectWithoutProperties(_ref2,_excluded),_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_26__.useState)(initialOptions),2),options=_useState2[0],setOptions=_useState2[1],_useState4=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_26__.useState)(null!==loadOptions),2),loading=_useState4[0],setLoading=_useState4[1];return(0,react__WEBPACK_IMPORTED_MODULE_26__.useEffect)((function(){null!==loadOptions&&loadOptions().then((function(options){setLoading(!1),setOptions(options)}))}),[options,loadOptions]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledFieldWrapper,_objectSpread(_objectSpread({maxScrollHeight,legend,name,hint,"data-test":"checkbox-group-field-".concat(name),groupId},props),{},{children:loading?"Loading...":(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.Fragment,{children:[maxScrollHeight>0&&selectedOptions.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(SelectedCount,{children:"".concat(selectedOptions.length," selected")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_27__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledList,{children:options.map((function(option,i){var optionValue=option.value,optionLabel=option.label,optionProps=_objectWithoutProperties(option,_excluded2),checked=selectedOptions.map((function(_ref3){return _ref3.value})).includes(optionValue),otherOptions=_toConsumableArray(selectedOptions.filter((function(_ref4){return _ref4.value!==optionValue}))),getCheckboxId=function getCheckboxId(name){return"field-".concat(name,"-").concat(i+1)};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)("li",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledCheckbox,_objectSpread(_objectSpread({id:getCheckboxId(name),name,initialChecked:checked,value:optionValue,onChange:function handleChange(event){event.target.checked?onChange([].concat(_toConsumableArray(otherOptions),[option])):onChange(otherOptions)},"aria-label":optionLabel,"aria-labelledby":"".concat(getCheckboxId(name)," ").concat(groupId)},optionProps),{},{children:optionLabel}))},optionValue)}))})})]})}))};CheckboxGroupField.displayName="CheckboxGroupField",CheckboxGroupField.propTypes={legend:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,name:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,hint:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,options:prop_types__WEBPACK_IMPORTED_MODULE_34___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_34___default().shape({value:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string})).isRequired,loadOptions:prop_types__WEBPACK_IMPORTED_MODULE_34___default().func,selectedOptions:prop_types__WEBPACK_IMPORTED_MODULE_34___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_34___default().shape({value:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string})).isRequired,onChange:prop_types__WEBPACK_IMPORTED_MODULE_34___default().func,id:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,maxScrollHeight:prop_types__WEBPACK_IMPORTED_MODULE_34___default().number,groupId:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string},CheckboxGroupField.__docgenInfo={description:"Check box group field - shows a number of options as checkboxes\n\nLet users select one or more options by using the checkboxes component.\nIf you have a lot of options to display consider using the `visibleHeight`\nproperty to create a scrollable area. Selected option count will only show\nwhen you use the `visibleHeight` property.\n\nIf when a screenreader reads the label of the checkboxes in isolation it is not clear what they refer to, use the `groupId` prop to ensure the legend of the checkbox group is read after each checkbox label.",methods:[],displayName:"CheckboxGroupField",props:{options:{defaultValue:{value:"[]",computed:!1},description:"The available options as objects with label and value",type:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!1},label:{name:"string",required:!1}}}},required:!1},loadOptions:{defaultValue:{value:"null",computed:!1},description:"Function to load options",type:{name:"func"},required:!1},selectedOptions:{defaultValue:{value:"[]",computed:!1},description:"The options that have been selected",type:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!1},label:{name:"string",required:!1}}}},required:!1},onChange:{defaultValue:{value:"() => null",computed:!1},description:"Callback function that passes on the selected options",type:{name:"func"},required:!1},groupId:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},maxScrollHeight:{defaultValue:{value:"0",computed:!1},description:"Sets the visible area for the checkboxes before the overflow is set",type:{name:"number"},required:!1},legend:{description:"The legend label to display",type:{name:"string"},required:!1},name:{description:"The field name for the group",type:{name:"string"},required:!1},hint:{description:"The hint to display",type:{name:"string"},required:!1},id:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=CheckboxGroupField},"./src/client/components/Chip/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledButton=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("button")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: inline-table;\n padding: 12px;\n margin: 4px;\n background-color: ",";\n border-radius: ",";\n border: 1px solid ",";\n vertical-align: middle;\n cursor: pointer;\n span {\n pointer-events: none;\n display: table-cell;\n font-size: ",";\n }\n span:first-child {\n text-transform: ",";\n padding-right: ",";\n font-weight: ",";\n }\n"])),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.nx,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_1,_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.E5,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_16,(function(_ref){return _ref.onClick&&"uppercase"}),(function(_ref2){return _ref2.onClick&&"8px"}),(function(_ref3){return _ref3.onClick&&_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Xw.bold})),Chip=function Chip(_ref4){var children=_ref4.children,value=_ref4.value,_ref4$onClick=_ref4.onClick,onClick=void 0===_ref4$onClick?null:_ref4$onClick;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(StyledButton,{onClick,"data-value":value,"aria-label":"remove filter ".concat(children),children:[onClick&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span",{children:"✕"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span",{children})]})};Chip.displayName="Chip",Chip.propTypes={children:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,onClick:prop_types__WEBPACK_IMPORTED_MODULE_8___default().func},Chip.__docgenInfo={description:"Chips are compact elements that represent an input, attribute, or action.\nA Chip could be used to display a list of selected filters in a collection list.",methods:[],displayName:"Chip",props:{onClick:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},children:{description:"",type:{name:"node"},required:!0},value:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Chip},"./src/client/components/CollectionList/CollectionHeader.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_27__),_govuk_react_button__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),pluralize__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/pluralize/pluralize.js"),pluralize__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(pluralize__WEBPACK_IMPORTED_MODULE_19__),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/CollectionList/CollectionHeaderRow.jsx"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/utils/colours.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/utils/number-utils.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_excluded=["totalItems","collectionName","addItemUrl","shouldPluralize"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledHeaderText=(0,styled_components__WEBPACK_IMPORTED_MODULE_26__.ZP)(_govuk_react_heading__WEBPACK_IMPORTED_MODULE_20__.H2)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n margin-top: 0;\n font-weight: normal;\n font-size: ","px;\n margin-bottom: 0;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.nR.MEDIUM),StyledLink=styled_components__WEBPACK_IMPORTED_MODULE_26__.ZP.a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin-bottom: 0;\n"]))),StyledResultCount=(0,styled_components__WEBPACK_IMPORTED_MODULE_26__.ZP)("span")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: 36px;\n font-weight: 600;\n line-height: 1;\n"])));function CollectionHeader(_ref){var totalItems=_ref.totalItems,_ref$collectionName=_ref.collectionName,collectionName=void 0===_ref$collectionName?"result":_ref$collectionName,addItemUrl=_ref.addItemUrl,_ref$shouldPluralize=_ref.shouldPluralize,shouldPluralize=void 0===_ref$shouldPluralize||_ref$shouldPluralize,rest=_objectWithoutProperties(_ref,_excluded),formattedTotal=(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_24__.gH)(totalItems),counterSuffix=shouldPluralize?pluralize__WEBPACK_IMPORTED_MODULE_19___default()(collectionName,totalItems):collectionName,actions=addItemUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsxs)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_18__.Z,{as:StyledLink,href:addItemUrl,buttonColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_23__.nx,buttonTextColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_23__.E5,"data-test":"add-collection-item-button",children:["Add ",collectionName]});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsx)(_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({primary:!0,actions},rest),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsxs)(StyledHeaderText,{"data-test":"collection-header-name",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsx)(StyledResultCount,{"data-test":"collection-count",children:formattedTotal})," ".concat(counterSuffix)]})}))}CollectionHeader.displayName="CollectionHeader",CollectionHeader.propTypes={totalItems:prop_types__WEBPACK_IMPORTED_MODULE_27___default().number.isRequired,collectionName:prop_types__WEBPACK_IMPORTED_MODULE_27___default().string.isRequired,addItemUrl:prop_types__WEBPACK_IMPORTED_MODULE_27___default().string},CollectionHeader.defaultProps={addItemUrl:null},CollectionHeader.__docgenInfo={description:"",methods:[],displayName:"CollectionHeader",props:{collectionName:{defaultValue:{value:"'result'",computed:!1},description:"",type:{name:"string"},required:!1},shouldPluralize:{defaultValue:{value:"true",computed:!1},required:!1},addItemUrl:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},totalItems:{description:"",type:{name:"number"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=CollectionHeader},"./src/client/components/CollectionList/CollectionHeaderRow.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_23__),styled_components__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_excluded=["primary","actions","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledRowWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_22__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n font-size: ",";\n padding: "," 0;\n border-bottom: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_2,(function(_ref){return _ref.primary?"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_1," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.E5):"1px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.FU)})),StyledActions=(0,styled_components__WEBPACK_IMPORTED_MODULE_22__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n width: 100%;\n margin-top: ",";\n\n "," {\n margin-top: 0;\n margin-left: ",";\n display: flex;\n justify-content: flex-end;\n flex-basis: 0;\n flex-grow: 1;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_1),CollectionHeaderRow=function CollectionHeaderRow(_ref2){var primary=_ref2.primary,actions=_ref2.actions,children=_ref2.children,rest=_objectWithoutProperties(_ref2,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsxs)(StyledRowWrapper,_objectSpread(_objectSpread({primary},rest),{},{children:[children,actions&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsx)(StyledActions,{children:actions})]}))};CollectionHeaderRow.displayName="CollectionHeaderRow",CollectionHeaderRow.propTypes={primary:prop_types__WEBPACK_IMPORTED_MODULE_23___default().bool,actions:prop_types__WEBPACK_IMPORTED_MODULE_23___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_23___default().node.isRequired},CollectionHeaderRow.defaultProps={primary:!1,actions:null},CollectionHeaderRow.__docgenInfo={description:"",methods:[],displayName:"CollectionHeaderRow",props:{primary:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=CollectionHeaderRow},"./src/client/components/CollectionList/CollectionItem.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,prop_types__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_13__),react_router_dom__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js"),styled_components__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_utils_colours__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/client/utils/colours.js"),_Badge___WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/client/components/Badge/index.jsx"),_components_Metadata___WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/client/components/Metadata/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ItemWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("li")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n border-bottom: 1px solid ",";\n padding: "," 0;\n"])),_utils_colours__WEBPACK_IMPORTED_MODULE_7__.FU,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_3),StyledBadgesWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin-bottom: ",";\n\n & > * {\n margin-right: ",";\n &:last-child {\n margin-right: 0;\n }\n }\n\n "," {\n float: right;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_1,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.qk.TABLET),StyledHeader=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)(_govuk_react_heading__WEBPACK_IMPORTED_MODULE_4__.H3)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ","px;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.nR.SMALL),StyledLinkHeader=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)(StyledHeader)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n & > a:link,\n a:visited,\n a:hover,\n a:active {\n text-decoration: none;\n }\n"]))),StyledSubheading=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("h4")(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-size: 14px;\n line-height: 20px;\n color: ",";\n font-weight: normal;\n margin: -"," 0 "," 0;\n"])),_utils_colours__WEBPACK_IMPORTED_MODULE_7__.au,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_3,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_2),StyledButtonWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("div")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n margin-bottom: -30px;\n margin-right: 10px;\n\n "," {\n text-align: right;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.qk.TABLET),CollectionItem=function CollectionItem(_ref){var headingText=_ref.headingText,subheading=_ref.subheading,headingUrl=_ref.headingUrl,badges=_ref.badges,metadata=_ref.metadata,metadataRenderer=_ref.metadataRenderer,onClick=_ref.onClick,_ref$titleRenderer=_ref.titleRenderer,titleRenderer=void 0===_ref$titleRenderer?null:_ref$titleRenderer,_ref$useReactRouter=_ref.useReactRouter,useReactRouter=void 0!==_ref$useReactRouter&&_ref$useReactRouter,buttons=_ref.buttons;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(ItemWrapper,{"data-test":"collection-item",children:[badges&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledBadgesWrapper,{children:badges.map((function(badge){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_Badge___WEBPACK_IMPORTED_MODULE_8__.Z,{borderColour:badge.borderColour,children:badge.text},badge.text)}))}),titleRenderer?titleRenderer(headingText,headingUrl):headingUrl?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledLinkHeader,{children:useReactRouter?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_5__.Z,{as:react_router_dom__WEBPACK_IMPORTED_MODULE_12__.rU,to:headingUrl,onClick,children:headingText}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_5__.Z,{href:headingUrl,onClick,children:headingText})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledHeader,{children:headingText}),subheading&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledSubheading,{children:subheading}),metadataRenderer?metadataRenderer(metadata):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_Metadata___WEBPACK_IMPORTED_MODULE_9__.Z,{rows:metadata}),buttons&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledButtonWrapper,{children:buttons})]})};CollectionItem.displayName="CollectionItem",CollectionItem.propTypes={headingUrl:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,headingText:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string.isRequired,subheading:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,badges:prop_types__WEBPACK_IMPORTED_MODULE_13___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_13___default().shape({text:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,borderColour:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string})),metadata:prop_types__WEBPACK_IMPORTED_MODULE_13___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_13___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_13___default().node.isRequired})),type:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,metadataRenderer:prop_types__WEBPACK_IMPORTED_MODULE_13___default().func,titleRenderer:prop_types__WEBPACK_IMPORTED_MODULE_13___default().func},CollectionItem.__docgenInfo={description:"",methods:[],displayName:"CollectionItem",props:{titleRenderer:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},headingUrl:{description:"",type:{name:"string"},required:!1},headingText:{description:"",type:{name:"string"},required:!0},subheading:{description:"",type:{name:"string"},required:!1},badges:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{text:{name:"string",required:!1},borderColour:{name:"string",required:!1}}}},required:!1},metadata:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"node",required:!0}}}},required:!1},type:{description:"",type:{name:"string"},required:!1},metadataRenderer:{description:"",type:{name:"func"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=CollectionItem},"./src/client/components/CollectionList/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var react__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),govuk_react__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_client_components_Task__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/components/Task/index.jsx"),_components__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/components/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{P3:()=>ALPHABETICAL,SZ:()=>LEAST_RECENT,u8:()=>RECENT,ZP:()=>CompanyLists_Filters});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_input_esm=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),govuk_react_select_esm=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js"),govuk_react_grid_row_esm=__webpack_require__("./node_modules/@govuk-react/grid-row/dist/govuk-react-grid-row.esm.js"),govuk_react_grid_col_esm=__webpack_require__("./node_modules/@govuk-react/grid-col/dist/govuk-react-grid-col.esm.js"),es=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),prop_types=(__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/prop-types/index.js")),prop_types_default=__webpack_require__.n(prop_types),govuk_react_label_esm=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),govuk_react_label_text_esm=__webpack_require__("./node_modules/@govuk-react/label-text/dist/govuk-react-label-text.esm.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var StyledLabel=(0,styled_components_browser_esm.ZP)(govuk_react_label_esm.Z)((function(_ref){var theme=_ref.theme,justifyRight=_ref.justifyRight;return _defineProperty({display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"wrap"},(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET,{flexWrap:"nowrap",justifyContent:justifyRight&&"flex-end"})})),StyledLabelText=(0,styled_components_browser_esm.ZP)(govuk_react_label_text_esm.Z)((function(_ref3){var theme=_ref3.theme;return _defineProperty({width:"100%"},(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET,{marginRight:govuk_react_constants_esm.N_.SCALE_2,width:"auto"})})),InlineLabel=function InlineLabel(_ref5){var text=_ref5.text,children=_ref5.children,justifyRight=_ref5.justifyRight,name=_ref5.name;return(0,jsx_runtime.jsxs)(StyledLabel,{justifyRight,htmlFor:name,children:[(0,jsx_runtime.jsx)(StyledLabelText,{children:text}),children]})};InlineLabel.displayName="InlineLabel",InlineLabel.propTypes={text:prop_types_default().string.isRequired,children:prop_types_default().node,justifyRight:prop_types_default().bool},InlineLabel.defaultProps={justifyRight:!1},InlineLabel.__docgenInfo={description:"",methods:[],displayName:"InlineLabel",props:{justifyRight:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},text:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"node"},required:!1}}};const components_InlineLabel=InlineLabel;var actions=__webpack_require__("./src/client/actions.js"),state=__webpack_require__("./src/client/components/CompanyLists/state.js");function Filters_typeof(o){return Filters_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Filters_typeof(o)}function Filters_defineProperty(obj,key,value){return(key=function Filters_toPropertyKey(arg){var key=function Filters_toPrimitive(input,hint){if("object"!==Filters_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==Filters_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===Filters_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ALPHABETICAL="alphabetical",RECENT="recent",LEAST_RECENT="least-recent",getMediaQuery=function getMediaQuery(theme){return(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET},StyledRoot=(0,styled_components_browser_esm.ZP)(govuk_react_grid_row_esm.Z)((function(_ref){var theme=_ref.theme;return Filters_defineProperty({background:colours.zT,padding:"".concat(govuk_react_constants_esm.N_.SCALE_2," ").concat(govuk_react_constants_esm.N_.SCALE_3),flexWrap:"wrap"},getMediaQuery(theme),{flexWrap:"nowrap"})})),StyledCol=(0,styled_components_browser_esm.ZP)(govuk_react_grid_col_esm.Z)((function(_ref3){var theme=_ref3.theme;return{paddingLeft:0,paddingRight:0,"&:not(:first-child)":Filters_defineProperty({paddingTop:govuk_react_constants_esm.N_.SCALE_2},getMediaQuery(theme),{paddingTop:0,marginLeft:govuk_react_constants_esm.N_.SCALE_2})}})),StyledInput=(0,styled_components_browser_esm.ZP)(govuk_react_input_esm.Z)(Filters_defineProperty({width:"100%"},govuk_react_constants_esm.qk.LARGESCREEN,{width:200})),StyledSelect=(0,styled_components_browser_esm.ZP)(govuk_react_select_esm.lq)(Filters_defineProperty({width:"100%"},govuk_react_constants_esm.qk.LARGESCREEN,{width:"auto"})),Filters=function Filters(_ref4){var query=_ref4.query,orderBy=_ref4.orderBy,onSearch=_ref4.onSearch,onOrderChange=_ref4.onOrderChange,_ref4$companyNameId=_ref4.companyNameId,companyNameId=void 0===_ref4$companyNameId?"company-name":_ref4$companyNameId,_ref4$sortById=_ref4.sortById,sortById=void 0===_ref4$sortById?"sort-by":_ref4$sortById;return(0,jsx_runtime.jsxs)(StyledRoot,{children:[(0,jsx_runtime.jsx)(StyledCol,{children:(0,jsx_runtime.jsx)(components_InlineLabel,{text:"Search this list",name:companyNameId,children:(0,jsx_runtime.jsx)(StyledInput,{value:query||"",placeholder:"Company name",id:companyNameId,onChange:function onChange(e){return onSearch(e.target.value)}})})}),(0,jsx_runtime.jsx)(StyledCol,{children:(0,jsx_runtime.jsx)(components_InlineLabel,{text:"Sort by",justifyRight:!0,name:sortById,children:(0,jsx_runtime.jsxs)(StyledSelect,{value:orderBy,id:sortById,onChange:function onChange(e){return onOrderChange(e.target.value)},children:[(0,jsx_runtime.jsx)("option",{value:RECENT,"aria-label":"recent interaction",children:"Recent interaction"}),(0,jsx_runtime.jsx)("option",{value:LEAST_RECENT,"aria-label":"least recent interaction",children:"Least recent interaction"}),(0,jsx_runtime.jsx)("option",{value:ALPHABETICAL,"aria-label":"company name a to z",children:"Company name A-Z"})]})})})]})};Filters.displayName="Filters",Filters.__docgenInfo={description:"",methods:[],displayName:"Filters",props:{companyNameId:{defaultValue:{value:"'company-name'",computed:!1},required:!1},sortById:{defaultValue:{value:"'sort-by'",computed:!1},required:!1}}};const CompanyLists_Filters=(0,es.connect)(state.H,(function(dispatch){return{onSearch:function onSearch(query){return dispatch({type:actions.sb0,query})},onOrderChange:function onOrderChange(orderBy){return dispatch({type:actions.k$I,orderBy})}}}))(Filters)},"./src/client/components/CompanyLists/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID});var ID="companyLists",state2props=function state2props(state){return state[ID]}},"./src/client/components/CompanyLocalHeader/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID,d:()=>TASK_GET_LISTS_COMPANY_IS_IN});var TASK_GET_LISTS_COMPANY_IS_IN="TASK_GET_LISTS_COMPANY_IS_IN",ID="companyListsCompanyIn",state2props=function state2props(state){return state[ID]}},"./src/client/components/ContactInformation/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,govuk_react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_lib_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/lib/urls.js"),_lib_urls__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_lib_urls__WEBPACK_IMPORTED_MODULE_7__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledDetails=(0,styled_components__WEBPACK_IMPORTED_MODULE_9__.ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.PO)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-top: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.TF[1]),ContactInformation=function ContactInformation(_ref){var onOpenContactForm=_ref.onOpenContactForm,companyId=_ref.companyId,redirectUrl=_lib_urls__WEBPACK_IMPORTED_MODULE_7___default().contacts.create(companyId,{origin_url:window.location.pathname,origin_search:btoa(window.location.search)});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["If your contact is not listed"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.rU,{"data-test":"add-a-new-contact-link",onClick:function onClick(e){e.preventDefault(),onOpenContactForm({event:e,redirectUrl})},href:redirectUrl,children:"add a new contact"}),". You will leave this page to enter details, once added you will return here. The information you added will have been saved.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(StyledDetails,{summary:"Information needed to add a new contact","data-test":"contact-information-details",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.nv,{children:"You need:"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.QI,{listStyleType:"bullet",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"full name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"job title"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"email address"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"phone number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"work address if different to the company address"})]})]})]})};ContactInformation.__docgenInfo={description:"",methods:[],displayName:"ContactInformation"};const __WEBPACK_DEFAULT_EXPORT__=ContactInformation},"./src/client/components/ContentWithHeading.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var prop_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__),govuk_react__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js")),styled_components__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_SpacedSectionBreak__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/components/SpacedSectionBreak.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js"),StyledHeading=(0,styled_components__WEBPACK_IMPORTED_MODULE_4__.ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_1__.H3)({flexGrow:1}),StyledHeader=styled_components__WEBPACK_IMPORTED_MODULE_4__.ZP.div({display:"flex",alignItems:"baseline"}),ContentWithHeading=function ContentWithHeading(_ref){var heading=_ref.heading,children=_ref.children,headingActions=_ref.headingActions;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(StyledHeader,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(StyledHeading,{size:24,children:heading}),headingActions]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_SpacedSectionBreak__WEBPACK_IMPORTED_MODULE_2__.Z,{}),children]})};ContentWithHeading.displayName="ContentWithHeading",ContentWithHeading.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node,headingComponent:prop_types__WEBPACK_IMPORTED_MODULE_5___default().func},ContentWithHeading.__docgenInfo={description:"",methods:[],displayName:"ContentWithHeading",props:{heading:{description:"",type:{name:"node"},required:!1},children:{description:"",type:{name:"node"},required:!1},headingComponent:{description:"",type:{name:"func"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=ContentWithHeading},"./src/client/components/DataHubHeader/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_DataHubHeader});__webpack_require__("./node_modules/react/index.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_esm=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),react_router_dom=(__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js")),govuk_react_visually_hidden_esm=__webpack_require__("./node_modules/@govuk-react/visually-hidden/dist/govuk-react-visually-hidden.esm.js"),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),state=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./src/client/components/NotificationAlert/state.js")),actions=__webpack_require__("./src/client/actions.js");const bell_icon_namespaceObject=__webpack_require__.p+"static/media/bell-icon.0c3d8d60.svg";var _templateObject,Task=__webpack_require__("./src/client/components/Task/index.jsx"),NotificationBadge=__webpack_require__("./src/client/components/NotificationBadge/index.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledNotificationAlertNavLink=(0,styled_components_browser_esm.ZP)(react_router_dom.OL)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: flex;\n min-width: 42px;\n outline: none;\n text-decoration: none;\n"]))),StyledShape=(0,styled_components_browser_esm.ZP)(NotificationBadge.bn)({position:"relative",top:-2,left:-7}),StyledImage=(0,styled_components_browser_esm.ZP)("img")({width:22,height:22}),NotificationAlert=function NotificationAlert(_ref){var count=_ref.count,remindersURL=_ref.remindersURL;return(0,jsx_runtime.jsxs)(StyledNotificationAlertNavLink,{as:"a",href:remindersURL,id:"notification-bell-count",children:[(0,jsx_runtime.jsx)(StyledImage,{src:bell_icon_namespaceObject,alt:"An image of a bell with the notification count overlaid"}),(0,jsx_runtime.jsx)(Task.Z.Status,{name:state.H,id:state.ID,renderProgress:function renderProgress(){return null},startOnRender:{onSuccessDispatch:actions.SqW},children:function children(){return count>0?(0,jsx_runtime.jsx)(StyledShape,{size:NotificationBadge.$u.SMALL,digits:count.toString().length,"aria-label":"notification-alert-badge","data-test":"notification-alert-badge",children:(0,jsx_runtime.jsx)(NotificationBadge.XF,{children:count<100?count:"99+"})}):null}})]})};NotificationAlert.displayName="NotificationAlert",NotificationAlert.propTypes={count:prop_types_default().number.isRequired,remindersURL:prop_types_default().string.isRequired},NotificationAlert.__docgenInfo={description:"",methods:[],displayName:"NotificationAlert",props:{count:{description:"",type:{name:"number"},required:!0},remindersURL:{description:"",type:{name:"string"},required:!0}}};const components_NotificationAlert=(0,es.connect)(state.a)(NotificationAlert);var urls=__webpack_require__("./src/lib/urls.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function NavBar_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function NavBar_objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_24__),_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["onChange","name","label","legend","hint","initialValue","type"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var DateField=function DateField(_ref){var _ref$onChange=_ref.onChange,_onChange=void 0===_ref$onChange?function(){}:_ref$onChange,name=_ref.name,label=_ref.label,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,_ref$type=_ref.type,type=void 0===_ref$type?"date":_ref$type,props=_objectWithoutProperties(_ref,_excluded),_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_20__.useState)(initialValue),2),value=_useState2[0],setValue=_useState2[1];return(0,react__WEBPACK_IMPORTED_MODULE_20__.useEffect)((function(){return setValue(initialValue)}),[initialValue]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({name,label,legend,hint},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__.Z,{id:"field-".concat(name,"-1"),"data-test":"field-".concat(name),name,value,max:"9999-12-31","aria-label":label,type,onChange:function onChange(e){setValue(e.target.value),_onChange(e)}},name)}))};DateField.displayName="DateField",DateField.propTypes={onChange:prop_types__WEBPACK_IMPORTED_MODULE_24___default().func,name:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string},DateField.__docgenInfo={description:"A Date Input Field\n\nChanging the initialValue prop overrides the user's input value - this\nmeans that the input value will stay synchronised when changing the route.",methods:[],displayName:"DateField",props:{onChange:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},type:{defaultValue:{value:"'date'",computed:!1},required:!1},name:{description:"",type:{name:"string"},required:!0},label:{description:"",type:{name:"node"},required:!1},legend:{description:"",type:{name:"node"},required:!1},hint:{description:"",type:{name:"string"},required:!1},initialValue:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=DateField},"./src/client/components/DownloadDataHeader/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_25__),styled_components__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/number-utils.js"),_CollectionList_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/CollectionList/CollectionHeaderRow.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["downloadLink","count","maxItems","entityName","entityNamePlural"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledLink=(0,styled_components__WEBPACK_IMPORTED_MODULE_24__.ZP)("a")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: 0;\n ",": {\n margin-left: ","px;\n },\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_20__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_20__.TF[2]),DownloadDataHeader=function DownloadDataHeader(_ref){var downloadLink=_ref.downloadLink,_ref$count=_ref.count,count=void 0===_ref$count?0:_ref$count,_ref$maxItems=_ref.maxItems,maxItems=void 0===_ref$maxItems?5e3:_ref$maxItems,_ref$entityName=_ref.entityName,entityName=void 0===_ref$entityName?"":_ref$entityName,_ref$entityNamePlural=_ref.entityNamePlural,entityNamePlural=void 0===_ref$entityNamePlural?"".concat(entityName,"s"):_ref$entityNamePlural,props=_objectWithoutProperties(_ref,_excluded);if(!count||!downloadLink)return null;if(count>=maxItems)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(_CollectionList_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({},props),{},{children:["Filter to fewer than ",(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_21__.gH)(maxItems)," ",entityNamePlural," to download"]}));var downloadAction=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_19__.zx,{as:StyledLink,href:downloadLink,download:!0,children:"Download"},"download");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(_CollectionList_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({actions:[downloadAction]},props),{},{children:["You can now download"," ",1===count?"this ".concat(entityName):"these ".concat(count," ").concat(entityNamePlural)]}))};DownloadDataHeader.displayName="DownloadDataHeader",DownloadDataHeader.propTypes={downloadLink:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string,count:prop_types__WEBPACK_IMPORTED_MODULE_25___default().number,maxItems:prop_types__WEBPACK_IMPORTED_MODULE_25___default().number,entityName:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string,entityNamePlural:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string},DownloadDataHeader.__docgenInfo={description:"",methods:[],displayName:"DownloadDataHeader",props:{count:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"number"},required:!1},maxItems:{defaultValue:{value:"5000",computed:!1},description:"",type:{name:"number"},required:!1},entityName:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},entityNamePlural:{defaultValue:{value:"`${entityName}s`",computed:!1},description:"",type:{name:"string"},required:!1},downloadLink:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=DownloadDataHeader},"./src/client/components/DropdownMenu/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P:()=>DropdownButton,Z:()=>components_DropdownMenu});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js");var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx");const icon_triangle_namespaceObject=__webpack_require__.p+"static/media/icon-triangle.5685b354.svg";var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var DropdownMenuContainer=styled_components_browser_esm.ZP.div(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n position: relative;\n"]))),DropdownButtonContainer=styled_components_browser_esm.ZP.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n"]))),DropdownMenuGroup=styled_components_browser_esm.ZP.div(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ",";\n background-color: ",";\n ","\n ","\n "," {\n position: absolute;\n right: 0;\n z-index: 1;\n margin-bottom: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,colours.FU,govuk_react_lib_esm.W0.responsive({size:5,property:"margin-bottom"}),govuk_react_lib_esm.W0.responsive({size:-5,property:"margin-top"}),govuk_react_constants_esm.qk.TABLET),Icon=styled_components_browser_esm.ZP.img(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n transform: ",";\n margin-left: ",";\n transition: transform 300ms ease;\n transform-origin: center;\n"])),(function(_ref){return _ref.active?"rotate(0deg)":"rotate(-90deg)"}),govuk_react_constants_esm.N_.SCALE_3),DropdownToggleButton=(0,styled_components_browser_esm.ZP)(SecondaryButton.Z)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-weight: Bold;\n"]))),DropdownButton=(0,styled_components_browser_esm.ZP)(SecondaryButton.Z).attrs((function(){return{tabIndex:0,forwardedAs:govuk_react_link_esm.Z}}))(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n &:last-child {\n margin-bottom: 0;\n }\n"])),govuk_react_lib_esm.W0.responsive({size:3,property:"margin-bottom"})),DropdownMenu=function DropdownMenu(_ref2){var label=_ref2.label,children=_ref2.children,closedLabel=_ref2.closedLabel,_onClick=_ref2.onClick,open=_ref2.open,activeIndex=_ref2.activeIndex,onUpdateIndex=_ref2.onUpdateIndex,closeMenu=_ref2.closeMenu,dataTest=_ref2.dataTest,buttonRef=react.useRef(null),childrenGroupRef=react.useRef(null),containerRef=react.useRef(null);return react.useEffect((function(){!isNaN(activeIndex)&&childrenGroupRef.current&&childrenGroupRef.current.children[activeIndex].focus()}),[activeIndex]),react.useEffect((function(){var clickOutside=function clickOutside(_ref4){var target=_ref4.target;containerRef.current.contains(target)||closeMenu()};document.addEventListener("mousedown",clickOutside),document.addEventListener("keyup",clickOutside)}),[]),(0,jsx_runtime.jsxs)(DropdownMenuContainer,{ref:containerRef,onKeyUp:function onKeyUp(_ref3){switch(_ref3.keyCode){case 38:onUpdateIndex(Math.max(0,(null!=activeIndex?activeIndex:0)-1));break;case 40:onUpdateIndex(Math.min((null!=activeIndex?activeIndex:-1)+1,children.length-1));break;case 36:onUpdateIndex(0);break;case 35:onUpdateIndex(children.length-1)}},onKeyDown:function onKeyDown(event){switch(event.keyCode){case 27:closeMenu(),buttonRef.current&&buttonRef.current.focus();break;case 36:case 35:case 38:case 40:open&&event.preventDefault()}},"data-test":dataTest,children:[(0,jsx_runtime.jsx)(DropdownButtonContainer,{children:(0,jsx_runtime.jsx)(DropdownToggleButton,{ref:buttonRef,buttonShadowColour:"transparent",onClick:function onClick(){return _onClick(!open)},icon:(0,jsx_runtime.jsx)(Icon,{src:icon_triangle_namespaceObject,active:open,alt:""}),"aria-haspopup":!0,"aria-expanded":open,"aria-controls":"dropDownOptionsMenu",children:(open?closedLabel:label)||label})}),open&&(0,jsx_runtime.jsx)(DropdownMenuGroup,{id:"dropDownOptionsMenu",ref:childrenGroupRef,children})]})};DropdownMenu.displayName="DropdownMenu",DropdownMenu.propTypes={onUpdateIndex:prop_types_default().func.isRequired,closeMenu:prop_types_default().func.isRequired,activeIndex:prop_types_default().number,label:prop_types_default().string.isRequired,closedLabel:prop_types_default().string,children:prop_types_default().node,onClick:prop_types_default().func.isRequired,open:prop_types_default().bool},DropdownMenu.__docgenInfo={description:'DropdownMenu displays contextual overlays for menus.\n\nIn Desktop view the menu will "float" over the content in mobile view the menu is in flow and will push the content down.\n\nDropdownButton extends styles of Button for usage please visit the button docs [here](https://govuk-react.github.io/govuk-react/?path=/story/form-buttons--component-default).\n\n### Usage\n\n```jsx\n\n \n Add to or remove from list\n \n \n Add to pipeline\n \n\n```',methods:[],displayName:"DropdownMenu",props:{onUpdateIndex:{description:"",type:{name:"func"},required:!0},closeMenu:{description:"",type:{name:"func"},required:!0},activeIndex:{description:"",type:{name:"number"},required:!1},label:{description:"Text for the button",type:{name:"string"},required:!0},closedLabel:{description:"Close text for button",type:{name:"string"},required:!1},children:{description:"Buttons for dropdown group",type:{name:"node"},required:!1},onClick:{description:"Signature: function(nextOpenState: boolean) => void",type:{name:"func"},required:!0},open:{description:"Set the open and close state of the dropdown",type:{name:"bool"},required:!1}}};const components_DropdownMenu=DropdownMenu},"./src/client/components/Effect.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=function Effect(_ref){var dependencyList=_ref.dependencyList,effect=_ref.effect;return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){return effect()}),null==dependencyList?void 0:dependencyList.map(JSON.stringify)),null}},"./src/client/components/EntityList/EntityListItem.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,prop_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__),lodash__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/lodash/lodash.js"),styled_components__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_inset_text__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/inset-text/dist/govuk-react-inset-text.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/client/utils/colours.js"),_components_Metadata___WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/client/components/Metadata/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledEntity=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n margin-bottom: ",";\n padding: ",";\n border: 1px solid ",";\n ",";\n\n &[role='button'] {\n cursor: pointer;\n\n h3 {\n color: ",";\n }\n\n &:hover {\n border: 1px solid ",";\n background-color: ",";\n\n & > h3 {\n color: ",";\n }\n }\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.FU,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.jw,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.su,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.oh,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.zT,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.oh),StyledHeading=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(_govuk_react_heading__WEBPACK_IMPORTED_MODULE_5__.H3)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n font-size: ",";\n margin: 0 0 ",";\n "," {\n font-size: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_19),StyledInsetText=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(_govuk_react_inset_text__WEBPACK_IMPORTED_MODULE_6__.Z)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n & {\n margin-top: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2),EntityListItem=function EntityListItem(_ref){var id=_ref.id,onEntityClick=_ref.onEntityClick,data=_ref.data,text=_ref.text,heading=_ref.heading,meta=_ref.meta,isClickable=!!onEntityClick;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(StyledEntity,{tabIndex:isClickable&&0,role:isClickable&&"button",onClick:function onClick(){return isClickable&&onEntityClick(data)},onKeyDown:function onKeyDown(e){return isClickable&&13===e.keyCode&&onEntityClick(data)},children:[heading&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledHeading,{children:heading}),!(0,lodash__WEBPACK_IMPORTED_MODULE_3__.isEmpty)(meta)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Metadata___WEBPACK_IMPORTED_MODULE_8__.Z,{rows:meta}),text&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledInsetText,{children:text})]},"entity_".concat(id))};EntityListItem.displayName="EntityListItem",EntityListItem.propTypes={id:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired,onEntityClick:prop_types__WEBPACK_IMPORTED_MODULE_11___default().func,data:prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({}),text:prop_types__WEBPACK_IMPORTED_MODULE_11___default().node,heading:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,meta:prop_types__WEBPACK_IMPORTED_MODULE_11___default().array},EntityListItem.defaultProps={text:null,onEntityClick:null,data:{},heading:null,meta:[]},EntityListItem.__docgenInfo={description:"",methods:[],displayName:"EntityListItem",props:{text:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},onEntityClick:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},data:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{}},required:!1},heading:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},meta:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},id:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=EntityListItem},"./src/client/components/EntityList/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,prop_types__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_23__),styled_components__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_EntityListItem__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/components/EntityList/EntityListItem.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var lodash__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/lodash/lodash.js"),axios__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/axios/index.js"),axios__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_20__),_utils_addresses__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/addresses.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function getTradingNames(dnb_company){return(0,lodash__WEBPACK_IMPORTED_MODULE_19__.isEmpty)(dnb_company.trading_names)?null:{label:"Trading name(s)",value:dnb_company.trading_names.join(", ")}}function getAddress(dnb_company,features){return{label:"Location at",value:(0,_utils_addresses__WEBPACK_IMPORTED_MODULE_21__.getCompanyAddress)(dnb_company,features)}}const __WEBPACK_DEFAULT_EXPORT__=function useDnbSearch(apiEndpoint,features){function transformCompanyRecord(record){var dnb_company=record.dnb_company;return{id:dnb_company.duns_number,heading:dnb_company.primary_name,meta:(0,lodash__WEBPACK_IMPORTED_MODULE_19__.compact)([getTradingNames(dnb_company),getAddress(dnb_company,features)]),data:record}}function _findCompany(){return _findCompany=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(filters){var _yield$axios$post,data;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,axios__WEBPACK_IMPORTED_MODULE_20___default().post(apiEndpoint,filters);case 2:return _yield$axios$post=_context.sent,data=_yield$axios$post.data,_context.abrupt("return",data.results.map(transformCompanyRecord));case 5:case"end":return _context.stop()}}),_callee)}))),_findCompany.apply(this,arguments)}return{findCompany:function findCompany(_x){return _findCompany.apply(this,arguments)},transformCompanyRecord}}},"./src/client/components/ErrorSummary/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var _styled,react__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_paragraph__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/paragraph/dist/govuk-react-paragraph.esm.js"),_govuk_react_unordered_list__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/unordered-list/dist/govuk-react-unordered-list.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_govuk_react_list_item__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/list-item/dist/govuk-react-list-item.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/colours.js"),_styles__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/styles.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["heading","description","errors"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_unordered_list__WEBPACK_IMPORTED_MODULE_20__.Z,{mb:0,listStyleType:"none",children:errors.map((function(_ref2){var targetName=_ref2.targetName,text=_ref2.text;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_list_item__WEBPACK_IMPORTED_MODULE_22__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledErrorText,{href:"#field-".concat(targetName),children:text})},targetName)}))})]}))}));ErrorSummary.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,description:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,errors:prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().shape({targetName:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,text:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired}).isRequired)},ErrorSummary.__docgenInfo={description:"When a user makes an error, you must show both an error summary and an error message next to each answer that contains an error. More information can be found on the [GDS Design system](https://design-system.service.gov.uk/components/error-summary/)\n\nUse this component at the top of a page to summarise any errors a user has made.",methods:[],displayName:"ErrorSummary",props:{heading:{defaultValue:{value:"'There is a problem'",computed:!1},description:"Text for the heading",type:{name:"string"},required:!1},description:{defaultValue:{value:"null",computed:!1},description:"Text for description",type:{name:"string"},required:!1},errors:{description:"The list of error descriptions and their target id's",type:{name:"arrayOf",value:{name:"shape",value:{targetName:{name:"string",required:!0},text:{name:"string",required:!0}}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=ErrorSummary},"./src/client/components/FilterLabel.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.string.bold.js");var styled_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/utils/colours.js");const __WEBPACK_DEFAULT_EXPORT__=styled_components__WEBPACK_IMPORTED_MODULE_3__.ZP.label({"-webkit-font-smoothing":"antialiased",fontWeight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.Xw.bold,fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.Kt.SIZE_16,display:"block",color:_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__.E5})},"./src/client/components/Footer/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Footer});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js");const govuk_crest_2x_namespaceObject=__webpack_require__.p+"static/media/govuk-crest-2x.05968778.png";var _templateObject,_templateObject2,_templateObject3,_templateObject4,urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),Main=__webpack_require__("./src/client/components/Main/index.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledFooter=(0,styled_components_browser_esm.ZP)("footer")({clear:"both",borderTop:"1px solid ".concat(colours.gr),background:"".concat(colours.Ll),color:"".concat(colours.ZR)},govuk_react_lib_esm.cp.font({size:16}),govuk_react_lib_esm.W0.withWhiteSpace({padding:[{size:7,direction:"top"},{size:5,direction:"bottom"}]})),StyleList=styled_components_browser_esm.ZP.ul(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n flex-direction: row;\n li + li {\n margin-left: ",";\n }\n margin-bottom: ",";\n\n @media (max-width: ",") {\n margin-bottom: -",";\n margin-right: ",";\n flex-direction: column;\n flex-wrap: wrap;\n\n li + li {\n margin-left: 0;\n }\n\n li {\n margin-left: 0;\n margin-bottom: ",";\n }\n\n li:last-child {\n margin-bottom: ",";\n }\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,"340px",govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_5,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_5),FooterLink=styled_components_browser_esm.ZP.a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n &:active,\n &:focus,\n &:visited,\n &:hover {\n color: ",";\n outline: 3px solid transparent;\n }\n &:focus {\n background-color: ",";\n box-shadow:\n 0 -2px ",",\n 0 4px ",";\n text-decoration: none;\n }\n"])),colours.E5,colours.E5,colours.tL,colours.tL,colours.E5),CopyrightLink=(0,styled_components_browser_esm.ZP)(FooterLink)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: inline-block;\n min-width: 125px;\n padding-top: 112px;\n background-image: url(",");\n background-repeat: no-repeat;\n background-position: 50% 0%;\n background-size: 125px 102px;\n text-align: center;\n text-decoration: none;\n white-space: nowrap;\n margin-bottom: ",";\n @media (max-width: ",") {\n margin-bottom: ",";\n }\n"])),govuk_crest_2x_namespaceObject,govuk_react_constants_esm.N_.SCALE_3,"340px",govuk_react_constants_esm.N_.SCALE_5),Container=(0,styled_components_browser_esm.ZP)(Main.W)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: flex-end;\n flex-wrap: wrap;\n"])));function Footer(){return(0,jsx_runtime.jsx)(StyledFooter,{children:(0,jsx_runtime.jsxs)(Container,{children:[(0,jsx_runtime.jsxs)(StyleList,{children:[(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().support(),target:"_blank",rel:"noopener noreferrer","aria-label":"Request Support (opens in new tab)",children:"Request Support"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.dhHomepage(),target:"_blank",rel:"noopener noreferrer","aria-label":"Help Centre (opens in new tab)",children:"Help Centre"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.privacyNotice(),target:"_blank",rel:"noopener noreferrer","aria-label":"Privacy Notice (opens in new tab)",children:"Privacy Notice"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.cookies(),target:"_blank",rel:"noopener noreferrer","aria-label":"Cookies (opens in new tab)",children:"Cookies"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.accessibilityStatement(),target:"_blank",rel:"noopener noreferrer","aria-label":"Accessibility Statement (opens in new tab)",children:"Accessibility Statement"})})]}),(0,jsx_runtime.jsx)(CopyrightLink,{href:urls_default().external.copyright,target:"_blank",rel:"noopener noreferrer","aria-label":"Crown copyright (opens in new tab)",children:"© Crown copyright"})]})})}Footer.displayName="Footer",Footer.__docgenInfo={description:"The Footer displayed in all pages across the Data Hub site.",methods:[],displayName:"Footer"}},"./src/client/components/Form/elements/FieldAddAnother/FieldAddAnother.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FieldAddAnother_FieldAddAnother});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),number_utils=__webpack_require__("./src/client/utils/number-utils.js"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),FieldWrapper=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),actions=__webpack_require__("./src/client/actions.js");__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&(0,jsx_runtime.jsx)(StyledLink,{children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:"#","aria-label":"Remove ".concat((0,number_utils.Jw)(index)," ").concat(itemName),onClick:function onClick(event){event.preventDefault(),remove(item.fieldGroupId)},children:"Remove"})})]},item.fieldGroupId)})),childCount0&&void 0!==arguments[0]?arguments[0]:{fieldGroupIds:[]},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,fieldGroupId=_ref.fieldGroupId,initialChildGroupCount=_ref.initialChildGroupCount;switch(type){case actions.cdq:return _objectSpread(_objectSpread({},state),{},{childCount:initialChildGroupCount,fieldGroupIds:_toConsumableArray(Array(initialChildGroupCount)).map((function(value,index){return{fieldGroupId:index}}))});case actions.s_5:var maximumFieldIdValue=state.fieldGroupIds.map((function(item){return item.fieldGroupId})).reduce((function(previous,current){return current>previous?current:previous}),0);return _objectSpread(_objectSpread({},state),{},{childCount:state.childCount+1,fieldGroupIds:[].concat(_toConsumableArray(state.fieldGroupIds),[{fieldGroupId:maximumFieldIdValue+1}])});case actions.x7:return _objectSpread(_objectSpread({},state),{},{childCount:state.childCount-1,fieldGroupIds:state.fieldGroupIds.filter((function(item){return item.fieldGroupId!==fieldGroupId}))});default:return state}}})},"./src/client/components/Form/elements/FieldAddAnother/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var _FieldAddAnother__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/Form/elements/FieldAddAnother/FieldAddAnother.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["id","name"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FieldAddAnother=function FieldAddAnother(_ref){var id=_ref.id,name=_ref.name,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_FieldAddAnother__WEBPACK_IMPORTED_MODULE_17__.Z,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_33__),_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@govuk-react/multi-choice/dist/govuk-react-multi-choice.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_Checkbox__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./src/client/components/Checkbox/index.jsx"),_hooks_useField__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./src/client/components/Form/hooks/useField.js"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_hooks__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["name","validate","required","label","legend","bigLegend","hint","options","initialValue","exclusive"],_excluded2=["value","label","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledOr=(0,styled_components__WEBPACK_IMPORTED_MODULE_32__.ZP)("div")({paddingLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2,paddingRight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2,marginBottom:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2}),FieldCheckboxes=function FieldCheckboxes(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,bigLegend=_ref.bigLegend,hint=_ref.hint,_ref$options=_ref.options,options=void 0===_ref$options?[]:_ref$options,_ref$initialValue=_ref.initialValue,initialValue=void 0===_ref$initialValue?[]:_ref$initialValue,_ref$exclusive=_ref.exclusive,exclusive=void 0!==_ref$exclusive&&_ref$exclusive,props=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks_useField__WEBPACK_IMPORTED_MODULE_28__.Z)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onBlur=_useField.onBlur,setFieldValue=(0,_hooks__WEBPACK_IMPORTED_MODULE_30__.Gc)().setFieldValue,onChange=function onChange(event){var eventTargetName=isNaN(event.target.name)?event.target.name:parseInt(event.target.name,10);event.target.checked?setFieldValue(name,[].concat(_toConsumableArray(value),[eventTargetName])):setFieldValue(name,value.filter((function(v){return v!==eventTargetName})))},onChangeExclusive=function onChangeExclusive(event){if(event.target.checked){var lastOption=options.slice(options.length-1)[0];lastOption.value===event.target.name?setFieldValue(name,[event.target.name]):setFieldValue(name,[].concat(_toConsumableArray(value.filter((function(v){return v!==lastOption.value}))),[event.target.name]))}else setFieldValue(name,value.filter((function(v){return v!==event.target.name})))};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__.Z,_objectSpread(_objectSpread({},_objectSpread(_objectSpread({},props),{},{name,label,legend,bigLegend,hint,error})),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_25__.Z,{meta:{error,touched},children:options.map((function(_ref2,index){var optionValue=_ref2.value,optionLabel=_ref2.label,children=_ref2.children,optionProps=_objectWithoutProperties(_ref2,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.Fragment,{children:[exclusive&&index===options.length-1&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(StyledOr,{"data-test":"exclusive-or",children:"or"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_27__.Z,_objectSpread(_objectSpread({name:optionValue,checked:value.includes(optionValue),onChange:exclusive?onChangeExclusive:onChange,onBlur,"aria-label":optionLabel},optionProps),{},{children:optionLabel}),optionValue),value.includes(optionValue)&&children?children:null]})}))})}))};FieldCheckboxes.displayName="FieldCheckboxes",FieldCheckboxes.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_33___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_33___default().func,prop_types__WEBPACK_IMPORTED_MODULE_33___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_33___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node,exclusive:prop_types__WEBPACK_IMPORTED_MODULE_33___default().bool,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_33___default().array,options:prop_types__WEBPACK_IMPORTED_MODULE_33___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_33___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string.isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node}))},FieldCheckboxes.__docgenInfo={description:"Checkboxes for use in forms and filters.",methods:[],displayName:"FieldCheckboxes",props:{options:{defaultValue:{value:"[]",computed:!1},description:"Defines the checkbox labels and values",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"string",required:!0},children:{name:"node",required:!1}}}},required:!1},initialValue:{defaultValue:{value:"[]",computed:!1},description:"Sets initial value of the input",type:{name:"array"},required:!1},exclusive:{defaultValue:{value:"false",computed:!1},description:"Splits the last checkbox from the others where the choice is exclusive between them",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0},validate:{description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{description:"Text 'required' sets whether the input is required or not",type:{name:"string"},required:!1},label:{description:"Text for the label element",type:{name:"node"},required:!1},legend:{description:"Node for legend element",type:{name:"node"},required:!1},hint:{description:"Node for hint element",type:{name:"node"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=FieldCheckboxes},"./src/client/components/Form/elements/FieldCurrency/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_34__),styled_components__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_input__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./src/client/utils/colours.js"),_hooks__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_client_components_Form_validators__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Form/validators.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./src/client/utils/number-utils.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_excluded=["name","validate","required","label","text","legend","hint","initialValue","reduced","boldLabel","currencySymbol"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledInputWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2,";\n ")})),StyledText=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("span")({paddingLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2}),StyledCurrencyPrefix=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n border: "," solid ",";\n border-right: 0px;\n display: inline-block;\n padding: ",";\n min-width: 47px;\n box-sizing: border-box;\n text-align: center;\n flex: 0 0 auto;\n cursor: default;\n font-size: ",";\n background-color: ",";\n line-height: 1.8;\n\n @media (max-width: ",") {\n line-height: 2.1;\n font-size: ",";\n }\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.gY,_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.E5,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.YF,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Kt.SIZE_19,_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.J7,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.j$.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Kt.SIZE_16,(function(props){return props.error&&"\n border: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.h,";\n border-right: 0px;\n line-height: 1.6;\n ")})),StyledCurrencyWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("div")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n height: 47px;\n > * {\n height: 100%;\n }\n"]))),FieldCurrency=function FieldCurrency(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,text=_ref.text,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,reduced=_ref.reduced,boldLabel=_ref.boldLabel,_ref$currencySymbol=_ref.currencySymbol,currencySymbol=void 0===_ref$currencySymbol?"£":_ref$currencySymbol,rest=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_28__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur,_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_22__.useState)(),2),displayValue=_useState2[0],setDisplayValue=_useState2[1],_useState4=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_22__.useState)(),2),rawValue=_useState4[0],setRawValue=_useState4[1],_useState6=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_22__.useState)(!1),2),editing=_useState6[0],setEditing=_useState6[1];(0,react__WEBPACK_IMPORTED_MODULE_22__.useEffect)((function(){!editing&&value&&(setRawValue(value),setDisplayValue((0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.gH)(value)))}),[value]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__.Z,{name,label,legend,hint,error,reduced,boldLabel,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsxs)(StyledInputWrapper,{error,children:[touched&&error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_25__.Z,{children:error}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsxs)(StyledCurrencyWrapper,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledCurrencyPrefix,{error:touched&&Boolean(error),"aria-hidden":"true",children:currencySymbol}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_24__.Z,_objectSpread({error:touched&&Boolean(error),id:name,type:"text",name,value:displayValue,"data-raw-value":rawValue,onChange:function onChangeWrapper(e){isNaN((0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.AO)(e.target.value))?setRawValue(e.target.value):setRawValue((0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.AO)(e.target.value)),setDisplayValue(e.target.value),onChange(e)},onBlur:function onBlurWrapper(e){setDisplayValue(isNaN(rawValue)?rawValue:(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.gH)(rawValue)),setEditing(!1),onBlur(e)},onFocus:function onFocus(){setDisplayValue(rawValue),setEditing(!0)},"data-test":(0,lodash__WEBPACK_IMPORTED_MODULE_23__.kebabCase)("".concat(name,"-'input'")),inputMode:"numeric"},rest),name)]}),text&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledText,{children:text})]})})};FieldCurrency.displayName="FieldCurrency",FieldCurrency.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_34___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_34___default().func,prop_types__WEBPACK_IMPORTED_MODULE_34___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_34___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_34___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_34___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_34___default().node,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_34___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,prop_types__WEBPACK_IMPORTED_MODULE_34___default().number]),reduced:prop_types__WEBPACK_IMPORTED_MODULE_34___default().bool,boldLabel:prop_types__WEBPACK_IMPORTED_MODULE_34___default().bool,currencySymbol:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string},FieldCurrency.defaultProps={validate:function validate(value){return(0,_client_components_Form_validators__WEBPACK_IMPORTED_MODULE_30__.R)(value,"Value must be a number")},required:null,label:null,legend:null,hint:null,initialValue:"",reduced:!1,boldLabel:!0},FieldCurrency.__docgenInfo={description:"A basic currency field for numbers.",methods:[],displayName:"FieldCurrency",props:{currencySymbol:{defaultValue:{value:"'£'",computed:!1},description:"Sets the value for the currency prefix",type:{name:"string"},required:!1},validate:{defaultValue:{value:"(value) => number(value, 'Value must be a number')",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets whether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"Sets initial value of the input",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1},reduced:{defaultValue:{value:"false",computed:!1},description:"Toggles whether the element is a filter or not",type:{name:"bool"},required:!1},boldLabel:{defaultValue:{value:"true",computed:!1},description:"Boolean for rendering the label in bold or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldCurrency},"./src/client/components/Form/elements/FieldDate/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_35__),lodash__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/lodash/lodash.js"),styled_components__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_label__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@govuk-react/label-text/dist/govuk-react-label-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/utils/colours.js"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_hooks_useField__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./src/client/components/Form/hooks/useField.js"),_hooks__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_excluded=["name","label","legend","hint","validate","initialValue","labels","required","invalid","format","reduced"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var _require=__webpack_require__("./src/client/utils/date.js"),isNormalisedDateValid=_require.isNormalisedDateValid,isShortDateValid=_require.isShortDateValid,StyledInputWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_34__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.N_.SCALE_2,";\n ")})),StyledLabel=(0,styled_components__WEBPACK_IMPORTED_MODULE_34__.ZP)(_govuk_react_label__WEBPACK_IMPORTED_MODULE_25__.Z)({marginRight:"20px",marginBottom:0},(function(_ref){return{width:_ref.year?"70px":"50px"}})),StyledList=styled_components__WEBPACK_IMPORTED_MODULE_34__.ZP.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n "," {\n height: 47px;\n }\n"])),_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z),getValidator=function getValidator(required,invalid,format){return function(_ref2){var day=_ref2.day,month=_ref2.month,year=_ref2.year,isLong="LONG"===format,isValid=isLong?isNormalisedDateValid(year,month,day):isShortDateValid(year,month),isDateEmpty=isLong?!day&&!month&&!year:!month&&!year;return isDateEmpty&&!required?null:required&&isDateEmpty?required:isValid||isDateEmpty?4!=year.toString().length?"Enter a year as 4 digits":void 0:invalid||"Enter a valid date"}},getDefaultInitialValue=function getDefaultInitialValue(format){return"LONG"===format?{day:"",month:"",year:""}:{month:"",year:""}},FieldDate=function FieldDate(_ref3){var name=_ref3.name,label=_ref3.label,legend=_ref3.legend,hint=_ref3.hint,validate=_ref3.validate,initialValue=_ref3.initialValue,labels=_ref3.labels,required=_ref3.required,invalid=_ref3.invalid,format=_ref3.format,reduced=_ref3.reduced,props=_objectWithoutProperties(_ref3,_excluded),_useField=(0,_hooks_useField__WEBPACK_IMPORTED_MODULE_31__.Z)({name,initialValue:initialValue||getDefaultInitialValue(format),validate:[getValidator(required,invalid,format)].concat(_toConsumableArray((0,lodash__WEBPACK_IMPORTED_MODULE_23__.castArray)(validate)))}),value=_useField.value,error=_useField.error,touched=_useField.touched,onBlur=_useField.onBlur,setFieldValue=(0,_hooks__WEBPACK_IMPORTED_MODULE_32__.Gc)().setFieldValue,dataTest=props["data-test"]?props["data-test"]:(0,lodash__WEBPACK_IMPORTED_MODULE_23__.snakeCase)(name),_onChange=function onChange(valueKey,e){var date=e.target.value.split("-");setFieldValue(name,_objectSpread(_objectSpread({},value),{},reduced?{day:date[2],month:date[1],year:date[0]}:_defineProperty({},valueKey,e.target.value)))};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_30__.Z,{name,label,legend,hint,error,reduced,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledInputWrapper,{error,children:[error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_24__.Z,{"data-test":"field-".concat(name,"-error"),children:error}),reduced?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:name,name,error:touched&&error,type:"date",value:"".concat(value.year,"-").concat(value.month,"-").concat(value.day),onChange:function onChange(e){return _onChange(name,e)},onBlur}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledList,{children:["LONG"===format&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledLabel,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__.Z,{children:labels.day}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:"".concat(name,".day"),name:"".concat(name,".day"),"data-test":"".concat(dataTest,"-day"),error:touched&&error,type:"text",value:value.day,onChange:function onChange(e){return _onChange("day",e)},onBlur})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledLabel,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__.Z,{children:labels.month}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:"".concat(name,".month"),name:"".concat(name,".month"),"data-test":"".concat(dataTest,"-month"),error:touched&&error,type:"text",value:value.month,onChange:function onChange(e){return _onChange("month",e)},onBlur})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledLabel,{year:!0,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__.Z,{children:labels.year}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:"".concat(name,".year"),name:"".concat(name,".year"),"data-test":"".concat(dataTest,"-year"),error:touched&&error,type:"text",value:value.year,onChange:function onChange(e){return _onChange("year",e)},onBlur})]})]})]})})};FieldDate.displayName="FieldDate",FieldDate.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_35___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_35___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,required:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,invalid:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,format:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,validate:prop_types__WEBPACK_IMPORTED_MODULE_35___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_35___default().func,prop_types__WEBPACK_IMPORTED_MODULE_35___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_35___default().func)]),initialValue:prop_types__WEBPACK_IMPORTED_MODULE_35___default().shape({day:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,month:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,year:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string}),labels:prop_types__WEBPACK_IMPORTED_MODULE_35___default().shape({day:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,month:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,year:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string}),reduced:prop_types__WEBPACK_IMPORTED_MODULE_35___default().bool},FieldDate.defaultProps={label:null,legend:null,hint:null,required:null,invalid:null,format:"LONG",validate:null,initialValue:null,labels:{day:"Day",month:"Month",year:"Year"},reduced:!1},FieldDate.__docgenInfo={description:"Date field for use in forms and filters.",methods:[],displayName:"FieldDate",props:{label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"string"},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},invalid:{defaultValue:{value:"null",computed:!1},description:"Text 'invalid' sets a custom error message for invalid dates",type:{name:"string"},required:!1},format:{defaultValue:{value:"'LONG'",computed:!1},description:"",type:{name:"string"},required:!1},validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},initialValue:{defaultValue:{value:"null",computed:!1},description:"Sets initial value of the input",type:{name:"shape",value:{day:{name:"string",required:!1},month:{name:"string",required:!1},year:{name:"string",required:!1}}},required:!1},labels:{defaultValue:{value:"{\n day: 'Day',\n month: 'Month',\n year: 'Year',\n}",computed:!1},description:"",type:{name:"shape",value:{day:{name:"string",required:!1},month:{name:"string",required:!1},year:{name:"string",required:!1}}},required:!1},reduced:{defaultValue:{value:"false",computed:!1},description:"Toggles wether the element is a filter or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldDate},"./src/client/components/Form/elements/FieldHelp/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_details__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/details/dist/govuk-react-details.esm.js"),_client_components___WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/components/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ItemWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n padding: 0;\n"]))),StyledDetails=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)(_govuk_react_details__WEBPACK_IMPORTED_MODULE_4__.Z)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin: -"," 0 "," 0;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.N_.SCALE_4,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.N_.SCALE_5),FieldHelp=function FieldHelp(_ref){var helpSummary=_ref.helpSummary,helpText=_ref.helpText,footerUrl=_ref.footerUrl,footerUrlDescription=_ref.footerUrlDescription,open=_ref.open;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ItemWrapper,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(StyledDetails,{summary:helpSummary,open,children:[helpText,footerUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_client_components___WEBPACK_IMPORTED_MODULE_5__.ke,{href:footerUrl,children:footerUrlDescription})]})]})})};FieldHelp.displayName="FieldHelp",FieldHelp.propTypes={helpSummary:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,helpText:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node.isRequired,footerUrl:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,footerDescription:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,open:prop_types__WEBPACK_IMPORTED_MODULE_8___default().bool},FieldHelp.defaultProps={open:!1},FieldHelp.__docgenInfo={description:"",methods:[],displayName:"FieldHelp",props:{open:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},helpSummary:{description:"",type:{name:"string"},required:!0},helpText:{description:"",type:{name:"node"},required:!0},footerUrl:{description:"",type:{name:"string"},required:!1},footerDescription:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=FieldHelp},"./src/client/components/Form/elements/FieldInput/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/utils/colours.js"),_hooks__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["name","type","validate","required","label","text","legend","hint","initialValue","reduced"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledInputWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n "," {\n height: 47px;\n }\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_2,";\n ")}),_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__.Z),StyledText=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("span")({paddingLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_2}),FieldInput=function FieldInput(_ref){var name=_ref.name,type=_ref.type,validate=_ref.validate,required=_ref.required,label=_ref.label,text=_ref.text,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,reduced=_ref.reduced,rest=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_25__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__.Z,{name,label,legend,hint,error,reduced,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(StyledInputWrapper,{error,children:[touched&&error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_22__.Z,{children:error}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__.Z,_objectSpread({error:touched&&Boolean(error),id:name,type,name,value,onChange,onBlur,"data-test":(0,lodash__WEBPACK_IMPORTED_MODULE_20__.kebabCase)("".concat(name,"-'input'"))},rest),name),text&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledText,{children:text})]})})};FieldInput.displayName="FieldInput",FieldInput.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,type:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_29___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_29___default().func,prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,reduced:prop_types__WEBPACK_IMPORTED_MODULE_29___default().bool},FieldInput.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:"",reduced:!1},FieldInput.__docgenInfo={description:"A basic input field for numbers and text.",methods:[],displayName:"FieldInput",props:{validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"Sets initial value of the input",type:{name:"string"},required:!1},reduced:{defaultValue:{value:"false",computed:!1},description:"Toggles wether the element is a filter or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0},type:{description:"Text for type attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldInput},"./src/client/components/Form/elements/FieldRadios/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.string.link.js");var react__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),_govuk_react_radio__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/radio/dist/govuk-react-radio.esm.js"),_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/multi-choice/dist/govuk-react-multi-choice.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/lodash/lodash.js"),_hooks__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_excluded=["name","validate","required","label","legend","bigLegend","hint","inline","initialValue","options"],_excluded2=["label","value","children","link"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledChildField=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n margin-left: 55px;\n clear: both;\n"]))),StyledRadio=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_govuk_react_radio__WEBPACK_IMPORTED_MODULE_22__.Z)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n ","\n"])),(function(props){return props.inline&&"\n float: left;\n clear: none;\n "})),FieldRadios=function FieldRadios(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,bigLegend=_ref.bigLegend,hint=_ref.hint,inline=_ref.inline,initialValue=_ref.initialValue,options=_ref.options,props=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_25__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur,getDataTest=function getDataTest(prefix,name,optionLabel){var dataTest=(0,lodash__WEBPACK_IMPORTED_MODULE_24__.kebabCase)("".concat(name,"-").concat(optionLabel));return prefix?"".concat(prefix,"-").concat(dataTest):dataTest};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__.Z,_objectSpread(_objectSpread({},_objectSpread(_objectSpread({},props),{},{name,label,legend,hint,error,bigLegend})),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_23__.Z,{meta:{error,touched},children:options.map((function(_ref2){var optionLabel=_ref2.label,optionValue=_ref2.value,optionChildren=_ref2.children,optionLink=_ref2.link,optionProps=_objectWithoutProperties(_ref2,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(react__WEBPACK_IMPORTED_MODULE_21__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(StyledRadio,_objectSpread(_objectSpread({inline,value:optionValue,checked:value===optionValue,onChange,onBlur,name,"data-test":getDataTest(props.dataTestPrefix,name,optionLabel),"aria-label":optionLabel},optionProps),{},{children:[optionLabel,optionLink&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.Fragment,{children:optionLink})]})),value===optionValue&&optionChildren&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledChildField,{children:optionChildren})]},optionValue)}))})}))};FieldRadios.displayName="FieldRadios",FieldRadios.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_29___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_29___default().func,prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,inline:prop_types__WEBPACK_IMPORTED_MODULE_29___default().bool,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,options:prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,hint:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node}))},FieldRadios.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,inline:!1,initialValue:"",options:[]},FieldRadios.__docgenInfo={description:"",methods:[],displayName:"FieldRadios",props:{validate:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},inline:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},options:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"string",required:!0},hint:{name:"node",required:!1},children:{name:"node",required:!1}}}},required:!1},name:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldRadios},"./src/client/components/Form/elements/FieldSelect/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.find.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),_govuk_react_select__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_hooks__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_utils_colours__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["name","label","legend","hint","validate","required","initialValue","options","emptyOption","fullWidth","boldLabel"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledSelect=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_select__WEBPACK_IMPORTED_MODULE_21__.ZP)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n position: relative;\n &::after {\n border-bottom: 2px solid ",";\n border-right: 2px solid ",";\n content: '';\n display: block;\n height: 12px;\n pointer-events: none;\n position: absolute;\n right: 16px;\n ","\n ","\n\n transform: translate(0, -65%) rotate(45deg);\n width: 12px;\n @media (max-width: ",") {\n right: 4%;\n }\n }\n "," {\n height: 47px;\n padding: 0px 32px 0px 12px;\n ","\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n }\n"])),_utils_colours__WEBPACK_IMPORTED_MODULE_25__.E5,_utils_colours__WEBPACK_IMPORTED_MODULE_25__.E5,(function(_ref){return _ref.fullWidth?"right: 2%;":"right: 52%;"}),(function(_ref2){return _ref2.meta.error?"top: 72%;":"top: 50%;"}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_22__.j$.TABLET,_govuk_react_select__WEBPACK_IMPORTED_MODULE_21__.lq,(function(_ref3){return _ref3.fullWidth&&"width: 100%;"})),FieldSelect=function FieldSelect(_ref4){var _options$find,name=_ref4.name,label=_ref4.label,legend=_ref4.legend,hint=_ref4.hint,validate=_ref4.validate,required=_ref4.required,initialValue=_ref4.initialValue,options=_ref4.options,emptyOption=_ref4.emptyOption,fullWidth=_ref4.fullWidth,boldLabel=_ref4.boldLabel,rest=_objectWithoutProperties(_ref4,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_23__.U$)({name,validate,required,initialValue}),error=_useField.error,touched=_useField.touched,value=_useField.value,onChange=_useField.onChange,onBlur=_useField.onBlur;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__.Z,{name,label,legend,hint,error,boldLabel,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(StyledSelect,{fullWidth,name,onChange,onBlur,meta:{error,touched},input:_objectSpread({id:name,defaultValue:value},rest),children:[emptyOption&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)("option",{value:"",children:emptyOption},""),options.map((function(_ref5){var optionLabel=_ref5.label,optionValue=_ref5.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)("option",{value:optionValue,children:optionLabel},optionValue)}))]},Array.isArray(options)&&options.length>0?value:void 0),null===(_options$find=options.find((function(o){return o.value===value})))||void 0===_options$find?void 0:_options$find.children]})};FieldSelect.displayName="FieldSelect",FieldSelect.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,validate:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().func,prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,options:prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired})),emptyOption:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,fullWidth:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,boldLabel:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool},FieldSelect.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:"",options:[],emptyOption:"Please select",fullWidth:!1,boldLabel:!0},FieldSelect.__docgenInfo={description:"A Select dropdown field for use in forms.",methods:[],displayName:"FieldSelect",props:{validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"Sets initial value of the input",type:{name:"string"},required:!1},options:{defaultValue:{value:"[]",computed:!1},description:"Items for the list",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"string",required:!0}}}},required:!1},emptyOption:{defaultValue:{value:"'Please select'",computed:!1},description:"Text to display when no items are selected",type:{name:"string"},required:!1},fullWidth:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},boldLabel:{defaultValue:{value:"true",computed:!1},description:"Boolean for rendering the label in bold or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldSelect},"./src/client/components/Form/elements/FieldTypeahead/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),styled_components__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/utils/colours.js"),_hooks__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_Typeahead__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Typeahead/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["name","validate","required","label","legend","hint","initialValue","options","autoScroll"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n textarea {\n width: 100%;\n }\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_22__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_2,";\n ")})),FieldTypeahead=function FieldTypeahead(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,options=_ref.options,autoScroll=_ref.autoScroll,props=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_23__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onBlur=_useField.onBlur,setFieldValue=(0,_hooks__WEBPACK_IMPORTED_MODULE_23__.Gc)().setFieldValue;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__.Z,{name,label,legend,hint,error,autoScroll,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(StyledWrapper,{error,children:[touched&&error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_20__.Z,{children:error}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(_Typeahead__WEBPACK_IMPORTED_MODULE_25__.Z,_objectSpread({name,"aria-label":label||legend,onBlur,onChange:function onChange(newValue){return setFieldValue(name,props.isMulti?newValue:newValue[0])},error,value,initialOptions:options},props))]})})};FieldTypeahead.displayName="FieldTypeahead",FieldTypeahead.propTypes=_objectSpread(_objectSpread({},_Typeahead__WEBPACK_IMPORTED_MODULE_25__.Z.propTypes),{},{name:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().func,prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,prop_types__WEBPACK_IMPORTED_MODULE_28___default().object]),initialValue:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().object,prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().object)]),autoScroll:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool}),FieldTypeahead.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:null,autoScroll:!1},FieldTypeahead.__docgenInfo={description:"A Typeahead for use in forms.\n\nThis is a wrapper around the `react-select` by Jed Watson, for indepth documention refer to [Github](https://github.com/JedWatson/react-select) or the [api docs](https://react-select.com/home)",methods:[],displayName:"FieldTypeahead",props:{validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"union",value:[{name:"string"},{name:"object"}]},required:!1},initialValue:{defaultValue:{value:"null",computed:!1},description:"Sets initial value of the input",type:{name:"union",value:[{name:"object"},{name:"arrayOf",value:{name:"object"}}]},required:!1},autoScroll:{defaultValue:{value:"false",computed:!1},description:"Whether the window should auto scroll into view this component",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}},composes:["../../../Typeahead"]};const __WEBPACK_DEFAULT_EXPORT__=FieldTypeahead},"./src/client/components/Form/elements/FieldWrapper/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),_govuk_react_form_group__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/form-group/dist/govuk-react-form-group.esm.js"),_govuk_react_label__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_hint_text__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/hint-text/dist/govuk-react-hint-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_excluded=["name","label","legend","bigLegend","hint","error","showBorder","children","reduced","groupId","boldLabel","autoScroll"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledFormGroup=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_form_group__WEBPACK_IMPORTED_MODULE_21__.Z)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n"])),(function(props){var isReduced=props.reduced,hasHint=!!props.hint;return"\n ".concat(isReduced&&"\n background-color: ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.nx,";\n label {\n font-size: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.VN.S,"px;\n + span {\n font-size: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.VN.S,"px;\n + div span {\n font-size: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.VN.S,"px;\n }\n }\n }\n input {\n border-width: 1px;\n }\n "),"\n padding: 8px;\n ").concat(hasHint?"padding-bottom: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,";"):"padding-bottom: 8px;",";\n ")})),StyledFieldset=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("fieldset")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n ","\n"])),(function(props){return props.showBorder&&"\n border: 1px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.FU,";\n padding: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_3,";\n ")})),StyledFieldsetNoStyling=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("fieldset")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n"]))),StyledLegend=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("legend")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n box-sizing: border-box;\n display: table;\n white-space: normal;\n font-size: 19px;\n padding: 0;\n margin: 0;\n padding-bottom: ",";\n * {\n margin-bottom: "," !important;\n }\n ","\n ","\n\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_3,";\n padding-left: 8px;\n ")}),(function(props){return props.showBorder&&"\n padding: 8px;\n margin-left: -8px;\n "}),(function(props){return props.bigLegend&&"\n margin-bottom: 20px;\n padding-bottom: 0px;\n font-size: 24px;\n "})),StyledLegendNoStyle=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("legend")(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n"]))),StyledLabel=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_label__WEBPACK_IMPORTED_MODULE_22__.Z)(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n padding-bottom: ",";\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,(function(props){return props.boldLabel&&" font-weight: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.Xw.bold,";")})),StyledHint=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_hint_text__WEBPACK_IMPORTED_MODULE_23__.Z)(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n padding-bottom: ",";\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_2,(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_2,";\n padding-bottom: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,";\n ")})),FieldInner=function FieldInner(_ref){var legend=_ref.legend,error=_ref.error,showBorder=_ref.showBorder,children=_ref.children,bigLegend=_ref.bigLegend,groupId=_ref.groupId;return legend?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(StyledFieldset,{showBorder,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLegend,{className:"govuk-heading-m",error,showBorder,bigLegend,id:groupId,children:legend}),children]}):children},FieldWrapper=function FieldWrapper(_ref2){var name=_ref2.name,label=_ref2.label,legend=_ref2.legend,bigLegend=_ref2.bigLegend,hint=_ref2.hint,error=_ref2.error,showBorder=_ref2.showBorder,children=_ref2.children,reduced=_ref2.reduced,groupId=_ref2.groupId,boldLabel=_ref2.boldLabel,autoScroll=_ref2.autoScroll,rest=_objectWithoutProperties(_ref2,_excluded),styledWrapperRef=react__WEBPACK_IMPORTED_MODULE_20__.useRef(null);return(0,react__WEBPACK_IMPORTED_MODULE_20__.useEffect)((function(){autoScroll&&styledWrapperRef.current.scrollIntoView()}),[autoScroll]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledFormGroup,_objectSpread(_objectSpread({id:"field-".concat(name),"data-test":"field-".concat(name),reduced,hint,ref:styledWrapperRef},rest),{},{children:legend?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(FieldInner,{legend,error,showBorder,bigLegend,groupId,children:[label&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLabel,{boldLabel,error,htmlFor:name,children:label}),hint&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledHint,{"data-test":"hint-text",error,children:hint}),children]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledFieldsetNoStyling,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(FieldInner,{legend,error,showBorder,bigLegend,groupId,children:[label&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLegendNoStyle,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLabel,{boldLabel,error,htmlFor:name,children:label})}),hint&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledHint,{"data-test":"hint-text",error,children:hint}),children]})})}))};FieldWrapper.displayName="FieldWrapper",FieldInner.propTypes={legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,error:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,showBorder:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,bigLegend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,children:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node},FieldInner.defaultProps={legend:null,error:null,showBorder:!1,bigLegend:!1,children:null},FieldWrapper.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,bigLegend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,hint:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,error:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,showBorder:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,children:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,boldLabel:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,autoScroll:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool},FieldWrapper.defaultProps={label:null,legend:null,hint:null,error:null,showBorder:!1,children:null,boldLabel:!0,autoScroll:!1},FieldWrapper.__docgenInfo={description:"A simple wrapper for use in the field components, which applies supporting elements and stylings. The FieldWrapper component caters for the child element within, by providing it with the wrapping elements it needs. In particular, this wrapper looks for passed props such as legends, labels, and hints, and provides the required layout or additional elements.\n\nIn some design cases, there are pages that contain forms with a single radio or checkbox question. These pages have a requirement for a bigger, 'page-title like' legend. The `bigLegend` prop is a boolean which provides alternative styling to the legend, to make it match the bigger legend requirement.",methods:[],displayName:"FieldWrapper",props:{label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},error:{defaultValue:{value:"null",computed:!1},description:"Text for error",type:{name:"string"},required:!1},showBorder:{defaultValue:{value:"false",computed:!1},description:"Boolean for showing borders",type:{name:"bool"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"Node for children elements",type:{name:"node"},required:!1},boldLabel:{defaultValue:{value:"true",computed:!1},description:"Boolean for rendering the label in bold or not",type:{name:"bool"},required:!1},autoScroll:{defaultValue:{value:"false",computed:!1},description:"Whether the window should auto scroll into view this component",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0},bigLegend:{description:"Boolean for showing a big legend",type:{name:"bool"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=FieldWrapper},"./src/client/components/Form/elements/FormActions.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_3__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n "," {\n * {\n vertical-align: baseline;\n }\n\n * + * {\n margin-left: ",";\n }\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_2__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_2__.N_.SCALE_4)},"./src/client/components/Form/elements/Step.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_hooks__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_ButtonLink__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/components/ButtonLink/index.jsx"),_FormActions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react/jsx-runtime.js");function Step(_ref){var name=_ref.name,backButton=_ref.backButton,forwardButton=_ref.forwardButton,cancelUrl=_ref.cancelUrl,children=_ref.children,_useFormContext=(0,_hooks__WEBPACK_IMPORTED_MODULE_4__.Gc)(),currentStep=_useFormContext.currentStep,goBack=_useFormContext.goBack,registerStep=_useFormContext.registerStep,deregisterStep=_useFormContext.deregisterStep,getStepIndex=_useFormContext.getStepIndex,isFirstStep=_useFormContext.isFirstStep,isLastStep=_useFormContext.isLastStep;(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){return registerStep(name),function(){return deregisterStep(name)}}),[name]);var index=getStepIndex(name);if(index!==currentStep||void 0===index||void 0===currentStep)return null;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:["function"==typeof children?children():children,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_FormActions__WEBPACK_IMPORTED_MODULE_6__.Z,{children:[function renderForwardButton(){if(void 0===forwardButton){var label=isLastStep()?"Submit":"Continue";return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__.Z,{"data-test":label.toLowerCase(),name:"forward",children:label})}return"string"==typeof forwardButton?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__.Z,{name:"forward",children:forwardButton}):forwardButton}(),!isFirstStep()&&function renderBackButton(){return void 0===backButton?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_ButtonLink__WEBPACK_IMPORTED_MODULE_5__.Z,{name:"back",onClick:goBack,children:"Back"}):"string"==typeof backButton?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_ButtonLink__WEBPACK_IMPORTED_MODULE_5__.Z,{name:"back",onClick:goBack,children:backButton}):backButton}(),isFirstStep()&&cancelUrl&&function renderCancelLink(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_3__.Z,{"data-test":"cancel-link",href:cancelUrl,children:"Cancel"})}()]})]})}Step.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,backButton:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node,forwardButton:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().func,prop_types__WEBPACK_IMPORTED_MODULE_8___default().node])},Step.defaultProps={backButton:void 0,forwardButton:void 0,children:null},Step.__docgenInfo={description:"",methods:[],displayName:"Step",props:{backButton:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"node"},required:!1},forwardButton:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"node"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"func"},{name:"node"}]},required:!1},name:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Step},"./src/client/components/Form/hooks/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Gc:()=>_useFormContext__WEBPACK_IMPORTED_MODULE_1__.G,U$:()=>_useField__WEBPACK_IMPORTED_MODULE_0__.Z,ol:()=>_useFormContext__WEBPACK_IMPORTED_MODULE_1__.o});var _useField__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/client/components/Form/hooks/useField.js"),_useFormContext__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/components/Form/hooks/useFormContext.js")},"./src/client/components/Form/hooks/useField.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js");var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/index.js"),lodash__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/lodash/lodash.js"),_useFormContext__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/components/Form/hooks/useFormContext.js");const __WEBPACK_DEFAULT_EXPORT__=function useField(_ref){var name=_ref.name,_ref$initialValue=_ref.initialValue,initialValue=void 0===_ref$initialValue?"":_ref$initialValue,_ref$validate=_ref.validate,validate=void 0===_ref$validate?null:_ref$validate,_ref$required=_ref.required,required=void 0===_ref$required?null:_ref$required,_useFormContext=(0,_useFormContext__WEBPACK_IMPORTED_MODULE_5__.G)(),registerField=_useFormContext.registerField,deregisterField=_useFormContext.deregisterField,setFieldTouched=_useFormContext.setFieldTouched,setFieldValue=_useFormContext.setFieldValue,getFieldState=_useFormContext.getFieldState;(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)((function(){var validators;return registerField({name,initialValue,validate:(validators=(0,lodash__WEBPACK_IMPORTED_MODULE_4__.castArray)(validate).filter((function(v){return v})),required&&validators.unshift((function(value){return(0,lodash__WEBPACK_IMPORTED_MODULE_4__.isEmpty)(value)?required:null})),validators)}),function(){deregisterField(name)}}),[name]);var fieldState=getFieldState(name,initialValue);return{name,value:fieldState.value,error:fieldState.error,touched:fieldState.touched,onChange:function onChange(e){return setFieldValue(name,e.target.value)},onBlur:function onBlur(){return setFieldTouched(name,!0)}}}},"./src/client/components/Form/hooks/useFormContext.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>useFormContext,o:()=>FormContextProvider});__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Form});__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.values.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.object.from-entries.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lodash_default=__webpack_require__.n(lodash),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),react_router=__webpack_require__("./node_modules/react-router/esm/react-router.js"),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),govuk_react_button_esm=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),ErrorSummary=__webpack_require__("./src/client/components/ErrorSummary/index.jsx"),Task=__webpack_require__("./src/client/components/Task/index.jsx"),LoadingBox=__webpack_require__("./src/client/components/Task/LoadingBox.jsx"),Resource=__webpack_require__("./src/client/components/Resource/Resource.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r React.ReactNode} props.with - The wrapping component.\n@param {any} props.when - Wrapping takes place only if this prop is truthy,\notherwise the children will be rendered unwrapped\n@param {Object} props.props - Will be passed as the props to the wrapping\ncomponent.\n@param {React.ReactNode} props.props - The children to be wrapped\n@returns {React.ReactNode}\n@example\n\n

I'm gonna be wrapped

\n
",methods:[],displayName:"Wrap"};const components_Wrap=Wrap;var Analytics=__webpack_require__("./src/client/components/Analytics/index.jsx"),actions=(__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./src/client/actions.js"));function reducer_typeof(o){return reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},reducer_typeof(o)}var _excluded=["type","result"];function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FormActions=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),hooks=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),Effect=__webpack_require__("./src/client/components/Effect.jsx");const HardRedirect=(0,__webpack_require__("./node_modules/react-redux/es/index.js").connect)()((function(_ref){var to=_ref.to,when=_ref.when,dispatch=_ref.dispatch,_ref$children=_ref.children,children=void 0===_ref$children?null:_ref$children;return(0,react.useEffect)((function(){when&&dispatch({type:actions.Cq2,to})}),[to,when]),"function"==typeof children?children((function(to){return dispatch({type:actions.Cq2,to})})):children}));var colours=__webpack_require__("./src/client/utils/colours.js");function Form_typeof(o){return Form_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Form_typeof(o)}var Form_excluded=["submissionTaskName","id","analyticsFormName","analyticsData","cancelButtonLabel","cancelRedirectTo","initialValuesTaskName","initialValuesPayload","redirectTo","flashMessage","children","initialValues","redirectMode","scrollToTopOnStep","showStepInUrl","reactRouterRedirect","transformInitialValues","transformPayload","onSuccess","onError","submitButtonLabel","submitButtonColour","onLoad","result","resolved","errors","errorStatus","values","touched","steps","initialStepIndex","goToStep"];function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function Form_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return Form_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Form_arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Form_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function Form_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Form_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{};props.resetFields(Form_objectSpread(Form_objectSpread({},initialValues),values))},validateForm:function validateForm(fieldNamesToValidate){var _validateForm=_validateForm3(Form_objectSpread(Form_objectSpread({},contextProps),{},{fields:null!=fieldNamesToValidate&&fieldNamesToValidate.length?lodash_default().pick(contextProps.fields,fieldNamesToValidate):contextProps.fields})),errors=_validateForm.errors,touched=_validateForm.touched;return props.onValidate(errors,touched),errors},children:(0,jsx_runtime.jsx)(Task.Z,{children:function children(t){var submissionTask=t(submissionTaskName,id);return(0,jsx_runtime.jsx)(LoadingBox.Z,{name:submissionTaskName,id,when:"hard"===redirectMode&&redirectTo&&resolved,children:(0,jsx_runtime.jsxs)("form",{autoComplete:"off",noValidate:!0,onSubmit:function onSubmit(e){e.preventDefault();var _validateForm2=_validateForm3(contextProps),errors=_validateForm2.errors,touched=_validateForm2.touched;props.onValidate(errors,touched),(0,lodash.isEmpty)(errors)?contextProps.isLastStep()?(submissionTask.start({payload:transformPayload(values),onSuccessDispatch:"FORM__RESOLVED"}),analytics("Submit")):(props.goForward(),analytics("Next step",{currentStep:props.currentStep}),showStepInUrl&&history.push({search:lib_default().stringify(Form_objectSpread(Form_objectSpread({},qsParams),{},{step:steps[props.currentStep+1]}))})):(requestAnimationFrame((function(){var _ref$current;return null===(_ref$current=ref.current)||void 0===_ref$current?void 0:_ref$current.focus()})),analytics("Validation errors",{errors}))},children:[(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref6){var history=_ref6.history;return(0,jsx_runtime.jsx)(HardRedirect,{children:function children(hardRedirect){return(0,jsx_runtime.jsx)(Effect.Z,{dependencyList:[submissionTaskName,id,resolved,result],effect:function effect(){if(resolved&&(null==result||!result.errors)){if(analytics("Submission request success",analyticsData&&analyticsData(values)),flashMessage){var message=flashMessage(result,values);props.writeFlashMessage(message)}"soft"===redirectMode&&redirectTo&&history.push(redirectTo(result,values)),onSuccess&&onSuccess(result,values,{flashMessage:props.writeFlashMessage,hardRedirect,softRedirect:history.push}),props.resetResolved()}}})}})}}),(0,jsx_runtime.jsx)(Effect.Z,{dependencyList:[initialValues],effect:function effect(){return initialValues&&onLoad(transformInitialValues(initialValues),initialStepIndex)}}),(0,jsx_runtime.jsx)(Effect.Z,{dependencyList:[submissionTask.error],effect:function effect(){submissionTask.error&&analytics("Submission request error",{error:submissionTask.errorMessage})}}),"hard"===redirectMode&&redirectTo&&resolved&&(0,jsx_runtime.jsx)(HardRedirect,{to:redirectTo(result,values),when:resolved}),!(0,lodash.isEmpty)(errors)&&(0,jsx_runtime.jsx)(ErrorSummary.Z,{ref,id:"form-errors","data-test":"summary-form-errors",errors:Object.entries(errors).map((function(_ref7){var _ref8=_slicedToArray(_ref7,2);return{targetName:_ref8[0],text:_ref8[1]}}))}),"function"==typeof _children?_children(contextProps):_children,!steps.length&&(0,jsx_runtime.jsxs)(FormActions.Z,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{buttonColour:submitButtonColour,"data-test":"submit-button",children:submitButtonLabel}),cancelRedirectTo&&(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:cancelRedirectTo(),"data-test":"cancel-button",children:cancelButtonLabel})]})]})})}})}))})}})}})};_Form.displayName="_Form";var Form=(0,multiinstance.ZP)({name:"Form",reducer:function(){var _state$values$action$,_state$values,state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{values:{},touched:{},errors:{},errorStatus:0,fields:{},currentStep:0,steps:[]},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,action=_objectWithoutProperties(_ref,_excluded);switch(type){case actions.Fis:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:reducer_objectSpread(reducer_objectSpread({},state.values),action.initialValues),currentStep:action.initialStepIndex});case actions.HIy:return{values:reducer_objectSpread({},action.values),touched:{},errors:{},errorStatus:0,fields:reducer_objectSpread({},state.fields),currentStep:0,steps:_toConsumableArray(state.steps)};case actions.St0:return reducer_objectSpread(reducer_objectSpread({},state),{},{result,resolved:!0});case"FORM__RESET_RESOLVED":return(0,lodash.omit)(state,"result","resolved");case actions.dBj:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:reducer_objectSpread(reducer_objectSpread(reducer_objectSpread({},state.previousValues),state.values),{},reducer_defineProperty({},action.field.name,null!==(_state$values$action$=null===(_state$values=state.values)||void 0===_state$values?void 0:_state$values[action.field.name])&&void 0!==_state$values$action$?_state$values$action$:action.field.initialValue)),touched:reducer_objectSpread(reducer_objectSpread({},state.touched),{},reducer_defineProperty({},action.field.name,!1)),fields:reducer_objectSpread(reducer_objectSpread({},state.fields),{},reducer_defineProperty({},action.field.name,action.field))});case actions.CjI:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:(0,lodash.omit)(state.values,action.fieldName),errors:(0,lodash.omit)(state.errors,action.fieldName),touched:(0,lodash.omit)(state.touched,action.fieldName),fields:(0,lodash.omit)(state.fields,action.fieldName)});case actions.pe8:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:reducer_objectSpread(reducer_objectSpread({},state.values),{},reducer_defineProperty({},action.fieldName,action.fieldValue))});case actions.gZL:return reducer_objectSpread(reducer_objectSpread({},state),{},{touched:reducer_objectSpread(reducer_objectSpread({},state.touched),{},reducer_defineProperty({},action.fieldName,!0))});case actions.qre:return reducer_objectSpread(reducer_objectSpread({},state),{},{errors:action.errors,touched:action.touched});case actions.Qlv:return reducer_objectSpread(reducer_objectSpread({},state),{},{errors:action.errors,touched:Object.fromEntries(Object.keys(action.errors).map((function(key){return[key,!0]}))),errorStatus:action.httpStatusCode});case actions.H3x:return reducer_objectSpread(reducer_objectSpread({},state),{},{currentStep:state.currentStep+1,previousValues:state.values});case actions.yTt:return reducer_objectSpread(reducer_objectSpread({},state),{},{currentStep:state.currentStep-1,previousValues:state.values});case actions.QhV:var nextCurrentStep=action.stepName?state.steps.indexOf(action.stepName):0;return reducer_objectSpread(reducer_objectSpread({},state),{},{currentStep:nextCurrentStep,previousValues:state.values});case actions.pdV:return reducer_objectSpread(reducer_objectSpread({},state),{},{steps:state.steps.includes(action.stepName)?state.steps:[].concat(_toConsumableArray(state.steps),[action.stepName])});case actions.Hef:return reducer_objectSpread(reducer_objectSpread({},state),{},{steps:state.steps.filter((function(s){return s!==action.stepName}))});default:return state}},component:_Form,dispatchToProps:function dispatchToProps(dispatch){return{onLoad:function onLoad(initialValues,initialStepIndex){return dispatch({type:"FORM__LOADED",initialValues,initialStepIndex})},resetResolved:function resetResolved(){return dispatch({type:"FORM__RESET_RESOLVED"})},registerField:function registerField(initialValues){return function(field){return dispatch({type:"FORM__FIELD_REGISTER",field:Form_objectSpread({initialValue:null==initialValues?void 0:initialValues[field.name]},field)})}},deregisterField:function deregisterField(fieldName){return dispatch({type:"FORM__FIELD_DEREGISTER",fieldName})},resetFields:function resetFields(values){return dispatch({type:"FORM__FIELDS__RESET",values})},setFieldValue:function setFieldValue(fieldName,fieldValue){return dispatch({type:"FORM__FIELD_SET_VALUE",fieldName,fieldValue})},setFieldTouched:function setFieldTouched(fieldName){return dispatch({type:"FORM__FIELD_TOUCHED",fieldName})},onValidate:function onValidate(errors,touched){return dispatch({type:"FORM__VALIDATE",errors,touched})},onError:function onError(errors){return dispatch({type:"FORM__ERRORED",errors})},goForward:function goForward(values){return dispatch({type:"FORM__FORWARD",values})},goBack:function goBack(){return dispatch({type:"FORM__BACK"})},goToStep:function goToStep(stepName){dispatch({type:"FORM__GO_TO_STEP",stepName})},registerStep:function registerStep(stepName){return dispatch({type:"FORM__STEP_REGISTER",stepName})},deregisterStep:function deregisterStep(stepName){return dispatch({type:"FORM__STEP_DEREGISTER",stepName})},writeFlashMessage:function writeFlashMessage(message){return dispatch({type:"FLASH_MESSAGE__WRITE_TO_SESSION",messageType:"success",message})}}},actionPattern:"FORM__"});Form.propTypes={id:prop_types_default().string.isRequired,analyticsFormName:prop_types_default().string.isRequired,analyticsData:prop_types_default().func,cancelRedirectTo:prop_types_default().func.isRequired,cancelButtonLabel:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().element]),submissionTaskName:prop_types_default().string.isRequired,submitButtonLabel:prop_types_default().string,redirectTo:prop_types_default().func,redirectMode:prop_types_default().oneOf(["hard","soft"]),flashMessage:prop_types_default().func,initialValuesTaskName:prop_types_default().string,initialValues:prop_types_default().object,transformInitialValues:prop_types_default().func,transformPayload:prop_types_default().func,initialStepIndex:prop_types_default().number,scrollToTopOnStep:prop_types_default().bool};const components_Form=Form},"./src/client/components/Form/validators.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>email,R:()=>number});__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var EMAIL_PATTERN=/(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/,IS_NUMBER=/^[0-9]*$/,email=function email(x){return EMAIL_PATTERN.test(x)?null:"Enter an email address in the correct format, like name@example.com"},number=function number(x,errorMessage){return!x||IS_NUMBER.test(x)?null:errorMessage}},"./src/client/components/InvestmentProjectLocalHeader/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_InvestmentProjectLocalHeader});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),Timeline=__webpack_require__("./src/client/components/Timeline/index.jsx"),date=__webpack_require__("./src/client/utils/date.js"),colours=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./src/client/utils/colours.js"));const timeline_theme={container:{backgroundColor:colours.zT,largeScreen:{padding:"23px 0 0 18px"}},li:{before:{left:"-8px",top:"2px",width:govuk_react_constants_esm.N_.SCALE_2,height:govuk_react_constants_esm.N_.SCALE_2,border:"2px solid ".concat(colours.N1)},span:{display:"inline"},mqLargeScreen:{padding:"".concat(govuk_react_constants_esm.N_.SCALE_4," 0 ").concat(govuk_react_constants_esm.N_.SCALE_4," 0"),borderTop:"2px solid ".concat(colours.N1),before:{top:"-8px",left:"-10px"}}}};var urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),constants=__webpack_require__("./src/client/modules/Investments/Projects/constants.js"),StatusMessage=__webpack_require__("./src/client/components/StatusMessage/index.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var MetaList=(0,styled_components_browser_esm.ZP)("ul")({}),StyledListItem=(0,styled_components_browser_esm.ZP)("li")(function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({marginRight:govuk_react_constants_esm.N_.SCALE_5,display:"inline-grid","&:last-child":{marginTop:govuk_react_constants_esm.N_.SCALE_3,marginBottom:govuk_react_constants_esm.N_.SCALE_3}},govuk_react_constants_esm.qk.LARGESCREEN,{"&:last-child":{marginTop:0,marginBottom:0}})),StyledListItemText=(0,styled_components_browser_esm.ZP)("span")({color:"#6f777b",fontSize:govuk_react_constants_esm.Kt.SIZE_16,fontWeight:400,marginBottom:govuk_react_constants_esm.N_.SCALE_1}),StyledChild=(0,styled_components_browser_esm.ZP)("span")({fontSize:govuk_react_constants_esm.Kt.SIZE_16}),StyledStatusMessage=(0,styled_components_browser_esm.ZP)(StatusMessage.Z)({fontSize:govuk_react_constants_esm.Kt.SIZE_20,fontWeight:700,marginBottom:govuk_react_constants_esm.N_.SCALE_1,marginTop:govuk_react_constants_esm.N_.SCALE_2,backgroundColor:colours.Cj}),MetaListItem=function MetaListItem(_ref){var text=_ref.text,children=_ref.children;return(0,jsx_runtime.jsxs)(StyledListItem,{children:[(0,jsx_runtime.jsx)(StyledListItemText,{children:text}),(0,jsx_runtime.jsx)(StyledChild,{children})]})};MetaListItem.displayName="MetaListItem";var InvestmentProjectLocalHeader=function InvestmentProjectLocalHeader(_ref2){var _investment$createdBy,_investment$createdBy2,investment=_ref2.investment;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(MetaList,{"data-test":"meta-list",children:[(0,jsx_runtime.jsxs)(MetaListItem,{text:"Status",children:[(0,lodash.upperFirst)(investment.status)," -"," ",(0,jsx_runtime.jsx)("a",{href:urls_default().investments.projects.status(investment.id),children:"change"})]}),(0,jsx_runtime.jsx)(MetaListItem,{text:"Project code",children:investment.projectCode}),(0,jsx_runtime.jsx)(MetaListItem,{text:"Valuation",children:investment.valueComplete?"Project valued":"Not yet valued"}),(0,jsx_runtime.jsx)(MetaListItem,{text:"Created on",children:(0,date.formatMediumDateTime)(investment.createdOn)}),(null===(_investment$createdBy=investment.createdBy)||void 0===_investment$createdBy||null===(_investment$createdBy2=_investment$createdBy.ditTeam)||void 0===_investment$createdBy2?void 0:_investment$createdBy2.name)&&(0,jsx_runtime.jsx)(MetaListItem,{text:"Created by",children:investment.createdBy.ditTeam.name})]}),(0,jsx_runtime.jsx)(styled_components_browser_esm.f6,{theme:timeline_theme,children:(0,jsx_runtime.jsx)(Timeline.Z,{stages:constants.pZ,currentStage:investment.stage.name})}),"Won"===investment.stage.name&&!investment.archived&&(0,jsx_runtime.jsxs)(StyledStatusMessage,{"data-test":"project-won-message",children:["This project has been verified as won. You should not make any changes to this project.",(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),"If you would like to make changes, please contact the Investment Promotion Performance team."]})]})};InvestmentProjectLocalHeader.propTypes={investment:prop_types_default().object.isRequired},InvestmentProjectLocalHeader.__docgenInfo={description:"The **InvestmentProjectLocalHeader** contains the following:\n\n- Investment metadata such as: Status (Ongoing, Delayed, Abandoned, Lost and Dormant), Project code, Valuation and a Created on date\n\n- A list of five stages (Prospect', 'Assign PM', 'Active', 'Verify win' and 'Won') in chronological order where the current stage is clear to see",methods:[],displayName:"InvestmentProjectLocalHeader",props:{investment:{description:"An investment project",type:{name:"object"},required:!0}}};const components_InvestmentProjectLocalHeader=InvestmentProjectLocalHeader},"./src/client/components/InvestmentReminders/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_InvestmentReminders});__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),state=__webpack_require__("./src/client/components/InvestmentReminders/state.js"),actions=__webpack_require__("./src/client/actions.js"),styled_components_browser_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js")),govuk_react_heading_esm=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),constants=__webpack_require__("./src/common/constants.js"),urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var _require=__webpack_require__("./src/client/utils/date.js"),formatWithoutParsing=_require.formatWithoutParsing,getDifferenceInDaysLabel=_require.getDifferenceInDaysLabel,StyledSubHeading=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n color: ",";\n font-size: ",";\n font-weight: ",";\n margin-top: ",";\n margin-bottom: ",";\n"])),colours.hM,govuk_react_constants_esm.Kt.SIZE_19,govuk_react_constants_esm.Xw.regular,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2),StyledSubHeadingEmpty=(0,styled_components_browser_esm.ZP)(StyledSubHeading)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n margin: 0;\n"])),colours.au),StyledProjectLink=(0,styled_components_browser_esm.ZP)("a")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: block;\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_19,colours.su),StyledProjectCode=(0,styled_components_browser_esm.ZP)("div")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n margin: "," 0;\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.Kt.SIZE_16,colours.au),StyledDueDate=(0,styled_components_browser_esm.ZP)("span")(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16,colours.cK),StyledDueCountdown=(0,styled_components_browser_esm.ZP)("span")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n margin-top: ",";\n text-align: right;\n white-space: nowrap;\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.Kt.SIZE_16,colours.cK),StyledList=(0,styled_components_browser_esm.ZP)("ul")(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n list-style-type: none;\n padding: 0;\n margin: 0;\n"]))),StyledListItem=(0,styled_components_browser_esm.ZP)("li")(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n margin-bottom: ",";\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: flex-end;\n"])),govuk_react_constants_esm.N_.SCALE_4),StyledDetails=(0,styled_components_browser_esm.ZP)("div")(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n padding-right: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),OutstandingPropositions=function OutstandingPropositions(_ref){var results=_ref.results,count=_ref.count;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:results.length?(0,jsx_runtime.jsxs)("div",{"data-test":"outstanding-propositions",children:[(0,jsx_runtime.jsxs)(StyledSubHeading,{"data-test":"outstanding-propositions-heading",children:["Outstanding propositions (",count,")"]}),(0,jsx_runtime.jsx)(StyledList,{"data-test":"outstanding-propositions-list",children:results.map((function(_ref2){var id=_ref2.id,investment_project=_ref2.investment_project,name=_ref2.name,deadline=_ref2.deadline;return(0,jsx_runtime.jsxs)(StyledListItem,{children:[(0,jsx_runtime.jsxs)(StyledDetails,{children:[(0,jsx_runtime.jsx)(StyledProjectLink,{href:urls_default().investments.projects.propositions(investment_project.id),children:name}),(0,jsx_runtime.jsx)(StyledProjectCode,{"data-test":"outstanding-proposition-project-code",children:investment_project.project_code}),(0,jsx_runtime.jsxs)(StyledDueDate,{"data-test":"outstanding-proposition-deadline",children:["Due"," ",formatWithoutParsing(new Date(deadline),constants.DATE_DAY_LONG_FORMAT)]})]}),(0,jsx_runtime.jsx)(StyledDueCountdown,{"data-test":"outstanding-proposition-countdown",children:getDifferenceInDaysLabel(deadline)})]},id)}))})]}):(0,jsx_runtime.jsx)(StyledSubHeadingEmpty,{"data-test":"outstanding-propositions-empty",children:"Projects with propositions due will be displayed here."})})};OutstandingPropositions.propTypes={count:prop_types_default().number.isRequired,results:prop_types_default().arrayOf(prop_types_default().shape({id:prop_types_default().string.isRequired,investment_project:prop_types_default().shape({id:prop_types_default().string.is_required,name:prop_types_default().string.isRequired,project_code:prop_types_default().string.isRequired}),deadline:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,adviser:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,first_name:prop_types_default().string.isRequired,last_name:prop_types_default().string.isRequired})})).isRequired},OutstandingPropositions.__docgenInfo={description:"",methods:[],displayName:"OutstandingPropositions",props:{count:{description:"",type:{name:"number"},required:!0},results:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{id:{name:"string",required:!0},investment_project:{name:"shape",value:{id:{name:"string",required:!1},name:{name:"string",required:!0},project_code:{name:"string",required:!0}},required:!1},deadline:{name:"string",required:!0},name:{name:"string",required:!0},adviser:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0},first_name:{name:"string",required:!0},last_name:{name:"string",required:!0}},required:!1}}}},required:!0}}};const InvestmentReminders_OutstandingPropositions=OutstandingPropositions;var Task=__webpack_require__("./src/client/components/Task/index.jsx"),InvestmentReminders=function InvestmentReminders(_ref){var adviser=_ref.adviser,results=_ref.results,count=_ref.count;return(0,jsx_runtime.jsx)("div",{"data-test":"investment-reminders",children:(0,jsx_runtime.jsx)(Task.Z.Status,{name:state.p,id:state.ID,progressMessage:"Loading your reminders",startOnRender:{payload:{adviser},onSuccessDispatch:actions.qzL},children:function children(){return(0,jsx_runtime.jsx)(InvestmentReminders_OutstandingPropositions,{results,count})}})})};InvestmentReminders.displayName="InvestmentReminders",InvestmentReminders.propTypes={adviser:prop_types_default().shape({id:prop_types_default().string.isRequired}).isRequired,count:prop_types_default().number.isRequired,results:prop_types_default().arrayOf(prop_types_default().shape({id:prop_types_default().string.isRequired,investment_project:prop_types_default().shape({id:prop_types_default().string.is_required,name:prop_types_default().string.isRequired,project_code:prop_types_default().string.isRequired}),deadline:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,adviser:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,first_name:prop_types_default().string.isRequired,last_name:prop_types_default().string.isRequired})})).isRequired},InvestmentReminders.__docgenInfo={description:"Shows reminders of upcoming propositions for an adviser to deal with.",methods:[],displayName:"InvestmentReminders",props:{adviser:{description:"The adviser to display investment reminders for.",type:{name:"shape",value:{id:{name:"string",required:!0}}},required:!0},count:{description:"",type:{name:"number"},required:!0},results:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{id:{name:"string",required:!0},investment_project:{name:"shape",value:{id:{name:"string",required:!1},name:{name:"string",required:!0},project_code:{name:"string",required:!0}},required:!1},deadline:{name:"string",required:!0},name:{name:"string",required:!0},adviser:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0},first_name:{name:"string",required:!0},last_name:{name:"string",required:!0}},required:!1}}}},required:!0}}};const components_InvestmentReminders=(0,es.connect)(state.H)(InvestmentReminders)},"./src/client/components/InvestmentReminders/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID,p:()=>TASK_GET_OUTSTANDING_PROPOSITIONS});var ID="investmentReminders",TASK_GET_OUTSTANDING_PROPOSITIONS="TASK_GET_OUTSTANDING_PROPOSITIONS",state2props=function state2props(state){return state[ID]}},"./src/client/components/Layout/DefaultLayout.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var _templateObject,react__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/react/index.js"),styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),_govuk_react_grid_col__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@govuk-react/grid-col/dist/govuk-react-grid-col.esm.js"),_govuk_react_grid_row__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@govuk-react/grid-row/dist/govuk-react-grid-row.esm.js"),_Footer__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/Footer/index.jsx"),_Main__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/Main/index.jsx"),_LocalHeader_LocalHeader__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/client/components/LocalHeader/LocalHeader.jsx"),_DataHubHeader__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/components/DataHubHeader/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,react__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_25__),styled_components__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/lodash/lodash.js"),react_redux__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react-redux/es/index.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_unordered_list__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/unordered-list/dist/govuk-react-unordered-list.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/colours.js"),_components_StatusMessage__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/StatusMessage/index.jsx"),_state__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/LocalHeader/state.js"),_actions__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./src/client/actions.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1?messages.map((function(_ref4){var body=_ref4.body,heading=_ref4.heading;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("li",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(StyledStatusMessage,{colour:messageColours[parts[0]],children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledHeading,{children:heading}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledBody,{dangerouslySetInnerHTML:{__html:body}})]})},body)})):messages.map((function(body,i){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("li",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledStatusMessage,{colour:messageColours[type],children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledMessage,{dangerouslySetInnerHTML:{__html:body}})})},i)}))}))})},flashMessagePropTypes={flashMessages:prop_types__WEBPACK_IMPORTED_MODULE_25___default().shape({type:prop_types__WEBPACK_IMPORTED_MODULE_25___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_25___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_25___default().shape({body:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string.isRequired,heading:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string.isRequired,id:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string})),prop_types__WEBPACK_IMPORTED_MODULE_25___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_25___default().string).isRequired])})};FlashMessages.propTypes=flashMessagePropTypes,FlashMessages.__docgenInfo={description:'Flash messages for users in different colours depending on the message.\n\nNote: If the props "flashMessages" are not passed down to the component then flash messages will be taken from session storage, if none exist in session storage then `null` is returned.',methods:[],displayName:"FlashMessages",props:{flashMessages:{description:"Contains the flash messages",type:{name:"shape",value:{type:{name:"union",value:[{name:"arrayOf",value:{name:"shape",value:{body:{name:"string",required:!0},heading:{name:"string",required:!0},id:{name:"string",required:!1}}}},{name:"arrayOf",value:{name:"string"}}],required:!1}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_18__.connect)(_state__WEBPACK_IMPORTED_MODULE_26__.H,(function(dispatch){return{getFlashMessages:function getFlashMessages(){dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_27__.YJ})},clearFlashMessages:function clearFlashMessages(){dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_27__.RJR})}}}))(FlashMessages)},"./src/client/components/LocalHeader/LocalHeader.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>LocalHeader_LocalHeader});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.string.link.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_main_esm=__webpack_require__("./node_modules/@govuk-react/main/dist/govuk-react-main.esm.js"),govuk_react_breadcrumbs_esm=__webpack_require__("./node_modules/@govuk-react/breadcrumbs/dist/govuk-react-breadcrumbs.esm.js"),react_router_dom=__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js"),colours=__webpack_require__("./src/client/utils/colours.js"),LocalHeaderHeading=__webpack_require__("./src/client/components/LocalHeader/LocalHeaderHeading.jsx");const LocalHeader_LocalSubHeader=(0,styled_components_browser_esm.ZP)("h2")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ","px;\n"])),govuk_react_constants_esm.nR.M);var LocalHeader_templateObject,_templateObject2,_templateObject3,FlashMessages=__webpack_require__("./src/client/components/LocalHeader/FlashMessages.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function LocalHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledHeader=(0,styled_components_browser_esm.ZP)("div")(LocalHeader_templateObject||(LocalHeader_templateObject=LocalHeader_taggedTemplateLiteral(["\n padding-bottom: ",";\n background-color: ",";\n padding-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5,colours.zT,govuk_react_constants_esm.N_.SCALE_3),StyledMain=(0,styled_components_browser_esm.ZP)(govuk_react_main_esm.Z)(_templateObject2||(_templateObject2=LocalHeader_taggedTemplateLiteral(["\n padding-top: 0;\n"]))),BreadcrumbsWrapper=(0,styled_components_browser_esm.ZP)(govuk_react_breadcrumbs_esm.Z)(_templateObject3||(_templateObject3=LocalHeader_taggedTemplateLiteral(["\n margin-bottom: ",";\n margin-top: 0;\n"])),govuk_react_constants_esm.N_.SCALE_5),StyledSuperheading=styled_components_browser_esm.ZP.div({fontSize:20,lineHeight:"32px"}),StyledLink=(0,styled_components_browser_esm.ZP)("a")({fontSize:20,display:"inline-block",fontFamily:"Arial, sans-serif",marginTop:8,marginBottom:8}),LocalHeader=function LocalHeader(_ref){var breadcrumbs=_ref.breadcrumbs,flashMessages=_ref.flashMessages,heading=_ref.heading,subheading=_ref.subheading,headingLink=_ref.headingLink,superheading=_ref.superheading,children=_ref.children,_ref$useReactRouter=_ref.useReactRouter,useReactRouter=void 0!==_ref$useReactRouter&&_ref$useReactRouter;return(0,jsx_runtime.jsx)(StyledHeader,{"aria-label":"local header","data-auto-id":"localHeader","data-test":"localHeader",role:"region",children:(0,jsx_runtime.jsxs)(StyledMain,{children:[(0,jsx_runtime.jsx)(BreadcrumbsWrapper,{"data-test":"breadcrumbs",children:null==breadcrumbs?void 0:breadcrumbs.map((function(breadcrumb){return breadcrumb.link?useReactRouter&&"Home"!==breadcrumb.text?(0,jsx_runtime.jsx)(govuk_react_breadcrumbs_esm.Z.Link,{as:react_router_dom.rU,to:breadcrumb.link,children:breadcrumb.text},breadcrumb.link):(0,jsx_runtime.jsx)(govuk_react_breadcrumbs_esm.Z.Link,{href:breadcrumb.link,children:breadcrumb.text},breadcrumb.link):breadcrumb.text}))}),(0,jsx_runtime.jsx)(FlashMessages.Z,{flashMessages}),superheading&&(0,jsx_runtime.jsx)(StyledSuperheading,{children:superheading}),headingLink&&(0,jsx_runtime.jsx)(StyledLink,{"data-test":"heading-link",href:headingLink.url,children:headingLink.text}),heading&&(0,jsx_runtime.jsx)(LocalHeaderHeading.Z,{"data-test":"heading",children:heading}),subheading&&(0,jsx_runtime.jsx)(LocalHeader_LocalSubHeader,{"data-test":"subheading",children:subheading}),children]})})};LocalHeader.displayName="LocalHeader",LocalHeader.propTypes={breadcrumbs:prop_types_default().arrayOf(prop_types_default().shape({link:prop_types_default().string,text:prop_types_default().string.isRequired})),flashMessages:prop_types_default().shape({type:prop_types_default().oneOfType([prop_types_default().arrayOf(prop_types_default().shape({body:prop_types_default().string.isRequired,heading:prop_types_default().string.isRequired,id:prop_types_default().string})),prop_types_default().arrayOf(prop_types_default().string).isRequired])}),heading:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),subheading:prop_types_default().string,headingLink:prop_types_default().shape({url:prop_types_default().string.isRequired,text:prop_types_default().string.isRequired}),superheading:prop_types_default().node,children:prop_types_default().node},LocalHeader.__docgenInfo={description:"The generic local header component.",methods:[],displayName:"LocalHeader",props:{useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},breadcrumbs:{description:"Contains the breadcrumbs",type:{name:"arrayOf",value:{name:"shape",value:{link:{name:"string",required:!1},text:{name:"string",required:!0}}}},required:!1},flashMessages:{description:"Contains the flash messages",type:{name:"shape",value:{type:{name:"union",value:[{name:"arrayOf",value:{name:"shape",value:{body:{name:"string",required:!0},heading:{name:"string",required:!0},id:{name:"string",required:!1}}}},{name:"arrayOf",value:{name:"string"}}],required:!1}}},required:!1},heading:{description:"Contains the heading text to be displayed",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},subheading:{description:"Contains the subheading text to be displayed",type:{name:"string"},required:!1},headingLink:{description:"Contains a link that appears above the heading",type:{name:"shape",value:{url:{name:"string",required:!0},text:{name:"string",required:!0}}},required:!1},superheading:{description:"Contains an item that renders above the heading (in the same position as the headingLink)",type:{name:"node"},required:!1},children:{description:"Contains an item that renders below the heading",type:{name:"node"},required:!1}}};const LocalHeader_LocalHeader=LocalHeader},"./src/client/components/LocalHeader/LocalHeaderHeading.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_4__.ZP)("h1")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ","px;\n font-weight: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.nR.L,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.Xw.bold)},"./src/client/components/LocalHeader/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID});var ID="flashMessages",state2props=function state2props(state){return state[ID]}},"./src/client/components/Main/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>InnerContainer,Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var _styled,prop_types__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_19__),styled_components__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["children"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var OuterContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_18__.ZP)("main")({paddingTop:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_5,textAlign:"center"}),InnerContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_18__.ZP)("div")((_defineProperty(_styled={maxWidth:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.PL,marginLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_3,marginRight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_3,textAlign:"left"},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.qk.LARGESCREEN,{marginLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_5,marginRight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_5}),_defineProperty(_styled,"@media only screen and (min-width:1020px)",{margin:"0 auto"}),_styled)),Main=function Main(_ref){var children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(OuterContainer,_objectSpread(_objectSpread({},props),{},{role:"main",id:"main-content","data-test":"bodyMainContent",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(InnerContainer,{children})}))};Main.displayName="Main",Main.propTypes={children:prop_types__WEBPACK_IMPORTED_MODULE_19___default().node},Main.defaultProps={children:void 0},Main.__docgenInfo={description:"The`
`is a layout component which wraps content inside the`
`HTML tag, this component also contains a grid container which will center the content in the page with the appropriate gutters and responsive behaviour we expect from [our grid](https://design-system.service.gov.uk/styles/layout/).\n\nIt's important that we include this in all pages as the`
`represents the dominant content of the``of the document, this also acts as a landmark which can help assistive technologies.",methods:[],displayName:"Main",props:{children:{defaultValue:{value:"undefined",computed:!0},description:"Text for main",type:{name:"node"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Main},"./src/client/components/Metadata/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Metadata});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledMetaWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n color: ",";\n"])),colours.E5),StyledItemLabel=(0,styled_components_browser_esm.ZP)("span")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n"])),colours.au);function MetadataItem(_ref){var label=_ref.label,children=_ref.children;return(0,jsx_runtime.jsxs)(StyledMetaWrapper,{"data-test":"metadata-item",children:[label&&(0,jsx_runtime.jsx)(StyledItemLabel,{children:label})," ",children]})}MetadataItem.displayName="MetadataItem",MetadataItem.propTypes={label:prop_types_default().string,children:prop_types_default().node.isRequired},MetadataItem.defaultProps={label:null},MetadataItem.__docgenInfo={description:"",methods:[],displayName:"MetadataItem",props:{label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const Metadata_MetadataItem=MetadataItem;var Metadata_templateObject;var StyledMetadataWrapper=(0,styled_components_browser_esm.ZP)("div")(Metadata_templateObject||(Metadata_templateObject=function Metadata_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ",";\n line-height: ",";\n display: grid;\n\n & > * {\n margin-bottom: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.Kt.SIZE_27,govuk_react_constants_esm.N_.SCALE_1),Metadata=function Metadata(_ref){var rows=_ref.rows;return rows&&(0,jsx_runtime.jsx)(StyledMetadataWrapper,{"data-test":"metadata",children:rows.map((function(_ref2){var label=_ref2.label,value=_ref2.value;return(0,jsx_runtime.jsx)(Metadata_MetadataItem,{label,children:value},label)}))})};Metadata.propTypes={rows:prop_types_default().arrayOf(prop_types_default().shape({label:prop_types_default().node,value:prop_types_default().node}))},Metadata.defaultProps={rows:null},Metadata.__docgenInfo={description:"",methods:[],displayName:"Metadata",props:{rows:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"node",required:!1},value:{name:"node",required:!1}}}},required:!1}}};const components_Metadata=Metadata},"./src/client/components/MyInvestmentProjects/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID,t:()=>TASK_GET_MY_INVESTMENTS_LIST});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _utils_date__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/client/utils/date.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var _govuk_react_link__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_18__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["href","children","showWarning"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var NewWindowLink=function NewWindowLink(_ref){var href=_ref.href,children=_ref.children,_ref$showWarning=_ref.showWarning,showWarning=void 0===_ref$showWarning||_ref$showWarning,rest=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_16__.Z,_objectSpread(_objectSpread({"data-test":"newWindowLink",href,rel:"noreferrer noopener",target:"_blank"},rest),{},{children:[children,showWarning&&" (opens in new tab)"]}))};NewWindowLink.displayName="NewWindowLink",NewWindowLink.propTypes={href:prop_types__WEBPACK_IMPORTED_MODULE_18___default().string.isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_18___default().node.isRequired,showWarning:prop_types__WEBPACK_IMPORTED_MODULE_18___default().bool},NewWindowLink.__docgenInfo={description:'When using a screen reader the aria-label attribute overrides\nthe link text entirely.\n\nWhen setting the aria-label ensure the text contains both\nmeaningful link text AND a warning.\n\n For example:\n\n Read more...\n\n\nGDS recommends to use (opens in new tab) as part of the link and not to mention \'window\'.\nhttps://design-system.service.gov.uk/styles/typography/#links',methods:[],displayName:"NewWindowLink",props:{showWarning:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},href:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=NewWindowLink},"./src/client/components/NotificationAlert/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>TASK_GET_REMINDER_SUMMARY,ID:()=>ID,a:()=>state2props});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _lib_urls__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/lib/urls.js"),_lib_urls__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_lib_urls__WEBPACK_IMPORTED_MODULE_15__);function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{$u:()=>Size,XF:()=>Count,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,bn:()=>Shape});__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js"),Size={SMALL:20,MEDIUM:25},Shape=styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP.span((function(_ref){var size=_ref.size,digits=_ref.digits;return{display:"flex",justifyContent:"center",backgroundColor:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.hM,fontWeight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Xw.bold,height:size,width:digits<3?size:size+10,borderRadius:digits<3?"50%":"75px"}})),Count=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("span")({color:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.Cj,alignSelf:"center",fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_14}),NotificationBadge=function NotificationBadge(_ref2){var value=_ref2.value,_ref2$size=_ref2.size,size=void 0===_ref2$size?Size.MEDIUM:_ref2$size;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Shape,{size,digits:value.toString().length,"aria-label":value,"data-test":"notification-badge",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Count,{children:value<100?value:"99+"})})};NotificationBadge.displayName="NotificationBadge",NotificationBadge.propTypes={value:prop_types__WEBPACK_IMPORTED_MODULE_8___default().number},NotificationBadge.__docgenInfo={description:"",methods:[],displayName:"NotificationBadge",props:{size:{defaultValue:{value:"25",computed:!1},required:!1},value:{description:"Badge value",type:{name:"number"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=NotificationBadge},"./src/client/components/Pagination/RoutedPagination.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,react__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_33__),styled_components__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),react_router_dom__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/react-router/esm/react-router.js"),qs__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/qs/lib/index.js"),qs__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_25__),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./src/client/utils/colours.js"),_constants__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./src/client/components/Pagination/constants.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);itotalPages)){var newPager=getPager(items,page,pageSize);setPagerState(newPager),onChangePage(newPager)}},getPager=function getPager(totalItems,currentPage,pageSize){currentPage=currentPage||1,pageSize=pageSize||10;var totalPages=Math.ceil(totalItems/pageSize),_getStartAndEndPage=function getStartAndEndPage(totalPages,currentPage){var startPage,endPage;return totalPages<=10?(startPage=1,endPage=totalPages):currentPage<=6?(startPage=1,endPage=10):currentPage+4>=totalPages?(startPage=totalPages-9,endPage=totalPages):(startPage=currentPage-5,endPage=currentPage+4),{startPage,endPage}}(totalPages,currentPage),startPage=_getStartAndEndPage.startPage,endPage=_getStartAndEndPage.endPage,startIndex=(currentPage-1)*pageSize,endIndex=Math.min(startIndex+pageSize-1,totalItems-1),pages=_toConsumableArray(Array(endPage+1-startPage).keys()).map((function(i){return startPage+i}));return{totalItems,currentPage,pageSize,totalPages,startPage,endPage,startIndex,endIndex,pages}};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(react_router_dom__WEBPACK_IMPORTED_MODULE_31__.AW,{children:function children(_ref3){var history=_ref3.history,location=_ref3.location,qsParams=qs__WEBPACK_IMPORTED_MODULE_25___default().parse(location.search.slice(1)),handleOnClick=function handleOnClick(pageNumber,e){e.preventDefault(),setPage(pageNumber),history.push({search:qs__WEBPACK_IMPORTED_MODULE_25___default().stringify(_objectSpread(_objectSpread({},qsParams),{},{page:pageNumber}))})};return(null==pages?void 0:pages.length)>1?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledNav,{"data-test":"pagination","aria-label":"Pagination: total ".concat(totalPages),"data-total-pages":totalPages,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsxs)(StyledPaginationList,{children:[1!==currentPage&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationPiece,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationLink,{onClick:function onClick(e){return handleOnClick(currentPage-1,e)},"data-test":"previous",href:"#",children:_constants__WEBPACK_IMPORTED_MODULE_32__.v0})}),pages.map((function(page,index){var isActive=currentPage===page;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationPiece,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationLink,{$isActive:isActive,onClick:function onClick(e){return handleOnClick(page,e)},"data-page-number":page,"data-test":"".concat(isActive&&"page-number-active"),"aria-label":"Page ".concat(page),"aria-current":!!isActive&&"page",ref:function ref(el){return linkRefs.current[index]=el},href:"#",children:page})},index)})),currentPage!==totalPages&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationPiece,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationLink,{onClick:function onClick(e){return handleOnClick(currentPage+1,e)},"data-test":"next",href:"#",children:_constants__WEBPACK_IMPORTED_MODULE_32__.bg})})]})}):null}})};Pagination.displayName="Pagination",Pagination.propTypes={items:prop_types__WEBPACK_IMPORTED_MODULE_33___default().number.isRequired,onChangePage:prop_types__WEBPACK_IMPORTED_MODULE_33___default().func,initialPage:prop_types__WEBPACK_IMPORTED_MODULE_33___default().number,pageSize:prop_types__WEBPACK_IMPORTED_MODULE_33___default().number},Pagination.__docgenInfo={description:"",methods:[],displayName:"Pagination",props:{pageSize:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},onChangePage:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},initialPage:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},items:{description:"",type:{name:"number"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Pagination},"./src/client/components/Pagination/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FQ:()=>PAGINATION_PIECE_ELLIPSIS,MR:()=>PAGINATION_PIECE_PAGE_NUMBER,U7:()=>DEFAULT_MAX_PAGE_NUMBER_LINKS,bg:()=>PAGINATION_PIECE_NEXT,v0:()=>PAGINATION_PIECE_PREVIOUS});var PAGINATION_PIECE_PREVIOUS="Previous",PAGINATION_PIECE_ELLIPSIS="ellipsis",PAGINATION_PIECE_PAGE_NUMBER="page-number",PAGINATION_PIECE_NEXT="Next",DEFAULT_MAX_PAGE_NUMBER_LINKS=5},"./src/client/components/Pagination/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Pagination});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),constants=__webpack_require__("./src/client/components/Pagination/constants.js");const Pagination_computeVisiblePieces=function computeVisiblePieces(numberOfPages,activePage){var maxPageNumbers=arguments.length>2&&void 0!==arguments[2]?arguments[2]:constants.U7,visiblePieces=[],lowerLimit=activePage,upperLimit=Math.min(activePage,numberOfPages);visiblePieces.push({type:constants.v0,pageNumber:Math.max(1,activePage-1),isDisabled:1===activePage});for(var i=1;i1&&(lowerLimit-=1,i+=1),i1&&(visiblePieces.push({type:constants.MR,pageNumber:1,isActive:1===activePage}),activePage>4&&visiblePieces.push({type:constants.FQ}));for(var _i=lowerLimit;_i<=upperLimit;_i+=1)visiblePieces.push({type:constants.MR,pageNumber:_i,isActive:activePage===_i});return activePagemaxPageNumbers&&(visiblePieces.push({type:constants.FQ}),visiblePieces.push({type:constants.MR,pageNumber:numberOfPages,isActive:activePage===numberOfPages})),visiblePieces.push({type:constants.bg,pageNumber:Math.min(numberOfPages,activePage+1),isDisabled:activePage===numberOfPages}),visiblePieces};var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledNav=(0,styled_components_browser_esm.ZP)("nav")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n text-align: center;\n line-height: 1;\n display: flex;\n justify-content: space-around;\n padding: "," 0;\n\n "," {\n display: block;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.TABLET),StyledPaginationList=(0,styled_components_browser_esm.ZP)("ul")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin: 0;\n list-style: none;\n"]))),StyledPaginationPiece=(0,styled_components_browser_esm.ZP)("li")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: inline-block;\n\n & + & {\n margin-left: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_1),StyledPaginationLink=(0,styled_components_browser_esm.ZP)(govuk_react_link_esm.Z)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n font-weight: bold;\n font-size: ",";\n display: inline-block;\n padding: "," ",";\n line-height: 1.9em;\n color: ",";\n text-decoration: none;\n\n :hover {\n background-color: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_3,colours.su,colours.nx),StyledActivePaginationLink=(0,styled_components_browser_esm.ZP)(StyledPaginationLink)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n :link {\n color: ",";\n background-color: ",";\n }\n"])),colours.Cj,colours.Ej),StyledPagesTruncation=(0,styled_components_browser_esm.ZP)("span")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n font-weight: bold;\n font-size: ",";\n display: inline-block;\n padding: ",";\n background-color: transparent;\n line-height: ",";\n color: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.Kt.SIZE_24,colours.TK);function Pagination(_ref){var totalPages=_ref.totalPages,_ref$activePage=_ref.activePage,activePage=void 0===_ref$activePage?1:_ref$activePage,_ref$getPageUrl=_ref.getPageUrl,getPageUrl=void 0===_ref$getPageUrl?function(){return"#"}:_ref$getPageUrl,onPageClick=_ref.onPageClick,visiblePieces=Pagination_computeVisiblePieces(totalPages,activePage);return totalPages<2?null:(0,jsx_runtime.jsx)(StyledNav,{"data-test":"pagination","data-total-pages":totalPages,"aria-label":"pagination: total ".concat(totalPages," pages"),children:(0,jsx_runtime.jsx)(StyledPaginationList,{children:visiblePieces.map((function(_ref2,index){var type=_ref2.type,pageNumber=_ref2.pageNumber,isActive=_ref2.isActive,isDisabled=_ref2.isDisabled,key="".concat(type,"-").concat(index),onClick=function onClick(event){event.target.blur(),event.preventDefault(),onPageClick(pageNumber,event),window.scrollTo({top:0})},PageNumberLink=isActive?StyledActivePaginationLink:StyledPaginationLink;return isDisabled?null:(0,jsx_runtime.jsxs)(StyledPaginationPiece,{children:[type===constants.v0&&(0,jsx_runtime.jsx)(StyledPaginationLink,{"data-test":"prev",onClick,href:getPageUrl(pageNumber),children:"Previous"}),type===constants.FQ&&(0,jsx_runtime.jsx)(StyledPagesTruncation,{"data-test":"ellipsis",children:"…"}),type===constants.MR&&(0,jsx_runtime.jsx)(PageNumberLink,{"data-test":isActive?"page-number-active":"page-number","data-page-number":pageNumber,"aria-label":"Page ".concat(pageNumber),"aria-current":!!isActive&&"page",onClick,href:getPageUrl(pageNumber),children:pageNumber}),type===constants.bg&&(0,jsx_runtime.jsx)(StyledPaginationLink,{"data-test":"next",onClick,href:getPageUrl(pageNumber),children:"Next"})]},key)}))})})}Pagination.displayName="Pagination",Pagination.propTypes={totalPages:prop_types_default().number.isRequired,activePage:prop_types_default().number,onPageClick:prop_types_default().func,getPageUrl:prop_types_default().func},Pagination.__docgenInfo={description:"",methods:[],displayName:"Pagination",props:{activePage:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},getPageUrl:{defaultValue:{value:"() => '#'",computed:!1},description:"",type:{name:"func"},required:!1},totalPages:{description:"",type:{name:"number"},required:!0},onPageClick:{description:"",type:{name:"func"},required:!1}}};const components_Pagination=Pagination},"./src/client/components/Panel/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,prop_types__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_23__),styled_components__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["title","children"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js");var react_redux__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-redux/es/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__),ProtectedLink=function ProtectedLink(_ref){var module=_ref.module,modulePermissions=_ref.modulePermissions,_ref$children=_ref.children,children=void 0===_ref$children?null:_ref$children;return modulePermissions.includes(module)?children:null};ProtectedLink.propTypes={module:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string.isRequired,modulePermissions:prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().string).isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_3___default().element};const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)((function(state){return state}))(ProtectedLink)},"./src/client/components/ReadMore/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var _templateObject,react__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_19__),styled_components__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_ButtonLink__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/ButtonLink/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>ReferralList});__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.sort.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _templateObject,react=__webpack_require__("./node_modules/react/index.js"),govuk_react_hint_text_esm=__webpack_require__("./node_modules/@govuk-react/hint-text/dist/govuk-react-hint-text.esm.js"),govuk_react_select_esm=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js"),pluralize=__webpack_require__("./node_modules/pluralize/pluralize.js"),pluralize_default=__webpack_require__.n(pluralize),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),ContentWithHeading=__webpack_require__("./src/client/components/ContentWithHeading.jsx"),govuk_react_ordered_list_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/@govuk-react/ordered-list/dist/govuk-react-ordered-list.esm.js")),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledOL=(0,styled_components_browser_esm.ZP)(govuk_react_ordered_list_esm.Z)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n & > * {\n margin-top: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_4);function StyledOrderedList(_ref){var children=_ref.children;return(0,jsx_runtime.jsx)(StyledOL,{listStyleType:"none",children})}StyledOrderedList.displayName="StyledOrderedList",StyledOrderedList.__docgenInfo={description:"",methods:[],displayName:"StyledOrderedList"};const components_StyledOrderedList=StyledOrderedList;var Task=__webpack_require__("./src/client/components/Task/index.jsx"),govuk_react_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js")),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),colours=__webpack_require__("./src/client/utils/colours.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),govuk_react_details_esm=__webpack_require__("./node_modules/@govuk-react/details/dist/govuk-react-details.esm.js"),govuk_react_button_esm=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),url=__webpack_require__("./node_modules/url/url.js"),urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),client_state=__webpack_require__("./src/apps/companies/apps/referrals/details/client/state.js"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),components=__webpack_require__("./src/client/components/index.jsx"),actions=__webpack_require__("./src/client/actions.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["referrerUrl"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var format=__webpack_require__("./src/client/utils/date.js").format,AdviserDetails=function AdviserDetails(_ref){var name=_ref.name,email=_ref.email,team=_ref.team;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[name,email&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[", ",(0,jsx_runtime.jsx)("a",{href:"mailto:".concat(email),children:email})]}),team&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[", ",team]})]})};AdviserDetails.propTypes={name:prop_types_default().string.isRequired,email:prop_types_default().string,team:prop_types_default().string};(0,es.connect)((function(_ref2){var referrerUrl=_ref2.referrerUrl;return _objectSpread(_objectSpread({},_objectWithoutProperties(_ref2,_excluded)[client_state.ID]),{},{referrerUrl})}))((function(_ref3){var subject=_ref3.subject,referralId=_ref3.referralId,company=_ref3.company,contact=_ref3.contact,sendingAdviser=_ref3.sendingAdviser,receivingAdviser=_ref3.receivingAdviser,date=_ref3.date,notes=_ref3.notes,completed=_ref3.completed,interaction=_ref3.interaction,referrerUrl=_ref3.referrerUrl,cameFromHomePage=url.parse(referrerUrl).pathname===urls_default().companies.referrals.list();return(0,jsx_runtime.jsx)(Task.Z.Status,{name:"Referral details",id:"referralDetails",progressMessage:"loading referral details",startOnRender:{payload:referralId,onSuccessDispatch:actions.moN},children:function children(){return company&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(components.HF,{caption:subject,children:[(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Company",children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:urls_default().companies.detail(company.id),children:company.name})}),contact&&(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Contact",children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:urls_default().contacts.contact(contact.id),children:contact.name})}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Sending adviser",children:sendingAdviser&&(0,jsx_runtime.jsx)(AdviserDetails,_objectSpread({},sendingAdviser))}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Receiving adviser",children:receivingAdviser&&(0,jsx_runtime.jsx)(AdviserDetails,_objectSpread({},receivingAdviser))}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Date of referral",children:format(date)}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Notes",children:notes})]}),completed?(0,jsx_runtime.jsxs)(components.HF,{caption:"Referral accepted",children:[(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Date",children:format(completed.on)}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"By",children:(0,jsx_runtime.jsx)(AdviserDetails,_objectSpread({},completed.by))}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"With interaction",children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:urls_default().interactions.detail(interaction.id),children:interaction.subject})})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(govuk_react_details_esm.Z,{summary:"Why can I not edit the referral?",children:[(0,jsx_runtime.jsx)("p",{children:"For now, you can't edit the referral once it's been sent."}),(0,jsx_runtime.jsx)("p",{children:"Contact the recipient if something's changed."})]}),(0,jsx_runtime.jsxs)(components.iN,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:govuk_react_link_esm.Z,href:urls_default().companies.referrals.interactions.create(company.id,referralId),children:"Accept referral"}),(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:govuk_react_link_esm.Z,href:urls_default().companies.referrals.help(company.id,referralId),children:"I cannot accept the referral"}),(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:cameFromHomePage?urls_default().companies.referrals.list():urls_default().companies.detail(company.id),children:"Back"})]})]})]})}})}));AdviserDetails.__docgenInfo={description:"",methods:[],displayName:"AdviserDetails",props:{name:{description:"",type:{name:"string"},required:!0},email:{description:"",type:{name:"string"},required:!1},team:{description:"",type:{name:"string"},required:!1}}};var Card_templateObject;__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.reflect.construct.js");function Card_typeof(o){return Card_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Card_typeof(o)}function _defineProperties(target,props){for(var i=0;i div {\n padding: ",";\n padding-bottom: ",";\n margin: "," 0 "," 4px;\n\n & > a {\n padding: "," 0 "," ",";\n }\n }\n\n "," {\n margin-top: -",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_3),CardDetails=function(_React$PureComponent){!function CardDetails_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&CardDetails_setPrototypeOf(subClass,superClass)}(CardDetails,_React$PureComponent);var _super=CardDetails_createSuper(CardDetails);function CardDetails(){var _this;!function CardDetails_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,CardDetails);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return CardDetails_defineProperty(CardDetails_assertThisInitialized(_this=_super.call.apply(_super,[this].concat(args))),"renderLink",(function(link){return link?(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:link.url,children:link.text}):null})),_this}return function CardDetails_createClass(Constructor,protoProps,staticProps){return protoProps&&CardDetails_defineProperties(Constructor.prototype,protoProps),staticProps&&CardDetails_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(CardDetails,[{key:"render",value:function render(){var _this2=this,_this$props=this.props,summary=_this$props.summary,showDetails=_this$props.showDetails,link=_this$props.link,_children=_this$props.children,summaryVisuallyHidden=_this$props.summaryVisuallyHidden,analyticsAccordionType=_this$props.analyticsAccordionType,SummaryWithHiddenContent=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[summary,(0,jsx_runtime.jsx)(govuk_react_esm.TX,{children:summaryVisuallyHidden})]});return(0,jsx_runtime.jsx)(Analytics.Z,{children:function children(pushAnalytics){return(0,jsx_runtime.jsxs)(GovUkDetails,{summary:summaryVisuallyHidden?SummaryWithHiddenContent:summary,open:showDetails,onClick:function onClick(){pushAnalytics({event:"viewInteractionEngagement",extra:{accordionEngagement:"clicked",accordionType:analyticsAccordionType}})},children:[_children,_this2.renderLink(link)]})}})}}]),CardDetails}(react.PureComponent);CardDetails.displayName="CardDetails",CardDetails_defineProperty(CardDetails,"propTypes",{summary:prop_types_default().string.isRequired,summaryVisuallyHidden:prop_types_default().string,showDetails:prop_types_default().bool.isRequired,link:prop_types_default().shape({url:prop_types_default().string,text:prop_types_default().string}),children:prop_types_default().node.isRequired,analyticsAccordionType:prop_types_default().string}),CardDetails_defineProperty(CardDetails,"defaultProps",{link:null}),CardDetails.__docgenInfo={description:"",methods:[{name:"renderLink",docblock:null,modifiers:[],params:[{name:"link",type:null}],returns:null}],displayName:"CardDetails",props:{link:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},text:{name:"string",required:!1}}},required:!1},summary:{description:"",type:{name:"string"},required:!0},summaryVisuallyHidden:{description:"",type:{name:"string"},required:!1},showDetails:{description:"",type:{name:"bool"},required:!0},children:{description:"",type:{name:"node"},required:!0},analyticsAccordionType:{description:"",type:{name:"string"},required:!1}}};__webpack_require__("./node_modules/core-js/modules/es.object.values.js");var CardHeader_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,govuk_react_heading_esm=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),govuk_react_list_item_esm=__webpack_require__("./node_modules/@govuk-react/list-item/dist/govuk-react-list-item.esm.js"),Badge=__webpack_require__("./src/client/components/Badge/index.jsx"),constants=__webpack_require__("./src/client/components/ActivityFeed/constants.js");function CardHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var CardHeader_format=__webpack_require__("./src/client/utils/date.js").format,StyledBlockText=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)(CardHeader_templateObject||(CardHeader_templateObject=CardHeader_taggedTemplateLiteral(["\n display: inline-block;\n font-weight: normal;\n color: white;\n padding: 2px 5px;\n background-color: ",";\n margin-bottom: ",";\n"])),(function(_ref){return _ref.sourceType===constants.EB.external?colours.TK:colours.Ej}),govuk_react_constants_esm.N_.SCALE_2),StyledCardHeader=(0,styled_components_browser_esm.ZP)("div")(_templateObject2||(_templateObject2=CardHeader_taggedTemplateLiteral(["\n display: flex;\n flex-flow: row wrap;\n"]))),StyledCompanyName=(0,styled_components_browser_esm.ZP)("div")(_templateObject3||(_templateObject3=CardHeader_taggedTemplateLiteral(["\n margin: -"," -"," "," -",";\n padding: "," ",";\n background: ",";\n font-size: initial;\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_3,colours.zT),StyledHeadingWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject4||(_templateObject4=CardHeader_taggedTemplateLiteral(["\n width: 100%;\n\n "," {\n width: 0;\n flex-grow: 1;\n }\n"])),govuk_react_constants_esm.qk.TABLET),StyledHeading=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)(_templateObject5||(_templateObject5=CardHeader_taggedTemplateLiteral(["\n font-weight: normal;\n font-size: ","px;\n\n & > a:link,\n a:visited,\n a:hover,\n a:active {\n text-decoration: none;\n color: ",";\n }\n\n "," {\n margin-bottom: ",";\n }\n"])),govuk_react_constants_esm.nR.MEDIUM,colours.Ej,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_5),StyledSubHeading=(0,styled_components_browser_esm.ZP)("span")(_templateObject6||(_templateObject6=CardHeader_taggedTemplateLiteral(["\n font-weight: normal;\n font-size: ","px;\n margin-left: ","px;\n color: ",";\n"])),govuk_react_constants_esm.VN.MEDIUM,govuk_react_constants_esm.TF[1],colours.TK),StyledMetaItems=(0,styled_components_browser_esm.ZP)("ul")(_templateObject7||(_templateObject7=CardHeader_taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n\n li {\n font-size: ",";\n margin-bottom: ",";\n text-align: right;\n display: inline;\n\n "," {\n display: block;\n }\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.qk.TABLET),CardHeader=function CardHeader(_ref2){var blockText=_ref2.blockText,subHeading=_ref2.subHeading,company=_ref2.company,sourceType=_ref2.sourceType,heading=_ref2.heading,startTime=_ref2.startTime,badge=_ref2.badge,_ref2$headingLevel=_ref2.headingLevel,headingLevel=void 0===_ref2$headingLevel?3:_ref2$headingLevel;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[company&&company.name&&(0,jsx_runtime.jsx)(StyledCompanyName,{children:company.name}),(0,jsx_runtime.jsxs)(StyledCardHeader,{children:[(0,jsx_runtime.jsxs)(StyledHeadingWrapper,{children:[blockText&&(0,jsx_runtime.jsx)(StyledBlockText,{sourceType,children:blockText}),subHeading&&(0,jsx_runtime.jsx)(StyledSubHeading,{children:subHeading}),heading&&(0,jsx_runtime.jsx)(StyledHeading,{level:headingLevel,children:heading})]}),(0,jsx_runtime.jsxs)(StyledMetaItems,{children:[startTime&&(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:CardHeader_format(startTime)}),badge&&(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:(0,jsx_runtime.jsx)(Badge.Z,{borderColour:badge.borderColour,children:badge.text})})]})]})]})};CardHeader.propTypes={startTime:prop_types_default().string,heading:prop_types_default().node,blockText:prop_types_default().string,subHeading:prop_types_default().string,company:prop_types_default().shape({name:prop_types_default().string}),sourceType:prop_types_default().oneOf(Object.values(constants.EB)),badge:prop_types_default().shape({text:prop_types_default().string,borderColour:prop_types_default().string})},CardHeader.__docgenInfo={description:"",methods:[],displayName:"CardHeader",props:{headingLevel:{defaultValue:{value:"3",computed:!1},required:!1},startTime:{description:"",type:{name:"string"},required:!1},heading:{description:"",type:{name:"node"},required:!1},blockText:{description:"",type:{name:"string"},required:!1},subHeading:{description:"",type:{name:"string"},required:!1},company:{description:"",type:{name:"shape",value:{name:{name:"string",required:!1}}},required:!1},sourceType:{description:"",type:{name:"enum",computed:!0,value:"Object.values(SOURCE_TYPES)"},required:!1},badge:{description:"",type:{name:"shape",value:{text:{name:"string",required:!1},borderColour:{name:"string",required:!1}}},required:!1}}};const card_CardHeader=CardHeader;var CardTable_templateObject,govuk_react_table_esm=__webpack_require__("./node_modules/@govuk-react/table/dist/govuk-react-table.esm.js");function CardTable_typeof(o){return CardTable_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CardTable_typeof(o)}function CardTable_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function CardTable_defineProperties(target,props){for(var i=0;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledLabel=styled_components_browser_esm.ZP.label({display:"flex",alignItems:"baseline"}),StyledSelectInput=(0,styled_components_browser_esm.ZP)(govuk_react_select_esm.lq)({marginLeft:10,"&":{width:"initial"}});const ReferralList=(0,multiinstance.ZP)({name:"ReferralList",reducer:function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{filter:"received"},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,filter=_ref.filter;switch(type){case actions.f3J:return reducer_objectSpread(reducer_objectSpread({},state),{},{referrals:result});case actions.kQr:return reducer_objectSpread(reducer_objectSpread({},state),{},{filter});default:return state}},dispatchToProps:function dispatchToProps(dispatch){return{onFilterChange:function onFilterChange(filter){return dispatch({type:actions.kQr,filter})}}},actionPattern:"REFERRAL_LIST__",component:function component(_ref){var id=_ref.id,referrals=_ref.referrals,onFilterChange=_ref.onFilterChange,filter=_ref.filter;return(0,jsx_runtime.jsx)(Task.Z.Status,{name:"Referrals",id,progressMessage:"Loading referrals",startOnRender:{onSuccessDispatch:actions.f3J},children:function children(){if(referrals){var filteredReferrals=referrals.filter((function(_ref2){return _ref2.direction===filter})).sort((function(a,b){return new Date(b.date)-new Date(a.date)}));return(0,jsx_runtime.jsx)(ContentWithHeading.Z,{heading:pluralize_default()("".concat(filter," referral"),filteredReferrals.length,!0),headingActions:(0,jsx_runtime.jsxs)(StyledLabel,{htmlFor:"view-referrals",children:["View",(0,jsx_runtime.jsxs)(StyledSelectInput,{value:filter,id:"view-referrals",onChange:function onChange(e){return onFilterChange(e.target.value)},children:[(0,jsx_runtime.jsx)("option",{value:"received","aria-label":"received-referrals",children:"Received referrals"}),(0,jsx_runtime.jsx)("option",{value:"sent","aria-label":"sent-referrals",children:"Sent referrals"})]})]}),children:referrals.length?(0,jsx_runtime.jsx)(components_StyledOrderedList,{children:filteredReferrals.map((function(_ref3){var id=_ref3.id,referral=ReferralList_objectWithoutProperties(_ref3,ReferralList_excluded);return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(ReferralList_Referral,ReferralList_objectSpread({id},referral))},id)}))}):(0,jsx_runtime.jsxs)(govuk_react_hint_text_esm.Z,{children:["You have not received or sent any referrals.",(0,jsx_runtime.jsx)("br",{}),"You can refer companies to other advisers from a company page."]})})}}})}})},"./src/client/components/Resource/Company.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("./src/client/components/Resource/Resource.jsx").ST)("Company",(function(id){return"v4/company/".concat(id)}))},"./src/client/components/Resource/Contact.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("./src/client/components/Resource/Resource.jsx").ST)("Contact",(function(id){return"v3/contact/".concat(id)}))},"./src/client/components/Resource/Resource.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F6:()=>createCollectionResource,KZ:()=>createMetadataResource,ST:()=>createEntityResource,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var lodash__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/lodash/lodash.js"),lodash__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_20__),prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),_utils_multiinstance__WEBPACK_IMPORTED_MODULE_22__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./src/client/utils/multiinstance.js")),_Task_utils__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/components/Task/utils.js"),_Task__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/components/Task/index.jsx"),_Task_LoadingBox__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Task/LoadingBox.jsx"),_utils__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/utils/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{qN:()=>Company.Z,SF:()=>Contact.Z,_Q:()=>Countries,F_:()=>RelatedCompaniesCount});var Resource=__webpack_require__("./src/client/components/Resource/Resource.jsx");(0,Resource.ST)("Adviser",(function(id){return"adviser/".concat(id,"/")})),(0,Resource.KZ)("AssetClasses","capital-investment/asset-class-interest"),(0,Resource.KZ)("BusinessActivity","investment-business-activity");var Company=__webpack_require__("./src/client/components/Resource/Company.js");(0,Resource.ST)("CompanyContacts",(function(id){return"v4/contact?company_id=".concat(id)})),(0,Resource.ST)("CompanyObjectivesCount",(function(id){return"v4/company/".concat(id,"/objective/count")})),(0,Resource.ST)("CompanyObjectives",(function(id){return"v4/company/".concat(id,"/objective?sortby=target_date")})),(0,Resource.ST)("CompanyOneListTeam",(function(id){return"v4/company/".concat(id,"/one-list-group-core-team")})),(0,Resource.KZ)("ConstructionRisks","capital-investment/construction-risk");var Contact=__webpack_require__("./src/client/components/Resource/Contact.js");(0,Resource.ST)("ContactAuditHistory",(function(id){return"v3/contact/".concat(id,"/audit")}));const Countries=(0,Resource.KZ)("Countries","country"),RelatedCompaniesCount=((0,Resource.KZ)("DealTicketSizes","capital-investment/deal-ticket-size"),(0,Resource.KZ)("DeliveryPartners","investment-delivery-partner"),(0,Resource.KZ)("DesiredDealRoles","capital-investment/desired-deal-role"),(0,Resource.ST)("Event",(function(id){return"v3/event/".concat(id)})),(0,Resource.KZ)("ExportExperience","export-experience"),(0,Resource.KZ)("ExportExperienceCategory","export-experience-category"),(0,Resource.KZ)("ExportYears","export-years"),(0,Resource.KZ)("FDITypes","fdi-type"),(0,Resource.KZ)("FDIValues","fdi-value"),(0,Resource.ST)("Interaction",(function(id){return"v4/interaction/".concat(id)})),(0,Resource.F6)("Interactions","v4/interaction"),(0,Resource.ST)("Investment",(function(id){return"v3/investment/".concat(id)})),(0,Resource.ST)("InvestmentEvidence",(function(id){return"v3/investment/".concat(id,"/evidence-document")})),(0,Resource.KZ)("InvestmentProjectStages","investment-project-stage"),(0,Resource.KZ)("InvestmentTypes","investment-type"),(0,Resource.KZ)("InvestorType","capital-investment/investor-type"),(0,Resource.KZ)("InvestmentInvestorTypes","investment-investor-type"),(0,Resource.F6)("InvestmentProjectTasks","v4/investmentprojecttask"),(0,Resource.KZ)("LargeCapitalInvestmentEquityPercentages","capital-investment/equity-percentage"),(0,Resource.KZ)("LargeCapitalInvestmentRestrictions","capital-investment/restriction"),(0,Resource.KZ)("LargeCapitalInvestmentReturnRates","capital-investment/return-rate"),(0,Resource.KZ)("LargeCapitalInvestmentTypes","capital-investment/large-capital-investment-type"),(0,Resource.ST)("LargeInvestorProfile",(function(id){return"v4/large-investor-profile?investor_company_id=".concat(id)})),(0,Resource.KZ)("LevelOfInvolvement","investment-involvement"),(0,Resource.KZ)("LikelihoodToLand","likelihood-to-land"),(0,Resource.KZ)("OneListTiers","one-list-tier"),(0,Resource.ST)("Opportunity",(function(id){return"v4/large-capital-opportunity/".concat(id)})),(0,Resource.KZ)("OpportunityStatuses","large-capital-opportunity/opportunity-status"),(0,Resource.KZ)("OpportunityValueType","large-capital-opportunity/opportunity-value-type"),(0,Resource.ST)("Order",(function(id){return"v3/omis/order/".concat(id)})),(0,Resource.ST)("OrderAssignees",(function(id){return"v3/omis/order/".concat(id,"/assignee")})),(0,Resource.KZ)("OrderCancellationReasons","order-cancellation-reason"),(0,Resource.ST)("OrderInvoice",(function(id){return"v3/omis/order/".concat(id,"/invoice")})),(0,Resource.KZ)("OrderServiceTypes","order-service-type"),(0,Resource.ST)("OrderSubscribers",(function(id){return"v3/omis/order/".concat(id,"/subscriber-list")})),(0,Resource.ST)("ProjectDocument",(function(id){return id})),(0,Resource.ST)("Proposition",(function(id){return id})),(0,Resource.F6)("Propositions","v4/proposition"),(0,Resource.ST)("PropositionEvidence",(function(id){return id})),(0,Resource.KZ)("ReferralSourceActivity","referral-source-activity"),(0,Resource.KZ)("ReferralSourceMarketing","referral-source-marketing"),(0,Resource.KZ)("ReferralSourceWebsite","referral-source-website"),(0,Resource.KZ)("RequiredChecksConducted","capital-investment/required-checks-conducted"),(0,Resource.ST)("RelatedCompaniesCount",(function(id){return"v4/dnb/".concat(id,"/related-companies/count?include_manually_linked_companies=true")})));(0,Resource.KZ)("SalaryRanges","salary-range"),(0,Resource.KZ)("Sector","sector"),(0,Resource.KZ)("StrategicDrivers","investment-strategic-driver"),(0,Resource.KZ)("SpecificProgrammes","investment-specific-programme"),(0,Resource.ST)("Task",(function(id){return"v4/task/".concat(id)})),(0,Resource.KZ)("TimeHorizons","capital-investment/time-horizon"),(0,Resource.KZ)("UKRegions","uk-region")},"./src/client/components/RoutedInput/Filter.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var styled_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/utils/colours.js"),___WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/components/RoutedInput/index.jsx");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_3__.ZP)(___WEBPACK_IMPORTED_MODULE_2__.Z)({fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_0__.Kt.SIZE_16,lineHeight:"25px",padding:"6px 10px",marginTop:5,border:"2px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_1__.E5),appearance:null,display:"block",boxSizing:"border-box",width:"100%","&:focus":{outline:"3px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_1__.tL),outlineOffset:0}})},"./src/client/components/RoutedInput/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_RoutedInput});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js");var react=__webpack_require__("./node_modules/react/index.js"),govuk_react_input_esm=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),react_router=__webpack_require__("./node_modules/react-router/esm/react-router.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js");__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedInput=function RoutedInput(_ref){var qsParam=_ref.qsParam,_onChange=_ref.onChange,onEnter=_ref.onEnter,reset=_ref.reset,_ref$qsValue=_ref.qsValue,qsValue=void 0===_ref$qsValue?"":_ref$qsValue,_ref$value=_ref.value,value=void 0===_ref$value?qsValue:_ref$value,selectedValue=_ref.selectedValue,type=(_ref.dispatch,_ref.staticContext,_ref.id,_ref.type),props=_objectWithoutProperties(_ref,_excluded),_useTextCaretPosition=function useTextCaretPosition(){var _useState2=_slicedToArray((0,react.useState)(0),2),start=_useState2[0],setStart=_useState2[1],_useState4=_slicedToArray((0,react.useState)(0),2),end=_useState4[0],setEnd=_useState4[1],inputRef=(0,react.useRef)(null),updateTextCaret=(0,react.useCallback)((function(){if("text"===inputRef.current.type){var _inputRef$current=inputRef.current,selectionStart=_inputRef$current.selectionStart,selectionEnd=_inputRef$current.selectionEnd;setStart(selectionStart),setEnd(selectionEnd)}}),[]);return(0,react.useEffect)((function(){"text"===inputRef.current.type&&inputRef.current.setSelectionRange(start,end)})),{start,end,ref:inputRef,updateTextCaret}}(),ref=_useTextCaretPosition.ref,updateTextCaret=_useTextCaretPosition.updateTextCaret;return(0,react.useEffect)((function(){!qsValue&&selectedValue&&reset()}),[selectedValue,qsValue]),(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var history=_ref2.history,location=_ref2.location,qsParams=lib_default().parse(location.search.slice(1)),writeQs=function writeQs(){return history.replace({search:lib_default().stringify(_objectSpread(_objectSpread({},qsParams),{},_defineProperty({},qsParam,value)))})};return(0,jsx_runtime.jsx)(govuk_react_input_esm.Z,_objectSpread(_objectSpread({},props),{},{ref,value,type,onChange:function onChange(e){_onChange(e.target.value),updateTextCaret()},onKeyDown:function onKeyDown(e){"Enter"===e.key&&(onEnter(e.target.value),writeQs())},onBlur:writeQs}))}})};RoutedInput.displayName="RoutedInput",RoutedInput.propTypes={qsParam:prop_types_default().string.isRequired,type:prop_types_default().string};const components_RoutedInput=(0,multiinstance.ZP)({name:"RoutedInput",actionPattern:"ROUTED_INPUT__",component:RoutedInput,dispatchToProps:function dispatchToProps(dispatch){return{onChange:function onChange(value){return dispatch({type:actions.kB3,value})},onEnter:function onEnter(selectedValue){return dispatch({type:actions.Yf4,selectedValue})},reset:function reset(){return dispatch({type:actions.Kp3})}}},componentStateToProps:function componentStateToProps(cs,_ref3,_ref4){var router=_ref3.router,qsParam=_ref4.qsParam,qsValue=lib_default().parse(router.location.search.slice(1))[qsParam];return _objectSpread(_objectSpread({},cs),{},{qsValue})},reducer:function reducer(state,_ref5){var type=_ref5.type,value=_ref5.value,selectedValue=_ref5.selectedValue;switch(type){case actions.kB3:return _objectSpread(_objectSpread({},state),{},{value});case actions.Yf4:return _objectSpread(_objectSpread({},state),{},{selectedValue});case actions.Kp3:return{};default:return state}}})},"./src/client/components/RoutedInputField/Filter.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var styled_components__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_20__),_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/RoutedInput/Filter.js"),_FilterLabel__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/FilterLabel.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["label"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledFilterLabel=(0,styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP)(_FilterLabel__WEBPACK_IMPORTED_MODULE_17__.Z)({marginBottom:32}),RoutedInputFieldFilter=function RoutedInputFieldFilter(_ref){var label=_ref.label,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(StyledFilterLabel,{children:[label,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__.Z,_objectSpread({},props))]})};RoutedInputFieldFilter.displayName="RoutedInputFieldFilter",RoutedInputFieldFilter.propTypes={label:prop_types__WEBPACK_IMPORTED_MODULE_20___default().node.isRequired},RoutedInputFieldFilter.__docgenInfo={description:"",methods:[],displayName:"RoutedInputFieldFilter",props:{label:{description:"",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=RoutedInputFieldFilter},"./src/client/components/RoutedNumericRangeField/Filter.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_20__),styled_components__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/RoutedInput/Filter.js"),_FilterLabel__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/FilterLabel.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["id","qsParam","label"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledContainer=styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP.div({display:"flex",alignItems:"baseline"}),StyledDivider=styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP.div({padding:"0.5rem"}),StyledFieldset=styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP.fieldset({marginBottom:32}),RoutedNumericRangeField=function RoutedNumericRangeField(_ref){var id=_ref.id,qsParam=_ref.qsParam,label=_ref.label,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(StyledFieldset,_objectSpread(_objectSpread({},props),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_FilterLabel__WEBPACK_IMPORTED_MODULE_17__.Z,{as:"legend",children:label}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(StyledContainer,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__.Z,{id:"".concat(id,"-min"),qsParam:"".concat(qsParam,"_min"),type:"number",placeholder:"No min","aria-label":"".concat(label," min")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(StyledDivider,{children:"-"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__.Z,{id:"".concat(id,"-max"),qsParam:"".concat(qsParam,"_max"),type:"number",placeholder:"No max","aria-label":"".concat(label," max")})]})]}))};RoutedNumericRangeField.displayName="RoutedNumericRangeField",RoutedNumericRangeField.propTypes={label:prop_types__WEBPACK_IMPORTED_MODULE_20___default().node.isRequired,id:prop_types__WEBPACK_IMPORTED_MODULE_20___default().string.isRequired,qsParam:prop_types__WEBPACK_IMPORTED_MODULE_20___default().string.isRequired},RoutedNumericRangeField.__docgenInfo={description:"",methods:[],displayName:"RoutedNumericRangeField",props:{label:{description:"",type:{name:"node"},required:!0},id:{description:"",type:{name:"string"},required:!0},qsParam:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=RoutedNumericRangeField},"./src/client/components/RoutedRelatedCompaniesCheckboxGroup/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>INCLUDE_RELATED_COMPANIES,v:()=>INCLUDE_RELATED_COMPANIES_DISABLED_SUBSIDIARY});__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var react__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/react/index.js"),_govuk_react_button__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var SecondaryButton=react__WEBPACK_IMPORTED_MODULE_15__.forwardRef((function(props,ref){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_16__.Z,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var govuk_react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js");const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js").ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_0__.JF)({marginBottom:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.N_.SCALE_3})},"./src/client/components/StatusMessage/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var _templateObject,prop_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__),styled_components__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js");var StatusMessage=(0,styled_components__WEBPACK_IMPORTED_MODULE_6__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border: ",";\n color: ",";\n font-weight: bold;\n line-height: 1.5;\n ",";\n ",";\n ",";\n"])),(function(_ref){var colour=_ref.colour;return"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_1," solid ").concat(colour)}),(function(_ref2){return _ref2.colour}),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_3__.W0.responsivePadding(4),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_3__.W0.withWhiteSpace({marginBottom:6}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.jw);StatusMessage.propTypes={colour:prop_types__WEBPACK_IMPORTED_MODULE_7___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_7___default().node.isRequired},StatusMessage.defaultProps={colour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.Ej,role:"alert","data-test":"status-message"};const __WEBPACK_DEFAULT_EXPORT__=StatusMessage},"./src/client/components/SummaryList/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/react/index.js");var lodash__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_24__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_excluded=["rows"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledInnerRow=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n padding: "," 0;\n\n "," {\n display: inline-flex;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.qk.TABLET),StyledDL=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("dl")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n "," {\n display: flex;\n flex-direction: column;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.qk.TABLET),StyledDT=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("dt")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n padding-right: ",";\n width: 30%;\n font-weight: bold;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_4),StyledDD=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("dd")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n width: 70%;\n"]))),SummaryList=function SummaryList(_ref){var rows=_ref.rows,rest=_objectWithoutProperties(_ref,_excluded);return rows?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(StyledDL,_objectSpread(_objectSpread({},rest),{},{children:rows.filter((function(r){return!(0,lodash__WEBPACK_IMPORTED_MODULE_20__.isEmpty)(r)&&!(0,lodash__WEBPACK_IMPORTED_MODULE_20__.isEmpty)(r.value)})).map((function(_ref2){var label=_ref2.label,value=_ref2.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(StyledInnerRow,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(StyledDT,{children:label}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(StyledDD,{children:Array.isArray(value)?value.join(", "):value})]},label)}))})):null};SummaryList.propTypes={rows:prop_types__WEBPACK_IMPORTED_MODULE_24___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_24___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,value:prop_types__WEBPACK_IMPORTED_MODULE_24___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,prop_types__WEBPACK_IMPORTED_MODULE_24___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_24___default().node)])}))},SummaryList.defaultProps={rows:null},SummaryList.__docgenInfo={description:"A styled version of a description list, with terms and descriptions.",methods:[],displayName:"SummaryList",props:{rows:{defaultValue:{value:"null",computed:!1},description:"Items to display in the list",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"node",required:!1},value:{name:"union",value:[{name:"node"},{name:"arrayOf",value:{name:"node"}}],required:!1}}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=SummaryList},"./src/client/components/SummaryTable/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js");var _govuk_react_table__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/table/dist/govuk-react-table.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_29__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/prop-types/index.js")),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),lodash__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/utils/colours.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/number-utils.js"),_Tag__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/Tag/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_excluded=["caption","actions","children"],_excluded2=["heading","value","emptyValue"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledTable=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n & > tbody th {\n width: 30%;\n }\n & > caption {\n ",";\n margin-bottom: ",";\n }\n & > tbody > tr:first-child {\n border-top: 1px solid ",";\n }\n & > caption > * {\n ",";\n float: right;\n margin-left: ",";\n }\n"])),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_22__.cp.font({size:24,weight:"bold"}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_4,_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__.FU,_govuk_react_lib__WEBPACK_IMPORTED_MODULE_22__.cp.font({size:19,weight:"bold"}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_3),StyledCellList=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("ul")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n"]))),StyledTag=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_Tag__WEBPACK_IMPORTED_MODULE_26__.Z)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n float: right;\n"]))),SummaryTable=function SummaryTable(_ref){var caption=_ref.caption,actions=_ref.actions,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTable,_objectSpread(_objectSpread({caption:caption&&[caption,actions]},rest),{},{children}))};SummaryTable.displayName="SummaryTable";var StyledTableRow=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z.Row)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n font-size: ",";\n line-height: ",";\n white-space: pre-wrap;\n\n /* Conditionally apply the red border when flag is false */\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Ac.SIZE_24,(function(props){return props.invalid&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_2,";\n ")}));SummaryTable.Row=function(_ref2){var heading=_ref2.heading,children=_ref2.children,hideWhenEmpty=_ref2.hideWhenEmpty,flag=_ref2.flag;if(hideWhenEmpty&&(0,lodash__WEBPACK_IMPORTED_MODULE_21__.isEmpty)(children))return null;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(StyledTableRow,{invalid:flag,children:[heading&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z.CellHeader,{children:heading}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z.Cell,{children:function renderChildren(){return Array.isArray(children)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledCellList,{children:children.filter((function(c){return c})).map((function(c){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)("li",{children:c},c)}))}):children}()})]})},SummaryTable.TextRow=function(_ref3){var heading=_ref3.heading,value=_ref3.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(SummaryTable.Row,{heading,children:value||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTag,{children:"incomplete"})})},SummaryTable.CurrencyRow=function(_ref4){var heading=_ref4.heading,value=_ref4.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(SummaryTable.Row,{heading,children:value?(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_25__.mk)(value):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTag,{children:"incomplete"})})},SummaryTable.ListRow=function(_ref5){var heading=_ref5.heading,value=_ref5.value,emptyValue=_ref5.emptyValue,rest=_objectWithoutProperties(_ref5,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(SummaryTable.Row,_objectSpread(_objectSpread({heading},rest),{},{children:value&&value.length?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)("ul",{children:value.map((function(v,i){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)("li",{children:v.label},"".concat(heading,"-").concat(i))}))}):void 0===emptyValue?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTag,{children:"incomplete"}):emptyValue}))},SummaryTable.propTypes={caption:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,actions:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node},SummaryTable.defaultProps={caption:null,actions:null,children:null},SummaryTable.Row.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node},SummaryTable.Row.defaultProps={heading:null,children:null},SummaryTable.TextRow.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string},SummaryTable.TextRow.defaultProps={heading:null,value:null},SummaryTable.CurrencyRow.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().number},SummaryTable.CurrencyRow.defaultProps={heading:null,value:null},SummaryTable.ListRow.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string}))},SummaryTable.ListRow.defaultProps={heading:null,value:[]},SummaryTable.__docgenInfo={description:"",methods:[{name:"Row",docblock:null,modifiers:["static"],params:[{name:"{ heading, children, hideWhenEmpty, flag }",type:null}],returns:null},{name:"TextRow",docblock:null,modifiers:["static"],params:[{name:"{ heading, value }",type:null}],returns:null},{name:"CurrencyRow",docblock:null,modifiers:["static"],params:[{name:"{ heading, value }",type:null}],returns:null},{name:"ListRow",docblock:null,modifiers:["static"],params:[{name:"{ heading, value, emptyValue, ...rest }",type:null}],returns:null}],displayName:"SummaryTable",props:{caption:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=SummaryTable},"./src/client/components/TabNav/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_TabNav});__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),react_router=__webpack_require__("./node_modules/react-router/esm/react-router.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),actions=__webpack_require__("./src/client/actions.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i *:not(:last-child)":{marginRight:5}})),StyledTabpanel=(0,styled_components_browser_esm.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n"])),(function(_ref7){var theme=_ref7.theme;return theme.tabNav?"\n border: ".concat((0,lodash.get)(theme,"tabNav.tabPanel.border"),";\n padding: ").concat((0,lodash.get)(theme,"tabNav.tabPanel.padding"),";\n margin-bottom: ").concat((0,lodash.get)(theme,"tabNav.tabPanel.marginBottom"),";\n "):"\n margin-top: 15px;\n ".concat(govuk_react_constants_esm.qk.TABLET," {\n margin-top: 30px;\n }\n ")})),createId=function createId(id,key,routed){return routed?"".concat(id,".tab.").concat(key.replace("/","_")):"tab.".concat(key)};function getContent(tabs,keys,selectedTab){if(keys.includes(selectedTab))return tabs[selectedTab].content;var _step,_iterator=function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function F(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}(keys);try{for(_iterator.s();!(_step=_iterator.n()).done;){var key=_step.value;if(key.length>1&&selectedTab.startsWith(key))return tabs[key].content}}catch(err){_iterator.e(err)}finally{_iterator.f()}}var TabNav=function TabNav(_ref8){var selectedIndex=_ref8.selectedIndex,focusIndex=_ref8.focusIndex,tabs=_ref8.tabs,label=_ref8.label,onChange=_ref8.onChange,onTabChange=_ref8.onTabChange,onFocusChange=_ref8.onFocusChange,id=_ref8.id,routed=_ref8.routed,_ref8$keepQueryParams=_ref8.keepQueryParams,keepQueryParams=void 0!==_ref8$keepQueryParams&&_ref8$keepQueryParams,tabKeys=Object.keys(tabs),tablistRef=(0,react.useRef)();return(0,react.useEffect)((function(){var _tablistRef$current,_tablistRef$current$q;null===(_tablistRef$current=tablistRef.current)||void 0===_tablistRef$current||null===(_tablistRef$current$q=_tablistRef$current.querySelectorAll("[role=tab]")[focusIndex])||void 0===_tablistRef$current$q||_tablistRef$current$q.focus()}),[focusIndex,selectedIndex]),(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref9){var _ref9$location=_ref9.location,pathname=_ref9$location.pathname,search=_ref9$location.search,history=_ref9.history;selectedIndex=routed?pathname:selectedIndex;var isSelectedValid=tabKeys.includes(selectedIndex);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(StyledTablist,{tabIndex:-1,role:"tablist",ref:tablistRef,"data-test":"tablist","aria-label":label,onKeyUp:function onKeyUp(_ref10){var _selectedIndex,keyCode=_ref10.keyCode,totalTabs=tabKeys.length,foundIndex=tabKeys.indexOf(null===(_selectedIndex=selectedIndex)||void 0===_selectedIndex?void 0:_selectedIndex.toString()),currentFocusIndex=void 0!==focusIndex?focusIndex:void 0===selectedIndex||-1===foundIndex?0:foundIndex;39===keyCode&&onFocusChange((currentFocusIndex+1)%totalTabs),37===keyCode&&onFocusChange(((currentFocusIndex<1?totalTabs:currentFocusIndex)-1)%totalTabs)},children:Object.entries(tabs).map((function(_ref11,index){var _ref12=_slicedToArray(_ref11,2),key=_ref12[0],label=_ref12[1].label,selected=isSelectedValid?key===selectedIndex:key.length>1&&selectedIndex.startsWith(key),Button=selected?StyledSelectedButton:StyledButton,tabId=createId(id,key,routed);return(0,jsx_runtime.jsx)(StyledSpan,{"data-test":"tab-item",children:(0,jsx_runtime.jsx)(Button,{role:"tab","aria-selected":selected,id:tabId,tabIndex:void 0!==selectedIndex||index?selected?0:-1:0,onClick:function onClick(){if(onChange(key,index),onTabChange&&onTabChange({path:key}),routed&&!selected){var url=keepQueryParams?"".concat(key).concat(search):key;history.push(url)}},children:label})},tabId)}))}),(0,jsx_runtime.jsx)(StyledTabpanel,{role:"tabpanel",tabIndex:-1,"aria-labelledby":createId(id,selectedIndex,!0),"data-test":"tabpanel",children:getContent(tabs,tabKeys,selectedIndex)})]})}})};TabNav.displayName="TabNav";var tabPropType=prop_types_default().shape({label:prop_types_default().node.isRequired,content:prop_types_default().node});TabNav.propTypes={label:prop_types_default().string.isRequired,routed:prop_types_default().any,keepQueryParams:prop_types_default().bool,onTabChange:prop_types_default().func,tabs:prop_types_default().oneOfType([prop_types_default().arrayOf(tabPropType),prop_types_default().objectOf(tabPropType)]).isRequired};const components_TabNav=(0,multiinstance.ZP)({name:"TabNav",actionPattern:"TAB_NAV__",dispatchToProps:function dispatchToProps(dispatch){return{onChange:function onChange(selectedIndex,focusIndex){return dispatch({type:actions.CnO,selectedIndex,focusIndex})},onFocusChange:function onFocusChange(focusIndex){return dispatch({type:actions.AcS,focusIndex})}}},component:TabNav,reducer:function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,focusIndex=_ref.focusIndex,selectedIndex=_ref.selectedIndex;switch(type){case actions.AcS:return _objectSpread(_objectSpread({},state),{},{focusIndex});case actions.CnO:return{selectedIndex,focusIndex};default:return state}}})},"./src/client/components/Tag/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/react/index.js");var styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),_govuk_react_tag__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/tag/dist/govuk-react-tag.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["colour","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledTag=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)(_govuk_react_tag__WEBPACK_IMPORTED_MODULE_18__.Z)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n background-color: ",";\n color: ",";\n white-space: nowrap;\n"])),(function(props){return _client_utils_colours__WEBPACK_IMPORTED_MODULE_19__.$C[props.colour].background}),(function(props){return _client_utils_colours__WEBPACK_IMPORTED_MODULE_19__.$C[props.colour].colour})),Tag=function Tag(_ref){var colour=_ref.colour,children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledTag,_objectSpread(_objectSpread({colour},props),{},{children}))};Tag.displayName="Tag",Tag.propTypes={colour:prop_types__WEBPACK_IMPORTED_MODULE_22___default().oneOf(Object.keys(_client_utils_colours__WEBPACK_IMPORTED_MODULE_19__.$C)),children:prop_types__WEBPACK_IMPORTED_MODULE_22___default().node.isRequired},Tag.defaultProps={colour:"default"},Tag.__docgenInfo={description:"`Tag` is a implementation of the [Tag](https://design-system.service.gov.uk/components/tag/) component from the GovUK Design System.\n\nUse the tag component when it’s possible for something to have more than one status and it’s useful for the user to know about that status.\nFor example, you can use a tag to show whether an item in a [task list](https://design-system.service.gov.uk/patterns/task-list-pages) has been ‘completed’.\n\nIf no colour is specified the tag will default to a blue background and white text.",methods:[],displayName:"Tag",props:{colour:{defaultValue:{value:"'default'",computed:!1},description:"Dictates the `background-color` and `color`",type:{name:"enum",computed:!0,value:"Object.keys(TAG_COLOURS)"},required:!1},children:{description:"Text of tag",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Tag},"./src/client/components/Task/LoadingBox.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var _govuk_react_loading_box__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@govuk-react/loading-box/dist/govuk-react-loading-box.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_Effect__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/client/components/Effect.jsx"),___WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/components/Task/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["name","id","when","children","startOnRender"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledContentWrapper=styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP.div({position:"relative"}),StyledErrorOverlay=styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP.div({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",background:"rgba(255, 255, 255, 0.85)"});const __WEBPACK_DEFAULT_EXPORT__=function(_ref){var name=_ref.name,id=_ref.id,when=_ref.when,_children=_ref.children,startOnRender=_ref.startOnRender,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(___WEBPACK_IMPORTED_MODULE_19__.Z,{children:function children(t){var task=t(name,id);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsxs)(_govuk_react_loading_box__WEBPACK_IMPORTED_MODULE_17__.Z,{loading:task.progress||when,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(_Effect__WEBPACK_IMPORTED_MODULE_18__.Z,{dependencyList:[name,id,startOnRender],effect:function effect(){return startOnRender&&task.start(startOnRender)}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledContentWrapper,{children:task.error?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.Fragment,{children:[_children,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledErrorOverlay,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(___WEBPACK_IMPORTED_MODULE_19__.Z.Status,_objectSpread(_objectSpread({},props),{},{name,id}))})]}):_children})]})}})}},"./src/client/components/Task/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Task});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),govuk_react_esm=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),actions=__webpack_require__("./src/client/actions.js"),govuk_react_heading_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js")),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),FormActions=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var StyledRoot=styled_components_browser_esm.ZP.div(function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({color:colours.cK,background:"white",wordWrap:"break-word",padding:govuk_react_constants_esm.Kh.mobile,border:"".concat(govuk_react_constants_esm.IA," solid ").concat(colours.h),"&:focus":{outline:"".concat(govuk_react_constants_esm.lT," solid ").concat(colours.tL),outlineOffset:"0"}},govuk_react_constants_esm.qk.LARGESCREEN,{padding:govuk_react_constants_esm.Kh.tablet,border:"".concat(govuk_react_constants_esm.YF," solid ").concat(colours.h)}),govuk_react_lib_esm.W0.withWhiteSpace({marginBottom:6})),StyledSecondaryButton=(0,styled_components_browser_esm.ZP)(SecondaryButton.Z)({marginBottom:0}),Err=function Err(_ref){var errorMessage=_ref.errorMessage,retry=_ref.retry,dismiss=_ref.dismiss,noun=_ref.noun,_ref$dismissable=_ref.dismissable,dismissable=void 0===_ref$dismissable||_ref$dismissable;return(0,jsx_runtime.jsxs)(StyledRoot,{"data-test":"error-dialog",children:[(0,jsx_runtime.jsxs)(govuk_react_heading_esm.H2,{size:"MEDIUM",children:["Could not load ",noun]}),(0,lodash.isString)(errorMessage)&&(0,jsx_runtime.jsxs)("p",{children:["Error: ",errorMessage]}),(0,jsx_runtime.jsxs)(FormActions.Z,{children:[(0,jsx_runtime.jsx)(StyledSecondaryButton,{onClick:retry,children:"Retry"}),dismissable&&(0,jsx_runtime.jsx)(StyledSecondaryButton,{onClick:dismiss,children:"Dismiss"})]})]})};Err.displayName="Err",Err.propTypes={noun:prop_types_default().string.isRequired,errorMessage:prop_types_default().string.isRequired,retry:prop_types_default().func.isRequired,clear:prop_types_default().func.isRequired},Err.__docgenInfo={description:"",methods:[],displayName:"Err",props:{dismissable:{defaultValue:{value:"true",computed:!1},required:!1},noun:{description:"",type:{name:"string"},required:!0},errorMessage:{description:"",type:{name:"string"},required:!0},retry:{description:"",type:{name:"func"},required:!0},clear:{description:"",type:{name:"func"},required:!0}}};const Error=Err;var govuk_react_loading_box_esm=__webpack_require__("./node_modules/@govuk-react/loading-box/dist/govuk-react-loading-box.esm.js"),ProgressIndicator_StyledRoot=styled_components_browser_esm.ZP.div({textAlign:"center"}),StyledLoadingBox=(0,styled_components_browser_esm.ZP)(govuk_react_loading_box_esm.Z)({height:govuk_react_constants_esm.N_.SCALE_5,marginTop:govuk_react_constants_esm.N_.SCALE_5,marginBottom:govuk_react_constants_esm.N_.SCALE_3}),ProgressIndicator=function ProgressIndicator(_ref){var message=_ref.message;return(0,jsx_runtime.jsxs)(ProgressIndicator_StyledRoot,{children:[(0,jsx_runtime.jsx)(StyledLoadingBox,{loading:!0}),message&&(0,jsx_runtime.jsx)("p",{children:message})]})};ProgressIndicator.displayName="ProgressIndicator",ProgressIndicator.__docgenInfo={description:"",methods:[],displayName:"ProgressIndicator"};const components_ProgressIndicator=ProgressIndicator;var AccessDenied=__webpack_require__("./src/client/components/AccessDenied/index.jsx");function Task_typeof(o){return Task_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Task_typeof(o)}var _excluded=["start","cancel","dismissError","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var Task_StyledLoadingBox=(0,styled_components_browser_esm.ZP)(govuk_react_esm.pH)({paddingBottom:0}),nameIdPropTypes={name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired},startOnRenderPropTypes={payload:prop_types_default().any,onSuccessDispatch:prop_types_default().string},Task=(0,es.connect)((function(state){return state.tasks}),(function(dispatch){return{start:function start(name,id,_ref){var payload=_ref.payload,onSuccessDispatch=_ref.onSuccessDispatch;return dispatch({type:actions.TpS,payload,id,name,onSuccessDispatch})},cancel:function cancel(name,id){return dispatch({type:actions.Zo7,id,name})},dismissError:function dismissError(name,id){return dispatch({type:actions.zIU,id,name})}}}))((function Task(_ref2){var _start=_ref2.start,_cancel=_ref2.cancel,_dismissError=_ref2.dismissError,children=_ref2.children,props=_objectWithoutProperties(_ref2,_excluded);return children((function(name,id){var taskState=(0,lodash.get)(props,[name,id],{});return _objectSpread(_objectSpread({},taskState),{},{progress:"progress"===taskState.status,error:"error"===taskState.status,start:function start(options){return _start(name,id,options)},cancel:function cancel(){return _cancel(name,id)},retry:function retry(){return _start(name,id,taskState)},dismissError:function dismissError(){return _dismissError(name,id)}})}))}));Task.propTypes={children:prop_types_default().func.isRequired},Task.StartOnRender=(0,es.connect)((function(state,_ref3){var name=_ref3.name,id=_ref3.id;return(0,lodash.get)(state,["tasks",name,id],{})}),(function(dispatch,_ref4){var id=_ref4.id,name=_ref4.name;return{start:function start(options){return dispatch(_objectSpread(_objectSpread({},options),{},{type:actions.TpS,id,name}))}}}))((function(_ref5){var start=_ref5.start,name=_ref5.name,id=_ref5.id,payload=_ref5.payload,onSuccessDispatch=_ref5.onSuccessDispatch,status=_ref5.status;return(0,react.useEffect)((function(){status||start({payload,onSuccessDispatch})}),[name,id,JSON.stringify(payload),onSuccessDispatch]),null})),Task.StartOnRender.propTypes=_objectSpread(_objectSpread({},nameIdPropTypes),startOnRenderPropTypes),Task.Status=function(_ref6){var name=_ref6.name,id=_ref6.id,_ref6$noun=_ref6.noun,noun=void 0===_ref6$noun?name:_ref6$noun,startOnRender=_ref6.startOnRender,progressMessage=_ref6.progressMessage,_ref6$renderError=_ref6.renderError,renderError=void 0===_ref6$renderError?Error:_ref6$renderError,_ref6$renderProgress=_ref6.renderProgress,renderProgress=void 0===_ref6$renderProgress?components_ProgressIndicator:_ref6$renderProgress,_ref6$progressOverlay=_ref6.progressOverlay,progressOverlay=void 0!==_ref6$progressOverlay&&_ref6$progressOverlay,_ref6$dismissable=_ref6.dismissable,dismissable=void 0===_ref6$dismissable||_ref6$dismissable,_ref6$children=_ref6.children,_children=void 0===_ref6$children?function(){return null}:_ref6$children;return(0,jsx_runtime.jsx)(Task,{children:function children(getTask){var _getTask=getTask(name,id),start=_getTask.start,status=_getTask.status,progress=_getTask.progress,error=_getTask.error,payload=_getTask.payload,errorMessage=_getTask.errorMessage,onSuccessDispatch=_getTask.onSuccessDispatch,dismissError=_getTask.dismissError;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[!!startOnRender&&(0,jsx_runtime.jsx)(Task.StartOnRender,_objectSpread(_objectSpread({},startOnRender),{},{name,id})),!progressOverlay&&progress&&renderProgress({message:progressMessage}),error&&("You do not have permission to perform this action."===errorMessage?(0,jsx_runtime.jsx)(AccessDenied.Z,{}):renderError({noun,errorMessage,retry:function retry(){return start({payload,onSuccessDispatch})},dismiss:dismissError,dismissable})),(0,jsx_runtime.jsx)(Task_StyledLoadingBox,{loading:progress&&progressOverlay,children:(!status||progressOverlay)&&_children()})]})}})},Task.Status.propTypes=_objectSpread(_objectSpread({},nameIdPropTypes),{},{noun:prop_types_default().string,progressMessage:prop_types_default().string,progressOverlay:prop_types_default().bool,startOnRender:prop_types_default().shape(startOnRenderPropTypes),renderProgress:prop_types_default().elementType,renderError:prop_types_default().elementType});const components_Task=Task},"./src/client/components/Task/utils.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q8:()=>apiProxyAxios});__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js");var axios__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/axios/index.js"),axios__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_23__),lodash__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/lodash/lodash.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["url"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/lodash/lodash.js"),_utils_colours__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["stages","currentStage"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var TimelineContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)("div")(_defineProperty({backgroundColor:function backgroundColor(_ref){var theme=_ref.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"container.backgroundColor",_utils_colours__WEBPACK_IMPORTED_MODULE_19__.nx)},padding:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_2},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.qk.LARGESCREEN,{padding:function padding(_ref2){var theme=_ref2.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"container.largeScreen.padding",_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_5)}})),StyledOl=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)("ol")(_defineProperty({fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.Kt.SIZE_14,listStyleType:"none",boxSizing:"border-box",padding:"0 0 0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_3)},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.qk.LARGESCREEN,{padding:"0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_3),margin:0,display:"table",width:"100%"})),StyledLi=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)("li")(_defineProperty({borderLeft:"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ),padding:"0 0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4," 0"),position:"relative","&:last-child":{padding:0,"&::before":{top:"2px"}},"&::before":{position:"absolute",display:"block",content:'""',borderRadius:"50%",left:function left(_ref3){var theme=_ref3.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.left","-12px")},width:function width(_ref4){var theme=_ref4.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.width",_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4)},height:function height(_ref5){var theme=_ref5.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.height",_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4)},backgroundColor:function backgroundColor(_ref6){var isStageComplete=_ref6.isStageComplete;return"".concat(isStageComplete?_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ:_utils_colours__WEBPACK_IMPORTED_MODULE_19__.Cj)},border:function border(_ref7){var theme=_ref7.theme,isStageComplete=_ref7.isStageComplete,border=(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.border");return border?isStageComplete?"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ):border:"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ)}},span:{display:function display(_ref8){var theme=_ref8.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.span.display","block")},padding:"2px 0 4px ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4)}},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.qk.LARGESCREEN,{display:"table-cell",width:"25%",padding:function padding(_ref9){var theme=_ref9.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.padding","".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4," 0 0 0"))},borderTop:function borderTop(_ref10){var theme=_ref10.theme,isLinkActive=_ref10.isLinkActive,borderTop=(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.borderTop");return borderTop?isLinkActive?"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ):borderTop:"3px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ)},borderLeft:"none","&:last-child":{padding:"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4," 0 0 0"),borderColor:"transparent","&::before":{top:function top(_ref11){var theme=_ref11.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.before.top","-12px")}}},"&::before":{top:function top(_ref12){var theme=_ref12.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.before.top","-12px")},left:function left(_ref13){var theme=_ref13.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.before.left","-12px")}},span:{padding:0,position:"absolute",width:"100px",textAlign:"center",left:"-50px"}})),Timeline=function Timeline(_ref14){var stages=_ref14.stages,_ref14$currentStage=_ref14.currentStage,currentStage=void 0===_ref14$currentStage?"":_ref14$currentStage,props=_objectWithoutProperties(_ref14,_excluded),stageIndex=stages.indexOf(currentStage);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(TimelineContainer,_objectSpread(_objectSpread({"data-test":"timeline"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledOl,{children:stages.map((function(stage,i){var isStageComplete=i<=stageIndex,isLinkActive=i{"use strict";__webpack_require__.d(__webpack_exports__,{BQ:()=>ButtonContent,CO:()=>ToggleButton,P5:()=>ToggleHeader,QJ:()=>MultiInstanceToggleSection,UI:()=>ToggleContent,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,l:()=>BadgeContainer});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_24__),styled_components__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/utils/colours.js"),_actions__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/actions.js"),_utils_multiinstance__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/multiinstance.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_excluded=["label","badge","open","onOpen","isOpen","colour","children","justifyHeaderContent"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ToggleContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral([""]))),ToggleHeader=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n position: relative;\n ","\n"])),(function(_ref){return _ref.justifyHeaderContent?"justify-content: space-between;":"align-items: center;"})),ToggleButton=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("button")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n background: transparent;\n border: none;\n font-size: ",";\n font-family: inherit;\n color: ",";\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n &:focus {\n outline: none;\n text-decoration: none;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.Kt.SIZE_19,_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.Ej),ToggleButtonIconStyle=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("span")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n margin-right: ",";\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_2,(function(_ref2){var isOpen=_ref2.isOpen;return"\n transform: ".concat(isOpen?"rotate(0deg)":"rotate(180deg)",";\n ")})),ToggleButtonIcon=function ToggleButtonIcon(_ref3){var _ref3$colour=_ref3.colour,colour=void 0===_ref3$colour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.E5:_ref3$colour,isOpen=_ref3.isOpen;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ToggleButtonIconStyle,{isOpen,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)("svg",{width:"18px",height:"18px",version:"1.1",viewBox:"210 275 600 425",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",fill:colour,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)("path",{d:"m798.16 609.84l-256-256c-16.683-16.683-43.691-16.683-60.331 0l-256 256c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0l225.84-225.84 225.84 225.84c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331z"})})})};ToggleButtonIcon.displayName="ToggleButtonIcon";var ButtonContent=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("span")(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))),BadgeContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("span")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n margin-left: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_1),ToggleContent=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n ","\n"])),(function(_ref4){var isOpen=_ref4.isOpen;return"\n display: ".concat(isOpen?"block":"none",";\n padding: 0;\n ")})),BaseToggleSection=function BaseToggleSection(_ref5){var label=_ref5.label,_ref5$badge=_ref5.badge,badge=void 0===_ref5$badge?null:_ref5$badge,open=_ref5.open,onOpen=_ref5.onOpen,_ref5$isOpen=_ref5.isOpen,isOpen=void 0!==_ref5$isOpen&&_ref5$isOpen,_ref5$colour=_ref5.colour,colour=void 0===_ref5$colour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.E5:_ref5$colour,children=_ref5.children,_ref5$justifyHeaderCo=_ref5.justifyHeaderContent,justifyHeaderContent=void 0!==_ref5$justifyHeaderCo&&_ref5$justifyHeaderCo,props=_objectWithoutProperties(_ref5,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(ToggleContainer,_objectSpread(_objectSpread({},props),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(ToggleHeader,{justifyHeaderContent,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(ToggleButton,{id:props.id&&"".concat(props.id,"-toggle-button-").concat(isOpen?"close":"open"),"data-test":"toggle-section-button",onClick:function onClick(){open(!isOpen),onOpen&&onOpen(!isOpen)},isOpen,"aria-expanded":isOpen,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ToggleButtonIcon,{onClick:function onClick(){open(!isOpen),onOpen&&onOpen(!isOpen)},isOpen,colour,alt:"Toggle details"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ButtonContent,{"data-test":"toggle-section-button-content",children:label})]}),badge&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(BadgeContainer,{children:badge})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ToggleContent,{isOpen,children})]}))};BaseToggleSection.displayName="BaseToggleSection",BaseToggleSection.propTypes={id:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string,badge:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,open:prop_types__WEBPACK_IMPORTED_MODULE_24___default().func,onOpen:prop_types__WEBPACK_IMPORTED_MODULE_24___default().func,isOpen:prop_types__WEBPACK_IMPORTED_MODULE_24___default().bool,children:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,major:prop_types__WEBPACK_IMPORTED_MODULE_24___default().bool,justifyHeaderContent:prop_types__WEBPACK_IMPORTED_MODULE_24___default().bool,colour:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string};var MultiInstanceToggleSection=(0,_utils_multiinstance__WEBPACK_IMPORTED_MODULE_21__.ZP)({name:"ToggleSection",actionPattern:"TOGGLE_SECTION__",dispatchToProps:function dispatchToProps(dispatch){return{open:function open(isOpen){return dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_25__.pyx,isOpen})}}},component:BaseToggleSection,reducer:function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref6=arguments.length>1?arguments[1]:void 0,type=_ref6.type,isOpen=_ref6.isOpen;return type===_actions__WEBPACK_IMPORTED_MODULE_25__.pyx?_objectSpread(_objectSpread({},state),{},{isOpen}):state}});const __WEBPACK_DEFAULT_EXPORT__=MultiInstanceToggleSection;ToggleButtonIcon.__docgenInfo={description:"",methods:[],displayName:"ToggleButtonIcon",props:{colour:{defaultValue:{value:"BLACK",computed:!0},required:!1}}}},"./src/client/components/ToggleSection/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{kU:()=>ToggleSection_DashboardToggleSection,er:()=>ToggleSection_FilterToggleSection,b3:()=>ToggleSection_NoHighlightToggleSection,bg:()=>components_ToggleSection_ToggleSection});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var _templateObject,styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),BaseToggleSection=__webpack_require__("./src/client/components/ToggleSection/BaseToggleSection.jsx");const ToggleSection_DashboardToggleSection=(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n\n "," {\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n }\n\n "," {\n font-weight: ",";\n margin-left: ",";\n }\n\n "," {\n text-decoration: underline;\n white-space: nowrap;\n }\n\n "," {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n margin-right: ",";\n }\n\n "," {\n padding: 0 ",";\n margin-top: ",";\n margin-bottom: ",";\n }\n"])),(function(_ref){var major=_ref.major;return"\n border: solid 2px ".concat(colours.nx,";\n border-top-color: ").concat(major?colours.hM:colours.Ej,";\n ")}),BaseToggleSection.P5,colours.nx,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,BaseToggleSection.CO,govuk_react_constants_esm.Xw.regular,govuk_react_constants_esm.N_.SCALE_2,BaseToggleSection.BQ,BaseToggleSection.l,govuk_react_constants_esm.N_.SCALE_3,BaseToggleSection.UI,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_3);var ToggleSection_templateObject;__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var ToggleSection_ToggleSection=(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(ToggleSection_templateObject||(ToggleSection_templateObject=function ToggleSection_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: ",";\n\n "," {\n padding: "," 0 ",";\n\n &:focus "," {\n color: ",";\n background-color: ",";\n box-shadow:\n 0 -2px ",",\n 0 4px ",";\n }\n }\n\n "," {\n margin: 0;\n padding: "," 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,BaseToggleSection.CO,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_1,BaseToggleSection.BQ,colours.E5,colours.$R,colours.$R,colours.E5,BaseToggleSection.UI,govuk_react_constants_esm.N_.SCALE_2);const components_ToggleSection_ToggleSection=ToggleSection_ToggleSection;var _styled;function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}const ToggleSection_FilterToggleSection=(0,styled_components_browser_esm.ZP)(ToggleSection_ToggleSection)((_defineProperty(_styled={borderBottom:"solid 1px ".concat(colours.FU),paddingBottom:govuk_react_constants_esm.N_.SCALE_2},BaseToggleSection.CO,{textAlign:"left"}),_defineProperty(_styled,BaseToggleSection.UI,{"> *:last-child":{marginBottom:0},"> *:last-child div:last-child":{marginBottom:0}}),_styled));var NoHighlightToggleSection_templateObject;const ToggleSection_NoHighlightToggleSection=(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(NoHighlightToggleSection_templateObject||(NoHighlightToggleSection_templateObject=function NoHighlightToggleSection_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n "," {\n padding: 0;\n }\n\n "," {\n text-decoration: underline;\n }\n\n "," {\n padding: "," 0;\n }\n"])),BaseToggleSection.CO,BaseToggleSection.BQ,BaseToggleSection.UI,govuk_react_constants_esm.N_.SCALE_2);var RemindersToggleSection_templateObject;__webpack_require__("./node_modules/core-js/modules/es.string.bold.js");(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(RemindersToggleSection_templateObject||(RemindersToggleSection_templateObject=function RemindersToggleSection_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border-top: 1px solid ",";\n ","\n\n "," {\n text-align: left;\n padding-top: ",";\n padding-bottom: ",";\n }\n\n "," {\n font-weight: ",";\n }\n"])),colours.FU,(function(_ref){return _ref.borderBottom&&"border-bottom: 1px solid ".concat(colours.FU,";")}),BaseToggleSection.CO,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,BaseToggleSection.BQ,govuk_react_constants_esm.Xw.bold)},"./src/client/components/Typeahead/Typeahead.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Typeahead_Typeahead});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _templateObject,react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_label_esm=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),actions=__webpack_require__("./src/client/actions.js"),Task=__webpack_require__("./src/client/components/Task/index.jsx"),react_string_replace=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/react-string-replace/index.js")),react_string_replace_default=__webpack_require__.n(react_string_replace),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledSpan=(0,styled_components_browser_esm.ZP)("span")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-weight: ",";\n"])),govuk_react_constants_esm.Xw.bold),Highlighter=function Highlighter(_ref){var _ref$optionLabel=_ref.optionLabel,optionLabel=void 0===_ref$optionLabel?null:_ref$optionLabel,searchStr=_ref.searchStr;return optionLabel&&react_string_replace_default()(optionLabel,searchStr,(function(matchedTxt,i){return(0,jsx_runtime.jsx)(StyledSpan,{children:matchedTxt},i)}))};Highlighter.propTypes={optionLabel:prop_types_default().string.isRequired,searchStr:prop_types_default().string.isRequired};const Typeahead_Highlighter=Highlighter;var AssistiveText=function AssistiveText(_ref){var name=_ref.name;return(0,jsx_runtime.jsx)("span",{id:"autocomplete-".concat(name,"-assistiveHint"),style:{display:"none"},children:"When autocomplete results are available use up and down arrows to review and enter to select."})};AssistiveText.displayName="AssistiveText",AssistiveText.__docgenInfo={description:"",methods:[],displayName:"AssistiveText"};const Typeahead_AssistiveText=AssistiveText;var ChipList=(0,styled_components_browser_esm.ZP)("ul")({listStyleType:"none",margin:"".concat(govuk_react_constants_esm.N_.SCALE_1," 0"),padding:0}),Chip=(0,styled_components_browser_esm.ZP)("li")({display:"inline-block",margin:"".concat(govuk_react_constants_esm.N_.SCALE_1," 0")}),ChipButton=(0,styled_components_browser_esm.ZP)("button")(govuk_react_constants_esm.jw,{backgroundColor:colours.nx,border:"none",borderRadius:3,color:colours.cK,fontSize:"0.75em",fontWeight:"bold",marginBottom:0,marginRight:6,padding:"".concat(govuk_react_constants_esm.N_.SCALE_1," 1.75em ").concat(govuk_react_constants_esm.N_.SCALE_1," ").concat(govuk_react_constants_esm.N_.SCALE_1),position:"relative",cursor:"pointer","&::before, &::after":{borderRight:"1px solid ".concat(colours.cK),content:'""',height:"1em",right:"0.75em",position:"absolute",top:"50%",width:0},"&::before":{transform:"translate(0, -50%) rotate(45deg)"},"&::after":{transform:"translate(0, -50%) rotate(-45deg)"}}),SelectedChips=function SelectedChips(_ref){var name=_ref.name,selectedOptions=_ref.selectedOptions,onOptionRemove=_ref.onOptionRemove;return(0,jsx_runtime.jsxs)(ChipList,{id:"".concat(name,"-selected"),"data-test":"typeahead-chip-list",children:[(0,jsx_runtime.jsx)("span",{id:"".concat(name,"-remove"),style:{display:"none"},children:"remove"}),selectedOptions.map((function(option){return(0,jsx_runtime.jsx)(Chip,{"data-test":"typeahead-chip",children:(0,jsx_runtime.jsx)(ChipButton,{type:"button","aria-describedby":"".concat(name,"-remove"),onClick:function onClick(){onOptionRemove(option)},children:option.chipLabel||option.label})},option.value)}))]})};SelectedChips.displayName="SelectedChips",SelectedChips.__docgenInfo={description:"",methods:[],displayName:"SelectedChips"};const Typeahead_SelectedChips=SelectedChips;var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),keys_down="ArrowDown",keys_end="End",keys_enter="Enter",keys_escape="Escape",keys_home="Home",keys_left="ArrowLeft",keys_right="ArrowRight",keys_up="ArrowUp",menuActions_close="close",menuActions_closeSelect="closeSelect",menuActions_first="first",menuActions_last="last",menuActions_next="next",menuActions_open="open",menuActions_previous="previous",getFilteredOptions=function getFilteredOptions(_ref){var input=_ref.input,options=_ref.options;return(input?options.filter((function(option){return option.label.toLowerCase().includes(input.toLowerCase())})):options)||[]},valueEqual=function valueEqual(item1,item2){return item1.value==item2.value},getNewSelectedOptions=function getNewSelectedOptions(_ref2){var selectedOptions=_ref2.selectedOptions,option=_ref2.option;return _ref2.isMulti?(0,lodash.xorWith)(selectedOptions,[option],valueEqual):[option]},valueAsArray=function valueAsArray(value){return value?Array.isArray(value)?value:[value]:[]};function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function Typeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Typeahead_objectSpread(e){for(var r=1;r-1,"aria-setsize":filteredOptions.length,"aria-posinset":index,onClick:function onClick(){inputRef.current&&inputRef.current.select(),onOptionToggle(option),onChange(getNewSelectedOptions({selectedOptions,isMulti,option})),closeOnSelect&&onMenuClose()},onMouseMove:function onMouseMove(){onActiveChange(index)},onMouseDown:function onMouseDown(){onOptionMouseDown(index)},"data-test":"typeahead-menu-option",children:(0,jsx_runtime.jsx)("span",{children:(0,jsx_runtime.jsx)(Typeahead_Highlighter,{optionLabel:option.label,searchStr:input})})},option.value)})),!filteredOptions.length&&(0,jsx_runtime.jsx)(NoOptionsMessage,{"data-test":"typeahead-no-options",children:noOptionsMessage})]})}})})]}),(0,jsx_runtime.jsx)(Typeahead_AssistiveText,{name})]})};Typeahead.displayName="Typeahead";var keyPairPropType=prop_types_default().shape({label:prop_types_default().string,value:prop_types_default().string});Typeahead.propTypes={id:prop_types_default().string.isRequired,name:prop_types_default().string,className:prop_types_default().string,label:prop_types_default().string,error:prop_types_default().string,closeMenuOnSelect:prop_types_default().bool,isMulti:prop_types_default().bool,noOptionsMessage:prop_types_default().string,defaultValue:prop_types_default().oneOfType([keyPairPropType,prop_types_default().arrayOf(keyPairPropType)]),value:prop_types_default().oneOfType([keyPairPropType,prop_types_default().arrayOf(keyPairPropType)]),menuOpen:prop_types_default().bool,loadOptions:prop_types_default().func,onChange:prop_types_default().func,options:prop_types_default().arrayOf(keyPairPropType),input:prop_types_default().string,selectedOptions:prop_types_default().arrayOf(keyPairPropType),activeIndex:prop_types_default().number,focusIndex:prop_types_default().number,onInitialise:prop_types_default().func,onBlur:prop_types_default().func,onActiveChange:prop_types_default().func,onInput:prop_types_default().func,onOptionMouseDown:prop_types_default().func,onOptionToggle:prop_types_default().func,onOptionRemove:prop_types_default().func,onOptionsClear:prop_types_default().func,onMenuClose:prop_types_default().func,onMenuOpen:prop_types_default().func};const Typeahead_Typeahead=(0,multiinstance.ZP)({name:"Typeahead",actionPattern:"TYPEAHEAD__",dispatchToProps:function dispatchToProps(dispatch){return{onInitialise:function onInitialise(_ref7){var isMulti=_ref7.isMulti,value=_ref7.value;dispatch({type:actions.Gh5,isMulti,value})},onBlur:function onBlur(){dispatch({type:actions.kQc})},onActiveChange:function onActiveChange(activeIndex){dispatch({type:actions.aAd,activeIndex})},onInput:function onInput(event){dispatch({type:actions.BWt,input:event.target.value})},onMenuClose:function onMenuClose(){dispatch({type:actions.Kfu})},onMenuOpen:function onMenuOpen(){dispatch({type:actions.jNH})},onOptionMouseDown:function onOptionMouseDown(focusIndex){dispatch({type:actions.NTO,focusIndex})},onOptionToggle:function onOptionToggle(option){dispatch({type:actions.TZF,option})},onOptionRemove:function onOptionRemove(option){dispatch({type:actions._zA,option})},onOptionsClear:function onOptionsClear(){dispatch({type:actions.ukg})}}},component:Typeahead,reducer:function(){var _state$selectedOption,_valueAsArray$,state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,value=_ref.value,input=_ref.input,isMulti=_ref.isMulti,option=_ref.option,activeIndex=_ref.activeIndex,focusIndex=_ref.focusIndex,result=_ref.result,selectedValue=!state.isMulti&&(null===(_state$selectedOption=state.selectedOptions[0])||void 0===_state$selectedOption?void 0:_state$selectedOption.label),filteredOptions=getFilteredOptions({options:state.options,input:state.input});switch(type){case actions.Gh5:return _objectSpread(_objectSpread({},state),{},{isMulti,selectedOptions:valueAsArray(value),input:isMulti?state.input:(null===(_valueAsArray$=valueAsArray(value)[0])||void 0===_valueAsArray$?void 0:_valueAsArray$.label)||""});case actions.GRb:var newOptions=getFilteredOptions({options:result,input:state.input});return _objectSpread(_objectSpread({},state),{},{options:result||[],activeIndex:newOptions.indexOf(filteredOptions[state.activeIndex]),focusIndex:newOptions.indexOf(filteredOptions[state.focusIndex])});case actions.kQc:return _objectSpread(_objectSpread({},state),{},{menuOpen:!!state.ignoreBlur&&state.menuOpen,focusIndex:-1,input:state.ignoreBlur?state.input:state.input&&selectedValue||"",ignoreBlur:!1});case actions.BWt:var newInputOptions=getFilteredOptions({options:state.options,input});return _objectSpread(_objectSpread({},state),{},{input,activeIndex:newInputOptions.indexOf(filteredOptions[state.activeIndex]),focusIndex:newInputOptions.indexOf(filteredOptions[state.focusIndex]),menuOpen:!0});case actions.aAd:return _objectSpread(_objectSpread({},state),{},{activeIndex});case actions.Kfu:return _objectSpread(_objectSpread({},state),{},{input:state.isMulti?"":state.input,menuOpen:!1});case actions.jNH:var selectedIndex=state.options.map((function(_ref2){return _ref2.label})).indexOf(selectedValue);return _objectSpread(_objectSpread({},state),{},{menuOpen:!0,activeIndex:selectedIndex});case actions.NTO:return _objectSpread(_objectSpread({},state),{},{ignoreBlur:!0,focusIndex});case actions.TZF:var newInput=state.isMulti?state.input:option.label,toggledIndex=getFilteredOptions({options:state.options,input:state.isMulti&&newInput}).indexOf(option);return _objectSpread(_objectSpread({},state),{},{selectedOptions:state.isMulti?(0,lodash.xorWith)(state.selectedOptions,[option],valueEqual):[option],input:newInput,activeIndex:toggledIndex,focusIndex:toggledIndex});case actions._zA:return _objectSpread(_objectSpread({},state),{},{selectedOptions:state.selectedOptions.filter((function(_ref3){return _ref3.value!==option.value}))});case actions.ukg:return _objectSpread(_objectSpread({},state),{},{selectedOptions:[]});default:return state}}})},"./src/client/components/Typeahead/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var _Typeahead__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/Typeahead/Typeahead.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["id","name"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var Typeahead=function Typeahead(_ref){var id=_ref.id,name=_ref.name,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_Typeahead__WEBPACK_IMPORTED_MODULE_17__.Z,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>TASK_GET_TYPEAHEAD_OPTIONS});var TASK_GET_TYPEAHEAD_OPTIONS="TASK_GET_TYPEAHEAD_OPTIONS"},"./src/client/components/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ct:()=>Badge.Z,ZP:()=>ButtonLink.Z,Af:()=>Chip.Z,X8:()=>CollectionHeader.Z,ZQ:()=>CollectionHeaderRow.Z,j8:()=>CollectionItem.Z,CI:()=>CollectionList_CollectionSort,S3:()=>components_ContactLocalHeader,k1:()=>elements_FieldAddress,YU:()=>FieldCheckboxes.Z,_s:()=>FieldInput.Z,k2:()=>FieldRadios.Z,E9:()=>elements_FieldTextarea,LZ:()=>components_FilterReset,iN:()=>FormActions.Z,lt:()=>Layout_FormLayout,xk:()=>LocalHeader.Z,$8:()=>LocalNav,Zj:()=>LocalNavLink,or:()=>Main.Z,ke:()=>NewWindowLink.Z,tl:()=>components_Pagination.Z,yL:()=>ReadMore.Z,MP:()=>components_RoutedDownloadDataHeader,ci:()=>components_RoutedFilterChips,HF:()=>SummaryTable.Z,TY:()=>Timeline.Z});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),axios=__webpack_require__("./node_modules/axios/index.js"),axios_default=__webpack_require__.n(axios),styled_components_browser_esm=(__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js")),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lodash_default=__webpack_require__.n(lodash),mapPeople=function mapPeople(activity,personType,mapper){var attributedTo=activity.object.attributedTo;return(0,lodash.map)((0,lodash.filter)(attributedTo,(function(_ref){var type=_ref.type;return(0,lodash.includes)(type,personType)})),mapper)},getContacts=function getContacts(activity){return mapPeople(activity,"dit:Contact",(function(_ref2){var id=_ref2.id,url=_ref2.url,name=_ref2.name,jobTitle=_ref2["dit:jobTitle"],registrationStatus=_ref2.registrationStatus;return(0,lodash.pickBy)({id,url,name,jobTitle,type:"Contact",registrationStatus})}))};const CardUtils_canRenderByTypes=function canRenderByTypes(activity,types){var activityTypes=(0,lodash.get)(activity,"object.type");return(0,lodash.some)(types,(function(type){return(0,lodash.includes)(activityTypes,type)}))},CardUtils_getAdvisers=function getAdvisers(activity){return mapPeople(activity,"dit:Adviser",(function(_ref5){var id=_ref5.id,name=_ref5.name,emailAddress=_ref5["dit:emailAddress"],team=_ref5["dit:team"];return(0,lodash.pickBy)({id,name,emailAddress,team:(0,lodash.get)(team,"name"),type:"Adviser"})}))},CardUtils_getContacts=getContacts,CardUtils_getAdviser=function getAdviser(activity){var adviser={id:(0,lodash.get)(activity,"actor.id"),name:(0,lodash.get)(activity,"actor.name"),emailAddress:(0,lodash.get)(activity,"actor.dit:emailAddress")};return adviser.name&&adviser.emailAddress?adviser:null},CardUtils_transform=function transform(activity){return{url:(0,lodash.get)(activity,"object.url"),subject:(0,lodash.get)(activity,"object.dit:subject"),service:(0,lodash.get)(activity,"object.dit:service.name"),startTime:(0,lodash.get)(activity,"object.startTime")}},CardUtils_getContactsGroupedByRegistrationStatus=function getContactsGroupedByRegistrationStatus(activity){return getContacts(activity).filter((function(a){return a.registrationStatus})).reduce((function(r,a){return r[a.registrationStatus]?r[a.registrationStatus].push(a):r[a.registrationStatus]=[a],r}),{})},CardUtils_getStatusByLatest=function getStatusByLatest(contactsList){var status;return contactsList.WaitingList&&(status="Waiting List"),contactsList.Cancelled&&(status="Cancelled"),contactsList.Registered&&(status="Registered"),contactsList.Attended&&(status="Attended"),status};var _templateObject,number_utils=__webpack_require__("./src/client/utils/number-utils.js"),constants=__webpack_require__("./src/client/components/ActivityFeed/constants.js"),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledCardWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border-bottom: 1px solid ",";\n padding: "," 0;\n"])),colours.FU,govuk_react_constants_esm.N_.SCALE_3),ActivityCardWrapper=function ActivityCardWrapper(_ref){var children=_ref.children,_ref$dataTest=_ref.dataTest,dataTest=void 0===_ref$dataTest?"activity-card-wrapper":_ref$dataTest;return(0,jsx_runtime.jsx)(StyledCardWrapper,{"data-test":dataTest,children})};ActivityCardWrapper.displayName="ActivityCardWrapper",ActivityCardWrapper.propTypes={dataTest:prop_types_default().string,children:prop_types_default().node.isRequired},ActivityCardWrapper.__docgenInfo={description:"",methods:[],displayName:"ActivityCardWrapper",props:{dataTest:{defaultValue:{value:"'activity-card-wrapper'",computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const card_ActivityCardWrapper=ActivityCardWrapper;__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");var Tag=__webpack_require__("./src/client/components/Tag/index.jsx");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r a:link,\n a:visited,\n a:hover,\n a:active {\n text-decoration: none;\n color: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_20,govuk_react_constants_esm.Xw.bold,govuk_react_constants_esm.Kt.SIZE_24,(function(_ref){var margin=_ref.margin;return"".concat(margin.top,"px")}),(function(_ref2){var margin=_ref2.margin;return"".concat(margin.bottom,"px")}),colours.Ej),ActivityCardSubject=function ActivityCardSubject(_ref3){var children=_ref3.children,_ref3$dataTest=_ref3.dataTest,dataTest=void 0===_ref3$dataTest?"activity-card-subject":_ref3$dataTest,_ref3$margin=_ref3.margin,margin=void 0===_ref3$margin?{bottom:10}:_ref3$margin;return(0,jsx_runtime.jsx)(StyledActivitySubject,{"data-test":dataTest,margin,children})};ActivityCardSubject.displayName="ActivityCardSubject",ActivityCardSubject.propTypes={children:prop_types_default().node.isRequired,dataTest:prop_types_default().string,margin:prop_types_default().shape({top:prop_types_default().number.isRequired,bottom:prop_types_default().number.isRequired})},ActivityCardSubject.defaultProps={isOverview:!1},ActivityCardSubject.__docgenInfo={description:"",methods:[],displayName:"ActivityCardSubject",props:{dataTest:{defaultValue:{value:"'activity-card-subject'",computed:!1},description:"",type:{name:"string"},required:!1},margin:{defaultValue:{value:"{ bottom: 10 }",computed:!1},description:"",type:{name:"shape",value:{top:{name:"number",required:!0},bottom:{name:"number",required:!0}}},required:!1},isOverview:{defaultValue:{value:"false",computed:!1},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const card_ActivityCardSubject=ActivityCardSubject;var ActivityOverviewSummary_templateObject,_templateObject2,_templateObject3;function ActivityOverviewSummary_typeof(o){return ActivityOverviewSummary_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityOverviewSummary_typeof(o)}function ActivityOverviewSummary_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function _defineProperties(target,props){for(var i=0;inew Date?constants.Q_.UPCOMING:constants.Q_.INCOMPLETE}return constants.Q_.COMPLETE}(activity),badge=isServiceDelivery(activity)?constants.QV.INTERACTION.SERVICE_DELIVERY:constants.QV.INTERACTION[status.toUpperCase()],isUpcoming=status===constants.Q_.UPCOMING,typeText=isServiceDelivery(activity)?"service delivery":"interaction",service=(0,lodash.get)(activity,"object.dit:service.name"),serviceText=service?getServiceText(service):null,themeText=function getThemeText(activity){var themeTypes=(0,lodash.get)(activity,"object.type");return(0,lodash.includes)(themeTypes,"dit:datahub:theme:export")?"export":(0,lodash.includes)(themeTypes,"dit:datahub:theme:investment")?"investment":(0,lodash.includes)(themeTypes,"dit:datahub:theme:trade_agreement")?"trade agreement":(0,lodash.includes)(themeTypes,"dit:datahub:theme:other")?"other":null}(activity),communicationChannel=(0,lodash.get)(activity,"object.dit:communicationChannel.name"),interactionUrl=function getCompanyInteractionUrl(activity){var companyId=activity.object.attributedTo[0].id.split(":").pop(),interactionId=activity.id.split(":")[2];return urls_default().companies.interactions.detail(companyId,interactionId)}(activity);return{badge,isUpcoming,typeText,serviceText,themeText,communicationChannel,interactionUrl}}}]),InteractionUtils}();function Interaction_typeof(o){return Interaction_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Interaction_typeof(o)}function Interaction_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function Interaction_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Interaction_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i span {\n color: ",";\n }\n"])),colours.TK);function AventriAttendee(_ref){var _transformAventriAtte=function transformAventriAttendee(attendee){return{attendeeName:"".concat(attendee.object["dit:firstName"]," ").concat(attendee.object["dit:lastName"]),date:(0,utils_date.formatStartAndEndDate)(attendee.startDate,attendee.endDate),eventName:attendee.eventName,eventId:extractAventriId(attendee),registrationStatus:AVENTRI_ATTENDEE_REG_STATUSES[attendee.object["dit:registrationStatus"]],contactUrl:attendee.datahubContactUrl}}(_ref.activity),attendeeName=_transformAventriAtte.attendeeName,eventName=_transformAventriAtte.eventName,eventId=_transformAventriAtte.eventId,date=_transformAventriAtte.date,registrationStatus=_transformAventriAtte.registrationStatus,contactUrl=_transformAventriAtte.contactUrl;return eventName?(0,jsx_runtime.jsxs)(card_ActivityCardWrapper,{dataTest:"aventri-activity",children:[(0,jsx_runtime.jsxs)(card_ActivityCardSubject,{children:[(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:"/events/aventri/".concat(eventId,"/details"),children:eventName}),registrationStatus&&(0,jsx_runtime.jsxs)(StyledSpan,{children:[": ",(0,jsx_runtime.jsx)("span",{children:registrationStatus})]})]}),(0,jsx_runtime.jsx)(card_ActivityCardLabels,{service:"event",kind:"Attended"===registrationStatus?"aventri event":"interaction"}),(0,jsx_runtime.jsx)(card_ActivityCardMetadata,{metadata:[{label:"Event date",value:date||"Unknown"}]})]}):(0,jsx_runtime.jsx)(card_ActivityCardWrapper,{dataTest:"aventri-attendee",children:(0,jsx_runtime.jsx)(card_ActivityCardSubject,{dataTest:"aventri-attendee-name",children:contactUrl?(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:contactUrl,children:attendeeName}):attendeeName})})}AventriAttendee.propTypes={activity:prop_types_default().object.isRequired},AventriAttendee.canRender=function(attendee){return CardUtils_canRenderByTypes(attendee,constants.x8.AventriAttendee)},AventriAttendee.__docgenInfo={description:"",methods:[{name:"canRender",docblock:null,modifiers:["static"],params:[{name:"attendee",type:null}],returns:null}],displayName:"AventriAttendee",props:{activity:{description:"",type:{name:"object"},required:!0}}};var react_router_dom=__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js");function DataHubEvent_typeof(o){return DataHubEvent_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},DataHubEvent_typeof(o)}function DataHubEvent_slicedToArray(arr,i){return function DataHubEvent_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function DataHubEvent_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function DataHubEvent_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return DataHubEvent_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DataHubEvent_arrayLikeToArray(o,minLen)}(arr,i)||function DataHubEvent_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DataHubEvent_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0?" by ":"",unFormattedContacts]})}):(0,jsx_runtime.jsxs)(card_ActivityCardWrapper,{dataTest:"aventri-event",children:[(0,jsx_runtime.jsxs)(card_ActivityCardSubject,{dataTest:"aventri-event-name",children:[subject,(0,jsx_runtime.jsxs)(RegisteredLabel,{children:[": ",status]})]}),(0,jsx_runtime.jsx)(card_ActivityCardLabels,{service:"Event",kind:"Aventri Event"}),(0,jsx_runtime.jsx)(card_ActivityCardMetadata,{metadata:[{label:"Event date",value:date}].concat(_toConsumableArray(formattedContacts))})]})}}],[{key:"canRender",value:function canRender(activity){return CardUtils_canRenderByTypes(activity,constants.x8.AventriEvent)}}]),AventriEvent}(react.PureComponent);AventriEvent.displayName="AventriEvent",function AventriEvent_defineProperty(obj,key,value){return(key=AventriEvent_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(AventriEvent,"propTypes",{activity:prop_types_default().object.isRequired,showDetails:prop_types_default().bool.isRequired}),AventriEvent.__docgenInfo={description:"",methods:[{name:"canRender",docblock:null,modifiers:["static"],params:[{name:"activity",type:null}],returns:null}],displayName:"AventriEvent",props:{activity:{description:"",type:{name:"object"},required:!0},showDetails:{description:"",type:{name:"bool"},required:!0}}};var AventriEventSyncWarning_templateObject,StatusMessage=__webpack_require__("./src/client/components/StatusMessage/index.jsx");var StyledStatusMessage=(0,styled_components_browser_esm.ZP)(StatusMessage.Z)(AventriEventSyncWarning_templateObject||(AventriEventSyncWarning_templateObject=function AventriEventSyncWarning_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n div.statusHeader {\n font-size: x-large;\n }\n div.statusContent {\n font-size: medium;\n }\n div.statusLink {\n font-size: 80%;\n }\n"])));function AventriEventSyncWarning(_ref){var aventriEventLink="https://eu-admin.eventscloud.com/loggedin/eVent/index.php?eventid="+_ref.aventriEventId;return(0,jsx_runtime.jsxs)(StyledStatusMessage,{children:[(0,jsx_runtime.jsx)("div",{class:"statusHeader",children:"This event has been automatically synced from Aventri."}),(0,jsx_runtime.jsx)("div",{class:"statusContent",children:"Event details, registrants and attendees can only be edited in Aventri. Changes can take up to 24 hours to sync."}),(0,jsx_runtime.jsx)("div",{class:"statusLink",children:(0,jsx_runtime.jsx)(NewWindowLink.Z,{href:aventriEventLink,children:"View in Aventri"})})]})}AventriEventSyncWarning.displayName="AventriEventSyncWarning",AventriEventSyncWarning.propTypes={aventriEventId:prop_types_default().number},AventriEventSyncWarning.__docgenInfo={description:"",methods:[],displayName:"AventriEventSyncWarning",props:{aventriEventId:{description:"",type:{name:"number"},required:!1}}};const activities=[AventriAttendee,AventriEvent,CompaniesHouseAccount,CompaniesHouseCompany,DataHubEvent,DirectoryFormsApi,MaxemailCampaign,HmrcExporter,Interaction,InvestmentProject,Omis,Referral,AventriEventSyncWarning];function Activity(_ref){var activity=_ref.activity,showDetails=_ref.showDetails,filter=_ref.filter,isOverview=_ref.isOverview,ActivityToRender=(0,lodash.find)(activities,(function(a){return a.canRender&&"function"==typeof a.canRender?a.canRender(activity,filter):null}));return ActivityToRender?(0,jsx_runtime.jsx)(ActivityToRender,{activity,filter,showDetails,isOverview}):null}Activity.displayName="Activity",Activity.propTypes={activity:prop_types_default().object.isRequired,showDetails:prop_types_default().bool,filter:prop_types_default().array},Activity.defaultProps={showDetails:!1,filter:[]},Activity.__docgenInfo={description:"",methods:[],displayName:"Activity",props:{showDetails:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},filter:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},activity:{description:"",type:{name:"object"},required:!0}}};const ActivityFeed_Activity=Activity;var ActivityFeedHeader_templateObject,ActivityFeedHeader_templateObject2,ActivityFeedHeader_templateObject3,govuk_react_heading_esm=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),pluralize=__webpack_require__("./node_modules/pluralize/pluralize.js"),pluralize_default=__webpack_require__.n(pluralize);function ActivityFeedHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var HeaderSummary=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedHeader_templateObject||(ActivityFeedHeader_templateObject=ActivityFeedHeader_taggedTemplateLiteral(["\n display: flex;\n flex-flow: row wrap;\n border-bottom: 2px solid #000;\n margin-bottom: ",";\n padding-bottom: ",";\n\n & > div {\n width: 100%;\n margin-bottom: ",";\n\n "," {\n width: 0;\n flex-grow: 1;\n }\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.qk.TABLET),HeaderCount=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedHeader_templateObject2||(ActivityFeedHeader_templateObject2=ActivityFeedHeader_taggedTemplateLiteral(["\n margin-top: ",";\n\n & > h2 {\n font-weight: normal;\n font-size: 28px;\n margin-bottom: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_1),HeaderActions=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedHeader_templateObject3||(ActivityFeedHeader_templateObject3=ActivityFeedHeader_taggedTemplateLiteral(["\n text-align: right;\n min-width: 60%;\n\n & > button {\n margin-bottom: 0;\n }\n"]))),ActivityFeedHeader=function ActivityFeedHeader(_ref){var totalActivities=_ref.totalActivities,actions=_ref.actions,headerText=totalActivities?pluralize_default()("activity",totalActivities,!0):"Activities";return(0,jsx_runtime.jsxs)(HeaderSummary,{children:[(0,jsx_runtime.jsx)(HeaderCount,{children:(0,jsx_runtime.jsx)(govuk_react_heading_esm.H2,{children:headerText})}),actions&&(0,jsx_runtime.jsx)(HeaderActions,{children:actions})]})};ActivityFeedHeader.displayName="ActivityFeedHeader",ActivityFeedHeader.propTypes={totalActivities:prop_types_default().number,actions:prop_types_default().node},ActivityFeedHeader.defaultProps={totalActivities:0,actions:null},ActivityFeedHeader.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedHeader",props:{totalActivities:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"number"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1}}};const ActivityFeed_ActivityFeedHeader=ActivityFeedHeader;var SelectFilter_templateObject,govuk_react_select_esm=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js");var StyledDropdownContainer=(0,styled_components_browser_esm.ZP)("div")(SelectFilter_templateObject||(SelectFilter_templateObject=function SelectFilter_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n background: ",";\n padding: ","\n display: block;\n \n "," {\n display: inline-flex;\n }\n \n label {\n display: block;\n \n "," {\n display: inline-block;\n }\n \n span {\n display: inline-block;\n margin: 0 ","\n width: auto;\n margin: 0;\n \n "," {\n margin: 0 10px;\n }\n }\n \n select {\n width: 100%;\n \n "," {\n width: auto;\n }\n }\n } \n"])),colours.zT,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.qk.DESKTOP),SelectFilter=function SelectFilter(_ref){var filters=_ref.filters,onActivityTypeFilterChange=_ref.onActivityTypeFilterChange,value=_ref.value;return(0,jsx_runtime.jsx)(StyledDropdownContainer,{children:(0,jsx_runtime.jsx)(govuk_react_select_esm.ZP,{input:{defaultValue:value},name:"activity-types-filter",label:"Activity types",onChange:onActivityTypeFilterChange,children:(0,lodash.map)(filters,(function(item,index){return(0,jsx_runtime.jsx)("option",{value:item.value,children:item.label},"selectFilterKey_".concat(index))}))})})};SelectFilter.displayName="SelectFilter",SelectFilter.propTypes={filters:prop_types_default().array.isRequired,onActivityTypeFilterChange:prop_types_default().func.isRequired,value:prop_types_default().string.isRequired},SelectFilter.__docgenInfo={description:"",methods:[],displayName:"SelectFilter",props:{filters:{description:"",type:{name:"array"},required:!0},onActivityTypeFilterChange:{description:"",type:{name:"func"},required:!0},value:{description:"",type:{name:"string"},required:!0}}};const filters_SelectFilter=SelectFilter;var ActivityFeedFilters_templateObject,ActivityFeedFilters_templateObject2,Analytics=__webpack_require__("./src/client/components/Analytics/index.jsx");function ActivityFeedFilters_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ActivityFeedFiltersRow=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedFilters_templateObject||(ActivityFeedFilters_templateObject=ActivityFeedFilters_taggedTemplateLiteral(["\n padding: ",";\n background: ",";\n display: block;\n align-items: center;\n\n "," {\n display: flex;\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,colours.nx,govuk_react_constants_esm.qk.DESKTOP),StyledTitle=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedFilters_templateObject2||(ActivityFeedFilters_templateObject2=ActivityFeedFilters_taggedTemplateLiteral(["\n margin-right: ",";\n white-space: nowrap;\n"])),govuk_react_constants_esm.N_.SCALE_4),ActivityFeedFilters=function ActivityFeedFilters(_ref){var activityTypeFilter=_ref.activityTypeFilter,_onActivityTypeFilterChange=_ref.onActivityTypeFilterChange;return(0,jsx_runtime.jsxs)(ActivityFeedFiltersRow,{children:[(0,jsx_runtime.jsx)(StyledTitle,{children:"Filter by"}),(0,jsx_runtime.jsx)(Analytics.Z,{children:function children(pushAnalytics){return(0,jsx_runtime.jsx)(filters_SelectFilter,{onActivityTypeFilterChange:function onActivityTypeFilterChange(e){_onActivityTypeFilterChange(e),function trackAnalytics(e,pushAnalytics){var _e$target=e.target;pushAnalytics({event:"activityTypeDropDown",extra:{dropDownOptionSelected:_e$target.options[_e$target.selectedIndex].text}})}(e,pushAnalytics)},value:activityTypeFilter})}})]})};ActivityFeedFilters.displayName="ActivityFeedFilters",ActivityFeedFilters.propTypes={activityTypeFilter:prop_types_default().array.isRequired,onActivityTypeFilterChange:prop_types_default().func.isRequired},ActivityFeedFilters.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedFilters",props:{activityTypeFilter:{description:"",type:{name:"array"},required:!0},onActivityTypeFilterChange:{description:"",type:{name:"func"},required:!0}}};const ActivityFeed_ActivityFeedFilters=ActivityFeedFilters;var ActivityFeedPagination_templateObject,govuk_react_button_esm=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),govuk_react_loading_box_esm=__webpack_require__("./node_modules/@govuk-react/loading-box/dist/govuk-react-loading-box.esm.js"),activity_feed_constants=__webpack_require__("./src/apps/companies/apps/activity-feed/constants.js");function ActivityFeedPagination_typeof(o){return ActivityFeedPagination_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityFeedPagination_typeof(o)}function ActivityFeedPagination_defineProperties(target,props){for(var i=0;i {}",computed:!1},description:"",type:{name:"func"},required:!1},isLoading:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isOverview:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1}}};var ActivityFeedContainer=(0,styled_components_browser_esm.ZP)("div")(ActivityFeed_templateObject||(ActivityFeed_templateObject=ActivityFeed_taggedTemplateLiteral(["\n margin: "," 0;\n"])),govuk_react_constants_esm.N_.SCALE_2),ActivityFeedCardList=(0,styled_components_browser_esm.ZP)("ol")(ActivityFeed_templateObject2||(ActivityFeed_templateObject2=ActivityFeed_taggedTemplateLiteral(["\n list-style-type: none;\n padding: 0;\n margin-top: ",";\n\n & > li {\n margin-bottom: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2),ActivityFeed=function(_React$Component){!function ActivityFeed_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&ActivityFeed_setPrototypeOf(subClass,superClass)}(ActivityFeed,_React$Component);var _super=ActivityFeed_createSuper(ActivityFeed);function ActivityFeed(props){var _this;return function ActivityFeed_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ActivityFeed),(_this=_super.call(this,props)).state={},_this.onActivityTypeFilterChange=_this.onActivityTypeFilterChange.bind(ActivityFeed_assertThisInitialized(_this)),_this}return function ActivityFeed_createClass(Constructor,protoProps,staticProps){return protoProps&&ActivityFeed_defineProperties(Constructor.prototype,protoProps),staticProps&&ActivityFeed_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(ActivityFeed,[{key:"onActivityTypeFilterChange",value:function onActivityTypeFilterChange(e){var activityTypeFilter=e.target.value;(0,this.props.sendQueryParams)({activityTypeFilter}),this.setState({activityTypeFilter})}},{key:"render",value:function render(){var _this$props=this.props,activities=_this$props.activities,onLoadMore=_this$props.onLoadMore,hasMore=_this$props.hasMore,isLoading=_this$props.isLoading,actions=_this$props.actions,children=_this$props.children,totalActivities=_this$props.totalActivities,companyIsArchived=_this$props.companyIsArchived,isOverview=_this$props.isOverview,feedType=_this$props.feedType,activityTypeFilter=this.state.activityTypeFilter;return(0,jsx_runtime.jsxs)(ActivityFeedContainer,{"data-test":"activity-feed",children:[!isOverview&&(0,jsx_runtime.jsx)(ActivityFeed_ActivityFeedHeader,{totalActivities,actions}),!companyIsArchived&&!isOverview&&(0,jsx_runtime.jsx)(ActivityFeed_ActivityFeedFilters,{activityTypeFilter,onActivityTypeFilterChange:this.onActivityTypeFilterChange}),(0,jsx_runtime.jsx)(ActivityFeedCardList,{children:activities.map((function(activity){return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(ActivityFeed_Activity,{activity,isOverview})},activity.id)}))}),hasMore&&(0,jsx_runtime.jsx)(ActivityFeedPagination,{isLoading,onLoadMore,feedType,isOverview}),children]})}}]),ActivityFeed}(react.Component);function ActivityFeedApp_typeof(o){return ActivityFeedApp_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityFeedApp_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==ActivityFeedApp_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function ActivityFeedApp_defineProperties(target,props){for(var i=0;i {}",computed:!1},description:"",type:{name:"func"},required:!1},sendQueryParams:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},activities:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"object"}},required:!1},hasMore:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isLoading:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},totalActivities:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"number"},required:!1},isGlobalUltimate:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},dnbHierarchyCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},companyIsArchived:{description:"",type:{name:"bool"},required:!1},isOverview:{description:"",type:{name:"bool"},required:!1}}};var ActivityFeedApp=function(_React$Component){!function ActivityFeedApp_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&ActivityFeedApp_setPrototypeOf(subClass,superClass)}(ActivityFeedApp,_React$Component);var _fetchActivities,_onLoadMore,_componentDidMount,_super=ActivityFeedApp_createSuper(ActivityFeedApp);function ActivityFeedApp(props){var _this;!function ActivityFeedApp_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ActivityFeedApp),_this=_super.call(this,props);var activityType=props.activityType,feedType=props.feedType;return _this.state={activities:[],error:!1,hasMore:!0,isLoading:!0,from:0,total:0,queryParams:{activityType,feedType}},_this.onLoadMore=_this.onLoadMore.bind(ActivityFeedApp_assertThisInitialized(_this)),_this.setQueryParams=_this.setQueryParams.bind(ActivityFeedApp_assertThisInitialized(_this)),_this}return function ActivityFeedApp_createClass(Constructor,protoProps,staticProps){return protoProps&&ActivityFeedApp_defineProperties(Constructor.prototype,protoProps),staticProps&&ActivityFeedApp_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(ActivityFeedApp,[{key:"componentDidMount",value:(_componentDidMount=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,this.onLoadMore();case 2:case"end":return _context.stop()}}),_callee,this)}))),function componentDidMount(){return _componentDidMount.apply(this,arguments)})},{key:"setQueryParams",value:function setQueryParams(queryParams){this.setState({from:0,activities:[],queryParams},this.onLoadMore)}},{key:"onLoadMore",value:(_onLoadMore=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var _this$state,activities,queryParams,from,_this$props,apiEndpoint,numberOfItems,_yield$ActivityFeedAp,newActivities,total,allActivities;return _regeneratorRuntime().wrap((function _callee2$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _this$state=this.state,activities=_this$state.activities,queryParams=_this$state.queryParams,from=_this$state.from,_this$props=this.props,apiEndpoint=_this$props.apiEndpoint,numberOfItems=_this$props.numberOfItems,this.setState({isLoading:!0}),_context2.prev=3,_context2.next=6,ActivityFeedApp.fetchActivities(apiEndpoint,from,numberOfItems,queryParams,this.props.isOverview);case 6:_yield$ActivityFeedAp=_context2.sent,newActivities=_yield$ActivityFeedAp.activities,total=_yield$ActivityFeedAp.total,allActivities=activities.concat(newActivities),this.setState({activities:allActivities,isLoading:!1,hasMore:total>allActivities.length,from:from+numberOfItems,total}),_context2.next=16;break;case 13:_context2.prev=13,_context2.t0=_context2.catch(3),this.setState({isLoading:!1,hasMore:!1,error:!0});case 16:case"end":return _context2.stop()}}),_callee2,this,[[3,13]])}))),function onLoadMore(){return _onLoadMore.apply(this,arguments)})},{key:"render",value:function render(){var _this$state2=this.state,activities=_this$state2.activities,isLoading=_this$state2.isLoading,hasMore=_this$state2.hasMore,error=_this$state2.error,total=_this$state2.total,_this$props2=this.props,actions=_this$props2.actions,isGlobalUltimate=_this$props2.isGlobalUltimate,dnbHierarchyCount=_this$props2.dnbHierarchyCount,companyIsArchived=_this$props2.companyIsArchived,isOverview=_this$props2.isOverview,feedType=_this$props2.feedType,activityType=_this$props2.activityType,isEmptyFeed=0===activities.length&&!hasMore;return(0,jsx_runtime.jsxs)(ActivityFeed,{activities,actions,isLoading,hasMore,onLoadMore:this.onLoadMore,sendQueryParams:this.setQueryParams,totalActivities:total,isGlobalUltimate,dnbHierarchyCount,companyIsArchived,isOverview,feedType,activityType,children:[isEmptyFeed&&!error&&(0,jsx_runtime.jsx)("div",{"data-test":"noActivities",children:"There are no activities to show."}),error&&(0,jsx_runtime.jsx)("div",{children:"Error occurred while loading activities."})]})}}],[{key:"fetchActivities",value:(_fetchActivities=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(apiEndpoint,from,numberOfItems,queryParams,isOverview){var activityType,feedType,params,_yield$axios$get,data,total,activities;return _regeneratorRuntime().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:return activityType=queryParams.activityType,feedType=queryParams.feedType,params={from,size:numberOfItems,activityType,feedType},_context3.next=4,axios_default().get(apiEndpoint,{params});case 4:return _yield$axios$get=_context3.sent,data=_yield$axios$get.data,isOverview&&data.activities&&data.activities.length&&(data.activities=data.activities.filter((function(activity){return"maxemail"!==activity["dit:application"]}))),total=data.total,activities=data.activities,_context3.abrupt("return",{total,activities});case 9:case"end":return _context3.stop()}}),_callee3)}))),function fetchActivities(_x,_x2,_x3,_x4,_x5){return _fetchActivities.apply(this,arguments)})}]),ActivityFeedApp}(react.Component);ActivityFeedApp.displayName="ActivityFeedApp",ActivityFeedApp_defineProperty(ActivityFeedApp,"propTypes",{actions:prop_types_default().node,activityType:prop_types_default().array.isRequired,apiEndpoint:prop_types_default().string.isRequired,isGlobalUltimate:prop_types_default().bool,dnbHierarchyCount:prop_types_default().number,companyIsArchived:prop_types_default().bool,numberOfItems:prop_types_default().number,feedType:prop_types_default().string}),ActivityFeedApp_defineProperty(ActivityFeedApp,"defaultProps",{activityType:[],actions:null,isGlobalUltimate:!1,dnbHierarchyCount:null,numberOfItems:20,feedType:activity_feed_constants.FILTER_FEED_TYPE.ALL}),ActivityFeedApp.__docgenInfo={description:"",methods:[{name:"setQueryParams",docblock:null,modifiers:[],params:[{name:"queryParams",type:null}],returns:null},{name:"onLoadMore",docblock:null,modifiers:["async"],params:[],returns:null},{name:"fetchActivities",docblock:null,modifiers:["static","async"],params:[{name:"apiEndpoint",type:null},{name:"from",type:null},{name:"numberOfItems",type:null},{name:"queryParams",type:null},{name:"isOverview",type:null}],returns:null}],displayName:"ActivityFeedApp",props:{activityType:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},isGlobalUltimate:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},dnbHierarchyCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},numberOfItems:{defaultValue:{value:"20",computed:!1},description:"",type:{name:"number"},required:!1},feedType:{defaultValue:{value:"FILTER_FEED_TYPE.ALL",computed:!0},description:"",type:{name:"string"},required:!1},apiEndpoint:{description:"",type:{name:"string"},required:!0},companyIsArchived:{description:"",type:{name:"bool"},required:!1}}};var ActivityFeedAction_templateObject;__webpack_require__("./node_modules/core-js/modules/es.string.link.js");var Link=(0,styled_components_browser_esm.ZP)("a")(ActivityFeedAction_templateObject||(ActivityFeedAction_templateObject=function ActivityFeedAction_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: 0;\n margin-top: ",";\n "," {\n margin-left: ",";\n margin-top: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_3),ActivityFeedAction=function ActivityFeedAction(_ref){var text=_ref.text,link=_ref.link;return(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:Link,href:link,buttonColour:"#dee0e2",buttonTextColour:"#000",children:text},text)};ActivityFeedAction.displayName="ActivityFeedAction",ActivityFeedAction.propTypes={text:prop_types_default().string.isRequired,link:prop_types_default().string.isRequired},ActivityFeedAction.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedAction",props:{text:{description:"",type:{name:"string"},required:!0},link:{description:"",type:{name:"string"},required:!0}}};var Badge=__webpack_require__("./src/client/components/Badge/index.jsx"),ButtonLink=__webpack_require__("./src/client/components/ButtonLink/index.jsx"),CollectionItem=(__webpack_require__("./src/client/components/CollectionList/index.jsx"),__webpack_require__("./src/client/components/CollectionList/CollectionItem.jsx")),CollectionHeader=__webpack_require__("./src/client/components/CollectionList/CollectionHeader.jsx"),react_router=(__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/react-router/esm/react-router.js")),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),CollectionHeaderRow=__webpack_require__("./src/client/components/CollectionList/CollectionHeaderRow.jsx"),govuk_react_esm=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js");function Select_typeof(o){return Select_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Select_typeof(o)}var Select_templateObject,_excluded=["input"],_excluded2=["onChange","initialValue"];function Select_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Select_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledGovSelect=(0,styled_components_browser_esm.ZP)(govuk_react_esm.Ph)(Select_templateObject||(Select_templateObject=function Select_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n\n select {\n flex: 1;\n width: 'initial';\n min-width: 200px;\n }\n\n "," {\n display: flex;\n align-items: center;\n flex-direction: row;\n ","\n span {\n ","\n }\n }\n"])),govuk_react_lib_esm.W0.responsive({size:2,property:"margin",direction:["top"]}),govuk_react_constants_esm.qk.TABLET,govuk_react_lib_esm.W0.responsive({size:0,property:"margin",direction:["top"]}),govuk_react_lib_esm.W0.responsive({size:1,property:"margin",direction:["right"]})),Select=function Select(_ref){var input=_ref.input,props=_objectWithoutProperties(_ref,_excluded),_input$onChange=input.onChange,_onChange=void 0===_input$onChange?function(){}:_input$onChange,_input$initialValue=input.initialValue,initialValue=void 0===_input$initialValue?"":_input$initialValue,inputProps=_objectWithoutProperties(input,_excluded2),_useState2=Select_slicedToArray((0,react.useState)(initialValue),2),value=_useState2[0],setValue=_useState2[1];return(0,react.useEffect)((function(){return setValue(initialValue)}),[initialValue]),(0,jsx_runtime.jsx)(StyledGovSelect,Select_objectSpread(Select_objectSpread({},props),{},{input:Select_objectSpread({onChange:function onChange(e){setValue(e.target.value),_onChange(e)},value},inputProps)}))};Select.displayName="Select",Select.__docgenInfo={description:"",methods:[],displayName:"Select"};const components_Select=Select;function RoutedSelect_typeof(o){return RoutedSelect_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedSelect_typeof(o)}var RoutedSelect_excluded=["qsParamName"];function RoutedSelect_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedSelect_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedSelect=function RoutedSelect(_ref){var qsParamName=_ref.qsParamName,props=RoutedSelect_objectWithoutProperties(_ref,RoutedSelect_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var location=_ref2.location,history=_ref2.history,qsParams=lib_default().parse(location.search.slice(1)),initialValue=(0,lodash.get)(qsParams,qsParamName,"");return(0,jsx_runtime.jsx)(components_Select,RoutedSelect_objectSpread(RoutedSelect_objectSpread({},props),{},{input:{initialValue,onChange:function onChange(e){history.push({search:lib_default().stringify(RoutedSelect_objectSpread(RoutedSelect_objectSpread({},qsParams),{},RoutedSelect_defineProperty({},qsParamName,e.target.value)))})}}}))}})};RoutedSelect.displayName="RoutedSelect",RoutedSelect.__docgenInfo={description:"",methods:[],displayName:"RoutedSelect"};const components_RoutedSelect=RoutedSelect;var CollectionSort_templateObject;var CollectionSort_StyledSpan=(0,styled_components_browser_esm.ZP)("span")(CollectionSort_templateObject||(CollectionSort_templateObject=function CollectionSort_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n color: ",";\n"])),colours.au),CollectionSort=function CollectionSort(_ref){var sortOptions=_ref.sortOptions,totalPages=_ref.totalPages,actions=sortOptions?(0,jsx_runtime.jsx)(components_RoutedSelect,{"data-test":"sortby",name:"sortBy",qsParamName:"sortby",label:"Sort by",children:sortOptions.map((function(_ref2,i){var name=_ref2.name,value=_ref2.value;return(0,jsx_runtime.jsx)("option",{value,children:name},i)}))}):null;return(0,jsx_runtime.jsx)(CollectionHeaderRow.Z,{actions,children:(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref3){var search=_ref3.location.search,searchParams=lib_default().parse(search.slice(1));return(0,jsx_runtime.jsxs)(CollectionSort_StyledSpan,{"data-test":"pagination-summary",children:["Page ",searchParams.page||1," of ",totalPages]})}})})};CollectionSort.displayName="CollectionSort",CollectionSort.propTypes={sortOptions:prop_types_default().arrayOf(prop_types_default().shape({name:prop_types_default().string.isRequired,value:prop_types_default().string.isRequired})),totalPages:prop_types_default().number.isRequired},CollectionSort.__docgenInfo={description:"",methods:[],displayName:"CollectionSort",props:{sortOptions:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{name:{name:"string",required:!0},value:{name:"string",required:!0}}}},required:!1},totalPages:{description:"",type:{name:"number"},required:!0}}};const CollectionList_CollectionSort=CollectionSort;var Task=__webpack_require__("./src/client/components/Task/index.jsx");function CollectionFilters_typeof(o){return CollectionFilters_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CollectionFilters_typeof(o)}function CollectionFilters_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function CollectionFilters_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&(0,jsx_runtime.jsx)(StyledSelect,{label:"View list",htmlFor:"view-list",input:{onChange:function onChange(e){return _onChange(e.target.value)},initialValue:selectedId,id:"view-list"},children:Object.entries(lists).map((function(_ref4){var _ref5=Header_slicedToArray(_ref4,2),id=_ref5[0],name=_ref5[1].name;return(0,jsx_runtime.jsx)("option",{value:id,"aria-label":name,children:name},id)}))})]})}));var FormActions=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),ListHeader_StyledRoot=styled_components_browser_esm.ZP.div({display:"flex",alignItems:"baseline",justifyContent:"space-between"}),ListHeader_StyledHeading=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)({flexGrow:1,marginBottom:0}),StyledFormActions=(0,styled_components_browser_esm.ZP)(FormActions.Z)({textAlign:"right"}),ListHeader=function ListHeader(_ref){var id=_ref.id,name=_ref.name;return(0,jsx_runtime.jsxs)(ListHeader_StyledRoot,{children:[(0,jsx_runtime.jsx)(ListHeader_StyledHeading,{children:name}),(0,jsx_runtime.jsxs)(StyledFormActions,{children:[(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:govuk_react_link_esm.Z,href:urls_default().companyLists.rename(id),children:"Edit list name"}),(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:govuk_react_link_esm.Z,href:urls_default().companyLists.delete(id),children:"Delete list"})]})]})};ListHeader.displayName="ListHeader",ListHeader.__docgenInfo={description:"",methods:[],displayName:"ListHeader"};const CompanyLists_ListHeader=ListHeader;var govuk_react_table_esm=__webpack_require__("./node_modules/@govuk-react/table/dist/govuk-react-table.esm.js"),govuk_react_visually_hidden_esm=__webpack_require__("./node_modules/@govuk-react/visually-hidden/dist/govuk-react-visually-hidden.esm.js"),index_modern=__webpack_require__("./node_modules/react-lines-ellipsis/lib/index.modern.mjs");function Table_typeof(o){return Table_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Table_typeof(o)}function Table_defineProperty(obj,key,value){return(key=function Table_toPropertyKey(arg){var key=function Table_toPrimitive(input,hint){if("object"!==Table_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==Table_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===Table_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var Table_format=__webpack_require__("./src/client/utils/date.js").format,getMediaQuery=function getMediaQuery(theme){return(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET},StyledButtonLink=styled_components_browser_esm.ZP.a({marginBottom:0,width:"100%"}),StyledTableRow=styled_components_browser_esm.ZP.tr((function(_ref){var theme=_ref.theme;return Table_defineProperty({borderBottom:"1px solid ".concat(colours.DU)},getMediaQuery(theme),{borderBottom:"none"})})),StyledCell=styled_components_browser_esm.ZP.td({padding:0,borderBottom:"none"}),StyledHeaderCell=styled_components_browser_esm.ZP.th({padding:0,borderBottom:"none"}),StyledTableCell=(0,styled_components_browser_esm.ZP)(StyledCell)((function(_ref3){var theme=_ref3.theme;return Table_defineProperty({display:"inline-block",width:"100%"},getMediaQuery(theme),{display:"table-cell",width:"auto",padding:"".concat(govuk_react_constants_esm.N_.SCALE_2," ").concat(govuk_react_constants_esm.N_.SCALE_4," ").concat(govuk_react_constants_esm.N_.SCALE_2," 0"),borderBottom:"1px solid ".concat(colours.DU)})})),StyledTableHeaderCell=(0,styled_components_browser_esm.ZP)(StyledHeaderCell)((function(_ref5){var theme=_ref5.theme;return Table_defineProperty({display:"none",fontWeight:govuk_react_constants_esm.Xw.bold},getMediaQuery(theme),{display:"table-cell",borderBottom:"1px solid ".concat(colours.DU)})})),TitleCell=(0,styled_components_browser_esm.ZP)(StyledTableCell)((function(_ref7){var theme=_ref7.theme;return Table_defineProperty({paddingTop:govuk_react_constants_esm.N_.SCALE_3},getMediaQuery(theme),{paddingTop:govuk_react_constants_esm.N_.SCALE_2})})),ColumnLabelCell=(0,styled_components_browser_esm.ZP)(StyledTableCell)((function(_ref9){var theme=_ref9.theme;return Table_defineProperty({position:"relative",marginTop:"".concat(govuk_react_constants_esm.N_.SCALE_5),"::before":{content:"'Last interaction'",position:"absolute",top:"-".concat(govuk_react_constants_esm.N_.SCALE_4),fontSize:"smaller"}},getMediaQuery(theme),{marginTop:0,"::before":{content:"none"}})})),ActionCell=(0,styled_components_browser_esm.ZP)(StyledTableCell)((function(_ref11){var theme=_ref11.theme;return Table_defineProperty({paddingTop:govuk_react_constants_esm.N_.SCALE_2,paddingBottom:govuk_react_constants_esm.N_.SCALE_4},getMediaQuery(theme),{paddingRight:0,paddingBottom:govuk_react_constants_esm.N_.SCALE_2})})),StyledLink=(0,styled_components_browser_esm.ZP)(govuk_react_link_esm.Z)({":focus":{color:colours.su,":active":{color:colours.KW},":hover":{color:colours.oh},":visited":{color:colours.Pf}}}),StyledLinesEllipsis=(0,styled_components_browser_esm.ZP)(index_modern.Z)({display:"inline-block",background:colours.xm,textDecoration:"underline"}),Advisers=function Advisers(_ref13){var ditParticipants=_ref13.ditParticipants;return 0===ditParticipants.length?"Unknown adviser - Unknown team":ditParticipants.length>1?"Multiple advisers":ditParticipants.map((function(adviser,index){return(0,jsx_runtime.jsx)("div",{children:"".concat(adviser.name||"Unknown adviser"," - ").concat(adviser.team||"Unknown team")},index)}))},CompaniesTable=function CompaniesTable(_ref14){var companies=_ref14.companies;return(0,jsx_runtime.jsx)(govuk_react_table_esm.Z,{head:(0,jsx_runtime.jsxs)(govuk_react_table_esm.Z.Row,{children:[(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"auto",children:"Company name"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"15%",children:"Last interaction"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"25%",children:"Subject"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"20%",children:"Added by"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"151px",children:(0,jsx_runtime.jsx)(govuk_react_visually_hidden_esm.Z,{children:"Action"})})]}),children:companies.map((function(_ref15){var id=_ref15.id,name=_ref15.name,date=_ref15.date,subject=_ref15.subject,interactionId=_ref15.interactionId,ditParticipants=_ref15.ditParticipants;return(0,jsx_runtime.jsxs)(StyledTableRow,{children:[(0,jsx_runtime.jsx)(TitleCell,{children:(0,jsx_runtime.jsx)(StyledLink,{href:urls_default().companies.detail(id),children:(0,jsx_runtime.jsx)(StyledLinesEllipsis,{text:name,maxLine:"2",ellipsis:"...",trimRight:!0,basedOn:"words"})})}),(0,jsx_runtime.jsx)(ColumnLabelCell,{children:date?Table_format(date):"-"}),(0,jsx_runtime.jsx)(StyledTableCell,{children:interactionId?(0,jsx_runtime.jsx)(StyledLink,{href:urls_default().interactions.detail(interactionId),children:(0,jsx_runtime.jsx)(StyledLinesEllipsis,{text:subject,maxLine:"2",ellipsis:"...",trimRight:!0,basedOn:"words"})}):"No interactions have been recorded"}),(0,jsx_runtime.jsx)(StyledTableCell,{children:(0,jsx_runtime.jsx)(Advisers,{ditParticipants})}),(0,jsx_runtime.jsx)(ActionCell,{children:(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:StyledButtonLink,href:urls_default().companies.interactions.create(id),"aria-label":"Add interaction with ".concat(name),children:"Add interaction"})})]},id)}))})};CompaniesTable.displayName="CompaniesTable",CompaniesTable.__docgenInfo={description:"",methods:[],displayName:"CompaniesTable"};const Table=CompaniesTable;function CompanyLists_typeof(o){return CompanyLists_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyLists_typeof(o)}function CompanyLists_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function CompanyLists_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&(0,jsx_runtime.jsx)(Filters.ZP,{}),(0,jsx_runtime.jsx)(Table,{companies:applyFilters(companies,query,orderBy)})]}):(0,jsx_runtime.jsxs)(govuk_react_hint_text_esm.Z,{children:["You have not added any companies to your list.",(0,jsx_runtime.jsx)("br",{}),"You can add companies to this list from a company page, and only you can see this list."]})}})]})})),EmptyState=function EmptyState(){return(0,jsx_runtime.jsx)(ContentWithHeading.Z,{heading:"My companies lists",children:(0,jsx_runtime.jsxs)(govuk_react_hint_text_esm.Z,{children:["You have not yet created any lists with companies.",(0,jsx_runtime.jsx)("br",{}),"You can add companies to lists from a company page, and only you can see these lists."]})})};EmptyState.displayName="EmptyState";const CompanyLists=(0,es.connect)(CompanyLists_state.H)((function(_ref2){var lists=_ref2.lists;return lists?Object.keys(lists).length?(0,jsx_runtime.jsx)(CompanyList,{}):(0,jsx_runtime.jsx)(EmptyState,{}):(0,jsx_runtime.jsx)(Task.Z.Status,{name:"Company lists",id:"dashboard",progressMessage:"Loading my companies lists",startOnRender:{onSuccessDispatch:actions.Og6}})}));var LocalHeaderCompanyLists_templateObject,LocalHeaderCompanyLists_templateObject2,LocalHeaderCompanyLists_templateObject3,govuk_react_main_esm=__webpack_require__("./node_modules/@govuk-react/main/dist/govuk-react-main.esm.js"),govuk_react_grid_col_esm=__webpack_require__("./node_modules/@govuk-react/grid-col/dist/govuk-react-grid-col.esm.js"),govuk_react_grid_row_esm=__webpack_require__("./node_modules/@govuk-react/grid-row/dist/govuk-react-grid-row.esm.js"),govuk_react_details_esm=__webpack_require__("./node_modules/@govuk-react/details/dist/govuk-react-details.esm.js"),LocalHeader=__webpack_require__("./src/client/components/LocalHeader/LocalHeader.jsx"),LocalHeaderHeading=__webpack_require__("./src/client/components/LocalHeader/LocalHeaderHeading.jsx"),state=__webpack_require__("./src/client/components/CompanyLocalHeader/state.js");function LocalHeaderCompanyLists_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledCompanyListButton=(0,styled_components_browser_esm.ZP)("button")(LocalHeaderCompanyLists_templateObject||(LocalHeaderCompanyLists_templateObject=LocalHeaderCompanyLists_taggedTemplateLiteral(["\n display: inline-table;\n padding: 4px 8px 4px 8px;\n border: none;\n vertical-align: middle;\n cursor: pointer;\n margin-right: 10px;\n font-size: ",";\n span {\n pointer-events: none;\n display: inline-block;\n font-size: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_14,govuk_react_constants_esm.Kt.SIZE_16),StyledCompanyListItemButton=(0,styled_components_browser_esm.ZP)(StyledCompanyListButton)(LocalHeaderCompanyLists_templateObject2||(LocalHeaderCompanyLists_templateObject2=LocalHeaderCompanyLists_taggedTemplateLiteral(["\n background-color: ",";\n color: ",";\n border-bottom: 3px solid ",";\n font-weight: ",";\n"])),colours.Zv,colours.hJ,colours.hJ,govuk_react_constants_esm.Xw.bold),StyledAddButton=(0,styled_components_browser_esm.ZP)(StyledCompanyListButton)(LocalHeaderCompanyLists_templateObject3||(LocalHeaderCompanyLists_templateObject3=LocalHeaderCompanyLists_taggedTemplateLiteral(["\n background-color: ",";\n border-bottom: 3px solid ",";\n"])),colours.nx,colours.N1),LocalHeaderCompanyLists=function LocalHeaderCompanyLists(_ref){var results=_ref.results,company=_ref.company,returnUrl=_ref.returnUrl,queryString=returnUrl?"".concat(returnUrl):"/companies/".concat(company.id),handleClickAddRemove=function handleClickAddRemove(){window.location.href="/companies/".concat(company.id,"/lists/add-remove?returnUrl=").concat(queryString)};return(0,jsx_runtime.jsx)(Task.Z.Status,{name:state.d,id:state.ID,progressMessage:"Loading my lists",startOnRender:{payload:{id:company.id},onSuccessDispatch:actions.aab},children:function children(){return results&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[Object.keys(results).map((function(list){return(0,jsx_runtime.jsxs)(StyledCompanyListItemButton,{"data-test":"list-item-".concat((0,lodash.kebabCase)(results[list].name),"-button"),onClick:handleClickAddRemove,children:[results[list].name," ",(0,jsx_runtime.jsx)("span",{children:"x"})]},list)})),(0,jsx_runtime.jsxs)(StyledAddButton,{"data-test":"add-to-list-button",onClick:handleClickAddRemove,children:[(0,jsx_runtime.jsx)("span",{children:"+"})," Add to list"]})]})}})};LocalHeaderCompanyLists.displayName="LocalHeaderCompanyLists",LocalHeaderCompanyLists.__docgenInfo={description:"",methods:[],displayName:"LocalHeaderCompanyLists"};const CompanyLocalHeader_LocalHeaderCompanyLists=(0,es.connect)(state.H)(LocalHeaderCompanyLists);var LocalHeaderCompanyRefer_templateObject;var StyledCompanyReferButton=(0,styled_components_browser_esm.ZP)("button")(LocalHeaderCompanyRefer_templateObject||(LocalHeaderCompanyRefer_templateObject=function LocalHeaderCompanyRefer_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: inline-table;\n padding: 4px 8px 4px 8px;\n border: none;\n vertical-align: middle;\n cursor: pointer;\n margin-right: 10px;\n font-size: ",";\n span {\n pointer-events: none;\n display: inline-block;\n }\n background-color: ",";\n border-bottom: 3px solid ",";\n"])),govuk_react_constants_esm.Kt.SIZE_14,colours.nx,colours.N1),LocalHeaderCompanyRefer=function LocalHeaderCompanyRefer(_ref){var companyId=_ref.companyId;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(StyledCompanyReferButton,{"data-test":"refer-company-button",onClick:function handleClickRefer(){window.location.href=urls_default().companies.referrals.send(companyId)},children:(0,jsx_runtime.jsx)("span",{children:"Refer this company"})})})};LocalHeaderCompanyRefer.__docgenInfo={description:"",methods:[],displayName:"LocalHeaderCompanyRefer"};const CompanyLocalHeader_LocalHeaderCompanyRefer=LocalHeaderCompanyRefer;var utils_templateObject,utils_templateObject2,addresses=__webpack_require__("./src/client/utils/addresses.js"),ArchivePanel=__webpack_require__("./src/client/components/ArchivePanel/index.jsx");__webpack_require__("./src/client/modules/Companies/CollectionList/state.js");function utils_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var CollectionListPlaceholder_templateObject,CollectionListPlaceholder_templateObject2,CollectionListPlaceholder_templateObject3,shimmer=(0,styled_components_browser_esm.F4)(utils_templateObject||(utils_templateObject=utils_taggedTemplateLiteral(["\n 0% {\n background-position: -500px 0;\n }\n 100% {\n background-position: 500px 0;\n }\n"]))),animation=(0,styled_components_browser_esm.iv)(utils_templateObject2||(utils_templateObject2=utils_taggedTemplateLiteral(["\n animation-duration: 1.5s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n animation-name: ",";\n background: linear-gradient(to right, #eee 8%, #ddd 18%, #eee 33%);\n background-size: 1000px 104px;\n"])),shimmer);function CollectionListPlaceholder_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(0,styled_components_browser_esm.ZP)("ul")(CollectionListPlaceholder_templateObject||(CollectionListPlaceholder_templateObject=CollectionListPlaceholder_taggedTemplateLiteral(["\n margin-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),(0,styled_components_browser_esm.ZP)("li")(CollectionListPlaceholder_templateObject2||(CollectionListPlaceholder_templateObject2=CollectionListPlaceholder_taggedTemplateLiteral(["\n border-top: 1px solid ",";\n ",";\n"])),colours.zT,(function(_ref){var marginTop=_ref.marginTop;return marginTop&&"margin-top: ".concat(marginTop,"px;")})),(0,styled_components_browser_esm.ZP)("div")(CollectionListPlaceholder_templateObject3||(CollectionListPlaceholder_templateObject3=CollectionListPlaceholder_taggedTemplateLiteral(["\n ",";\n ",";\n ",";\n ",";\n"])),animation,(function(_ref2){var height=_ref2.height;return height&&"height: ".concat(height,"px;")}),(function(_ref3){var widthPercent=_ref3.widthPercent;return widthPercent&&"width: ".concat(widthPercent,"%;")}),(function(_ref4){var marginTop=_ref4.marginTop;return marginTop&&"margin-top: ".concat(marginTop,"px;")}));var CollectionListFiltersPlaceholder_templateObject,CollectionListFiltersPlaceholder_templateObject2,CollectionListFiltersPlaceholder_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;__webpack_require__("./node_modules/core-js/modules/es.array.fill.js");function CollectionListFiltersPlaceholder_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(0,styled_components_browser_esm.ZP)("div")(CollectionListFiltersPlaceholder_templateObject||(CollectionListFiltersPlaceholder_templateObject=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 150px;\n height: ",";\n"])),animation,govuk_react_constants_esm.N_.SCALE_4),(0,styled_components_browser_esm.ZP)("ul")(CollectionListFiltersPlaceholder_templateObject2||(CollectionListFiltersPlaceholder_templateObject2=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n margin-bottom: 40px;\n"]))),(0,styled_components_browser_esm.ZP)("li")(CollectionListFiltersPlaceholder_templateObject3||(CollectionListFiltersPlaceholder_templateObject3=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n display: flex;\n margin-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),(0,styled_components_browser_esm.ZP)("div")(_templateObject4||(_templateObject4=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 25px;\n height: 25px;\n"])),animation),(0,styled_components_browser_esm.ZP)("div")(_templateObject5||(_templateObject5=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n align-self: center;\n width: ","%;\n height: ",";\n margin-left: ",";\n"])),animation,function randomNumberMinToMax(min,max){return Math.floor(Math.random()*(max-min+1)+min)}(50,90),govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.N_.SCALE_2);var InputList=(0,styled_components_browser_esm.ZP)("ul")(_templateObject6||(_templateObject6=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n margin-bottom: 30px;\n"]))),InputListItem=(0,styled_components_browser_esm.ZP)("li")(_templateObject7||(_templateObject7=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n &:first-child {\n margin-top: 50px;\n }\n &:only-child {\n margin-top: 0;\n }\n"]))),InputListItemLabel=(0,styled_components_browser_esm.ZP)("div")(_templateObject8||(_templateObject8=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 150px;\n height: ",";\n"])),animation,govuk_react_constants_esm.N_.SCALE_4),InputListItemField=(0,styled_components_browser_esm.ZP)("div")(_templateObject9||(_templateObject9=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: ",";\n height: 35px;\n margin-top: ",";\n"])),animation,govuk_react_constants_esm.Tq,govuk_react_constants_esm.N_.SCALE_1),CollectionListFiltersPlaceholder_InputPlaceholder=function InputPlaceholder(_ref2){var _ref2$count=_ref2.count,count=void 0===_ref2$count?1:_ref2$count;return(0,jsx_runtime.jsx)(InputList,{children:Array.from(Array(count).keys()).map((function(el,i){return(0,jsx_runtime.jsxs)(InputListItem,{children:[(0,jsx_runtime.jsx)(InputListItemLabel,{}),(0,jsx_runtime.jsx)(InputListItemField,{})]},i)}))})};CollectionListFiltersPlaceholder_InputPlaceholder.displayName="InputPlaceholder";(0,styled_components_browser_esm.ZP)("div")(_templateObject10||(_templateObject10=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 250px;\n height: ",";\n margin-bottom: ",";\n"])),animation,govuk_react_constants_esm.N_.SCALE_5,govuk_react_constants_esm.N_.SCALE_4);CollectionListFiltersPlaceholder_InputPlaceholder.__docgenInfo={description:"",methods:[],displayName:"InputPlaceholder",props:{count:{defaultValue:{value:"1",computed:!1},required:!1}}};var CompanyLocalHeader_templateObject,CompanyLocalHeader_templateObject2,CompanyLocalHeader_templateObject3,CompanyLocalHeader_templateObject4,CompanyLocalHeader_templateObject5,CompanyLocalHeader_templateObject6,CompanyLocalHeader_templateObject7,CompanyLocalHeader_templateObject8,CompanyLocalHeader_templateObject9,CompanyLocalHeader_templateObject10,_templateObject11,isItaTierDAccount=function isItaTierDAccount(oneListGroupTier){return oneListGroupTier&&"1929c808-99b4-4abf-a891-45f2e187b410"===oneListGroupTier.id},buildCompanyBreadcrumbs=function buildCompanyBreadcrumbs(pageBreadcrumbs,companyId,companyName){return[{link:urls_default().dashboard.index(),text:"Home"},{link:urls_default().companies.index(),text:"Companies"},{link:urls_default().companies.detail(companyId),text:companyName}].concat(pageBreadcrumbs)};function CompanyLocalHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var LocalHeaderTradingNames=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H4)(CompanyLocalHeader_templateObject||(CompanyLocalHeader_templateObject=CompanyLocalHeader_taggedTemplateLiteral(["\n font-weight: normal;\n"]))),StyledAddress=(0,styled_components_browser_esm.ZP)("p")(CompanyLocalHeader_templateObject2||(CompanyLocalHeader_templateObject2=CompanyLocalHeader_taggedTemplateLiteral(["\n margin-top: ",";\n margin-bottom: ",";\n"])),govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2),BadgeText=(0,styled_components_browser_esm.ZP)("span")(CompanyLocalHeader_templateObject3||(CompanyLocalHeader_templateObject3=CompanyLocalHeader_taggedTemplateLiteral(["\n font-weight: 600;\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),TypeWrapper=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject4||(CompanyLocalHeader_templateObject4=CompanyLocalHeader_taggedTemplateLiteral(["\n @media (min-width: ",") {\n display: table-row;\n }\n"])),govuk_react_constants_esm.j$.TABLET),StyledButtonContainer=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject5||(CompanyLocalHeader_templateObject5=CompanyLocalHeader_taggedTemplateLiteral(["\n width: 100%;\n display: inline-block;\n"]))),StyledList=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject6||(CompanyLocalHeader_templateObject6=CompanyLocalHeader_taggedTemplateLiteral(["\n padding-bottom: 10px;\n display: inline-flex;\n"]))),CompanyLocalHeader_StyledButtonLink=styled_components_browser_esm.ZP.a({marginBottom:10,float:"right"}),BadgeWrapper=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject7||(CompanyLocalHeader_templateObject7=CompanyLocalHeader_taggedTemplateLiteral(["\n @media (min-width: ",") {\n display: table-cell;\n }\n"])),govuk_react_constants_esm.j$.TABLET),StyledDetails=(0,styled_components_browser_esm.ZP)(govuk_react_details_esm.Z)(CompanyLocalHeader_templateObject8||(CompanyLocalHeader_templateObject8=CompanyLocalHeader_taggedTemplateLiteral(["\n @media (min-width: ",") {\n margin: 0 0 0 ",";\n }\n span,\n div {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.j$.TABLET,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.Kt.SIZE_16),StyledDescription=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject9||(CompanyLocalHeader_templateObject9=CompanyLocalHeader_taggedTemplateLiteral(["\n padding: ",";\n background-color: ",";\n\n * + & {\n margin-top: ",";\n }\n\n p {\n margin-top: 0;\n margin-bottom: 0;\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n }\n\n & + * {\n margin-top: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,colours.nx,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_3),StyledMain=(0,styled_components_browser_esm.ZP)(govuk_react_main_esm.Z)(CompanyLocalHeader_templateObject10||(CompanyLocalHeader_templateObject10=CompanyLocalHeader_taggedTemplateLiteral(["\n padding-top: ",";\n div {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.Kt.SIZE_20),StyledRelatedCompaniesWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject11||(_templateObject11=CompanyLocalHeader_taggedTemplateLiteral(["\n padding-bottom: 20px;\n"]))),isUltimate=function isUltimate(company){return!!company.isGlobalUltimate},isGlobalHQ=function isGlobalHQ(company){return company.headquarterType&&"ghq"===company.headquarterType.name},hasManagedAccountDetails=function hasManagedAccountDetails(company){return company.oneListGroupTier&&function hasAllocatedLeadIta(company){return null!=company.oneListGroupGlobalAccountManager}(company)},CompanyLocalHeader=function CompanyLocalHeader(_ref){var _company$tradingNames,breadcrumbs=_ref.breadcrumbs,flashMessages=_ref.flashMessages,company=_ref.company,dnbRelatedCompaniesCount=_ref.dnbRelatedCompaniesCount,returnUrl=_ref.returnUrl,csrfToken=_ref.csrfToken;return company&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(LocalHeader.Z,{breadcrumbs:buildCompanyBreadcrumbs(breadcrumbs,company.id,company.name),flashMessages,children:[(0,jsx_runtime.jsxs)(govuk_react_grid_row_esm.Z,{children:[(0,jsx_runtime.jsxs)(govuk_react_grid_col_esm.Z,{setWidth:"two-thirds",children:[(0,jsx_runtime.jsx)(LocalHeaderHeading.Z,{"data-test":"heading",children:company.name}),(null==company||null===(_company$tradingNames=company.tradingNames)||void 0===_company$tradingNames?void 0:_company$tradingNames.length)>0&&(0,jsx_runtime.jsxs)(LocalHeaderTradingNames,{"data-test":"trading-names",children:["Trading as: ",company.tradingNames.join(", ")]}),(0,jsx_runtime.jsx)(StyledAddress,{"data-test":"address",children:(0,addresses.addressToStringResource)(company.address)}),dnbRelatedCompaniesCount>0&&(0,jsx_runtime.jsx)(StyledRelatedCompaniesWrapper,{children:(0,jsx_runtime.jsx)(govuk_react_esm.rU,{href:urls_default().companies.dnbHierarchy.tree(company.id),"data-test":"company-tree-link",children:"View company tree: ".concat(dnbRelatedCompaniesCount+1," companies")})})]}),(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWith:"one-third",children:(0,jsx_runtime.jsxs)(StyledButtonContainer,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:CompanyLocalHeader_StyledButtonLink,"data-test":"header-add-interaction",href:urls_default().companies.interactions.create(company.id),"aria-label":"Add interaction with ".concat(company.name),children:"Add interaction"}),(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:CompanyLocalHeader_StyledButtonLink,"data-test":"header-add-export-project",href:urls_default().exportPipeline.create(company.id),"aria-label":"Add export project",buttonColour:colours.nx,buttonTextColour:colours.cK,children:"Add export project"})]})})]}),(0,jsx_runtime.jsxs)(StyledList,{children:[(0,jsx_runtime.jsx)(CompanyLocalHeader_LocalHeaderCompanyLists,{company,returnUrl}),(0,jsx_runtime.jsx)(CompanyLocalHeader_LocalHeaderCompanyRefer,{companyId:company.id})]}),(isUltimate(company)||isGlobalHQ(company))&&(0,jsx_runtime.jsxs)(TypeWrapper,{children:[(0,jsx_runtime.jsx)(BadgeWrapper,{children:(0,jsx_runtime.jsx)(Badge.Z,{children:(0,jsx_runtime.jsx)(BadgeText,{"data-test":"badge",children:isUltimate(company)?"Ultimate HQ":"Global HQ"})})}),isUltimate(company)&&(0,jsx_runtime.jsxs)(StyledDetails,{summary:"What does Ultimate HQ mean?","data-test":"ultimate-hq-details",children:["This HQ is in control of all related company records for"," ",company.name,"."]})]}),hasManagedAccountDetails(company)&&(0,jsx_runtime.jsx)(StyledDescription,{"data-test":"description",children:hasManagedAccountDetails(company)&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("p",{children:["This is an account managed company (One List"," ",company.oneListGroupTier.name,")"]}),(0,jsx_runtime.jsxs)("p",{children:[isItaTierDAccount(company.oneListGroupTier)?"Lead ITA":"Global Account Manager",": ",company.oneListGroupGlobalAccountManager.name," ",(0,jsx_runtime.jsx)("a",{href:urls_default().companies.accountManagement.index(company.id),children:isItaTierDAccount(company.oneListGroupTier)?"View Lead adviser":"View core team"})]})]})})]}),company.archived&&(0,jsx_runtime.jsx)(ArchivePanel.Z,{archivedBy:company.archivedBy,archivedOn:company.archivedOn,archiveReason:company.archivedReason,unarchiveUrl:"".concat(urls_default().companies.unarchive(company.id),"?_csrf=").concat(csrfToken),type:"company"}),company.pendingDnbInvestigation&&(0,jsx_runtime.jsx)(StyledMain,{"data-test":"investigation-message",children:(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"This company record is based on information that has not yet been validated. This information is currently being checked by the Data Hub support team."})})]})};CompanyLocalHeader.propTypes={breadcrumbs:prop_types_default().arrayOf(prop_types_default().shape({link:prop_types_default().string,text:prop_types_default().string.isRequired})).isRequired,flashMessages:prop_types_default().shape({type:prop_types_default().oneOfType([prop_types_default().arrayOf(prop_types_default().shape({body:prop_types_default().string.isRequired,heading:prop_types_default().string.isRequired,id:prop_types_default().string})),prop_types_default().arrayOf(prop_types_default().string).isRequired])}),company:prop_types_default().object.isRequired,dnbRelatedCompaniesCount:prop_types_default().number,returnUrl:prop_types_default().string},CompanyLocalHeader.defaultProps={flashMessages:null,dnbRelatedCompaniesCount:null,returnUrl:null},CompanyLocalHeader.__docgenInfo={description:"",methods:[],displayName:"CompanyLocalHeader",props:{flashMessages:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"shape",value:{type:{name:"union",value:[{name:"arrayOf",value:{name:"shape",value:{body:{name:"string",required:!0},heading:{name:"string",required:!0},id:{name:"string",required:!1}}}},{name:"arrayOf",value:{name:"string"}}],required:!1}}},required:!1},dnbRelatedCompaniesCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},returnUrl:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},breadcrumbs:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{link:{name:"string",required:!1},text:{name:"string",required:!0}}}},required:!0},company:{description:"",type:{name:"object"},required:!0}}};var CompanyLocalTab_templateObject,CompanyLocalTab_templateObject2,CompanyLocalTab_templateObject3,_PropTypes$shape,govuk_react_paragraph_esm=__webpack_require__("./node_modules/@govuk-react/paragraph/dist/govuk-react-paragraph.esm.js"),govuk_react_warning_text_esm=__webpack_require__("./node_modules/@govuk-react/warning-text/dist/govuk-react-warning-text.esm.js");function CompanyLocalTab_typeof(o){return CompanyLocalTab_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyLocalTab_typeof(o)}function CompanyLocalTab_defineProperty(obj,key,value){return(key=function CompanyLocalTab_toPropertyKey(arg){var key=function CompanyLocalTab_toPrimitive(input,hint){if("object"!==CompanyLocalTab_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==CompanyLocalTab_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===CompanyLocalTab_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function CompanyLocalTab_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledListItem=styled_components_browser_esm.ZP.li(CompanyLocalTab_templateObject||(CompanyLocalTab_templateObject=CompanyLocalTab_taggedTemplateLiteral(["\n *,\n *:before,\n *:after {\n box-sizing: border-box;\n }\n border-left-width: 1px;\n text-align: center;\n border-bottom: 1px solid ",";\n\n @media (min-width: 1020px) {\n white-space: nowrap;\n }\n @media (max-width: 839px) {\n text-align: left;\n margin-left: 25px;\n line-height: 2.5em;\n border-bottom: none;\n &::before {\n content: '—';\n margin-left: -25px;\n padding-right: 5px;\n }\n a {\n width: calc(100% - 5px);\n }\n }\n"])),colours.FU),StyledAnchorTag=styled_components_browser_esm.ZP.a(CompanyLocalTab_templateObject2||(CompanyLocalTab_templateObject2=CompanyLocalTab_taggedTemplateLiteral(["\n display: inline-block;\n\n @media (min-width: 840px) {\n padding: 10px 11px;\n margin: 0 5px 0 0;\n &:link,\n &:visited,\n &:hover,\n &:active {\n color: ",";\n }\n background-color: ",";\n text-align: center;\n text-decoration: none;\n height: 90%;\n\n ","\n }\n"])),colours.E5,colours.zT,(function(props){return props.selected&&(0,styled_components_browser_esm.iv)(CompanyLocalTab_templateObject3||(CompanyLocalTab_templateObject3=CompanyLocalTab_taggedTemplateLiteral(["\n margin: -5px 5px -1px 0px;\n padding-top: 14px;\n padding-right: 19px;\n padding-bottom: 16px;\n padding-left: 19px;\n border: 1px solid ",";\n border-bottom: 0px;\n color: ",";\n background-color: ",";\n height: auto;\n "])),colours.FU,colours.E5,colours.Cj)})),CompanyLocalTab=function CompanyLocalTab(props){var navItem=props.navItem,index=props.index;return(0,jsx_runtime.jsx)(StyledListItem,{children:(0,jsx_runtime.jsx)(StyledAnchorTag,{selected:navItem.isActive,href:"".concat(navItem.url).concat(navItem.search?navItem.search:""),id:"tab-".concat(navItem.path),"aria-label":navItem.ariaDescription,children:navItem.label},"tab-link-".concat(navItem.path))},"tab-".concat(index))};CompanyLocalTab.displayName="CompanyLocalTab",CompanyLocalTab.propTypes={navItem:prop_types_default().shape((_PropTypes$shape={path:prop_types_default().string.isRequired,label:prop_types_default().string.isRequired,permissions:prop_types_default().array,url:prop_types_default().string.isRequired},CompanyLocalTab_defineProperty(_PropTypes$shape,"label",prop_types_default().string.isRequired),CompanyLocalTab_defineProperty(_PropTypes$shape,"isActive",prop_types_default().bool.isRequired),CompanyLocalTab_defineProperty(_PropTypes$shape,"ariaDescription",prop_types_default().string),_PropTypes$shape)).isRequired,index:prop_types_default().number.isRequired},CompanyLocalTab.__docgenInfo={description:"",methods:[],displayName:"CompanyLocalTab",props:{navItem:{description:"",type:{name:"shape",value:{path:{name:"string",required:!0},label:{name:"string",required:!0},permissions:{name:"array",required:!1},url:{name:"string",required:!0},isActive:{name:"bool",required:!0},ariaDescription:{name:"string",required:!1}}},required:!0},index:{description:"",type:{name:"number"},required:!0}}};const CompanyTabbedLocalNavigation_CompanyLocalTab=CompanyLocalTab;function CompanyTabbedLocalNavigation_typeof(o){return CompanyTabbedLocalNavigation_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyTabbedLocalNavigation_typeof(o)}var CompanyTabbedLocalNavigation_templateObject,CompanyTabbedLocalNavigation_templateObject2,CompanyTabbedLocalNavigation_templateObject3,CompanyTabbedLocalNavigation_templateObject4,CompanyTabbedLocalNavigation_templateObject5,CompanyTabbedLocalNavigation_PropTypes$shape;function CompanyTabbedLocalNavigation_defineProperty(obj,key,value){return(key=function CompanyTabbedLocalNavigation_toPropertyKey(arg){var key=function CompanyTabbedLocalNavigation_toPrimitive(input,hint){if("object"!==CompanyTabbedLocalNavigation_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==CompanyTabbedLocalNavigation_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===CompanyTabbedLocalNavigation_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function CompanyTabbedLocalNavigation_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledGridRow=styled_components_browser_esm.ZP.div(CompanyTabbedLocalNavigation_templateObject||(CompanyTabbedLocalNavigation_templateObject=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin-right: -15px;\n margin-left: -15px;\n"]))),StyledGridColumn=styled_components_browser_esm.ZP.div(CompanyTabbedLocalNavigation_templateObject2||(CompanyTabbedLocalNavigation_templateObject2=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n box-sizing: border-box;\n width: 100%;\n padding: 0 15px;\n @media (min-width: 840px) {\n width: 100%;\n float: left;\n }\n"]))),StyledNav=styled_components_browser_esm.ZP.nav(CompanyTabbedLocalNavigation_templateObject3||(CompanyTabbedLocalNavigation_templateObject3=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin-bottom: 15px;\n color: #0b0c0c;\n margin-top: 5px;\n @media (min-width: 840px) {\n margin-bottom: 30px;\n margin-top: 5px;\n }\n"]))),StyledUnorderedList=styled_components_browser_esm.ZP.ul(CompanyTabbedLocalNavigation_templateObject4||(CompanyTabbedLocalNavigation_templateObject4=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n border-bottom: none;\n @media (max-width: 839px) {\n display: block;\n padding-bottom: 20px;\n border-bottom: 0;\n }\n"]))),CompanyTabbedLocalNavigation_StyledLink=(0,styled_components_browser_esm.ZP)("a")(CompanyTabbedLocalNavigation_templateObject5||(CompanyTabbedLocalNavigation_templateObject5=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin-bottom: 0;\n"]))),showMatchingPrompt=function showMatchingPrompt(company){return!company.dunsNumber&&!company.pendingDnbInvestigation},CompanyTabbedLocalNavigation=function CompanyTabbedLocalNavigation(_ref){var localNavItems=_ref.localNavItems,company=_ref.company;return(0,jsx_runtime.jsxs)(StyledGridRow,{children:[showMatchingPrompt(company)&&(0,jsx_runtime.jsxs)(StatusMessage.Z,{colour:colours.E5,id:"ga-company-details-matching-prompt",children:[(0,jsx_runtime.jsx)(govuk_react_warning_text_esm.Z,{children:"Business details on this company record have not been verified and could be wrong."}),(0,jsx_runtime.jsxs)(govuk_react_details_esm.Z,{summary:"Why verify?",children:[(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Using verified business details from a trusted third-party supplier means we can keep certain information up to date automatically. This helps reduce duplicate records, provide a shared view of complex companies and make it more likely we can link other data sources together."}),(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Verification can often be done in just 4 clicks."})]}),(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:CompanyTabbedLocalNavigation_StyledLink,href:urls_default().companies.match.index(company.id),children:"Verify business details"})]}),(0,jsx_runtime.jsx)(StyledGridColumn,{children:(0,jsx_runtime.jsx)(StyledNav,{"aria-label":"local navigation","data-test":"tabbedLocalNav",children:(0,jsx_runtime.jsx)(StyledUnorderedList,{"data-test":"tabbedLocalNavList",children:null==localNavItems?void 0:localNavItems.map((function(navItem,index){return(0,jsx_runtime.jsx)(CompanyTabbedLocalNavigation_CompanyLocalTab,{navItem,index},"company-tab-".concat(index))}))})})})]})};CompanyTabbedLocalNavigation.displayName="CompanyTabbedLocalNavigation",CompanyTabbedLocalNavigation.propTypes={localNavItems:prop_types_default().arrayOf(prop_types_default().shape((CompanyTabbedLocalNavigation_PropTypes$shape={path:prop_types_default().string.isRequired,label:prop_types_default().string.isRequired,permissions:prop_types_default().array,url:prop_types_default().string.isRequired},CompanyTabbedLocalNavigation_defineProperty(CompanyTabbedLocalNavigation_PropTypes$shape,"label",prop_types_default().string.isRequired),CompanyTabbedLocalNavigation_defineProperty(CompanyTabbedLocalNavigation_PropTypes$shape,"isActive",prop_types_default().bool.isRequired),CompanyTabbedLocalNavigation_defineProperty(CompanyTabbedLocalNavigation_PropTypes$shape,"ariaDescription",prop_types_default().string),CompanyTabbedLocalNavigation_PropTypes$shape))).isRequired},CompanyTabbedLocalNavigation.__docgenInfo={description:"",methods:[],displayName:"CompanyTabbedLocalNavigation",props:{localNavItems:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{path:{name:"string",required:!0},label:{name:"string",required:!0},permissions:{name:"array",required:!1},url:{name:"string",required:!0},isActive:{name:"bool",required:!0},ariaDescription:{name:"string",required:!1}}}},required:!0}}};__webpack_require__("./src/client/components/ContactInformation/index.jsx");var govuk_react_error_summary_esm=__webpack_require__("./node_modules/@govuk-react/error-summary/dist/govuk-react-error-summary.esm.js"),govuk_react_inset_text_esm=__webpack_require__("./node_modules/@govuk-react/inset-text/dist/govuk-react-inset-text.esm.js"),govuk_react_list_item_esm=__webpack_require__("./node_modules/@govuk-react/list-item/dist/govuk-react-list-item.esm.js"),govuk_react_unordered_list_esm=__webpack_require__("./node_modules/@govuk-react/unordered-list/dist/govuk-react-unordered-list.esm.js"),DeleteCompanyListSection=function DeleteCompanyListSection(_ref){var companyList=_ref.companyList,errorMessage=_ref.errorMessage,onDelete=_ref.onDelete,returnUrl=_ref.returnUrl,companyCountText=pluralize_default()("company",companyList.item_count,!0);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LocalHeader.Z,{heading:"Delete list",breadcrumbs:[{link:urls_default().dashboard.index(),text:"Home"},{text:"Delete list"}]}),(0,jsx_runtime.jsxs)(Main.Z,{children:[errorMessage&&(0,jsx_runtime.jsx)(govuk_react_error_summary_esm.Z,{heading:"There was an error deleting this list",description:errorMessage,errors:[]}),(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Deleting this list will remove all companies from this list. These companies will remain on any other lists."}),(0,jsx_runtime.jsx)(govuk_react_inset_text_esm.Z,{children:(0,jsx_runtime.jsxs)(govuk_react_unordered_list_esm.Z,{listStyleType:"none",mb:0,children:[(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{"data-test":"list-name",children:(0,jsx_runtime.jsx)("strong",{children:companyList.name})}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{"data-test":"company-count",children:companyCountText})]})}),(0,jsx_runtime.jsxs)(FormActions.Z,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{buttonColour:colours.hM,onClick:onDelete,children:"Delete list"}),(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:returnUrl,"data-test":"return-link",children:"Return without deleting"})]})]})]})};DeleteCompanyListSection.propTypes={companyList:prop_types_default().object.isRequired,errorMessage:prop_types_default().string,onDelete:prop_types_default().func.isRequired,returnUrl:prop_types_default().string.isRequired},DeleteCompanyListSection.defaultProps={errorMessage:null},DeleteCompanyListSection.__docgenInfo={description:"",methods:[],displayName:"DeleteCompanyListSection",props:{errorMessage:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},companyList:{description:"",type:{name:"object"},required:!0},onDelete:{description:"",type:{name:"func"},required:!0},returnUrl:{description:"",type:{name:"string"},required:!0}}};var DateField=__webpack_require__("./src/client/components/DateField/index.jsx"),EntityList=__webpack_require__("./src/client/components/EntityList/index.jsx"),Main=__webpack_require__("./src/client/components/Main/index.jsx"),NewWindowLink=(__webpack_require__("./src/client/components/Metadata/index.jsx"),__webpack_require__("./src/client/components/NewWindowLink/index.jsx")),components_Pagination=(__webpack_require__("./src/client/components/NotificationBadge/index.jsx"),__webpack_require__("./src/client/components/Pagination/index.jsx")),SummaryTable=(__webpack_require__("./src/client/components/Panel/index.jsx"),__webpack_require__("./src/client/components/SummaryList/index.jsx"),__webpack_require__("./src/client/components/SummaryTable/index.jsx")),FieldTypeahead=__webpack_require__("./src/client/components/Form/elements/FieldTypeahead/index.jsx"),formatAdviser=__webpack_require__("./src/common/formatAdviser.js"),utils=__webpack_require__("./src/client/components/Task/utils.js");function FieldAdvisersTypeahead_typeof(o){return FieldAdvisersTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FieldAdvisersTypeahead_typeof(o)}var FieldAdvisersTypeahead_excluded=["name","label","required","isMulti","onlyShowActiveAdvisers","placeholder"];function FieldAdvisersTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FieldAdvisersTypeahead_defineProperty(obj,key,value){return(key=function FieldAdvisersTypeahead_toPropertyKey(arg){var key=function FieldAdvisersTypeahead_toPrimitive(input,hint){if("object"!==FieldAdvisersTypeahead_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==FieldAdvisersTypeahead_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===FieldAdvisersTypeahead_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function FieldAdvisersTypeahead_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function FieldAdvisersTypeahead_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FieldAdvisersTypeahead=function FieldAdvisersTypeahead(_ref){var name=_ref.name,label=_ref.label,required=_ref.required,isMulti=_ref.isMulti,_ref$onlyShowActiveAd=_ref.onlyShowActiveAdvisers,onlyShowActiveAdvisers=void 0===_ref$onlyShowActiveAd||_ref$onlyShowActiveAd,_ref$placeholder=_ref.placeholder,placeholder=void 0===_ref$placeholder?"Type to search for advisers":_ref$placeholder,props=FieldAdvisersTypeahead_objectWithoutProperties(_ref,FieldAdvisersTypeahead_excluded);return(0,jsx_runtime.jsx)(FieldTypeahead.Z,function FieldAdvisersTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledTextareaWrapper=(0,styled_components_browser_esm.ZP)("div")(FieldTextarea_templateObject||(FieldTextarea_templateObject=function FieldTextarea_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n textarea {\n width: 100%;\n }\n"])),(function(props){return props.error&&"\n border-left: ".concat(govuk_react_constants_esm.Ok," solid ").concat(colours.h,";\n margin-right: ").concat(govuk_react_constants_esm.N_.SCALE_3,";\n padding-left: ").concat(govuk_react_constants_esm.N_.SCALE_2,";\n ")})),FieldTextarea=function FieldTextarea(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,rest=FieldTextarea_objectWithoutProperties(_ref,FieldTextarea_excluded),_useField=(0,hooks.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur;return(0,jsx_runtime.jsx)(FieldWrapper.Z,{name,label,legend,hint,error,children:(0,jsx_runtime.jsxs)(StyledTextareaWrapper,{error,children:[touched&&error&&(0,jsx_runtime.jsx)(govuk_react_error_text_esm.Z,{children:error}),(0,jsx_runtime.jsx)(govuk_react_text_area_esm.N7,FieldTextarea_objectSpread({id:name,error:touched&&error,name,value,onChange,onBlur,rows:"5"},rest),name)]})})};FieldTextarea.displayName="FieldTextarea",FieldTextarea.propTypes={name:prop_types_default().string.isRequired,validate:prop_types_default().oneOfType([prop_types_default().func,prop_types_default().arrayOf(prop_types_default().func)]),required:prop_types_default().string,label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,initialValue:prop_types_default().string},FieldTextarea.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:""},FieldTextarea.__docgenInfo={description:"",methods:[],displayName:"FieldTextarea",props:{validate:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},name:{description:"",type:{name:"string"},required:!0}}};const elements_FieldTextarea=FieldTextarea;var FieldUneditable=function FieldUneditable(_ref){var name=_ref.name,label=_ref.label,legend=_ref.legend,hint=_ref.hint,onChangeClick=_ref.onChangeClick,children=_ref.children;return(0,jsx_runtime.jsxs)(FieldWrapper.Z,{name,label,legend,hint,children:[children," ",onChangeClick&&(0,jsx_runtime.jsxs)(ButtonLink.Z,{inline:!0,type:"button",onClick:onChangeClick,children:["Change ",(0,jsx_runtime.jsx)(govuk_react_visually_hidden_esm.Z,{children:label||legend})]})]})};FieldUneditable.displayName="FieldUneditable",FieldUneditable.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,onChangeClick:prop_types_default().func,children:prop_types_default().node.isRequired},FieldUneditable.defaultProps={label:null,legend:null,hint:null,onChangeClick:null},FieldUneditable.__docgenInfo={description:"",methods:[],displayName:"FieldUneditable",props:{label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},onChangeClick:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},name:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"node"},required:!0}}};const elements_FieldUneditable=FieldUneditable;var govuk_react_icons_esm=__webpack_require__("./node_modules/@govuk-react/icons/dist/govuk-react-icons.esm.js"),govuk_react_form_group_esm=__webpack_require__("./node_modules/@govuk-react/form-group/dist/govuk-react-form-group.esm.js");function useAddressSearch_typeof(o){return useAddressSearch_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},useAddressSearch_typeof(o)}function useAddressSearch_regeneratorRuntime(){useAddressSearch_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==useAddressSearch_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function useAddressSearch_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function useAddressSearch_slicedToArray(arr,i){return function useAddressSearch_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function useAddressSearch_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function useAddressSearch_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return useAddressSearch_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useAddressSearch_arrayLikeToArray(o,minLen)}(arr,i)||function useAddressSearch_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function useAddressSearch_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function usePostcodeLookup_toConsumableArray(arr){return function usePostcodeLookup_arrayWithoutHoles(arr){if(Array.isArray(arr))return usePostcodeLookup_arrayLikeToArray(arr)}(arr)||function usePostcodeLookup_iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function usePostcodeLookup_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return usePostcodeLookup_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return usePostcodeLookup_arrayLikeToArray(o,minLen)}(arr)||function usePostcodeLookup_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function usePostcodeLookup_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&(0,jsx_runtime.jsx)(govuk_react_form_group_esm.Z,{children:(0,jsx_runtime.jsx)(govuk_react_select_esm.ZP,{label:"Select an address",onChange:function onAddressSelect(evt){var index=evt.target.selectedIndex;if(0!==index){var address=addressList[index];setFieldValue("postcode",address.postcode),setFieldValue("address1",address.address1),setFieldValue("address2",address.address2),setFieldValue("city",address.city),setFieldValue("county",address.county),setFieldValue("country",isCountrySelectable?address.country:country.id),setFieldValue("country",country.id),onSelectUKAddress&&onSelectUKAddress(address)}},children:addressList.map((function(_ref2,index){var address1=_ref2.address1;return(0,jsx_runtime.jsx)("option",{value:index,children:address1},index)}))})})]}),(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"address1",label:"Address line 1",required:"Enter an address",initialValue:null==initialValue?void 0:initialValue.address1}),(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"address2",label:"Address line 2 (optional)",initialValue:null==initialValue?void 0:initialValue.address2}),(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"city",label:"Town or city",required:"Enter a town or city",initialValue:null==initialValue?void 0:initialValue.town}),(!(isUS||isCanada||hideCountyField)||useStaticCountyField)&&(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"county",label:"County (optional)",initialValue:null==initialValue?void 0:initialValue.county}),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[function renderUsStateField(useStaticCountyField){if(isUS&&(null==usStates?void 0:usStates.length)>0&&!useStaticCountyField)return(0,jsx_runtime.jsx)(FieldSelect.Z,{type:"text",name:"area",label:"State",options:usStates,required:"Select a state",emptyOption:"Select"})}(useStaticCountyField),function renderCanadaProvinceField(useStaticCountyField){if(isCanada&&(null==canadaProvinces?void 0:canadaProvinces.length)>0&&!useStaticCountyField)return(0,jsx_runtime.jsx)(FieldSelect.Z,{type:"text",name:"areaCanada",label:"Province",options:canadaProvinces,required:"Select a province",emptyOption:"Select"})}(useStaticCountyField),administrativeAreaSearchError&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"Error occurred while retrieving Administrative Areas."})]}),useStaticPostcodeField&&(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"postcode",label:postcodeLabel(isPostcodeRequired),required:postcodeErrorMessage(isPostcodeRequired),maxLength:10,validate:postcodeValidator,initialValue:null==initialValue?void 0:initialValue.postcode}),!isUK&&country_form_value!==common_constants.UNITED_KINGDOM_ID&&!useStaticPostcodeField&&(0,jsx_runtime.jsx)(StyledFieldPostcode,{type:"text",name:"postcode",label:postcodeLabel(isPostcodeRequired),required:postcodeErrorMessage(isPostcodeRequired),maxLength:null,validate:postcodeValidator})]})]})};FieldAddress.displayName="FieldAddress",FieldAddress.propTypes={label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,name:prop_types_default().string.isRequired,apiEndpoint:prop_types_default().string,onSelectUKAddress:prop_types_default().func,isCountrySelectable:prop_types_default().any,country:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired})},FieldAddress.__docgenInfo={description:"",methods:[],displayName:"FieldAddress",props:{hideCountyField:{defaultValue:{value:"false",computed:!1},required:!1},initialValue:{defaultValue:{value:"null",computed:!1},required:!1},useStaticPostcodeField:{defaultValue:{value:"false",computed:!1},required:!1},isPostcodeRequired:{defaultValue:{value:"false",computed:!1},required:!1},showBorder:{defaultValue:{value:"true",computed:!1},required:!1},useStaticCountyField:{defaultValue:{value:"false",computed:!1},required:!1},label:{description:"",type:{name:"node"},required:!1},legend:{description:"",type:{name:"node"},required:!1},hint:{description:"",type:{name:"node"},required:!1},name:{description:"",type:{name:"string"},required:!0},apiEndpoint:{description:"",type:{name:"string"},required:!1},onSelectUKAddress:{description:"",type:{name:"func"},required:!1},isCountrySelectable:{description:"",type:{name:"any"},required:!1},country:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0}}},required:!1}}};const elements_FieldAddress=FieldAddress;var FieldRadios=__webpack_require__("./src/client/components/Form/elements/FieldRadios/index.jsx"),EntityListItem=__webpack_require__("./src/client/components/EntityList/EntityListItem.jsx");function FieldCompany_typeof(o){return FieldCompany_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FieldCompany_typeof(o)}function FieldCompany_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FieldCompany_defineProperty(obj,key,value){return(key=function FieldCompany_toPropertyKey(arg){var key=function FieldCompany_toPrimitive(input,hint){if("object"!==FieldCompany_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==FieldCompany_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===FieldCompany_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var validateMinLength=function validateMinLength(minLength){return function(value){return value&&value.lengthmaxLength?"".concat(pluralize_default()("character",value.length-maxLength,!0)," too long"):null}},CompanyItemRenderer=function CompanyItemRenderer(item){var _useFormContext=(0,hooks.Gc)(),setFieldValue=_useFormContext.setFieldValue,goForward=_useFormContext.goForward;return(0,jsx_runtime.jsx)(EntityListItem.Z,function FieldCompany_objectSpread(e){for(var r=1;r0&&(0,jsx_runtime.jsx)(govuk_react_loading_box_esm.Z,{loading:progress,children:(0,jsx_runtime.jsx)(EntityList.Z,{entities:results,entityRenderer:CompanyItemRenderer})})]}),0===results.length&&!progress&&(0,jsx_runtime.jsxs)(StyledParagraph,{children:["If you can't find the company you're looking for,"," ",(0,jsx_runtime.jsxs)(govuk_react_link_esm.Z,{href:urls_default().companies.create(),"aria-label":"Add a new company",children:["add a new company."," "]}),"Unfortunately you will lose your progress."]})]})]})};FieldCompany.displayName="FieldCompany",FieldCompany.__docgenInfo={description:"",methods:[],displayName:"FieldCompany"};function useEntitySearch_typeof(o){return useEntitySearch_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},useEntitySearch_typeof(o)}function useEntitySearch_regeneratorRuntime(){useEntitySearch_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==useEntitySearch_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function useEntitySearch_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function useEntitySearch_slicedToArray(arr,i){return function useEntitySearch_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function useEntitySearch_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function useEntitySearch_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return useEntitySearch_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useEntitySearch_arrayLikeToArray(o,minLen)}(arr,i)||function useEntitySearch_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function useEntitySearch_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==_args[0]?_args[0]:{},_context.prev=1,setSearching(!0),setError(null),_context.next=6,searchEntitiesCallback(filters);case 6:newEntities=_context.sent,setEntities(newEntities),_context.next=14;break;case 10:_context.prev=10,_context.t0=_context.catch(1),setEntities([]),setError("Error occurred while searching entities.");case 14:return _context.prev=14,setSearching(!1),setSearched(!0),_context.finish(14);case 18:case"end":return _context.stop()}}),_callee,null,[[1,10,14,18]])}))),_onEntitySearch.apply(this,arguments)}return{onEntitySearch:function onEntitySearch(){return _onEntitySearch.apply(this,arguments)},entities,error,searching,searched}};var useDnbSearch=__webpack_require__("./src/client/components/EntityList/useDnbSearch.jsx"),FormLayout=function FormLayout(_ref){var setWidth=_ref.setWidth,children=_ref.children;return(0,jsx_runtime.jsx)(govuk_react_grid_row_esm.Z,{children:(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWidth,children})})};FormLayout.displayName="FormLayout",FormLayout.propTypes={setWidth:prop_types_default().string.isRequired,children:prop_types_default().element.isRequired},FormLayout.__docgenInfo={description:"",methods:[],displayName:"FormLayout",props:{setWidth:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"element"},required:!0}}};const Layout_FormLayout=FormLayout;function FieldDnbCompany_typeof(o){return FieldDnbCompany_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FieldDnbCompany_typeof(o)}var FieldDnbCompany_templateObject;function FieldDnbCompany_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FieldDnbCompany_objectSpread(e){for(var r=1;rmaxLength?"".concat(pluralize_default()("character",value.length-maxLength,!0)," too long"):null}},FieldDnbCompany=function FieldDnbCompany(_ref){var name=_ref.name,label=_ref.label,legend=_ref.legend,hint=_ref.hint,country=_ref.country,apiEndpoint=_ref.apiEndpoint,queryParams=_ref.queryParams,entityRenderer=_ref.entityRenderer,onCannotFind=_ref.onCannotFind,searchResultsMessage=_ref.searchResultsMessage,features=_ref.features,_useFormContext=(0,hooks.Gc)(),values=_useFormContext.values,goBack=_useFormContext.goBack,validateForm=_useFormContext.validateForm,setIsLoading=_useFormContext.setIsLoading,findCompany=(0,useDnbSearch.Z)(apiEndpoint,features).findCompany,_useEntitySearch=EntityList_useEntitySearch(findCompany),onEntitySearch=_useEntitySearch.onEntitySearch,searching=_useEntitySearch.searching,searched=_useEntitySearch.searched,error=_useEntitySearch.error,entities=_useEntitySearch.entities;return(0,react.useEffect)((function(){return setIsLoading(searching)}),[searching]),(0,jsx_runtime.jsx)(Layout_FormLayout,{setWidth:common_constants.FORM_LAYOUT.THREE_QUARTERS,children:(0,jsx_runtime.jsxs)(FieldWrapper.Z,{name,label,legend,hint,children:[country&&(0,jsx_runtime.jsx)(elements_FieldUneditable,{legend:"Country",name:"dnbCountry",onChangeClick:goBack,children:country}),(0,jsx_runtime.jsx)(FieldInput.Z,{label:"Company name",name:"dnbCompanyName",type:"search",required:"Enter company name",validate:[FieldDnbCompany_validateMinLength(2),FieldDnbCompany_validateMaxLength(60)]}),(0,jsx_runtime.jsx)(FieldInput.Z,{label:"Company postcode (optional)",name:"dnbPostalCode",style:{width:govuk_react_constants_esm.n["one-third"]},type:"search"}),(0,jsx_runtime.jsx)(FormActions.Z,{children:(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{icon:(0,jsx_runtime.jsx)(govuk_react_icons_esm.HN,{}),onClick:function onSearchClick(e){return e.preventDefault(),(0,lodash.isEmpty)(validateForm())?onEntitySearch((0,lodash.omitBy)(FieldDnbCompany_objectSpread(FieldDnbCompany_objectSpread({},queryParams),{},{search_term:values.dnbCompanyName,postal_code:values.dnbPostalCode}),lodash.isEmpty)):null},children:"Find company"})}),searched&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[entities.length>0&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[searchResultsMessage&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:searchResultsMessage}),(0,jsx_runtime.jsx)(EntityList.Z,{entities,entityRenderer})]}),!error&&0===entities.length&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"No match found. Try one of the options below."}),error&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"Error occurred while searching for company."}),(0,jsx_runtime.jsxs)(govuk_react_details_esm.Z,{summary:"I can't find what I'm looking for",children:[(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Try:"}),(0,jsx_runtime.jsxs)(FieldDnbCompany_StyledUnorderedList,{children:[(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"checking or removing the postcode"}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:'removing "limited" or "ltd"'}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"checking for spelling errors"}),country&&(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"checking if the right country was selected"}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"check you're using the company's registered name"})]}),onCannotFind&&(0,jsx_runtime.jsx)(ButtonLink.Z,{onClick:onCannotFind,children:"I still can't find what I'm looking for"})]})]})]})})};FieldDnbCompany.displayName="FieldDnbCompany",FieldDnbCompany.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,country:prop_types_default().string,apiEndpoint:prop_types_default().string.isRequired,queryParams:prop_types_default().shape({}),entityRenderer:prop_types_default().func,onCannotFind:prop_types_default().func,searchResultsMessage:prop_types_default().string},FieldDnbCompany.defaultProps={label:null,legend:null,hint:null,country:null,queryParams:{},entityRenderer:void 0,onCannotFind:null,searchResultsMessage:"The search results below are verified company records from an external and verified source of company information."},FieldDnbCompany.__docgenInfo={description:"",methods:[],displayName:"FieldDnbCompany",props:{label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},country:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},queryParams:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{}},required:!1},entityRenderer:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"func"},required:!1},onCannotFind:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},searchResultsMessage:{defaultValue:{value:"'The search results below are verified company records from an external and verified source of company information.'",computed:!1},description:"",type:{name:"string"},required:!1},name:{description:"",type:{name:"string"},required:!0},apiEndpoint:{description:"",type:{name:"string"},required:!0}}};__webpack_require__("./src/client/components/Form/elements/FieldHelp/index.jsx"),__webpack_require__("./src/client/components/Form/elements/Step.jsx");var ReadMore=__webpack_require__("./src/client/components/ReadMore/index.jsx"),components_Typeahead=__webpack_require__("./src/client/components/Typeahead/index.jsx");function RoutedTypeahead_typeof(o){return RoutedTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedTypeahead_typeof(o)}var RoutedTypeahead_templateObject,RoutedTypeahead_excluded=["name","qsParam","label","hint","isMulti","placeholder","closeMenuOnSelect","selectedOptions","loadOptions","noOptionsMessage","options","labelAsQueryParam"];function RoutedTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function RoutedTypeahead_defineProperty(obj,key,value){return(key=function RoutedTypeahead_toPropertyKey(arg){var key=function RoutedTypeahead_toPrimitive(input,hint){if("object"!==RoutedTypeahead_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==RoutedTypeahead_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===RoutedTypeahead_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var StyledFieldWrapper=(0,styled_components_browser_esm.ZP)(FieldWrapper.Z)(RoutedTypeahead_templateObject||(RoutedTypeahead_templateObject=function RoutedTypeahead_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n label {\n font-weight: ",";\n line-height: ",";\n }\n"])),govuk_react_constants_esm.Xw.bold,govuk_react_constants_esm.Ac.SIZE_16),getParamIds=function getParamIds(qsParam,pickedOptions){return RoutedTypeahead_defineProperty({},qsParam,pickedOptions?pickedOptions.map((function(_ref){return _ref.value})):[])},getParamLabels=function getParamLabels(qsParam,pickedOptions){return RoutedTypeahead_defineProperty({},qsParam,pickedOptions?pickedOptions.map((function(_ref3){return _ref3.label})):[])},RoutedTypeahead=function RoutedTypeahead(_ref5){var name=_ref5.name,qsParam=_ref5.qsParam,label=_ref5.label,hint=_ref5.hint,isMulti=_ref5.isMulti,placeholder=_ref5.placeholder,closeMenuOnSelect=_ref5.closeMenuOnSelect,selectedOptions=_ref5.selectedOptions,loadOptions=_ref5.loadOptions,noOptionsMessage=_ref5.noOptionsMessage,options=_ref5.options,labelAsQueryParam=_ref5.labelAsQueryParam,props=RoutedTypeahead_objectWithoutProperties(_ref5,RoutedTypeahead_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref6){var history=_ref6.history,location=_ref6.location,qsParams=lib_default().parse(location.search.slice(1));return(0,jsx_runtime.jsx)(StyledFieldWrapper,RoutedTypeahead_objectSpread(RoutedTypeahead_objectSpread({label,name,hint},props),{},{children:(0,jsx_runtime.jsx)(components_Typeahead.Z,{name,"aria-label":label||name,placeholder,initialOptions:options,closeMenuOnSelect,isMulti,value:selectedOptions.map((function(_ref7){return{value:_ref7.value,label:_ref7.label}})),loadOptions,noOptionsMessage,onChange:function onChange(pickedOptions){history.push({search:lib_default().stringify(RoutedTypeahead_objectSpread(RoutedTypeahead_objectSpread(RoutedTypeahead_objectSpread({},qsParams),labelAsQueryParam?getParamLabels(qsParam,pickedOptions):getParamIds(qsParam,pickedOptions)),{},{page:1}))})}})}))}})};RoutedTypeahead.displayName="RoutedTypeahead",RoutedTypeahead.propTypes={name:prop_types_default().string.isRequired,qsParam:prop_types_default().string.isRequired,labelAsQueryParam:prop_types_default().bool},RoutedTypeahead.defaultProps={labelAsQueryParam:!1},RoutedTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedTypeahead",props:{labelAsQueryParam:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},qsParam:{description:"",type:{name:"string"},required:!0}}};const components_RoutedTypeahead=RoutedTypeahead;function RoutedAdvisersTypeahead_typeof(o){return RoutedAdvisersTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedAdvisersTypeahead_typeof(o)}var RoutedAdvisersTypeahead_excluded=["taskProps","closeMenuOnSelect","onlyShowActiveAdvisers","loadOptions"];function RoutedAdvisersTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedAdvisersTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedAdvisersTypeahead=function RoutedAdvisersTypeahead(_ref2){var taskProps=_ref2.taskProps,closeMenuOnSelect=_ref2.closeMenuOnSelect,_ref2$onlyShowActiveA=_ref2.onlyShowActiveAdvisers,onlyShowActiveAdvisers=void 0===_ref2$onlyShowActiveA||_ref2$onlyShowActiveA,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?function fetchAdvisers(onlyShowActiveAdvisers){return(0,lodash.throttle)((function(searchString){return searchString.length?utils.Q8.get("/adviser/",{params:{autocomplete:searchString,is_active:!!onlyShowActiveAdvisers||null}}).then((function(_ref){var results=_ref.data.results;return(0,formatAdviser.parseAdviserData)(results)})):Promise.resolve([])}),500)}(onlyShowActiveAdvisers):_ref2$loadOptions,props=RoutedAdvisersTypeahead_objectWithoutProperties(_ref2,RoutedAdvisersTypeahead_excluded);return(0,jsx_runtime.jsx)(Task.Z.Status,RoutedAdvisersTypeahead_objectSpread(RoutedAdvisersTypeahead_objectSpread({},taskProps),{},{progressOverlay:!0,children:function children(){return(0,jsx_runtime.jsx)(components_RoutedTypeahead,RoutedAdvisersTypeahead_objectSpread({loadOptions,closeMenuOnSelect},props))}}))};RoutedAdvisersTypeahead.displayName="RoutedAdvisersTypeahead",RoutedAdvisersTypeahead.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().string,taskProps:prop_types_default().shape({name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired}).isRequired,closeMenuOnSelect:prop_types_default().bool},RoutedAdvisersTypeahead.defaultProps={closeMenuOnSelect:!0},RoutedAdvisersTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedAdvisersTypeahead",props:{onlyShowActiveAdvisers:{defaultValue:{value:"true",computed:!1},required:!1},loadOptions:{defaultValue:{value:"fetchAdvisers(onlyShowActiveAdvisers)",computed:!0},required:!1},closeMenuOnSelect:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},label:{description:"",type:{name:"string"},required:!1},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!0},id:{name:"string",required:!0}}},required:!0}}};const components_RoutedAdvisersTypeahead=RoutedAdvisersTypeahead;__webpack_require__("./node_modules/core-js/modules/es.string.trim.js");var client_transformers=__webpack_require__("./src/client/transformers/index.js");function RoutedCompanyTypeahead_typeof(o){return RoutedCompanyTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedCompanyTypeahead_typeof(o)}var RoutedCompanyTypeahead_excluded=["taskProps","loadOptions","closeMenuOnSelect"];function RoutedCompanyTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedCompanyTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var fetchCompanies=function fetchCompanies(){return(0,lodash.throttle)((function(searchString){return searchString.length?utils.Q8.get("/v4/company",{params:{autocomplete:searchString}}).then((function(_ref){return function parseCompanyData(companies){return companies.filter((function(company){return company.name&&company.name.trim().length})).map(client_transformers.TZ)}(_ref.data.results)})):Promise.resolve([])}),500)},RoutedCompanyTypeahead=function RoutedCompanyTypeahead(_ref2){var taskProps=_ref2.taskProps,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?fetchCompanies():_ref2$loadOptions,closeMenuOnSelect=_ref2.closeMenuOnSelect,props=RoutedCompanyTypeahead_objectWithoutProperties(_ref2,RoutedCompanyTypeahead_excluded);return(0,jsx_runtime.jsx)(Task.Z.Status,RoutedCompanyTypeahead_objectSpread(RoutedCompanyTypeahead_objectSpread({},taskProps),{},{progressOverlay:!0,children:function children(){return(0,jsx_runtime.jsx)(components_RoutedTypeahead,RoutedCompanyTypeahead_objectSpread({loadOptions,closeMenuOnSelect},props))}}))};RoutedCompanyTypeahead.displayName="RoutedCompanyTypeahead",RoutedCompanyTypeahead.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().string,taskProps:prop_types_default().shape({name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired}).isRequired,closeMenuOnSelect:prop_types_default().bool},RoutedCompanyTypeahead.defaultProps={closeMenuOnSelect:!0},RoutedCompanyTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedCompanyTypeahead",props:{loadOptions:{defaultValue:{value:"fetchCompanies()",computed:!0},required:!1},closeMenuOnSelect:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},label:{description:"",type:{name:"string"},required:!1},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!0},id:{name:"string",required:!0}}},required:!0}}};const components_RoutedCompanyTypeahead=RoutedCompanyTypeahead;var ToggleSection=__webpack_require__("./src/client/components/ToggleSection/index.jsx"),DownloadDataHeader=(__webpack_require__("./src/client/components/Pagination/RoutedPagination.jsx"),__webpack_require__("./node_modules/core-js/modules/es.object.from-entries.js"),__webpack_require__("./src/client/components/DownloadDataHeader/index.jsx"));function RoutedDownloadDataHeader_typeof(o){return RoutedDownloadDataHeader_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedDownloadDataHeader_typeof(o)}var RoutedDownloadDataHeader_excluded=["page"],RoutedDownloadDataHeader_excluded2=["baseDownloadLink"];function RoutedDownloadDataHeader_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedDownloadDataHeader_defineProperty(obj,key,value){return(key=function RoutedDownloadDataHeader_toPropertyKey(arg){var key=function RoutedDownloadDataHeader_toPrimitive(input,hint){if("object"!==RoutedDownloadDataHeader_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==RoutedDownloadDataHeader_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===RoutedDownloadDataHeader_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function RoutedDownloadDataHeader_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function RoutedDownloadDataHeader_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var isBool=function isBool(value){return["true","false"].includes(value)},getDownloadLinkFromLocation=function getDownloadLinkFromLocation(location,baseDownloadLink){var _qs$parse=lib_default().parse(location.search.slice(1)),queryString=(_qs$parse.page,function getQueryStringFromQueryParams(params){var transformedParams={};for(var param in params){var field=params[param];(0,lodash.isArray)(field)&&field.every(isBool)?1===field.length&&(transformedParams[param]="true"===field[0]):transformedParams[param]=params[param]}return lib_default().stringify(transformedParams)}(RoutedDownloadDataHeader_objectWithoutProperties(_qs$parse,RoutedDownloadDataHeader_excluded)));return queryString?"".concat(baseDownloadLink,"?").concat(queryString):baseDownloadLink},RoutedDownloadDataHeader=function RoutedDownloadDataHeader(_ref){var baseDownloadLink=_ref.baseDownloadLink,props=RoutedDownloadDataHeader_objectWithoutProperties(_ref,RoutedDownloadDataHeader_excluded2);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var location=_ref2.location,downloadLink=getDownloadLinkFromLocation(location,baseDownloadLink);return(0,jsx_runtime.jsx)(DownloadDataHeader.Z,function RoutedDownloadDataHeader_objectSpread(e){for(var r=1;r div {\n border: none;\n }\n border-bottom: "," solid ",";\n"])),govuk_react_constants_esm.N_.SCALE_1,colours.E5),StyledDiv=(0,styled_components_browser_esm.ZP)("div")(FilteredCollectionHeader_templateObject6||(FilteredCollectionHeader_templateObject6=FilteredCollectionHeader_taggedTemplateLiteral(["\n display: flex;\n flex: 50%;\n align-items: center;\n flex-flow: nowrap;\n\n h2 {\n flex-grow: 2;\n }\n\n button {\n text-align: right;\n width: auto;\n margin: 0;\n }\n"]))),StyledSummary=(0,styled_components_browser_esm.ZP)("div")(FilteredCollectionHeader_templateObject7||(FilteredCollectionHeader_templateObject7=FilteredCollectionHeader_taggedTemplateLiteral(["\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),StyledSummaryTotal=(0,styled_components_browser_esm.ZP)("span")(FilteredCollectionHeader_templateObject8||(FilteredCollectionHeader_templateObject8=FilteredCollectionHeader_taggedTemplateLiteral(["\n font-weight: ",";\n"])),govuk_react_constants_esm.Xw.bold),RoutedFilterChipsCollection=function RoutedFilterChipsCollection(_ref){var selectedFilters=_ref.selectedFilters;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:Object.keys(selectedFilters).map((function(key){return(0,jsx_runtime.jsx)(components_RoutedFilterChips,{selectedOptions:selectedFilters[key].options,qsParamName:selectedFilters[key].queryParam},key)}))})};function FilteredCollectionHeader(_ref2){var totalItems=_ref2.totalItems,summary=_ref2.summary,_ref2$collectionName=_ref2.collectionName,collectionName=void 0===_ref2$collectionName?"result":_ref2$collectionName,_ref2$addItemUrl=_ref2.addItemUrl,addItemUrl=void 0===_ref2$addItemUrl?null:_ref2$addItemUrl,selectedFilters=_ref2.selectedFilters,hasFilters=_ref2.hasFilters,_ref2$useReactRouter=_ref2.useReactRouter,useReactRouter=void 0!==_ref2$useReactRouter&&_ref2$useReactRouter,formattedTotal=(0,number_utils.gH)(totalItems),counterSuffix=pluralize_default()(collectionName,totalItems),actions=addItemUrl&&(useReactRouter?(0,jsx_runtime.jsxs)(govuk_react_button_esm.Z,{id:"add-".concat((0,lodash.kebabCase)(collectionName)),as:StyledReactRouterLink,to:addItemUrl,buttonColour:colours.nx,buttonTextColour:colours.E5,"data-test":"add-collection-item-button",children:["Add ",collectionName]}):(0,jsx_runtime.jsxs)(govuk_react_button_esm.Z,{id:"add-".concat((0,lodash.kebabCase)(collectionName)),as:FilteredCollectionHeader_StyledLink,href:addItemUrl,buttonColour:colours.nx,buttonTextColour:colours.E5,"data-test":"add-collection-item-button",children:["Add ",collectionName]}));return(0,jsx_runtime.jsxs)(CollectionHeaderRowContainer,{children:[(0,jsx_runtime.jsx)(CollectionHeaderRow.Z,{actions,children:(0,jsx_runtime.jsxs)(StyledDiv,{role:"status",children:[(0,jsx_runtime.jsxs)(StyledHeaderText,{children:[(0,jsx_runtime.jsx)(StyledResultCount,{"data-test":"collectionCount",children:formattedTotal})," ",counterSuffix]}),hasFilters&&(0,jsx_runtime.jsx)(components_FilterReset,{"data-test":"clear-filters",id:"clear-filters",children:"Remove all filters"})]})}),summary&&(0,jsx_runtime.jsxs)(StyledSummary,{"data-test":"summary",children:["Total value:"," ",(0,jsx_runtime.jsxs)(StyledSummaryTotal,{children:["£",(0,number_utils.gH)(summary.total_subtotal_cost/100)]})]}),(0,jsx_runtime.jsx)(CollectionHeaderRow.Z,{"data-test":"filter-chips",id:"filter-chips",children:(0,jsx_runtime.jsx)(RoutedFilterChipsCollection,{selectedFilters})})]})}FilteredCollectionHeader.displayName="FilteredCollectionHeader",FilteredCollectionHeader.propTypes={totalItems:prop_types_default().number.isRequired,summary:prop_types_default().object,collectionName:prop_types_default().string.isRequired,addItemUrl:prop_types_default().string,selectedFilters:prop_types_default().objectOf(prop_types_default().shape({queryParam:prop_types_default().string.isRequired,options:prop_types_default().arrayOf(prop_types_default().shape({value:prop_types_default().string.isRequired,label:prop_types_default().string,categoryLabel:prop_types_default().string}))}))},FilteredCollectionHeader.__docgenInfo={description:"",methods:[],displayName:"FilteredCollectionHeader",props:{collectionName:{defaultValue:{value:"'result'",computed:!1},description:"",type:{name:"string"},required:!1},addItemUrl:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},totalItems:{description:"",type:{name:"number"},required:!0},summary:{description:"",type:{name:"object"},required:!1},selectedFilters:{description:"",type:{name:"objectOf",value:{name:"shape",value:{queryParam:{name:"string",required:!0},options:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!0},label:{name:"string",required:!1},categoryLabel:{name:"string",required:!1}}},required:!1}}}},required:!1}}};const FilteredCollectionList_FilteredCollectionHeader=FilteredCollectionHeader;function FilteredCollectionList_typeof(o){return FilteredCollectionList_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FilteredCollectionList_typeof(o)}function FilteredCollectionList_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FilteredCollectionList_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&void 0!==arguments[1]?arguments[1]:1,pageNumber=parseInt(qsParams.page,10);return isNaN(pageNumber)?defaultValue:pageNumber}(qsParams);return defaultQueryParams&&(0,lodash.isEmpty)(qsParams)&&history.push({search:lib_default().stringify(FilteredCollectionList_objectSpread({},defaultQueryParams))}),(0,jsx_runtime.jsxs)(govuk_react_esm.Jn,{"data-test":"collection-list",children:[_children,(0,jsx_runtime.jsx)(govuk_react_esm.$W,{children:(0,jsx_runtime.jsxs)("article",{children:[isComplete&&(0,jsx_runtime.jsx)(FilteredCollectionList_FilteredCollectionHeader,{totalItems:count,summary,collectionName,hasFilters:void 0!==_children,selectedFilters,addItemUrl,useReactRouter}),sortOptions&&(0,jsx_runtime.jsx)(CollectionList_CollectionSort,{sortOptions,totalPages}),baseDownloadLink&&(0,jsx_runtime.jsx)(components_RoutedDownloadDataHeader,{count,maxItems:maxItemsToDownload,"data-test":"download-data-header",baseDownloadLink,entityName,entityNamePlural}),(0,jsx_runtime.jsx)(Task.Z.Status,FilteredCollectionList_objectSpread(FilteredCollectionList_objectSpread({},taskProps),{},{children:function children(){return isComplete&&(0,jsx_runtime.jsx)("ol",{"aria-live":"polite",children:results.map((function(item){return(0,jsx_runtime.jsx)(Analytics.Z,{children:function children(pushAnalytics){return collectionItemTemplate(item,titleRenderer,useReactRouter,pushAnalytics,selectedFilters,sanitizeFiltersForAnalytics)}})}))})}})),(0,jsx_runtime.jsx)(components_Pagination.Z,{totalPages,activePage:initialPage,onPageClick:function onPageClick(page,e){e.preventDefault(),history.push({search:lib_default().stringify(FilteredCollectionList_objectSpread(FilteredCollectionList_objectSpread({},qsParams),{},{page}))})}})]})})]})}})};FilteredCollectionList.displayName="FilteredCollectionList",FilteredCollectionList.propTypes={taskProps:prop_types_default().shape({name:prop_types_default().string,id:prop_types_default().string,progressMessage:prop_types_default().string,renderProgress:prop_types_default().func,startOnRender:prop_types_default().shape({payload:prop_types_default().shape({page:prop_types_default().number,filters:prop_types_default().object,search:prop_types_default().string}).isRequired,onSuccessDispatch:prop_types_default().string}).isRequired}),isComplete:prop_types_default().bool,children:prop_types_default().node,collectionName:prop_types_default().string,router:prop_types_default().shape({location:prop_types_default().shape({search:prop_types_default().string.isRequired,query:prop_types_default().object.isRequired})}),maxItemsToPaginate:prop_types_default().number,maxItemsToDownload:prop_types_default().number,selectedFilters:prop_types_default().shape({label:prop_types_default().string,value:prop_types_default().string}),summary:prop_types_default().object,defaultQueryParams:prop_types_default().object,titleRenderer:prop_types_default().func,sanitizeFiltersForAnalytics:prop_types_default().func,width:prop_types_default().string},FilteredCollectionList.__docgenInfo={description:"",methods:[],displayName:"FilteredCollectionList",props:{results:{defaultValue:{value:"[]",computed:!1},required:!1},summary:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"object"},required:!1},itemsPerPage:{defaultValue:{value:"10",computed:!1},required:!1},sortOptions:{defaultValue:{value:"null",computed:!1},required:!1},count:{defaultValue:{value:"0",computed:!1},required:!1},maxItemsToPaginate:{defaultValue:{value:"10000",computed:!1},description:"",type:{name:"number"},required:!1},baseDownloadLink:{defaultValue:{value:"null",computed:!1},required:!1},titleRenderer:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},sanitizeFiltersForAnalytics:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},collectionItemTemplate:{defaultValue:{value:"(\n item,\n titleRenderer,\n useReactRouter,\n pushAnalytics,\n selectedFilters,\n sanitizeFiltersForAnalytics\n) => {\n return (\n {\n pushAnalytics({\n event: 'filterResultClick',\n extra: {\n ...filtersToAnalytics(selectedFilters),\n ...(sanitizeFiltersForAnalytics &&\n sanitizeFiltersForAnalytics(getSelectedFilters(selectedFilters))),\n },\n })\n }}\n />\n )\n}",computed:!1},required:!1},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!1},id:{name:"string",required:!1},progressMessage:{name:"string",required:!1},renderProgress:{name:"func",required:!1},startOnRender:{name:"shape",value:{payload:{name:"shape",value:{page:{name:"number",required:!1},filters:{name:"object",required:!1},search:{name:"string",required:!1}},required:!0},onSuccessDispatch:{name:"string",required:!1}},required:!0}}},required:!1},isComplete:{description:"",type:{name:"bool"},required:!1},children:{description:"",type:{name:"node"},required:!1},collectionName:{description:"",type:{name:"string"},required:!1},router:{description:"",type:{name:"shape",value:{location:{name:"shape",value:{search:{name:"string",required:!0},query:{name:"object",required:!0}},required:!1}}},required:!1},maxItemsToDownload:{description:"",type:{name:"number"},required:!1},selectedFilters:{description:"",type:{name:"shape",value:{label:{name:"string",required:!1},value:{name:"string",required:!1}}},required:!1},defaultQueryParams:{description:"",type:{name:"object"},required:!1},width:{description:"",type:{name:"string"},required:!1}}};function RoutedFilterChips_typeof(o){return RoutedFilterChips_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedFilterChips_typeof(o)}var RoutedFilterChips_excluded=["qsParamName","selectedOptions"];function RoutedFilterChips_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function RoutedFilterChips_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function RoutedFilterChips_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedFilterChips_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i2&&void 0!==arguments[2]?arguments[2]:null;return Object.entries(qsParams).map((function(_ref){var key=RoutedFilterChips_slicedToArray(_ref,1)[0];if(key===targetParam)return Array.isArray(qsParams[key])?RoutedFilterChips_objectSpread(RoutedFilterChips_objectSpread({},qsParams),{},RoutedFilterChips_defineProperty({},key,qsParams[key].filter((function(x){return x!==targetValue})))):(0,lodash.omit)(qsParams,targetParam)})).filter(Boolean)[0]}(lib_default().parse(location.search.slice(1)),qsParamName,value);history.push({search:lib_default().stringify(newQsParams)})};return selectedOptions.map((function(_ref5){var value=_ref5.value,label=_ref5.label,categoryLabel=_ref5.categoryLabel;return(0,jsx_runtime.jsx)(Chip.Z,RoutedFilterChips_objectSpread(RoutedFilterChips_objectSpread({value,onClick:function onClick(){return clearFilter(value)}},props),{},{children:categoryLabel?"".concat(categoryLabel,": ").concat(label):label}),value)}))}})};RoutedFilterChips.displayName="RoutedFilterChips",RoutedFilterChips.propTypes={qsParamName:prop_types_default().string.isRequired,selectedOptions:prop_types_default().arrayOf(prop_types_default().shape({value:prop_types_default().string.isRequired,label:prop_types_default().string.isRequired,categoryLabel:prop_types_default().string}))},RoutedFilterChips.__docgenInfo={description:"",methods:[],displayName:"RoutedFilterChips",props:{selectedOptions:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!0},label:{name:"string",required:!0},categoryLabel:{name:"string",required:!1}}}},required:!1},qsParamName:{description:"",type:{name:"string"},required:!0}}};const components_RoutedFilterChips=RoutedFilterChips;var Chip=__webpack_require__("./src/client/components/Chip/index.jsx");function FilterReset_typeof(o){return FilterReset_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FilterReset_typeof(o)}var FilterReset_templateObject,FilterReset_excluded=["children"],FilterReset_excluded2=["sortby","page"];function FilterReset_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FilterReset_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FilterReset_StyledButtonLink=(0,styled_components_browser_esm.ZP)(ButtonLink.Z)(FilterReset_templateObject||(FilterReset_templateObject=function FilterReset_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),FilterReset=function FilterReset(_ref){var _children=_ref.children,props=FilterReset_objectWithoutProperties(_ref,FilterReset_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var history=_ref2.history,_ref2$location=_ref2.location,pathname=_ref2$location.pathname,search=_ref2$location.search,_qs$parse=lib_default().parse(search.slice(1)),filters=(_qs$parse.sortby,_qs$parse.page,FilterReset_objectWithoutProperties(_qs$parse,FilterReset_excluded2));return!(0,lodash.isEmpty)(filters)&&(0,jsx_runtime.jsx)(FilterReset_StyledButtonLink,FilterReset_objectSpread(FilterReset_objectSpread({},props),{},{onClick:function onClick(){history.push("".concat(pathname,"?page=1"))},children:_children}))}})};FilterReset.displayName="FilterReset",FilterReset.propTypes={children:prop_types_default().node.isRequired},FilterReset.__docgenInfo={description:"",methods:[],displayName:"FilterReset",props:{children:{description:"",type:{name:"node"},required:!0}}};const components_FilterReset=FilterReset;__webpack_require__("./src/client/components/Checkbox/index.jsx");var CheckboxGroupField=__webpack_require__("./src/client/components/CheckboxGroupField/index.jsx");function RoutedCheckboxGroupField_typeof(o){return RoutedCheckboxGroupField_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedCheckboxGroupField_typeof(o)}var RoutedCheckboxGroupField_excluded=["qsParam"];function RoutedCheckboxGroupField_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedCheckboxGroupField_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedCheckboxGroupField=function RoutedCheckboxGroupField(_ref){var qsParam=_ref.qsParam,props=RoutedCheckboxGroupField_objectWithoutProperties(_ref,RoutedCheckboxGroupField_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var history=_ref2.history,location=_ref2.location,qsParams=lib_default().parse(location.search.slice(1));return(0,jsx_runtime.jsx)(CheckboxGroupField.Z,RoutedCheckboxGroupField_objectSpread(RoutedCheckboxGroupField_objectSpread({},props),{},{onChange:function onChange(pickedOptions){var _objectSpread2;return history.push({search:lib_default().stringify(RoutedCheckboxGroupField_objectSpread(RoutedCheckboxGroupField_objectSpread({},qsParams),{},(_objectSpread2={},RoutedCheckboxGroupField_defineProperty(_objectSpread2,qsParam,pickedOptions.map((function(_ref3){return _ref3.value}))),RoutedCheckboxGroupField_defineProperty(_objectSpread2,"page",1),_objectSpread2)))})}}))}})};RoutedCheckboxGroupField.displayName="RoutedCheckboxGroupField",RoutedCheckboxGroupField.propTypes={name:prop_types_default().string.isRequired},RoutedCheckboxGroupField.__docgenInfo={description:"",methods:[],displayName:"RoutedCheckboxGroupField",props:{name:{description:"",type:{name:"string"},required:!0}}};const components_RoutedCheckboxGroupField=RoutedCheckboxGroupField,timeline_namespaceObject=__webpack_require__.p+"static/media/timeline.ea4a156a.png";var NoInvestmentProjects_templateObject,NoInvestmentProjects_templateObject2,NoInvestmentProjects_templateObject3,NoInvestmentProjects_templateObject4,NoInvestmentProjects_templateObject5;function NoInvestmentProjects_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledContainer=(0,styled_components_browser_esm.ZP)("div")(NoInvestmentProjects_templateObject||(NoInvestmentProjects_templateObject=NoInvestmentProjects_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n "," {\n margin: 25px 0 50px 0;\n }\n "," {\n margin: 45px 0 95px 0;\n }\n"])),govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.qk.DESKTOP),NoInvestmentProjects_StyledParagraph=(0,styled_components_browser_esm.ZP)("p")(NoInvestmentProjects_templateObject2||(NoInvestmentProjects_templateObject2=NoInvestmentProjects_taggedTemplateLiteral(["\n color: ",";\n "," {\n margin-bottom: 25px;\n font-size: ",";\n }\n"])),colours.au,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.Kt.SIZE_24),StyledImage=(0,styled_components_browser_esm.ZP)("img")(NoInvestmentProjects_templateObject3||(NoInvestmentProjects_templateObject3=NoInvestmentProjects_taggedTemplateLiteral(["\n display: none;\n "," {\n display: block;\n width: 655px;\n margin-bottom: ",";\n }\n "," {\n width: 760px;\n margin: "," 0 35px 0;\n }\n"])),govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.N_.SCALE_3),NoInvestmentProjects_StyledUnorderedList=(0,styled_components_browser_esm.ZP)(govuk_react_unordered_list_esm.Z)(NoInvestmentProjects_templateObject4||(NoInvestmentProjects_templateObject4=NoInvestmentProjects_taggedTemplateLiteral(["\n color: ",";\n margin-bottom: ",";\n "," {\n margin-left: 7px;\n margin-bottom: 40px;\n }\n"])),colours.au,govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.qk.TABLET),NoInvestmentProjects_StyledListItem=(0,styled_components_browser_esm.ZP)("li")(NoInvestmentProjects_templateObject5||(NoInvestmentProjects_templateObject5=NoInvestmentProjects_taggedTemplateLiteral(["\n "," {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.Kt.SIZE_24),NoInvestmentProjects=function NoInvestmentProjects(){return(0,jsx_runtime.jsxs)(StyledContainer,{children:[(0,jsx_runtime.jsx)(govuk_react_heading_esm.H3,{as:govuk_react_heading_esm.H1,children:"No investment projects"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledParagraph,{children:"View and track investment projects from your dashboard"}),(0,jsx_runtime.jsx)(StyledImage,{src:timeline_namespaceObject,alt:"An image of the stage timeline and estimated land date"}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledParagraph,{children:"Once added, you'll be able to:"}),(0,jsx_runtime.jsxs)(NoInvestmentProjects_StyledUnorderedList,{listStyleType:"bullet",children:[(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"view the progress of each project"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"move projects onto the next stage"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"view estimated land dates"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"view project summaries for the next financial year."})]})]}),(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:govuk_react_link_esm.Z,href:urls.investments.index(),children:"Add project"})]})};NoInvestmentProjects.displayName="NoInvestmentProjects",NoInvestmentProjects.__docgenInfo={description:"",methods:[],displayName:"NoInvestmentProjects"};const MyInvestmentProjects_NoInvestmentProjects=NoInvestmentProjects;var MyInvestmentProjects_state=__webpack_require__("./src/client/components/MyInvestmentProjects/state.js"),govuk_react_checkbox_esm=__webpack_require__("./node_modules/@govuk-react/checkbox/dist/govuk-react-checkbox.esm.js");function ActivityFeedCheckbox_typeof(o){return ActivityFeedCheckbox_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityFeedCheckbox_typeof(o)}var ActivityFeedCheckbox_templateObject,ActivityFeedCheckbox_excluded=["children"];function ActivityFeedCheckbox_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ActivityFeedCheckbox_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledCheckbox=(0,styled_components_browser_esm.ZP)(govuk_react_checkbox_esm.Z)(ActivityFeedCheckbox_templateObject||(ActivityFeedCheckbox_templateObject=function ActivityFeedCheckbox_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: flex;\n align-items: center;\n min-height: 26px;\n margin-bottom: 0;\n\n & > span {\n margin: 0;\n padding: 0;\n white-space: nowrap;\n\n &::before {\n background: ",";\n width: 26px;\n height: 26px;\n }\n\n &::after {\n top: 6px;\n left: ",";\n width: 12px;\n height: 6px;\n box-sizing: unset;\n border-width: 0 0 "," ",";\n }\n }\n\n input {\n width: 26px;\n height: 26px;\n margin: 0;\n padding: 0;\n }\n"])),colours.Cj,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.IA,govuk_react_constants_esm.IA),ActivityFeedCheckbox=function ActivityFeedCheckbox(_ref){var children=_ref.children,rest=ActivityFeedCheckbox_objectWithoutProperties(_ref,ActivityFeedCheckbox_excluded);return(0,jsx_runtime.jsx)(StyledCheckbox,ActivityFeedCheckbox_objectSpread(ActivityFeedCheckbox_objectSpread({},rest),{},{children}))};ActivityFeedCheckbox.displayName="ActivityFeedCheckbox",ActivityFeedCheckbox.propTypes={children:prop_types_default().node.isRequired,onChange:prop_types_default().func.isRequired,checked:prop_types_default().bool,disabled:prop_types_default().bool,name:prop_types_default().string},ActivityFeedCheckbox.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedCheckbox",props:{children:{description:"",type:{name:"node"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checked:{description:"",type:{name:"bool"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!1}}};const ActivityFeed_ActivityFeedCheckbox=ActivityFeedCheckbox;function InvestmentListShowDetails_typeof(o){return InvestmentListShowDetails_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentListShowDetails_typeof(o)}var InvestmentListShowDetails_templateObject,InvestmentListShowDetails_excluded=["children"];function InvestmentListShowDetails_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentListShowDetails_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var CheckboxContainer=(0,styled_components_browser_esm.ZP)("div")(InvestmentListShowDetails_templateObject||(InvestmentListShowDetails_templateObject=function InvestmentListShowDetails_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n padding: ",";\n"])),govuk_react_constants_esm.N_.SCALE_2),InvestmentListShowDetails=function InvestmentListShowDetails(_ref){var children=_ref.children,rest=InvestmentListShowDetails_objectWithoutProperties(_ref,InvestmentListShowDetails_excluded);return(0,jsx_runtime.jsx)(CheckboxContainer,{children:(0,jsx_runtime.jsx)(ActivityFeed_ActivityFeedCheckbox,InvestmentListShowDetails_objectSpread(InvestmentListShowDetails_objectSpread({name:"investmentListShowDetails"},rest),{},{children}))})};InvestmentListShowDetails.displayName="InvestmentListShowDetails",InvestmentListShowDetails.propTypes={children:prop_types_default().node.isRequired,onChange:prop_types_default().func.isRequired,checked:prop_types_default().bool.isRequired,disabled:prop_types_default().bool.isRequired},InvestmentListShowDetails.__docgenInfo={description:"",methods:[],displayName:"InvestmentListShowDetails",props:{children:{description:"",type:{name:"node"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checked:{description:"",type:{name:"bool"},required:!0},disabled:{description:"",type:{name:"bool"},required:!0}}};var InvestmentListSelect_excluded=["initialValue","label","options","onChange","input"];function InvestmentListSelect_typeof(o){return InvestmentListSelect_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentListSelect_typeof(o)}function InvestmentListSelect_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentListSelect_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function InvestmentListSelect_defineProperty(obj,key,value){return(key=function InvestmentListSelect_toPropertyKey(arg){var key=function InvestmentListSelect_toPrimitive(input,hint){if("object"!==InvestmentListSelect_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==InvestmentListSelect_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===InvestmentListSelect_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var InvestmentListSelect_StyledSelect=(0,styled_components_browser_esm.ZP)(components_Select)(InvestmentListSelect_defineProperty({alignItems:"flex-start",flexDirection:"column",flex:"1 1",select:{width:"100%",minWidth:170},marginBottom:govuk_react_constants_esm.N_.SCALE_1},govuk_react_constants_esm.qk.DESKTOP,{margin:govuk_react_constants_esm.N_.SCALE_1})),InvestmentListSelect=function InvestmentListSelect(_ref){var initialValue=_ref.initialValue,label=_ref.label,options=_ref.options,onChange=_ref.onChange,input=_ref.input,props=InvestmentListSelect_objectWithoutProperties(_ref,InvestmentListSelect_excluded);return(0,jsx_runtime.jsx)(InvestmentListSelect_StyledSelect,InvestmentListSelect_objectSpread(InvestmentListSelect_objectSpread({label,input:InvestmentListSelect_objectSpread({onChange,initialValue},input)},props),{},{children:options.map((function(_ref2,index){var id=_ref2.id,name=_ref2.name;return(0,jsx_runtime.jsx)("option",{value:id,"aria-label":name,id:(0,lodash.kebabCase)(name),children:name},index)}))}))};InvestmentListSelect.displayName="InvestmentListSelect",InvestmentListSelect.__docgenInfo={description:"",methods:[],displayName:"InvestmentListSelect"};const MyInvestmentProjects_InvestmentListSelect=InvestmentListSelect;var PROJECT_STATUS_OPTIONS=[{name:"Show all",id:"all-statuses"},{name:"Ongoing",id:"ongoing"},{name:"Delayed",id:"delayed"},{name:"Abandoned",id:"abandoned"},{name:"Lost",id:"lost"},{name:"Dormant",id:"dormant"}],STAGE_OPTIONS=[{name:"Show all",id:"all-stages"},{name:"Prospect",id:"8a320cc9-ae2e-443e-9d26-2f36452c2ced"},{name:"Assign PM",id:"c9864359-fb1a-4646-a4c1-97d10189fc03"},{name:"Active",id:"7606cc19-20da-4b74-aba1-2cec0d753ad8"},{name:"Verify win",id:"49b8f6f3-0c50-4150-a965-2c974f3149e3"},{name:"Won",id:"945ea6d1-eee3-4f5b-9144-84a75b71b8e6"}],SORT_OPTIONS=[{name:"Recently created",id:"created_on:desc"},{name:"Recently updated",id:"modified_on:desc"},{name:"Earliest land date",id:"estimated_land_date:asc"},{name:"Latest land date",id:"estimated_land_date:desc"},{name:"Project name (A-Z)",id:"name:asc"},{name:"Project name (Z-A)",id:"name:desc"}],INCOMPLETE_FIELDS={client_cannot_provide_total_investment:"Can client provide total investment value?",number_new_jobs:"Number of new jobs",strategic_drivers:"Strategic drivers behind this investment",client_requirements:"Client requirements",client_considering_other_countries:"Is the client considering other countries?",total_investment:"Total investment",uk_region_locations:"Possible UK locations for this investment",project_manager:"Project Manager",project_assurance_adviser:"Project Assurance Adviser",government_assistance:"Is this project receiving government financial assistance?",number_safeguarded_jobs:"Number of safeguarded jobs",r_and_d_budget:"Does this project have budget for a research and development?",non_fdi_r_and_d_budget:"Is this project associated with a non-FDI R&D project?",new_tech_to_uk:"Does the project bring ‘New To World’ Technology, IP or Business Model to the UK site?",export_revenue:"Will the UK company export a significant proportion of their products and services produced in the UK as a result of the FDI project?",address_1:"Street",address_town:"Town",address_postcode:"Postcode",actual_uk_regions:"UK regions landed",actual_land_date:"Actual land date",average_salary:"Average salary of new jobs",client_cannot_provide_foreign_investment:"Can client provide capital expenditure value?",delivery_partners:"Delivery partners",competitor_countries:"Competitor countries",foreign_equity_investment:"Foreign equity investment",associated_non_fdi_r_and_d_project:"Non-FDI R&D project",fdi_type:"FDI type"},STAGE_TAG_COLOURS={Prospect:"purple","Assign PM":"red",Active:"blue","Verify win":"yellow",Won:"green"},Projects_constants=__webpack_require__("./src/client/modules/Investments/Projects/constants.js");function InvestmentEstimatedLandDate_typeof(o){return InvestmentEstimatedLandDate_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentEstimatedLandDate_typeof(o)}var InvestmentEstimatedLandDate_templateObject,InvestmentEstimatedLandDate_templateObject2,InvestmentEstimatedLandDate_templateObject3,InvestmentEstimatedLandDate_templateObject4,InvestmentEstimatedLandDate_templateObject5,InvestmentEstimatedLandDate_templateObject6,InvestmentEstimatedLandDate_templateObject7,InvestmentEstimatedLandDate_excluded=["estimatedLandDate"];function InvestmentEstimatedLandDate_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentEstimatedLandDate_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function InvestmentEstimatedLandDate_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var InvestmentEstimatedLandDate_require=__webpack_require__("./src/client/utils/date.js"),formatWithoutParsing=InvestmentEstimatedLandDate_require.formatWithoutParsing,getDifferenceInDays=InvestmentEstimatedLandDate_require.getDifferenceInDays,getDifferenceInDaysLabel=InvestmentEstimatedLandDate_require.getDifferenceInDaysLabel,StyledPanel=(0,styled_components_browser_esm.ZP)("div")(InvestmentEstimatedLandDate_templateObject||(InvestmentEstimatedLandDate_templateObject=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n padding: ",";\n color: ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"])),govuk_react_constants_esm.N_.SCALE_2,colours.E5,colours.$R),GreenPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject2||(InvestmentEstimatedLandDate_templateObject2=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.g$,.3)),AmberPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject3||(InvestmentEstimatedLandDate_templateObject3=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.$R,.5)),RedPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject4||(InvestmentEstimatedLandDate_templateObject4=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.hM,.4)),GreyPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject5||(InvestmentEstimatedLandDate_templateObject5=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.FU,.5)),InvestmentEstimatedLandDate_StyledTitle=(0,styled_components_browser_esm.ZP)("h2")(InvestmentEstimatedLandDate_templateObject6||(InvestmentEstimatedLandDate_templateObject6=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n margin: 0;\n text-align: center;\n font-size: ",";\n font-weight: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_24,govuk_react_constants_esm.Xw.bold),StyledBody=(0,styled_components_browser_esm.ZP)("div")(InvestmentEstimatedLandDate_templateObject7||(InvestmentEstimatedLandDate_templateObject7=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n text-align: center;\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_14),InvestmentEstimatedLandDate=function InvestmentEstimatedLandDate(_ref){var estimatedLandDate=_ref.estimatedLandDate,props=InvestmentEstimatedLandDate_objectWithoutProperties(_ref,InvestmentEstimatedLandDate_excluded),difference=getDifferenceInDays(estimatedLandDate),Panel=difference>=90?GreenPanel:difference>=30?AmberPanel:difference>=0?RedPanel:GreyPanel;return(0,jsx_runtime.jsxs)(Panel,InvestmentEstimatedLandDate_objectSpread(InvestmentEstimatedLandDate_objectSpread({"data-test":"estimated-land-date"},props),{},{children:[(0,jsx_runtime.jsx)(StyledBody,{"data-test":"estimated-land-date-label",children:"Estimated land date"}),(0,jsx_runtime.jsx)(InvestmentEstimatedLandDate_StyledTitle,{"data-test":"estimated-land-date-countdown",children:getDifferenceInDaysLabel(estimatedLandDate)}),(0,jsx_runtime.jsx)(StyledBody,{"data-test":"estimated-land-date-date",children:formatWithoutParsing(new Date(estimatedLandDate),common_constants.DATE_DAY_LONG_FORMAT)})]}))};InvestmentEstimatedLandDate.displayName="InvestmentEstimatedLandDate",InvestmentEstimatedLandDate.propTypes={estimatedLandDate:prop_types_default().string.isRequired},InvestmentEstimatedLandDate.__docgenInfo={description:"",methods:[],displayName:"InvestmentEstimatedLandDate",props:{estimatedLandDate:{description:"",type:{name:"string"},required:!0}}};const MyInvestmentProjects_InvestmentEstimatedLandDate=InvestmentEstimatedLandDate;function InvestmentTimeline_typeof(o){return InvestmentTimeline_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentTimeline_typeof(o)}var InvestmentTimeline_excluded=["stage"];function InvestmentTimeline_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentTimeline_defineProperty(obj,key,value){return(key=function InvestmentTimeline_toPropertyKey(arg){var key=function InvestmentTimeline_toPrimitive(input,hint){if("object"!==InvestmentTimeline_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==InvestmentTimeline_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===InvestmentTimeline_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function InvestmentTimeline_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function InvestmentTimeline_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var InvestmentTimeline=function InvestmentTimeline(_ref){var stage=_ref.stage,props=InvestmentTimeline_objectWithoutProperties(_ref,InvestmentTimeline_excluded);return(0,jsx_runtime.jsx)(Timeline.Z,function InvestmentTimeline_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=3?totalSteps-3:0,hasAdditonalSteps=!!additionalSteps;return(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledDiv,{"data-test":"investment-steps",children:[(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledHeader,{children:["Next step",totalSteps>1&&"s"]}),hasStepsToComplete&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledList,{listStyleType:"bullet",children:[stepsToComplete.map((function(step,i){return i<=2&&(0,jsx_runtime.jsx)(InvestmentNextSteps_StyledListItem,{children:(0,jsx_runtime.jsx)(OverflowWrapper,{children:step})},i)})),hasAdditonalSteps&&(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledListItem,{children:["Plus ",additionalSteps," additional field",additionalSteps>1&&"s"]})]}),(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledLink,{href:urls.investments.projects.details(projectId),children:["Add details to move to ",nextStage," stage"]})]})]})};InvestmentNextSteps.displayName="InvestmentNextSteps",InvestmentNextSteps.propTypes={nextSteps:prop_types_default().arrayOf(prop_types_default().string),nextStage:prop_types_default().string.isRequired,projectId:prop_types_default().string.isRequired},InvestmentNextSteps.__docgenInfo={description:"",methods:[],displayName:"InvestmentNextSteps",props:{nextSteps:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},nextStage:{description:"",type:{name:"string"},required:!0},projectId:{description:"",type:{name:"string"},required:!0}}};const MyInvestmentProjects_InvestmentNextSteps=InvestmentNextSteps;function InvestmentListItem_typeof(o){return InvestmentListItem_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentListItem_typeof(o)}var InvestmentListItem_templateObject,InvestmentListItem_templateObject2,InvestmentListItem_templateObject3,InvestmentListItem_templateObject4;function InvestmentListItem_defineProperty(obj,key,value){return(key=function InvestmentListItem_toPropertyKey(arg){var key=function InvestmentListItem_toPrimitive(input,hint){if("object"!==InvestmentListItem_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==InvestmentListItem_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===InvestmentListItem_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function InvestmentListItem_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var Row=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_templateObject||(InvestmentListItem_templateObject=InvestmentListItem_taggedTemplateLiteral(["\n margin-bottom: ",";\n\n "," {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-wrap: wrap;\n }\n\n "," {\n flex-wrap: nowrap;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.LARGESCREEN,govuk_react_constants_esm.qk.DESKTOP),Col=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_templateObject2||(InvestmentListItem_templateObject2=InvestmentListItem_taggedTemplateLiteral(["\n margin-bottom: ",";\n\n "," {\n width: ",";\n margin-bottom: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.LARGESCREEN,(function(_ref){return _ref.fullWidth?"100%":"calc(50% - ".concat(govuk_react_constants_esm.N_.SCALE_2,")")})),InvestmentListItem_ListItem=(0,styled_components_browser_esm.ZP)("li")(InvestmentListItem_defineProperty({padding:"".concat(govuk_react_constants_esm.N_.SCALE_2," 0"),borderBottom:"1px solid ".concat(colours.w8),"&:last-child":{borderBottom:"none"},display:"grid",columnGap:govuk_react_constants_esm.N_.SCALE_2,rowGap:govuk_react_constants_esm.N_.SCALE_3,gridTemplateAreas:'\n "tags"\n "title"\n "details"\n "actions"\n ',gridTemplateColumns:"100%"},govuk_react_constants_esm.qk.DESKTOP,{gridTemplateColumns:"minmax(130px, 2fr) minmax(140px, 1fr) minmax(0, 170px)",gridTemplateAreas:'\n "title tags actions"\n "details details details"\n '})),ListItemTitle=(0,styled_components_browser_esm.ZP)("h2")({fontSize:govuk_react_constants_esm.Kt.SIZE_19,fontWeight:govuk_react_constants_esm.Xw.bold,margin:0,gridArea:"title"}),ListItemTags=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_defineProperty({gridArea:"tags"},govuk_react_constants_esm.qk.DESKTOP,{padding:"0 ".concat(govuk_react_constants_esm.N_.SCALE_5),marginBottom:"-".concat(govuk_react_constants_esm.N_.SCALE_6)})),ListItemTagRow=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_defineProperty({display:"inline-block",paddingBottom:govuk_react_constants_esm.N_.SCALE_4,marginRight:govuk_react_constants_esm.N_.SCALE_1},govuk_react_constants_esm.qk.DESKTOP,{minWidth:"140px",display:"block"})),ListItemActions=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_defineProperty({boxSizing:"border-box",gridArea:"actions",a:{width:"100%",marginBottom:0}},govuk_react_constants_esm.qk.DESKTOP,{marginBottom:"-".concat(govuk_react_constants_esm.N_.SCALE_6)})),ListItemDetails=(0,styled_components_browser_esm.ZP)(ToggleSection.b3)({maxWidth:"100%",gridArea:"details"}),StyledInvestmentTimeline=(0,styled_components_browser_esm.ZP)(MyInvestmentProjects_InvestmentTimeline)(InvestmentListItem_templateObject3||(InvestmentListItem_templateObject3=InvestmentListItem_taggedTemplateLiteral(["\n display: none;\n box-sizing: border-box;\n\n "," {\n display: flex;\n flex: 1 0 100%;\n }\n\n "," {\n flex: 1 0 335px;\n }\n"])),govuk_react_constants_esm.qk.LARGESCREEN,govuk_react_constants_esm.qk.DESKTOP),StyledInvestmentEstimatedLandDate=(0,styled_components_browser_esm.ZP)(MyInvestmentProjects_InvestmentEstimatedLandDate)(InvestmentListItem_templateObject4||(InvestmentListItem_templateObject4=InvestmentListItem_taggedTemplateLiteral(["\n flex: 1 1 100%;\n box-sizing: border-box;\n min-height: 93px;\n\n "," {\n flex: 0 1 152px;\n }\n"])),govuk_react_constants_esm.qk.DESKTOP),InvestmentListItem=function InvestmentListItem(_ref2){var id=_ref2.id,name=_ref2.name,stage=_ref2.stage,status=_ref2.status,estimated_land_date=_ref2.estimated_land_date,investor_company=_ref2.investor_company,project_code=_ref2.project_code,sector=_ref2.sector,country_investment_originates_from=_ref2.country_investment_originates_from,latest_interaction=_ref2.latest_interaction,incomplete_fields=_ref2.incomplete_fields,hasStepsToComplete=!!incomplete_fields.length;return(0,jsx_runtime.jsxs)(InvestmentListItem_ListItem,{"data-test":"projects-list-item",children:[(0,jsx_runtime.jsx)(ListItemTitle,{"data-test":"project-title",children:(0,jsx_runtime.jsx)("a",{href:"".concat(urls.investments.projects.details(id)),children:name})}),(0,jsx_runtime.jsxs)(ListItemTags,{children:[(0,jsx_runtime.jsx)(ListItemTagRow,{children:(0,jsx_runtime.jsx)(Tag.Z,{colour:STAGE_TAG_COLOURS[stage.name],"data-test":"project-stage-tag","aria-label":"project stage",children:stage.name})}),(0,jsx_runtime.jsx)(ListItemTagRow,{children:(0,jsx_runtime.jsx)(Tag.Z,{colour:"grey","data-test":"project-status-tag","aria-label":"project status",children:status})})]}),(0,jsx_runtime.jsx)(ListItemActions,{children:(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{buttonColour:colours.Ej,href:urls.investments.projects.interactions.index(id),as:"a","data-test":"add-interaction",children:"View interactions"})}),(0,jsx_runtime.jsxs)(ListItemDetails,{id,label:project_code,"data-test":"project-details",children:[(0,jsx_runtime.jsxs)(Row,{children:[(0,jsx_runtime.jsx)(StyledInvestmentTimeline,{stage}),(0,jsx_runtime.jsx)(StyledInvestmentEstimatedLandDate,{estimatedLandDate:estimated_land_date})]}),(0,jsx_runtime.jsxs)(Row,{children:[(0,jsx_runtime.jsx)(Col,{fullWidth:!hasStepsToComplete,children:(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentDetails,{investor:investor_company,sector,countryOrigin:country_investment_originates_from,latestInteraction:latest_interaction})}),hasStepsToComplete&&(0,jsx_runtime.jsx)(Col,{children:(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentNextSteps,{nextSteps:incomplete_fields,nextStage:Projects_constants.pZ[Projects_constants.pZ.indexOf(stage.name)+1],projectId:id})})]})]})]})};InvestmentListItem.displayName="InvestmentListItem",InvestmentListItem.propTypes={id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,project_code:prop_types_default().string.isRequired,stage:prop_types_default().shape({name:prop_types_default().string}).isRequired,estimated_land_date:prop_types_default().string.isRequired,investor_company:prop_types_default().shape({id:prop_types_default().string.isRequired}).isRequired},InvestmentListItem.__docgenInfo={description:"",methods:[],displayName:"InvestmentListItem",props:{id:{description:"",type:{name:"string"},required:!0},name:{description:"",type:{name:"string"},required:!0},project_code:{description:"",type:{name:"string"},required:!0},stage:{description:"",type:{name:"shape",value:{name:{name:"string",required:!1}}},required:!0},estimated_land_date:{description:"",type:{name:"string"},required:!0},investor_company:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0}}},required:!0}}};const MyInvestmentProjects_InvestmentListItem=InvestmentListItem;function InvestmentList_typeof(o){return InvestmentList_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentList_typeof(o)}var InvestmentList_templateObject,InvestmentList_excluded=["items","isPaginated","showDetails"];function InvestmentList_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentList_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledOrderedList=(0,styled_components_browser_esm.ZP)("ol")(InvestmentList_templateObject||(InvestmentList_templateObject=function InvestmentList_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-top: 0;\n ","\n"])),(function(_ref){return _ref.isPaginated&&"border-bottom: 1px solid ".concat(colours.w8,";")})),InvestmentList=function InvestmentList(_ref2){var items=_ref2.items,isPaginated=_ref2.isPaginated,showDetails=_ref2.showDetails,props=InvestmentList_objectWithoutProperties(_ref2,InvestmentList_excluded);return(0,jsx_runtime.jsx)(StyledOrderedList,InvestmentList_objectSpread(InvestmentList_objectSpread({isPaginated},props),{},{children:items.map((function(item){return(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListItem,InvestmentList_objectSpread({showDetails},item),item.id)}))}))};InvestmentList.displayName="InvestmentList",InvestmentList.propTypes={items:prop_types_default().array.isRequired},InvestmentList.__docgenInfo={description:"",methods:[],displayName:"InvestmentList",props:{items:{description:"",type:{name:"array"},required:!0}}};const MyInvestmentProjects_InvestmentList=InvestmentList;function MyInvestmentProjects_typeof(o){return MyInvestmentProjects_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},MyInvestmentProjects_typeof(o)}var MyInvestmentProjects_templateObject,MyInvestmentProjects_templateObject2;function MyInvestmentProjects_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var MyInvestmentProjects_StyledHeader=(0,styled_components_browser_esm.ZP)("header")(function MyInvestmentProjects_defineProperty(obj,key,value){return(key=function MyInvestmentProjects_toPropertyKey(arg){var key=function MyInvestmentProjects_toPrimitive(input,hint){if("object"!==MyInvestmentProjects_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==MyInvestmentProjects_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===MyInvestmentProjects_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({},govuk_react_constants_esm.qk.DESKTOP,{display:"flex",flexWrap:"wrap",margin:"-".concat(govuk_react_constants_esm.N_.SCALE_1," -").concat(govuk_react_constants_esm.N_.SCALE_2)})),MyInvestmentProjects_StyledParagraph=(0,styled_components_browser_esm.ZP)(govuk_react_esm.nv)(MyInvestmentProjects_templateObject||(MyInvestmentProjects_templateObject=MyInvestmentProjects_taggedTemplateLiteral(["\n margin-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),StyledListContainer=(0,styled_components_browser_esm.ZP)("div")(MyInvestmentProjects_templateObject2||(MyInvestmentProjects_templateObject2=MyInvestmentProjects_taggedTemplateLiteral(["\n border-top: 1px solid ",";\n margin-top: ",";\n"])),colours.w8,govuk_react_constants_esm.N_.SCALE_3),MyInvestmentProjects=function MyInvestmentProjects(_ref){var results=_ref.results,count=_ref.count,itemsPerPage=_ref.itemsPerPage,page=_ref.page,stage=_ref.stage,status=_ref.status,landDateOptions=_ref.landDateOptions,landDate=_ref.landDate,sort=_ref.sort,onLoad=_ref.onLoad,onSortChange=_ref.onSortChange,onStageChange=_ref.onStageChange,onStatusChange=_ref.onStatusChange,onLandDateChange=_ref.onLandDateChange,onPaginationClick=_ref.onPaginationClick,adviser=(_ref.onShowDetailsChange,_ref.adviser),showDetails=_ref.showDetails;return(0,react.useEffect)((function(){onLoad()}),[]),(0,jsx_runtime.jsxs)("article",{children:[(0,jsx_runtime.jsxs)(MyInvestmentProjects_StyledHeader,{children:[!1,(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-stage-label",input:{id:"my-projects-stage-select"},"data-test":"stage-select",label:"Stage",options:STAGE_OPTIONS,initialValue:stage,onChange:function onChange(event){return onStageChange(event.target.value)}}),(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-status-label",input:{id:"my-projects-status-select"},"data-test":"status-select",label:"Status",options:PROJECT_STATUS_OPTIONS,initialValue:status,onChange:function onChange(event){return onStatusChange(event.target.value)}}),(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-land-date-label",input:{id:"my-projects-land-date-select"},"data-test":"land-date-select",label:"Land date",options:landDateOptions,initialValue:landDate,onChange:function onChange(event){return onLandDateChange(event.target.value)}}),(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-sort-label",input:{id:"my-projects-sort-select"},"data-test":"sort-select",label:"Sort",options:SORT_OPTIONS,initialValue:sort,onChange:function onChange(event){return onSortChange(event.target.value)}})]}),(0,jsx_runtime.jsx)(StyledListContainer,{children:(0,jsx_runtime.jsx)(Task.Z.Status,{name:MyInvestmentProjects_state.t,id:MyInvestmentProjects_state.ID,progressMessage:"Loading your investment projects",startOnRender:{payload:{adviser,page,stage,status,landDate,sort},onSuccessDispatch:actions.STt},children:function children(){var totalPages=Math.ceil(count/itemsPerPage);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:results.length?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentList,{"data-test":"my-investment-projects-list",items:results,isPaginated:totalPages>1,showDetails}),(0,jsx_runtime.jsx)(components_Pagination.Z,{totalPages,activePage:page,onPageClick:onPaginationClick})]}):(0,jsx_runtime.jsx)(MyInvestmentProjects_StyledParagraph,{children:"No investment projects"})})}})})]})};MyInvestmentProjects.displayName="MyInvestmentProjects",MyInvestmentProjects.propTypes={results:prop_types_default().array.isRequired,count:prop_types_default().number.isRequired,itemsPerPage:prop_types_default().number.isRequired,page:prop_types_default().number.isRequired,onStageChange:prop_types_default().func.isRequired,onStatusChange:prop_types_default().func.isRequired,onLandDateChange:prop_types_default().func.isRequired,onSortChange:prop_types_default().func.isRequired,onPaginationClick:prop_types_default().func.isRequired,onShowDetailsChange:prop_types_default().func.isRequired,adviser:prop_types_default().shape({id:prop_types_default().string.isRequired}).isRequired,showDetails:prop_types_default().bool.isRequired},MyInvestmentProjects.__docgenInfo={description:"",methods:[],displayName:"MyInvestmentProjects",props:{results:{description:"",type:{name:"array"},required:!0},count:{description:"",type:{name:"number"},required:!0},itemsPerPage:{description:"",type:{name:"number"},required:!0},page:{description:"",type:{name:"number"},required:!0},onStageChange:{description:"",type:{name:"func"},required:!0},onStatusChange:{description:"",type:{name:"func"},required:!0},onLandDateChange:{description:"",type:{name:"func"},required:!0},onSortChange:{description:"",type:{name:"func"},required:!0},onPaginationClick:{description:"",type:{name:"func"},required:!0},onShowDetailsChange:{description:"",type:{name:"func"},required:!0},adviser:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0}}},required:!0},showDetails:{description:"",type:{name:"bool"},required:!0}}};const components_MyInvestmentProjects=(0,es.connect)(MyInvestmentProjects_state.H,(function(dispatch){return{onLoad:function onLoad(){dispatch({type:actions.gUm})},onShowDetailsChange:function onShowDetailsChange(showDetails){dispatch({type:actions.pb3,showDetails})},onStageChange:function onStageChange(stage){dispatch({type:actions.bgc,stage,page:1}),dispatch({type:actions.S77,stage,page:1})},onStatusChange:function onStatusChange(status){dispatch({type:actions.YWR,status,page:1}),dispatch({type:actions.S77,status,page:1})},onLandDateChange:function onLandDateChange(landDate){dispatch({type:actions.yFd,landDate,page:1}),dispatch({type:actions.S77,landDate,page:1})},onSortChange:function onSortChange(sort){dispatch({type:actions.l1G,sort,page:1}),dispatch({type:actions.S77,sort,page:1})},onPaginationClick:function onPaginationClick(page){dispatch({type:actions.mUn,page}),dispatch({type:actions.S77,page})}}}))(MyInvestmentProjects);var _styled,BaseToggleSection=__webpack_require__("./src/client/components/ToggleSection/BaseToggleSection.jsx");function ItemRenderer_typeof(o){return ItemRenderer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ItemRenderer_typeof(o)}function ItemRenderer_slicedToArray(arr,i){return function ItemRenderer_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function ItemRenderer_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function ItemRenderer_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return ItemRenderer_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ItemRenderer_arrayLikeToArray(o,minLen)}(arr,i)||function ItemRenderer_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ItemRenderer_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedDateField=function RoutedDateField(_ref){var qsParamName=_ref.qsParamName,props=RoutedDateField_objectWithoutProperties(_ref,RoutedDateField_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var location=_ref2.location,history=_ref2.history,qsParams=lib_default().parse(location.search.slice(1));return(0,jsx_runtime.jsx)(DateField.Z,RoutedDateField_objectSpread(RoutedDateField_objectSpread({},props),{},{onChange:function onChange(e){var _objectSpread2;history.push({search:lib_default().stringify(RoutedDateField_objectSpread(RoutedDateField_objectSpread({},qsParams),{},(_objectSpread2={},RoutedDateField_defineProperty(_objectSpread2,qsParamName,e.target.value),RoutedDateField_defineProperty(_objectSpread2,"page",1),_objectSpread2)))})},initialValue:(0,lodash.get)(qsParams,qsParamName,"")}))}})};RoutedDateField.displayName="RoutedDateField",RoutedDateField.__docgenInfo={description:"",methods:[],displayName:"RoutedDateField"};const components_RoutedDateField=RoutedDateField,ExportDate=(0,styled_components_browser_esm.ZP)(components_RoutedDateField)({paddingBottom:0,marginBottom:0,label:{paddingBottom:2},input:{width:"100%",maxHeight:38}});var List_StyledList=(0,styled_components_browser_esm.ZP)("ol")({}),List_List=function List(_ref){var items=_ref.items,itemRenderer=_ref.itemRenderer;return(0,jsx_runtime.jsx)(List_StyledList,{"data-test":"export-list",children:items.map((function(item){return itemRenderer(item)}))})};List_List.displayName="List",List_List.__docgenInfo={description:"",methods:[],displayName:"List"};const ExportList_List=List_List;var ExportList_styled,ExportList_state=__webpack_require__("./src/client/modules/ExportPipeline/ExportList/state.js");function ExportList_typeof(o){return ExportList_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ExportList_typeof(o)}function ExportList_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ExportList_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var fetchTeams=function fetchTeams(){return(0,lodash.throttle)((function(searchString){return searchString.length?utils.Q8.get(urls_default().metadata.team(),{params:{autocomplete:searchString}}).then((function(_ref){return function parseTeamData(teams){return teams.filter((function(team){return team.name&&team.name.trim().length})).map(client_transformers.TZ)}(_ref.data)})):Promise.resolve([])}),500)},RoutedTeamsTypeahead=function RoutedTeamsTypeahead(_ref2){var taskProps=_ref2.taskProps,closeMenuOnSelect=_ref2.closeMenuOnSelect,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?fetchTeams():_ref2$loadOptions,props=RoutedTeamsTypeahead_objectWithoutProperties(_ref2,RoutedTeamsTypeahead_excluded);return(0,jsx_runtime.jsx)(Task.Z.Status,RoutedTeamsTypeahead_objectSpread(RoutedTeamsTypeahead_objectSpread({},taskProps),{},{progressOverlay:!0,children:function children(){return(0,jsx_runtime.jsx)(components_RoutedTypeahead,RoutedTeamsTypeahead_objectSpread({loadOptions,closeMenuOnSelect},props))}}))};RoutedTeamsTypeahead.displayName="RoutedTeamsTypeahead",RoutedTeamsTypeahead.propTypes={name:prop_types_default().string.isRequired,taskProps:prop_types_default().shape({name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired}).isRequired,closeMenuOnSelect:prop_types_default().bool},RoutedTeamsTypeahead.defaultProps={closeMenuOnSelect:!0},RoutedTeamsTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedTeamsTypeahead",props:{loadOptions:{defaultValue:{value:"fetchTeams()",computed:!0},required:!1},closeMenuOnSelect:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!0},id:{name:"string",required:!0}}},required:!0}}};const components_RoutedTeamsTypeahead=RoutedTeamsTypeahead;function LocalNav_typeof(o){return LocalNav_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},LocalNav_typeof(o)}var LocalNav_excluded=["children","href","dataTest"];function LocalNav_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function LocalNav_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledActiveLink=(0,styled_components_browser_esm.ZP)("a")({display:"block",fontSize:govuk_react_constants_esm.Kt.SIZE_20,padding:"11px 16px","&:link, &:visited":{color:colours.Cj,background:colours.hJ,textDecoration:"none",fontWeight:600}}),StyledInactiveLink=(0,styled_components_browser_esm.ZP)("a")({display:"block",fontSize:govuk_react_constants_esm.Kt.SIZE_20,padding:"11px 16px","&:link, &:visited":{color:colours.Ej,textDecoration:"none"},"&:hover, &:focus":{color:colours.E5,backgroundColor:colours.zT}}),LocalNav=function LocalNav(_ref){var children=_ref.children,_ref$dataTest=_ref.dataTest,dataTest=void 0===_ref$dataTest?"local-nav":_ref$dataTest;return children=children.filter((function(child){return!1!==child})),(0,jsx_runtime.jsx)("nav",{"data-test":dataTest,children:(0,jsx_runtime.jsx)("ul",{children:children.map((function(link){return(0,jsx_runtime.jsxs)("li",{children:[" ",link," "]})}))})})};LocalNav.displayName="LocalNav";var LocalNavLink=function LocalNavLink(_ref2){var _children=_ref2.children,href=_ref2.href,_ref2$dataTest=_ref2.dataTest,dataTest=void 0===_ref2$dataTest?"local-nav-link":_ref2$dataTest,rest=LocalNav_objectWithoutProperties(_ref2,LocalNav_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref3){var pathname=_ref3.location.pathname,NavLink=null!=href&&href.includes(pathname)?StyledActiveLink:StyledInactiveLink;return(0,jsx_runtime.jsx)(NavLink,LocalNav_objectSpread(LocalNav_objectSpread({href,"data-test":dataTest},rest),{},{children:_children}))}})};LocalNavLink.displayName="LocalNavLink",LocalNav.propTypes={dataTest:prop_types_default().string,children:prop_types_default().node},LocalNavLink.propTypes={dataTest:prop_types_default().string,href:prop_types_default().string,children:prop_types_default().node},LocalNav.__docgenInfo={description:"",methods:[],displayName:"LocalNav",props:{dataTest:{defaultValue:{value:"'local-nav'",computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!1}}},LocalNavLink.__docgenInfo={description:"",methods:[],displayName:"LocalNavLink",props:{dataTest:{defaultValue:{value:"'local-nav-link'",computed:!1},description:"",type:{name:"string"},required:!1},href:{description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!1}}};__webpack_require__("./src/client/components/Layout/DefaultLayout.jsx");var AccessDenied=__webpack_require__("./src/client/components/AccessDenied/index.jsx");function ProtectedRoute_typeof(o){return ProtectedRoute_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ProtectedRoute_typeof(o)}var ProtectedRoute_excluded=["module","modulePermissions","userPermissions","routePermissions"];function ProtectedRoute_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ProtectedRoute_defineProperty(obj,key,value){return(key=function ProtectedRoute_toPropertyKey(arg){var key=function ProtectedRoute_toPrimitive(input,hint){if("object"!==ProtectedRoute_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==ProtectedRoute_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===ProtectedRoute_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function ProtectedRoute_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function ProtectedRoute_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var ProtectedRoute=function ProtectedRoute(_ref){var module=_ref.module,modulePermissions=_ref.modulePermissions,_ref$userPermissions=_ref.userPermissions,userPermissions=void 0===_ref$userPermissions?[]:_ref$userPermissions,_ref$routePermissions=_ref.routePermissions,routePermissions=void 0===_ref$routePermissions?[]:_ref$routePermissions,rest=ProtectedRoute_objectWithoutProperties(_ref,ProtectedRoute_excluded);return routePermissions.every((function(p){return userPermissions.includes(p)}))&modulePermissions.includes(module)?(0,jsx_runtime.jsx)(react_router.AW,function ProtectedRoute_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledFilterLabel=(0,styled_components_browser_esm.ZP)(FilterLabel.Z)({marginBottom:govuk_react_constants_esm.N_.SCALE_5}),StyledHintText=(0,styled_components_browser_esm.ZP)(govuk_react_hint_text_esm.Z)({marginBottom:govuk_react_constants_esm.N_.SCALE_2}),RoutedAventriIdFieldFilter=function RoutedAventriIdFieldFilter(_ref){var label=_ref.label,hint=_ref.hint,props=Filter_objectWithoutProperties(_ref,Filter_excluded);return(0,jsx_runtime.jsxs)(StyledFilterLabel,{children:[label,(0,jsx_runtime.jsx)(StyledHintText,{children:hint}),(0,jsx_runtime.jsx)(RoutedInput_Filter.Z,Filter_objectSpread({},props))]})};RoutedAventriIdFieldFilter.displayName="RoutedAventriIdFieldFilter",RoutedAventriIdFieldFilter.propTypes={label:prop_types_default().node.isRequired,hint:prop_types_default().string},RoutedAventriIdFieldFilter.__docgenInfo={description:"",methods:[],displayName:"RoutedAventriIdFieldFilter",props:{label:{description:"",type:{name:"node"},required:!0},hint:{description:"",type:{name:"string"},required:!1}}};var Filter_templateObject,Filter_templateObject2,RoutedRelatedCompaniesCheckboxGroup_constants=__webpack_require__("./src/client/components/RoutedRelatedCompaniesCheckboxGroup/constants.js");function Filter_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SUBSIDIARIES_LIMITED_LABEL="Due to the large number of related companies in this tree, we can only show projects from parent companies.",Filter_StyledParagraph=(0,styled_components_browser_esm.ZP)(govuk_react_esm.nv)(Filter_templateObject||(Filter_templateObject=Filter_taggedTemplateLiteral(["\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),Filter_StyledDetails=(0,styled_components_browser_esm.ZP)(govuk_react_esm.PO)(Filter_templateObject2||(Filter_templateObject2=Filter_taggedTemplateLiteral(["\n margin-bottom: 0;\n span {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16),RoutedRelatedCompaniesCheckboxGroup=function RoutedRelatedCompaniesCheckboxGroup(_ref){var company=_ref.company,selectedOptions=_ref.selectedOptions;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:company.dunsNumber&&(0,jsx_runtime.jsx)(Resource.F_,{id:company.id,children:function children(relatedCompaniesCountResponse){return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:relatedCompaniesCountResponse.relatedCompaniesCount>0&&(0,jsx_runtime.jsxs)(ToggleSection.er,{id:"ProjectCollection.include-related-companies-filters",label:"Related companies",isOpen:!0,children:[(0,jsx_runtime.jsx)(components_RoutedCheckboxGroupField,{legend:"Include related companies",name:"include_related_companies",qsParam:"include_related_companies",options:relatedCompaniesCountResponse.reducedTree?RoutedRelatedCompaniesCheckboxGroup_constants.v:RoutedRelatedCompaniesCheckboxGroup_constants.B,selectedOptions,"data-test":"include-related-companies-filter","aria-description":relatedCompaniesCountResponse.reducedTree?SUBSIDIARIES_LIMITED_LABEL:void 0}),relatedCompaniesCountResponse.reducedTree&&(0,jsx_runtime.jsx)(Filter_StyledDetails,{summary:"Why can't I filter by subsidiary companies?",children:(0,jsx_runtime.jsx)(Filter_StyledParagraph,{children:SUBSIDIARIES_LIMITED_LABEL})})]})})}})})};RoutedRelatedCompaniesCheckboxGroup.__docgenInfo={description:"",methods:[],displayName:"RoutedRelatedCompaniesCheckboxGroup"};RoutedInputField_Filter.Z,RoutedNumericRangeField_Filter.Z;var ContactLocalHeader_StyledLink=(0,styled_components_browser_esm.ZP)(govuk_react_link_esm.Z)({fontSize:govuk_react_constants_esm.Kt.SIZE_20}),StyledLocalHeaderHeading=(0,styled_components_browser_esm.ZP)(LocalHeaderHeading.Z)({display:"flex",flexWrap:"wrap",columnGap:govuk_react_constants_esm.N_.SCALE_2,marginTop:govuk_react_constants_esm.N_.SCALE_1}),currentTab=function getCurrentTab(currentPath){return currentPath.includes("/interactions")?"Activity":currentPath.includes("/audit")?"Audit history":null}(location.pathname),buildBreadcrumbs=function buildBreadcrumbs(currentTab,id,name){var initialBreadcrumbs=[{link:urls_default().dashboard.index(),text:"Home"},{link:urls_default().contacts.index(),text:"Contacts"}],dynamicBreadcrumbs=currentTab?[{link:urls_default().contacts.contact(id),text:name},{text:currentTab}]:[{text:name}];return initialBreadcrumbs.concat(dynamicBreadcrumbs)},ContactLocalHeader=function ContactLocalHeader(_ref){var contact=_ref.contact,writeFlashMessage=_ref.writeFlashMessage;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)(LocalHeader.Z,{breadcrumbs:buildBreadcrumbs(currentTab,contact.id,contact.name),children:[(0,jsx_runtime.jsxs)(govuk_react_grid_row_esm.Z,{children:[(0,jsx_runtime.jsxs)(govuk_react_grid_col_esm.Z,{children:[(0,jsx_runtime.jsx)(ContactLocalHeader_StyledLink,{"data-test":"company-link",href:urls_default().companies.overview.index(contact.company.id),children:contact.company.name}),(0,jsx_runtime.jsxs)(StyledLocalHeaderHeading,{"data-test":"contact-name",children:[contact.name,contact.primary&&(0,jsx_runtime.jsx)(Badge.Z,{"data-test":"primary-badge",borderColour:"purple",textColour:"purple",fontSize:govuk_react_constants_esm.Kt.SIZE_24,children:"Primary"})]})]}),!contact.archived&&(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWidth:"one-quarter",children:(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{"data-test":"add-interaction-button",as:govuk_react_link_esm.Z,href:urls_default().companies.interactions.create(contact.company.id),children:"Add interaction"})})]}),contact.archived&&(0,jsx_runtime.jsx)(ArchivePanel.Z,{archivedBy:contact.archivedBy,archivedOn:contact.archivedOn,archiveReason:contact.archivedReason,unarchiveUrl:urls_default().contacts.unarchive(contact.id),onClick:function onClick(){writeFlashMessage("Contact record updated")},type:"contact"})]})})};ContactLocalHeader.propTypes={contact:prop_types_default().object.isRequired,writeFlashMessage:prop_types_default().func},ContactLocalHeader.__docgenInfo={description:"",methods:[],displayName:"ContactLocalHeader",props:{contact:{description:"",type:{name:"object"},required:!0},writeFlashMessage:{description:"",type:{name:"func"},required:!1}}};const components_ContactLocalHeader=(0,es.connect)(null,(function dispatchToProps(dispatch){return{writeFlashMessage:function writeFlashMessage(message){return dispatch({type:"FLASH_MESSAGE__WRITE_TO_SESSION",messageType:"success",message})}}}))(ContactLocalHeader);var SearchLocalHeader_templateObject,SearchLocalHeader_templateObject2,SearchLocalHeader_templateObject3,SearchLocalHeader_templateObject4,FlashMessages=__webpack_require__("./src/client/components/LocalHeader/FlashMessages.jsx");function SearchLocalHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SearchLocalHeader_StyledSearchContainer=(0,styled_components_browser_esm.ZP)("div")(SearchLocalHeader_templateObject||(SearchLocalHeader_templateObject=SearchLocalHeader_taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n margin-top: 10px;\n"]))),SearchLocalHeader_StyledSearchInput=(0,styled_components_browser_esm.ZP)(govuk_react_input_esm.Z)(SearchLocalHeader_templateObject2||(SearchLocalHeader_templateObject2=SearchLocalHeader_taggedTemplateLiteral(["\n border: 2px solid #0b0c0c;\n width: 100%;\n padding-left: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),SearchLocalHeader_StyledMain=(0,styled_components_browser_esm.ZP)(govuk_react_main_esm.Z)(SearchLocalHeader_templateObject3||(SearchLocalHeader_templateObject3=SearchLocalHeader_taggedTemplateLiteral(["\n padding-top: 40px;\n"]))),StyledLabel=(0,styled_components_browser_esm.ZP)("label")({marginTop:41,fontSize:19,color:colours.au}),SearchLocalHeader_StyledHeader=(0,styled_components_browser_esm.ZP)("div")(SearchLocalHeader_templateObject4||(SearchLocalHeader_templateObject4=SearchLocalHeader_taggedTemplateLiteral(["\n padding-bottom: ",";\n background-color: ",";\n padding-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5,colours.N1,govuk_react_constants_esm.N_.SCALE_6),SearchLocalHeader=function SearchLocalHeader(_ref){var csrfToken=_ref.csrfToken,flashMessages=_ref.flashMessages;return(0,jsx_runtime.jsx)(SearchLocalHeader_StyledHeader,{"aria-label":"local header","data-auto-id":"localHeader","data-test":"localHeader",role:"region",children:(0,jsx_runtime.jsxs)("form",{method:"GET",action:"".concat(urls_default().search.type("companies"),"?_csrf=").concat(csrfToken),children:[(0,jsx_runtime.jsx)(FlashMessages.Z,{flashMessages}),(0,jsx_runtime.jsxs)(SearchLocalHeader_StyledMain,{children:[(0,jsx_runtime.jsx)(StyledLabel,{htmlFor:"search-input",children:"Search for company, contact, event, investment project or OMIS order"}),(0,jsx_runtime.jsxs)(SearchLocalHeader_StyledSearchContainer,{role:"search",children:[(0,jsx_runtime.jsx)(SearchLocalHeader_StyledSearchInput,{name:"term",type:"text",id:"search-input",placeholder:"Enter your search term(s)"}),(0,jsx_runtime.jsx)(components_SearchButton,{backgroundColour:colours.Ej})]})]})]})})};SearchLocalHeader.displayName="SearchLocalHeader",SearchLocalHeader.propTypes={csrfToken:prop_types_default().string.isRequired},SearchLocalHeader.__docgenInfo={description:"",methods:[],displayName:"SearchLocalHeader",props:{csrfToken:{description:"",type:{name:"string"},required:!0}}};var SectionHeader_templateObject;var StyledSectionHeader=(0,styled_components_browser_esm.ZP)("div")(SectionHeader_templateObject||(SectionHeader_templateObject=function SectionHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ",";\n margin-bottom: ",";\n"])),govuk_react_lib_esm.cp.font({size:24,weight:"bold"}),govuk_react_constants_esm.N_.SCALE_4),SectionHeader=function SectionHeader(_ref){var type=_ref.type,children=_ref.children;return(0,jsx_runtime.jsx)(StyledSectionHeader,{"data-test":(0,lodash.kebabCase)("".concat(type,"-header")),children})};SectionHeader.displayName="SectionHeader",SectionHeader.propTypes={type:prop_types_default().string.isRequired,children:prop_types_default().string.isRequired},SectionHeader.__docgenInfo={description:"",methods:[],displayName:"SectionHeader",props:{type:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"string"},required:!0}}};var ContactLayout_templateObject;var StyledNavWrapper=(0,styled_components_browser_esm.ZP)("div")(ContactLayout_templateObject||(ContactLayout_templateObject=function ContactLayout_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5),ContactLayout=function ContactLayout(_ref){var contact=_ref.contact,flashMessages=_ref.flashMessages,permissions=_ref.permissions,children=_ref.children,canViewActivityLink=permissions.includes("interaction.view_all_interaction");return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_ContactLocalHeader,{contact,writeFlashMessage:flashMessages}),(0,jsx_runtime.jsx)(Main.Z,{children:(0,jsx_runtime.jsxs)(govuk_react_grid_row_esm.Z,{children:[(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWidth:"one-quarter",children:(0,jsx_runtime.jsx)(StyledNavWrapper,{children:(0,jsx_runtime.jsxs)(LocalNav,{children:[(0,jsx_runtime.jsx)(LocalNavLink,{dataTest:"contact-details-link",href:urls_default().contacts.details(contact.id),children:"Details"}),canViewActivityLink&&(0,jsx_runtime.jsx)(LocalNavLink,{dataTest:"contact-activity-link",href:urls_default().contacts.interactions.index(contact.id),children:"Activity"}),(0,jsx_runtime.jsx)(LocalNavLink,{dataTest:"contact-audit-link",href:urls_default().contacts.audit(contact.id),children:"Audit history"})]})})}),(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{children})]})})]})};ContactLayout.propTypes={contact:prop_types_default().object.isRequired,permissions:prop_types_default().array.isRequired,children:prop_types_default().element.isRequired},ContactLayout.__docgenInfo={description:"",methods:[],displayName:"ContactLayout",props:{contact:{description:"",type:{name:"object"},required:!0},permissions:{description:"",type:{name:"array"},required:!0},children:{description:"",type:{name:"element"},required:!0}}};__webpack_require__("./src/client/components/Form/elements/FieldCurrency/index.jsx")},"./src/client/filters.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _require=__webpack_require__("./src/client/utils/date.js");_require.formatLongDate,_require.formatShortDate},"./src/client/modules/Companies/CollectionList/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict"},"./src/client/modules/Companies/CollectionList/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ID:()=>ID});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./src/apps/companies/apps/edit-company/client/constants.js"),__webpack_require__("./src/client/filters.js"),__webpack_require__("./src/client/modules/Companies/CollectionList/constants.js"),__webpack_require__("./src/client/modules/Companies/CollectionList/transformers.js"),__webpack_require__("./src/client/utils/index.js");var ID="companiesList"},"./src/client/modules/Companies/CollectionList/transformers.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.string.trim.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/lodash/lodash.js");__webpack_require__("./src/lib/urls.js"),__webpack_require__("./src/client/utils/addresses.js");var _require=__webpack_require__("./src/client/utils/date.js");_require.format,_require.formatMediumDateTime},"./src/client/modules/ExportPipeline/ExportList/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ID:()=>ID,k0:()=>TASK_GET_EXPORT_PIPELINE_LIST,L2:()=>TASK_GET_EXPORT_PIPELINE_METADATA,Hq:()=>state2props});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lib=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/qs/lib/index.js")),lib_default=__webpack_require__.n(lib);function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var getQueryParamsFromLocation=function getQueryParamsFromLocation(location){var queryString=location.search.slice(1);return(0,lodash.omitBy)(function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var TASK_GET_EXPORT_PIPELINE_LIST="TASK_GET_EXPORT_PIPELINE_LIST",TASK_GET_EXPORT_PIPELINE_METADATA="TASK_GET_EXPORT_PIPELINE_METADATA",ID="exportPipelineList",areFiltersActive=function areFiltersActive(queryParams){var filters=(0,lodash.omitBy)(queryParams,(function(filterValue,filterName){return"all-statuses"===filterValue||"page"===filterName}));return!(0,lodash.isEmpty)(filters)},state2props=function state2props(_ref){var router=_ref.router,state=_objectWithoutProperties(_ref,_excluded),queryParams=getQueryParamsFromLocation(router.location),_state$ID=state[ID],sectorOptions=_state$ID.sectorOptions,countryOptions=_state$ID.countryOptions,ownerOptions=_state$ID.ownerOptions;return state_objectSpread(state_objectSpread({},state[ID]),{},{payload:state_objectSpread(state_objectSpread({},queryParams),{},{page:(0,pagination.parsePage)(queryParams.page)}),filters:{areActive:areFiltersActive(queryParams),status:{options:STATUS_LIST_OPTIONS},exportPotential:{options:EXPORT_POTENTIAL_LIST_OPTIONS},sector:{options:sectorOptions},country:{options:countryOptions},owner:{options:ownerOptions},sortby:{options:SORT_OPTIONS}}})}},"./src/client/modules/Investments/Projects/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Fg:()=>STAGE_PROSPECT,RH:()=>STAGE_ACTIVE,S7:()=>NOT_LINKED_TO_R_AND_D,Xg:()=>STAGE_ASSIGN_PM,Zq:()=>STAGE_VERIFY_WIN,aP:()=>SORT_OPTIONS,pS:()=>STAGE_WON,pZ:()=>INVESTMENT_PROJECT_STAGES});__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/react/jsx-runtime.js");var STAGE_PROSPECT="Prospect",STAGE_ASSIGN_PM="Assign PM",STAGE_ACTIVE="Active",STAGE_VERIFY_WIN="Verify win",STAGE_WON="Won",INVESTMENT_PROJECT_STAGES=[STAGE_PROSPECT,STAGE_ASSIGN_PM,STAGE_ACTIVE,STAGE_VERIFY_WIN,STAGE_WON],NOT_LINKED_TO_R_AND_D="Not linked to a non-FDI R&D project",SORT_OPTIONS=[{name:"Recently created",value:"created_on:desc"},{name:"Earliest land date",value:"estimated_land_date:asc"},{name:"Latest land date",value:"estimated_land_date:desc"},{name:"Project name A-Z",value:"name:asc"}]},"./src/client/styles.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>focusMixin});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var _govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/utils/colours.js"),focusMixin={"&:focus":{outline:"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.lT," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__.tL),outlineOffset:"0"}}},"./src/client/transformers/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TZ:()=>transformIdNameToValueLabel});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/lodash/lodash.js"),__webpack_require__("./src/common/constants.js"),__webpack_require__("./src/client/utils/date.js");var transformIdNameToValueLabel=function transformIdNameToValueLabel(value){return value?{value:value.id,label:value.name}:null}},"./src/client/utils/addresses.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var _require=__webpack_require__("./node_modules/lodash/lodash.js"),get=_require.get,compact=_require.compact;module.exports={addressToString:function addressToString(address){return["line_1","line_2","town","county","postcode","area.name","country.name"].map((function(component){return get(address,component)})).filter((function(value){return value})).join(", ")},addressToStringResource:function addressToStringResource(address){return["line1","line2","town","county","postcode","area.name","country.name"].map((function(component){return get(address,component)})).filter((function(value){return value})).join(", ")},getCompanyAddress:function getCompanyAddress(dnb_company){if(dnb_company)return compact([dnb_company.address_line_1,dnb_company.address_line_2,dnb_company.address_town,dnb_company.address_county,dnb_company.address_area_name,dnb_company.address_postcode]).join(", ")}}},"./src/client/utils/colours.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$C:()=>TAG_COLOURS,$R:()=>YELLOW,Cj:()=>WHITE,DU:()=>BORDER_COLOUR,E5:()=>BLACK,Ej:()=>BLUE,F3:()=>LIGHT_BLUE,FU:()=>GREY_2,J7:()=>LIGHT_GREY,KW:()=>LINK_ACTIVE_COLOUR,Ll:()=>FOOTER_BACKGROUND,N1:()=>GREY_3_LEGACY,Pf:()=>LINK_VISITED_COLOUR,Rt:()=>LIGHT_BLUE_50,TK:()=>GREY_1,Wd:()=>PURPLE,ZA:()=>GREEN,ZR:()=>FOOTER_TEXT,Zv:()=>LIGHT_BLUE_25,ar:()=>FOOTER_LINK_HOVER,au:()=>DARK_GREY,cK:()=>TEXT_COLOUR,d7:()=>SECONDARY_TEXT_COLOUR,et:()=>FOOTER_LINK,g$:()=>BUTTON_COLOUR,gX:()=>PROPOSITION_BORDER,gr:()=>FOOTER_BORDER_TOP,h:()=>ERROR_COLOUR,hJ:()=>DARK_BLUE_LEGACY,hM:()=>RED,jG:()=>YELLOW_25,lX:()=>BUTTON_COLOUR_DARKEN_15,m4:()=>rgba,nx:()=>GREY_3,oh:()=>LINK_HOVER_COLOUR,su:()=>LINK_COLOUR,tL:()=>FOCUS_COLOUR,ud:()=>ORANGE,w8:()=>MID_GREY,xm:()=>PAGE_COLOUR,zT:()=>GREY_4});__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var rgba=function rgba(colorHex,alpha){return"rgba(".concat(function hexToRgb(colorHex){var colorValue=parseInt(colorHex.replace("#",""),16);return[colorValue>>16&255,colorValue>>8&255,255&colorValue].join()}(colorHex),",").concat(alpha,")")},GREY_3_LEGACY="#dee0e2",DARK_BLUE_LEGACY="#005ea5",DARK_GREY="#505a5f",MID_GREY="#b1b4b6",LIGHT_GREY="#f3f2f1",BLUE="#1d70b8",PURPLE="#2e358b",RED="#d4351c",ORANGE="#f47738",YELLOW="#ffdd00",YELLOW_25="#fff2d3",GREEN="#006435",LIGHT_BLUE="#2b8cc4",LIGHT_BLUE_50="#96c6e2",LIGHT_BLUE_25="#d5e8f3",BLACK="#0b0c0c",GREY_1=DARK_GREY,GREY_2="#bfc1c3",GREY_3=LIGHT_GREY,GREY_4="#f8f8f8",WHITE="#ffffff",LINK_COLOUR=BLUE,LINK_ACTIVE_COLOUR=LIGHT_BLUE,LINK_HOVER_COLOUR=LIGHT_BLUE,LINK_VISITED_COLOUR="#4c2c92",BUTTON_COLOUR="#00703c",BUTTON_COLOUR_DARKEN_15="#002413",FOCUS_COLOUR=YELLOW,TEXT_COLOUR=BLACK,SECONDARY_TEXT_COLOUR=DARK_GREY,BORDER_COLOUR=GREY_2,PAGE_COLOUR=WHITE,ERROR_COLOUR=RED,PROPOSITION_BORDER="#2e3133",FOOTER_BACKGROUND=LIGHT_GREY,FOOTER_BORDER_TOP="#a1acb2",FOOTER_LINK="#454a4c",FOOTER_LINK_HOVER="#171819",FOOTER_TEXT=FOOTER_LINK,TAG_COLOURS={default:{colour:WHITE,background:BLUE},grey:{colour:"#454a4d",background:"#eff0f1"},green:{colour:"#005a30",background:"#cce2d8"},darkGreen:{colour:WHITE,background:"#10403c"},turquoise:{colour:"#10403c",background:"#bfe3e0"},blue:{colour:"#144e81",background:"#d2e2f1"},purple:{colour:"#3d2375",background:"#dbd5e9"},pink:{colour:"#80224d",background:"#f7d7e6"},red:{colour:"#942514",background:"#f6d7d2"},orange:{colour:"#6e3619",background:"#fcd6c3"},yellow:{colour:"#594d00",background:"#fff7bf"}}},"./src/client/utils/date.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.number.is-nan.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var _require=__webpack_require__("./node_modules/date-fns/esm/index.js"),addDaysFns=_require.addDays,addMonthsFns=_require.addMonths,addYearsFns=_require.addYears,differenceInCalendarDays=_require.differenceInCalendarDays,endOfToday=_require.endOfToday,endOfYesterday=_require.endOfYesterday,formatFns=_require.format,formatDistanceToNowStrict=_require.formatDistanceToNowStrict,isAfter=_require.isAfter,isValid=_require.isValid,minutesToHours=_require.minutesToHours,parse=_require.parse,parseISO=_require.parseISO,subDays=_require.subDays,subMonths=_require.subMonths,subYears=_require.subYears,subWeeks=_require.subWeeks,differenceInCalendarMonths=_require.differenceInCalendarMonths,isFuture=_require.isFuture,_require2=__webpack_require__("./src/common/constants.js"),DATE_LONG_FORMAT_1=_require2.DATE_LONG_FORMAT_1,DATE_LONG_FORMAT_2=_require2.DATE_LONG_FORMAT_2,DATE_LONG_FORMAT_3=_require2.DATE_LONG_FORMAT_3,DATE_MEDIUM_FORMAT=_require2.DATE_MEDIUM_FORMAT,DATE_TIME_MEDIUM_FORMAT=_require2.DATE_TIME_MEDIUM_FORMAT,DATE_SHORT_FORMAT=_require2.DATE_SHORT_FORMAT,DATE_SHORT_FORMAT_2=_require2.DATE_SHORT_FORMAT_2,INTERACTION_TIMESTAMP_FORMAT=_require2.INTERACTION_TIMESTAMP_FORMAT,DATE_DAY_MONTH=_require2.DATE_DAY_MONTH;function isDateAfter(date1,date2){return isAfter(date1,date2)}function isDateValid(date){return isValid(parseISO(date))}function isUnparsedDateValid(date){return isValid(date)}function isNormalisedDateValid(year,month,day){var format=arguments.length>3&&void 0!==arguments[3]?arguments[3]:DATE_LONG_FORMAT_3,date=normaliseAndFormatDate(year,month,day);return isValid(parse(date,format,new Date))}function format(dateStr){var dateFormat=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DATE_LONG_FORMAT_2;return isDateValid(dateStr)?formatFns(parseISO(dateStr),dateFormat):null}var padZero=function padZero(value){var parsedValue=parseInt(value,10);return Number.isNaN(parsedValue)?value:parsedValue<10?"0".concat(parsedValue):parsedValue.toString()};function normaliseAndFormatDate(year,month,day){var y=padZero(year),m=padZero(month),yearAndMonth="".concat(padZero(y),"-").concat(padZero(m));return day?"".concat(yearAndMonth,"-").concat(padZero(day)):yearAndMonth}function getDifferenceInDays(dateIn){var today=endOfToday();return differenceInCalendarDays(new Date(dateIn),today)}function convertDateToFieldDateObject(date){var parsedTime=parseISO(date);return isValid(parsedTime)?{day:parsedTime.getDate(),month:parsedTime.getMonth()+1,year:parsedTime.getFullYear()}:{day:"",month:"",year:""}}module.exports={addDays:function addDays(date,daysToAdd){return addDaysFns(date,daysToAdd)},addMonths:function addMonths(date,numberOfMonths){return addMonthsFns(date,numberOfMonths)},addYears:function addYears(date,yearsToAdd){return addYearsFns(date,yearsToAdd)},convertMinutesToHours:function convertMinutesToHours(date){return minutesToHours(date)},createAndFormatDateObject:function createAndFormatDateObject(date){return parse(date,arguments.length>1&&void 0!==arguments[1]?arguments[1]:DATE_LONG_FORMAT_3,new Date)},format,formatMediumDate:function formatMediumDate(dateString){return format(dateString,DATE_MEDIUM_FORMAT)},formatMediumDateTime:function formatMediumDateTime(dateString){return format(dateString,DATE_TIME_MEDIUM_FORMAT)},formatLongDate:function formatLongDate(dateString){return format(dateString,DATE_LONG_FORMAT_1)},formatShortDate:function formatShortDate(dateString){return format(dateString,DATE_SHORT_FORMAT_2)},formatMonthYearDate:function formatMonthYearDate(date){return formatFns(parse(date,DATE_SHORT_FORMAT,new Date),DATE_LONG_FORMAT_3)},formatWithoutParsing:function formatWithoutParsing(date){var dateFormat=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DATE_LONG_FORMAT_2;return isUnparsedDateValid(date)?formatFns(date,dateFormat):null},generateFinancialYearLabel:function generateFinancialYearLabel(yearStart){return"".concat(yearStart,"-").concat((yearStart+1).toString().slice(-2))},getDifferenceInDays,getDifferenceInDaysLabel:function getDifferenceInDaysLabel(dateIn){var difference=getDifferenceInDays(dateIn);return 1===Math.abs(difference)?difference+" day":difference+" days"},getDifferenceInWords:function getDifferenceInWords(date){var suffix=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],formattedDate=formatDistanceToNowStrict(parseISO(date),{addSuffix:suffix});return"1 day ago"==formattedDate?"a day ago":formattedDate},getInteractionTimestamp:function getInteractionTimestamp(_ref2){var offset=_ref2.offset,date=new Date;return offset>0&&subMonths(date,offset),format(date,INTERACTION_TIMESTAMP_FORMAT)},getFinancialYearStart:function getFinancialYearStart(date){return date.getMonth()<3?date.getFullYear()-1:date.getFullYear()},getYesterday:function getYesterday(){return endOfYesterday()},isDateAfter,isDateValid,isNormalisedDateValid,isShortDateValid:function isShortDateValid(year,month){return isNormalisedDateValid(year,month,null,DATE_SHORT_FORMAT)},isUnparsedDateValid,parseDateString:function parseDateString(dateString){if(-1!==dateString.indexOf("/")){var parts=dateString.split("/");return new Date(parts[2],parts[1]-1,parts[0])}var date=new Date(dateString);return"Invalid Date"!==date.toString()?date:null},subtractDays:function subtractDays(date,daysToSubtract){return subDays(date,daysToSubtract)},subtractMonths:function subtractMonths(date,numberOfMonths){return subMonths(date,numberOfMonths)},subtractYears:function subtractYears(date,yearsToSubtract){return subYears(date,yearsToSubtract)},subtractWeeks:function subtractWeeks(date,numberOfweeks){return subWeeks(date,numberOfweeks)},today:function today(){return format(new Date)},transformValueForAPI:function transformValueForAPI(_ref){var year=_ref.year,month=_ref.month,_ref$day=_ref.day,day=void 0===_ref$day?1:_ref$day;return year&&month&&day?normaliseAndFormatDate(year,month,day):null},createDateFromObject:function createDateFromObject(_ref3){var day=_ref3.day,month=_ref3.month,year=_ref3.year,monthIndex=parseInt(month,10)-1;return new Date(year,monthIndex,day)},formatStartAndEndDate:function formatStartAndEndDate(startDate,endDate){var startDateParsed=parseISO(startDate),endDateParsed=parseISO(endDate),startDateFormatted=format(startDate),endDateFormatted=format(endDate);return endDate&&isDateAfter(endDateParsed,startDateParsed)?startDateParsed.toDateString()===endDateParsed.toDateString()?startDateFormatted:0==differenceInCalendarMonths(endDateParsed,startDateParsed)?"".concat(startDateParsed.getDate()," to ").concat(endDateFormatted):startDateParsed.getFullYear()===endDateParsed.getFullYear()?"".concat(format(startDate,DATE_DAY_MONTH)," to ").concat(endDateFormatted):"".concat(startDateFormatted," to ").concat(endDateFormatted):startDateFormatted},convertDateToFieldShortDateObject:function convertDateToFieldShortDateObject(date){var _convertDateToFieldDa=convertDateToFieldDateObject(date);return{month:_convertDateToFieldDa.month,year:_convertDateToFieldDa.year}},isDateInFuture:function isDateInFuture(date){return isFuture(parseISO(date))},parseDateISO:function parseDateISO(date){return parseISO(date)},convertDateToFieldDateObject}},"./src/client/utils/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U7:()=>idNamesToValueLabels,lI:()=>deepKeysToCamelCase});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.from-entries.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var lodash__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/lodash/lodash.js");__webpack_require__("./node_modules/qs/lib/index.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.object.values.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.match.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var react_router_dom__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/react-router/esm/react-router.js"),lodash__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/lodash/lodash.js"),react_redux__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/react-redux/es/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_30__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["type"],_excluded2=["type"],_excluded3=["dispatch"];function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var interceptDispatch=function interceptDispatch(dispatch,id){return function(_ref2){var type=_ref2.type,action=_objectWithoutProperties(_ref2,_excluded2);return dispatch(_objectSpread(_objectSpread({},action),{},{type,id}))}},connect=function connect(componentState2props,dispatch2props){for(var _len=arguments.length,rest=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++)rest[_key-2]=arguments[_key];return(0,lodash__WEBPACK_IMPORTED_MODULE_27__.curry)((function(Component,name,idProp){componentState2props=componentState2props||function(x){return x};var Connected=react_redux__WEBPACK_IMPORTED_MODULE_28__.connect.apply(react_redux__WEBPACK_IMPORTED_MODULE_28__,[function(state,props){var _state$name;return componentState2props((null===(_state$name=state[name])||void 0===_state$name?void 0:_state$name[props[idProp]])||{},state,props)},dispatch2props&&function(dispatch,props){for(var _len2=arguments.length,rest=new Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)rest[_key2-2]=arguments[_key2];return dispatch2props.apply(void 0,[interceptDispatch(dispatch,props[idProp]),props].concat(rest))}].concat(rest))((function(_ref3){var dispatch=_ref3.dispatch,props=_objectWithoutProperties(_ref3,_excluded3);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(Component,_objectSpread(_objectSpread({},props),{},{dispatch:interceptDispatch(dispatch,props[idProp])}))}));return Connected.propTypes=_defineProperty({},idProp,prop_types__WEBPACK_IMPORTED_MODULE_30___default().string.isRequired),Connected}))};const __WEBPACK_DEFAULT_EXPORT__=function(_ref4){var name=_ref4.name,component=_ref4.component,reducer=_ref4.reducer,actionPattern=_ref4.actionPattern,_ref4$connectArgs=_ref4.connectArgs,connectArgs=void 0===_ref4$connectArgs?[]:_ref4$connectArgs,_ref4$componentStateT=_ref4.componentStateToProps,componentStateToProps=void 0===_ref4$componentStateT?function(x){return x}:_ref4$componentStateT,dispatchToProps=_ref4.dispatchToProps,_ref4$idProp=_ref4.idProp,idProp=void 0===_ref4$idProp?"id":_ref4$idProp;console.assert(component,"component is required"),console.assert(reducer,"reducer is required"),console.assert(name,"name is required"),console.assert(actionPattern,"actionPattern is required");var Connected=connect.apply(void 0,[componentStateToProps,dispatchToProps].concat(_toConsumableArray(connectArgs)))(component)(name,idProp);return Connected.reducerSpread=_defineProperty({},name,function reducerDecorator(reducer,actionPattern){var idProp=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return function(){var _String$Object$Array$,_String$Object$Array$2,state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,action=_objectWithoutProperties(_ref,_excluded),id=action[idProp],handleAction=null===(_String$Object$Array$=(_String$Object$Array$2={String:function String(){return type.startsWith(actionPattern)},Object:function(_Object){function Object(){return _Object.apply(this,arguments)}return Object.toString=function(){return _Object.toString()},Object}((function(){return Object.values(actionPattern).includes(type)})),Array:function Array(){return actionPattern.includes(type)},RegExp:function RegExp(){return type.match(actionPattern)}})[Object.prototype.toString.apply(actionPattern).slice(8,-1)])||void 0===_String$Object$Array$?void 0:_String$Object$Array$.call(_String$Object$Array$2);if(handleAction&&id){var nextState=reducer(state[id],_objectSpread({type},action));return(0,lodash__WEBPACK_IMPORTED_MODULE_27__.isEmpty)(nextState)?(0,lodash__WEBPACK_IMPORTED_MODULE_27__.omit)(state,id):_objectSpread(_objectSpread({},state),{},_defineProperty({},id,nextState))}return state}}(reducer,actionPattern,idProp)),Connected.displayName="multiInstance(".concat(name,")"),(0,react_router_dom__WEBPACK_IMPORTED_MODULE_31__.EN)(Connected)}},"./src/client/utils/number-utils.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AO:()=>parseLocaleNumber,Jw:()=>indexToOrdinal,gH:()=>decimal,mk:()=>currencyGBP});__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:{maximumSignificantDigits:21};return number||0===number?new Intl.NumberFormat("en-GB",_objectSpread({style:"currency",currency:"GBP"},options)).format(number):null},indexToOrdinal=function indexToOrdinal(zeroBasedIndex){var naturalIndex=zeroBasedIndex+1,units=naturalIndex%10;return units>3||1===~~(naturalIndex/10)%10?naturalIndex+"th":1===units?naturalIndex+"st":2===units?naturalIndex+"nd":3===units?naturalIndex+"rd":void 0},parseLocaleNumber=function parseLocaleNumber(stringNumber){var locale=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB";if(!stringNumber.length)return stringNumber;var thousandSeparator=Intl.NumberFormat(locale).format(11111).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g,""),decimalSeparator=Intl.NumberFormat(locale).format(1.1).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g,"");return Number(stringNumber.replace(new RegExp("\\"+thousandSeparator,"g"),"").replace(new RegExp("\\"+decimalSeparator),"."))}},"./src/client/utils/pagination.js":module=>{module.exports={getPageOffset:function getPageOffset(_ref){var limit=_ref.limit,page=_ref.page,_ref$maxItems=_ref.maxItems,maxItems=void 0===_ref$maxItems?1e4:_ref$maxItems;return Math.min(limit*(page-1),maxItems-limit)||0},parsePage:function parsePage(page){var defaultValue=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,pageNumber=parseInt(page,10);return isNaN(pageNumber)?defaultValue:pageNumber}}},"./src/common/constants.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.object.values.js");var OPTIONS_YES_NO=[{label:"Yes",value:"yes"},{label:"No",value:"no"}],EXPORT_INTEREST_STATUS={EXPORTING_TO:"currently_exporting",FUTURE_INTEREST:"future_interest",NOT_INTERESTED:"not_interested"};module.exports={DATE_DAY_LONG_FORMAT:"E, dd MMM yyyy",DATE_DAY_MONTH:"dd MMM",DATE_LONG_FORMAT_1:"d MMMM yyyy",DATE_LONG_FORMAT_2:"dd MMM yyyy",DATE_LONG_FORMAT_3:"yyyy-MM-dd",DATE_MEDIUM_FORMAT:"d MMM yyyy",DATE_TIME_MEDIUM_FORMAT:"d MMM yyyy, h:mmaaa",DATE_SHORT_FORMAT:"yyyy-MM",DATE_SHORT_FORMAT_2:"MMMM yyyy",INTERACTION_TIMESTAMP_FORMAT:"y-MM-d",UNITED_KINGDOM_ID:"80756b9a-5d95-e211-a939-e4115bead28a",UNITED_STATES_ID:"81756b9a-5d95-e211-a939-e4115bead28a",CANADA_ID:"5daf72a6-5d95-e211-a939-e4115bead28a",PRIMARY_LINK_PARAMS:{companies:"?archived[0]=false&sortby=modified_on:desc&page=1",contacts:"?archived[0]=false&sortby=modified_on:desc&page=1",events:"?page=1&sortby=modified_on:desc",interactions:"?page=1&sortby=date:desc",investments:"?page=1&sortby=created_on:desc",omis:"?page=1&sortby=created_on:desc"},INVESTMENT_LINK_PARAM:"?sortby=-created_on&page=1",GENERIC_PHONE_NUMBER_REGEX:/^$|([0-9]|#|\+|\s|\(|\))+$/,OPTIONS_YES_NO,OPTION_YES:"yes",OPTION_NO:"no",FORM_LAYOUT:{THREE_QUARTERS:"three-quarters",ONE_THIRD:"one-third",TWO_THIRDS:"two-thirds",ONE_HALF:"one-half"},METHOD_PATCH:"PATCH",METHOD_POST:"POST",EXPORT_INTEREST_STATUS,EXPORT_INTEREST_STATUS_VALUES:Object.values(EXPORT_INTEREST_STATUS)}},"./src/common/formatAdviser.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.string.trim.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");module.exports={parseAdviserData:function parseAdviserData(advisers){return advisers.filter((function(adviser){return adviser.name&&adviser.name.trim().length})).map((function(_ref){var id=_ref.id,name=_ref.name,dit_team=_ref.dit_team;return{label:"".concat(name).concat(dit_team?", "+dit_team.name:""),chipLabel:name,value:id}}))}}},"./src/lib/group-export-countries.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.array.sort.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var EXPORT_INTEREST_STATUS_VALUES=__webpack_require__("./src/common/constants.js").EXPORT_INTEREST_STATUS_VALUES;module.exports=function(countries){var buckets={};return Array.isArray(countries)&&(EXPORT_INTEREST_STATUS_VALUES.forEach((function(status){buckets[status]=[]}),{}),countries.forEach((function(item){var bucket=buckets[item.status];bucket&&bucket.push(item.country)})),EXPORT_INTEREST_STATUS_VALUES.forEach((function(status){buckets[status]=buckets[status].sort((function(a,b){return a.name.localeCompare(b.name)}))}))),buckets}},"./src/lib/urls.js":(module,__unused_webpack_exports,__webpack_require__)=>{function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:"";return{index:"/interactions"===mountPoint?url(mountPoint,PRIMARY_LINK_PARAMS.interactions,pathPrefix):url(mountPoint,pathPrefix),detail:url(mountPoint,pathPrefix+"/:interactionId"),create:url(mountPoint,pathPrefix+"/create"),createType:url(mountPoint,pathPrefix+"/create/:theme/:kind"),edit:url(mountPoint,pathPrefix+"/:interactionId/edit")}}module.exports={testing:{index:url("/testing")},external:{greatProfile:function greatProfile(id){return"https://www.great.gov.uk/international/trade/suppliers/".concat(id)},companiesHouse:function companiesHouse(companyNumber){return"https://beta.companieshouse.gov.uk/company/".concat(companyNumber)},findExporters:function findExporters(){return"https://data.trade.gov.uk/datasets/4a0da123-a933-4250-90b5-df5cde34930b"},exportWins:function exportWins(){return"https://www.exportwins.service.trade.gov.uk/"},digitalWorkspace:{teams:"https://people.trade.gov.uk/teams/department-for-international-trade",accountManagement:"https://workspace.trade.gov.uk/working-at-dit/policies-and-guidance/strategic-relationship-account-management/",accountManagementStrategyTeam:"https://workspace.trade.gov.uk/working-at-dit/policies-and-guidance/the-account-management-strategy-team"},helpCentre:{community:{roadmap:function roadmap(){return"https://data-services-help.trade.gov.uk/data-hub/updates/roadmap/data-hub-roadmap/ "},feedback:function feedback(){return"https://data-services-help.trade.gov.uk/data-hub/crm-community/feedback-or-propose-changes"},principles:function principles(){return"https://data-services-help.trade.gov.uk/data-hub/crm-community/crm-principles"},training:function training(){return"https://data-services-help.trade.gov.uk/data-hub/crm-community/training"}},accessibilityStatement:function accessibilityStatement(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/data-hub-accessibility-statement/data-hub-accessibility-statement/"},dhHomepage:function dhHomepage(){return"https://data-services-help.trade.gov.uk/data-hub/"},pipeline:function pipeline(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/account-management/my-pipeline/"},policyFeedback:function policyFeedback(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/interactions-and-service-delivery/record-business-intelligence-interaction/"},tradeagreementGuidance:function tradeagreementGuidance(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/trade-agreement-activity/recording-trade-agreement-activity/"},cookies:function cookies(){return"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/data-hub-cookie-policy/"},privacyNotice:function privacyNotice(){return"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/data-hub-privacy-notice/"},allUpdates:function allUpdates(){return"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/"}},copyright:"https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",referrals:"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/improving-collaboration-internal-referrals/",reminderAndSettings:"https://data-services-help.trade.gov.uk/data-hub/how-articles/reminders-and-email-notifications/",euVIES:"http://ec.europa.eu/taxation_customs/vies/"},dashboard:{index:url("/"),investmentProjects:url("/investment-projects")},oauth:{redirect:url("/oauth"),callback:url("/oauth/callback"),signout:url("/oauth/sign-out")},company:{exportWin:url("/api-proxy/v4/company","/:companyId/export-win")},community:{index:url("/community")},companies:{index:url("/companies",PRIMARY_LINK_PARAMS.companies),create:url("/companies","/create"),createFromDNB:url("/companies/create?duns_number=",":dunsNumber"),export:url("/companies","/export"),detail:url("/companies","/:companyId"),edit:url("/companies","/:companyId/edit"),audit:url("/companies","/:companyId/audit"),lists:{index:url("/companies","/:companyId/lists"),addRemove:url("/companies","/:companyId/lists/add-remove")},orders:url("/companies","/:companyId/orders"),details:url("/companies","/:companyId/details"),archive:url("/companies","/:companyId/archive"),contacts:url("/companies","/:companyId/contacts"),unarchive:url("/companies","/:companyId/unarchive"),businessDetails:url("/companies","/:companyId/business-details"),editOneList:url("/companies","/:companyId/edit-one-list"),editVirtualTeam:url("/companies","/:companyId/edit-one-list?step=oneListAdvisers"),interactions:createInteractionsSubApp("/companies","/:companyId/interactions"),manageCompanyList:url("/companies","/:companyId/manage-company-list"),referrals:{list:url("/my-referrals"),send:url("/companies","/:companyId/referrals/send"),details:url("/companies","/:companyId/referrals/:referralId"),help:url("/companies","/:companyId/referrals/:referralId/help"),interactions:createInteractionsSubApp("/companies","/:companyId/referrals/:referralId/interactions")},activity:{index:url("/companies","/:companyId/activity"),data:url("/companies","/:companyId/activity/data")},editHistory:{index:url("/companies","/:companyId/edit-history"),data:url("/companies","/:companyId/edit-history/data")},dnbHierarchy:{index:url("/companies","/:companyId/dnb-hierarchy"),data:url("/companies","/:companyId/dnb-hierarchy/data"),tree:url("/companies","/:companyId/company-tree"),relatedCompaniesCount:url("/v4/dnb","/:companyId/related-companies/count")},exports:{index:url("/companies","/:companyId/exports"),edit:url("/companies","/:companyId/exports/edit"),editCountries:url("/companies","/:companyId/exports/edit-countries"),history:{index:url("/companies","/:companyId/exports/history"),country:url("/companies","/:companyId/exports/history/:countryId")}},exportWins:{index:url("/exportwins"),confirmed:url("/exportwins/confirmed"),unconfirmed:url("/exportwins/unconfirmed")},overview:{index:url("/companies","/:companyId/overview")},hierarchies:{ghq:{add:url("/companies","/:companyId/hierarchies/ghq/:globalHqId/add"),link:url("/companies","/:companyId/hierarchies/ghq/search"),remove:url("/companies","/:companyId/hierarchies/ghq/remove")},subsidiaries:{search:url("/companies","/:companyId/hierarchies/subsidiaries/search"),add:url("/companies","/:companyId/hierarchies/subsidiaries/:subsidiaryCompanyId/add")}},investments:{companyInvestment:url("/companies","/:companyId/investments"),companyInvestmentProjects:url("/companies","/:companyId/investments/projects"),companyInvestmentProjectsWithSearch:url("/companies","/:companyId/investments/projects?page=1&sortby=created_on%3Adesc"),largeCapitalProfile:url("/companies","/:companyId/investments/large-capital-profile")},match:{index:url("/companies","/:companyId/match"),confirmation:url("/companies","/:companyId/match/:dunsNumber"),link:url("/companies","/:companyId/match/link"),merge:url("/companies","/:companyId/match/merge"),cannotFind:url("/companies","/:companyId/match/cannot-find")},subsidiaries:{index:url("/companies","/:companyId/subsidiaries"),link:url("/companies","/:companyId/subsidiaries/link")},accountManagement:{index:url("/companies","/:companyId/account-management"),strategy:{create:url("/companies","/:companyId/account-management/strategy/create"),edit:url("/companies","/:companyId/account-management/strategy/edit")},objectives:{create:url("/companies","/:companyId/account-management/objective/create"),edit:url("/companies","/:companyId/account-management/objective/:objectiveId/edit"),archived:url("/companies","/:companyId/account-management/objective/archived"),archive:url("/companies","/:companyId/account-management/objective/:objectiveId/archive")},advisers:{assign:url("/companies","/:companyId/account-management/advisers/assign"),remove:url("/companies","/:companyId/account-management/advisers/remove")}}},companyLists:{index:url("/company-lists"),delete:url("/company-lists","/:listId/delete"),rename:url("/company-lists","/:listId/rename")},contacts:{activity:{data:url("/contacts","/:contactId/activity/data")},index:url("/contacts",PRIMARY_LINK_PARAMS.contacts),export:url("/contacts","/export"),audit:url("/contacts","/:contactId/audit"),contact:url("/contacts","/:contactId"),create:url("/contacts/create?company=",":companyId"),contactActivities:url("/contacts","/:contactId/interactions"),details:url("/contacts","/:contactId/details"),edit:url("/contacts","/:contactId/edit"),interactions:createInteractionsSubApp("/contacts","/:contactId/interactions"),archive:url("/contacts","/:contactId/archive"),unarchive:url("/contacts","/:contactId/unarchive")},events:{activity:{data:url("/events","/activity/data")},index:url("/events",PRIMARY_LINK_PARAMS.events),create:url("/events/create"),details:url("/events","/:eventId/details"),edit:url("/events","/:eventId/edit"),attendees:url("/events","/:eventId/attendees"),find:url("/events","/:eventId/attendees/find-new"),addAttendee:url("/events","/:eventId/attendees/create/:contactId"),aventri:{details:url("/events","/aventri/:aventriEventId/details"),detailsData:url("/events","/aventri/:aventriEventId/details/data"),registrationStatus:url("/events","/aventri/:aventriEventId/registration/:status"),registrationStatusData:url("/events","/aventri/:aventriEventId/registration/attendees/data")}},search:{index:url("/search"),type:url("/search","/:searchPath?")},interactions:_objectSpread(_objectSpread({},createInteractionsSubApp("/interactions")),{},{activeEvents:url("/activeEvents"),activeEventsData:url("/interactions","/activeEvents"),export:url("/interactions","/export"),exportSupportService:{details:url("/interactions","/ess/:essInteractionId/details"),detailsData:url("/interactions","/ess/:essInteractionId/details/data")}}),investments:{index:url("/investments",PRIMARY_LINK_PARAMS.investments),projects:{index:url("/investments","/projects"),export:url("/investments","/projects","/export"),details:url("/investments","/projects/:investmentId/details"),editDetails:url("/investments","/projects/:investmentId/edit-details"),editRequirements:url("/investments","/projects/:investmentId/edit-requirements"),editTeamMembers:url("/investments","/projects/:investmentId/edit-team-members"),editValue:url("/investments","/projects/:investmentId/edit-value"),propositions:url("/investments","/projects/:investmentId/propositions",INVESTMENT_LINK_PARAM),proposition:{details:url("/investments","/projects/:investmentId/propositions/:propositionId"),abandon:url("/investments","/projects/:investmentId/propositions/:propositionId/abandon"),document:url("/investments","/projects/:investmentId/propositions/:propositionId/document"),complete:url("/investments","/projects/:investmentId/propositions/:propositionId/complete"),create:url("/investments","/projects/:investmentId/propositions/create/proposition")},team:url("/investments","/projects/:investmentId/team"),clientRelationshipManagement:url("/investments","/projects/:investmentId/edit-client-relationship-management"),interactions:createInteractionsSubApp("/investments/projects","/:investmentId/interactions",INVESTMENT_LINK_PARAM),status:url("/investments","/projects/:projectId/status"),admin:url("/investments","/projects/:projectId/admin"),create:url("/investments","/projects/create/:companyId"),editProjectManagement:url("/investments","/projects/:projectId/edit-project-management"),findAssociatedProject:url("/investments","/projects/:projectId/find-associated"),editAssociatedProject:url("/investments","/projects/:projectId/edit-associated/:associatedProjectId"),evidence:{index:url("/investments","/projects/:projectId/evidence"),add:url("/investments","/projects/:projectId/evidence/add-new"),delete:url("/investments","/projects/:projectId/evidence/:evidenceId/delete")},recipientCompany:url("/investments","/projects/:projectId/find-ukcompany"),editRecipientCompany:url("/investments","/projects/:projectId/edit-ukcompany/:companyId"),removeRecipientCompany:url("/investments","/projects/:projectId/remove-ukcompany"),removeAssociatedProject:url("/investments","/projects/:projectId/remove-associated"),evaluation:url("/investments","/projects/:projectId/evaluation"),tasks:{create:url("/investments","/projects/:projectId/tasks/create"),index:url("/investments","/projects/:projectId/tasks","?sortby=-task__created_on"),edit:url("/investments","/projects/:projectId/tasks/:taskId/edit")}},profiles:{index:url("/investments","/profiles"),data:url("/investments","/profiles/data")},opportunities:{index:url("/investments","/opportunities"),opportunity:url("/investments","/opportunities/:opportunityId"),details:url("/investments","/opportunities/:opportunityId/details"),interactions:url("/investments","/opportunities/:opportunityId/interactions"),status:url("/investments","/opportunities/:opportunityId/status"),create:url("/investments","/opportunities/create")},editHistory:{index:url("/investments/projects","/:investmentId/edit-history"),data:url("/investments/projects","/:investmentId/edit-history/data")}},metadata:{likelihoodToLand:url("/api-proxy/v4/metadata","/likelihood-to-land"),investmentInvestorType:url("/api-proxy/v4/metadata","/investment-investor-type"),investmentInvolvement:url("/api-proxy/v4/metadata","/investment-involvement"),investmentSpecificProgramme:url("/api-proxy/v4/metadata","/investment-specific-programme"),investmentProjectStage:url("/api-proxy/v4/metadata","/investment-project-stage"),investmentBusinessActivity:url("/api-proxy/v4/metadata","/investment-business-activity"),investmentType:url("/api-proxy/v4/metadata","/investment-type"),investmentStrategicDriver:url("/api-proxy/v4/metadata","/investment-strategic-driver"),orderServiceType:url("/api-proxy/v4/metadata","/order-service-type"),orderCancellationReason:url("/api-proxy/v4/metadata","/order-cancellation-reason"),omisMarket:url("/api-proxy/v4/metadata","/omis-market"),salaryRange:url("/api-proxy/v4/metadata","/salary-range"),fdiValue:url("/api-proxy/v4/metadata","/fdi-value"),fdiType:url("/api-proxy/v4/metadata","/fdi-type"),turnover:url("/api-proxy/v4/metadata","/turnover"),sector:url("/api-proxy/v4/metadata","/sector"),locationType:url("/api-proxy/v4/metadata","/location-type"),eventType:url("/api-proxy/v4/metadata","/event-type"),programme:url("/api-proxy/v4/metadata","/programme"),businessType:url("/api-proxy/v4/metadata","/business-type"),evidenceTag:url("/api-proxy/v4/metadata","/evidence-tag"),employeeRange:url("/api-proxy/v4/metadata","/employee-range"),country:url("/api-proxy/v4/metadata","/country"),ukRegion:url("/api-proxy/v4/metadata","/uk-region"),administrativeArea:url("/api-proxy/v4/metadata","/administrative-area"),referralSourceWebsite:url("/api-proxy/v4/metadata","/referral-source-website"),referralSourceMarketing:url("/api-proxy/v4/metadata","/referral-source-marketing"),referralSourceActivity:url("/api-proxy/v4/metadata","/referral-source-activity"),headquarterType:url("/api-proxy/v4/metadata","/headquarter-type"),service:url("/api-proxy/v4/metadata","/service"),communicationChannel:url("/api-proxy/v4/metadata","/communication-channel"),team:url("/api-proxy/v4/metadata","/team"),policyArea:url("/api-proxy/v4/metadata","/policy-area"),policyIssueType:url("/api-proxy/v4/metadata","/policy-issue-type"),serviceDeliveryStatus:url("/api-proxy/v4/metadata","/service-delivery-status"),capitalInvestmentInvestorType:url("/api-proxy/v4/metadata/capital-investment","/investor-type"),capitalInvestmentRequiredChecksConducted:url("/api-proxy/v4/metadata/capital-investment","/required-checks-conducted"),capitalInvestmentDealTicketSize:url("/api-proxy/v4/metadata/capital-investment","/deal-ticket-size"),capitalInvestmentLargeCapitalInvestment:url("/api-proxy/v4/metadata/capital-investment","/large-capital-investment"),capitalInvestmentReturnRate:url("/api-proxy/v4/metadata/capital-investment","/return-rate"),capitalInvestmentTimeHorizon:url("/api-proxy/v4/metadata/capital-investment","/time-horizon"),capitalInvestmentRestriction:url("/api-proxy/v4/metadata/capital-investment","/restriction"),capitalInvestmentConstructionRisk:url("/api-proxy/v4/metadata/capital-investment","/construction-risk"),capitalInvestmentEquityPercentage:url("/api-proxy/v4/metadata/capital-investment","/equity-percentage"),capitalInvestmentDesiredDealRole:url("/api-proxy/v4/metadata/capital-investment","/desired-deal-role"),capitalInvestmentAssetClassInterest:url("/api-proxy/v4/metadata/capital-investment","/asset-class-interest"),oneListTier:url("/api-proxy/v4/metadata","/one-list-tier"),tradeAgreement:url("/api-proxy/v4/metadata","/trade-agreement")},omis:{index:url("/omis",PRIMARY_LINK_PARAMS.omis),export:url("/omis","/export"),create:url("/omis/create?company=",":companyId"),reconciliation:url("/omis/reconciliation"),order:url("/omis","/:orderId"),paymentReconciliation:url("/omis","/:orderId","/edit/payment-reconciliation"),paymentReceipt:url("/omis","/:orderId/payment-receipt"),workOrder:url("/omis","/:orderId/work-order"),quote:url("/omis","/:orderId/quote"),edit:{quote:url("/omis","/:orderId/edit/quote-details"),assignees:url("/omis","/:orderId/edit/assignees"),subscribers:url("/omis","/:orderId/edit/subscribers"),internalInfo:url("/omis","/:orderId/edit/internal-details"),invoiceDetails:url("/omis","/:orderId/edit/invoice-details"),billingAddress:url("/omis","/:orderId/edit/billing-address"),vatStatus:url("/omis","/:orderId/edit/vat-status")},cancel:url("/omis","/:orderId/edit/cancel-order")},support:url("/support"),reminders:{index:url("/reminders"),investments:{estimatedLandDate:url("/reminders/investments-estimated-land-dates"),noRecentInteraction:url("/reminders/investments-no-recent-interactions"),outstandingPropositions:url("/reminders/investments-outstanding-propositions")},exports:{noRecentInteractions:url("/reminders/companies-no-recent-interactions"),newInteractions:url("/reminders/companies-new-interactions")},myTasks:{dueDateApproaching:url("/reminders/my-tasks-due-date-approaching")},settings:{index:url("/reminders/settings"),investments:{estimatedLandDate:url("/reminders/settings/investments-estimated-land-dates"),noRecentInteraction:url("/reminders/settings/investments-no-recent-interactions")},exports:{noRecentInteraction:url("/reminders/settings/companies-no-recent-interactions"),newInteraction:url("/reminders/settings/companies-new-interactions")}}},exportPipeline:{index:url("/export"),create:url("/export/create?companyId=",":companyId"),details:url("/export","/:exportId/details"),edit:url("/export","/:exportId/edit"),delete:url("/export","/:exportId/delete")},tasks:{details:url("/tasks","/:taskId")}}},"./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./Form/elements/__stories__/FieldAddAnother.stories":["./src/client/components/Form/elements/__stories__/FieldAddAnother.stories.jsx",1893],"./Form/elements/__stories__/FieldAddAnother.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldAddAnother.stories.jsx",1893],"./Form/elements/__stories__/FieldCheckboxes.stories":["./src/client/components/Form/elements/__stories__/FieldCheckboxes.stories.jsx",1716],"./Form/elements/__stories__/FieldCheckboxes.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldCheckboxes.stories.jsx",1716],"./Form/elements/__stories__/FieldCurrency.stories":["./src/client/components/Form/elements/__stories__/FieldCurrency.stories.jsx",5274],"./Form/elements/__stories__/FieldCurrency.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldCurrency.stories.jsx",5274],"./Form/elements/__stories__/FieldDate.stories":["./src/client/components/Form/elements/__stories__/FieldDate.stories.jsx",7020],"./Form/elements/__stories__/FieldDate.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldDate.stories.jsx",7020],"./Form/elements/__stories__/FieldHelp.stories":["./src/client/components/Form/elements/__stories__/FieldHelp.stories.jsx",4745],"./Form/elements/__stories__/FieldHelp.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldHelp.stories.jsx",4745],"./Form/elements/__stories__/FieldInput.stories":["./src/client/components/Form/elements/__stories__/FieldInput.stories.jsx",8277],"./Form/elements/__stories__/FieldInput.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldInput.stories.jsx",8277],"./Form/elements/__stories__/FieldSelect.stories":["./src/client/components/Form/elements/__stories__/FieldSelect.stories.jsx",60],"./Form/elements/__stories__/FieldSelect.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldSelect.stories.jsx",60],"./Form/elements/__stories__/FieldTypeahead.stories":["./src/client/components/Form/elements/__stories__/FieldTypeahead.stories.jsx",2450],"./Form/elements/__stories__/FieldTypeahead.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldTypeahead.stories.jsx",2450],"./Form/elements/__stories__/FieldWrapper.stories":["./src/client/components/Form/elements/__stories__/FieldWrapper.stories.jsx",185],"./Form/elements/__stories__/FieldWrapper.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldWrapper.stories.jsx",185]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}));var ids=map[req],id=ids[0];return __webpack_require__.e(ids[1]).then((()=>__webpack_require__(id)))}webpackAsyncContext.keys=()=>Object.keys(map),webpackAsyncContext.id="./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$",module.exports=webpackAsyncContext},"./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./ArchivePanel/__stories__/ArchivePanel.stories":["./src/client/components/ArchivePanel/__stories__/ArchivePanel.stories.jsx",6344],"./ArchivePanel/__stories__/ArchivePanel.stories.jsx":["./src/client/components/ArchivePanel/__stories__/ArchivePanel.stories.jsx",6344],"./Badge/__stories__/Badge.stories":["./src/client/components/Badge/__stories__/Badge.stories.jsx",4521],"./Badge/__stories__/Badge.stories.jsx":["./src/client/components/Badge/__stories__/Badge.stories.jsx",4521],"./ButtonLink/__stories__/ButtonLink.stories":["./src/client/components/ButtonLink/__stories__/ButtonLink.stories.jsx",5560],"./ButtonLink/__stories__/ButtonLink.stories.jsx":["./src/client/components/ButtonLink/__stories__/ButtonLink.stories.jsx",5560],"./CheckboxGroupField/__stories__/CheckboxGroupField.stories":["./src/client/components/CheckboxGroupField/__stories__/CheckboxGroupField.stories.jsx",8727],"./CheckboxGroupField/__stories__/CheckboxGroupField.stories.jsx":["./src/client/components/CheckboxGroupField/__stories__/CheckboxGroupField.stories.jsx",8727],"./Chip/__stories__/Chip.stories":["./src/client/components/Chip/__stories__/Chip.stories.jsx",2384],"./Chip/__stories__/Chip.stories.jsx":["./src/client/components/Chip/__stories__/Chip.stories.jsx",2384],"./CollectionList/__stories__/CollectionHeader.stories":["./src/client/components/CollectionList/__stories__/CollectionHeader.stories.jsx",9963],"./CollectionList/__stories__/CollectionHeader.stories.jsx":["./src/client/components/CollectionList/__stories__/CollectionHeader.stories.jsx",9963],"./CollectionList/__stories__/CollectionItem.stories":["./src/client/components/CollectionList/__stories__/CollectionItem.stories.jsx",456],"./CollectionList/__stories__/CollectionItem.stories.jsx":["./src/client/components/CollectionList/__stories__/CollectionItem.stories.jsx",456],"./CollectionList/__stories__/CollectionList.stories":["./src/client/components/CollectionList/__stories__/CollectionList.stories.jsx",534],"./CollectionList/__stories__/CollectionList.stories.jsx":["./src/client/components/CollectionList/__stories__/CollectionList.stories.jsx",534],"./ContactInformation/__stories__/ContactInformation.stories":["./src/client/components/ContactInformation/__stories__/ContactInformation.stories.jsx",1335],"./ContactInformation/__stories__/ContactInformation.stories.jsx":["./src/client/components/ContactInformation/__stories__/ContactInformation.stories.jsx",1335],"./DataHubHeader/__stories__/DataHubHeader.stories":["./src/client/components/DataHubHeader/__stories__/DataHubHeader.stories.jsx",7311],"./DataHubHeader/__stories__/DataHubHeader.stories.jsx":["./src/client/components/DataHubHeader/__stories__/DataHubHeader.stories.jsx",7311],"./DateField/__stories__/DateField.stories":["./src/client/components/DateField/__stories__/DateField.stories.jsx",9439],"./DateField/__stories__/DateField.stories.jsx":["./src/client/components/DateField/__stories__/DateField.stories.jsx",9439],"./DownloadDataHeader/__stories__/DownloadDataHeader.stories":["./src/client/components/DownloadDataHeader/__stories__/DownloadDataHeader.stories.jsx",2614],"./DownloadDataHeader/__stories__/DownloadDataHeader.stories.jsx":["./src/client/components/DownloadDataHeader/__stories__/DownloadDataHeader.stories.jsx",2614],"./DropdownMenu/__stories__/DropdownMenu.stories":["./src/client/components/DropdownMenu/__stories__/DropdownMenu.stories.jsx",5151],"./DropdownMenu/__stories__/DropdownMenu.stories.jsx":["./src/client/components/DropdownMenu/__stories__/DropdownMenu.stories.jsx",5151],"./EntityList/__stories__/EntityList.stories":["./src/client/components/EntityList/__stories__/EntityList.stories.jsx",5689],"./EntityList/__stories__/EntityList.stories.jsx":["./src/client/components/EntityList/__stories__/EntityList.stories.jsx",5689],"./ErrorSummary/__stories__/ErrorSummary.stories":["./src/client/components/ErrorSummary/__stories__/ErrorSummary.stories.jsx",4864],"./ErrorSummary/__stories__/ErrorSummary.stories.jsx":["./src/client/components/ErrorSummary/__stories__/ErrorSummary.stories.jsx",4864],"./Footer/__stories__/Footer.stories":["./src/client/components/Footer/__stories__/Footer.stories.jsx",8520],"./Footer/__stories__/Footer.stories.jsx":["./src/client/components/Footer/__stories__/Footer.stories.jsx",8520],"./Form/__stories__/Form.stories":["./src/client/components/Form/__stories__/Form.stories.jsx",7509],"./Form/__stories__/Form.stories.jsx":["./src/client/components/Form/__stories__/Form.stories.jsx",7509],"./InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories":["./src/client/components/InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories.jsx",3564],"./InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories.jsx":["./src/client/components/InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories.jsx",3564],"./InvestmentReminders/__stories__/InvestmentReminders.stories":["./src/client/components/InvestmentReminders/__stories__/InvestmentReminders.stories.jsx",9366],"./InvestmentReminders/__stories__/InvestmentReminders.stories.jsx":["./src/client/components/InvestmentReminders/__stories__/InvestmentReminders.stories.jsx",9366],"./LocalHeader/__stories__/FlashMessages.stories":["./src/client/components/LocalHeader/__stories__/FlashMessages.stories.jsx",8417],"./LocalHeader/__stories__/FlashMessages.stories.jsx":["./src/client/components/LocalHeader/__stories__/FlashMessages.stories.jsx",8417],"./LocalHeader/__stories__/LocalHeader.stories":["./src/client/components/LocalHeader/__stories__/LocalHeader.stories.jsx",3790],"./LocalHeader/__stories__/LocalHeader.stories.jsx":["./src/client/components/LocalHeader/__stories__/LocalHeader.stories.jsx",3790],"./LocalHeaderDetails/__stories__/LocalHeaderDetails.stories":["./src/client/components/LocalHeaderDetails/__stories__/LocalHeaderDetails.stories.jsx",4234],"./LocalHeaderDetails/__stories__/LocalHeaderDetails.stories.jsx":["./src/client/components/LocalHeaderDetails/__stories__/LocalHeaderDetails.stories.jsx",4234],"./Main/__stories__/Main.stories":["./src/client/components/Main/__stories__/Main.stories.jsx",4359],"./Main/__stories__/Main.stories.jsx":["./src/client/components/Main/__stories__/Main.stories.jsx",4359],"./Metadata/__stories__/Metadata.stories":["./src/client/components/Metadata/__stories__/Metadata.stories.jsx",929],"./Metadata/__stories__/Metadata.stories.jsx":["./src/client/components/Metadata/__stories__/Metadata.stories.jsx",929],"./NewWindowLink/__stories__/NewWindowLink.stories":["./src/client/components/NewWindowLink/__stories__/NewWindowLink.stories.jsx",6005],"./NewWindowLink/__stories__/NewWindowLink.stories.jsx":["./src/client/components/NewWindowLink/__stories__/NewWindowLink.stories.jsx",6005],"./NotificationBadge/__stories__/NotificationBadge.stories":["./src/client/components/NotificationBadge/__stories__/NotificationBadge.stories.jsx",402],"./NotificationBadge/__stories__/NotificationBadge.stories.jsx":["./src/client/components/NotificationBadge/__stories__/NotificationBadge.stories.jsx",402],"./Pagination/__stories__/Pagination.stories":["./src/client/components/Pagination/__stories__/Pagination.stories.jsx",8723],"./Pagination/__stories__/Pagination.stories.jsx":["./src/client/components/Pagination/__stories__/Pagination.stories.jsx",8723],"./Panel/__stories__/Panel.stories":["./src/client/components/Panel/__stories__/Panel.stories.jsx",182],"./Panel/__stories__/Panel.stories.jsx":["./src/client/components/Panel/__stories__/Panel.stories.jsx",182],"./ReadMore/__stories__/ReadMore.stories":["./src/client/components/ReadMore/__stories__/ReadMore.stories.jsx",4501],"./ReadMore/__stories__/ReadMore.stories.jsx":["./src/client/components/ReadMore/__stories__/ReadMore.stories.jsx",4501],"./Resource/__stories__/Resource.stories":["./src/client/components/Resource/__stories__/Resource.stories.jsx",2798],"./Resource/__stories__/Resource.stories.jsx":["./src/client/components/Resource/__stories__/Resource.stories.jsx",2798],"./RoutedInput/__stories__/RoutedInput.stories":["./src/client/components/RoutedInput/__stories__/RoutedInput.stories.jsx",7809],"./RoutedInput/__stories__/RoutedInput.stories.jsx":["./src/client/components/RoutedInput/__stories__/RoutedInput.stories.jsx",7809],"./RoutedInputField/__stories__/RoutedInputFieldFilter.stories":["./src/client/components/RoutedInputField/__stories__/RoutedInputFieldFilter.stories.jsx",6729],"./RoutedInputField/__stories__/RoutedInputFieldFilter.stories.jsx":["./src/client/components/RoutedInputField/__stories__/RoutedInputFieldFilter.stories.jsx",6729],"./RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories":["./src/client/components/RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories.jsx",4729],"./RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories.jsx":["./src/client/components/RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories.jsx",4729],"./StatusMessage/__stories__/DismissableStatusMessage.stories":["./src/client/components/StatusMessage/__stories__/DismissableStatusMessage.stories.jsx",7317],"./StatusMessage/__stories__/DismissableStatusMessage.stories.jsx":["./src/client/components/StatusMessage/__stories__/DismissableStatusMessage.stories.jsx",7317],"./StatusMessage/__stories__/StatusMessage.stories":["./src/client/components/StatusMessage/__stories__/StatusMessage.stories.jsx",9252],"./StatusMessage/__stories__/StatusMessage.stories.jsx":["./src/client/components/StatusMessage/__stories__/StatusMessage.stories.jsx",9252],"./SummaryList/__stories__/SummaryList.stories":["./src/client/components/SummaryList/__stories__/SummaryList.stories.jsx",5340],"./SummaryList/__stories__/SummaryList.stories.jsx":["./src/client/components/SummaryList/__stories__/SummaryList.stories.jsx",5340],"./SummaryTable/__stories__/SummaryTable.stories":["./src/client/components/SummaryTable/__stories__/SummaryTable.stories.jsx",109],"./SummaryTable/__stories__/SummaryTable.stories.jsx":["./src/client/components/SummaryTable/__stories__/SummaryTable.stories.jsx",109],"./TabNav/__stories__/TabNav.stories":["./src/client/components/TabNav/__stories__/TabNav.stories.jsx",7531],"./TabNav/__stories__/TabNav.stories.jsx":["./src/client/components/TabNav/__stories__/TabNav.stories.jsx",7531],"./Tag/__stories__/Tag.stories":["./src/client/components/Tag/__stories__/Tag.stories.jsx",5633],"./Tag/__stories__/Tag.stories.jsx":["./src/client/components/Tag/__stories__/Tag.stories.jsx",5633],"./Task/__stories__/Task.stories":["./src/client/components/Task/__stories__/Task.stories.jsx",664],"./Task/__stories__/Task.stories.jsx":["./src/client/components/Task/__stories__/Task.stories.jsx",664],"./Timeline/__stories__/Timeline.stories":["./src/client/components/Timeline/__stories__/Timeline.stories.jsx",7469],"./Timeline/__stories__/Timeline.stories.jsx":["./src/client/components/Timeline/__stories__/Timeline.stories.jsx",7469],"./ToggleSection/__stories__/ToggleSection.stories":["./src/client/components/ToggleSection/__stories__/ToggleSection.stories.jsx",944],"./ToggleSection/__stories__/ToggleSection.stories.jsx":["./src/client/components/ToggleSection/__stories__/ToggleSection.stories.jsx",944],"./Typeahead/__stories__/Typeahead.stories":["./src/client/components/Typeahead/__stories__/Typeahead.stories.jsx",3852],"./Typeahead/__stories__/Typeahead.stories.jsx":["./src/client/components/Typeahead/__stories__/Typeahead.stories.jsx",3852]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}));var ids=map[req],id=ids[0];return __webpack_require__.e(ids[1]).then((()=>__webpack_require__(id)))}webpackAsyncContext.keys=()=>Object.keys(map),webpackAsyncContext.id="./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$",module.exports=webpackAsyncContext},"./storybook-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),external_STORYBOOK_MODULE_CHANNELS_=__webpack_require__("@storybook/channels");const importers=[async path=>{if(!/^\.[\\/](?:src\/client\/components\/(?!\.)(?=.)[^/]*?\/__stories__\/(?!\.)(?=.)[^/]*?\.stories\.jsx)$/.exec(path))return;const pathRemainder=path.substring(24);return __webpack_require__("./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$")("./"+pathRemainder)},async path=>{if(!/^\.[\\/](?:src\/client\/components\/(?!\.)(?=.)[^/]*?\/(?!\.)(?=.)[^/]*?\/__stories__\/(?!\.)(?=.)[^/]*?\.stories\.jsx)$/.exec(path))return;const pathRemainder=path.substring(24);return __webpack_require__("./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$")("./"+pathRemainder)}];const channel=(0,external_STORYBOOK_MODULE_CHANNELS_.createBrowserChannel)({page:"preview"});external_STORYBOOK_MODULE_PREVIEW_API_.addons.setChannel(channel),"DEVELOPMENT"===external_STORYBOOK_MODULE_GLOBAL_.global.CONFIG_TYPE&&(window.__STORYBOOK_SERVER_CHANNEL__=channel);const preview=new external_STORYBOOK_MODULE_PREVIEW_API_.PreviewWeb;window.__STORYBOOK_PREVIEW__=preview,window.__STORYBOOK_STORY_STORE__=preview.storyStore,window.__STORYBOOK_ADDONS_CHANNEL__=channel,window.__STORYBOOK_CLIENT_API__=new external_STORYBOOK_MODULE_PREVIEW_API_.ClientApi({storyStore:preview.storyStore}),preview.initialize({importFn:async function importFn(path){for(let i=0;iimporters[i](path),x());if(moduleExports)return moduleExports}var x},getProjectAnnotations:()=>(0,external_STORYBOOK_MODULE_PREVIEW_API_.composeConfigs)([__webpack_require__("./node_modules/@storybook/react/preview.js"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/docs/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/actions/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/backgrounds/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/measure/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/outline/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/highlight/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-a11y/dist/preview.mjs"),__webpack_require__("./.storybook/preview.js")])})},"@storybook/channels":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CHANNELS__},"@storybook/client-logger":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CLIENT_LOGGER__},"@storybook/core-events":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CORE_EVENTS__},"@storybook/global":module=>{"use strict";module.exports=__STORYBOOK_MODULE_GLOBAL__},"@storybook/preview-api":module=>{"use strict";module.exports=__STORYBOOK_MODULE_PREVIEW_API__},"?4f7e":()=>{}},__webpack_require__=>{__webpack_require__.O(0,[8323],(()=>{return moduleId="./storybook-config-entry.js",__webpack_require__(__webpack_require__.s=moduleId);var moduleId}));__webpack_require__.O()}]); \ No newline at end of file +/*! For license information please see main.b83baeb3.iframe.bundle.js.LICENSE.txt */ +(self.webpackChunkdata_hub_frontend=self.webpackChunkdata_hub_frontend||[]).push([[179],{"./.storybook/preview.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{__namedExportsOrder:()=>__namedExportsOrder,decorators:()=>decorators});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var react=__webpack_require__("./node_modules/react/index.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),components=__webpack_require__("./src/client/components/index.jsx"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lodash_default=__webpack_require__.n(lodash),esm=__webpack_require__("./node_modules/connected-react-router/esm/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),redux_saga_effects_npm_proxy_esm=(__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/redux-saga/dist/redux-saga-effects-npm-proxy.esm.js")),actions=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./src/client/actions.js"));function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var _marked=_regeneratorRuntime().mark(startTask),_marked2=_regeneratorRuntime().mark(manageTask),_marked3=_regeneratorRuntime().mark(subscribeToDismiss),_marked4=_regeneratorRuntime().mark(subscribeToStart);function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var saga_marked=saga_regeneratorRuntime().mark(_callee);function saga_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function saga_objectSpread(e){for(var r=1;r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var HardRedirect_saga_marked=HardRedirect_saga_regeneratorRuntime().mark(redirect);function redirect(){return HardRedirect_saga_regeneratorRuntime().wrap((function redirect$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=3,(0,redux_saga_effects_npm_proxy_esm.qn)(actions.Cq2);case 3:window.location.href=_context.sent.to,_context.next=0;break;case 6:case"end":return _context.stop()}}),HardRedirect_saga_marked)}__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var KEY="flash-messages",getMessages=function getMessages(){var items=window.sessionStorage.getItem(KEY);if(items)try{return JSON.parse(items)}catch(e){console.error("Cannot get messages from session storage",e)}return{}},addMessage=function addMessage(messageType,message){var messages=getMessages();messages[messageType]=messages[messageType]||[],messages[messageType].push(message);try{window.sessionStorage.setItem(KEY,JSON.stringify(messages))}catch(e){console.error("Cannot set messages to session storage",e)}},addMessageWithBody=function addMessageWithBody(type,heading,body){addMessage("".concat(type,":with-body"),{heading,body})},clearMessages=function clearMessages(){return window.sessionStorage.removeItem(KEY)},writeToLocalStorage=function writeToLocalStorage(announcementLink){window.localStorage.setItem("announcement-link",announcementLink)},readFromLocalStorage=function readFromLocalStorage(){try{return window.localStorage.getItem("announcement-link")}catch(_unused){return{}}};function sagas_typeof(o){return sagas_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},sagas_typeof(o)}function sagas_regeneratorRuntime(){sagas_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==sagas_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var sagas_marked=sagas_regeneratorRuntime().mark(writeFlashMessages),sagas_marked2=sagas_regeneratorRuntime().mark(readFlashMesages),sagas_marked3=sagas_regeneratorRuntime().mark(writeAnnouncementLinkToLocalStorage),sagas_marked4=sagas_regeneratorRuntime().mark(readAnnouncementLinkFromLocalStorage);function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var MyInvestmentProjects_sagas_marked=MyInvestmentProjects_sagas_regeneratorRuntime().mark(writeMyInvestmentsToSession),MyInvestmentProjects_sagas_marked2=MyInvestmentProjects_sagas_regeneratorRuntime().mark(readMyInvestmentsFromSession);function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function writeMyInvestmentsToSession(){var _yield$take,payload;return MyInvestmentProjects_sagas_regeneratorRuntime().wrap((function writeMyInvestmentsToSession$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=3,(0,redux_saga_effects_npm_proxy_esm.qn)(actions.S77);case 3:_yield$take=_context.sent,_yield$take.type,payload=_objectWithoutProperties(_yield$take,_excluded),saveToSession(payload),_context.next=0;break;case 9:case"end":return _context.stop()}}),MyInvestmentProjects_sagas_marked)}function readMyInvestmentsFromSession(){var sessionState;return MyInvestmentProjects_sagas_regeneratorRuntime().wrap((function readMyInvestmentsFromSession$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _context2.next=3,(0,redux_saga_effects_npm_proxy_esm.qn)(actions.gUm);case 3:if(sessionState=getFromSession(),!Object.keys(sessionState).length){_context2.next=7;break}return _context2.next=7,(0,redux_saga_effects_npm_proxy_esm.gz)({type:actions.TJt,sessionState});case 7:_context2.next=0;break;case 9:case"end":return _context2.stop()}}),MyInvestmentProjects_sagas_marked2)}function root_saga_typeof(o){return root_saga_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},root_saga_typeof(o)}function root_saga_regeneratorRuntime(){root_saga_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==root_saga_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js"),runMiddlewareOnce=lodash_default().once((function(tasks,sagaMiddleware){return sagaMiddleware.run(function(tasks){return root_saga_regeneratorRuntime().mark((function rootSaga(){return root_saga_regeneratorRuntime().wrap((function rootSaga$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,(0,redux_saga_effects_npm_proxy_esm.rM)(saga(tasks));case 2:return _context.next=4,(0,redux_saga_effects_npm_proxy_esm.rM)(_callee);case 4:return _context.next=6,(0,redux_saga_effects_npm_proxy_esm.rM)(redirect);case 6:return _context.next=8,(0,redux_saga_effects_npm_proxy_esm.rM)(readFlashMesages);case 8:return _context.next=10,(0,redux_saga_effects_npm_proxy_esm.rM)(writeFlashMessages);case 10:return _context.next=12,(0,redux_saga_effects_npm_proxy_esm.rM)(writeAnnouncementLinkToLocalStorage);case 12:return _context.next=14,(0,redux_saga_effects_npm_proxy_esm.rM)(readAnnouncementLinkFromLocalStorage);case 14:return _context.next=16,(0,redux_saga_effects_npm_proxy_esm.rM)(readMyInvestmentsFromSession);case 16:return _context.next=18,(0,redux_saga_effects_npm_proxy_esm.rM)(writeMyInvestmentsToSession);case 18:case"end":return _context.stop()}}),rootSaga)}))}(tasks))})),DataHubProvider=function DataHubProvider(_ref){var tasks=_ref.tasks,store=_ref.store,history=_ref.history,sagaMiddleware=_ref.sagaMiddleware,children=_ref.children;return runMiddlewareOnce(tasks,sagaMiddleware),(0,jsx_runtime.jsx)(es.Provider,{store,children:(0,jsx_runtime.jsx)(esm.xI,{history,children})})};DataHubProvider.displayName="DataHubProvider",DataHubProvider.__docgenInfo={description:"Provides state management and routing infrastructure required by the\nstateful/routed components.\n@param {Object} props\n@param {Object} props.tasks - A map of _task_ names to _tasks_, if required\nby the wrapped components.\n@example\nimport ReferralList from 'components/ReferralList'\nimport dummyReferralListTask from 'components/ReferralList/task/dummy'\n\n// ReferralList is a stateful component,\n// which also requires the Referrals task.\n\n \n",methods:[],displayName:"DataHubProvider"};const provider=DataHubProvider;__webpack_require__("./node_modules/core-js/modules/web.url.js"),__webpack_require__("./node_modules/core-js/modules/web.url-search-params.js");var redux_toolkit_esm=__webpack_require__("./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"),redux_saga_core_npm_proxy_esm=__webpack_require__("./node_modules/redux-saga/dist/redux-saga-core-npm-proxy.esm.js"),middleware=__webpack_require__("./node_modules/connected-react-router/esm/middleware.js"),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),esm_history=__webpack_require__("./node_modules/history/esm/history.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),DropdownMenu=__webpack_require__("./src/client/components/DropdownMenu/index.jsx");function ConnectedDropdownMenu_typeof(o){return ConnectedDropdownMenu_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ConnectedDropdownMenu_typeof(o)}var ConnectedDropdownMenu_excluded=["type"];function ConnectedDropdownMenu_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ConnectedDropdownMenu_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var toggle={type:actions.lic},ConnectedDropdownMenu_open={type:actions.vQM},ConnectedDropdownMenu_close={type:actions.vmK};const ConnectedDropdownMenu=(0,multiinstance.ZP)({name:"DropdownMenu",actionPattern:"DROP_DOWN_MENU",component:function component(props){return(0,jsx_runtime.jsx)(DropdownMenu.Z,ConnectedDropdownMenu_objectSpread(ConnectedDropdownMenu_objectSpread({},props),{},{onClick:function onClick(){return props.toggleMenu()}}))},reducer:function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,rest=ConnectedDropdownMenu_objectWithoutProperties(_ref,ConnectedDropdownMenu_excluded);switch(type){case actions.vQM:return{open:!0};case actions.vmK:return{open:!1};case actions.lic:return{open:!state.open};case actions.mV:return ConnectedDropdownMenu_objectSpread(ConnectedDropdownMenu_objectSpread({},state),{},{activeIndex:rest.activeIndex})}return state},dispatchToProps:function dispatchToProps(dispatch){return{openMenu:dispatch.bind(void 0,ConnectedDropdownMenu_open),closeMenu:dispatch.bind(void 0,ConnectedDropdownMenu_close),toggleMenu:dispatch.bind(void 0,toggle),onUpdateIndex:function onUpdateIndex(activeIndex){return dispatch(function updateIndex(activeIndex){return{type:actions.mV,activeIndex}}(activeIndex))}}}});function reducer_typeof(o){return reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},reducer_typeof(o)}var reducer_excluded=["name","id"],_excluded2=["type"];function reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function reducer_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var setTaskState=function setTaskState(state,_ref,status){var name=_ref.name,id=_ref.id,action=reducer_objectWithoutProperties(_ref,reducer_excluded),currentTaskGroup=state[name]||{},currentTask=currentTaskGroup[id];return reducer_objectSpread(reducer_objectSpread({},state),{},reducer_defineProperty({},name,reducer_objectSpread(reducer_objectSpread({},currentTaskGroup),{},reducer_defineProperty({},id,reducer_objectSpread(reducer_objectSpread(reducer_objectSpread({},currentTask),action),{},{status})))))},remove=function remove(state,_ref2){var name=_ref2.name,id=_ref2.id,taskState=state[name];return taskState?lodash_default().omit(state,lodash_default().isEqual(lodash_default().keys(taskState),[name])?name:"".concat(name,".").concat(id)):state};var state=__webpack_require__("./src/client/components/CompanyLists/state.js");function CompanyLists_reducer_typeof(o){return CompanyLists_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyLists_reducer_typeof(o)}function CompanyLists_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function CompanyLists_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:PersonalisedDashboard_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.VfH:var hasInvestmentProjects=result.hasInvestmentProjects,summary=result.summary;return PersonalisedDashboard_reducer_objectSpread(PersonalisedDashboard_reducer_objectSpread({},state),{},{hasInvestmentProjects,summary});case actions.rZB:var dataHubFeed=result.dataHubFeed;return PersonalisedDashboard_reducer_objectSpread(PersonalisedDashboard_reducer_objectSpread({},state),{},{dataHubFeed});default:return state}};var MyInvestmentProjects_state=__webpack_require__("./src/client/components/MyInvestmentProjects/state.js");function MyInvestmentProjects_reducer_typeof(o){return MyInvestmentProjects_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},MyInvestmentProjects_reducer_typeof(o)}function MyInvestmentProjects_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function MyInvestmentProjects_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:create_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,searchTerm=_ref.searchTerm;switch(type){case actions.boT:return create_reducer_objectSpread(create_reducer_objectSpread({},state),{},{companyInvestmentCount:result.count});case actions.RDn:return create_reducer_objectSpread(create_reducer_objectSpread({},state),{},{results:result.results});case actions.oNU:return create_reducer_objectSpread(create_reducer_objectSpread({},state),{},{searchTerm});default:return state}};var InvestmentReminders_state=__webpack_require__("./src/client/components/InvestmentReminders/state.js"),InvestmentReminders_reducer_initialState={count:0,results:[]};var NotificationAlert_state=__webpack_require__("./src/client/components/NotificationAlert/state.js");function NotificationAlert_reducer_typeof(o){return NotificationAlert_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},NotificationAlert_reducer_typeof(o)}function NotificationAlert_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function NotificationAlert_reducer_defineProperty(obj,key,value){return(key=function NotificationAlert_reducer_toPropertyKey(arg){var key=function NotificationAlert_reducer_toPrimitive(input,hint){if("object"!==NotificationAlert_reducer_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==NotificationAlert_reducer_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===NotificationAlert_reducer_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var NotificationAlert_reducer_initialState={count:0,investment:{estimated_land_date:0,no_recent_interaction:0,outstanding_propositions:0},export:{no_recent_interaction:0,new_interaction:0},my_tasks:{due_date_approaching:0}};__webpack_require__("./node_modules/core-js/modules/es.string.trim.js"),__webpack_require__("./src/client/utils/colours.js");var lib_urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(lib_urls);function Contacts_CollectionList_reducer_typeof(o){return Contacts_CollectionList_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Contacts_CollectionList_reducer_typeof(o)}function Contacts_CollectionList_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Contacts_CollectionList_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:Contacts_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.ko6:return Contacts_CollectionList_reducer_objectSpread(Contacts_CollectionList_reducer_objectSpread(Contacts_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.Mae:return Contacts_CollectionList_reducer_objectSpread(Contacts_CollectionList_reducer_objectSpread({},state),{},{metadata:result});default:return state}};__webpack_require__("./node_modules/core-js/modules/es.array.includes.js");function Interactions_CollectionList_reducer_typeof(o){return Interactions_CollectionList_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Interactions_CollectionList_reducer_typeof(o)}function Interactions_CollectionList_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Interactions_CollectionList_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:Omis_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.rMO:return Omis_CollectionList_reducer_objectSpread(Omis_CollectionList_reducer_objectSpread(Omis_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.eGJ:return Omis_CollectionList_reducer_objectSpread(Omis_CollectionList_reducer_objectSpread({},state),{},{metadata:result});default:return state}};var RoutedInput=__webpack_require__("./src/client/components/RoutedInput/index.jsx"),Resource=__webpack_require__("./src/client/components/Resource/Resource.jsx"),prop_types=(__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/prop-types/index.js")),prop_types_default=__webpack_require__.n(prop_types),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),govuk_react_label_esm=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),Form=__webpack_require__("./src/client/components/Form/index.jsx"),LocalHeader=__webpack_require__("./src/client/components/LocalHeader/LocalHeader.jsx"),components_Resource=__webpack_require__("./src/client/components/Resource/index.jsx"),validators=__webpack_require__("./src/client/components/Form/validators.js");const State=(0,es.connect)((function(state){return{state}}))((function(_ref){var state=_ref.state;return(0,_ref.children)(state)}));var common_constants=__webpack_require__("./src/common/constants.js"),useAdministrativeAreaLookup=__webpack_require__("./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaLookup.js"),useAdministrativeAreaSearch=__webpack_require__("./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaSearch.js");function ContactForm_typeof(o){return ContactForm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ContactForm_typeof(o)}var _templateObject,ContactForm_excluded=["update","contactId","companyId","primary","addressSameAsCompany","acceptsDitEmailMarketing","addressPostcode","addressTown","addressCounty","addressArea","addressCountry","dispatch","id","notes"],ContactForm_excluded2=["address1","address2","city","county","postcode","acceptsDitEmailMarketing","addressSameAsCompany","primary","email","valid_email","moreDetails"];function ContactForm_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ContactForm_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var YES="Yes",NO="No",boolToYesNo=function boolToYesNo(x){return!0===x?YES:!1===x?NO:null},keysToSnakeCase=function keysToSnakeCase(o){return lodash_default().mapKeys(o,(function(v,k){return lodash_default().snakeCase(k)}))},StyledLabel=(0,styled_components_browser_esm.ZP)(govuk_react_label_esm.Z)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n padding-bottom: ",";\n font-weight: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5,govuk_react_constants_esm.Xw.bold),_ContactForm=function _ContactForm(_ref){var update=_ref.update,contactId=_ref.contactId,companyId=_ref.companyId,primary=_ref.primary,addressSameAsCompany=_ref.addressSameAsCompany,acceptsDitEmailMarketing=_ref.acceptsDitEmailMarketing,postcode=_ref.addressPostcode,city=_ref.addressTown,county=_ref.addressCounty,addressArea=_ref.addressArea,addressCountry=_ref.addressCountry,moreDetails=(_ref.dispatch,_ref.id,_ref.notes),props=ContactForm_objectWithoutProperties(_ref,ContactForm_excluded),findAdministrativeAreas=(0,useAdministrativeAreaLookup.Z)(),onAdministrativeAreaSearch=(0,useAdministrativeAreaSearch.Z)(findAdministrativeAreas).onAdministrativeAreaSearch;(0,react.useEffect)((function(){onAdministrativeAreaSearch()}),[]);var areaUS=function areaUS(addressArea){return(null==addressCountry?void 0:addressCountry.id)===common_constants.UNITED_STATES_ID?null==addressArea?void 0:addressArea.id:null},areaCanada=function areaCanada(addressArea){return(null==addressCountry?void 0:addressCountry.id)===common_constants.CANADA_ID?null==addressArea?void 0:addressArea.id:null},getAreaValue=function getAreaValue(values){return values.country===common_constants.UNITED_STATES_ID?values.area:values.country===common_constants.CANADA_ID?values.areaCanada:null};return(0,jsx_runtime.jsx)(components_Resource.qN,{id:companyId,children:function children(company){return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LocalHeader.Z,{superheading:update&&(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:"/companies/".concat(company.id),children:company.name}),heading:"".concat(update?"Edit":"Add"," contact"),breadcrumbs:[{link:"/",text:"Home"},{link:"/contacts/",text:"Contacts"}].concat(ContactForm_toConsumableArray(update?[{link:urls_default().contacts.details(contactId),text:props.name},{text:"Edit"}]:[{text:"Add contact at ".concat(company.name)}]))}),(0,jsx_runtime.jsx)(components.or,{children:(0,jsx_runtime.jsx)(State,{children:function children(_ref2){var referrerUrl=_ref2.referrerUrl,router=_ref2.router,_qs$parse=lib_default().parse(router.location.search),origin_url=_qs$parse.origin_url,origin_search=_qs$parse.origin_search,redirectTo=function redirectTo(_ref3){var name=_ref3.name,id=_ref3.id;return origin_url?function appendParamsToUrl(origin_url,origin_search,id,name){var url=new URL(origin_url,window.location.origin),inputParams=new URLSearchParams(origin_search?atob(origin_search):"");return inputParams.append("new-contact-id",id),inputParams.append("new-contact-name",name),url.search=inputParams,url.pathname+url.search}(origin_url,origin_search,id,name):urls_default().contacts.details(id)};return(0,jsx_runtime.jsx)(components.lt,{setWidth:common_constants.FORM_LAYOUT.THREE_QUARTERS,children:(0,jsx_runtime.jsx)(Form.Z,{id:"add-contact-form",analyticsFormName:update?"editContact":"addContact",submissionTaskName:"Save contact",transformPayload:function transformPayload(_ref4){var address1=_ref4.address1,address2=_ref4.address2,city=_ref4.city,county=_ref4.county,postcode=_ref4.postcode,acceptsDitEmailMarketing=_ref4.acceptsDitEmailMarketing,addressSameAsCompany=_ref4.addressSameAsCompany,primary=_ref4.primary,email=_ref4.email,moreDetails=(_ref4.valid_email,_ref4.moreDetails),values=ContactForm_objectWithoutProperties(_ref4,ContactForm_excluded2);return{contactId,values:ContactForm_objectSpread(ContactForm_objectSpread({},keysToSnakeCase(values)),{},{email,valid_email:!0,notes:moreDetails,accepts_dit_email_marketing:acceptsDitEmailMarketing.includes(YES),primary,company,address_same_as_company:addressSameAsCompany.includes(YES)},addressSameAsCompany==YES?{address_1:null,address_2:null,address_town:null,address_county:null,address_postcode:null,address_area:null,address_country:null}:{address_1:address1||" ",address_2:address2,address_town:city||" ",address_county:county,address_postcode:postcode,address_area:getAreaValue(values),address_country:values.country})}},onSuccess:function onSuccess(result,values,_ref5){var hardRedirect=_ref5.hardRedirect;(0,_ref5.flashMessage)(update?"Contact record updated":"You have successfully added a new contact ".concat(result.name)),hardRedirect(redirectTo(result))},submitButtonLabel:update?"Save and return":"Add contact",cancelRedirectTo:function cancelRedirectTo(){return referrerUrl?function stripHost(u){var url=new URL(u);return url.pathname+url.search}(referrerUrl):"/"},cancelButtonLabel:update?"Return without saving":"Cancel",initialValues:ContactForm_objectSpread(ContactForm_objectSpread({},props),{},{moreDetails,postcode,county,city,area:null==addressArea?void 0:addressArea.id,areaUS:areaUS(addressArea),areaCanada:areaCanada(addressArea),country:null==addressCountry?void 0:addressCountry.id,primary:boolToYesNo(primary),addressSameAsCompany:boolToYesNo(addressSameAsCompany),acceptsDitEmailMarketing:[boolToYesNo(acceptsDitEmailMarketing)].filter(Boolean)}),children:function children(_ref6){var _values$acceptsDitEma,values=_ref6.values;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components._s,{label:"First name",name:"firstName",type:"text",required:"Enter a first name","data-test":"group-field-first_name"}),(0,jsx_runtime.jsx)(components._s,{label:"Last name",name:"lastName",type:"text",required:"Enter a last name","data-test":"group-field-last_name"}),(0,jsx_runtime.jsx)(components._s,{label:"Job title",name:"jobTitle",type:"text",required:"Enter a job title"}),(0,jsx_runtime.jsx)(components._s,{label:"Email address",name:"email",type:"email",required:"Enter an email address",validate:validators.D}),(0,jsx_runtime.jsx)(components._s,{label:"Phone number (optional)",hint:"For international numbers include the country code",name:"fullTelephoneNumber",type:"text",validate:function validate(x){return!(null!=x&&x.match(common_constants.GENERIC_PHONE_NUMBER_REGEX))&&"Phone number should consist of numbers"}}),(0,jsx_runtime.jsx)(components.k2,{legend:"Is this contact’s work address the same as the company address?",name:"addressSameAsCompany",required:"Select yes if the contact's work address is the same as the company address",options:[{value:YES,label:YES},{value:NO,label:NO,children:(0,jsx_runtime.jsxs)("fieldset",{children:[(0,jsx_runtime.jsx)(StyledLabel,{children:"What is the contact's work address?"}),(0,jsx_runtime.jsx)(components.k1,{name:"",apiEndpoint:"/api/postcodelookup",isCountrySelectable:!0,fontWeights:govuk_react_constants_esm.Xw.regular})]})}]}),(0,jsx_runtime.jsx)(components.k2,{legend:"Is this person a primary contact?",name:"primary",required:"Select yes if this person is the company's primary contact",options:[{value:YES,label:YES},{value:NO,label:NO}]}),(0,jsx_runtime.jsx)(components.YU,{name:"acceptsDitEmailMarketing",options:[{value:YES,label:"The company contact does accept email marketing",hint:(null==values||null===(_values$acceptsDitEma=values.acceptsDitEmailMarketing)||void 0===_values$acceptsDitEma?void 0:_values$acceptsDitEma.includes(YES))&&"By checking this box, you confirm that the contact has opted in to email marketing."}]}),(0,jsx_runtime.jsx)(components.E9,{label:"More details (optional)",name:"moreDetails",hint:"\nAdd anything you think is important about the contact, for example, an alternative\nphone number or email address.\n"})]})}})})}})})]})}})};_ContactForm.displayName="_ContactForm";var ContactForm=(0,multiinstance.ZP)({name:"ContactForm",actionPattern:"CONTACT_FORM__",reducer:function reducer(state,_ref7){return _ref7.type===actions.aYo?{}:state},component:_ContactForm}),requiredProps={update:prop_types_default().any,company:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired})};ContactForm.propTypes=ContactForm_objectSpread(ContactForm_objectSpread({},requiredProps),{},{contactId:prop_types_default().string,firstName:prop_types_default().string,lastName:prop_types_default().string,jobTitle:prop_types_default().string,primary:prop_types_default().bool,fullTelephoneNumber:prop_types_default().string,email:prop_types_default().string,acceptsDitEmailMarketing:prop_types_default().bool,addressSameAsCompany:prop_types_default().bool,address1:prop_types_default().string,address2:prop_types_default().string,addressTown:prop_types_default().string,addressCounty:prop_types_default().string,addressPostcode:prop_types_default().string,notes:prop_types_default().string});var CreateContactForm=function CreateContactForm(_ref8){var companyId=_ref8.companyId,id=_ref8.id;return(0,jsx_runtime.jsx)(ContactForm,{companyId,id})};CreateContactForm.displayName="CreateContactForm",CreateContactForm.propTypes=requiredProps;var UpdateContactForm=function UpdateContactForm(_ref9){var contactId=_ref9.contactId,id=_ref9.id;return(0,jsx_runtime.jsx)(components_Resource.SF,{id:contactId,children:function children(contact){return(0,jsx_runtime.jsx)(ContactForm,ContactForm_objectSpread(ContactForm_objectSpread({},contact),{},{id,contactId:contact.id,update:!0,companyId:contact.company.id}))}})};UpdateContactForm.displayName="UpdateContactForm",UpdateContactForm.propTypes=ContactForm_objectSpread(ContactForm_objectSpread({},requiredProps),{},{contactId:prop_types_default().string.isRequired});CreateContactForm.__docgenInfo={description:"",methods:[],displayName:"CreateContactForm",props:{update:{description:"",type:{name:"any"},required:!1},company:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0}}},required:!1}}},UpdateContactForm.__docgenInfo={description:"",methods:[],displayName:"UpdateContactForm",props:{update:{description:"",type:{name:"any"},required:!1},company:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0}}},required:!1},contactId:{description:"",type:{name:"string"},required:!0}}};var LocalHeader_state=__webpack_require__("./src/client/components/LocalHeader/state.js");function LocalHeader_reducer_typeof(o){return LocalHeader_reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},LocalHeader_reducer_typeof(o)}function LocalHeader_reducer_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function LocalHeader_reducer_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==arguments[0]?arguments[0]:{},_ref3=arguments.length>1?arguments[1]:void 0,type=_ref3.type,action=reducer_objectWithoutProperties(_ref3,_excluded2);switch(type){case actions.zj3:return setTaskState(state,action,"progress");case actions.Z90:return setTaskState(state,action,"error");case actions.Zo7:case actions.oV1:return remove(state,action);default:return state}}},reducers_defineProperty(_objectSpread2,LocalHeader_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,flashMessages=_ref.flashMessages,announcementLink=_ref.announcementLink;switch(type){case actions.iSD:return LocalHeader_reducer_objectSpread(LocalHeader_reducer_objectSpread({},state),{},{flashMessages});case actions.RJR:return LocalHeader_reducer_objectSpread(LocalHeader_reducer_objectSpread({},state),{},{flashMessages:{}});case actions.Ody:return LocalHeader_reducer_objectSpread(LocalHeader_reducer_objectSpread({},state),{},{announcementLink});default:return state}})),reducers_defineProperty(_objectSpread2,state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,id=_ref.id,result=_ref.result,payload=_ref.payload,query=_ref.query,orderBy=_ref.orderBy;switch(type){case actions.Og6:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{lists:(0,lodash.mapValues)(result,(function(name){return{name}})),selectedId:Object.keys(result)[0]});case actions.WhS:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{lists:CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state.lists),{},CompanyLists_reducer_defineProperty({},payload,CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state.lists[payload]),{},{companies:result})))});case actions.Cb4:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{selectedId:id,query:""});case actions.sb0:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{query});case actions.k$I:return CompanyLists_reducer_objectSpread(CompanyLists_reducer_objectSpread({},state),{},{orderBy});default:return state}})),reducers_defineProperty(_objectSpread2,CollectionList_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.hWh:return CollectionList_reducer_objectSpread(CollectionList_reducer_objectSpread({},state),{},{selectedLeadItaOrGlobalAccountManagers:result});default:return state}})),reducers_defineProperty(_objectSpread2,"exportsHistory",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,page=_ref.page;switch(type){case actions.iX0:var count=result.count,results=result.results;return ExportsHistory_reducer_objectSpread(ExportsHistory_reducer_objectSpread({},state),{},{count,results,isComplete:!0});case actions.FeB:return ExportsHistory_reducer_objectSpread(ExportsHistory_reducer_objectSpread({},state),{},{activePage:page});default:return state}})),reducers_defineProperty(_objectSpread2,client_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.moN?result:state})),reducers_defineProperty(_objectSpread2,"referralForm",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch((arguments.length>1?arguments[1]:void 0).type){case actions.Z90:return client_reducer_objectSpread(client_reducer_objectSpread({},state),{},{progress:!1});case actions.WJs:return client_reducer_objectSpread(client_reducer_objectSpread({},state),{},{progress:!0,formSubmitted:!0});default:return state}})),reducers_defineProperty(_objectSpread2,"exportWins",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ExportWins_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,page=_ref.page;switch(type){case actions.wm$:if(result.notImplemented)return ExportWins_reducer_objectSpread(ExportWins_reducer_objectSpread({},state),{},ExportWins_reducer_defineProperty({},"notImplemented",!0));var count=result.count,results=result.results;return ExportWins_reducer_objectSpread(ExportWins_reducer_objectSpread({},state),{},{count,results,isComplete:!0});case actions._Yb:return ExportWins_reducer_objectSpread(ExportWins_reducer_objectSpread({},state),{},{activePage:page});default:return state}})),reducers_defineProperty(_objectSpread2,"addCompany",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.fpo?add_company_client_reducer_objectSpread(add_company_client_reducer_objectSpread({},state),{},{region:result}):state})),_objectSpread2),TabNav.Z.reducerSpread),ReferralList.Z.reducerSpread),ConnectedDropdownMenu.reducerSpread),BaseToggleSection.ZP.reducerSpread),Typeahead.Z.reducerSpread),RoutedInput.Z.reducerSpread),Resource.ZP.reducerSpread),ContactForm.reducerSpread),Form.Z.reducerSpread),FieldAddAnother.Z.reducerSpread),{},(reducers_defineProperty(_objectSpread3={referrerUrl:function referrerUrl(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},"dnbCheckPendingRequest",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isDnbPending:!1},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.LCU?business_details_client_reducer_objectSpread(business_details_client_reducer_objectSpread({},state),{},{isDnbPending:result}):state})),reducers_defineProperty(_objectSpread3,"opportunitiesList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Opportunities_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,page=_ref.page,result=_ref.result;switch(type){case actions.RHb:var count=result.count,results=result.results;return Opportunities_reducer_objectSpread(Opportunities_reducer_objectSpread({},state),{},{count,results,isComplete:!0});case actions.MYm:return Opportunities_reducer_objectSpread(Opportunities_reducer_objectSpread({},state),{},{activePage:page});default:return state}})),reducers_defineProperty(_objectSpread3,"opportunityDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Details_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,opportunity=_ref.opportunity;switch(type){case actions.IX2:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),opportunity),{},{isEditingDetails:!1,isEditingRequirements:!1})});case actions.Qu9:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:result});case actions.Xm$:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{metadata:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.metadata),{},{investmentTypes:result.investmentTypes,returnRates:result.returnRates,timeScales:result.timeScales})});case actions.g2S:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),{},{isEditingDetails:!0,isEditingRequirements:!1})});case actions.DpK:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),{},{isEditingDetails:!1,isEditingRequirements:!0})});case actions.PhE:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),{},{isEditingDetails:!1,isEditingRequirements:!1})});case actions.Ggs:return Details_reducer_objectSpread(Details_reducer_objectSpread({},state),{},{opportunity:Details_reducer_objectSpread(Details_reducer_objectSpread(Details_reducer_objectSpread({},state.opportunity),result),{},{isEditingDetails:!1,isEditingRequirements:!1})});default:return state}})),reducers_defineProperty(_objectSpread3,"profilesList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Profiles_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.LYg:return Profiles_reducer_objectSpread(Profiles_reducer_objectSpread({},state),{},{count:result.count,results:result.results,isComplete:!0});case actions.dpe:return Profiles_reducer_objectSpread(Profiles_reducer_objectSpread({},state),{},{filterOptions:result});default:return state}})),reducers_defineProperty(_objectSpread3,"projectsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Projects_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.o1j:return Projects_reducer_objectSpread(Projects_reducer_objectSpread({},state),{},{count:result.count,results:result.results,isComplete:!0});case actions.aji:return Projects_reducer_objectSpread(Projects_reducer_objectSpread({},state),{},{selectedAdvisers:result});case actions.hnA:return Projects_reducer_objectSpread(Projects_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"investmentProject",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:investmentProjectReducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.l28?investmentProjectReducer_objectSpread(investmentProjectReducer_objectSpread({},state),{},{project:(0,utils.lI)(result)}):state})),reducers_defineProperty(_objectSpread3,"overviewCompanyExportWinsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{initialState:exportStatusReducer_initialState},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,data=_ref.result;return type===actions.hIS?exportStatusReducer_objectSpread(exportStatusReducer_objectSpread({},state),{},{count:data.count,latestExportWin:data.result}):state})),reducers_defineProperty(_objectSpread3,"overviewCompanyProjectsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{initialState:overview_table_cards_reducer_initialState},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;if(type===actions.$n7){var resultList=[],stageList={},statusList={},stageListAll=[],statusListAll=[],upcomingActiveInvestments=[];result.results.map((function(investment){return resultList.push(investment)})),resultList.map((function(investment){return stageListAll.push(investment.stage.name)})),resultList.map((function(investment){return statusListAll.push(investment.status)}));for(var statusNames=statusListAll.filter((function(item,i,ar){return ar.indexOf(item)===i})),stageNames=stageListAll.filter((function(item,i,ar){return ar.indexOf(item)===i})),_loop=function _loop(i){var name=(0,lodash.camelCase)(statusNames[i]);statusList[name]=resultList.filter((function(investment){return investment.status===statusNames[i]})).length},i=0;i3?allActiveInvestments.slice(0,3):allActiveInvestments,overview_table_cards_reducer_objectSpread(overview_table_cards_reducer_objectSpread({},state),{},{stageList,statusList,resultList,summary:result.summary,upcomingActiveInvestments,isComplete:!0})}return state})),reducers_defineProperty(_objectSpread3,MyInvestmentProjects_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:MyInvestmentProjects_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,page=_ref.page,stage=_ref.stage,status=_ref.status,landDate=_ref.landDate,sort=_ref.sort,showDetails=_ref.showDetails,sessionState=_ref.sessionState;switch(type){case actions.STt:var results=result.results,count=result.count,summary=result.summary;return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{results,count,summary});case actions.l1G:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{sort,page});case actions.bgc:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{stage,page});case actions.YWR:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{status,page});case actions.yFd:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{landDate,page});case actions.mUn:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{page});case actions.pb3:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),{},{showDetails});case actions.TJt:return MyInvestmentProjects_reducer_objectSpread(MyInvestmentProjects_reducer_objectSpread({},state),sessionState);default:return state}})),reducers_defineProperty(_objectSpread3,"createInvestmentProject",create_reducer),reducers_defineProperty(_objectSpread3,"companyInvestmentCount",create_reducer),reducers_defineProperty(_objectSpread3,"checkInvestmentProjects",PersonalisedDashboard_reducer),reducers_defineProperty(_objectSpread3,"checkDataHubFeed",PersonalisedDashboard_reducer),reducers_defineProperty(_objectSpread3,InvestmentReminders_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:InvestmentReminders_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.qzL?{results:result.results,count:result.count}:state})),reducers_defineProperty(_objectSpread3,NotificationAlert_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NotificationAlert_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.SqW?function NotificationAlert_reducer_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:defaultState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.h0j?ContactActivity_reducer_objectSpread(ContactActivity_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"companyContactsList",Contacts_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"interactionsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Interactions_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.yR5:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.APp:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{selectedAdvisers:result});case actions.JzB:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{selectedCompanies:result});case actions.uqm:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.p2g:return Interactions_CollectionList_reducer_objectSpread(Interactions_CollectionList_reducer_objectSpread({},state),{},{selectedTeams:result});default:return state}})),reducers_defineProperty(_objectSpread3,"companyActivitiesList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ActivityFeed_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.M0d:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.Oiz:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{selectedAdvisers:result});case actions.XaB:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{selectedCompanies:result});case actions.b0f:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.ITR:return ActivityFeed_CollectionList_reducer_objectSpread(ActivityFeed_CollectionList_reducer_objectSpread({},state),{},{selectedTeams:result});default:return state}})),reducers_defineProperty(_objectSpread3,"eventsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Events_CollectionList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.d$R:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.GPR:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),{},{metadata:result});case actions.Cxq:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),{},{selectedOrganisers:result});case actions.TaK:return Events_CollectionList_reducer_objectSpread(Events_CollectionList_reducer_objectSpread({},state),result);default:return state}})),reducers_defineProperty(_objectSpread3,"eventDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.Q9S?EventDetails_reducer_objectSpread(EventDetails_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"eventAventriDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.OiA?EventAventriDetails_reducer_objectSpread(EventAventriDetails_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"eventAventriRegistrationStatusAttendees",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.tjD?EventAventriRegistrationStatus_reducer_objectSpread(EventAventriRegistrationStatus_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"essInteractionDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.cBe?ESSInteractionDetails_reducer_objectSpread(ESSInteractionDetails_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"findAttendees",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AttendeeSearch_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.y6W:return AttendeeSearch_reducer_objectSpread(AttendeeSearch_reducer_objectSpread(AttendeeSearch_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.CHH:return AttendeeSearch_reducer_objectSpread(AttendeeSearch_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"ordersList",Omis_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"companyOrdersList",Omis_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"reconciliationOrdersList",Omis_CollectionList_reducer),reducers_defineProperty(_objectSpread3,"reminders",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Reminders_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,payload=_ref.payload;switch(type){case actions.tDb:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{estimatedLandDateReminders:result});case actions.zrS:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{estimatedLandDateReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.estimatedLandDateReminders),{},{results:state.estimatedLandDateReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.estimatedLandDateReminders.count-1,nextPending:!0})});case actions.KnU:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{estimatedLandDateReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.estimatedLandDateReminders),{},{results:[].concat(reducer_toConsumableArray(state.estimatedLandDateReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.nE_:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{noRecentInteractionReminders:result});case actions.SC8:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{noRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.noRecentInteractionReminders),{},{results:state.noRecentInteractionReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.noRecentInteractionReminders.count-1,nextPending:!0})});case actions.YMQ:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{noRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.noRecentInteractionReminders),{},{results:[].concat(reducer_toConsumableArray(state.noRecentInteractionReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.kY:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{outstandingPropositionsReminders:result});case actions.mSO:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNoRecentInteractionReminders:result});case actions.Z1l:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNoRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNoRecentInteractionReminders),{},{results:state.exportsNoRecentInteractionReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.exportsNoRecentInteractionReminders.count-1,nextPending:!0})});case actions.vOm:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNoRecentInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNoRecentInteractionReminders),{},{results:[].concat(reducer_toConsumableArray(state.exportsNoRecentInteractionReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.DLw:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNewInteractionReminders:result});case actions.wmK:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNewInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNewInteractionReminders),{},{results:state.exportsNewInteractionReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.exportsNewInteractionReminders.count-1,nextPending:!0})});case actions.OX5:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{exportsNewInteractionReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.exportsNewInteractionReminders),{},{results:[].concat(reducer_toConsumableArray(state.exportsNewInteractionReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.vST:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{dueDateApproachingReminders:result});case actions._b:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{dueDateApproachingReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.dueDateApproachingReminders),{},{results:[].concat(reducer_toConsumableArray(state.dueDateApproachingReminders.results),reducer_toConsumableArray(result)),nextPending:!1})});case actions.PwC:return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state),{},{dueDateApproachingReminders:Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},state.dueDateApproachingReminders),{},{results:state.dueDateApproachingReminders.results.map((function(item){return Reminders_reducer_objectSpread(Reminders_reducer_objectSpread({},item),{},{deleted:item.deleted||item.id===payload.id})})),count:state.dueDateApproachingReminders.count-1,nextPending:!0})});default:return state}})),reducers_defineProperty(_objectSpread3,"companyDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CompanyDetails_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.e8c?CompanyDetails_reducer_objectSpread(CompanyDetails_reducer_objectSpread({},state),{},{company:result}):state})),reducers_defineProperty(_objectSpread3,"exportDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ExportDetails_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.LZZ?ExportDetails_reducer_objectSpread(ExportDetails_reducer_objectSpread({},state),{},{exportItem:result}):state})),reducers_defineProperty(_objectSpread3,ExportList_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ExportList_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.mep:case actions.iDm:return ExportList_reducer_objectSpread(ExportList_reducer_objectSpread({},state),result);default:return state}})),reducers_defineProperty(_objectSpread3,CompanyLocalHeader_state.ID,(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CompanyLocalHeader_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.aab?CompanyLocalHeader_reducer_objectSpread(CompanyLocalHeader_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"companyHierarchy",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CompanyHierarchy_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.hFh?CompanyHierarchy_reducer_objectSpread(CompanyHierarchy_reducer_objectSpread({},state),{},{familyTree:result}):state})),reducers_defineProperty(_objectSpread3,"linkGlobalHQ",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:LinkGlobalHQ_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return LinkGlobalHQ_reducer_objectSpread(LinkGlobalHQ_reducer_objectSpread(LinkGlobalHQ_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return LinkGlobalHQ_reducer_objectSpread(LinkGlobalHQ_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"linkSubsidiary",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:LinkSubsidiary_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return LinkSubsidiary_reducer_objectSpread(LinkSubsidiary_reducer_objectSpread(LinkSubsidiary_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return LinkSubsidiary_reducer_objectSpread(LinkSubsidiary_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"objective",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:AccountManagement_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.jf1?AccountManagement_reducer_objectSpread(AccountManagement_reducer_objectSpread({},state),{},{objectiveItem:result}):state})),reducers_defineProperty(_objectSpread3,"nonFdiProjectsList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EditAssociatedProject_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.o1j:return EditAssociatedProject_reducer_objectSpread(EditAssociatedProject_reducer_objectSpread({},state),{},{count:result.count,results:result.results,isComplete:!0});case actions.hnA:return EditAssociatedProject_reducer_objectSpread(EditAssociatedProject_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"recipientCompanyList",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:EditRecipientCompany_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;switch(type){case actions.HyB:return EditRecipientCompany_reducer_objectSpread(EditRecipientCompany_reducer_objectSpread(EditRecipientCompany_reducer_objectSpread({},state),result),{},{isComplete:!0});case actions.nBD:return EditRecipientCompany_reducer_objectSpread(EditRecipientCompany_reducer_objectSpread({},state),{},{metadata:result});default:return state}})),reducers_defineProperty(_objectSpread3,"oneListDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CoreTeam_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.L5Y?CoreTeam_reducer_objectSpread(CoreTeam_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"taskDetails",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:TaskDetails_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.Gbi?TaskDetails_reducer_objectSpread(TaskDetails_reducer_objectSpread({},state),{},{task:(0,utils.lI)(result)}):state})),reducers_defineProperty(_objectSpread3,"exportWinsConfirmed",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Confirmed_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.eTX?Confirmed_reducer_objectSpread(Confirmed_reducer_objectSpread({},state),result):state})),reducers_defineProperty(_objectSpread3,"exportWinsUnconfirmed",(function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Unconfirmed_reducer_initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result;return type===actions.awF?Unconfirmed_reducer_objectSpread(Unconfirmed_reducer_objectSpread({},state),result):state})),_objectSpread3));function middleware_typeof(o){return middleware_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},middleware_typeof(o)}function middleware_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function middleware_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:"";return new Promise((function(resolve,reject){return"reject"===query?setTimeout(reject,1e3,"Something went horribly wrong"):setTimeout(resolve,1e3,OPTIONS.filter((function(x){return x.toLowerCase().includes(query.toLowerCase())})).slice(0,10).map((function(x){return{value:lodash_default().snakeCase(x),label:x}})))}))}};function tasks_typeof(o){return tasks_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},tasks_typeof(o)}const Typeahead_tasks=function tasks_defineProperty(obj,key,value){return(key=function tasks_toPropertyKey(arg){var key=function tasks_toPrimitive(input,hint){if("object"!==tasks_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==tasks_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===tasks_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({},__webpack_require__("./src/client/components/Typeahead/state.js").n,(function getTypeaheadOptions(_ref){var loadOptions=_ref.loadOptions,options=_ref.options,autocomplete=_ref.autocomplete;return loadOptions?(0,lodash.throttle)(loadOptions,500)(autocomplete):new Promise((function(resolve){return resolve(options)}))})),_stories_tasks={"Resource example":function ResourceExample(payload,id){return new Promise((function(resolve,reject){return id.match("reject")?setTimeout(reject,1e3,"Could not load resource"):setTimeout(resolve,1e3,{example:"This is a dummy resource representation example",id,payload})}))},Contact:function Contact(id){return new Promise((function(resolve){return setTimeout((function(){return resolve({id,companyId:"008ba003-b528-4e79-b209-49fcfcceb371",companyName:"Little Britain",firstName:"Andy",lastName:"Pipkin",jobTitle:"Unemployed",primary:!1,telephoneCountrycode:"123",telephoneNumber:"456789",email:"andy.pipkin@littlebritain.co.uk",acceptsDitEmailMarketing:!0,addressSameAsCompany:!0,address1:"Foo",address2:"Bar",addressTown:"Town",addressCounty:"County",addressPostcode:null,addressCountry:"87756b9a-5d95-e211-a939-e4115bead28a",notes:"Notes"})}),2e3)}))},Company:function Company(id){return new Promise((function(resolve){return setTimeout((function(){return resolve({id,referenceCode:"",name:"Zboncak Group|271eb29e-425b-4cd8-b386-3208c3a5f978",tradingName:"",tradingNames:[],ukBased:!0,companyNumber:"BR100000",vatNumber:"",dunsNumber:null,createdOn:"2019-01-09T09:45:06.080938Z",modifiedOn:"2019-01-09T09:45:06.080969Z",archived:!1,archivedDocumentsUrlPath:"",archivedOn:null,archivedReason:null,archivedBy:null,description:"Doloribus accusamus qui non nam et earum inventore.",transferredBy:null,transferredOn:null,transferredTo:null,transferReason:"",website:"http://jamaal.biz",businessType:{name:"UK branch of foreign company (BR)",id:"b0730fc6-fcce-4071-bdab-ba8de4f4fc98"},oneListGroupTier:null,contacts:[{id:"0e75d636-1d24-416a-aaf0-3fb220d594ce",title:null,firstName:"Bob",lastName:"lawson",name:"Bob lawson",jobTitle:"Magician",company:{name:"Zboncak Group|271eb29e-425b-4cd8-b386-3208c3a5f978",id:"4cd4128b-1bad-4f1e-9146-5d4678c6a018"},adviser:{name:"DBT Staff",firstName:"DBT",lastName:"Staff",id:"7d19d407-9aec-4d06-b190-d3f404627f21"},primary:!0,telephoneCountrycode:"222",telephoneNumber:"3453454",email:"contact@bob.com",addressSameAsCompany:!0,address1:null,address2:null,addressTown:null,addressCounty:null,addressCountry:null,addressPostcode:null,notes:null,acceptsDitEmailMarketing:!1,archived:!1,archivedDocumentsUrlPath:"",archivedOn:null,archivedReason:null,archivedBy:null,createdOn:"2019-02-04T15:59:14.267412Z",modifiedOn:"2019-02-05T13:17:23.112153Z"}],employeeRange:{name:"50 to 249",id:"3fafd8d0-5d95-e211-a939-e4115bead28a"},numberOfEmployees:null,isNumberOfEmployeesEstimated:null,exportToCountries:[],futureInterestCountries:[],headquarterType:null,oneListGroupGlobalAccountManager:null,globalHeadquarters:null,sector:{name:"Biotechnology and Pharmaceuticals : Bio and Pharma Marketing and Sales : Bio and Pharma Retail",id:"70f7ffde-5f95-e211-a939-e4115bead28a"},turnoverRange:{name:"£1.34 to £6.7M",id:"784cd12a-6095-e211-a939-e4115bead28a"},turnover:null,isTurnoverEstimated:null,ukRegion:{name:"London",id:"874cd12a-6095-e211-a939-e4115bead28a"},exportExperienceCategory:null,address:{line1:"3 Priory Court",line2:"Kingshill Road",town:"Dursley",county:"Gloucestershire",postcode:"GL11 4DH",country:{name:"United Kingdom",id:"80756b9a-5d95-e211-a939-e4115bead28a"}},registeredAddress:{line1:"3 Priory Court",line2:"Kingshill Road",town:"Dursley",county:"Gloucestershire",postcode:"GL11 4DH",country:{name:"United Kingdom",id:"80756b9a-5d95-e211-a939-e4115bead28a"}}})}),2e3)}))}},Form_stories_tasks={"Load initial values":function LoadInitialValues(payload){return new Promise((function(resolve,reject){return"reject"===payload?setTimeout(reject,2e3,"You broke the internet!"):setTimeout(resolve,2e3,{foo:"Blah blah",bar:"b"})}))},"Submit Form example":function SubmitFormExample(formValues){return new Promise((function(resolve,reject){return"yes"===formValues.reject?setTimeout(reject,2e3,"You broke the internet!"):setTimeout(resolve,2e3,{task:"result"})}))},"Load options":function LoadOptions(payload,id){return new Promise((function(resolve,reject){return id.includes("reject")?setTimeout(reject,2e3,"You broke the internet!"):setTimeout(resolve,5e3,payload)}))}};function preview_typeof(o){return preview_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},preview_typeof(o)}var preview_templateObject;function preview_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function preview_objectSpread(e){for(var r=1;r{function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict"},"./src/apps/companies/apps/referrals/details/client/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ID:()=>ID});var ID="referralDetails"},"./src/apps/companies/constants.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.object.values.js");var QUERY_FIELDS_MAP={leadIta:"one_list_group_global_account_manager",archived:"archived",name:"name",sectorDescends:"sector_descends",country:"country",ukRegion:"uk_region",headquarterType:"headquarter_type",exportingTo:"export_to_countries",interestedIn:"future_interest_countries",lastInteractionDate:"interaction_between",ukPostcode:"uk_postcode",usState:"us_state",canadianProvince:"canadian_province",area:"area"},GLOBAL_NAV_ITEM={path:"/companies",headerKey:"datahub-companies",permissions:["company.view_company"],key:"datahub-crm",order:1},LOCAL_NAV=[{path:"overview",label:"Overview",permissions:["company.view_contact"]},{path:"activity",label:"Activity",search:"?activityType%5B0%5D=dataHubActivity&page=1",permissions:["interaction.view_all_interaction"]},{path:"business-details",label:"Business details"},{path:"contacts",label:"Contacts",search:"?archived%5B0%5D=false&sortby=modified_on%3Adesc&page=1",permissions:["company.view_contact"],ariaDescription:"Company contacts"},{path:"account-management",label:"Account management",ariaDescription:"Account management"},{path:"investments",label:"Investment",search:"/projects?page=1&sortby=created_on%3Adesc",permissions:["investment.view_all_investmentproject","investment.view_associated_investmentproject"],ariaDescription:"Company investments"},{path:"exports",label:"Export",permissions:["company.view_companyexportcountry"]},{path:"orders",label:"Orders",permissions:["order.view_order"],ariaDescription:"Company orders"}],APP_PERMISSIONS=(0,__webpack_require__("./node_modules/lodash/lodash.js").concat)(LOCAL_NAV,GLOBAL_NAV_ITEM),QUERY_FIELDS=Object.values(QUERY_FIELDS_MAP);module.exports={GLOBAL_NAV_ITEM,LOCAL_NAV,APP_PERMISSIONS,QUERY_FIELDS,QUERY_FIELDS_MAP,NONE_TEXT:"None",NOT_SET_TEXT:"Not set",NOT_AVAILABLE_TEXT:"Not available",COMPANY_DISSOLVED_OPTION:"Company is dissolved"}},"./src/apps/companies/labels.js":module=>{module.exports={companyDetailsLabels:{business_type:"Business type",name:"Name",registered_address:"Registered address",trading_names:"Trading names",address:"Address",uk_region:"UK region",headquarter_type:"Headquarter type",global_headquarters:"Global HQ",ultimate_hq:"Ultimate HQ",sector:"Sector",website:"Website",description:"Business description",employee_range:"Number of employees",turnover_range:"Annual turnover",subsidiaries:"Subsidiaries",link_a_subsidiary:"Link a subsidiary",link_subsidiary:"Link subsidiary",country:"Country",business_type_for_other:"Type of organisation",business_type_uk_other:"Type of organisation",archived:"Archived status",archived_on:"Archive date",archived_reason:"Archived reason",archived_by_id:"Archived by",company_number:"Companies House number",vat_number:"VAT number",reference_code:"CDMS reference"},companyTypeOptions:{ltd:"UK private or public limited company",ukother:"Other type of UK organisation",foreign:"Foreign organisation"},hqLabels:{ehq:"European HQ",ghq:"Global HQ",ukhq:"UK HQ",trading_names:"Trading names"},accountManagementDisplayLabels:{one_list_tier:"One List tier",one_list_group_global_account_manager:"Global Account Manager"},exportDetailsLabels:{exportExperienceCategory:"Export win category",exportToCountries:"Currently exporting to",futureInterestCountries:"Future countries of interest",noInterestCountries:"Countries of no interest",greatProfile:"great.gov.uk business profile",exportPotential:"Export potential"},address:{companyAddress:"Address",companyRegisteredAddress:"Registered address",companiesHouseRegisteredAddress:"Registered address"},aboutLabels:{business_type:"Business type",trading_names:"Trading names",company_number:"Companies House number",vat_number:"VAT number",reference_code:"CDMS reference",turnover:"Annual turnover",number_of_employees:"Number of employees",website:"Website",description:"Description"},businessHierarchyLabels:{headquarter_type:"Headquarter type",subsidiaries:"Subsidiaries",global_headquarters:"Global HQ"},exportPotentialLabels:{very_high:{text:"Very High",description:"Most companies like this one are exporters"},high:{text:"High",description:"This business shares some features with successful exporters"},medium:{text:"Medium",description:"Some businesses that look like this one export, others don't"},low:{text:"Low",description:"This business shares many features with companies that do not export"},very_low:{text:"Very Low",description:"Most of the businesses like this aren't exporters"}},exportSegmentsLabels:{hep:"High export potential","non-hep":"Not high export potential"},exportSubSegmentsLabels:{sustain_nurture_and_grow:"Sustain: nurture & grow",sustain_develop_export_capability:"Sustain: develop export capability",sustain_communicate_benefits:"Sustain: communicate benefits",sustain_increase_competitiveness:"Sustain: increase competitiveness",reassure_nurture_and_grow:"Reassure: nurture & grow",reassure_develop_export_capability:"Reassure: develop export capability",reassure_leave_be:"Reassure: leave be",reassure_change_the_game:"Reassure: change the game",promote_develop_export_capability:"Promote: develop export capability",promote_communicate_benefits:"Promote: communicate benefits",promote_change_the_game:"Promote: change the game",challenge:"Challenge"}}},"./src/apps/transformers.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var _require=__webpack_require__("./node_modules/lodash/lodash.js"),filter=_require.filter,upperFirst=_require.upperFirst,_require2=__webpack_require__("./src/client/utils/date.js"),format=_require2.format,isDateValid=_require2.isDateValid,_require3=__webpack_require__("./src/common/constants.js"),OPTION_NO=_require3.OPTION_NO,OPTION_YES=_require3.OPTION_YES,hqLabels=__webpack_require__("./src/apps/companies/labels.js").hqLabels,groupExportCountries=__webpack_require__("./src/lib/group-export-countries.js");function transformObjectToOption(_ref){return{value:_ref.id,label:_ref.name}}var transformOptionToValue=function transformOptionToValue(option){return option&&option.value?option.value:null};module.exports={transformHQCodeToLabelledOption:function transformHQCodeToLabelledOption(_ref2){var id=_ref2.id;switch(_ref2.name){case"ehq":return{value:id,label:hqLabels.ehq};case"ghq":return{value:id,label:hqLabels.ghq};case"ukhq":return{value:id,label:hqLabels.ukhq}}},transformObjectToOption,transformStringToOption:function transformStringToOption(string){return{value:string,label:string}},transformExportCountriesToGroupStatus:function transformExportCountriesToGroupStatus(countries){return groupExportCountries(countries)},transformContactToOption:function transformContactToOption(_ref3){var id=_ref3.id,first_name=_ref3.first_name,last_name=_ref3.last_name,job_title=_ref3.job_title;return{value:id,label:upperFirst(filter(["".concat(first_name," ").concat(last_name),job_title]).join(", "))}},transformCountryToOptionWithIsoCode:function transformCountryToOptionWithIsoCode(_ref4){return{key:_ref4.id,label:_ref4.name,value:_ref4.iso_alpha2_code}},transformIdToObject:function transformIdToObject(id){return{id}},transformDateObjectToDateString:function transformDateObjectToDateString(key){if(!key)throw Error("date object key is required to transform date");return function transformDateObjectToStringWithKey(){var props=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},dateString=["year","month","day"].map((function(x){return props["".concat(key,"_").concat(x)]})).join("-");return"--"===dateString?null:dateString}},transformDateStringToDateObject:function transformDateStringToDateObject(dateString){var isValidDate=dateString&&isDateValid(dateString);return{year:isValidDate?format(dateString,"yyyy"):"",month:isValidDate?format(dateString,"MM"):"",day:isValidDate?format(dateString,"dd"):""}},transformOptionToValue,transformArrayOfOptionsToValues:function transformArrayOfOptionsToValues(options){return options&&options.length?options.map(transformOptionToValue):[]},transformToYesNo:function transformToYesNo(value){return value?OPTION_YES:OPTION_NO},transformToID:function transformToID(value){return value?Array.isArray(value)?value.map((function(optionFromArrayOfOptions){return optionFromArrayOfOptions.id})):value.id:value},transformObjectToTypeahead:function transformObjectToTypeahead(value){return value?Array.isArray(value)?value.map(transformObjectToOption):transformObjectToOption(value):value}}},"./src/client/actions.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$n7:()=>OVERVIEW__COMPANY_INVESTMENT_WON_COUNT,APp:()=>INTERACTIONS_SELECTED_ADVISERS,AcS:()=>TAB_NAV__FOCUS,BWt:()=>TYPEAHEAD__INPUT,CHH:()=>EVENTS__ATTENDEE_METADATA_LOADED,Cb4:()=>COMPANY_LISTS__SELECT,CjI:()=>FORM__FIELD_DEREGISTER,CnO:()=>TAB_NAV__SELECT,Cq2:()=>HARD_REDIRECT,Cxq:()=>EVENTS__SELECTED_ORGANISER,DLw:()=>REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_LOADED,DpK:()=>INVESTMENT_OPPORTUNITY__EDIT_REQUIREMENTS,FeB:()=>EXPORTS_HISTORY__SELECT_PAGE,Fis:()=>FORM__LOADED,GPR:()=>EVENTS__METADATA_LOADED,GRb:()=>TYPEAHEAD__OPTIONS_LOADED,Gbi:()=>TASK_DETAILS_LOADED,Ggs:()=>INVESTMENT_OPPORTUNITY__REQUIREMENTS_CHANGE,Gh5:()=>TYPEAHEAD__INITIALISE,H3x:()=>FORM__FORWARD,HIy:()=>FORM__FIELDS__RESET,Hef:()=>FORM__STEP_DEREGISTER,HyB:()=>COMPANIES__LOADED,ITR:()=>COMPANY_ACTIVITIES_SELECTED_TEAMS,IX2:()=>INVESTMENT_OPPORTUNITY__UPDATED,JzB:()=>INTERACTIONS_SELECTED_COMPANIES,Kfu:()=>TYPEAHEAD__MENU_CLOSE,KnU:()=>REMINDERS__ESTIMATED_LAND_DATE_REMINDER_GOT_NEXT,Kp3:()=>ROUTED_INPUT__RESET,L5Y:()=>ONE_LIST_DETAILS_LOADED,LCU:()=>DNB__CHECK_PENDING_REQUEST,LYg:()=>INVESTMENTS__PROFILES_LOADED,LZZ:()=>EXPORT_LOADED,M0d:()=>COMPANY_ACTIVITIES__LOADED,MYm:()=>INVESTMENTS__OPPORTUNITIES_SELECT_PAGE,Mae:()=>CONTACTS__METADATA_LOADED,NTO:()=>TYPEAHEAD__OPTION_MOUSE_DOWN,OX5:()=>REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_GOT_NEXT,Ody:()=>LATEST_ANNOUNCEMENT__UPDATE_STATE,Og6:()=>COMPANY_LISTS__LISTS_LOADED,OiA:()=>EVENTS__AVENTRI_DETAILS_LOADED,Oiz:()=>COMPANY_ACTIVITIES_SELECTED_ADVISERS,PhE:()=>INVESTMENT_OPPORTUNITY__CANCEL_EDIT,PwC:()=>REMINDERS__DUE_DATE_APPROACHING_REMINDERS_DELETED,Q9S:()=>EVENTS__DETAILS_LOADED,QhV:()=>FORM__GO_TO_STEP,Qlv:()=>FORM__ERRORED,Qu9:()=>INVESTMENT_OPPORTUNITY_DETAILS__LOADED,RDn:()=>INVESTMENT__SEARCH_COMPANY_LIST_LOADED,RHb:()=>INVESTMENTS__OPPORTUNITIES_LOADED,RJR:()=>FLASH_MESSAGE__CLEAR_FROM_STATE,S77:()=>MY_INVESTMENTS__SAVE_TO_SESSION,SC8:()=>REMINDERS__NO_RECENT_INTERACTION_REMINDER_DELETED,STt:()=>MY_INVESTMENTS__LIST_LOADED,SqW:()=>REMINDER_SUMMARY__LOADED,St0:()=>FORM__RESOLVED,TJt:()=>MY_INVESTMENTS__ADD_TO_STATE,TZF:()=>TYPEAHEAD__OPTION_TOGGLE,TaK:()=>EVENTS__ALL_ACTIVITY_FEED_EVENTS_LOADED,TpS:()=>TASK__START,VfH:()=>MY_INVESTMENTS__CHECK_COMPLETE,WJs:()=>SEND_REFERRAL_FORM__SUBMIT,WhS:()=>COMPANY_LISTS__COMPANIES_LOADED,XaB:()=>COMPANY_ACTIVITIES_SELECTED_COMPANIES,Xm$:()=>INVESTMENT_OPPORTUNITY__REQUIREMENTS_METADATA_LOADED,Y$Y:()=>ANALYTICS__PUSH,Y3Q:()=>LATEST_ANNOUNCEMENT__READ_FROM_LOCALSTORAGE,YJ:()=>FLASH_MESSAGE__GET_FROM_SESSION,YMQ:()=>REMINDERS__NO_RECENT_INTERACTION_REMINDER_GOT_NEXT,YWR:()=>MY_INVESTMENTS__STATUS_CHANGE,Yf4:()=>ROUTED_INPUT__SELECT,Z1l:()=>REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_DELETED,Z90:()=>TASK__ERROR,Zo7:()=>TASK__CANCEL,_Yb:()=>EXPORT_WINS__SELECT_PAGE,_b:()=>REMINDERS__DUE_DATE_APPROACHING_REMINDERS_GOT_NEXT,_zA:()=>TYPEAHEAD__OPTION_REMOVE,aAd:()=>TYPEAHEAD__SET_ACTIVE_OPTION,aYo:()=>CONTACT_FORM__SUBMIT,aab:()=>COMPANY_LISTS__COMPANY_IN_LOADED,aji:()=>INVESTMENTS__PROJECTS_SELECTED_ADVISERS,awF:()=>EXPORT_WINS__UNCONFIRMED_LOADED,b0f:()=>COMPANY_ACTIVITIES__METADATA_LOADED,bgc:()=>MY_INVESTMENTS__STAGE_CHANGE,boT:()=>INVESTMENT__COMPANY_INVESTMENT_COUNT,cBe:()=>INTERACTION__ESS_DETAILS_LOADED,cdq:()=>FIELD_ADD_ANOTHER__INITIALISE,d$R:()=>EVENTS__LOADED,dBj:()=>FORM__FIELD_REGISTER,dpe:()=>INVESTMENTS_PROFILES__FILTER_OPTIONS_LOADED,e8c:()=>COMPANY_LOADED,eGJ:()=>ORDERS__METADATA_LOADED,eTX:()=>EXPORT_WINS__CONFIRMED_LOADED,f3J:()=>REFERRAL_LIST__LOADED,fpo:()=>ADD_COMPANY__REGION_LOADED,g2S:()=>INVESTMENT_OPPORTUNITY__EDIT_DETAILS,gUm:()=>MY_INVESTMENTS__GET_FROM_SESSION,gZL:()=>FORM__FIELD_TOUCHED,h0j:()=>CONTACTS__ACTIVITIES_LOADED,hFh:()=>DNB_FAMILY_TREE_LOADED,hIS:()=>OVERVIEW__EXPORT_WINS_SUMMARY,hWh:()=>COMPANIES__SELECTED_LEAD_ITA_OR_GLOBAL_ACCOUNT_MANAGER,hnA:()=>INVESTMENTS__SET_PROJECTS_METADATA,iDm:()=>EXPORT__PIPELINE_METADATA_LOADED,iSD:()=>FLASH_MESSAGE__ADD_TO_STATE,iX0:()=>EXPORTS_HISTORY__LOADED,j9t:()=>LATEST_ANNOUNCEMENT__WRITE_TO_LOCALSTORAGE,jNH:()=>TYPEAHEAD__MENU_OPEN,jf1:()=>OBJECTIVE_LOADED,k$I:()=>COMPANY_LISTS__ORDER,kB3:()=>ROUTED_INPUT__CHANGE,kQc:()=>TYPEAHEAD__BLUR,kQr:()=>REFERRAL_LIST__FILTER_CHANGE,kY:()=>REMINDERS__OUTSTANDING_PROPOSITIONS_LOADED,ko6:()=>CONTACTS__LOADED,l1G:()=>MY_INVESTMENTS__SORT_CHANGE,l28:()=>INVESTMENT__PROJECT_LOADED,lic:()=>DROP_DOWN_MENU_TOGGLE,mSO:()=>REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_LOADED,mUn:()=>MY_INVESTMENTS__PAGINATION_CLICK,mV:()=>DROP_DOWN_MENU_UPDATE_INDEX,mep:()=>EXPORT__PIPELINE_LIST_LOADED,moN:()=>REFERRAL_DETAILS,nBD:()=>COMPANIES__METADATA_LOADED,nE_:()=>REMINDERS__NO_RECENT_INTERACTION_REMINDERS_LOADED,o1j:()=>INVESTMENTS__PROJECTS_LOADED,oNU:()=>INVESTMENT__COMPANY_SEARCH_TERM,oV1:()=>TASK__CLEAR,p2g:()=>INTERACTIONS_SELECTED_TEAMS,pb3:()=>MY_INVESTMENTS__SHOW_DETAILS_CHANGE,pdV:()=>FORM__STEP_REGISTER,pe8:()=>FORM__FIELD_SET_VALUE,pyx:()=>TOGGLE_SECTION__TOGGLE,q3y:()=>FLASH_MESSAGE__WRITE_TO_SESSION,qre:()=>FORM__VALIDATE,qzL:()=>OUTSTANDING_PROPOSITIONS__LOADED,rMO:()=>ORDERS__LOADED,rZB:()=>DATA_HUB_FEED__FETCHED,s_5:()=>FIELD_ADD_ANOTHER__ADD,sb0:()=>COMPANY_LISTS__FILTER,tDb:()=>REMINDERS__ESTIMATED_LAND_DATE_REMINDERS_LOADED,tjD:()=>EVENTS__AVENTRI_REGISTRATION_STATUS_ATTENDEES_LOADED,ukg:()=>TYPEAHEAD__OPTIONS_CLEAR,uqm:()=>INTERACTIONS__METADATA_LOADED,vOm:()=>REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_GOT_NEXT,vQM:()=>DROP_DOWN_MENU_OPEN,vST:()=>REMINDERS__DUE_DATE_APPROACHING_REMINDERS_LOADED,vmK:()=>DROP_DOWN_MENU_CLOSED,wm$:()=>EXPORT_WINS__LOADED,wmK:()=>REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_DELETED,x7:()=>FIELD_ADD_ANOTHER__REMOVE,y6W:()=>EVENTS__SEARCH_ATTENDEE_LIST_LOADED,yFd:()=>MY_INVESTMENTS__LAND_DATE_CHANGE,yR5:()=>INTERACTIONS__LOADED,yTt:()=>FORM__BACK,zIU:()=>TASK__DISMISS_ERROR,zj3:()=>TASK__PROGRESS,zrS:()=>REMINDERS__ESTIMATED_LAND_DATE_REMINDER_DELETED});var INTERACTIONS__LOADED="INTERACTIONS__LOADED",INTERACTIONS__METADATA_LOADED="INTERACTIONS__METADATA_LOADED",INTERACTIONS_SELECTED_ADVISERS="INTERACTIONS_SELECTED_ADVISERS",INTERACTIONS_SELECTED_COMPANIES="INTERACTIONS_SELECTED_COMPANIES",INTERACTIONS_SELECTED_TEAMS="INTERACTIONS_SELECTED_TEAMS",COMPANIES__LOADED="COMPANIES__LOADED",COMPANIES__METADATA_LOADED="COMPANIES__METADATA_LOADED",COMPANIES__SELECTED_LEAD_ITA_OR_GLOBAL_ACCOUNT_MANAGER="COMPANIES__SELECTED_LEAD_ITA_OR_GLOBAL_ACCOUNT_MANAGER",COMPANY_LISTS__LISTS_LOADED="COMPANY_LISTS__LISTS_LOADED",COMPANY_LISTS__SELECT="COMPANY_LISTS__SELECT",COMPANY_LISTS__COMPANIES_LOADED="COMPANY_LISTS__COMPANIES_LOADED",COMPANY_LISTS__FILTER="COMPANY_LISTS__FILTER",COMPANY_LISTS__ORDER="COMPANY_LISTS__ORDER",CONTACTS__LOADED="CONTACTS__LOADED",CONTACTS__METADATA_LOADED="CONTACTS__METADATA_LOADED",CONTACTS__ACTIVITIES_LOADED="CONTACTS__ACTIVITIES_LOADED",ORDERS__LOADED="ORDERS__LOADED",ORDERS__METADATA_LOADED="ORDERS__METADATA_LOADED",EVENTS__LOADED="EVENTS__LOADED",EVENTS__METADATA_LOADED="EVENTS__METADATA_LOADED",EVENTS__ALL_ACTIVITY_FEED_EVENTS_LOADED="EVENTS__ALL_ACTIVITY_FEED_EVENTS_LOADED",EVENTS__SELECTED_ORGANISER="EVENTS__SELECTED_ORGANISER",EVENTS__DETAILS_LOADED="EVENTS__DETAILS_LOADED",EVENTS__AVENTRI_DETAILS_LOADED="EVENTS__AVENTRI_DETAILS_LOADED",EVENTS__AVENTRI_REGISTRATION_STATUS_ATTENDEES_LOADED="EVENTS__AVENTRI_REGISTRATION_STATUS_ATTENDEES_LOADED",EVENTS__SEARCH_ATTENDEE_LIST_LOADED="EVENTS__SEARCH_ATTENDEE_LIST_LOADED",EVENTS__ATTENDEE_METADATA_LOADED="EVENTS__ATTENDEE_METADATA_LOADED",INTERACTION__ESS_DETAILS_LOADED="INTERACTION__ESS_DETAILS_LOADED",REMINDERS__ESTIMATED_LAND_DATE_REMINDERS_LOADED="REMINDERS__ESTIMATED_LAND_DATE_REMINDERS_LOADED",REMINDERS__ESTIMATED_LAND_DATE_REMINDER_DELETED="REMINDERS__ESTIMATED_LAND_DATE_REMINDER_DELETED",REMINDERS__ESTIMATED_LAND_DATE_REMINDER_GOT_NEXT="REMINDERS__ESTIMATED_LAND_DATE_REMINDER_GOT_NEXT",REMINDERS__NO_RECENT_INTERACTION_REMINDERS_LOADED="REMINDERS__NO_RECENT_INTERACTION_REMINDERS_LOADED",REMINDERS__NO_RECENT_INTERACTION_REMINDER_DELETED="REMINDERS__NO_RECENT_INTERACTION_REMINDER_DELETED",REMINDERS__NO_RECENT_INTERACTION_REMINDER_GOT_NEXT="REMINDERS__NO_RECENT_INTERACTION_REMINDER_GOT_NEXT",REMINDERS__OUTSTANDING_PROPOSITIONS_LOADED="REMINDERS__OUTSTANDING_PROPOSITIONS_LOADED",REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_LOADED="REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_LOADED",REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_DELETED="REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_DELETED",REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_GOT_NEXT="REMINDERS__EXPORTS_NO_RECENT_INTERACTION_REMINDERS_GOT_NEXT",REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_LOADED="REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_LOADED",REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_DELETED="REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_DELETED",REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_GOT_NEXT="REMINDERS__EXPORTS_NEW_INTERACTION_REMINDERS_GOT_NEXT",REMINDERS__DUE_DATE_APPROACHING_REMINDERS_LOADED="REMINDERS__DUE_DATE_APPROACHING_REMINDERS_LOADED",REMINDERS__DUE_DATE_APPROACHING_REMINDERS_GOT_NEXT="REMINDERS__DUE_DATE_APPROACHING_REMINDERS_GOT_NEXT",REMINDERS__DUE_DATE_APPROACHING_REMINDERS_DELETED="REMINDERS__DUE_DATE_APPROACHING_REMINDERS_DELETED",REFERRAL_DETAILS="REFERRAL_DETAILS",TASK__START="TASK__START",TASK__PROGRESS="TASK__PROGRESS",TASK__CANCEL="TASK__CANCEL",TASK__ERROR="TASK__ERROR",TASK__DISMISS_ERROR="TASK__DISMISS_ERROR",TASK__CLEAR="TASK__CLEAR",EXPORTS_HISTORY__LOADED="EXPORTS_HISTORY__LOADED",EXPORTS_HISTORY__SELECT_PAGE="EXPORTS_HISTORY__SELECT_PAGE",TAB_NAV__SELECT="TAB_NAV__SELECT",TAB_NAV__FOCUS="TAB_NAV__FOCUS",SEND_REFERRAL_FORM__SUBMIT="SEND_REFERRAL_FORM__SUBMIT",REFERRAL_LIST__LOADED="REFERRAL_LIST__LOADED",REFERRAL_LIST__FILTER_CHANGE="REFERRAL_LIST__FILTER_CHANGE",EXPORT_WINS__LOADED="EXPORT_WINS__LOADED",EXPORT_WINS__SELECT_PAGE="EXPORT_WINS__SELECT_PAGE",FORM__LOADED="FORM__LOADED",FORM__FIELD_SET_VALUE="FORM__FIELD_SET_VALUE",FORM__FIELD_TOUCHED="FORM__FIELD_TOUCHED",FORM__FIELD_REGISTER="FORM__FIELD_REGISTER",FORM__FIELD_DEREGISTER="FORM__FIELD_DEREGISTER",FORM__STEP_REGISTER="FORM__STEP_REGISTER",FORM__STEP_DEREGISTER="FORM__STEP_DEREGISTER",FORM__FIELDS__RESET="FORM__FIELDS__RESET",FORM__FORWARD="FORM__FORWARD",FORM__BACK="FORM__BACK",FORM__GO_TO_STEP="FORM__GO_TO_STEP",FORM__VALIDATE="FORM__VALIDATE",FORM__RESOLVED="FORM__RESOLVED",FORM__ERRORED="FORM__ERRORED",ADD_COMPANY__REGION_LOADED="ADD_COMPANY__REGION_LOADED",DROP_DOWN_MENU_TOGGLE="DROP_DOWN_MENU_TOGGLE",DROP_DOWN_MENU_OPEN="DROP_DOWN_MENU_OPEN",DROP_DOWN_MENU_CLOSED="DROP_DOWN_MENU_CLOSED",DROP_DOWN_MENU_UPDATE_INDEX="DROP_DOWN_MENU_UPDATE_INDEX",ANALYTICS__PUSH="ANALYTICS__PUSH",DNB__CHECK_PENDING_REQUEST="DNB__CHECK_PENDING_REQUEST",TOGGLE_SECTION__TOGGLE="TOGGLE_SECTION__TOGGLE",INVESTMENTS__PROJECTS_LOADED="INVESTMENTS__PROJECTS_LOADED",INVESTMENTS__PROJECTS_SELECTED_ADVISERS="INVESTMENTS__PROJECTS_SELECTED_ADVISERS",INVESTMENTS__PROFILES_LOADED="INVESTMENTS__PROFILES_LOADED",INVESTMENTS__SET_PROJECTS_METADATA="INVESTMENTS__SET_PROJECTS_METADATA",INVESTMENT__SEARCH_COMPANY_LIST_LOADED="INVESTMENT__SEARCH_COMPANY_LIST_LOADED",INVESTMENT__COMPANY_INVESTMENT_COUNT="INVESTMENT__COMPANY_INVESTMENT_COUNT",INVESTMENT__COMPANY_SEARCH_TERM="INVESTMENT__COMPANY_SEARCH_TERM",INVESTMENTS_PROFILES__FILTER_OPTIONS_LOADED="INVESTMENTS_PROFILES__FILTER_OPTIONS_LOADED",INVESTMENT_OPPORTUNITY_DETAILS__LOADED="INVESTMENT_OPPORTUNITY_DETAILS__LOADED",INVESTMENTS__OPPORTUNITIES_LOADED="INVESTMENTS__OPPORTUNITIES_LOADED",INVESTMENTS__OPPORTUNITIES_SELECT_PAGE="INVESTMENTS__OPPORTUNITIES_SELECT_PAGE",INVESTMENT_OPPORTUNITY__REQUIREMENTS_METADATA_LOADED="INVESTMENT_OPPORTUNITY__REQUIREMENTS_METADATA_LOADED",INVESTMENT_OPPORTUNITY__EDIT_DETAILS="INVESTMENT_OPPORTUNITY__EDIT_DETAILS",INVESTMENT_OPPORTUNITY__EDIT_REQUIREMENTS="INVESTMENT_OPPORTUNITY__EDIT_REQUIREMENTS",INVESTMENT_OPPORTUNITY__CANCEL_EDIT="INVESTMENT_OPPORTUNITY__CANCEL_EDIT",INVESTMENT_OPPORTUNITY__REQUIREMENTS_CHANGE="INVESTMENT_OPPORTUNITY__REQUIREMENTS_CHANGE",INVESTMENT_OPPORTUNITY__UPDATED="INVESTMENT_OPPORTUNITY__UPDATED",MY_INVESTMENTS__LIST_LOADED="MY_INVESTMENTS__LIST_LOADED",MY_INVESTMENTS__CHECK_COMPLETE="MY_INVESTMENTS__CHECK_COMPLETE",MY_INVESTMENTS__PAGINATION_CLICK="MY_INVESTMENTS__PAGINATION_CLICK",MY_INVESTMENTS__STAGE_CHANGE="MY_INVESTMENTS__STAGE_CHANGE",MY_INVESTMENTS__STATUS_CHANGE="MY_INVESTMENTS__STATUS_CHANGE",MY_INVESTMENTS__LAND_DATE_CHANGE="MY_INVESTMENTS__LAND_DATE_CHANGE",MY_INVESTMENTS__SORT_CHANGE="MY_INVESTMENTS__SORT_CHANGE",MY_INVESTMENTS__SHOW_DETAILS_CHANGE="MY_INVESTMENTS__SHOW_DETAILS_CHANGE",MY_INVESTMENTS__SAVE_TO_SESSION="MY_INVESTMENTS__SAVE_TO_SESSION",MY_INVESTMENTS__GET_FROM_SESSION="MY_INVESTMENTS__GET_FROM_SESSION",MY_INVESTMENTS__ADD_TO_STATE="MY_INVESTMENTS__ADD_TO_STATE",OUTSTANDING_PROPOSITIONS__LOADED="OUTSTANDING_PROPOSITIONS__LOADED",REMINDER_SUMMARY__LOADED="REMINDER_SUMMARY__LOADED",ROUTED_INPUT__CHANGE="ROUTED_INPUT__CHANGE",ROUTED_INPUT__SELECT="ROUTED_INPUT__SELECT",ROUTED_INPUT__RESET="ROUTED_INPUT__RESET",HARD_REDIRECT="HARD_REDIRECT",CONTACT_FORM__SUBMIT="CONTACT_FORM__SUBMIT",TYPEAHEAD__BLUR="TYPEAHEAD__BLUR",TYPEAHEAD__SET_ACTIVE_OPTION="TYPEAHEAD__SET_ACTIVE_OPTION",TYPEAHEAD__INPUT="TYPEAHEAD__INPUT",TYPEAHEAD__INITIALISE="TYPEAHEAD__INITIALISE",TYPEAHEAD__MENU_CLOSE="TYPEAHEAD__MENU_CLOSE",TYPEAHEAD__MENU_OPEN="TYPEAHEAD__MENU_OPEN",TYPEAHEAD__OPTION_MOUSE_DOWN="TYPEAHEAD__OPTION_MOUSE_DOWN",TYPEAHEAD__OPTIONS_LOADED="TYPEAHEAD__OPTIONS_LOADED",TYPEAHEAD__OPTIONS_CLEAR="TYPEAHEAD__OPTIONS_CLEAR",TYPEAHEAD__OPTION_TOGGLE="TYPEAHEAD__OPTION_TOGGLE",TYPEAHEAD__OPTION_REMOVE="TYPEAHEAD__OPTION_REMOVE",FLASH_MESSAGE__WRITE_TO_SESSION="FLASH_MESSAGE__WRITE_TO_SESSION",FLASH_MESSAGE__ADD_TO_STATE="FLASH_MESSAGE__ADD_TO_STATE",FLASH_MESSAGE__GET_FROM_SESSION="FLASH_MESSAGE__GET_FROM_SESSION",FLASH_MESSAGE__CLEAR_FROM_STATE="FLASH_MESSAGE__CLEAR_FROM_STATE",FIELD_ADD_ANOTHER__INITIALISE="FIELD_ADD_ANOTHER__INITIALISE",FIELD_ADD_ANOTHER__ADD="FIELD_ADD_ANOTHER__ADD",FIELD_ADD_ANOTHER__REMOVE="FIELD_ADD_ANOTHER__REMOVE",DATA_HUB_FEED__FETCHED="DATA_HUB_FEED__FETCHED",LATEST_ANNOUNCEMENT__WRITE_TO_LOCALSTORAGE="LATEST_ANNOUNCEMENT__WRITE_TO_LOCALSTORAGE",LATEST_ANNOUNCEMENT__READ_FROM_LOCALSTORAGE="LATEST_ANNOUNCEMENT__READ_FROM_LOCALSTORAGE",LATEST_ANNOUNCEMENT__UPDATE_STATE="LATEST_ANNOUNCEMENT__UPDATE_STATE",COMPANY_LOADED="COMPANY_LOADED",COMPANY_ACTIVITIES__LOADED="COMPANY_ACTIVITIES__LOADED",COMPANY_ACTIVITIES__METADATA_LOADED="COMPANY_ACTIVITIES__METADATA_LOADED",COMPANY_ACTIVITIES_SELECTED_ADVISERS="COMPANY_ACTIVITIES_SELECTED_ADVISERS",COMPANY_ACTIVITIES_SELECTED_COMPANIES="COMPANY_ACTIVITIES_SELECTED_COMPANIES",COMPANY_ACTIVITIES_SELECTED_TEAMS="COMPANY_ACTIVITIES_SELECTED_TEAMS",EXPORT_LOADED="EXPORT_LOADED",OVERVIEW__COMPANY_INVESTMENT_WON_COUNT="OVERVIEW__COMPANY_INVESTMENT_WON_COUNT",OVERVIEW__EXPORT_WINS_SUMMARY="OVERVIEW__EXPORT_WINS_SUMMARY",EXPORT__PIPELINE_LIST_LOADED="EXPORT__PIPELINE_LIST_LOADED",EXPORT__PIPELINE_METADATA_LOADED="EXPORT__PIPELINE_METADATA_LOADED",COMPANY_LISTS__COMPANY_IN_LOADED="COMPANY_LISTS__COMPANY_IN_LOADED",DNB_FAMILY_TREE_LOADED="DNB_FAMILY_TREE_LOADED",OBJECTIVE_LOADED="OBJECTIVE_LOADED",ONE_LIST_DETAILS_LOADED="ONE_LIST_DETAILS_LOADED",TASK_DETAILS_LOADED="TASK_DETAILS_LOADED",INVESTMENT__PROJECT_LOADED="INVESTMENT__PROJECT_LOADED",EXPORT_WINS__CONFIRMED_LOADED="EXPORT_WINS__CONFIRMED_LOADED",EXPORT_WINS__UNCONFIRMED_LOADED="EXPORT_WINS__UNCONFIRMED_LOADED"},"./src/client/components/AccessDenied/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/react/index.js");var _Layout_DefaultLayout__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/components/Layout/DefaultLayout.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react/jsx-runtime.js"),AccessDenied=function AccessDenied(_ref){var breadcrumbs=_ref.breadcrumbs;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_Layout_DefaultLayout__WEBPACK_IMPORTED_MODULE_1__.Z,{heading:"You don't have permission to view this page",pageTitle:"Access denied",breadcrumbs,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div",{"data-test":"access-denied",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p",{children:["If you think you should have access or need to sign up to a DBT system then ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("a",{href:"/support",children:"request access"}),"."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p",{children:["You can also ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("a",{href:"/",children:"browse or search from the homepage"})," to find the information you need."]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("strong",{children:"403"})})]})})};AccessDenied.displayName="AccessDenied",AccessDenied.__docgenInfo={description:"",methods:[],displayName:"AccessDenied"};const __WEBPACK_DEFAULT_EXPORT__=AccessDenied},"./src/client/components/ActivityFeed/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{EB:()=>SOURCE_TYPES,QV:()=>BADGES,Q_:()=>STATUS,_h:()=>INTERACTION_SERVICES,qU:()=>INTERACTION_SERVICEOTHER,x8:()=>ACTIVITY_TYPE});__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var _INTERACTION_SERVICES,_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./src/client/utils/colours.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var STATUS={DRAFT:"draft",COMPLETE:"complete",UPCOMING:"upcoming",INCOMPLETE:"incomplete",CANCELLED:"cancelled"},BADGES={INTERACTION:{COMPLETE:{text:"Interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.ZA},UPCOMING:{text:"Upcoming interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.Ej},INCOMPLETE:{text:"Incomplete interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.Ej},CANCELLED:{text:"Cancelled interaction",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.hM},SERVICE_DELIVERY:{text:"Service delivery",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.ZA}},REFERRAL:{COMPLETE:{text:"Completed referral",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.ZA},OUTSTANDING:{text:"Outstanding referral",borderColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_10__.Ej}}},SOURCE_TYPES={external:"externalDataSource"},ACTIVITY_TYPE={AventriAttendee:["dit:aventri:Attendee"],CompaniesHouseAccount:["dit:Accounts"],CompaniesHouseCompany:["dit:Company"],DataHubEvent:["dit:dataHub:Event"],AventriEvent:["dit:aventri:Event"],HmrcExporter:["dit:Export"],Interaction:["dit:Interaction","dit:ServiceDelivery"],InvestmentProject:["dit:InvestmentProject"],Omis:["dit:OMISOrder"],Referral:["dit:CompanyReferral"],DirectoryFormsApi:["dit:directoryFormsApi:Submission"],MaxemailCampaign:["dit:maxemail:Campaign"]},INTERACTION_SERVICES=(_defineProperty(_INTERACTION_SERVICES={"Account Management":"Account Management","A Specific Service":"Specific Service","A Specific DBT Export Service or Funding":"Service or Funding",COP26:"COP26","Enquiry received":"Enquiry","Enquiry or Referral Received":"Enquiry or Referral",Events:"Event","Export Win":"Export Win","Global Investment Summit (2021)":"Global Investment Summit (2021)","Investment Enquiry":"Enquiry","Investment - IST Aftercare Offered (IST use only)":"IST Aftercare","Investment - Services":"Service","IST Specific Service":"IST Service","Proposition Development":"Proposition Development","Trade Agreement Implementation Activity":"Implementation","GREAT - Unicorn Kingdom Campaign - North America (2023)":"GREAT - Unicorn Kingdom Campaign","Account management":"Account management","Specific service":"Specific service","DBT export service or funding":"DBT export service or funding"},"Enquiry received","Enquiry"),_defineProperty(_INTERACTION_SERVICES,"Enquiry or referral","Enquiry or referral"),_defineProperty(_INTERACTION_SERVICES,"Export win","Export win"),_defineProperty(_INTERACTION_SERVICES,"Global Investment Summit (2021)","Global Investment Summit (2021)"),_defineProperty(_INTERACTION_SERVICES,"Investment Enquiry","Enquiry"),_defineProperty(_INTERACTION_SERVICES,"Investment - IST aftercare offered (IST use only)","IST Aftercare"),_defineProperty(_INTERACTION_SERVICES,"Investment - services","Service"),_defineProperty(_INTERACTION_SERVICES,"IST service","IST service"),_defineProperty(_INTERACTION_SERVICES,"Proposition development","Proposition development"),_defineProperty(_INTERACTION_SERVICES,"Trade agreement implementation activity","Implementation"),_INTERACTION_SERVICES),INTERACTION_SERVICEOTHER={"Export Support Service - International Markets":"Export Support Service: International","Global Growth Service: Diagnostic and Output Report Completed by DBT":"Global Growth: Diagnostic and Output Report","Global Growth Service: engagement letter signed by company":"Global Growth: Engagement Letter Signed","Global Growth Service: project closed":"Global Growth: Project Closed","Global Growth Service: signed export growth plan received from company":"Global Growth: Export Growth Plan Received","Overseas Business Network chargeable services (OBN)":"OBN Chargeable Services","Participation at Glasgow/getting involved with COP26":"Participation at Glasgow/COP26 involvement","DBT Middle East & Pakistan Comms & Marketing campaigns":"DBT Middle East & Pakistan Comms & Marketing","Commonwealth Games 2022 - BATP Programme":"Commonwealth Games 2022 – BATP","Commonwealth Games 2022 - GEP Programme":"Commonwealth Games 2022 – GEP","HPO High Potential Opportunity investment enquiry from IIGB":"HPO Investment Enquiry via IIGB","HPO High Potential Opportunity investment enquiry from IST target company":"HPO Investment Enquiry via IST Target Company","Abandoned - no investor response (ERU Use)":"Abandoned - No Response (ERU Use)","Follow up email - no investor response (ERU Use)":"Follow Up Email - No Response (ERU Use)","Business partners (such as distributors or manufacturers)":"Business Partners","Financial and professional service providers":"Financial + Professional Service Providers","Engagement with Local Enterprise Partnerships (LEPs)":"Engagement: Local Enterprise Partnerships","Engaging with devolved authorities on trade agreements":"Engagement: Devolved Authorities Trade Agreements","Informing key stakeholder groups of opportunities and gathering business intelligence":"Informing stakeholders + gathering intelligence","Negotiating rounds - pre-ratification and negotiating amendments":"Negotiating: pre-ratification + amendments","One-to-one with exporters explaining new trade agreement opportunities, messages and resources":"121 with exporters: new trade agreement opportunities","One-to-one with investors explaining new trade agreement opportunities, messages and resources":"121 with investors: new trade agreement opportunities","Partner country interaction - post-ratification (trade agreement related)":"Partner country interaction: post-ratification","Partner country interaction - related to Market Access Barriers":"Partner country interaction: Market Access Barriers"}},"./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaLookup.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>useAdministrativeAreaLookup,d:()=>filterAreaDataByCountry});__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var axios__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/axios/index.js"),axios__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_18__),_lib_urls__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/lib/urls.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function useAdministrativeAreaLookup(){return function(){var _findAreaByCountryId=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(){var countryId,_yield$axios,data,_args=arguments;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return countryId=_args.length>0&&void 0!==_args[0]?_args[0]:void 0,_context.next=3,axios__WEBPACK_IMPORTED_MODULE_18___default()(_lib_urls__WEBPACK_IMPORTED_MODULE_19__.metadata.administrativeArea());case 3:return _yield$axios=_context.sent,data=_yield$axios.data,_context.abrupt("return",countryId?filterAreaDataByCountry(data,countryId):data);case 6:case"end":return _context.stop()}}),_callee)})));return function findAreaByCountryId(){return _findAreaByCountryId.apply(this,arguments)}}()}function filterAreaDataByCountry(data,countryId){return data.filter((function(area){return null===area.disabled_on})).filter((function(area){return area.country.id===countryId}))}},"./src/client/components/AdministrativeAreaSearch/useAdministrativeAreaSearch.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js");var react__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/index.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==_args[0]?_args[0]:void 0,_context.prev=1,setIsSubmitting(!0),setAdministrativeAreaSearchError(null),_context.t0=setAdministrativeAreaList,_context.next=7,areaSearchCallback(countryId);case 7:_context.t1=_context.sent,(0,_context.t0)(_context.t1),_context.next=15;break;case 11:_context.prev=11,_context.t2=_context.catch(1),setAdministrativeAreaList(null),setAdministrativeAreaSearchError("Error occurred while searching for an administrative area.");case 15:return _context.prev=15,setIsSubmitting(!1),_context.finish(15);case 18:case"end":return _context.stop()}}),_callee,null,[[1,11,15,18]])}))),_onAdministrativeAreaSearch.apply(this,arguments)}return{administrativeAreaSearchError,administrativeAreaList,isAreaFilterSubmitting:isSubmitting,onAdministrativeAreaSearch:function onAdministrativeAreaSearch(){return _onAdministrativeAreaSearch.apply(this,arguments)}}}},"./src/client/components/Analytics/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),_actions__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/actions.js");const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)()((function(_ref){var children=_ref.children,dispatch=_ref.dispatch;return children((function(_ref2){var category=_ref2.category,action=_ref2.action,label=_ref2.label,extra=_ref2.extra,_ref2$event=_ref2.event,event=void 0===_ref2$event?"gaEvent":_ref2$event;return dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_1__.Y$Y,category,action,label,extra,event})}))}))},"./src/client/components/ArchivePanel/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,prop_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__),styled_components__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_main__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@govuk-react/main/dist/govuk-react-main.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_client_components_StatusMessage__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/client/components/StatusMessage/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var format=__webpack_require__("./src/client/utils/date.js").format,negativeSpacing="-"+_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_4,StyledMain=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(_govuk_react_main__WEBPACK_IMPORTED_MODULE_5__.Z)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n padding-top: ",";\n div {\n font-size: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_1,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.Kt.SIZE_20),StyledMessage=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)("p")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n font-weight: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.Xw.bold),StyledReason=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(StyledMessage)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n margin-top: ",";\n"])),negativeSpacing),ArchivePanel=function ArchivePanel(_ref){var _ref$archivedBy=_ref.archivedBy,archivedBy=void 0===_ref$archivedBy?null:_ref$archivedBy,archivedOn=_ref.archivedOn,archiveReason=_ref.archiveReason,unarchiveUrl=_ref.unarchiveUrl,_ref$onClick=_ref.onClick,onClick=void 0===_ref$onClick?null:_ref$onClick,type=_ref.type,_ref$archiveMessage=_ref.archiveMessage,archiveMessage=void 0===_ref$archiveMessage?"archived":_ref$archiveMessage;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledMain,{"data-test":"archive-panel",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(_client_components_StatusMessage__WEBPACK_IMPORTED_MODULE_8__.Z,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledMessage,{"data-test":"archive-message",children:archivedBy?"This ".concat(type," was ").concat(archiveMessage," on ").concat(format(archivedOn)," by ").concat(archivedBy.first_name||archivedBy.firstName," ").concat(archivedBy.last_name||archivedBy.lastName,"."):"This ".concat(type," was automatically archived on ").concat(format(archivedOn),".")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledReason,{"data-test":"archive-reason",children:"Reason: ".concat(archiveReason)}),unarchiveUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_7__.Z,{"data-test":"unarchive-link",onClick,href:unarchiveUrl,children:"Unarchive"})]})})};ArchivePanel.displayName="ArchivePanel",ArchivePanel.propTypes={archivedBy:prop_types__WEBPACK_IMPORTED_MODULE_11___default().object,archivedOn:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired,archiveReason:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired,unarchiveUrl:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,onClick:prop_types__WEBPACK_IMPORTED_MODULE_11___default().func,type:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired},ArchivePanel.__docgenInfo={description:"An extension of `StatusMessage` that is used to denote whether a record has been archived.",methods:[],displayName:"ArchivePanel",props:{archivedBy:{defaultValue:{value:"null",computed:!1},description:"An object containg the first and last name of the person who archived the record. If this is not defined, the automatic archive text will appear.",type:{name:"object"},required:!1},onClick:{defaultValue:{value:"null",computed:!1},description:"This is used when the unarchive link needs to contain an `onClick` event (such as displaying a flash message).",type:{name:"func"},required:!1},archiveMessage:{defaultValue:{value:"'archived'",computed:!1},required:!1},archivedOn:{description:"The date the record was archived.",type:{name:"string"},required:!0},archiveReason:{description:"The reason why the record was archived.",type:{name:"string"},required:!0},unarchiveUrl:{description:"The URL to unarchive the record.",type:{name:"string"},required:!1},type:{description:"The type of record.",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=ArchivePanel},"./src/client/components/Badge/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_visually_hidden__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/visually-hidden/dist/govuk-react-visually-hidden.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledBadge=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("span")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border: ",";\n border-radius: 4px;\n padding: 2px 4px;\n font-size: ",";\n white-space: nowrap;\n color: ",";\n"])),(function(_ref){var borderColour=_ref.borderColour;return"2px solid ".concat(borderColour)}),(function(props){return props.fontSize?props.fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.Kt.SIZE_14}),(function(props){return props.textColour?props.textColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.cK})),Badge=function Badge(_ref2){var label=_ref2.label,_ref2$borderColour=_ref2.borderColour,borderColour=void 0===_ref2$borderColour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.FU:_ref2$borderColour,_ref2$textColour=_ref2.textColour,textColour=void 0===_ref2$textColour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.cK:_ref2$textColour,_ref2$fontSize=_ref2.fontSize,fontSize=void 0===_ref2$fontSize?_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.Kt.SIZE_14:_ref2$fontSize,children=_ref2.children;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(StyledBadge,{"data-test":"badge",borderColour,textColour,fontSize,children:[label&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_govuk_react_visually_hidden__WEBPACK_IMPORTED_MODULE_4__.Z,{children:label}),children]})};Badge.displayName="Badge",Badge.propTypes={label:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,borderColour:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,textColour:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,fontSize:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node.isRequired},Badge.__docgenInfo={description:"A component to display the type of an element.",methods:[],displayName:"Badge",props:{borderColour:{defaultValue:{value:"GREY_2",computed:!0},description:"A custom colour for the border.",type:{name:"string"},required:!1},textColour:{defaultValue:{value:"TEXT_COLOUR",computed:!0},description:"A custom colour for the badge text.",type:{name:"string"},required:!1},fontSize:{defaultValue:{value:"FONT_SIZE.SIZE_14",computed:!0},description:"A custom size for the text of the badge.",type:{name:"string"},required:!1},label:{description:"",type:{name:"string"},required:!1},children:{description:"The text that will be displayed on the badge.",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Badge},"./src/client/components/ButtonLink/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/client/utils/colours.js");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_5__.ZP)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__.Z).attrs((function(props){return props}))(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n &,\n &:hover,\n &:focus {\n background: transparent;\n box-shadow: none;\n color: ",";\n cursor: pointer;\n text-decoration: underline;\n ","\n }\n"])),_client_utils_colours__WEBPACK_IMPORTED_MODULE_4__.su,(function(props){return props.inline&&"\n padding: 0;\n margin: 0 0 0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.N_.SCALE_1,";\n border: 0;\n width: auto;\n font: inherit;\n ")}))},"./src/client/components/Checkbox/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/index.js"),styled_components__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["onChange","name","initialChecked","value"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledGovCheckbox=(0,styled_components__WEBPACK_IMPORTED_MODULE_25__.ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_22__.XZ)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n"])),(function(props){return props.reduced&&"\n padding: 8px 0 8px 33px !important;\n min-height: auto;\n margin-bottom: 1px;\n\n input {\n width: 18px;\n height: 18px;\n }\n input + span {\n padding: 0;\n &:before {\n margin: 8px 0 0 8px;\n height: 18px;\n width: 18px;\n border-width: 1px;\n }\n &:after {\n border-width: 0 0 2px 2px;\n width: 10px;\n height: 5px;\n left: 11px;\n }\n }\n input + span + span {\n padding-left: 0;\n font-size: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.VN.S,"px;\n }\n ")})),Checkbox=function Checkbox(_ref){var _onChange=_ref.onChange,name=_ref.name,_ref$initialChecked=_ref.initialChecked,initialChecked=void 0!==_ref$initialChecked&&_ref$initialChecked,value=_ref.value,props=_objectWithoutProperties(_ref,_excluded),_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_21__.useState)(initialChecked),2),checked=_useState2[0],setChecked=_useState2[1];return(0,react__WEBPACK_IMPORTED_MODULE_21__.useEffect)((function(){return setChecked(initialChecked)}),[initialChecked]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_24__.jsx)(StyledGovCheckbox,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js");var react__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/index.js"),_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@govuk-react/multi-choice/dist/govuk-react-multi-choice.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_34__),styled_components__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/utils/colours.js"),_Checkbox__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Checkbox/index.jsx"),_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_excluded=["legend","name","hint","options","loadOptions","selectedOptions","onChange","id","groupId","maxScrollHeight"],_excluded2=["value","label"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var checkboxGroupElementStyles=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.iv)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n legend {\n font-size: ",";\n font-weight: ",";\n }\n label {\n font-weight: normal;\n margin-bottom: 4px;\n padding-left: 0;\n }\n li label {\n padding-left: 20px;\n }\n input {\n + span {\n padding: 10px 15px 5px;\n &::before {\n top: 8px;\n width: 24px;\n height: 24px;\n }\n &::after {\n top: 14px;\n left: 5px;\n width: 10px;\n height: 4.5px;\n border-width: 0 0 3px 3px;\n }\n }\n &:hover {\n + span {\n &::before {\n outline: 10px solid ",";\n }\n }\n }\n &:focus {\n + span {\n &::before {\n box-shadow: 0 0 0 4px ",";\n }\n }\n }\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Xw.bold,_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__.FU,_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__.$R),StyledFieldWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)(_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_31__.Z)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin-bottom: 14px;\n\n "," {\n margin-bottom: 14px;\n }\n\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.qk.TABLET,(function(_ref){var maxScrollHeight=_ref.maxScrollHeight;return maxScrollHeight?"\n fieldset > legend {\n font-size: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_16,";\n font-weight: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Xw.bold,";\n }\n fieldset > div {\n overflow-y: scroll;\n max-height: ").concat(maxScrollHeight,"px;\n padding-left: 10px;\n margin-left: -10px;\n /* Taken from Gov.uk, these rules allow us to retain a permanent scrollbar */\n &::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 7px;\n }\n &::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, 0.5);\n -webkit-box-shadow: 0 0 1px rgb(255 255 255 / 87%);\n }\n }\n ").concat(checkboxGroupElementStyles):checkboxGroupElementStyles})),SelectedCount=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("span")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ",";\n display: block;\n padding: "," 0;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_14,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.N_.SCALE_1),StyledList=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("ul")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n list-style: none;\n"]))),StyledCheckbox=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)(_Checkbox__WEBPACK_IMPORTED_MODULE_30__.Z)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n "," {\n font-size: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Kt.SIZE_16),CheckboxGroupField=function CheckboxGroupField(_ref2){var legend=_ref2.legend,name=_ref2.name,hint=_ref2.hint,_ref2$options=_ref2.options,initialOptions=void 0===_ref2$options?[]:_ref2$options,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?null:_ref2$loadOptions,_ref2$selectedOptions=_ref2.selectedOptions,selectedOptions=void 0===_ref2$selectedOptions?[]:_ref2$selectedOptions,_ref2$onChange=_ref2.onChange,onChange=void 0===_ref2$onChange?function(){return null}:_ref2$onChange,_ref2$groupId=(_ref2.id,_ref2.groupId),groupId=void 0===_ref2$groupId?"":_ref2$groupId,_ref2$maxScrollHeight=_ref2.maxScrollHeight,maxScrollHeight=void 0===_ref2$maxScrollHeight?0:_ref2$maxScrollHeight,props=_objectWithoutProperties(_ref2,_excluded),_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_26__.useState)(initialOptions),2),options=_useState2[0],setOptions=_useState2[1],_useState4=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_26__.useState)(null!==loadOptions),2),loading=_useState4[0],setLoading=_useState4[1];return(0,react__WEBPACK_IMPORTED_MODULE_26__.useEffect)((function(){null!==loadOptions&&loadOptions().then((function(options){setLoading(!1),setOptions(options)}))}),[options,loadOptions]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledFieldWrapper,_objectSpread(_objectSpread({maxScrollHeight,legend,name,hint,"data-test":"checkbox-group-field-".concat(name),groupId},props),{},{children:loading?"Loading...":(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.Fragment,{children:[maxScrollHeight>0&&selectedOptions.length>0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(SelectedCount,{children:"".concat(selectedOptions.length," selected")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_27__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledList,{children:options.map((function(option,i){var optionValue=option.value,optionLabel=option.label,optionProps=_objectWithoutProperties(option,_excluded2),checked=selectedOptions.map((function(_ref3){return _ref3.value})).includes(optionValue),otherOptions=_toConsumableArray(selectedOptions.filter((function(_ref4){return _ref4.value!==optionValue}))),getCheckboxId=function getCheckboxId(name){return"field-".concat(name,"-").concat(i+1)};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)("li",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledCheckbox,_objectSpread(_objectSpread({id:getCheckboxId(name),name,initialChecked:checked,value:optionValue,onChange:function handleChange(event){event.target.checked?onChange([].concat(_toConsumableArray(otherOptions),[option])):onChange(otherOptions)},"aria-label":optionLabel,"aria-labelledby":"".concat(getCheckboxId(name)," ").concat(groupId)},optionProps),{},{children:optionLabel}))},optionValue)}))})})]})}))};CheckboxGroupField.displayName="CheckboxGroupField",CheckboxGroupField.propTypes={legend:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,name:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,hint:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,options:prop_types__WEBPACK_IMPORTED_MODULE_34___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_34___default().shape({value:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string})).isRequired,loadOptions:prop_types__WEBPACK_IMPORTED_MODULE_34___default().func,selectedOptions:prop_types__WEBPACK_IMPORTED_MODULE_34___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_34___default().shape({value:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string})).isRequired,onChange:prop_types__WEBPACK_IMPORTED_MODULE_34___default().func,id:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,maxScrollHeight:prop_types__WEBPACK_IMPORTED_MODULE_34___default().number,groupId:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string},CheckboxGroupField.__docgenInfo={description:"Check box group field - shows a number of options as checkboxes\n\nLet users select one or more options by using the checkboxes component.\nIf you have a lot of options to display consider using the `visibleHeight`\nproperty to create a scrollable area. Selected option count will only show\nwhen you use the `visibleHeight` property.\n\nIf when a screenreader reads the label of the checkboxes in isolation it is not clear what they refer to, use the `groupId` prop to ensure the legend of the checkbox group is read after each checkbox label.",methods:[],displayName:"CheckboxGroupField",props:{options:{defaultValue:{value:"[]",computed:!1},description:"The available options as objects with label and value",type:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!1},label:{name:"string",required:!1}}}},required:!1},loadOptions:{defaultValue:{value:"null",computed:!1},description:"Function to load options",type:{name:"func"},required:!1},selectedOptions:{defaultValue:{value:"[]",computed:!1},description:"The options that have been selected",type:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!1},label:{name:"string",required:!1}}}},required:!1},onChange:{defaultValue:{value:"() => null",computed:!1},description:"Callback function that passes on the selected options",type:{name:"func"},required:!1},groupId:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},maxScrollHeight:{defaultValue:{value:"0",computed:!1},description:"Sets the visible area for the checkboxes before the overflow is set",type:{name:"number"},required:!1},legend:{description:"The legend label to display",type:{name:"string"},required:!1},name:{description:"The field name for the group",type:{name:"string"},required:!1},hint:{description:"The hint to display",type:{name:"string"},required:!1},id:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=CheckboxGroupField},"./src/client/components/Chip/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledButton=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("button")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: inline-table;\n padding: 12px;\n margin: 4px;\n background-color: ",";\n border-radius: ",";\n border: 1px solid ",";\n vertical-align: middle;\n cursor: pointer;\n span {\n pointer-events: none;\n display: table-cell;\n font-size: ",";\n }\n span:first-child {\n text-transform: ",";\n padding-right: ",";\n font-weight: ",";\n }\n"])),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.nx,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_1,_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.E5,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_16,(function(_ref){return _ref.onClick&&"uppercase"}),(function(_ref2){return _ref2.onClick&&"8px"}),(function(_ref3){return _ref3.onClick&&_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Xw.bold})),Chip=function Chip(_ref4){var children=_ref4.children,value=_ref4.value,_ref4$onClick=_ref4.onClick,onClick=void 0===_ref4$onClick?null:_ref4$onClick;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(StyledButton,{onClick,"data-value":value,"aria-label":"remove filter ".concat(children),children:[onClick&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span",{children:"✕"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("span",{children})]})};Chip.displayName="Chip",Chip.propTypes={children:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,onClick:prop_types__WEBPACK_IMPORTED_MODULE_8___default().func},Chip.__docgenInfo={description:"Chips are compact elements that represent an input, attribute, or action.\nA Chip could be used to display a list of selected filters in a collection list.",methods:[],displayName:"Chip",props:{onClick:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},children:{description:"",type:{name:"node"},required:!0},value:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Chip},"./src/client/components/CollectionList/CollectionHeader.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_27___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_27__),_govuk_react_button__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),pluralize__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/pluralize/pluralize.js"),pluralize__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(pluralize__WEBPACK_IMPORTED_MODULE_19__),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/CollectionList/CollectionHeaderRow.jsx"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/utils/colours.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/utils/number-utils.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_excluded=["totalItems","collectionName","addItemUrl","shouldPluralize"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledHeaderText=(0,styled_components__WEBPACK_IMPORTED_MODULE_26__.ZP)(_govuk_react_heading__WEBPACK_IMPORTED_MODULE_20__.H2)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n margin-top: 0;\n font-weight: normal;\n font-size: ","px;\n margin-bottom: 0;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.nR.MEDIUM),StyledLink=styled_components__WEBPACK_IMPORTED_MODULE_26__.ZP.a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin-bottom: 0;\n"]))),StyledResultCount=(0,styled_components__WEBPACK_IMPORTED_MODULE_26__.ZP)("span")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: 36px;\n font-weight: 600;\n line-height: 1;\n"])));function CollectionHeader(_ref){var totalItems=_ref.totalItems,_ref$collectionName=_ref.collectionName,collectionName=void 0===_ref$collectionName?"result":_ref$collectionName,addItemUrl=_ref.addItemUrl,_ref$shouldPluralize=_ref.shouldPluralize,shouldPluralize=void 0===_ref$shouldPluralize||_ref$shouldPluralize,rest=_objectWithoutProperties(_ref,_excluded),formattedTotal=(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_24__.gH)(totalItems),counterSuffix=shouldPluralize?pluralize__WEBPACK_IMPORTED_MODULE_19___default()(collectionName,totalItems):collectionName,actions=addItemUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsxs)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_18__.Z,{as:StyledLink,href:addItemUrl,buttonColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_23__.nx,buttonTextColour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_23__.E5,"data-test":"add-collection-item-button",children:["Add ",collectionName]});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsx)(_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({primary:!0,actions},rest),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsxs)(StyledHeaderText,{"data-test":"collection-header-name",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_25__.jsx)(StyledResultCount,{"data-test":"collection-count",children:formattedTotal})," ".concat(counterSuffix)]})}))}CollectionHeader.displayName="CollectionHeader",CollectionHeader.propTypes={totalItems:prop_types__WEBPACK_IMPORTED_MODULE_27___default().number.isRequired,collectionName:prop_types__WEBPACK_IMPORTED_MODULE_27___default().string.isRequired,addItemUrl:prop_types__WEBPACK_IMPORTED_MODULE_27___default().string},CollectionHeader.defaultProps={addItemUrl:null},CollectionHeader.__docgenInfo={description:"",methods:[],displayName:"CollectionHeader",props:{collectionName:{defaultValue:{value:"'result'",computed:!1},description:"",type:{name:"string"},required:!1},shouldPluralize:{defaultValue:{value:"true",computed:!1},required:!1},addItemUrl:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},totalItems:{description:"",type:{name:"number"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=CollectionHeader},"./src/client/components/CollectionList/CollectionHeaderRow.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_23__),styled_components__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_excluded=["primary","actions","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledRowWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_22__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex-flow: row wrap;\n align-items: center;\n font-size: ",";\n padding: "," 0;\n border-bottom: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_2,(function(_ref){return _ref.primary?"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_1," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.E5):"1px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.FU)})),StyledActions=(0,styled_components__WEBPACK_IMPORTED_MODULE_22__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n width: 100%;\n margin-top: ",";\n\n "," {\n margin-top: 0;\n margin-left: ",";\n display: flex;\n justify-content: flex-end;\n flex-basis: 0;\n flex-grow: 1;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_1),CollectionHeaderRow=function CollectionHeaderRow(_ref2){var primary=_ref2.primary,actions=_ref2.actions,children=_ref2.children,rest=_objectWithoutProperties(_ref2,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsxs)(StyledRowWrapper,_objectSpread(_objectSpread({primary},rest),{},{children:[children,actions&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__.jsx)(StyledActions,{children:actions})]}))};CollectionHeaderRow.displayName="CollectionHeaderRow",CollectionHeaderRow.propTypes={primary:prop_types__WEBPACK_IMPORTED_MODULE_23___default().bool,actions:prop_types__WEBPACK_IMPORTED_MODULE_23___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_23___default().node.isRequired},CollectionHeaderRow.defaultProps={primary:!1,actions:null},CollectionHeaderRow.__docgenInfo={description:"",methods:[],displayName:"CollectionHeaderRow",props:{primary:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=CollectionHeaderRow},"./src/client/components/CollectionList/CollectionItem.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,prop_types__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_13__),react_router_dom__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js"),styled_components__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_utils_colours__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/client/utils/colours.js"),_Badge___WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/client/components/Badge/index.jsx"),_components_Metadata___WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./src/client/components/Metadata/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ItemWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("li")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n border-bottom: 1px solid ",";\n padding: "," 0;\n"])),_utils_colours__WEBPACK_IMPORTED_MODULE_7__.FU,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_3),StyledBadgesWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin-bottom: ",";\n\n & > * {\n margin-right: ",";\n &:last-child {\n margin-right: 0;\n }\n }\n\n "," {\n float: right;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_1,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.qk.TABLET),StyledHeader=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)(_govuk_react_heading__WEBPACK_IMPORTED_MODULE_4__.H3)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-size: ","px;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.nR.SMALL),StyledLinkHeader=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)(StyledHeader)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n & > a:link,\n a:visited,\n a:hover,\n a:active {\n text-decoration: none;\n }\n"]))),StyledSubheading=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("h4")(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-size: 14px;\n line-height: 20px;\n color: ",";\n font-weight: normal;\n margin: -"," 0 "," 0;\n"])),_utils_colours__WEBPACK_IMPORTED_MODULE_7__.au,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_3,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.N_.SCALE_2),StyledButtonWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_11__.ZP)("div")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n margin-bottom: -30px;\n margin-right: 10px;\n\n "," {\n text-align: right;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.qk.TABLET),CollectionItem=function CollectionItem(_ref){var headingText=_ref.headingText,subheading=_ref.subheading,headingUrl=_ref.headingUrl,badges=_ref.badges,metadata=_ref.metadata,metadataRenderer=_ref.metadataRenderer,onClick=_ref.onClick,_ref$titleRenderer=_ref.titleRenderer,titleRenderer=void 0===_ref$titleRenderer?null:_ref$titleRenderer,_ref$useReactRouter=_ref.useReactRouter,useReactRouter=void 0!==_ref$useReactRouter&&_ref$useReactRouter,buttons=_ref.buttons;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsxs)(ItemWrapper,{"data-test":"collection-item",children:[badges&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledBadgesWrapper,{children:badges.map((function(badge){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_Badge___WEBPACK_IMPORTED_MODULE_8__.Z,{borderColour:badge.borderColour,children:badge.text},badge.text)}))}),titleRenderer?titleRenderer(headingText,headingUrl):headingUrl?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledLinkHeader,{children:useReactRouter?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_5__.Z,{as:react_router_dom__WEBPACK_IMPORTED_MODULE_12__.rU,to:headingUrl,onClick,children:headingText}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_5__.Z,{href:headingUrl,onClick,children:headingText})}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledHeader,{children:headingText}),subheading&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledSubheading,{children:subheading}),metadataRenderer?metadataRenderer(metadata):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(_components_Metadata___WEBPACK_IMPORTED_MODULE_9__.Z,{rows:metadata}),buttons&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__.jsx)(StyledButtonWrapper,{children:buttons})]})};CollectionItem.displayName="CollectionItem",CollectionItem.propTypes={headingUrl:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,headingText:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string.isRequired,subheading:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,badges:prop_types__WEBPACK_IMPORTED_MODULE_13___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_13___default().shape({text:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,borderColour:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string})),metadata:prop_types__WEBPACK_IMPORTED_MODULE_13___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_13___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_13___default().node.isRequired})),type:prop_types__WEBPACK_IMPORTED_MODULE_13___default().string,metadataRenderer:prop_types__WEBPACK_IMPORTED_MODULE_13___default().func,titleRenderer:prop_types__WEBPACK_IMPORTED_MODULE_13___default().func},CollectionItem.__docgenInfo={description:"",methods:[],displayName:"CollectionItem",props:{titleRenderer:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},headingUrl:{description:"",type:{name:"string"},required:!1},headingText:{description:"",type:{name:"string"},required:!0},subheading:{description:"",type:{name:"string"},required:!1},badges:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{text:{name:"string",required:!1},borderColour:{name:"string",required:!1}}}},required:!1},metadata:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"node",required:!0}}}},required:!1},type:{description:"",type:{name:"string"},required:!1},metadataRenderer:{description:"",type:{name:"func"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=CollectionItem},"./src/client/components/CollectionList/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var react__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),govuk_react__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_client_components_Task__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/components/Task/index.jsx"),_components__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/components/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{P3:()=>ALPHABETICAL,SZ:()=>LEAST_RECENT,u8:()=>RECENT,ZP:()=>CompanyLists_Filters});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_input_esm=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),govuk_react_select_esm=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js"),govuk_react_grid_row_esm=__webpack_require__("./node_modules/@govuk-react/grid-row/dist/govuk-react-grid-row.esm.js"),govuk_react_grid_col_esm=__webpack_require__("./node_modules/@govuk-react/grid-col/dist/govuk-react-grid-col.esm.js"),es=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/react-redux/es/index.js")),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),prop_types=(__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/prop-types/index.js")),prop_types_default=__webpack_require__.n(prop_types),govuk_react_label_esm=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),govuk_react_label_text_esm=__webpack_require__("./node_modules/@govuk-react/label-text/dist/govuk-react-label-text.esm.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var StyledLabel=(0,styled_components_browser_esm.ZP)(govuk_react_label_esm.Z)((function(_ref){var theme=_ref.theme,justifyRight=_ref.justifyRight;return _defineProperty({display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"wrap"},(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET,{flexWrap:"nowrap",justifyContent:justifyRight&&"flex-end"})})),StyledLabelText=(0,styled_components_browser_esm.ZP)(govuk_react_label_text_esm.Z)((function(_ref3){var theme=_ref3.theme;return _defineProperty({width:"100%"},(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET,{marginRight:govuk_react_constants_esm.N_.SCALE_2,width:"auto"})})),InlineLabel=function InlineLabel(_ref5){var text=_ref5.text,children=_ref5.children,justifyRight=_ref5.justifyRight,name=_ref5.name;return(0,jsx_runtime.jsxs)(StyledLabel,{justifyRight,htmlFor:name,children:[(0,jsx_runtime.jsx)(StyledLabelText,{children:text}),children]})};InlineLabel.displayName="InlineLabel",InlineLabel.propTypes={text:prop_types_default().string.isRequired,children:prop_types_default().node,justifyRight:prop_types_default().bool},InlineLabel.defaultProps={justifyRight:!1},InlineLabel.__docgenInfo={description:"",methods:[],displayName:"InlineLabel",props:{justifyRight:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},text:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"node"},required:!1}}};const components_InlineLabel=InlineLabel;var actions=__webpack_require__("./src/client/actions.js"),state=__webpack_require__("./src/client/components/CompanyLists/state.js");function Filters_typeof(o){return Filters_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Filters_typeof(o)}function Filters_defineProperty(obj,key,value){return(key=function Filters_toPropertyKey(arg){var key=function Filters_toPrimitive(input,hint){if("object"!==Filters_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==Filters_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===Filters_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var ALPHABETICAL="alphabetical",RECENT="recent",LEAST_RECENT="least-recent",getMediaQuery=function getMediaQuery(theme){return(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET},StyledRoot=(0,styled_components_browser_esm.ZP)(govuk_react_grid_row_esm.Z)((function(_ref){var theme=_ref.theme;return Filters_defineProperty({background:colours.zT,padding:"".concat(govuk_react_constants_esm.N_.SCALE_2," ").concat(govuk_react_constants_esm.N_.SCALE_3),flexWrap:"wrap"},getMediaQuery(theme),{flexWrap:"nowrap"})})),StyledCol=(0,styled_components_browser_esm.ZP)(govuk_react_grid_col_esm.Z)((function(_ref3){var theme=_ref3.theme;return{paddingLeft:0,paddingRight:0,"&:not(:first-child)":Filters_defineProperty({paddingTop:govuk_react_constants_esm.N_.SCALE_2},getMediaQuery(theme),{paddingTop:0,marginLeft:govuk_react_constants_esm.N_.SCALE_2})}})),StyledInput=(0,styled_components_browser_esm.ZP)(govuk_react_input_esm.Z)(Filters_defineProperty({width:"100%"},govuk_react_constants_esm.qk.LARGESCREEN,{width:200})),StyledSelect=(0,styled_components_browser_esm.ZP)(govuk_react_select_esm.lq)(Filters_defineProperty({width:"100%"},govuk_react_constants_esm.qk.LARGESCREEN,{width:"auto"})),Filters=function Filters(_ref4){var query=_ref4.query,orderBy=_ref4.orderBy,onSearch=_ref4.onSearch,onOrderChange=_ref4.onOrderChange,_ref4$companyNameId=_ref4.companyNameId,companyNameId=void 0===_ref4$companyNameId?"company-name":_ref4$companyNameId,_ref4$sortById=_ref4.sortById,sortById=void 0===_ref4$sortById?"sort-by":_ref4$sortById;return(0,jsx_runtime.jsxs)(StyledRoot,{children:[(0,jsx_runtime.jsx)(StyledCol,{children:(0,jsx_runtime.jsx)(components_InlineLabel,{text:"Search this list",name:companyNameId,children:(0,jsx_runtime.jsx)(StyledInput,{value:query||"",placeholder:"Company name",id:companyNameId,onChange:function onChange(e){return onSearch(e.target.value)}})})}),(0,jsx_runtime.jsx)(StyledCol,{children:(0,jsx_runtime.jsx)(components_InlineLabel,{text:"Sort by",justifyRight:!0,name:sortById,children:(0,jsx_runtime.jsxs)(StyledSelect,{value:orderBy,id:sortById,onChange:function onChange(e){return onOrderChange(e.target.value)},children:[(0,jsx_runtime.jsx)("option",{value:RECENT,"aria-label":"recent interaction",children:"Recent interaction"}),(0,jsx_runtime.jsx)("option",{value:LEAST_RECENT,"aria-label":"least recent interaction",children:"Least recent interaction"}),(0,jsx_runtime.jsx)("option",{value:ALPHABETICAL,"aria-label":"company name a to z",children:"Company name A-Z"})]})})})]})};Filters.displayName="Filters",Filters.__docgenInfo={description:"",methods:[],displayName:"Filters",props:{companyNameId:{defaultValue:{value:"'company-name'",computed:!1},required:!1},sortById:{defaultValue:{value:"'sort-by'",computed:!1},required:!1}}};const CompanyLists_Filters=(0,es.connect)(state.H,(function(dispatch){return{onSearch:function onSearch(query){return dispatch({type:actions.sb0,query})},onOrderChange:function onOrderChange(orderBy){return dispatch({type:actions.k$I,orderBy})}}}))(Filters)},"./src/client/components/CompanyLists/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID});var ID="companyLists",state2props=function state2props(state){return state[ID]}},"./src/client/components/CompanyLocalHeader/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID,d:()=>TASK_GET_LISTS_COMPANY_IS_IN});var TASK_GET_LISTS_COMPANY_IS_IN="TASK_GET_LISTS_COMPANY_IS_IN",ID="companyListsCompanyIn",state2props=function state2props(state){return state[ID]}},"./src/client/components/ContactInformation/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,govuk_react__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_lib_urls__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/lib/urls.js"),_lib_urls__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_lib_urls__WEBPACK_IMPORTED_MODULE_7__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledDetails=(0,styled_components__WEBPACK_IMPORTED_MODULE_9__.ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.PO)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-top: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_6__.TF[1]),ContactInformation=function ContactInformation(_ref){var onOpenContactForm=_ref.onOpenContactForm,companyId=_ref.companyId,redirectUrl=_lib_urls__WEBPACK_IMPORTED_MODULE_7___default().contacts.create(companyId,{origin_url:window.location.pathname,origin_search:btoa(window.location.search)});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment,{children:["If your contact is not listed"," ",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.rU,{"data-test":"add-a-new-contact-link",onClick:function onClick(e){e.preventDefault(),onOpenContactForm({event:e,redirectUrl})},href:redirectUrl,children:"add a new contact"}),". You will leave this page to enter details, once added you will return here. The information you added will have been saved.",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(StyledDetails,{summary:"Information needed to add a new contact","data-test":"contact-information-details",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.nv,{children:"You need:"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.QI,{listStyleType:"bullet",children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"full name"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"job title"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"email address"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"phone number"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_5__.HC,{children:"work address if different to the company address"})]})]})]})};ContactInformation.__docgenInfo={description:"",methods:[],displayName:"ContactInformation"};const __WEBPACK_DEFAULT_EXPORT__=ContactInformation},"./src/client/components/ContentWithHeading.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var prop_types__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__),govuk_react__WEBPACK_IMPORTED_MODULE_1__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js")),styled_components__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_SpacedSectionBreak__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/components/SpacedSectionBreak.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js"),StyledHeading=(0,styled_components__WEBPACK_IMPORTED_MODULE_4__.ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_1__.H3)({flexGrow:1}),StyledHeader=styled_components__WEBPACK_IMPORTED_MODULE_4__.ZP.div({display:"flex",alignItems:"baseline"}),ContentWithHeading=function ContentWithHeading(_ref){var heading=_ref.heading,children=_ref.children,headingActions=_ref.headingActions;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section",{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(StyledHeader,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(StyledHeading,{size:24,children:heading}),headingActions]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_SpacedSectionBreak__WEBPACK_IMPORTED_MODULE_2__.Z,{}),children]})};ContentWithHeading.displayName="ContentWithHeading",ContentWithHeading.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_5___default().node,headingComponent:prop_types__WEBPACK_IMPORTED_MODULE_5___default().func},ContentWithHeading.__docgenInfo={description:"",methods:[],displayName:"ContentWithHeading",props:{heading:{description:"",type:{name:"node"},required:!1},children:{description:"",type:{name:"node"},required:!1},headingComponent:{description:"",type:{name:"func"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=ContentWithHeading},"./src/client/components/DataHubHeader/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_DataHubHeader});__webpack_require__("./node_modules/react/index.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_esm=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),react_router_dom=(__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js")),govuk_react_visually_hidden_esm=__webpack_require__("./node_modules/@govuk-react/visually-hidden/dist/govuk-react-visually-hidden.esm.js"),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),state=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./src/client/components/NotificationAlert/state.js")),actions=__webpack_require__("./src/client/actions.js");const bell_icon_namespaceObject=__webpack_require__.p+"static/media/bell-icon.0c3d8d60.svg";var _templateObject,Task=__webpack_require__("./src/client/components/Task/index.jsx"),NotificationBadge=__webpack_require__("./src/client/components/NotificationBadge/index.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledNotificationAlertNavLink=(0,styled_components_browser_esm.ZP)(react_router_dom.OL)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: flex;\n min-width: 42px;\n outline: none;\n text-decoration: none;\n"]))),StyledShape=(0,styled_components_browser_esm.ZP)(NotificationBadge.bn)({position:"relative",top:-2,left:-7}),StyledImage=(0,styled_components_browser_esm.ZP)("img")({width:22,height:22}),NotificationAlert=function NotificationAlert(_ref){var count=_ref.count,remindersURL=_ref.remindersURL;return(0,jsx_runtime.jsxs)(StyledNotificationAlertNavLink,{as:"a",href:remindersURL,id:"notification-bell-count",children:[(0,jsx_runtime.jsx)(StyledImage,{src:bell_icon_namespaceObject,alt:"An image of a bell with the notification count overlaid"}),(0,jsx_runtime.jsx)(Task.Z.Status,{name:state.H,id:state.ID,renderProgress:function renderProgress(){return null},startOnRender:{onSuccessDispatch:actions.SqW},children:function children(){return count>0?(0,jsx_runtime.jsx)(StyledShape,{size:NotificationBadge.$u.SMALL,digits:count.toString().length,"aria-label":"notification-alert-badge","data-test":"notification-alert-badge",children:(0,jsx_runtime.jsx)(NotificationBadge.XF,{children:count<100?count:"99+"})}):null}})]})};NotificationAlert.displayName="NotificationAlert",NotificationAlert.propTypes={count:prop_types_default().number.isRequired,remindersURL:prop_types_default().string.isRequired},NotificationAlert.__docgenInfo={description:"",methods:[],displayName:"NotificationAlert",props:{count:{description:"",type:{name:"number"},required:!0},remindersURL:{description:"",type:{name:"string"},required:!0}}};const components_NotificationAlert=(0,es.connect)(state.a)(NotificationAlert);var urls=__webpack_require__("./src/lib/urls.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function NavBar_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function NavBar_objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_24__),_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["onChange","name","label","legend","hint","initialValue","type"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var DateField=function DateField(_ref){var _ref$onChange=_ref.onChange,_onChange=void 0===_ref$onChange?function(){}:_ref$onChange,name=_ref.name,label=_ref.label,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,_ref$type=_ref.type,type=void 0===_ref$type?"date":_ref$type,props=_objectWithoutProperties(_ref,_excluded),_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_20__.useState)(initialValue),2),value=_useState2[0],setValue=_useState2[1];return(0,react__WEBPACK_IMPORTED_MODULE_20__.useEffect)((function(){return setValue(initialValue)}),[initialValue]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_Form_elements_FieldWrapper__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({name,label,legend,hint},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__.Z,{id:"field-".concat(name,"-1"),"data-test":"field-".concat(name),name,value,max:"9999-12-31","aria-label":label,type,onChange:function onChange(e){setValue(e.target.value),_onChange(e)}},name)}))};DateField.displayName="DateField",DateField.propTypes={onChange:prop_types__WEBPACK_IMPORTED_MODULE_24___default().func,name:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string},DateField.__docgenInfo={description:"A Date Input Field\n\nChanging the initialValue prop overrides the user's input value - this\nmeans that the input value will stay synchronised when changing the route.",methods:[],displayName:"DateField",props:{onChange:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},type:{defaultValue:{value:"'date'",computed:!1},required:!1},name:{description:"",type:{name:"string"},required:!0},label:{description:"",type:{name:"node"},required:!1},legend:{description:"",type:{name:"node"},required:!1},hint:{description:"",type:{name:"string"},required:!1},initialValue:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=DateField},"./src/client/components/DownloadDataHeader/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_25__),styled_components__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/number-utils.js"),_CollectionList_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/CollectionList/CollectionHeaderRow.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["downloadLink","count","maxItems","entityName","entityNamePlural"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledLink=(0,styled_components__WEBPACK_IMPORTED_MODULE_24__.ZP)("a")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: 0;\n ",": {\n margin-left: ","px;\n },\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_20__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_20__.TF[2]),DownloadDataHeader=function DownloadDataHeader(_ref){var downloadLink=_ref.downloadLink,_ref$count=_ref.count,count=void 0===_ref$count?0:_ref$count,_ref$maxItems=_ref.maxItems,maxItems=void 0===_ref$maxItems?5e3:_ref$maxItems,_ref$entityName=_ref.entityName,entityName=void 0===_ref$entityName?"":_ref$entityName,_ref$entityNamePlural=_ref.entityNamePlural,entityNamePlural=void 0===_ref$entityNamePlural?"".concat(entityName,"s"):_ref$entityNamePlural,props=_objectWithoutProperties(_ref,_excluded);if(!count||!downloadLink)return null;if(count>=maxItems)return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(_CollectionList_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({},props),{},{children:["Filter to fewer than ",(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_21__.gH)(maxItems)," ",entityNamePlural," to download"]}));var downloadAction=(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(govuk_react__WEBPACK_IMPORTED_MODULE_19__.zx,{as:StyledLink,href:downloadLink,download:!0,children:"Download"},"download");return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(_CollectionList_CollectionHeaderRow__WEBPACK_IMPORTED_MODULE_22__.Z,_objectSpread(_objectSpread({actions:[downloadAction]},props),{},{children:["You can now download"," ",1===count?"this ".concat(entityName):"these ".concat(count," ").concat(entityNamePlural)]}))};DownloadDataHeader.displayName="DownloadDataHeader",DownloadDataHeader.propTypes={downloadLink:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string,count:prop_types__WEBPACK_IMPORTED_MODULE_25___default().number,maxItems:prop_types__WEBPACK_IMPORTED_MODULE_25___default().number,entityName:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string,entityNamePlural:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string},DownloadDataHeader.__docgenInfo={description:"",methods:[],displayName:"DownloadDataHeader",props:{count:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"number"},required:!1},maxItems:{defaultValue:{value:"5000",computed:!1},description:"",type:{name:"number"},required:!1},entityName:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},entityNamePlural:{defaultValue:{value:"`${entityName}s`",computed:!1},description:"",type:{name:"string"},required:!1},downloadLink:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=DownloadDataHeader},"./src/client/components/DropdownMenu/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{P:()=>DropdownButton,Z:()=>components_DropdownMenu});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js");var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx");const icon_triangle_namespaceObject=__webpack_require__.p+"static/media/icon-triangle.5685b354.svg";var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var DropdownMenuContainer=styled_components_browser_esm.ZP.div(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n position: relative;\n"]))),DropdownButtonContainer=styled_components_browser_esm.ZP.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n"]))),DropdownMenuGroup=styled_components_browser_esm.ZP.div(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: ",";\n background-color: ",";\n ","\n ","\n "," {\n position: absolute;\n right: 0;\n z-index: 1;\n margin-bottom: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,colours.FU,govuk_react_lib_esm.W0.responsive({size:5,property:"margin-bottom"}),govuk_react_lib_esm.W0.responsive({size:-5,property:"margin-top"}),govuk_react_constants_esm.qk.TABLET),Icon=styled_components_browser_esm.ZP.img(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n transform: ",";\n margin-left: ",";\n transition: transform 300ms ease;\n transform-origin: center;\n"])),(function(_ref){return _ref.active?"rotate(0deg)":"rotate(-90deg)"}),govuk_react_constants_esm.N_.SCALE_3),DropdownToggleButton=(0,styled_components_browser_esm.ZP)(SecondaryButton.Z)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-weight: Bold;\n"]))),DropdownButton=(0,styled_components_browser_esm.ZP)(SecondaryButton.Z).attrs((function(){return{tabIndex:0,forwardedAs:govuk_react_link_esm.Z}}))(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n ","\n &:last-child {\n margin-bottom: 0;\n }\n"])),govuk_react_lib_esm.W0.responsive({size:3,property:"margin-bottom"})),DropdownMenu=function DropdownMenu(_ref2){var label=_ref2.label,children=_ref2.children,closedLabel=_ref2.closedLabel,_onClick=_ref2.onClick,open=_ref2.open,activeIndex=_ref2.activeIndex,onUpdateIndex=_ref2.onUpdateIndex,closeMenu=_ref2.closeMenu,dataTest=_ref2.dataTest,buttonRef=react.useRef(null),childrenGroupRef=react.useRef(null),containerRef=react.useRef(null);return react.useEffect((function(){!isNaN(activeIndex)&&childrenGroupRef.current&&childrenGroupRef.current.children[activeIndex].focus()}),[activeIndex]),react.useEffect((function(){var clickOutside=function clickOutside(_ref4){var target=_ref4.target;containerRef.current.contains(target)||closeMenu()};document.addEventListener("mousedown",clickOutside),document.addEventListener("keyup",clickOutside)}),[]),(0,jsx_runtime.jsxs)(DropdownMenuContainer,{ref:containerRef,onKeyUp:function onKeyUp(_ref3){switch(_ref3.keyCode){case 38:onUpdateIndex(Math.max(0,(null!=activeIndex?activeIndex:0)-1));break;case 40:onUpdateIndex(Math.min((null!=activeIndex?activeIndex:-1)+1,children.length-1));break;case 36:onUpdateIndex(0);break;case 35:onUpdateIndex(children.length-1)}},onKeyDown:function onKeyDown(event){switch(event.keyCode){case 27:closeMenu(),buttonRef.current&&buttonRef.current.focus();break;case 36:case 35:case 38:case 40:open&&event.preventDefault()}},"data-test":dataTest,children:[(0,jsx_runtime.jsx)(DropdownButtonContainer,{children:(0,jsx_runtime.jsx)(DropdownToggleButton,{ref:buttonRef,buttonShadowColour:"transparent",onClick:function onClick(){return _onClick(!open)},icon:(0,jsx_runtime.jsx)(Icon,{src:icon_triangle_namespaceObject,active:open,alt:""}),"aria-haspopup":!0,"aria-expanded":open,"aria-controls":"dropDownOptionsMenu",children:(open?closedLabel:label)||label})}),open&&(0,jsx_runtime.jsx)(DropdownMenuGroup,{id:"dropDownOptionsMenu",ref:childrenGroupRef,children})]})};DropdownMenu.displayName="DropdownMenu",DropdownMenu.propTypes={onUpdateIndex:prop_types_default().func.isRequired,closeMenu:prop_types_default().func.isRequired,activeIndex:prop_types_default().number,label:prop_types_default().string.isRequired,closedLabel:prop_types_default().string,children:prop_types_default().node,onClick:prop_types_default().func.isRequired,open:prop_types_default().bool},DropdownMenu.__docgenInfo={description:'DropdownMenu displays contextual overlays for menus.\n\nIn Desktop view the menu will "float" over the content in mobile view the menu is in flow and will push the content down.\n\nDropdownButton extends styles of Button for usage please visit the button docs [here](https://govuk-react.github.io/govuk-react/?path=/story/form-buttons--component-default).\n\n### Usage\n\n```jsx\n\n \n Add to or remove from list\n \n \n Add to pipeline\n \n\n```',methods:[],displayName:"DropdownMenu",props:{onUpdateIndex:{description:"",type:{name:"func"},required:!0},closeMenu:{description:"",type:{name:"func"},required:!0},activeIndex:{description:"",type:{name:"number"},required:!1},label:{description:"Text for the button",type:{name:"string"},required:!0},closedLabel:{description:"Close text for button",type:{name:"string"},required:!1},children:{description:"Buttons for dropdown group",type:{name:"node"},required:!1},onClick:{description:"Signature: function(nextOpenState: boolean) => void",type:{name:"func"},required:!0},open:{description:"Set the open and close state of the dropdown",type:{name:"bool"},required:!1}}};const components_DropdownMenu=DropdownMenu},"./src/client/components/Effect.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js");const __WEBPACK_DEFAULT_EXPORT__=function Effect(_ref){var dependencyList=_ref.dependencyList,effect=_ref.effect;return(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){return effect()}),null==dependencyList?void 0:dependencyList.map(JSON.stringify)),null}},"./src/client/components/EntityList/EntityListItem.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,prop_types__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__),lodash__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/lodash/lodash.js"),styled_components__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_inset_text__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@govuk-react/inset-text/dist/govuk-react-inset-text.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./src/client/utils/colours.js"),_components_Metadata___WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./src/client/components/Metadata/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledEntity=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n margin-bottom: ",";\n padding: ",";\n border: 1px solid ",";\n ",";\n\n &[role='button'] {\n cursor: pointer;\n\n h3 {\n color: ",";\n }\n\n &:hover {\n border: 1px solid ",";\n background-color: ",";\n\n & > h3 {\n color: ",";\n }\n }\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.FU,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.jw,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.su,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.oh,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.zT,_client_utils_colours__WEBPACK_IMPORTED_MODULE_7__.oh),StyledHeading=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(_govuk_react_heading__WEBPACK_IMPORTED_MODULE_5__.H3)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n font-size: ",";\n margin: 0 0 ",";\n "," {\n font-size: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_19),StyledInsetText=(0,styled_components__WEBPACK_IMPORTED_MODULE_10__.ZP)(_govuk_react_inset_text__WEBPACK_IMPORTED_MODULE_6__.Z)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n & {\n margin-top: ",";\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_2),EntityListItem=function EntityListItem(_ref){var id=_ref.id,onEntityClick=_ref.onEntityClick,data=_ref.data,text=_ref.text,heading=_ref.heading,meta=_ref.meta,isClickable=!!onEntityClick;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(StyledEntity,{tabIndex:isClickable&&0,role:isClickable&&"button",onClick:function onClick(){return isClickable&&onEntityClick(data)},onKeyDown:function onKeyDown(e){return isClickable&&13===e.keyCode&&onEntityClick(data)},children:[heading&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledHeading,{children:heading}),!(0,lodash__WEBPACK_IMPORTED_MODULE_3__.isEmpty)(meta)&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Metadata___WEBPACK_IMPORTED_MODULE_8__.Z,{rows:meta}),text&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(StyledInsetText,{children:text})]},"entity_".concat(id))};EntityListItem.displayName="EntityListItem",EntityListItem.propTypes={id:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string.isRequired,onEntityClick:prop_types__WEBPACK_IMPORTED_MODULE_11___default().func,data:prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({}),text:prop_types__WEBPACK_IMPORTED_MODULE_11___default().node,heading:prop_types__WEBPACK_IMPORTED_MODULE_11___default().string,meta:prop_types__WEBPACK_IMPORTED_MODULE_11___default().array},EntityListItem.defaultProps={text:null,onEntityClick:null,data:{},heading:null,meta:[]},EntityListItem.__docgenInfo={description:"",methods:[],displayName:"EntityListItem",props:{text:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},onEntityClick:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},data:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{}},required:!1},heading:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},meta:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},id:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=EntityListItem},"./src/client/components/EntityList/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,prop_types__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_23__),styled_components__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_EntityListItem__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/components/EntityList/EntityListItem.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var lodash__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/lodash/lodash.js"),axios__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/axios/index.js"),axios__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_20__),_utils_addresses__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/addresses.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function getTradingNames(dnb_company){return(0,lodash__WEBPACK_IMPORTED_MODULE_19__.isEmpty)(dnb_company.trading_names)?null:{label:"Trading name(s)",value:dnb_company.trading_names.join(", ")}}function getAddress(dnb_company,features){return{label:"Location at",value:(0,_utils_addresses__WEBPACK_IMPORTED_MODULE_21__.getCompanyAddress)(dnb_company,features)}}const __WEBPACK_DEFAULT_EXPORT__=function useDnbSearch(apiEndpoint,features){function transformCompanyRecord(record){var dnb_company=record.dnb_company;return{id:dnb_company.duns_number,heading:dnb_company.primary_name,meta:(0,lodash__WEBPACK_IMPORTED_MODULE_19__.compact)([getTradingNames(dnb_company),getAddress(dnb_company,features)]),data:record}}function _findCompany(){return _findCompany=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(filters){var _yield$axios$post,data;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,axios__WEBPACK_IMPORTED_MODULE_20___default().post(apiEndpoint,filters);case 2:return _yield$axios$post=_context.sent,data=_yield$axios$post.data,_context.abrupt("return",data.results.map(transformCompanyRecord));case 5:case"end":return _context.stop()}}),_callee)}))),_findCompany.apply(this,arguments)}return{findCompany:function findCompany(_x){return _findCompany.apply(this,arguments)},transformCompanyRecord}}},"./src/client/components/ErrorSummary/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var _styled,react__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_heading__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),_govuk_react_paragraph__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/paragraph/dist/govuk-react-paragraph.esm.js"),_govuk_react_unordered_list__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/unordered-list/dist/govuk-react-unordered-list.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_govuk_react_list_item__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/list-item/dist/govuk-react-list-item.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/colours.js"),_styles__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/styles.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["heading","description","errors"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r0&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_unordered_list__WEBPACK_IMPORTED_MODULE_20__.Z,{mb:0,listStyleType:"none",children:errors.map((function(_ref2){var targetName=_ref2.targetName,text=_ref2.text;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_list_item__WEBPACK_IMPORTED_MODULE_22__.Z,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledErrorText,{href:"#field-".concat(targetName),children:text})},targetName)}))})]}))}));ErrorSummary.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,description:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,errors:prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().shape({targetName:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,text:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired}).isRequired)},ErrorSummary.__docgenInfo={description:"When a user makes an error, you must show both an error summary and an error message next to each answer that contains an error. More information can be found on the [GDS Design system](https://design-system.service.gov.uk/components/error-summary/)\n\nUse this component at the top of a page to summarise any errors a user has made.",methods:[],displayName:"ErrorSummary",props:{heading:{defaultValue:{value:"'There is a problem'",computed:!1},description:"Text for the heading",type:{name:"string"},required:!1},description:{defaultValue:{value:"null",computed:!1},description:"Text for description",type:{name:"string"},required:!1},errors:{description:"The list of error descriptions and their target id's",type:{name:"arrayOf",value:{name:"shape",value:{targetName:{name:"string",required:!0},text:{name:"string",required:!0}}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=ErrorSummary},"./src/client/components/FilterLabel.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.string.bold.js");var styled_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/utils/colours.js");const __WEBPACK_DEFAULT_EXPORT__=styled_components__WEBPACK_IMPORTED_MODULE_3__.ZP.label({"-webkit-font-smoothing":"antialiased",fontWeight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.Xw.bold,fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.Kt.SIZE_16,display:"block",color:_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__.E5})},"./src/client/components/Footer/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Footer});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js");const govuk_crest_2x_namespaceObject=__webpack_require__.p+"static/media/govuk-crest-2x.05968778.png";var _templateObject,_templateObject2,_templateObject3,_templateObject4,urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),Main=__webpack_require__("./src/client/components/Main/index.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledFooter=(0,styled_components_browser_esm.ZP)("footer")({clear:"both",borderTop:"1px solid ".concat(colours.gr),background:"".concat(colours.Ll),color:"".concat(colours.ZR)},govuk_react_lib_esm.cp.font({size:16}),govuk_react_lib_esm.W0.withWhiteSpace({padding:[{size:7,direction:"top"},{size:5,direction:"bottom"}]})),StyleList=styled_components_browser_esm.ZP.ul(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n flex-direction: row;\n li + li {\n margin-left: ",";\n }\n margin-bottom: ",";\n\n @media (max-width: ",") {\n margin-bottom: -",";\n margin-right: ",";\n flex-direction: column;\n flex-wrap: wrap;\n\n li + li {\n margin-left: 0;\n }\n\n li {\n margin-left: 0;\n margin-bottom: ",";\n }\n\n li:last-child {\n margin-bottom: ",";\n }\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,"340px",govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_5,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_5),FooterLink=styled_components_browser_esm.ZP.a(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n &:active,\n &:focus,\n &:visited,\n &:hover {\n color: ",";\n outline: 3px solid transparent;\n }\n &:focus {\n background-color: ",";\n box-shadow:\n 0 -2px ",",\n 0 4px ",";\n text-decoration: none;\n }\n"])),colours.E5,colours.E5,colours.tL,colours.tL,colours.E5),CopyrightLink=(0,styled_components_browser_esm.ZP)(FooterLink)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: inline-block;\n min-width: 125px;\n padding-top: 112px;\n background-image: url(",");\n background-repeat: no-repeat;\n background-position: 50% 0%;\n background-size: 125px 102px;\n text-align: center;\n text-decoration: none;\n white-space: nowrap;\n margin-bottom: ",";\n @media (max-width: ",") {\n margin-bottom: ",";\n }\n"])),govuk_crest_2x_namespaceObject,govuk_react_constants_esm.N_.SCALE_3,"340px",govuk_react_constants_esm.N_.SCALE_5),Container=(0,styled_components_browser_esm.ZP)(Main.W)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: flex-end;\n flex-wrap: wrap;\n"])));function Footer(){return(0,jsx_runtime.jsx)(StyledFooter,{children:(0,jsx_runtime.jsxs)(Container,{children:[(0,jsx_runtime.jsxs)(StyleList,{children:[(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().support(),target:"_blank",rel:"noopener noreferrer","aria-label":"Request Support (opens in new tab)",children:"Request Support"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.dhHomepage(),target:"_blank",rel:"noopener noreferrer","aria-label":"Help Centre (opens in new tab)",children:"Help Centre"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.privacyNotice(),target:"_blank",rel:"noopener noreferrer","aria-label":"Privacy Notice (opens in new tab)",children:"Privacy Notice"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.cookies(),target:"_blank",rel:"noopener noreferrer","aria-label":"Cookies (opens in new tab)",children:"Cookies"})}),(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(FooterLink,{href:urls_default().external.helpCentre.accessibilityStatement(),target:"_blank",rel:"noopener noreferrer","aria-label":"Accessibility Statement (opens in new tab)",children:"Accessibility Statement"})})]}),(0,jsx_runtime.jsx)(CopyrightLink,{href:urls_default().external.copyright,target:"_blank",rel:"noopener noreferrer","aria-label":"Crown copyright (opens in new tab)",children:"© Crown copyright"})]})})}Footer.displayName="Footer",Footer.__docgenInfo={description:"The Footer displayed in all pages across the Data Hub site.",methods:[],displayName:"Footer"}},"./src/client/components/Form/elements/FieldAddAnother/FieldAddAnother.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>FieldAddAnother_FieldAddAnother});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),number_utils=__webpack_require__("./src/client/utils/number-utils.js"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),FieldWrapper=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),actions=__webpack_require__("./src/client/actions.js");__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&(0,jsx_runtime.jsx)(StyledLink,{children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:"#","aria-label":"Remove ".concat((0,number_utils.Jw)(index)," ").concat(itemName),onClick:function onClick(event){event.preventDefault(),remove(item.fieldGroupId)},children:"Remove"})})]},item.fieldGroupId)})),childCount0&&void 0!==arguments[0]?arguments[0]:{fieldGroupIds:[]},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,fieldGroupId=_ref.fieldGroupId,initialChildGroupCount=_ref.initialChildGroupCount;switch(type){case actions.cdq:return _objectSpread(_objectSpread({},state),{},{childCount:initialChildGroupCount,fieldGroupIds:_toConsumableArray(Array(initialChildGroupCount)).map((function(value,index){return{fieldGroupId:index}}))});case actions.s_5:var maximumFieldIdValue=state.fieldGroupIds.map((function(item){return item.fieldGroupId})).reduce((function(previous,current){return current>previous?current:previous}),0);return _objectSpread(_objectSpread({},state),{},{childCount:state.childCount+1,fieldGroupIds:[].concat(_toConsumableArray(state.fieldGroupIds),[{fieldGroupId:maximumFieldIdValue+1}])});case actions.x7:return _objectSpread(_objectSpread({},state),{},{childCount:state.childCount-1,fieldGroupIds:state.fieldGroupIds.filter((function(item){return item.fieldGroupId!==fieldGroupId}))});default:return state}}})},"./src/client/components/Form/elements/FieldAddAnother/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var _FieldAddAnother__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/Form/elements/FieldAddAnother/FieldAddAnother.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["id","name"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FieldAddAnother=function FieldAddAnother(_ref){var id=_ref.id,name=_ref.name,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_FieldAddAnother__WEBPACK_IMPORTED_MODULE_17__.Z,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_33__),_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@govuk-react/multi-choice/dist/govuk-react-multi-choice.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_Checkbox__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./src/client/components/Checkbox/index.jsx"),_hooks_useField__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./src/client/components/Form/hooks/useField.js"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_hooks__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["name","validate","required","label","legend","bigLegend","hint","options","initialValue","exclusive"],_excluded2=["value","label","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledOr=(0,styled_components__WEBPACK_IMPORTED_MODULE_32__.ZP)("div")({paddingLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2,paddingRight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2,marginBottom:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2}),FieldCheckboxes=function FieldCheckboxes(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,bigLegend=_ref.bigLegend,hint=_ref.hint,_ref$options=_ref.options,options=void 0===_ref$options?[]:_ref$options,_ref$initialValue=_ref.initialValue,initialValue=void 0===_ref$initialValue?[]:_ref$initialValue,_ref$exclusive=_ref.exclusive,exclusive=void 0!==_ref$exclusive&&_ref$exclusive,props=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks_useField__WEBPACK_IMPORTED_MODULE_28__.Z)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onBlur=_useField.onBlur,setFieldValue=(0,_hooks__WEBPACK_IMPORTED_MODULE_30__.Gc)().setFieldValue,onChange=function onChange(event){var eventTargetName=isNaN(event.target.name)?event.target.name:parseInt(event.target.name,10);event.target.checked?setFieldValue(name,[].concat(_toConsumableArray(value),[eventTargetName])):setFieldValue(name,value.filter((function(v){return v!==eventTargetName})))},onChangeExclusive=function onChangeExclusive(event){if(event.target.checked){var lastOption=options.slice(options.length-1)[0];lastOption.value===event.target.name?setFieldValue(name,[event.target.name]):setFieldValue(name,[].concat(_toConsumableArray(value.filter((function(v){return v!==lastOption.value}))),[event.target.name]))}else setFieldValue(name,value.filter((function(v){return v!==event.target.name})))};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__.Z,_objectSpread(_objectSpread({},_objectSpread(_objectSpread({},props),{},{name,label,legend,bigLegend,hint,error})),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_25__.Z,{meta:{error,touched},children:options.map((function(_ref2,index){var optionValue=_ref2.value,optionLabel=_ref2.label,children=_ref2.children,optionProps=_objectWithoutProperties(_ref2,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.Fragment,{children:[exclusive&&index===options.length-1&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(StyledOr,{"data-test":"exclusive-or",children:"or"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_31__.jsx)(_Checkbox__WEBPACK_IMPORTED_MODULE_27__.Z,_objectSpread(_objectSpread({name:optionValue,checked:value.includes(optionValue),onChange:exclusive?onChangeExclusive:onChange,onBlur,"aria-label":optionLabel},optionProps),{},{children:optionLabel}),optionValue),value.includes(optionValue)&&children?children:null]})}))})}))};FieldCheckboxes.displayName="FieldCheckboxes",FieldCheckboxes.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_33___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_33___default().func,prop_types__WEBPACK_IMPORTED_MODULE_33___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_33___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node,exclusive:prop_types__WEBPACK_IMPORTED_MODULE_33___default().bool,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_33___default().array,options:prop_types__WEBPACK_IMPORTED_MODULE_33___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_33___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_33___default().string.isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_33___default().node}))},FieldCheckboxes.__docgenInfo={description:"Checkboxes for use in forms and filters.",methods:[],displayName:"FieldCheckboxes",props:{options:{defaultValue:{value:"[]",computed:!1},description:"Defines the checkbox labels and values",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"string",required:!0},children:{name:"node",required:!1}}}},required:!1},initialValue:{defaultValue:{value:"[]",computed:!1},description:"Sets initial value of the input",type:{name:"array"},required:!1},exclusive:{defaultValue:{value:"false",computed:!1},description:"Splits the last checkbox from the others where the choice is exclusive between them",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0},validate:{description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{description:"Text 'required' sets whether the input is required or not",type:{name:"string"},required:!1},label:{description:"Text for the label element",type:{name:"node"},required:!1},legend:{description:"Node for legend element",type:{name:"node"},required:!1},hint:{description:"Node for hint element",type:{name:"node"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=FieldCheckboxes},"./src/client/components/Form/elements/FieldCurrency/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_34___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_34__),styled_components__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_input__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./src/client/utils/colours.js"),_hooks__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_client_components_Form_validators__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Form/validators.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./src/client/utils/number-utils.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_excluded=["name","validate","required","label","text","legend","hint","initialValue","reduced","boldLabel","currencySymbol"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledInputWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2,";\n ")})),StyledText=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("span")({paddingLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.N_.SCALE_2}),StyledCurrencyPrefix=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n border: "," solid ",";\n border-right: 0px;\n display: inline-block;\n padding: ",";\n min-width: 47px;\n box-sizing: border-box;\n text-align: center;\n flex: 0 0 auto;\n cursor: default;\n font-size: ",";\n background-color: ",";\n line-height: 1.8;\n\n @media (max-width: ",") {\n line-height: 2.1;\n font-size: ",";\n }\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.gY,_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.E5,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.YF,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Kt.SIZE_19,_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.J7,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.j$.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Kt.SIZE_16,(function(props){return props.error&&"\n border: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_27__.h,";\n border-right: 0px;\n line-height: 1.6;\n ")})),StyledCurrencyWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_33__.ZP)("div")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: flex;\n align-items: stretch;\n height: 47px;\n > * {\n height: 100%;\n }\n"]))),FieldCurrency=function FieldCurrency(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,text=_ref.text,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,reduced=_ref.reduced,boldLabel=_ref.boldLabel,_ref$currencySymbol=_ref.currencySymbol,currencySymbol=void 0===_ref$currencySymbol?"£":_ref$currencySymbol,rest=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_28__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur,_useState2=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_22__.useState)(),2),displayValue=_useState2[0],setDisplayValue=_useState2[1],_useState4=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_22__.useState)(),2),rawValue=_useState4[0],setRawValue=_useState4[1],_useState6=_slicedToArray((0,react__WEBPACK_IMPORTED_MODULE_22__.useState)(!1),2),editing=_useState6[0],setEditing=_useState6[1];(0,react__WEBPACK_IMPORTED_MODULE_22__.useEffect)((function(){!editing&&value&&(setRawValue(value),setDisplayValue((0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.gH)(value)))}),[value]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_29__.Z,{name,label,legend,hint,error,reduced,boldLabel,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsxs)(StyledInputWrapper,{error,children:[touched&&error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_25__.Z,{children:error}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsxs)(StyledCurrencyWrapper,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledCurrencyPrefix,{error:touched&&Boolean(error),"aria-hidden":"true",children:currencySymbol}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_24__.Z,_objectSpread({error:touched&&Boolean(error),id:name,type:"text",name,value:displayValue,"data-raw-value":rawValue,onChange:function onChangeWrapper(e){isNaN((0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.AO)(e.target.value))?setRawValue(e.target.value):setRawValue((0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.AO)(e.target.value)),setDisplayValue(e.target.value),onChange(e)},onBlur:function onBlurWrapper(e){setDisplayValue(isNaN(rawValue)?rawValue:(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_31__.gH)(rawValue)),setEditing(!1),onBlur(e)},onFocus:function onFocus(){setDisplayValue(rawValue),setEditing(!0)},"data-test":(0,lodash__WEBPACK_IMPORTED_MODULE_23__.kebabCase)("".concat(name,"-'input'")),inputMode:"numeric"},rest),name)]}),text&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_32__.jsx)(StyledText,{children:text})]})})};FieldCurrency.displayName="FieldCurrency",FieldCurrency.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_34___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_34___default().func,prop_types__WEBPACK_IMPORTED_MODULE_34___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_34___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_34___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_34___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_34___default().node,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_34___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_34___default().string,prop_types__WEBPACK_IMPORTED_MODULE_34___default().number]),reduced:prop_types__WEBPACK_IMPORTED_MODULE_34___default().bool,boldLabel:prop_types__WEBPACK_IMPORTED_MODULE_34___default().bool,currencySymbol:prop_types__WEBPACK_IMPORTED_MODULE_34___default().string},FieldCurrency.defaultProps={validate:function validate(value){return(0,_client_components_Form_validators__WEBPACK_IMPORTED_MODULE_30__.R)(value,"Value must be a number")},required:null,label:null,legend:null,hint:null,initialValue:"",reduced:!1,boldLabel:!0},FieldCurrency.__docgenInfo={description:"A basic currency field for numbers.",methods:[],displayName:"FieldCurrency",props:{currencySymbol:{defaultValue:{value:"'£'",computed:!1},description:"Sets the value for the currency prefix",type:{name:"string"},required:!1},validate:{defaultValue:{value:"(value) => number(value, 'Value must be a number')",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets whether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"Sets initial value of the input",type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1},reduced:{defaultValue:{value:"false",computed:!1},description:"Toggles whether the element is a filter or not",type:{name:"bool"},required:!1},boldLabel:{defaultValue:{value:"true",computed:!1},description:"Boolean for rendering the label in bold or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldCurrency},"./src/client/components/Form/elements/FieldDate/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_35___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_35__),lodash__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/lodash/lodash.js"),styled_components__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_label__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@govuk-react/label-text/dist/govuk-react-label-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./src/client/utils/colours.js"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_hooks_useField__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./src/client/components/Form/hooks/useField.js"),_hooks__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_excluded=["name","label","legend","hint","validate","initialValue","labels","required","invalid","format","reduced"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var _require=__webpack_require__("./src/client/utils/date.js"),isNormalisedDateValid=_require.isNormalisedDateValid,isShortDateValid=_require.isShortDateValid,StyledInputWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_34__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_29__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_28__.N_.SCALE_2,";\n ")})),StyledLabel=(0,styled_components__WEBPACK_IMPORTED_MODULE_34__.ZP)(_govuk_react_label__WEBPACK_IMPORTED_MODULE_25__.Z)({marginRight:"20px",marginBottom:0},(function(_ref){return{width:_ref.year?"70px":"50px"}})),StyledList=styled_components__WEBPACK_IMPORTED_MODULE_34__.ZP.div(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n "," {\n height: 47px;\n }\n"])),_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z),getValidator=function getValidator(required,invalid,format){return function(_ref2){var day=_ref2.day,month=_ref2.month,year=_ref2.year,isLong="LONG"===format,isValid=isLong?isNormalisedDateValid(year,month,day):isShortDateValid(year,month),isDateEmpty=isLong?!day&&!month&&!year:!month&&!year;return isDateEmpty&&!required?null:required&&isDateEmpty?required:isValid||isDateEmpty?4!=year.toString().length?"Enter a year as 4 digits":void 0:invalid||"Enter a valid date"}},getDefaultInitialValue=function getDefaultInitialValue(format){return"LONG"===format?{day:"",month:"",year:""}:{month:"",year:""}},FieldDate=function FieldDate(_ref3){var name=_ref3.name,label=_ref3.label,legend=_ref3.legend,hint=_ref3.hint,validate=_ref3.validate,initialValue=_ref3.initialValue,labels=_ref3.labels,required=_ref3.required,invalid=_ref3.invalid,format=_ref3.format,reduced=_ref3.reduced,props=_objectWithoutProperties(_ref3,_excluded),_useField=(0,_hooks_useField__WEBPACK_IMPORTED_MODULE_31__.Z)({name,initialValue:initialValue||getDefaultInitialValue(format),validate:[getValidator(required,invalid,format)].concat(_toConsumableArray((0,lodash__WEBPACK_IMPORTED_MODULE_23__.castArray)(validate)))}),value=_useField.value,error=_useField.error,touched=_useField.touched,onBlur=_useField.onBlur,setFieldValue=(0,_hooks__WEBPACK_IMPORTED_MODULE_32__.Gc)().setFieldValue,dataTest=props["data-test"]?props["data-test"]:(0,lodash__WEBPACK_IMPORTED_MODULE_23__.snakeCase)(name),_onChange=function onChange(valueKey,e){var date=e.target.value.split("-");setFieldValue(name,_objectSpread(_objectSpread({},value),{},reduced?{day:date[2],month:date[1],year:date[0]}:_defineProperty({},valueKey,e.target.value)))};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_30__.Z,{name,label,legend,hint,error,reduced,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledInputWrapper,{error,children:[error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_24__.Z,{"data-test":"field-".concat(name,"-error"),children:error}),reduced?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:name,name,error:touched&&error,type:"date",value:"".concat(value.year,"-").concat(value.month,"-").concat(value.day),onChange:function onChange(e){return _onChange(name,e)},onBlur}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledList,{children:["LONG"===format&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledLabel,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__.Z,{children:labels.day}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:"".concat(name,".day"),name:"".concat(name,".day"),"data-test":"".concat(dataTest,"-day"),error:touched&&error,type:"text",value:value.day,onChange:function onChange(e){return _onChange("day",e)},onBlur})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledLabel,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__.Z,{children:labels.month}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:"".concat(name,".month"),name:"".concat(name,".month"),"data-test":"".concat(dataTest,"-month"),error:touched&&error,type:"text",value:value.month,onChange:function onChange(e){return _onChange("month",e)},onBlur})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsxs)(StyledLabel,{year:!0,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_label_text__WEBPACK_IMPORTED_MODULE_27__.Z,{children:labels.year}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_33__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_26__.Z,{id:"".concat(name,".year"),name:"".concat(name,".year"),"data-test":"".concat(dataTest,"-year"),error:touched&&error,type:"text",value:value.year,onChange:function onChange(e){return _onChange("year",e)},onBlur})]})]})]})})};FieldDate.displayName="FieldDate",FieldDate.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_35___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_35___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,required:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,invalid:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,format:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,validate:prop_types__WEBPACK_IMPORTED_MODULE_35___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_35___default().func,prop_types__WEBPACK_IMPORTED_MODULE_35___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_35___default().func)]),initialValue:prop_types__WEBPACK_IMPORTED_MODULE_35___default().shape({day:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,month:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,year:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string}),labels:prop_types__WEBPACK_IMPORTED_MODULE_35___default().shape({day:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,month:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string,year:prop_types__WEBPACK_IMPORTED_MODULE_35___default().string}),reduced:prop_types__WEBPACK_IMPORTED_MODULE_35___default().bool},FieldDate.defaultProps={label:null,legend:null,hint:null,required:null,invalid:null,format:"LONG",validate:null,initialValue:null,labels:{day:"Day",month:"Month",year:"Year"},reduced:!1},FieldDate.__docgenInfo={description:"Date field for use in forms and filters.",methods:[],displayName:"FieldDate",props:{label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"string"},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},invalid:{defaultValue:{value:"null",computed:!1},description:"Text 'invalid' sets a custom error message for invalid dates",type:{name:"string"},required:!1},format:{defaultValue:{value:"'LONG'",computed:!1},description:"",type:{name:"string"},required:!1},validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},initialValue:{defaultValue:{value:"null",computed:!1},description:"Sets initial value of the input",type:{name:"shape",value:{day:{name:"string",required:!1},month:{name:"string",required:!1},year:{name:"string",required:!1}}},required:!1},labels:{defaultValue:{value:"{\n day: 'Day',\n month: 'Month',\n year: 'Year',\n}",computed:!1},description:"",type:{name:"shape",value:{day:{name:"string",required:!1},month:{name:"string",required:!1},year:{name:"string",required:!1}}},required:!1},reduced:{defaultValue:{value:"false",computed:!1},description:"Toggles wether the element is a filter or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldDate},"./src/client/components/Form/elements/FieldHelp/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_details__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/details/dist/govuk-react-details.esm.js"),_client_components___WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/components/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ItemWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n padding: 0;\n"]))),StyledDetails=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)(_govuk_react_details__WEBPACK_IMPORTED_MODULE_4__.Z)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin: -"," 0 "," 0;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.N_.SCALE_4,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.N_.SCALE_5),FieldHelp=function FieldHelp(_ref){var helpSummary=_ref.helpSummary,helpText=_ref.helpText,footerUrl=_ref.footerUrl,footerUrlDescription=_ref.footerUrlDescription,open=_ref.open;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(ItemWrapper,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(StyledDetails,{summary:helpSummary,open,children:[helpText,footerUrl&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("br",{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_client_components___WEBPACK_IMPORTED_MODULE_5__.ke,{href:footerUrl,children:footerUrlDescription})]})]})})};FieldHelp.displayName="FieldHelp",FieldHelp.propTypes={helpSummary:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,helpText:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node.isRequired,footerUrl:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,footerDescription:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string,open:prop_types__WEBPACK_IMPORTED_MODULE_8___default().bool},FieldHelp.defaultProps={open:!1},FieldHelp.__docgenInfo={description:"",methods:[],displayName:"FieldHelp",props:{open:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},helpSummary:{description:"",type:{name:"string"},required:!0},helpText:{description:"",type:{name:"node"},required:!0},footerUrl:{description:"",type:{name:"string"},required:!1},footerDescription:{description:"",type:{name:"string"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=FieldHelp},"./src/client/components/Form/elements/FieldInput/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/utils/colours.js"),_hooks__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["name","type","validate","required","label","text","legend","hint","initialValue","reduced"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledInputWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n "," {\n height: 47px;\n }\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_2,";\n ")}),_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__.Z),StyledText=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("span")({paddingLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_2}),FieldInput=function FieldInput(_ref){var name=_ref.name,type=_ref.type,validate=_ref.validate,required=_ref.required,label=_ref.label,text=_ref.text,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,reduced=_ref.reduced,rest=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_25__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__.Z,{name,label,legend,hint,error,reduced,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(StyledInputWrapper,{error,children:[touched&&error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_22__.Z,{children:error}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_input__WEBPACK_IMPORTED_MODULE_21__.Z,_objectSpread({error:touched&&Boolean(error),id:name,type,name,value,onChange,onBlur,"data-test":(0,lodash__WEBPACK_IMPORTED_MODULE_20__.kebabCase)("".concat(name,"-'input'"))},rest),name),text&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledText,{children:text})]})})};FieldInput.displayName="FieldInput",FieldInput.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,type:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_29___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_29___default().func,prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,reduced:prop_types__WEBPACK_IMPORTED_MODULE_29___default().bool},FieldInput.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:"",reduced:!1},FieldInput.__docgenInfo={description:"A basic input field for numbers and text.",methods:[],displayName:"FieldInput",props:{validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"Sets initial value of the input",type:{name:"string"},required:!1},reduced:{defaultValue:{value:"false",computed:!1},description:"Toggles wether the element is a filter or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0},type:{description:"Text for type attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldInput},"./src/client/components/Form/elements/FieldRadios/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.string.link.js");var react__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),_govuk_react_radio__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/radio/dist/govuk-react-radio.esm.js"),_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/multi-choice/dist/govuk-react-multi-choice.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/lodash/lodash.js"),_hooks__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_excluded=["name","validate","required","label","legend","bigLegend","hint","inline","initialValue","options"],_excluded2=["label","value","children","link"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledChildField=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n margin-left: 55px;\n clear: both;\n"]))),StyledRadio=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_govuk_react_radio__WEBPACK_IMPORTED_MODULE_22__.Z)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n ","\n"])),(function(props){return props.inline&&"\n float: left;\n clear: none;\n "})),FieldRadios=function FieldRadios(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,bigLegend=_ref.bigLegend,hint=_ref.hint,inline=_ref.inline,initialValue=_ref.initialValue,options=_ref.options,props=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_25__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur,getDataTest=function getDataTest(prefix,name,optionLabel){var dataTest=(0,lodash__WEBPACK_IMPORTED_MODULE_24__.kebabCase)("".concat(name,"-").concat(optionLabel));return prefix?"".concat(prefix,"-").concat(dataTest):dataTest};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_26__.Z,_objectSpread(_objectSpread({},_objectSpread(_objectSpread({},props),{},{name,label,legend,hint,error,bigLegend})),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_multi_choice__WEBPACK_IMPORTED_MODULE_23__.Z,{meta:{error,touched},children:options.map((function(_ref2){var optionLabel=_ref2.label,optionValue=_ref2.value,optionChildren=_ref2.children,optionLink=_ref2.link,optionProps=_objectWithoutProperties(_ref2,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(react__WEBPACK_IMPORTED_MODULE_21__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(StyledRadio,_objectSpread(_objectSpread({inline,value:optionValue,checked:value===optionValue,onChange,onBlur,name,"data-test":getDataTest(props.dataTestPrefix,name,optionLabel),"aria-label":optionLabel},optionProps),{},{children:[optionLabel,optionLink&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.Fragment,{children:optionLink})]})),value===optionValue&&optionChildren&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledChildField,{children:optionChildren})]},optionValue)}))})}))};FieldRadios.displayName="FieldRadios",FieldRadios.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_29___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_29___default().func,prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,inline:prop_types__WEBPACK_IMPORTED_MODULE_29___default().bool,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,options:prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string.isRequired,hint:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node}))},FieldRadios.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,inline:!1,initialValue:"",options:[]},FieldRadios.__docgenInfo={description:"",methods:[],displayName:"FieldRadios",props:{validate:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},inline:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},options:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"string",required:!0},hint:{name:"node",required:!1},children:{name:"node",required:!1}}}},required:!1},name:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldRadios},"./src/client/components/Form/elements/FieldSelect/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.find.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),_govuk_react_select__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_hooks__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_utils_colours__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["name","label","legend","hint","validate","required","initialValue","options","emptyOption","fullWidth","boldLabel"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledSelect=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_select__WEBPACK_IMPORTED_MODULE_21__.ZP)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n position: relative;\n &::after {\n border-bottom: 2px solid ",";\n border-right: 2px solid ",";\n content: '';\n display: block;\n height: 12px;\n pointer-events: none;\n position: absolute;\n right: 16px;\n ","\n ","\n\n transform: translate(0, -65%) rotate(45deg);\n width: 12px;\n @media (max-width: ",") {\n right: 4%;\n }\n }\n "," {\n height: 47px;\n padding: 0px 32px 0px 12px;\n ","\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n }\n"])),_utils_colours__WEBPACK_IMPORTED_MODULE_25__.E5,_utils_colours__WEBPACK_IMPORTED_MODULE_25__.E5,(function(_ref){return _ref.fullWidth?"right: 2%;":"right: 52%;"}),(function(_ref2){return _ref2.meta.error?"top: 72%;":"top: 50%;"}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_22__.j$.TABLET,_govuk_react_select__WEBPACK_IMPORTED_MODULE_21__.lq,(function(_ref3){return _ref3.fullWidth&&"width: 100%;"})),FieldSelect=function FieldSelect(_ref4){var _options$find,name=_ref4.name,label=_ref4.label,legend=_ref4.legend,hint=_ref4.hint,validate=_ref4.validate,required=_ref4.required,initialValue=_ref4.initialValue,options=_ref4.options,emptyOption=_ref4.emptyOption,fullWidth=_ref4.fullWidth,boldLabel=_ref4.boldLabel,rest=_objectWithoutProperties(_ref4,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_23__.U$)({name,validate,required,initialValue}),error=_useField.error,touched=_useField.touched,value=_useField.value,onChange=_useField.onChange,onBlur=_useField.onBlur;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__.Z,{name,label,legend,hint,error,boldLabel,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(StyledSelect,{fullWidth,name,onChange,onBlur,meta:{error,touched},input:_objectSpread({id:name,defaultValue:value},rest),children:[emptyOption&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)("option",{value:"",children:emptyOption},""),options.map((function(_ref5){var optionLabel=_ref5.label,optionValue=_ref5.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)("option",{value:optionValue,children:optionLabel},optionValue)}))]},Array.isArray(options)&&options.length>0?value:void 0),null===(_options$find=options.find((function(o){return o.value===value})))||void 0===_options$find?void 0:_options$find.children]})};FieldSelect.displayName="FieldSelect",FieldSelect.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,validate:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().func,prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,initialValue:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,options:prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,value:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired})),emptyOption:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,fullWidth:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,boldLabel:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool},FieldSelect.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:"",options:[],emptyOption:"Please select",fullWidth:!1,boldLabel:!0},FieldSelect.__docgenInfo={description:"A Select dropdown field for use in forms.",methods:[],displayName:"FieldSelect",props:{validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"Sets initial value of the input",type:{name:"string"},required:!1},options:{defaultValue:{value:"[]",computed:!1},description:"Items for the list",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"string",required:!0},value:{name:"string",required:!0}}}},required:!1},emptyOption:{defaultValue:{value:"'Please select'",computed:!1},description:"Text to display when no items are selected",type:{name:"string"},required:!1},fullWidth:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},boldLabel:{defaultValue:{value:"true",computed:!1},description:"Boolean for rendering the label in bold or not",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=FieldSelect},"./src/client/components/Form/elements/FieldTypeahead/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),styled_components__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/error-text/dist/govuk-react-error-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/utils/colours.js"),_hooks__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/components/Form/elements/FieldWrapper/index.jsx"),_Typeahead__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Typeahead/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["name","validate","required","label","legend","hint","initialValue","options","autoScroll"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledWrapper=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n textarea {\n width: 100%;\n }\n"])),(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_22__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_2,";\n ")})),FieldTypeahead=function FieldTypeahead(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,options=_ref.options,autoScroll=_ref.autoScroll,props=_objectWithoutProperties(_ref,_excluded),_useField=(0,_hooks__WEBPACK_IMPORTED_MODULE_23__.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onBlur=_useField.onBlur,setFieldValue=(0,_hooks__WEBPACK_IMPORTED_MODULE_23__.Gc)().setFieldValue;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(_FieldWrapper__WEBPACK_IMPORTED_MODULE_24__.Z,{name,label,legend,hint,error,autoScroll,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(StyledWrapper,{error,children:[touched&&error&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(_govuk_react_error_text__WEBPACK_IMPORTED_MODULE_20__.Z,{children:error}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(_Typeahead__WEBPACK_IMPORTED_MODULE_25__.Z,_objectSpread({name,"aria-label":label||legend,onBlur,onChange:function onChange(newValue){return setFieldValue(name,props.isMulti?newValue:newValue[0])},error,value,initialOptions:options},props))]})})};FieldTypeahead.displayName="FieldTypeahead",FieldTypeahead.propTypes=_objectSpread(_objectSpread({},_Typeahead__WEBPACK_IMPORTED_MODULE_25__.Z.propTypes),{},{name:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,validate:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().func,prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().func)]),required:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,hint:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,prop_types__WEBPACK_IMPORTED_MODULE_28___default().object]),initialValue:prop_types__WEBPACK_IMPORTED_MODULE_28___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_28___default().object,prop_types__WEBPACK_IMPORTED_MODULE_28___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_28___default().object)]),autoScroll:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool}),FieldTypeahead.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:null,autoScroll:!1},FieldTypeahead.__docgenInfo={description:"A Typeahead for use in forms.\n\nThis is a wrapper around the `react-select` by Jed Watson, for indepth documention refer to [Github](https://github.com/JedWatson/react-select) or the [api docs](https://react-select.com/home)",methods:[],displayName:"FieldTypeahead",props:{validate:{defaultValue:{value:"null",computed:!1},description:"Validate functions for input",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"Text 'required' sets wether the input is required or not",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"union",value:[{name:"string"},{name:"object"}]},required:!1},initialValue:{defaultValue:{value:"null",computed:!1},description:"Sets initial value of the input",type:{name:"union",value:[{name:"object"},{name:"arrayOf",value:{name:"object"}}]},required:!1},autoScroll:{defaultValue:{value:"false",computed:!1},description:"Whether the window should auto scroll into view this component",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0}},composes:["../../../Typeahead"]};const __WEBPACK_DEFAULT_EXPORT__=FieldTypeahead},"./src/client/components/Form/elements/FieldWrapper/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),_govuk_react_form_group__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/form-group/dist/govuk-react-form-group.esm.js"),_govuk_react_label__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_hint_text__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/hint-text/dist/govuk-react-hint-text.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_excluded=["name","label","legend","bigLegend","hint","error","showBorder","children","reduced","groupId","boldLabel","autoScroll"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledFormGroup=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_form_group__WEBPACK_IMPORTED_MODULE_21__.Z)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n ","\n"])),(function(props){var isReduced=props.reduced,hasHint=!!props.hint;return"\n ".concat(isReduced&&"\n background-color: ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.nx,";\n label {\n font-size: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.VN.S,"px;\n + span {\n font-size: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.VN.S,"px;\n + div span {\n font-size: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.VN.S,"px;\n }\n }\n }\n input {\n border-width: 1px;\n }\n "),"\n padding: 8px;\n ").concat(hasHint?"padding-bottom: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,";"):"padding-bottom: 8px;",";\n ")})),StyledFieldset=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("fieldset")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n ","\n"])),(function(props){return props.showBorder&&"\n border: 1px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.FU,";\n padding: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_3,";\n ")})),StyledFieldsetNoStyling=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("fieldset")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n"]))),StyledLegend=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("legend")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n box-sizing: border-box;\n display: table;\n white-space: normal;\n font-size: 19px;\n padding: 0;\n margin: 0;\n padding-bottom: ",";\n * {\n margin-bottom: "," !important;\n }\n ","\n ","\n\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_3,";\n padding-left: 8px;\n ")}),(function(props){return props.showBorder&&"\n padding: 8px;\n margin-left: -8px;\n "}),(function(props){return props.bigLegend&&"\n margin-bottom: 20px;\n padding-bottom: 0px;\n font-size: 24px;\n "})),StyledLegendNoStyle=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)("legend")(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n"]))),StyledLabel=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_label__WEBPACK_IMPORTED_MODULE_22__.Z)(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n padding-bottom: ",";\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,(function(props){return props.boldLabel&&" font-weight: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.Xw.bold,";")})),StyledHint=(0,styled_components__WEBPACK_IMPORTED_MODULE_27__.ZP)(_govuk_react_hint_text__WEBPACK_IMPORTED_MODULE_23__.Z)(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n padding: 0;\n margin: 0;\n padding-bottom: ",";\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_2,(function(props){return props.error&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_25__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_2,";\n padding-bottom: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_24__.N_.SCALE_1,";\n ")})),FieldInner=function FieldInner(_ref){var legend=_ref.legend,error=_ref.error,showBorder=_ref.showBorder,children=_ref.children,bigLegend=_ref.bigLegend,groupId=_ref.groupId;return legend?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(StyledFieldset,{showBorder,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLegend,{className:"govuk-heading-m",error,showBorder,bigLegend,id:groupId,children:legend}),children]}):children},FieldWrapper=function FieldWrapper(_ref2){var name=_ref2.name,label=_ref2.label,legend=_ref2.legend,bigLegend=_ref2.bigLegend,hint=_ref2.hint,error=_ref2.error,showBorder=_ref2.showBorder,children=_ref2.children,reduced=_ref2.reduced,groupId=_ref2.groupId,boldLabel=_ref2.boldLabel,autoScroll=_ref2.autoScroll,rest=_objectWithoutProperties(_ref2,_excluded),styledWrapperRef=react__WEBPACK_IMPORTED_MODULE_20__.useRef(null);return(0,react__WEBPACK_IMPORTED_MODULE_20__.useEffect)((function(){autoScroll&&styledWrapperRef.current.scrollIntoView()}),[autoScroll]),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledFormGroup,_objectSpread(_objectSpread({id:"field-".concat(name),"data-test":"field-".concat(name),reduced,hint,ref:styledWrapperRef},rest),{},{children:legend?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(FieldInner,{legend,error,showBorder,bigLegend,groupId,children:[label&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLabel,{boldLabel,error,htmlFor:name,children:label}),hint&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledHint,{"data-test":"hint-text",error,children:hint}),children]}):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledFieldsetNoStyling,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsxs)(FieldInner,{legend,error,showBorder,bigLegend,groupId,children:[label&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLegendNoStyle,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledLabel,{boldLabel,error,htmlFor:name,children:label})}),hint&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_26__.jsx)(StyledHint,{"data-test":"hint-text",error,children:hint}),children]})})}))};FieldWrapper.displayName="FieldWrapper",FieldInner.propTypes={legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,error:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,showBorder:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,bigLegend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,children:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node},FieldInner.defaultProps={legend:null,error:null,showBorder:!1,bigLegend:!1,children:null},FieldWrapper.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string.isRequired,label:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,legend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,bigLegend:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,hint:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,error:prop_types__WEBPACK_IMPORTED_MODULE_28___default().string,showBorder:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,children:prop_types__WEBPACK_IMPORTED_MODULE_28___default().node,boldLabel:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool,autoScroll:prop_types__WEBPACK_IMPORTED_MODULE_28___default().bool},FieldWrapper.defaultProps={label:null,legend:null,hint:null,error:null,showBorder:!1,children:null,boldLabel:!0,autoScroll:!1},FieldWrapper.__docgenInfo={description:"A simple wrapper for use in the field components, which applies supporting elements and stylings. The FieldWrapper component caters for the child element within, by providing it with the wrapping elements it needs. In particular, this wrapper looks for passed props such as legends, labels, and hints, and provides the required layout or additional elements.\n\nIn some design cases, there are pages that contain forms with a single radio or checkbox question. These pages have a requirement for a bigger, 'page-title like' legend. The `bigLegend` prop is a boolean which provides alternative styling to the legend, to make it match the bigger legend requirement.",methods:[],displayName:"FieldWrapper",props:{label:{defaultValue:{value:"null",computed:!1},description:"Text for the label element",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"Node for legend element",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"Node for hint element",type:{name:"node"},required:!1},error:{defaultValue:{value:"null",computed:!1},description:"Text for error",type:{name:"string"},required:!1},showBorder:{defaultValue:{value:"false",computed:!1},description:"Boolean for showing borders",type:{name:"bool"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"Node for children elements",type:{name:"node"},required:!1},boldLabel:{defaultValue:{value:"true",computed:!1},description:"Boolean for rendering the label in bold or not",type:{name:"bool"},required:!1},autoScroll:{defaultValue:{value:"false",computed:!1},description:"Whether the window should auto scroll into view this component",type:{name:"bool"},required:!1},name:{description:"Text for name attribute value",type:{name:"string"},required:!0},bigLegend:{description:"Boolean for showing a big legend",type:{name:"bool"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=FieldWrapper},"./src/client/components/Form/elements/FormActions.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_3__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n "," {\n * {\n vertical-align: baseline;\n }\n\n * + * {\n margin-left: ",";\n }\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_2__.qk.TABLET,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_2__.N_.SCALE_4)},"./src/client/components/Form/elements/Step.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_hooks__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),_ButtonLink__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/components/ButtonLink/index.jsx"),_FormActions__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/react/jsx-runtime.js");function Step(_ref){var name=_ref.name,backButton=_ref.backButton,forwardButton=_ref.forwardButton,cancelUrl=_ref.cancelUrl,children=_ref.children,_useFormContext=(0,_hooks__WEBPACK_IMPORTED_MODULE_4__.Gc)(),currentStep=_useFormContext.currentStep,goBack=_useFormContext.goBack,registerStep=_useFormContext.registerStep,deregisterStep=_useFormContext.deregisterStep,getStepIndex=_useFormContext.getStepIndex,isFirstStep=_useFormContext.isFirstStep,isLastStep=_useFormContext.isLastStep;(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){return registerStep(name),function(){return deregisterStep(name)}}),[name]);var index=getStepIndex(name);if(index!==currentStep||void 0===index||void 0===currentStep)return null;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.Fragment,{children:["function"==typeof children?children():children,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_FormActions__WEBPACK_IMPORTED_MODULE_6__.Z,{children:[function renderForwardButton(){if(void 0===forwardButton){var label=isLastStep()?"Submit":"Continue";return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__.Z,{"data-test":label.toLowerCase(),name:"forward",children:label})}return"string"==typeof forwardButton?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_2__.Z,{name:"forward",children:forwardButton}):forwardButton}(),!isFirstStep()&&function renderBackButton(){return void 0===backButton?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_ButtonLink__WEBPACK_IMPORTED_MODULE_5__.Z,{name:"back",onClick:goBack,children:"Back"}):"string"==typeof backButton?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_ButtonLink__WEBPACK_IMPORTED_MODULE_5__.Z,{name:"back",onClick:goBack,children:backButton}):backButton}(),isFirstStep()&&cancelUrl&&function renderCancelLink(){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_3__.Z,{"data-test":"cancel-link",href:cancelUrl,children:"Cancel"})}()]})]})}Step.propTypes={name:prop_types__WEBPACK_IMPORTED_MODULE_8___default().string.isRequired,backButton:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node,forwardButton:prop_types__WEBPACK_IMPORTED_MODULE_8___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_8___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8___default().func,prop_types__WEBPACK_IMPORTED_MODULE_8___default().node])},Step.defaultProps={backButton:void 0,forwardButton:void 0,children:null},Step.__docgenInfo={description:"",methods:[],displayName:"Step",props:{backButton:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"node"},required:!1},forwardButton:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"node"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"func"},{name:"node"}]},required:!1},name:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Step},"./src/client/components/Form/hooks/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Gc:()=>_useFormContext__WEBPACK_IMPORTED_MODULE_1__.G,U$:()=>_useField__WEBPACK_IMPORTED_MODULE_0__.Z,ol:()=>_useFormContext__WEBPACK_IMPORTED_MODULE_1__.o});var _useField__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/client/components/Form/hooks/useField.js"),_useFormContext__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/components/Form/hooks/useFormContext.js")},"./src/client/components/Form/hooks/useField.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js");var react__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/index.js"),lodash__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/lodash/lodash.js"),_useFormContext__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/components/Form/hooks/useFormContext.js");const __WEBPACK_DEFAULT_EXPORT__=function useField(_ref){var name=_ref.name,_ref$initialValue=_ref.initialValue,initialValue=void 0===_ref$initialValue?"":_ref$initialValue,_ref$validate=_ref.validate,validate=void 0===_ref$validate?null:_ref$validate,_ref$required=_ref.required,required=void 0===_ref$required?null:_ref$required,_useFormContext=(0,_useFormContext__WEBPACK_IMPORTED_MODULE_5__.G)(),registerField=_useFormContext.registerField,deregisterField=_useFormContext.deregisterField,setFieldTouched=_useFormContext.setFieldTouched,setFieldValue=_useFormContext.setFieldValue,getFieldState=_useFormContext.getFieldState;(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)((function(){var validators;return registerField({name,initialValue,validate:(validators=(0,lodash__WEBPACK_IMPORTED_MODULE_4__.castArray)(validate).filter((function(v){return v})),required&&validators.unshift((function(value){return(0,lodash__WEBPACK_IMPORTED_MODULE_4__.isEmpty)(value)?required:null})),validators)}),function(){deregisterField(name)}}),[name]);var fieldState=getFieldState(name,initialValue);return{name,value:fieldState.value,error:fieldState.error,touched:fieldState.touched,onChange:function onChange(e){return setFieldValue(name,e.target.value)},onBlur:function onBlur(){return setFieldTouched(name,!0)}}}},"./src/client/components/Form/hooks/useFormContext.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{G:()=>useFormContext,o:()=>FormContextProvider});__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Form});__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.values.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.object.from-entries.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lodash_default=__webpack_require__.n(lodash),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),react_router=__webpack_require__("./node_modules/react-router/esm/react-router.js"),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),govuk_react_button_esm=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),ErrorSummary=__webpack_require__("./src/client/components/ErrorSummary/index.jsx"),Task=__webpack_require__("./src/client/components/Task/index.jsx"),LoadingBox=__webpack_require__("./src/client/components/Task/LoadingBox.jsx"),Resource=__webpack_require__("./src/client/components/Resource/Resource.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r React.ReactNode} props.with - The wrapping component.\n@param {any} props.when - Wrapping takes place only if this prop is truthy,\notherwise the children will be rendered unwrapped\n@param {Object} props.props - Will be passed as the props to the wrapping\ncomponent.\n@param {React.ReactNode} props.props - The children to be wrapped\n@returns {React.ReactNode}\n@example\n\n

I'm gonna be wrapped

\n
",methods:[],displayName:"Wrap"};const components_Wrap=Wrap;var Analytics=__webpack_require__("./src/client/components/Analytics/index.jsx"),actions=(__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./src/client/actions.js"));function reducer_typeof(o){return reducer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},reducer_typeof(o)}var _excluded=["type","result"];function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FormActions=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),hooks=__webpack_require__("./src/client/components/Form/hooks/index.jsx"),Effect=__webpack_require__("./src/client/components/Effect.jsx");const HardRedirect=(0,__webpack_require__("./node_modules/react-redux/es/index.js").connect)()((function(_ref){var to=_ref.to,when=_ref.when,dispatch=_ref.dispatch,_ref$children=_ref.children,children=void 0===_ref$children?null:_ref$children;return(0,react.useEffect)((function(){when&&dispatch({type:actions.Cq2,to})}),[to,when]),"function"==typeof children?children((function(to){return dispatch({type:actions.Cq2,to})})):children}));var colours=__webpack_require__("./src/client/utils/colours.js");function Form_typeof(o){return Form_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Form_typeof(o)}var Form_excluded=["submissionTaskName","id","analyticsFormName","analyticsData","cancelButtonLabel","cancelRedirectTo","initialValuesTaskName","initialValuesPayload","redirectTo","flashMessage","children","initialValues","redirectMode","scrollToTopOnStep","showStepInUrl","reactRouterRedirect","transformInitialValues","transformPayload","onSuccess","onError","submitButtonLabel","submitButtonColour","onLoad","result","resolved","errors","errorStatus","values","touched","steps","initialStepIndex","goToStep"];function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function Form_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return Form_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Form_arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Form_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function Form_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Form_objectSpread(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{};props.resetFields(Form_objectSpread(Form_objectSpread({},initialValues),values))},validateForm:function validateForm(fieldNamesToValidate){var _validateForm=_validateForm3(Form_objectSpread(Form_objectSpread({},contextProps),{},{fields:null!=fieldNamesToValidate&&fieldNamesToValidate.length?lodash_default().pick(contextProps.fields,fieldNamesToValidate):contextProps.fields})),errors=_validateForm.errors,touched=_validateForm.touched;return props.onValidate(errors,touched),errors},children:(0,jsx_runtime.jsx)(Task.Z,{children:function children(t){var submissionTask=t(submissionTaskName,id);return(0,jsx_runtime.jsx)(LoadingBox.Z,{name:submissionTaskName,id,when:"hard"===redirectMode&&redirectTo&&resolved,children:(0,jsx_runtime.jsxs)("form",{autoComplete:"off",noValidate:!0,onSubmit:function onSubmit(e){e.preventDefault();var _validateForm2=_validateForm3(contextProps),errors=_validateForm2.errors,touched=_validateForm2.touched;props.onValidate(errors,touched),(0,lodash.isEmpty)(errors)?contextProps.isLastStep()?(submissionTask.start({payload:transformPayload(values),onSuccessDispatch:"FORM__RESOLVED"}),analytics("Submit")):(props.goForward(),analytics("Next step",{currentStep:props.currentStep}),showStepInUrl&&history.push({search:lib_default().stringify(Form_objectSpread(Form_objectSpread({},qsParams),{},{step:steps[props.currentStep+1]}))})):(requestAnimationFrame((function(){var _ref$current;return null===(_ref$current=ref.current)||void 0===_ref$current?void 0:_ref$current.focus()})),analytics("Validation errors",{errors}))},children:[(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref6){var history=_ref6.history;return(0,jsx_runtime.jsx)(HardRedirect,{children:function children(hardRedirect){return(0,jsx_runtime.jsx)(Effect.Z,{dependencyList:[submissionTaskName,id,resolved,result],effect:function effect(){if(resolved&&(null==result||!result.errors)){if(analytics("Submission request success",analyticsData&&analyticsData(values)),flashMessage){var message=flashMessage(result,values);props.writeFlashMessage(message)}"soft"===redirectMode&&redirectTo&&history.push(redirectTo(result,values)),onSuccess&&onSuccess(result,values,{flashMessage:props.writeFlashMessage,hardRedirect,softRedirect:history.push}),props.resetResolved()}}})}})}}),(0,jsx_runtime.jsx)(Effect.Z,{dependencyList:[initialValues],effect:function effect(){return initialValues&&onLoad(transformInitialValues(initialValues),initialStepIndex)}}),(0,jsx_runtime.jsx)(Effect.Z,{dependencyList:[submissionTask.error],effect:function effect(){submissionTask.error&&analytics("Submission request error",{error:submissionTask.errorMessage})}}),"hard"===redirectMode&&redirectTo&&resolved&&(0,jsx_runtime.jsx)(HardRedirect,{to:redirectTo(result,values),when:resolved}),!(0,lodash.isEmpty)(errors)&&(0,jsx_runtime.jsx)(ErrorSummary.Z,{ref,id:"form-errors","data-test":"summary-form-errors",errors:Object.entries(errors).map((function(_ref7){var _ref8=_slicedToArray(_ref7,2);return{targetName:_ref8[0],text:_ref8[1]}}))}),"function"==typeof _children?_children(contextProps):_children,!steps.length&&(0,jsx_runtime.jsxs)(FormActions.Z,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{buttonColour:submitButtonColour,"data-test":"submit-button",children:submitButtonLabel}),cancelRedirectTo&&(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:cancelRedirectTo(),"data-test":"cancel-button",children:cancelButtonLabel})]})]})})}})}))})}})}})};_Form.displayName="_Form";var Form=(0,multiinstance.ZP)({name:"Form",reducer:function(){var _state$values$action$,_state$values,state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{values:{},touched:{},errors:{},errorStatus:0,fields:{},currentStep:0,steps:[]},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,action=_objectWithoutProperties(_ref,_excluded);switch(type){case actions.Fis:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:reducer_objectSpread(reducer_objectSpread({},state.values),action.initialValues),currentStep:action.initialStepIndex});case actions.HIy:return{values:reducer_objectSpread({},action.values),touched:{},errors:{},errorStatus:0,fields:reducer_objectSpread({},state.fields),currentStep:0,steps:_toConsumableArray(state.steps)};case actions.St0:return reducer_objectSpread(reducer_objectSpread({},state),{},{result,resolved:!0});case"FORM__RESET_RESOLVED":return(0,lodash.omit)(state,"result","resolved");case actions.dBj:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:reducer_objectSpread(reducer_objectSpread(reducer_objectSpread({},state.previousValues),state.values),{},reducer_defineProperty({},action.field.name,null!==(_state$values$action$=null===(_state$values=state.values)||void 0===_state$values?void 0:_state$values[action.field.name])&&void 0!==_state$values$action$?_state$values$action$:action.field.initialValue)),touched:reducer_objectSpread(reducer_objectSpread({},state.touched),{},reducer_defineProperty({},action.field.name,!1)),fields:reducer_objectSpread(reducer_objectSpread({},state.fields),{},reducer_defineProperty({},action.field.name,action.field))});case actions.CjI:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:(0,lodash.omit)(state.values,action.fieldName),errors:(0,lodash.omit)(state.errors,action.fieldName),touched:(0,lodash.omit)(state.touched,action.fieldName),fields:(0,lodash.omit)(state.fields,action.fieldName)});case actions.pe8:return reducer_objectSpread(reducer_objectSpread({},state),{},{values:reducer_objectSpread(reducer_objectSpread({},state.values),{},reducer_defineProperty({},action.fieldName,action.fieldValue))});case actions.gZL:return reducer_objectSpread(reducer_objectSpread({},state),{},{touched:reducer_objectSpread(reducer_objectSpread({},state.touched),{},reducer_defineProperty({},action.fieldName,!0))});case actions.qre:return reducer_objectSpread(reducer_objectSpread({},state),{},{errors:action.errors,touched:action.touched});case actions.Qlv:return reducer_objectSpread(reducer_objectSpread({},state),{},{errors:action.errors,touched:Object.fromEntries(Object.keys(action.errors).map((function(key){return[key,!0]}))),errorStatus:action.httpStatusCode});case actions.H3x:return reducer_objectSpread(reducer_objectSpread({},state),{},{currentStep:state.currentStep+1,previousValues:state.values});case actions.yTt:return reducer_objectSpread(reducer_objectSpread({},state),{},{currentStep:state.currentStep-1,previousValues:state.values});case actions.QhV:var nextCurrentStep=action.stepName?state.steps.indexOf(action.stepName):0;return reducer_objectSpread(reducer_objectSpread({},state),{},{currentStep:nextCurrentStep,previousValues:state.values});case actions.pdV:return reducer_objectSpread(reducer_objectSpread({},state),{},{steps:state.steps.includes(action.stepName)?state.steps:[].concat(_toConsumableArray(state.steps),[action.stepName])});case actions.Hef:return reducer_objectSpread(reducer_objectSpread({},state),{},{steps:state.steps.filter((function(s){return s!==action.stepName}))});default:return state}},component:_Form,dispatchToProps:function dispatchToProps(dispatch){return{onLoad:function onLoad(initialValues,initialStepIndex){return dispatch({type:"FORM__LOADED",initialValues,initialStepIndex})},resetResolved:function resetResolved(){return dispatch({type:"FORM__RESET_RESOLVED"})},registerField:function registerField(initialValues){return function(field){return dispatch({type:"FORM__FIELD_REGISTER",field:Form_objectSpread({initialValue:null==initialValues?void 0:initialValues[field.name]},field)})}},deregisterField:function deregisterField(fieldName){return dispatch({type:"FORM__FIELD_DEREGISTER",fieldName})},resetFields:function resetFields(values){return dispatch({type:"FORM__FIELDS__RESET",values})},setFieldValue:function setFieldValue(fieldName,fieldValue){return dispatch({type:"FORM__FIELD_SET_VALUE",fieldName,fieldValue})},setFieldTouched:function setFieldTouched(fieldName){return dispatch({type:"FORM__FIELD_TOUCHED",fieldName})},onValidate:function onValidate(errors,touched){return dispatch({type:"FORM__VALIDATE",errors,touched})},onError:function onError(errors){return dispatch({type:"FORM__ERRORED",errors})},goForward:function goForward(values){return dispatch({type:"FORM__FORWARD",values})},goBack:function goBack(){return dispatch({type:"FORM__BACK"})},goToStep:function goToStep(stepName){dispatch({type:"FORM__GO_TO_STEP",stepName})},registerStep:function registerStep(stepName){return dispatch({type:"FORM__STEP_REGISTER",stepName})},deregisterStep:function deregisterStep(stepName){return dispatch({type:"FORM__STEP_DEREGISTER",stepName})},writeFlashMessage:function writeFlashMessage(message){return dispatch({type:"FLASH_MESSAGE__WRITE_TO_SESSION",messageType:"success",message})}}},actionPattern:"FORM__"});Form.propTypes={id:prop_types_default().string.isRequired,analyticsFormName:prop_types_default().string.isRequired,analyticsData:prop_types_default().func,cancelRedirectTo:prop_types_default().func.isRequired,cancelButtonLabel:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().element]),submissionTaskName:prop_types_default().string.isRequired,submitButtonLabel:prop_types_default().string,redirectTo:prop_types_default().func,redirectMode:prop_types_default().oneOf(["hard","soft"]),flashMessage:prop_types_default().func,initialValuesTaskName:prop_types_default().string,initialValues:prop_types_default().object,transformInitialValues:prop_types_default().func,transformPayload:prop_types_default().func,initialStepIndex:prop_types_default().number,scrollToTopOnStep:prop_types_default().bool};const components_Form=Form},"./src/client/components/Form/validators.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>email,R:()=>number});__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var EMAIL_PATTERN=/(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/,IS_NUMBER=/^[0-9]*$/,email=function email(x){return EMAIL_PATTERN.test(x)?null:"Enter an email address in the correct format, like name@example.com"},number=function number(x,errorMessage){return!x||IS_NUMBER.test(x)?null:errorMessage}},"./src/client/components/InvestmentProjectLocalHeader/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_InvestmentProjectLocalHeader});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),Timeline=__webpack_require__("./src/client/components/Timeline/index.jsx"),date=__webpack_require__("./src/client/utils/date.js"),colours=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./src/client/utils/colours.js"));const timeline_theme={container:{backgroundColor:colours.zT,largeScreen:{padding:"23px 0 0 18px"}},li:{before:{left:"-8px",top:"2px",width:govuk_react_constants_esm.N_.SCALE_2,height:govuk_react_constants_esm.N_.SCALE_2,border:"2px solid ".concat(colours.N1)},span:{display:"inline"},mqLargeScreen:{padding:"".concat(govuk_react_constants_esm.N_.SCALE_4," 0 ").concat(govuk_react_constants_esm.N_.SCALE_4," 0"),borderTop:"2px solid ".concat(colours.N1),before:{top:"-8px",left:"-10px"}}}};var urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),constants=__webpack_require__("./src/client/modules/Investments/Projects/constants.js"),StatusMessage=__webpack_require__("./src/client/components/StatusMessage/index.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var MetaList=(0,styled_components_browser_esm.ZP)("ul")({}),StyledListItem=(0,styled_components_browser_esm.ZP)("li")(function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({marginRight:govuk_react_constants_esm.N_.SCALE_5,display:"inline-grid","&:last-child":{marginTop:govuk_react_constants_esm.N_.SCALE_3,marginBottom:govuk_react_constants_esm.N_.SCALE_3}},govuk_react_constants_esm.qk.LARGESCREEN,{"&:last-child":{marginTop:0,marginBottom:0}})),StyledListItemText=(0,styled_components_browser_esm.ZP)("span")({color:"#6f777b",fontSize:govuk_react_constants_esm.Kt.SIZE_16,fontWeight:400,marginBottom:govuk_react_constants_esm.N_.SCALE_1}),StyledChild=(0,styled_components_browser_esm.ZP)("span")({fontSize:govuk_react_constants_esm.Kt.SIZE_16}),StyledStatusMessage=(0,styled_components_browser_esm.ZP)(StatusMessage.Z)({fontSize:govuk_react_constants_esm.Kt.SIZE_20,fontWeight:700,marginBottom:govuk_react_constants_esm.N_.SCALE_1,marginTop:govuk_react_constants_esm.N_.SCALE_2,backgroundColor:colours.Cj}),MetaListItem=function MetaListItem(_ref){var text=_ref.text,children=_ref.children;return(0,jsx_runtime.jsxs)(StyledListItem,{children:[(0,jsx_runtime.jsx)(StyledListItemText,{children:text}),(0,jsx_runtime.jsx)(StyledChild,{children})]})};MetaListItem.displayName="MetaListItem";var InvestmentProjectLocalHeader=function InvestmentProjectLocalHeader(_ref2){var _investment$createdBy,_investment$createdBy2,investment=_ref2.investment;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(MetaList,{"data-test":"meta-list",children:[(0,jsx_runtime.jsxs)(MetaListItem,{text:"Status",children:[(0,lodash.upperFirst)(investment.status)," -"," ",(0,jsx_runtime.jsx)("a",{href:urls_default().investments.projects.status(investment.id),children:"change"})]}),(0,jsx_runtime.jsx)(MetaListItem,{text:"Project code",children:investment.projectCode}),(0,jsx_runtime.jsx)(MetaListItem,{text:"Valuation",children:investment.valueComplete?"Project valued":"Not yet valued"}),(0,jsx_runtime.jsx)(MetaListItem,{text:"Created on",children:(0,date.formatMediumDateTime)(investment.createdOn)}),(null===(_investment$createdBy=investment.createdBy)||void 0===_investment$createdBy||null===(_investment$createdBy2=_investment$createdBy.ditTeam)||void 0===_investment$createdBy2?void 0:_investment$createdBy2.name)&&(0,jsx_runtime.jsx)(MetaListItem,{text:"Created by",children:investment.createdBy.ditTeam.name})]}),(0,jsx_runtime.jsx)(styled_components_browser_esm.f6,{theme:timeline_theme,children:(0,jsx_runtime.jsx)(Timeline.Z,{stages:constants.pZ,currentStage:investment.stage.name})}),"Won"===investment.stage.name&&!investment.archived&&(0,jsx_runtime.jsxs)(StyledStatusMessage,{"data-test":"project-won-message",children:["This project has been verified as won. You should not make any changes to this project.",(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("br",{}),"If you would like to make changes, please contact the Investment Promotion Performance team."]})]})};InvestmentProjectLocalHeader.propTypes={investment:prop_types_default().object.isRequired},InvestmentProjectLocalHeader.__docgenInfo={description:"The **InvestmentProjectLocalHeader** contains the following:\n\n- Investment metadata such as: Status (Ongoing, Delayed, Abandoned, Lost and Dormant), Project code, Valuation and a Created on date\n\n- A list of five stages (Prospect', 'Assign PM', 'Active', 'Verify win' and 'Won') in chronological order where the current stage is clear to see",methods:[],displayName:"InvestmentProjectLocalHeader",props:{investment:{description:"An investment project",type:{name:"object"},required:!0}}};const components_InvestmentProjectLocalHeader=InvestmentProjectLocalHeader},"./src/client/components/InvestmentReminders/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_InvestmentReminders});__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),state=__webpack_require__("./src/client/components/InvestmentReminders/state.js"),actions=__webpack_require__("./src/client/actions.js"),styled_components_browser_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js")),govuk_react_heading_esm=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),constants=__webpack_require__("./src/common/constants.js"),urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var _require=__webpack_require__("./src/client/utils/date.js"),formatWithoutParsing=_require.formatWithoutParsing,getDifferenceInDaysLabel=_require.getDifferenceInDaysLabel,StyledSubHeading=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n color: ",";\n font-size: ",";\n font-weight: ",";\n margin-top: ",";\n margin-bottom: ",";\n"])),colours.hM,govuk_react_constants_esm.Kt.SIZE_19,govuk_react_constants_esm.Xw.regular,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2),StyledSubHeadingEmpty=(0,styled_components_browser_esm.ZP)(StyledSubHeading)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n margin: 0;\n"])),colours.au),StyledProjectLink=(0,styled_components_browser_esm.ZP)("a")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: block;\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_19,colours.su),StyledProjectCode=(0,styled_components_browser_esm.ZP)("div")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n margin: "," 0;\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.Kt.SIZE_16,colours.au),StyledDueDate=(0,styled_components_browser_esm.ZP)("span")(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16,colours.cK),StyledDueCountdown=(0,styled_components_browser_esm.ZP)("span")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n margin-top: ",";\n text-align: right;\n white-space: nowrap;\n font-size: ",";\n color: ",";\n"])),govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.Kt.SIZE_16,colours.cK),StyledList=(0,styled_components_browser_esm.ZP)("ul")(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n list-style-type: none;\n padding: 0;\n margin: 0;\n"]))),StyledListItem=(0,styled_components_browser_esm.ZP)("li")(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n margin-bottom: ",";\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: flex-end;\n"])),govuk_react_constants_esm.N_.SCALE_4),StyledDetails=(0,styled_components_browser_esm.ZP)("div")(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n padding-right: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),OutstandingPropositions=function OutstandingPropositions(_ref){var results=_ref.results,count=_ref.count;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:results.length?(0,jsx_runtime.jsxs)("div",{"data-test":"outstanding-propositions",children:[(0,jsx_runtime.jsxs)(StyledSubHeading,{"data-test":"outstanding-propositions-heading",children:["Outstanding propositions (",count,")"]}),(0,jsx_runtime.jsx)(StyledList,{"data-test":"outstanding-propositions-list",children:results.map((function(_ref2){var id=_ref2.id,investment_project=_ref2.investment_project,name=_ref2.name,deadline=_ref2.deadline;return(0,jsx_runtime.jsxs)(StyledListItem,{children:[(0,jsx_runtime.jsxs)(StyledDetails,{children:[(0,jsx_runtime.jsx)(StyledProjectLink,{href:urls_default().investments.projects.propositions(investment_project.id),children:name}),(0,jsx_runtime.jsx)(StyledProjectCode,{"data-test":"outstanding-proposition-project-code",children:investment_project.project_code}),(0,jsx_runtime.jsxs)(StyledDueDate,{"data-test":"outstanding-proposition-deadline",children:["Due"," ",formatWithoutParsing(new Date(deadline),constants.DATE_DAY_LONG_FORMAT)]})]}),(0,jsx_runtime.jsx)(StyledDueCountdown,{"data-test":"outstanding-proposition-countdown",children:getDifferenceInDaysLabel(deadline)})]},id)}))})]}):(0,jsx_runtime.jsx)(StyledSubHeadingEmpty,{"data-test":"outstanding-propositions-empty",children:"Projects with propositions due will be displayed here."})})};OutstandingPropositions.propTypes={count:prop_types_default().number.isRequired,results:prop_types_default().arrayOf(prop_types_default().shape({id:prop_types_default().string.isRequired,investment_project:prop_types_default().shape({id:prop_types_default().string.is_required,name:prop_types_default().string.isRequired,project_code:prop_types_default().string.isRequired}),deadline:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,adviser:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,first_name:prop_types_default().string.isRequired,last_name:prop_types_default().string.isRequired})})).isRequired},OutstandingPropositions.__docgenInfo={description:"",methods:[],displayName:"OutstandingPropositions",props:{count:{description:"",type:{name:"number"},required:!0},results:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{id:{name:"string",required:!0},investment_project:{name:"shape",value:{id:{name:"string",required:!1},name:{name:"string",required:!0},project_code:{name:"string",required:!0}},required:!1},deadline:{name:"string",required:!0},name:{name:"string",required:!0},adviser:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0},first_name:{name:"string",required:!0},last_name:{name:"string",required:!0}},required:!1}}}},required:!0}}};const InvestmentReminders_OutstandingPropositions=OutstandingPropositions;var Task=__webpack_require__("./src/client/components/Task/index.jsx"),InvestmentReminders=function InvestmentReminders(_ref){var adviser=_ref.adviser,results=_ref.results,count=_ref.count;return(0,jsx_runtime.jsx)("div",{"data-test":"investment-reminders",children:(0,jsx_runtime.jsx)(Task.Z.Status,{name:state.p,id:state.ID,progressMessage:"Loading your reminders",startOnRender:{payload:{adviser},onSuccessDispatch:actions.qzL},children:function children(){return(0,jsx_runtime.jsx)(InvestmentReminders_OutstandingPropositions,{results,count})}})})};InvestmentReminders.displayName="InvestmentReminders",InvestmentReminders.propTypes={adviser:prop_types_default().shape({id:prop_types_default().string.isRequired}).isRequired,count:prop_types_default().number.isRequired,results:prop_types_default().arrayOf(prop_types_default().shape({id:prop_types_default().string.isRequired,investment_project:prop_types_default().shape({id:prop_types_default().string.is_required,name:prop_types_default().string.isRequired,project_code:prop_types_default().string.isRequired}),deadline:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,adviser:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,first_name:prop_types_default().string.isRequired,last_name:prop_types_default().string.isRequired})})).isRequired},InvestmentReminders.__docgenInfo={description:"Shows reminders of upcoming propositions for an adviser to deal with.",methods:[],displayName:"InvestmentReminders",props:{adviser:{description:"The adviser to display investment reminders for.",type:{name:"shape",value:{id:{name:"string",required:!0}}},required:!0},count:{description:"",type:{name:"number"},required:!0},results:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{id:{name:"string",required:!0},investment_project:{name:"shape",value:{id:{name:"string",required:!1},name:{name:"string",required:!0},project_code:{name:"string",required:!0}},required:!1},deadline:{name:"string",required:!0},name:{name:"string",required:!0},adviser:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0},first_name:{name:"string",required:!0},last_name:{name:"string",required:!0}},required:!1}}}},required:!0}}};const components_InvestmentReminders=(0,es.connect)(state.H)(InvestmentReminders)},"./src/client/components/InvestmentReminders/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID,p:()=>TASK_GET_OUTSTANDING_PROPOSITIONS});var ID="investmentReminders",TASK_GET_OUTSTANDING_PROPOSITIONS="TASK_GET_OUTSTANDING_PROPOSITIONS",state2props=function state2props(state){return state[ID]}},"./src/client/components/Layout/DefaultLayout.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var _templateObject,react__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("./node_modules/react/index.js"),styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),_govuk_react_grid_col__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/@govuk-react/grid-col/dist/govuk-react-grid-col.esm.js"),_govuk_react_grid_row__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@govuk-react/grid-row/dist/govuk-react-grid-row.esm.js"),_Footer__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/Footer/index.jsx"),_Main__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/Main/index.jsx"),_LocalHeader_LocalHeader__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/client/components/LocalHeader/LocalHeader.jsx"),_DataHubHeader__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/components/DataHubHeader/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,react__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_25__),styled_components__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/lodash/lodash.js"),react_redux__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react-redux/es/index.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_unordered_list__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/@govuk-react/unordered-list/dist/govuk-react-unordered-list.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/colours.js"),_components_StatusMessage__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./src/client/components/StatusMessage/index.jsx"),_state__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/LocalHeader/state.js"),_actions__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./src/client/actions.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1?messages.map((function(_ref4){var body=_ref4.body,heading=_ref4.heading;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("li",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsxs)(StyledStatusMessage,{colour:messageColours[parts[0]],children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledHeading,{children:heading}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledBody,{dangerouslySetInnerHTML:{__html:body}})]})},body)})):messages.map((function(body,i){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)("li",{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledStatusMessage,{colour:messageColours[type],children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_23__.jsx)(StyledMessage,{dangerouslySetInnerHTML:{__html:body}})})},i)}))}))})},flashMessagePropTypes={flashMessages:prop_types__WEBPACK_IMPORTED_MODULE_25___default().shape({type:prop_types__WEBPACK_IMPORTED_MODULE_25___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_25___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_25___default().shape({body:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string.isRequired,heading:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string.isRequired,id:prop_types__WEBPACK_IMPORTED_MODULE_25___default().string})),prop_types__WEBPACK_IMPORTED_MODULE_25___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_25___default().string).isRequired])})};FlashMessages.propTypes=flashMessagePropTypes,FlashMessages.__docgenInfo={description:'Flash messages for users in different colours depending on the message.\n\nNote: If the props "flashMessages" are not passed down to the component then flash messages will be taken from session storage, if none exist in session storage then `null` is returned.',methods:[],displayName:"FlashMessages",props:{flashMessages:{description:"Contains the flash messages",type:{name:"shape",value:{type:{name:"union",value:[{name:"arrayOf",value:{name:"shape",value:{body:{name:"string",required:!0},heading:{name:"string",required:!0},id:{name:"string",required:!1}}}},{name:"arrayOf",value:{name:"string"}}],required:!1}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_18__.connect)(_state__WEBPACK_IMPORTED_MODULE_26__.H,(function(dispatch){return{getFlashMessages:function getFlashMessages(){dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_27__.YJ})},clearFlashMessages:function clearFlashMessages(){dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_27__.RJR})}}}))(FlashMessages)},"./src/client/components/LocalHeader/LocalHeader.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>LocalHeader_LocalHeader});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.string.link.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_main_esm=__webpack_require__("./node_modules/@govuk-react/main/dist/govuk-react-main.esm.js"),govuk_react_breadcrumbs_esm=__webpack_require__("./node_modules/@govuk-react/breadcrumbs/dist/govuk-react-breadcrumbs.esm.js"),react_router_dom=__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js"),colours=__webpack_require__("./src/client/utils/colours.js"),LocalHeaderHeading=__webpack_require__("./src/client/components/LocalHeader/LocalHeaderHeading.jsx");const LocalHeader_LocalSubHeader=(0,styled_components_browser_esm.ZP)("h2")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ","px;\n"])),govuk_react_constants_esm.nR.M);var LocalHeader_templateObject,_templateObject2,_templateObject3,FlashMessages=__webpack_require__("./src/client/components/LocalHeader/FlashMessages.jsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function LocalHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledHeader=(0,styled_components_browser_esm.ZP)("div")(LocalHeader_templateObject||(LocalHeader_templateObject=LocalHeader_taggedTemplateLiteral(["\n padding-bottom: ",";\n background-color: ",";\n padding-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5,colours.zT,govuk_react_constants_esm.N_.SCALE_3),StyledMain=(0,styled_components_browser_esm.ZP)(govuk_react_main_esm.Z)(_templateObject2||(_templateObject2=LocalHeader_taggedTemplateLiteral(["\n padding-top: 0;\n"]))),BreadcrumbsWrapper=(0,styled_components_browser_esm.ZP)(govuk_react_breadcrumbs_esm.Z)(_templateObject3||(_templateObject3=LocalHeader_taggedTemplateLiteral(["\n margin-bottom: ",";\n margin-top: 0;\n"])),govuk_react_constants_esm.N_.SCALE_5),StyledSuperheading=styled_components_browser_esm.ZP.div({fontSize:20,lineHeight:"32px"}),StyledLink=(0,styled_components_browser_esm.ZP)("a")({fontSize:20,display:"inline-block",fontFamily:"Arial, sans-serif",marginTop:8,marginBottom:8}),LocalHeader=function LocalHeader(_ref){var breadcrumbs=_ref.breadcrumbs,flashMessages=_ref.flashMessages,heading=_ref.heading,subheading=_ref.subheading,headingLink=_ref.headingLink,superheading=_ref.superheading,children=_ref.children,_ref$useReactRouter=_ref.useReactRouter,useReactRouter=void 0!==_ref$useReactRouter&&_ref$useReactRouter;return(0,jsx_runtime.jsx)(StyledHeader,{"aria-label":"local header","data-auto-id":"localHeader","data-test":"localHeader",role:"region",children:(0,jsx_runtime.jsxs)(StyledMain,{children:[(0,jsx_runtime.jsx)(BreadcrumbsWrapper,{"data-test":"breadcrumbs",children:null==breadcrumbs?void 0:breadcrumbs.map((function(breadcrumb){return breadcrumb.link?useReactRouter&&"Home"!==breadcrumb.text?(0,jsx_runtime.jsx)(govuk_react_breadcrumbs_esm.Z.Link,{as:react_router_dom.rU,to:breadcrumb.link,children:breadcrumb.text},breadcrumb.link):(0,jsx_runtime.jsx)(govuk_react_breadcrumbs_esm.Z.Link,{href:breadcrumb.link,children:breadcrumb.text},breadcrumb.link):breadcrumb.text}))}),(0,jsx_runtime.jsx)(FlashMessages.Z,{flashMessages}),superheading&&(0,jsx_runtime.jsx)(StyledSuperheading,{children:superheading}),headingLink&&(0,jsx_runtime.jsx)(StyledLink,{"data-test":"heading-link",href:headingLink.url,children:headingLink.text}),heading&&(0,jsx_runtime.jsx)(LocalHeaderHeading.Z,{"data-test":"heading",children:heading}),subheading&&(0,jsx_runtime.jsx)(LocalHeader_LocalSubHeader,{"data-test":"subheading",children:subheading}),children]})})};LocalHeader.displayName="LocalHeader",LocalHeader.propTypes={breadcrumbs:prop_types_default().arrayOf(prop_types_default().shape({link:prop_types_default().string,text:prop_types_default().string.isRequired})),flashMessages:prop_types_default().shape({type:prop_types_default().oneOfType([prop_types_default().arrayOf(prop_types_default().shape({body:prop_types_default().string.isRequired,heading:prop_types_default().string.isRequired,id:prop_types_default().string})),prop_types_default().arrayOf(prop_types_default().string).isRequired])}),heading:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),subheading:prop_types_default().string,headingLink:prop_types_default().shape({url:prop_types_default().string.isRequired,text:prop_types_default().string.isRequired}),superheading:prop_types_default().node,children:prop_types_default().node},LocalHeader.__docgenInfo={description:"The generic local header component.",methods:[],displayName:"LocalHeader",props:{useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},breadcrumbs:{description:"Contains the breadcrumbs",type:{name:"arrayOf",value:{name:"shape",value:{link:{name:"string",required:!1},text:{name:"string",required:!0}}}},required:!1},flashMessages:{description:"Contains the flash messages",type:{name:"shape",value:{type:{name:"union",value:[{name:"arrayOf",value:{name:"shape",value:{body:{name:"string",required:!0},heading:{name:"string",required:!0},id:{name:"string",required:!1}}}},{name:"arrayOf",value:{name:"string"}}],required:!1}}},required:!1},heading:{description:"Contains the heading text to be displayed",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},subheading:{description:"Contains the subheading text to be displayed",type:{name:"string"},required:!1},headingLink:{description:"Contains a link that appears above the heading",type:{name:"shape",value:{url:{name:"string",required:!0},text:{name:"string",required:!0}}},required:!1},superheading:{description:"Contains an item that renders above the heading (in the same position as the headingLink)",type:{name:"node"},required:!1},children:{description:"Contains an item that renders below the heading",type:{name:"node"},required:!1}}};const LocalHeader_LocalHeader=LocalHeader},"./src/client/components/LocalHeader/LocalHeaderHeading.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js");var _templateObject,styled_components__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_4__.ZP)("h1")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ","px;\n font-weight: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.nR.L,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_3__.Xw.bold)},"./src/client/components/LocalHeader/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID});var ID="flashMessages",state2props=function state2props(state){return state[ID]}},"./src/client/components/Main/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{W:()=>InnerContainer,Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var _styled,prop_types__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_19__),styled_components__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["children"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var OuterContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_18__.ZP)("main")({paddingTop:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_5,textAlign:"center"}),InnerContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_18__.ZP)("div")((_defineProperty(_styled={maxWidth:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.PL,marginLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_3,marginRight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_3,textAlign:"left"},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.qk.LARGESCREEN,{marginLeft:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_5,marginRight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_16__.N_.SCALE_5}),_defineProperty(_styled,"@media only screen and (min-width:1020px)",{margin:"0 auto"}),_styled)),Main=function Main(_ref){var children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(OuterContainer,_objectSpread(_objectSpread({},props),{},{role:"main",id:"main-content","data-test":"bodyMainContent",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsx)(InnerContainer,{children})}))};Main.displayName="Main",Main.propTypes={children:prop_types__WEBPACK_IMPORTED_MODULE_19___default().node},Main.defaultProps={children:void 0},Main.__docgenInfo={description:"The`
`is a layout component which wraps content inside the`
`HTML tag, this component also contains a grid container which will center the content in the page with the appropriate gutters and responsive behaviour we expect from [our grid](https://design-system.service.gov.uk/styles/layout/).\n\nIt's important that we include this in all pages as the`
`represents the dominant content of the``of the document, this also acts as a landmark which can help assistive technologies.",methods:[],displayName:"Main",props:{children:{defaultValue:{value:"undefined",computed:!0},description:"Text for main",type:{name:"node"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Main},"./src/client/components/Metadata/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Metadata});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledMetaWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n color: ",";\n"])),colours.E5),StyledItemLabel=(0,styled_components_browser_esm.ZP)("span")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n color: ",";\n"])),colours.au);function MetadataItem(_ref){var label=_ref.label,children=_ref.children;return(0,jsx_runtime.jsxs)(StyledMetaWrapper,{"data-test":"metadata-item",children:[label&&(0,jsx_runtime.jsx)(StyledItemLabel,{children:label})," ",children]})}MetadataItem.displayName="MetadataItem",MetadataItem.propTypes={label:prop_types_default().string,children:prop_types_default().node.isRequired},MetadataItem.defaultProps={label:null},MetadataItem.__docgenInfo={description:"",methods:[],displayName:"MetadataItem",props:{label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const Metadata_MetadataItem=MetadataItem;var Metadata_templateObject;var StyledMetadataWrapper=(0,styled_components_browser_esm.ZP)("div")(Metadata_templateObject||(Metadata_templateObject=function Metadata_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ",";\n line-height: ",";\n display: grid;\n\n & > * {\n margin-bottom: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.Kt.SIZE_27,govuk_react_constants_esm.N_.SCALE_1),Metadata=function Metadata(_ref){var rows=_ref.rows;return rows&&(0,jsx_runtime.jsx)(StyledMetadataWrapper,{"data-test":"metadata",children:rows.map((function(_ref2){var label=_ref2.label,value=_ref2.value;return(0,jsx_runtime.jsx)(Metadata_MetadataItem,{label,children:value},label)}))})};Metadata.propTypes={rows:prop_types_default().arrayOf(prop_types_default().shape({label:prop_types_default().node,value:prop_types_default().node}))},Metadata.defaultProps={rows:null},Metadata.__docgenInfo={description:"",methods:[],displayName:"Metadata",props:{rows:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"node",required:!1},value:{name:"node",required:!1}}}},required:!1}}};const components_Metadata=Metadata},"./src/client/components/MyInvestmentProjects/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>state2props,ID:()=>ID,t:()=>TASK_GET_MY_INVESTMENTS_LIST});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _utils_date__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/client/utils/date.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var _govuk_react_link__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_18__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["href","children","showWarning"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var NewWindowLink=function NewWindowLink(_ref){var href=_ref.href,children=_ref.children,_ref$showWarning=_ref.showWarning,showWarning=void 0===_ref$showWarning||_ref$showWarning,rest=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__.jsxs)(_govuk_react_link__WEBPACK_IMPORTED_MODULE_16__.Z,_objectSpread(_objectSpread({"data-test":"newWindowLink",href,rel:"noreferrer noopener",target:"_blank"},rest),{},{children:[children,showWarning&&" (opens in new tab)"]}))};NewWindowLink.displayName="NewWindowLink",NewWindowLink.propTypes={href:prop_types__WEBPACK_IMPORTED_MODULE_18___default().string.isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_18___default().node.isRequired,showWarning:prop_types__WEBPACK_IMPORTED_MODULE_18___default().bool},NewWindowLink.__docgenInfo={description:'When using a screen reader the aria-label attribute overrides\nthe link text entirely.\n\nWhen setting the aria-label ensure the text contains both\nmeaningful link text AND a warning.\n\n For example:\n\n Read more...\n\n\nGDS recommends to use (opens in new tab) as part of the link and not to mention \'window\'.\nhttps://design-system.service.gov.uk/styles/typography/#links',methods:[],displayName:"NewWindowLink",props:{showWarning:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},href:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=NewWindowLink},"./src/client/components/NotificationAlert/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>TASK_GET_REMINDER_SUMMARY,ID:()=>ID,a:()=>state2props});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _lib_urls__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./src/lib/urls.js"),_lib_urls__WEBPACK_IMPORTED_MODULE_15___default=__webpack_require__.n(_lib_urls__WEBPACK_IMPORTED_MODULE_15__);function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{$u:()=>Size,XF:()=>Count,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,bn:()=>Shape});__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_8__),styled_components__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/react/jsx-runtime.js"),Size={SMALL:20,MEDIUM:25},Shape=styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP.span((function(_ref){var size=_ref.size,digits=_ref.digits;return{display:"flex",justifyContent:"center",backgroundColor:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.hM,fontWeight:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Xw.bold,height:size,width:digits<3?size:size+10,borderRadius:digits<3?"50%":"75px"}})),Count=(0,styled_components__WEBPACK_IMPORTED_MODULE_7__.ZP)("span")({color:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.Cj,alignSelf:"center",fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.Kt.SIZE_14}),NotificationBadge=function NotificationBadge(_ref2){var value=_ref2.value,_ref2$size=_ref2.size,size=void 0===_ref2$size?Size.MEDIUM:_ref2$size;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Shape,{size,digits:value.toString().length,"aria-label":value,"data-test":"notification-badge",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(Count,{children:value<100?value:"99+"})})};NotificationBadge.displayName="NotificationBadge",NotificationBadge.propTypes={value:prop_types__WEBPACK_IMPORTED_MODULE_8___default().number},NotificationBadge.__docgenInfo={description:"",methods:[],displayName:"NotificationBadge",props:{size:{defaultValue:{value:"25",computed:!1},required:!1},value:{description:"Badge value",type:{name:"number"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=NotificationBadge},"./src/client/components/Pagination/RoutedPagination.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js");var _templateObject,_templateObject2,_templateObject3,_templateObject4,react__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_33___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_33__),styled_components__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),react_router_dom__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/react-router/esm/react-router.js"),qs__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./node_modules/qs/lib/index.js"),qs__WEBPACK_IMPORTED_MODULE_25___default=__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_25__),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_govuk_react_link__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./src/client/utils/colours.js"),_constants__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__("./src/client/components/Pagination/constants.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);itotalPages)){var newPager=getPager(items,page,pageSize);setPagerState(newPager),onChangePage(newPager)}},getPager=function getPager(totalItems,currentPage,pageSize){currentPage=currentPage||1,pageSize=pageSize||10;var totalPages=Math.ceil(totalItems/pageSize),_getStartAndEndPage=function getStartAndEndPage(totalPages,currentPage){var startPage,endPage;return totalPages<=10?(startPage=1,endPage=totalPages):currentPage<=6?(startPage=1,endPage=10):currentPage+4>=totalPages?(startPage=totalPages-9,endPage=totalPages):(startPage=currentPage-5,endPage=currentPage+4),{startPage,endPage}}(totalPages,currentPage),startPage=_getStartAndEndPage.startPage,endPage=_getStartAndEndPage.endPage,startIndex=(currentPage-1)*pageSize,endIndex=Math.min(startIndex+pageSize-1,totalItems-1),pages=_toConsumableArray(Array(endPage+1-startPage).keys()).map((function(i){return startPage+i}));return{totalItems,currentPage,pageSize,totalPages,startPage,endPage,startIndex,endIndex,pages}};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(react_router_dom__WEBPACK_IMPORTED_MODULE_31__.AW,{children:function children(_ref3){var history=_ref3.history,location=_ref3.location,qsParams=qs__WEBPACK_IMPORTED_MODULE_25___default().parse(location.search.slice(1)),handleOnClick=function handleOnClick(pageNumber,e){e.preventDefault(),setPage(pageNumber),history.push({search:qs__WEBPACK_IMPORTED_MODULE_25___default().stringify(_objectSpread(_objectSpread({},qsParams),{},{page:pageNumber}))})};return(null==pages?void 0:pages.length)>1?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledNav,{"data-test":"pagination","aria-label":"Pagination: total ".concat(totalPages),"data-total-pages":totalPages,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsxs)(StyledPaginationList,{children:[1!==currentPage&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationPiece,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationLink,{onClick:function onClick(e){return handleOnClick(currentPage-1,e)},"data-test":"previous",href:"#",children:_constants__WEBPACK_IMPORTED_MODULE_32__.v0})}),pages.map((function(page,index){var isActive=currentPage===page;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationPiece,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationLink,{$isActive:isActive,onClick:function onClick(e){return handleOnClick(page,e)},"data-page-number":page,"data-test":"".concat(isActive&&"page-number-active"),"aria-label":"Page ".concat(page),"aria-current":!!isActive&&"page",ref:function ref(el){return linkRefs.current[index]=el},href:"#",children:page})},index)})),currentPage!==totalPages&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationPiece,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(StyledPaginationLink,{onClick:function onClick(e){return handleOnClick(currentPage+1,e)},"data-test":"next",href:"#",children:_constants__WEBPACK_IMPORTED_MODULE_32__.bg})})]})}):null}})};Pagination.displayName="Pagination",Pagination.propTypes={items:prop_types__WEBPACK_IMPORTED_MODULE_33___default().number.isRequired,onChangePage:prop_types__WEBPACK_IMPORTED_MODULE_33___default().func,initialPage:prop_types__WEBPACK_IMPORTED_MODULE_33___default().number,pageSize:prop_types__WEBPACK_IMPORTED_MODULE_33___default().number},Pagination.__docgenInfo={description:"",methods:[],displayName:"Pagination",props:{pageSize:{defaultValue:{value:"10",computed:!1},description:"",type:{name:"number"},required:!1},onChangePage:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},initialPage:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},items:{description:"",type:{name:"number"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Pagination},"./src/client/components/Pagination/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FQ:()=>PAGINATION_PIECE_ELLIPSIS,MR:()=>PAGINATION_PIECE_PAGE_NUMBER,U7:()=>DEFAULT_MAX_PAGE_NUMBER_LINKS,bg:()=>PAGINATION_PIECE_NEXT,v0:()=>PAGINATION_PIECE_PREVIOUS});var PAGINATION_PIECE_PREVIOUS="Previous",PAGINATION_PIECE_ELLIPSIS="ellipsis",PAGINATION_PIECE_PAGE_NUMBER="page-number",PAGINATION_PIECE_NEXT="Next",DEFAULT_MAX_PAGE_NUMBER_LINKS=5},"./src/client/components/Pagination/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Pagination});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),constants=__webpack_require__("./src/client/components/Pagination/constants.js");const Pagination_computeVisiblePieces=function computeVisiblePieces(numberOfPages,activePage){var maxPageNumbers=arguments.length>2&&void 0!==arguments[2]?arguments[2]:constants.U7,visiblePieces=[],lowerLimit=activePage,upperLimit=Math.min(activePage,numberOfPages);visiblePieces.push({type:constants.v0,pageNumber:Math.max(1,activePage-1),isDisabled:1===activePage});for(var i=1;i1&&(lowerLimit-=1,i+=1),i1&&(visiblePieces.push({type:constants.MR,pageNumber:1,isActive:1===activePage}),activePage>4&&visiblePieces.push({type:constants.FQ}));for(var _i=lowerLimit;_i<=upperLimit;_i+=1)visiblePieces.push({type:constants.MR,pageNumber:_i,isActive:activePage===_i});return activePagemaxPageNumbers&&(visiblePieces.push({type:constants.FQ}),visiblePieces.push({type:constants.MR,pageNumber:numberOfPages,isActive:activePage===numberOfPages})),visiblePieces.push({type:constants.bg,pageNumber:Math.min(numberOfPages,activePage+1),isDisabled:activePage===numberOfPages}),visiblePieces};var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledNav=(0,styled_components_browser_esm.ZP)("nav")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n text-align: center;\n line-height: 1;\n display: flex;\n justify-content: space-around;\n padding: "," 0;\n\n "," {\n display: block;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.TABLET),StyledPaginationList=(0,styled_components_browser_esm.ZP)("ul")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n margin: 0;\n list-style: none;\n"]))),StyledPaginationPiece=(0,styled_components_browser_esm.ZP)("li")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: inline-block;\n\n & + & {\n margin-left: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_1),StyledPaginationLink=(0,styled_components_browser_esm.ZP)(govuk_react_link_esm.Z)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n font-weight: bold;\n font-size: ",";\n display: inline-block;\n padding: "," ",";\n line-height: 1.9em;\n color: ",";\n text-decoration: none;\n\n :hover {\n background-color: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_3,colours.su,colours.nx),StyledActivePaginationLink=(0,styled_components_browser_esm.ZP)(StyledPaginationLink)(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n :link {\n color: ",";\n background-color: ",";\n }\n"])),colours.Cj,colours.Ej),StyledPagesTruncation=(0,styled_components_browser_esm.ZP)("span")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n font-weight: bold;\n font-size: ",";\n display: inline-block;\n padding: ",";\n background-color: transparent;\n line-height: ",";\n color: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.Kt.SIZE_24,colours.TK);function Pagination(_ref){var totalPages=_ref.totalPages,_ref$activePage=_ref.activePage,activePage=void 0===_ref$activePage?1:_ref$activePage,_ref$getPageUrl=_ref.getPageUrl,getPageUrl=void 0===_ref$getPageUrl?function(){return"#"}:_ref$getPageUrl,onPageClick=_ref.onPageClick,visiblePieces=Pagination_computeVisiblePieces(totalPages,activePage);return totalPages<2?null:(0,jsx_runtime.jsx)(StyledNav,{"data-test":"pagination","data-total-pages":totalPages,"aria-label":"pagination: total ".concat(totalPages," pages"),children:(0,jsx_runtime.jsx)(StyledPaginationList,{children:visiblePieces.map((function(_ref2,index){var type=_ref2.type,pageNumber=_ref2.pageNumber,isActive=_ref2.isActive,isDisabled=_ref2.isDisabled,key="".concat(type,"-").concat(index),onClick=function onClick(event){event.target.blur(),event.preventDefault(),onPageClick(pageNumber,event),window.scrollTo({top:0})},PageNumberLink=isActive?StyledActivePaginationLink:StyledPaginationLink;return isDisabled?null:(0,jsx_runtime.jsxs)(StyledPaginationPiece,{children:[type===constants.v0&&(0,jsx_runtime.jsx)(StyledPaginationLink,{"data-test":"prev",onClick,href:getPageUrl(pageNumber),children:"Previous"}),type===constants.FQ&&(0,jsx_runtime.jsx)(StyledPagesTruncation,{"data-test":"ellipsis",children:"…"}),type===constants.MR&&(0,jsx_runtime.jsx)(PageNumberLink,{"data-test":isActive?"page-number-active":"page-number","data-page-number":pageNumber,"aria-label":"Page ".concat(pageNumber),"aria-current":!!isActive&&"page",onClick,href:getPageUrl(pageNumber),children:pageNumber}),type===constants.bg&&(0,jsx_runtime.jsx)(StyledPaginationLink,{"data-test":"next",onClick,href:getPageUrl(pageNumber),children:"Next"})]},key)}))})})}Pagination.displayName="Pagination",Pagination.propTypes={totalPages:prop_types_default().number.isRequired,activePage:prop_types_default().number,onPageClick:prop_types_default().func,getPageUrl:prop_types_default().func},Pagination.__docgenInfo={description:"",methods:[],displayName:"Pagination",props:{activePage:{defaultValue:{value:"1",computed:!1},description:"",type:{name:"number"},required:!1},getPageUrl:{defaultValue:{value:"() => '#'",computed:!1},description:"",type:{name:"func"},required:!1},totalPages:{description:"",type:{name:"number"},required:!0},onPageClick:{description:"",type:{name:"func"},required:!1}}};const components_Pagination=Pagination},"./src/client/components/Panel/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/react/index.js");var _templateObject,_templateObject2,prop_types__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_23__),styled_components__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["title","children"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js");var react_redux__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/react-redux/es/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__),ProtectedLink=function ProtectedLink(_ref){var module=_ref.module,modulePermissions=_ref.modulePermissions,_ref$children=_ref.children,children=void 0===_ref$children?null:_ref$children;return modulePermissions.includes(module)?children:null};ProtectedLink.propTypes={module:prop_types__WEBPACK_IMPORTED_MODULE_3___default().string.isRequired,modulePermissions:prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().string).isRequired,children:prop_types__WEBPACK_IMPORTED_MODULE_3___default().element};const __WEBPACK_DEFAULT_EXPORT__=(0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)((function(state){return state}))(ProtectedLink)},"./src/client/components/ReadMore/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var _templateObject,react__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("./node_modules/react/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_19__),styled_components__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_ButtonLink__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/ButtonLink/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>ReferralList});__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.sort.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _templateObject,react=__webpack_require__("./node_modules/react/index.js"),govuk_react_hint_text_esm=__webpack_require__("./node_modules/@govuk-react/hint-text/dist/govuk-react-hint-text.esm.js"),govuk_react_select_esm=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js"),pluralize=__webpack_require__("./node_modules/pluralize/pluralize.js"),pluralize_default=__webpack_require__.n(pluralize),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),ContentWithHeading=__webpack_require__("./src/client/components/ContentWithHeading.jsx"),govuk_react_ordered_list_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/@govuk-react/ordered-list/dist/govuk-react-ordered-list.esm.js")),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledOL=(0,styled_components_browser_esm.ZP)(govuk_react_ordered_list_esm.Z)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n & > * {\n margin-top: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_4);function StyledOrderedList(_ref){var children=_ref.children;return(0,jsx_runtime.jsx)(StyledOL,{listStyleType:"none",children})}StyledOrderedList.displayName="StyledOrderedList",StyledOrderedList.__docgenInfo={description:"",methods:[],displayName:"StyledOrderedList"};const components_StyledOrderedList=StyledOrderedList;var Task=__webpack_require__("./src/client/components/Task/index.jsx"),govuk_react_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js")),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),colours=__webpack_require__("./src/client/utils/colours.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),govuk_react_details_esm=__webpack_require__("./node_modules/@govuk-react/details/dist/govuk-react-details.esm.js"),govuk_react_button_esm=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),govuk_react_link_esm=__webpack_require__("./node_modules/@govuk-react/link/dist/govuk-react-link.esm.js"),url=__webpack_require__("./node_modules/url/url.js"),urls=__webpack_require__("./src/lib/urls.js"),urls_default=__webpack_require__.n(urls),client_state=__webpack_require__("./src/apps/companies/apps/referrals/details/client/state.js"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),components=__webpack_require__("./src/client/components/index.jsx"),actions=__webpack_require__("./src/client/actions.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["referrerUrl"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var format=__webpack_require__("./src/client/utils/date.js").format,AdviserDetails=function AdviserDetails(_ref){var name=_ref.name,email=_ref.email,team=_ref.team;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[name,email&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[", ",(0,jsx_runtime.jsx)("a",{href:"mailto:".concat(email),children:email})]}),team&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[", ",team]})]})};AdviserDetails.propTypes={name:prop_types_default().string.isRequired,email:prop_types_default().string,team:prop_types_default().string};(0,es.connect)((function(_ref2){var referrerUrl=_ref2.referrerUrl;return _objectSpread(_objectSpread({},_objectWithoutProperties(_ref2,_excluded)[client_state.ID]),{},{referrerUrl})}))((function(_ref3){var subject=_ref3.subject,referralId=_ref3.referralId,company=_ref3.company,contact=_ref3.contact,sendingAdviser=_ref3.sendingAdviser,receivingAdviser=_ref3.receivingAdviser,date=_ref3.date,notes=_ref3.notes,completed=_ref3.completed,interaction=_ref3.interaction,referrerUrl=_ref3.referrerUrl,cameFromHomePage=url.parse(referrerUrl).pathname===urls_default().companies.referrals.list();return(0,jsx_runtime.jsx)(Task.Z.Status,{name:"Referral details",id:"referralDetails",progressMessage:"loading referral details",startOnRender:{payload:referralId,onSuccessDispatch:actions.moN},children:function children(){return company&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(components.HF,{caption:subject,children:[(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Company",children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:urls_default().companies.detail(company.id),children:company.name})}),contact&&(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Contact",children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:urls_default().contacts.contact(contact.id),children:contact.name})}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Sending adviser",children:sendingAdviser&&(0,jsx_runtime.jsx)(AdviserDetails,_objectSpread({},sendingAdviser))}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Receiving adviser",children:receivingAdviser&&(0,jsx_runtime.jsx)(AdviserDetails,_objectSpread({},receivingAdviser))}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Date of referral",children:format(date)}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Notes",children:notes})]}),completed?(0,jsx_runtime.jsxs)(components.HF,{caption:"Referral accepted",children:[(0,jsx_runtime.jsx)(components.HF.Row,{heading:"Date",children:format(completed.on)}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"By",children:(0,jsx_runtime.jsx)(AdviserDetails,_objectSpread({},completed.by))}),(0,jsx_runtime.jsx)(components.HF.Row,{heading:"With interaction",children:(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:urls_default().interactions.detail(interaction.id),children:interaction.subject})})]}):(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(govuk_react_details_esm.Z,{summary:"Why can I not edit the referral?",children:[(0,jsx_runtime.jsx)("p",{children:"For now, you can't edit the referral once it's been sent."}),(0,jsx_runtime.jsx)("p",{children:"Contact the recipient if something's changed."})]}),(0,jsx_runtime.jsxs)(components.iN,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:govuk_react_link_esm.Z,href:urls_default().companies.referrals.interactions.create(company.id,referralId),children:"Accept referral"}),(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:govuk_react_link_esm.Z,href:urls_default().companies.referrals.help(company.id,referralId),children:"I cannot accept the referral"}),(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:cameFromHomePage?urls_default().companies.referrals.list():urls_default().companies.detail(company.id),children:"Back"})]})]})]})}})}));AdviserDetails.__docgenInfo={description:"",methods:[],displayName:"AdviserDetails",props:{name:{description:"",type:{name:"string"},required:!0},email:{description:"",type:{name:"string"},required:!1},team:{description:"",type:{name:"string"},required:!1}}};var Card_templateObject;__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.reflect.construct.js");function Card_typeof(o){return Card_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Card_typeof(o)}function _defineProperties(target,props){for(var i=0;i div {\n padding: ",";\n padding-bottom: ",";\n margin: "," 0 "," 4px;\n\n & > a {\n padding: "," 0 "," ",";\n }\n }\n\n "," {\n margin-top: -",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_3),CardDetails=function(_React$PureComponent){!function CardDetails_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&CardDetails_setPrototypeOf(subClass,superClass)}(CardDetails,_React$PureComponent);var _super=CardDetails_createSuper(CardDetails);function CardDetails(){var _this;!function CardDetails_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,CardDetails);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return CardDetails_defineProperty(CardDetails_assertThisInitialized(_this=_super.call.apply(_super,[this].concat(args))),"renderLink",(function(link){return link?(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:link.url,children:link.text}):null})),_this}return function CardDetails_createClass(Constructor,protoProps,staticProps){return protoProps&&CardDetails_defineProperties(Constructor.prototype,protoProps),staticProps&&CardDetails_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(CardDetails,[{key:"render",value:function render(){var _this2=this,_this$props=this.props,summary=_this$props.summary,showDetails=_this$props.showDetails,link=_this$props.link,_children=_this$props.children,summaryVisuallyHidden=_this$props.summaryVisuallyHidden,analyticsAccordionType=_this$props.analyticsAccordionType,SummaryWithHiddenContent=(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[summary,(0,jsx_runtime.jsx)(govuk_react_esm.TX,{children:summaryVisuallyHidden})]});return(0,jsx_runtime.jsx)(Analytics.Z,{children:function children(pushAnalytics){return(0,jsx_runtime.jsxs)(GovUkDetails,{summary:summaryVisuallyHidden?SummaryWithHiddenContent:summary,open:showDetails,onClick:function onClick(){pushAnalytics({event:"viewInteractionEngagement",extra:{accordionEngagement:"clicked",accordionType:analyticsAccordionType}})},children:[_children,_this2.renderLink(link)]})}})}}]),CardDetails}(react.PureComponent);CardDetails.displayName="CardDetails",CardDetails_defineProperty(CardDetails,"propTypes",{summary:prop_types_default().string.isRequired,summaryVisuallyHidden:prop_types_default().string,showDetails:prop_types_default().bool.isRequired,link:prop_types_default().shape({url:prop_types_default().string,text:prop_types_default().string}),children:prop_types_default().node.isRequired,analyticsAccordionType:prop_types_default().string}),CardDetails_defineProperty(CardDetails,"defaultProps",{link:null}),CardDetails.__docgenInfo={description:"",methods:[{name:"renderLink",docblock:null,modifiers:[],params:[{name:"link",type:null}],returns:null}],displayName:"CardDetails",props:{link:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"shape",value:{url:{name:"string",required:!1},text:{name:"string",required:!1}}},required:!1},summary:{description:"",type:{name:"string"},required:!0},summaryVisuallyHidden:{description:"",type:{name:"string"},required:!1},showDetails:{description:"",type:{name:"bool"},required:!0},children:{description:"",type:{name:"node"},required:!0},analyticsAccordionType:{description:"",type:{name:"string"},required:!1}}};__webpack_require__("./node_modules/core-js/modules/es.object.values.js");var CardHeader_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,govuk_react_heading_esm=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),govuk_react_list_item_esm=__webpack_require__("./node_modules/@govuk-react/list-item/dist/govuk-react-list-item.esm.js"),Badge=__webpack_require__("./src/client/components/Badge/index.jsx"),constants=__webpack_require__("./src/client/components/ActivityFeed/constants.js");function CardHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var CardHeader_format=__webpack_require__("./src/client/utils/date.js").format,StyledBlockText=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)(CardHeader_templateObject||(CardHeader_templateObject=CardHeader_taggedTemplateLiteral(["\n display: inline-block;\n font-weight: normal;\n color: white;\n padding: 2px 5px;\n background-color: ",";\n margin-bottom: ",";\n"])),(function(_ref){return _ref.sourceType===constants.EB.external?colours.TK:colours.Ej}),govuk_react_constants_esm.N_.SCALE_2),StyledCardHeader=(0,styled_components_browser_esm.ZP)("div")(_templateObject2||(_templateObject2=CardHeader_taggedTemplateLiteral(["\n display: flex;\n flex-flow: row wrap;\n"]))),StyledCompanyName=(0,styled_components_browser_esm.ZP)("div")(_templateObject3||(_templateObject3=CardHeader_taggedTemplateLiteral(["\n margin: -"," -"," "," -",";\n padding: "," ",";\n background: ",";\n font-size: initial;\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_3,colours.zT),StyledHeadingWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject4||(_templateObject4=CardHeader_taggedTemplateLiteral(["\n width: 100%;\n\n "," {\n width: 0;\n flex-grow: 1;\n }\n"])),govuk_react_constants_esm.qk.TABLET),StyledHeading=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)(_templateObject5||(_templateObject5=CardHeader_taggedTemplateLiteral(["\n font-weight: normal;\n font-size: ","px;\n\n & > a:link,\n a:visited,\n a:hover,\n a:active {\n text-decoration: none;\n color: ",";\n }\n\n "," {\n margin-bottom: ",";\n }\n"])),govuk_react_constants_esm.nR.MEDIUM,colours.Ej,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_5),StyledSubHeading=(0,styled_components_browser_esm.ZP)("span")(_templateObject6||(_templateObject6=CardHeader_taggedTemplateLiteral(["\n font-weight: normal;\n font-size: ","px;\n margin-left: ","px;\n color: ",";\n"])),govuk_react_constants_esm.VN.MEDIUM,govuk_react_constants_esm.TF[1],colours.TK),StyledMetaItems=(0,styled_components_browser_esm.ZP)("ul")(_templateObject7||(_templateObject7=CardHeader_taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n\n li {\n font-size: ",";\n margin-bottom: ",";\n text-align: right;\n display: inline;\n\n "," {\n display: block;\n }\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.qk.TABLET),CardHeader=function CardHeader(_ref2){var blockText=_ref2.blockText,subHeading=_ref2.subHeading,company=_ref2.company,sourceType=_ref2.sourceType,heading=_ref2.heading,startTime=_ref2.startTime,badge=_ref2.badge,_ref2$headingLevel=_ref2.headingLevel,headingLevel=void 0===_ref2$headingLevel?3:_ref2$headingLevel;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[company&&company.name&&(0,jsx_runtime.jsx)(StyledCompanyName,{children:company.name}),(0,jsx_runtime.jsxs)(StyledCardHeader,{children:[(0,jsx_runtime.jsxs)(StyledHeadingWrapper,{children:[blockText&&(0,jsx_runtime.jsx)(StyledBlockText,{sourceType,children:blockText}),subHeading&&(0,jsx_runtime.jsx)(StyledSubHeading,{children:subHeading}),heading&&(0,jsx_runtime.jsx)(StyledHeading,{level:headingLevel,children:heading})]}),(0,jsx_runtime.jsxs)(StyledMetaItems,{children:[startTime&&(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:CardHeader_format(startTime)}),badge&&(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:(0,jsx_runtime.jsx)(Badge.Z,{borderColour:badge.borderColour,children:badge.text})})]})]})]})};CardHeader.propTypes={startTime:prop_types_default().string,heading:prop_types_default().node,blockText:prop_types_default().string,subHeading:prop_types_default().string,company:prop_types_default().shape({name:prop_types_default().string}),sourceType:prop_types_default().oneOf(Object.values(constants.EB)),badge:prop_types_default().shape({text:prop_types_default().string,borderColour:prop_types_default().string})},CardHeader.__docgenInfo={description:"",methods:[],displayName:"CardHeader",props:{headingLevel:{defaultValue:{value:"3",computed:!1},required:!1},startTime:{description:"",type:{name:"string"},required:!1},heading:{description:"",type:{name:"node"},required:!1},blockText:{description:"",type:{name:"string"},required:!1},subHeading:{description:"",type:{name:"string"},required:!1},company:{description:"",type:{name:"shape",value:{name:{name:"string",required:!1}}},required:!1},sourceType:{description:"",type:{name:"enum",computed:!0,value:"Object.values(SOURCE_TYPES)"},required:!1},badge:{description:"",type:{name:"shape",value:{text:{name:"string",required:!1},borderColour:{name:"string",required:!1}}},required:!1}}};const card_CardHeader=CardHeader;var CardTable_templateObject,govuk_react_table_esm=__webpack_require__("./node_modules/@govuk-react/table/dist/govuk-react-table.esm.js");function CardTable_typeof(o){return CardTable_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CardTable_typeof(o)}function CardTable_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function CardTable_defineProperties(target,props){for(var i=0;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledLabel=styled_components_browser_esm.ZP.label({display:"flex",alignItems:"baseline"}),StyledSelectInput=(0,styled_components_browser_esm.ZP)(govuk_react_select_esm.lq)({marginLeft:10,"&":{width:"initial"}});const ReferralList=(0,multiinstance.ZP)({name:"ReferralList",reducer:function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{filter:"received"},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,result=_ref.result,filter=_ref.filter;switch(type){case actions.f3J:return reducer_objectSpread(reducer_objectSpread({},state),{},{referrals:result});case actions.kQr:return reducer_objectSpread(reducer_objectSpread({},state),{},{filter});default:return state}},dispatchToProps:function dispatchToProps(dispatch){return{onFilterChange:function onFilterChange(filter){return dispatch({type:actions.kQr,filter})}}},actionPattern:"REFERRAL_LIST__",component:function component(_ref){var id=_ref.id,referrals=_ref.referrals,onFilterChange=_ref.onFilterChange,filter=_ref.filter;return(0,jsx_runtime.jsx)(Task.Z.Status,{name:"Referrals",id,progressMessage:"Loading referrals",startOnRender:{onSuccessDispatch:actions.f3J},children:function children(){if(referrals){var filteredReferrals=referrals.filter((function(_ref2){return _ref2.direction===filter})).sort((function(a,b){return new Date(b.date)-new Date(a.date)}));return(0,jsx_runtime.jsx)(ContentWithHeading.Z,{heading:pluralize_default()("".concat(filter," referral"),filteredReferrals.length,!0),headingActions:(0,jsx_runtime.jsxs)(StyledLabel,{htmlFor:"view-referrals",children:["View",(0,jsx_runtime.jsxs)(StyledSelectInput,{value:filter,id:"view-referrals",onChange:function onChange(e){return onFilterChange(e.target.value)},children:[(0,jsx_runtime.jsx)("option",{value:"received","aria-label":"received-referrals",children:"Received referrals"}),(0,jsx_runtime.jsx)("option",{value:"sent","aria-label":"sent-referrals",children:"Sent referrals"})]})]}),children:referrals.length?(0,jsx_runtime.jsx)(components_StyledOrderedList,{children:filteredReferrals.map((function(_ref3){var id=_ref3.id,referral=ReferralList_objectWithoutProperties(_ref3,ReferralList_excluded);return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(ReferralList_Referral,ReferralList_objectSpread({id},referral))},id)}))}):(0,jsx_runtime.jsxs)(govuk_react_hint_text_esm.Z,{children:["You have not received or sent any referrals.",(0,jsx_runtime.jsx)("br",{}),"You can refer companies to other advisers from a company page."]})})}}})}})},"./src/client/components/Resource/Company.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("./src/client/components/Resource/Resource.jsx").ST)("Company",(function(id){return"v4/company/".concat(id)}))},"./src/client/components/Resource/Contact.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("./src/client/components/Resource/Resource.jsx").ST)("Contact",(function(id){return"v3/contact/".concat(id)}))},"./src/client/components/Resource/Resource.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{F6:()=>createCollectionResource,KZ:()=>createMetadataResource,ST:()=>createEntityResource,ZP:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var lodash__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/lodash/lodash.js"),lodash__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_20__),prop_types__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_28___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_28__),_utils_multiinstance__WEBPACK_IMPORTED_MODULE_22__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./src/client/utils/multiinstance.js")),_Task_utils__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./src/client/components/Task/utils.js"),_Task__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/components/Task/index.jsx"),_Task_LoadingBox__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/components/Task/LoadingBox.jsx"),_utils__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/utils/index.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{qN:()=>Company.Z,SF:()=>Contact.Z,_Q:()=>Countries,F_:()=>RelatedCompaniesCount});var Resource=__webpack_require__("./src/client/components/Resource/Resource.jsx");(0,Resource.ST)("Adviser",(function(id){return"adviser/".concat(id,"/")})),(0,Resource.KZ)("AssetClasses","capital-investment/asset-class-interest"),(0,Resource.KZ)("BusinessActivity","investment-business-activity");var Company=__webpack_require__("./src/client/components/Resource/Company.js");(0,Resource.ST)("CompanyContacts",(function(id){return"v4/contact?company_id=".concat(id)})),(0,Resource.ST)("CompanyObjectivesCount",(function(id){return"v4/company/".concat(id,"/objective/count")})),(0,Resource.ST)("CompanyObjectives",(function(id){return"v4/company/".concat(id,"/objective?sortby=target_date")})),(0,Resource.ST)("CompanyOneListTeam",(function(id){return"v4/company/".concat(id,"/one-list-group-core-team")})),(0,Resource.KZ)("ConstructionRisks","capital-investment/construction-risk");var Contact=__webpack_require__("./src/client/components/Resource/Contact.js");(0,Resource.ST)("ContactAuditHistory",(function(id){return"v3/contact/".concat(id,"/audit")}));const Countries=(0,Resource.KZ)("Countries","country"),RelatedCompaniesCount=((0,Resource.KZ)("DealTicketSizes","capital-investment/deal-ticket-size"),(0,Resource.KZ)("DeliveryPartners","investment-delivery-partner"),(0,Resource.KZ)("DesiredDealRoles","capital-investment/desired-deal-role"),(0,Resource.ST)("Event",(function(id){return"v3/event/".concat(id)})),(0,Resource.KZ)("ExportExperience","export-experience"),(0,Resource.KZ)("ExportExperienceCategory","export-experience-category"),(0,Resource.KZ)("ExportYears","export-years"),(0,Resource.KZ)("FDITypes","fdi-type"),(0,Resource.KZ)("FDIValues","fdi-value"),(0,Resource.ST)("Interaction",(function(id){return"v4/interaction/".concat(id)})),(0,Resource.F6)("Interactions","v4/interaction"),(0,Resource.ST)("Investment",(function(id){return"v3/investment/".concat(id)})),(0,Resource.ST)("InvestmentEvidence",(function(id){return"v3/investment/".concat(id,"/evidence-document")})),(0,Resource.KZ)("InvestmentProjectStages","investment-project-stage"),(0,Resource.KZ)("InvestmentTypes","investment-type"),(0,Resource.KZ)("InvestorType","capital-investment/investor-type"),(0,Resource.KZ)("InvestmentInvestorTypes","investment-investor-type"),(0,Resource.F6)("InvestmentProjectTasks","v4/investmentprojecttask"),(0,Resource.KZ)("LargeCapitalInvestmentEquityPercentages","capital-investment/equity-percentage"),(0,Resource.KZ)("LargeCapitalInvestmentRestrictions","capital-investment/restriction"),(0,Resource.KZ)("LargeCapitalInvestmentReturnRates","capital-investment/return-rate"),(0,Resource.KZ)("LargeCapitalInvestmentTypes","capital-investment/large-capital-investment-type"),(0,Resource.ST)("LargeInvestorProfile",(function(id){return"v4/large-investor-profile?investor_company_id=".concat(id)})),(0,Resource.KZ)("LevelOfInvolvement","investment-involvement"),(0,Resource.KZ)("LikelihoodToLand","likelihood-to-land"),(0,Resource.KZ)("OneListTiers","one-list-tier"),(0,Resource.ST)("Opportunity",(function(id){return"v4/large-capital-opportunity/".concat(id)})),(0,Resource.KZ)("OpportunityStatuses","large-capital-opportunity/opportunity-status"),(0,Resource.KZ)("OpportunityValueType","large-capital-opportunity/opportunity-value-type"),(0,Resource.ST)("Order",(function(id){return"v3/omis/order/".concat(id)})),(0,Resource.ST)("OrderAssignees",(function(id){return"v3/omis/order/".concat(id,"/assignee")})),(0,Resource.KZ)("OrderCancellationReasons","order-cancellation-reason"),(0,Resource.ST)("OrderInvoice",(function(id){return"v3/omis/order/".concat(id,"/invoice")})),(0,Resource.KZ)("OrderServiceTypes","order-service-type"),(0,Resource.ST)("OrderSubscribers",(function(id){return"v3/omis/order/".concat(id,"/subscriber-list")})),(0,Resource.ST)("ProjectDocument",(function(id){return id})),(0,Resource.ST)("Proposition",(function(id){return id})),(0,Resource.F6)("Propositions","v4/proposition"),(0,Resource.ST)("PropositionEvidence",(function(id){return id})),(0,Resource.KZ)("ReferralSourceActivity","referral-source-activity"),(0,Resource.KZ)("ReferralSourceMarketing","referral-source-marketing"),(0,Resource.KZ)("ReferralSourceWebsite","referral-source-website"),(0,Resource.KZ)("RequiredChecksConducted","capital-investment/required-checks-conducted"),(0,Resource.ST)("RelatedCompaniesCount",(function(id){return"v4/dnb/".concat(id,"/related-companies/count?include_manually_linked_companies=true")})));(0,Resource.KZ)("SalaryRanges","salary-range"),(0,Resource.KZ)("Sector","sector"),(0,Resource.KZ)("StrategicDrivers","investment-strategic-driver"),(0,Resource.KZ)("SpecificProgrammes","investment-specific-programme"),(0,Resource.ST)("Task",(function(id){return"v4/task/".concat(id)})),(0,Resource.KZ)("TimeHorizons","capital-investment/time-horizon"),(0,Resource.KZ)("UKRegions","uk-region")},"./src/client/components/RoutedInput/Filter.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var styled_components__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/client/utils/colours.js"),___WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/components/RoutedInput/index.jsx");const __WEBPACK_DEFAULT_EXPORT__=(0,styled_components__WEBPACK_IMPORTED_MODULE_3__.ZP)(___WEBPACK_IMPORTED_MODULE_2__.Z)({fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_0__.Kt.SIZE_16,lineHeight:"25px",padding:"6px 10px",marginTop:5,border:"2px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_1__.E5),appearance:null,display:"block",boxSizing:"border-box",width:"100%","&:focus":{outline:"3px solid ".concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_1__.tL),outlineOffset:0}})},"./src/client/components/RoutedInput/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_RoutedInput});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js");var react=__webpack_require__("./node_modules/react/index.js"),govuk_react_input_esm=__webpack_require__("./node_modules/@govuk-react/input/dist/govuk-react-input.esm.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),react_router=__webpack_require__("./node_modules/react-router/esm/react-router.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js");__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedInput=function RoutedInput(_ref){var qsParam=_ref.qsParam,_onChange=_ref.onChange,onEnter=_ref.onEnter,reset=_ref.reset,_ref$qsValue=_ref.qsValue,qsValue=void 0===_ref$qsValue?"":_ref$qsValue,_ref$value=_ref.value,value=void 0===_ref$value?qsValue:_ref$value,selectedValue=_ref.selectedValue,type=(_ref.dispatch,_ref.staticContext,_ref.id,_ref.type),props=_objectWithoutProperties(_ref,_excluded),_useTextCaretPosition=function useTextCaretPosition(){var _useState2=_slicedToArray((0,react.useState)(0),2),start=_useState2[0],setStart=_useState2[1],_useState4=_slicedToArray((0,react.useState)(0),2),end=_useState4[0],setEnd=_useState4[1],inputRef=(0,react.useRef)(null),updateTextCaret=(0,react.useCallback)((function(){if("text"===inputRef.current.type){var _inputRef$current=inputRef.current,selectionStart=_inputRef$current.selectionStart,selectionEnd=_inputRef$current.selectionEnd;setStart(selectionStart),setEnd(selectionEnd)}}),[]);return(0,react.useEffect)((function(){"text"===inputRef.current.type&&inputRef.current.setSelectionRange(start,end)})),{start,end,ref:inputRef,updateTextCaret}}(),ref=_useTextCaretPosition.ref,updateTextCaret=_useTextCaretPosition.updateTextCaret;return(0,react.useEffect)((function(){!qsValue&&selectedValue&&reset()}),[selectedValue,qsValue]),(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var history=_ref2.history,location=_ref2.location,qsParams=lib_default().parse(location.search.slice(1)),writeQs=function writeQs(){return history.replace({search:lib_default().stringify(_objectSpread(_objectSpread({},qsParams),{},_defineProperty({},qsParam,value)))})};return(0,jsx_runtime.jsx)(govuk_react_input_esm.Z,_objectSpread(_objectSpread({},props),{},{ref,value,type,onChange:function onChange(e){_onChange(e.target.value),updateTextCaret()},onKeyDown:function onKeyDown(e){"Enter"===e.key&&(onEnter(e.target.value),writeQs())},onBlur:writeQs}))}})};RoutedInput.displayName="RoutedInput",RoutedInput.propTypes={qsParam:prop_types_default().string.isRequired,type:prop_types_default().string};const components_RoutedInput=(0,multiinstance.ZP)({name:"RoutedInput",actionPattern:"ROUTED_INPUT__",component:RoutedInput,dispatchToProps:function dispatchToProps(dispatch){return{onChange:function onChange(value){return dispatch({type:actions.kB3,value})},onEnter:function onEnter(selectedValue){return dispatch({type:actions.Yf4,selectedValue})},reset:function reset(){return dispatch({type:actions.Kp3})}}},componentStateToProps:function componentStateToProps(cs,_ref3,_ref4){var router=_ref3.router,qsParam=_ref4.qsParam,qsValue=lib_default().parse(router.location.search.slice(1))[qsParam];return _objectSpread(_objectSpread({},cs),{},{qsValue})},reducer:function reducer(state,_ref5){var type=_ref5.type,value=_ref5.value,selectedValue=_ref5.selectedValue;switch(type){case actions.kB3:return _objectSpread(_objectSpread({},state),{},{value});case actions.Yf4:return _objectSpread(_objectSpread({},state),{},{selectedValue});case actions.Kp3:return{};default:return state}}})},"./src/client/components/RoutedInputField/Filter.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var styled_components__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_20__),_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/RoutedInput/Filter.js"),_FilterLabel__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/FilterLabel.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["label"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledFilterLabel=(0,styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP)(_FilterLabel__WEBPACK_IMPORTED_MODULE_17__.Z)({marginBottom:32}),RoutedInputFieldFilter=function RoutedInputFieldFilter(_ref){var label=_ref.label,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(StyledFilterLabel,{children:[label,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__.Z,_objectSpread({},props))]})};RoutedInputFieldFilter.displayName="RoutedInputFieldFilter",RoutedInputFieldFilter.propTypes={label:prop_types__WEBPACK_IMPORTED_MODULE_20___default().node.isRequired},RoutedInputFieldFilter.__docgenInfo={description:"",methods:[],displayName:"RoutedInputFieldFilter",props:{label:{description:"",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=RoutedInputFieldFilter},"./src/client/components/RoutedNumericRangeField/Filter.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_20__),styled_components__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./src/client/components/RoutedInput/Filter.js"),_FilterLabel__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/FilterLabel.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["id","qsParam","label"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledContainer=styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP.div({display:"flex",alignItems:"baseline"}),StyledDivider=styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP.div({padding:"0.5rem"}),StyledFieldset=styled_components__WEBPACK_IMPORTED_MODULE_19__.ZP.fieldset({marginBottom:32}),RoutedNumericRangeField=function RoutedNumericRangeField(_ref){var id=_ref.id,qsParam=_ref.qsParam,label=_ref.label,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(StyledFieldset,_objectSpread(_objectSpread({},props),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_FilterLabel__WEBPACK_IMPORTED_MODULE_17__.Z,{as:"legend",children:label}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsxs)(StyledContainer,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__.Z,{id:"".concat(id,"-min"),qsParam:"".concat(qsParam,"_min"),type:"number",placeholder:"No min","aria-label":"".concat(label," min")}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(StyledDivider,{children:"-"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_RoutedInput_Filter__WEBPACK_IMPORTED_MODULE_16__.Z,{id:"".concat(id,"-max"),qsParam:"".concat(qsParam,"_max"),type:"number",placeholder:"No max","aria-label":"".concat(label," max")})]})]}))};RoutedNumericRangeField.displayName="RoutedNumericRangeField",RoutedNumericRangeField.propTypes={label:prop_types__WEBPACK_IMPORTED_MODULE_20___default().node.isRequired,id:prop_types__WEBPACK_IMPORTED_MODULE_20___default().string.isRequired,qsParam:prop_types__WEBPACK_IMPORTED_MODULE_20___default().string.isRequired},RoutedNumericRangeField.__docgenInfo={description:"",methods:[],displayName:"RoutedNumericRangeField",props:{label:{description:"",type:{name:"node"},required:!0},id:{description:"",type:{name:"string"},required:!0},qsParam:{description:"",type:{name:"string"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=RoutedNumericRangeField},"./src/client/components/RoutedRelatedCompaniesCheckboxGroup/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{B:()=>INCLUDE_RELATED_COMPANIES,v:()=>INCLUDE_RELATED_COMPANIES_DISABLED_SUBSIDIARY});__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var react__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("./node_modules/react/index.js"),_govuk_react_button__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var SecondaryButton=react__WEBPACK_IMPORTED_MODULE_15__.forwardRef((function(props,ref){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_govuk_react_button__WEBPACK_IMPORTED_MODULE_16__.Z,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var govuk_react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js");const __WEBPACK_DEFAULT_EXPORT__=(0,__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js").ZP)(govuk_react__WEBPACK_IMPORTED_MODULE_0__.JF)({marginBottom:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.N_.SCALE_3})},"./src/client/components/StatusMessage/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var _templateObject,prop_types__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__),styled_components__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./src/client/utils/colours.js");var StatusMessage=(0,styled_components__WEBPACK_IMPORTED_MODULE_6__.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border: ",";\n color: ",";\n font-weight: bold;\n line-height: 1.5;\n ",";\n ",";\n ",";\n"])),(function(_ref){var colour=_ref.colour;return"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.N_.SCALE_1," solid ").concat(colour)}),(function(_ref2){return _ref2.colour}),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_3__.W0.responsivePadding(4),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_3__.W0.withWhiteSpace({marginBottom:6}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_4__.jw);StatusMessage.propTypes={colour:prop_types__WEBPACK_IMPORTED_MODULE_7___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_7___default().node.isRequired},StatusMessage.defaultProps={colour:_client_utils_colours__WEBPACK_IMPORTED_MODULE_5__.Ej,role:"alert","data-test":"status-message"};const __WEBPACK_DEFAULT_EXPORT__=StatusMessage},"./src/client/components/SummaryList/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/react/index.js");var lodash__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_24__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_excluded=["rows"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledInnerRow=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n padding: "," 0;\n\n "," {\n display: inline-flex;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_2,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.qk.TABLET),StyledDL=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("dl")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n "," {\n display: flex;\n flex-direction: column;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.qk.TABLET),StyledDT=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("dt")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n padding-right: ",";\n width: 30%;\n font-weight: bold;\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_21__.N_.SCALE_4),StyledDD=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("dd")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n width: 70%;\n"]))),SummaryList=function SummaryList(_ref){var rows=_ref.rows,rest=_objectWithoutProperties(_ref,_excluded);return rows?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(StyledDL,_objectSpread(_objectSpread({},rest),{},{children:rows.filter((function(r){return!(0,lodash__WEBPACK_IMPORTED_MODULE_20__.isEmpty)(r)&&!(0,lodash__WEBPACK_IMPORTED_MODULE_20__.isEmpty)(r.value)})).map((function(_ref2){var label=_ref2.label,value=_ref2.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(StyledInnerRow,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(StyledDT,{children:label}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(StyledDD,{children:Array.isArray(value)?value.join(", "):value})]},label)}))})):null};SummaryList.propTypes={rows:prop_types__WEBPACK_IMPORTED_MODULE_24___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_24___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,value:prop_types__WEBPACK_IMPORTED_MODULE_24___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,prop_types__WEBPACK_IMPORTED_MODULE_24___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_24___default().node)])}))},SummaryList.defaultProps={rows:null},SummaryList.__docgenInfo={description:"A styled version of a description list, with terms and descriptions.",methods:[],displayName:"SummaryList",props:{rows:{defaultValue:{value:"null",computed:!1},description:"Items to display in the list",type:{name:"arrayOf",value:{name:"shape",value:{label:{name:"node",required:!1},value:{name:"union",value:[{name:"node"},{name:"arrayOf",value:{name:"node"}}],required:!1}}}},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=SummaryList},"./src/client/components/SummaryTable/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js");var _govuk_react_table__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/table/dist/govuk-react-table.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_29__=(__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/prop-types/index.js")),prop_types__WEBPACK_IMPORTED_MODULE_29___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_29__),lodash__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/lodash/lodash.js"),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./src/client/utils/colours.js"),_utils_number_utils__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/utils/number-utils.js"),_Tag__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__("./src/client/components/Tag/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_excluded=["caption","actions","children"],_excluded2=["heading","value","emptyValue"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledTable=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n & > tbody th {\n width: 30%;\n }\n & > caption {\n ",";\n margin-bottom: ",";\n }\n & > tbody > tr:first-child {\n border-top: 1px solid ",";\n }\n & > caption > * {\n ",";\n float: right;\n margin-left: ",";\n }\n"])),_govuk_react_lib__WEBPACK_IMPORTED_MODULE_22__.cp.font({size:24,weight:"bold"}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_4,_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__.FU,_govuk_react_lib__WEBPACK_IMPORTED_MODULE_22__.cp.font({size:19,weight:"bold"}),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_3),StyledCellList=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)("ul")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n"]))),StyledTag=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_Tag__WEBPACK_IMPORTED_MODULE_26__.Z)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n float: right;\n"]))),SummaryTable=function SummaryTable(_ref){var caption=_ref.caption,actions=_ref.actions,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTable,_objectSpread(_objectSpread({caption:caption&&[caption,actions]},rest),{},{children}))};SummaryTable.displayName="SummaryTable";var StyledTableRow=(0,styled_components__WEBPACK_IMPORTED_MODULE_28__.ZP)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z.Row)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n font-size: ",";\n line-height: ",";\n white-space: pre-wrap;\n\n /* Conditionally apply the red border when flag is false */\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Kt.SIZE_16,_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Ac.SIZE_24,(function(props){return props.invalid&&"\n border-left: ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.Ok," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_24__.h,";\n margin-right: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_3,";\n padding-left: ").concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_23__.N_.SCALE_2,";\n ")}));SummaryTable.Row=function(_ref2){var heading=_ref2.heading,children=_ref2.children,hideWhenEmpty=_ref2.hideWhenEmpty,flag=_ref2.flag;if(hideWhenEmpty&&(0,lodash__WEBPACK_IMPORTED_MODULE_21__.isEmpty)(children))return null;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsxs)(StyledTableRow,{invalid:flag,children:[heading&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z.CellHeader,{children:heading}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(_govuk_react_table__WEBPACK_IMPORTED_MODULE_19__.Z.Cell,{children:function renderChildren(){return Array.isArray(children)?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledCellList,{children:children.filter((function(c){return c})).map((function(c){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)("li",{children:c},c)}))}):children}()})]})},SummaryTable.TextRow=function(_ref3){var heading=_ref3.heading,value=_ref3.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(SummaryTable.Row,{heading,children:value||(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTag,{children:"incomplete"})})},SummaryTable.CurrencyRow=function(_ref4){var heading=_ref4.heading,value=_ref4.value;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(SummaryTable.Row,{heading,children:value?(0,_utils_number_utils__WEBPACK_IMPORTED_MODULE_25__.mk)(value):(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTag,{children:"incomplete"})})},SummaryTable.ListRow=function(_ref5){var heading=_ref5.heading,value=_ref5.value,emptyValue=_ref5.emptyValue,rest=_objectWithoutProperties(_ref5,_excluded2);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(SummaryTable.Row,_objectSpread(_objectSpread({heading},rest),{},{children:value&&value.length?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)("ul",{children:value.map((function(v,i){return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)("li",{children:v.label},"".concat(heading,"-").concat(i))}))}):void 0===emptyValue?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_27__.jsx)(StyledTag,{children:"incomplete"}):emptyValue}))},SummaryTable.propTypes={caption:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,actions:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node,children:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node},SummaryTable.defaultProps={caption:null,actions:null,children:null},SummaryTable.Row.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,children:prop_types__WEBPACK_IMPORTED_MODULE_29___default().node},SummaryTable.Row.defaultProps={heading:null,children:null},SummaryTable.TextRow.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string},SummaryTable.TextRow.defaultProps={heading:null,value:null},SummaryTable.CurrencyRow.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().number},SummaryTable.CurrencyRow.defaultProps={heading:null,value:null},SummaryTable.ListRow.propTypes={heading:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_29___default().shape({label:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string,value:prop_types__WEBPACK_IMPORTED_MODULE_29___default().string}))},SummaryTable.ListRow.defaultProps={heading:null,value:[]},SummaryTable.__docgenInfo={description:"",methods:[{name:"Row",docblock:null,modifiers:["static"],params:[{name:"{ heading, children, hideWhenEmpty, flag }",type:null}],returns:null},{name:"TextRow",docblock:null,modifiers:["static"],params:[{name:"{ heading, value }",type:null}],returns:null},{name:"CurrencyRow",docblock:null,modifiers:["static"],params:[{name:"{ heading, value }",type:null}],returns:null},{name:"ListRow",docblock:null,modifiers:["static"],params:[{name:"{ heading, value, emptyValue, ...rest }",type:null}],returns:null}],displayName:"SummaryTable",props:{caption:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=SummaryTable},"./src/client/components/TabNav/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_TabNav});__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),react_router=__webpack_require__("./node_modules/react-router/esm/react-router.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),actions=__webpack_require__("./src/client/actions.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i *:not(:last-child)":{marginRight:5}})),StyledTabpanel=(0,styled_components_browser_esm.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n"])),(function(_ref7){var theme=_ref7.theme;return theme.tabNav?"\n border: ".concat((0,lodash.get)(theme,"tabNav.tabPanel.border"),";\n padding: ").concat((0,lodash.get)(theme,"tabNav.tabPanel.padding"),";\n margin-bottom: ").concat((0,lodash.get)(theme,"tabNav.tabPanel.marginBottom"),";\n "):"\n margin-top: 15px;\n ".concat(govuk_react_constants_esm.qk.TABLET," {\n margin-top: 30px;\n }\n ")})),createId=function createId(id,key,routed){return routed?"".concat(id,".tab.").concat(key.replace("/","_")):"tab.".concat(key)};function getContent(tabs,keys,selectedTab){if(keys.includes(selectedTab))return tabs[selectedTab].content;var _step,_iterator=function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function F(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}(keys);try{for(_iterator.s();!(_step=_iterator.n()).done;){var key=_step.value;if(key.length>1&&selectedTab.startsWith(key))return tabs[key].content}}catch(err){_iterator.e(err)}finally{_iterator.f()}}var TabNav=function TabNav(_ref8){var selectedIndex=_ref8.selectedIndex,focusIndex=_ref8.focusIndex,tabs=_ref8.tabs,label=_ref8.label,onChange=_ref8.onChange,onTabChange=_ref8.onTabChange,onFocusChange=_ref8.onFocusChange,id=_ref8.id,routed=_ref8.routed,_ref8$keepQueryParams=_ref8.keepQueryParams,keepQueryParams=void 0!==_ref8$keepQueryParams&&_ref8$keepQueryParams,tabKeys=Object.keys(tabs),tablistRef=(0,react.useRef)();return(0,react.useEffect)((function(){var _tablistRef$current,_tablistRef$current$q;null===(_tablistRef$current=tablistRef.current)||void 0===_tablistRef$current||null===(_tablistRef$current$q=_tablistRef$current.querySelectorAll("[role=tab]")[focusIndex])||void 0===_tablistRef$current$q||_tablistRef$current$q.focus()}),[focusIndex,selectedIndex]),(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref9){var _ref9$location=_ref9.location,pathname=_ref9$location.pathname,search=_ref9$location.search,history=_ref9.history;selectedIndex=routed?pathname:selectedIndex;var isSelectedValid=tabKeys.includes(selectedIndex);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(StyledTablist,{tabIndex:-1,role:"tablist",ref:tablistRef,"data-test":"tablist","aria-label":label,onKeyUp:function onKeyUp(_ref10){var _selectedIndex,keyCode=_ref10.keyCode,totalTabs=tabKeys.length,foundIndex=tabKeys.indexOf(null===(_selectedIndex=selectedIndex)||void 0===_selectedIndex?void 0:_selectedIndex.toString()),currentFocusIndex=void 0!==focusIndex?focusIndex:void 0===selectedIndex||-1===foundIndex?0:foundIndex;39===keyCode&&onFocusChange((currentFocusIndex+1)%totalTabs),37===keyCode&&onFocusChange(((currentFocusIndex<1?totalTabs:currentFocusIndex)-1)%totalTabs)},children:Object.entries(tabs).map((function(_ref11,index){var _ref12=_slicedToArray(_ref11,2),key=_ref12[0],label=_ref12[1].label,selected=isSelectedValid?key===selectedIndex:key.length>1&&selectedIndex.startsWith(key),Button=selected?StyledSelectedButton:StyledButton,tabId=createId(id,key,routed);return(0,jsx_runtime.jsx)(StyledSpan,{"data-test":"tab-item",children:(0,jsx_runtime.jsx)(Button,{role:"tab","aria-selected":selected,id:tabId,tabIndex:void 0!==selectedIndex||index?selected?0:-1:0,onClick:function onClick(){if(onChange(key,index),onTabChange&&onTabChange({path:key}),routed&&!selected){var url=keepQueryParams?"".concat(key).concat(search):key;history.push(url)}},children:label})},tabId)}))}),(0,jsx_runtime.jsx)(StyledTabpanel,{role:"tabpanel",tabIndex:-1,"aria-labelledby":createId(id,selectedIndex,!0),"data-test":"tabpanel",children:getContent(tabs,tabKeys,selectedIndex)})]})}})};TabNav.displayName="TabNav";var tabPropType=prop_types_default().shape({label:prop_types_default().node.isRequired,content:prop_types_default().node});TabNav.propTypes={label:prop_types_default().string.isRequired,routed:prop_types_default().any,keepQueryParams:prop_types_default().bool,onTabChange:prop_types_default().func,tabs:prop_types_default().oneOfType([prop_types_default().arrayOf(tabPropType),prop_types_default().objectOf(tabPropType)]).isRequired};const components_TabNav=(0,multiinstance.ZP)({name:"TabNav",actionPattern:"TAB_NAV__",dispatchToProps:function dispatchToProps(dispatch){return{onChange:function onChange(selectedIndex,focusIndex){return dispatch({type:actions.CnO,selectedIndex,focusIndex})},onFocusChange:function onFocusChange(focusIndex){return dispatch({type:actions.AcS,focusIndex})}}},component:TabNav,reducer:function(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,focusIndex=_ref.focusIndex,selectedIndex=_ref.selectedIndex;switch(type){case actions.AcS:return _objectSpread(_objectSpread({},state),{},{focusIndex});case actions.CnO:return{selectedIndex,focusIndex};default:return state}}})},"./src/client/components/Tag/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/react/index.js");var styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),_govuk_react_tag__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/@govuk-react/tag/dist/govuk-react-tag.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_excluded=["colour","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledTag=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)(_govuk_react_tag__WEBPACK_IMPORTED_MODULE_18__.Z)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n background-color: ",";\n color: ",";\n white-space: nowrap;\n"])),(function(props){return _client_utils_colours__WEBPACK_IMPORTED_MODULE_19__.$C[props.colour].background}),(function(props){return _client_utils_colours__WEBPACK_IMPORTED_MODULE_19__.$C[props.colour].colour})),Tag=function Tag(_ref){var colour=_ref.colour,children=_ref.children,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledTag,_objectSpread(_objectSpread({colour},props),{},{children}))};Tag.displayName="Tag",Tag.propTypes={colour:prop_types__WEBPACK_IMPORTED_MODULE_22___default().oneOf(Object.keys(_client_utils_colours__WEBPACK_IMPORTED_MODULE_19__.$C)),children:prop_types__WEBPACK_IMPORTED_MODULE_22___default().node.isRequired},Tag.defaultProps={colour:"default"},Tag.__docgenInfo={description:"`Tag` is a implementation of the [Tag](https://design-system.service.gov.uk/components/tag/) component from the GovUK Design System.\n\nUse the tag component when it’s possible for something to have more than one status and it’s useful for the user to know about that status.\nFor example, you can use a tag to show whether an item in a [task list](https://design-system.service.gov.uk/patterns/task-list-pages) has been ‘completed’.\n\nIf no colour is specified the tag will default to a blue background and white text.",methods:[],displayName:"Tag",props:{colour:{defaultValue:{value:"'default'",computed:!1},description:"Dictates the `background-color` and `color`",type:{name:"enum",computed:!0,value:"Object.keys(TAG_COLOURS)"},required:!1},children:{description:"Text of tag",type:{name:"node"},required:!0}}};const __WEBPACK_DEFAULT_EXPORT__=Tag},"./src/client/components/Task/LoadingBox.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var _govuk_react_loading_box__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@govuk-react/loading-box/dist/govuk-react-loading-box.esm.js"),styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_Effect__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./src/client/components/Effect.jsx"),___WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/components/Task/index.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["name","id","when","children","startOnRender"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledContentWrapper=styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP.div({position:"relative"}),StyledErrorOverlay=styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP.div({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",background:"rgba(255, 255, 255, 0.85)"});const __WEBPACK_DEFAULT_EXPORT__=function(_ref){var name=_ref.name,id=_ref.id,when=_ref.when,_children=_ref.children,startOnRender=_ref.startOnRender,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(___WEBPACK_IMPORTED_MODULE_19__.Z,{children:function children(t){var task=t(name,id);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsxs)(_govuk_react_loading_box__WEBPACK_IMPORTED_MODULE_17__.Z,{loading:task.progress||when,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(_Effect__WEBPACK_IMPORTED_MODULE_18__.Z,{dependencyList:[name,id,startOnRender],effect:function effect(){return startOnRender&&task.start(startOnRender)}}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledContentWrapper,{children:task.error?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.Fragment,{children:[_children,(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledErrorOverlay,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(___WEBPACK_IMPORTED_MODULE_19__.Z.Status,_objectSpread(_objectSpread({},props),{},{name,id}))})]}):_children})]})}})}},"./src/client/components/Task/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>components_Task});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),govuk_react_esm=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),actions=__webpack_require__("./src/client/actions.js"),govuk_react_heading_esm=(__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js")),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js"),FormActions=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var StyledRoot=styled_components_browser_esm.ZP.div(function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({color:colours.cK,background:"white",wordWrap:"break-word",padding:govuk_react_constants_esm.Kh.mobile,border:"".concat(govuk_react_constants_esm.IA," solid ").concat(colours.h),"&:focus":{outline:"".concat(govuk_react_constants_esm.lT," solid ").concat(colours.tL),outlineOffset:"0"}},govuk_react_constants_esm.qk.LARGESCREEN,{padding:govuk_react_constants_esm.Kh.tablet,border:"".concat(govuk_react_constants_esm.YF," solid ").concat(colours.h)}),govuk_react_lib_esm.W0.withWhiteSpace({marginBottom:6})),StyledSecondaryButton=(0,styled_components_browser_esm.ZP)(SecondaryButton.Z)({marginBottom:0}),Err=function Err(_ref){var errorMessage=_ref.errorMessage,retry=_ref.retry,dismiss=_ref.dismiss,noun=_ref.noun,_ref$dismissable=_ref.dismissable,dismissable=void 0===_ref$dismissable||_ref$dismissable;return(0,jsx_runtime.jsxs)(StyledRoot,{"data-test":"error-dialog",children:[(0,jsx_runtime.jsxs)(govuk_react_heading_esm.H2,{size:"MEDIUM",children:["Could not load ",noun]}),(0,lodash.isString)(errorMessage)&&(0,jsx_runtime.jsxs)("p",{children:["Error: ",errorMessage]}),(0,jsx_runtime.jsxs)(FormActions.Z,{children:[(0,jsx_runtime.jsx)(StyledSecondaryButton,{onClick:retry,children:"Retry"}),dismissable&&(0,jsx_runtime.jsx)(StyledSecondaryButton,{onClick:dismiss,children:"Dismiss"})]})]})};Err.displayName="Err",Err.propTypes={noun:prop_types_default().string.isRequired,errorMessage:prop_types_default().string.isRequired,retry:prop_types_default().func.isRequired,clear:prop_types_default().func.isRequired},Err.__docgenInfo={description:"",methods:[],displayName:"Err",props:{dismissable:{defaultValue:{value:"true",computed:!1},required:!1},noun:{description:"",type:{name:"string"},required:!0},errorMessage:{description:"",type:{name:"string"},required:!0},retry:{description:"",type:{name:"func"},required:!0},clear:{description:"",type:{name:"func"},required:!0}}};const Error=Err;var govuk_react_loading_box_esm=__webpack_require__("./node_modules/@govuk-react/loading-box/dist/govuk-react-loading-box.esm.js"),ProgressIndicator_StyledRoot=styled_components_browser_esm.ZP.div({textAlign:"center"}),StyledLoadingBox=(0,styled_components_browser_esm.ZP)(govuk_react_loading_box_esm.Z)({height:govuk_react_constants_esm.N_.SCALE_5,marginTop:govuk_react_constants_esm.N_.SCALE_5,marginBottom:govuk_react_constants_esm.N_.SCALE_3}),ProgressIndicator=function ProgressIndicator(_ref){var message=_ref.message;return(0,jsx_runtime.jsxs)(ProgressIndicator_StyledRoot,{children:[(0,jsx_runtime.jsx)(StyledLoadingBox,{loading:!0}),message&&(0,jsx_runtime.jsx)("p",{children:message})]})};ProgressIndicator.displayName="ProgressIndicator",ProgressIndicator.__docgenInfo={description:"",methods:[],displayName:"ProgressIndicator"};const components_ProgressIndicator=ProgressIndicator;var AccessDenied=__webpack_require__("./src/client/components/AccessDenied/index.jsx");function Task_typeof(o){return Task_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Task_typeof(o)}var _excluded=["start","cancel","dismissError","children"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var Task_StyledLoadingBox=(0,styled_components_browser_esm.ZP)(govuk_react_esm.pH)({paddingBottom:0}),nameIdPropTypes={name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired},startOnRenderPropTypes={payload:prop_types_default().any,onSuccessDispatch:prop_types_default().string},Task=(0,es.connect)((function(state){return state.tasks}),(function(dispatch){return{start:function start(name,id,_ref){var payload=_ref.payload,onSuccessDispatch=_ref.onSuccessDispatch;return dispatch({type:actions.TpS,payload,id,name,onSuccessDispatch})},cancel:function cancel(name,id){return dispatch({type:actions.Zo7,id,name})},dismissError:function dismissError(name,id){return dispatch({type:actions.zIU,id,name})}}}))((function Task(_ref2){var _start=_ref2.start,_cancel=_ref2.cancel,_dismissError=_ref2.dismissError,children=_ref2.children,props=_objectWithoutProperties(_ref2,_excluded);return children((function(name,id){var taskState=(0,lodash.get)(props,[name,id],{});return _objectSpread(_objectSpread({},taskState),{},{progress:"progress"===taskState.status,error:"error"===taskState.status,start:function start(options){return _start(name,id,options)},cancel:function cancel(){return _cancel(name,id)},retry:function retry(){return _start(name,id,taskState)},dismissError:function dismissError(){return _dismissError(name,id)}})}))}));Task.propTypes={children:prop_types_default().func.isRequired},Task.StartOnRender=(0,es.connect)((function(state,_ref3){var name=_ref3.name,id=_ref3.id;return(0,lodash.get)(state,["tasks",name,id],{})}),(function(dispatch,_ref4){var id=_ref4.id,name=_ref4.name;return{start:function start(options){return dispatch(_objectSpread(_objectSpread({},options),{},{type:actions.TpS,id,name}))}}}))((function(_ref5){var start=_ref5.start,name=_ref5.name,id=_ref5.id,payload=_ref5.payload,onSuccessDispatch=_ref5.onSuccessDispatch,status=_ref5.status;return(0,react.useEffect)((function(){status||start({payload,onSuccessDispatch})}),[name,id,JSON.stringify(payload),onSuccessDispatch]),null})),Task.StartOnRender.propTypes=_objectSpread(_objectSpread({},nameIdPropTypes),startOnRenderPropTypes),Task.Status=function(_ref6){var name=_ref6.name,id=_ref6.id,_ref6$noun=_ref6.noun,noun=void 0===_ref6$noun?name:_ref6$noun,startOnRender=_ref6.startOnRender,progressMessage=_ref6.progressMessage,_ref6$renderError=_ref6.renderError,renderError=void 0===_ref6$renderError?Error:_ref6$renderError,_ref6$renderProgress=_ref6.renderProgress,renderProgress=void 0===_ref6$renderProgress?components_ProgressIndicator:_ref6$renderProgress,_ref6$progressOverlay=_ref6.progressOverlay,progressOverlay=void 0!==_ref6$progressOverlay&&_ref6$progressOverlay,_ref6$dismissable=_ref6.dismissable,dismissable=void 0===_ref6$dismissable||_ref6$dismissable,_ref6$children=_ref6.children,_children=void 0===_ref6$children?function(){return null}:_ref6$children;return(0,jsx_runtime.jsx)(Task,{children:function children(getTask){var _getTask=getTask(name,id),start=_getTask.start,status=_getTask.status,progress=_getTask.progress,error=_getTask.error,payload=_getTask.payload,errorMessage=_getTask.errorMessage,onSuccessDispatch=_getTask.onSuccessDispatch,dismissError=_getTask.dismissError;return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[!!startOnRender&&(0,jsx_runtime.jsx)(Task.StartOnRender,_objectSpread(_objectSpread({},startOnRender),{},{name,id})),!progressOverlay&&progress&&renderProgress({message:progressMessage}),error&&("You do not have permission to perform this action."===errorMessage?(0,jsx_runtime.jsx)(AccessDenied.Z,{}):renderError({noun,errorMessage,retry:function retry(){return start({payload,onSuccessDispatch})},dismiss:dismissError,dismissable})),(0,jsx_runtime.jsx)(Task_StyledLoadingBox,{loading:progress&&progressOverlay,children:(!status||progressOverlay)&&_children()})]})}})},Task.Status.propTypes=_objectSpread(_objectSpread({},nameIdPropTypes),{},{noun:prop_types_default().string,progressMessage:prop_types_default().string,progressOverlay:prop_types_default().bool,startOnRender:prop_types_default().shape(startOnRenderPropTypes),renderProgress:prop_types_default().elementType,renderError:prop_types_default().elementType});const components_Task=Task},"./src/client/components/Task/utils.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Q8:()=>apiProxyAxios});__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js");var axios__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/axios/index.js"),axios__WEBPACK_IMPORTED_MODULE_23___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_23__),lodash__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/lodash/lodash.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["url"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_22___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_22__),styled_components__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),lodash__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/lodash/lodash.js"),_utils_colours__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./src/client/utils/colours.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_excluded=["stages","currentStage"];function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var TimelineContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)("div")(_defineProperty({backgroundColor:function backgroundColor(_ref){var theme=_ref.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"container.backgroundColor",_utils_colours__WEBPACK_IMPORTED_MODULE_19__.nx)},padding:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_2},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.qk.LARGESCREEN,{padding:function padding(_ref2){var theme=_ref2.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"container.largeScreen.padding",_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_5)}})),StyledOl=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)("ol")(_defineProperty({fontSize:_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.Kt.SIZE_14,listStyleType:"none",boxSizing:"border-box",padding:"0 0 0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_3)},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.qk.LARGESCREEN,{padding:"0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_3),margin:0,display:"table",width:"100%"})),StyledLi=(0,styled_components__WEBPACK_IMPORTED_MODULE_21__.ZP)("li")(_defineProperty({borderLeft:"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ),padding:"0 0 ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4," 0"),position:"relative","&:last-child":{padding:0,"&::before":{top:"2px"}},"&::before":{position:"absolute",display:"block",content:'""',borderRadius:"50%",left:function left(_ref3){var theme=_ref3.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.left","-12px")},width:function width(_ref4){var theme=_ref4.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.width",_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4)},height:function height(_ref5){var theme=_ref5.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.height",_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4)},backgroundColor:function backgroundColor(_ref6){var isStageComplete=_ref6.isStageComplete;return"".concat(isStageComplete?_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ:_utils_colours__WEBPACK_IMPORTED_MODULE_19__.Cj)},border:function border(_ref7){var theme=_ref7.theme,isStageComplete=_ref7.isStageComplete,border=(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.before.border");return border?isStageComplete?"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ):border:"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ)}},span:{display:function display(_ref8){var theme=_ref8.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.span.display","block")},padding:"2px 0 4px ".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4)}},_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.qk.LARGESCREEN,{display:"table-cell",width:"25%",padding:function padding(_ref9){var theme=_ref9.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.padding","".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4," 0 0 0"))},borderTop:function borderTop(_ref10){var theme=_ref10.theme,isLinkActive=_ref10.isLinkActive,borderTop=(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.borderTop");return borderTop?isLinkActive?"2px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ):borderTop:"3px solid ".concat(_utils_colours__WEBPACK_IMPORTED_MODULE_19__.hJ)},borderLeft:"none","&:last-child":{padding:"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_17__.N_.SCALE_4," 0 0 0"),borderColor:"transparent","&::before":{top:function top(_ref11){var theme=_ref11.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.before.top","-12px")}}},"&::before":{top:function top(_ref12){var theme=_ref12.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.before.top","-12px")},left:function left(_ref13){var theme=_ref13.theme;return(0,lodash__WEBPACK_IMPORTED_MODULE_18__.get)(theme,"li.mqLargeScreen.before.left","-12px")}},span:{padding:0,position:"absolute",width:"100px",textAlign:"center",left:"-50px"}})),Timeline=function Timeline(_ref14){var stages=_ref14.stages,_ref14$currentStage=_ref14.currentStage,currentStage=void 0===_ref14$currentStage?"":_ref14$currentStage,props=_objectWithoutProperties(_ref14,_excluded),stageIndex=stages.indexOf(currentStage);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(TimelineContainer,_objectSpread(_objectSpread({"data-test":"timeline"},props),{},{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__.jsx)(StyledOl,{children:stages.map((function(stage,i){var isStageComplete=i<=stageIndex,isLinkActive=i{"use strict";__webpack_require__.d(__webpack_exports__,{BQ:()=>ButtonContent,CO:()=>ToggleButton,P5:()=>ToggleHeader,QJ:()=>MultiInstanceToggleSection,UI:()=>ToggleContent,ZP:()=>__WEBPACK_DEFAULT_EXPORT__,l:()=>BadgeContainer});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/react/index.js");var prop_types__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_24___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_24__),styled_components__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("./src/client/utils/colours.js"),_actions__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__("./src/client/actions.js"),_utils_multiinstance__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("./src/client/utils/multiinstance.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_excluded=["label","badge","open","onOpen","isOpen","colour","children","justifyHeaderContent"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ToggleContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject||(_templateObject=_taggedTemplateLiteral([""]))),ToggleHeader=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n display: flex;\n position: relative;\n ","\n"])),(function(_ref){return _ref.justifyHeaderContent?"justify-content: space-between;":"align-items: center;"})),ToggleButton=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("button")(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n background: transparent;\n border: none;\n font-size: ",";\n font-family: inherit;\n color: ",";\n cursor: pointer;\n &:hover {\n text-decoration: underline;\n }\n &:focus {\n outline: none;\n text-decoration: none;\n }\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.Kt.SIZE_19,_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.Ej),ToggleButtonIconStyle=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("span")(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n margin-right: ",";\n ","\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_2,(function(_ref2){var isOpen=_ref2.isOpen;return"\n transform: ".concat(isOpen?"rotate(0deg)":"rotate(180deg)",";\n ")})),ToggleButtonIcon=function ToggleButtonIcon(_ref3){var _ref3$colour=_ref3.colour,colour=void 0===_ref3$colour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.E5:_ref3$colour,isOpen=_ref3.isOpen;return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ToggleButtonIconStyle,{isOpen,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)("svg",{width:"18px",height:"18px",version:"1.1",viewBox:"210 275 600 425",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",fill:colour,children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)("path",{d:"m798.16 609.84l-256-256c-16.683-16.683-43.691-16.683-60.331 0l-256 256c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0l225.84-225.84 225.84 225.84c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331z"})})})};ToggleButtonIcon.displayName="ToggleButtonIcon";var ButtonContent=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("span")(_templateObject5||(_templateObject5=_taggedTemplateLiteral([""]))),BadgeContainer=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("span")(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n margin-left: ",";\n"])),_govuk_react_constants__WEBPACK_IMPORTED_MODULE_19__.N_.SCALE_1),ToggleContent=(0,styled_components__WEBPACK_IMPORTED_MODULE_23__.ZP)("div")(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n ","\n"])),(function(_ref4){var isOpen=_ref4.isOpen;return"\n display: ".concat(isOpen?"block":"none",";\n padding: 0;\n ")})),BaseToggleSection=function BaseToggleSection(_ref5){var label=_ref5.label,_ref5$badge=_ref5.badge,badge=void 0===_ref5$badge?null:_ref5$badge,open=_ref5.open,onOpen=_ref5.onOpen,_ref5$isOpen=_ref5.isOpen,isOpen=void 0!==_ref5$isOpen&&_ref5$isOpen,_ref5$colour=_ref5.colour,colour=void 0===_ref5$colour?_client_utils_colours__WEBPACK_IMPORTED_MODULE_20__.E5:_ref5$colour,children=_ref5.children,_ref5$justifyHeaderCo=_ref5.justifyHeaderContent,justifyHeaderContent=void 0!==_ref5$justifyHeaderCo&&_ref5$justifyHeaderCo,props=_objectWithoutProperties(_ref5,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(ToggleContainer,_objectSpread(_objectSpread({},props),{},{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(ToggleHeader,{justifyHeaderContent,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsxs)(ToggleButton,{id:props.id&&"".concat(props.id,"-toggle-button-").concat(isOpen?"close":"open"),"data-test":"toggle-section-button",onClick:function onClick(){open(!isOpen),onOpen&&onOpen(!isOpen)},isOpen,"aria-expanded":isOpen,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ToggleButtonIcon,{onClick:function onClick(){open(!isOpen),onOpen&&onOpen(!isOpen)},isOpen,colour,alt:"Toggle details"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ButtonContent,{"data-test":"toggle-section-button-content",children:label})]}),badge&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(BadgeContainer,{children:badge})]}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_22__.jsx)(ToggleContent,{isOpen,children})]}))};BaseToggleSection.displayName="BaseToggleSection",BaseToggleSection.propTypes={id:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string,label:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string,badge:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,open:prop_types__WEBPACK_IMPORTED_MODULE_24___default().func,onOpen:prop_types__WEBPACK_IMPORTED_MODULE_24___default().func,isOpen:prop_types__WEBPACK_IMPORTED_MODULE_24___default().bool,children:prop_types__WEBPACK_IMPORTED_MODULE_24___default().node,major:prop_types__WEBPACK_IMPORTED_MODULE_24___default().bool,justifyHeaderContent:prop_types__WEBPACK_IMPORTED_MODULE_24___default().bool,colour:prop_types__WEBPACK_IMPORTED_MODULE_24___default().string};var MultiInstanceToggleSection=(0,_utils_multiinstance__WEBPACK_IMPORTED_MODULE_21__.ZP)({name:"ToggleSection",actionPattern:"TOGGLE_SECTION__",dispatchToProps:function dispatchToProps(dispatch){return{open:function open(isOpen){return dispatch({type:_actions__WEBPACK_IMPORTED_MODULE_25__.pyx,isOpen})}}},component:BaseToggleSection,reducer:function reducer(){var state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref6=arguments.length>1?arguments[1]:void 0,type=_ref6.type,isOpen=_ref6.isOpen;return type===_actions__WEBPACK_IMPORTED_MODULE_25__.pyx?_objectSpread(_objectSpread({},state),{},{isOpen}):state}});const __WEBPACK_DEFAULT_EXPORT__=MultiInstanceToggleSection;ToggleButtonIcon.__docgenInfo={description:"",methods:[],displayName:"ToggleButtonIcon",props:{colour:{defaultValue:{value:"BLACK",computed:!0},required:!1}}}},"./src/client/components/ToggleSection/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{kU:()=>ToggleSection_DashboardToggleSection,er:()=>ToggleSection_FilterToggleSection,b3:()=>ToggleSection_NoHighlightToggleSection,bg:()=>components_ToggleSection_ToggleSection});__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var _templateObject,styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),BaseToggleSection=__webpack_require__("./src/client/components/ToggleSection/BaseToggleSection.jsx");const ToggleSection_DashboardToggleSection=(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n\n "," {\n background-color: ",";\n padding-top: ",";\n padding-bottom: ",";\n }\n\n "," {\n font-weight: ",";\n margin-left: ",";\n }\n\n "," {\n text-decoration: underline;\n white-space: nowrap;\n }\n\n "," {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n margin-right: ",";\n }\n\n "," {\n padding: 0 ",";\n margin-top: ",";\n margin-bottom: ",";\n }\n"])),(function(_ref){var major=_ref.major;return"\n border: solid 2px ".concat(colours.nx,";\n border-top-color: ").concat(major?colours.hM:colours.Ej,";\n ")}),BaseToggleSection.P5,colours.nx,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,BaseToggleSection.CO,govuk_react_constants_esm.Xw.regular,govuk_react_constants_esm.N_.SCALE_2,BaseToggleSection.BQ,BaseToggleSection.l,govuk_react_constants_esm.N_.SCALE_3,BaseToggleSection.UI,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_3);var ToggleSection_templateObject;__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js");var ToggleSection_ToggleSection=(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(ToggleSection_templateObject||(ToggleSection_templateObject=function ToggleSection_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: ",";\n\n "," {\n padding: "," 0 ",";\n\n &:focus "," {\n color: ",";\n background-color: ",";\n box-shadow:\n 0 -2px ",",\n 0 4px ",";\n }\n }\n\n "," {\n margin: 0;\n padding: "," 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,BaseToggleSection.CO,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_1,BaseToggleSection.BQ,colours.E5,colours.$R,colours.$R,colours.E5,BaseToggleSection.UI,govuk_react_constants_esm.N_.SCALE_2);const components_ToggleSection_ToggleSection=ToggleSection_ToggleSection;var _styled;function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}const ToggleSection_FilterToggleSection=(0,styled_components_browser_esm.ZP)(ToggleSection_ToggleSection)((_defineProperty(_styled={borderBottom:"solid 1px ".concat(colours.FU),paddingBottom:govuk_react_constants_esm.N_.SCALE_2},BaseToggleSection.CO,{textAlign:"left"}),_defineProperty(_styled,BaseToggleSection.UI,{"> *:last-child":{marginBottom:0},"> *:last-child div:last-child":{marginBottom:0}}),_styled));var NoHighlightToggleSection_templateObject;const ToggleSection_NoHighlightToggleSection=(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(NoHighlightToggleSection_templateObject||(NoHighlightToggleSection_templateObject=function NoHighlightToggleSection_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n "," {\n padding: 0;\n }\n\n "," {\n text-decoration: underline;\n }\n\n "," {\n padding: "," 0;\n }\n"])),BaseToggleSection.CO,BaseToggleSection.BQ,BaseToggleSection.UI,govuk_react_constants_esm.N_.SCALE_2);var RemindersToggleSection_templateObject;__webpack_require__("./node_modules/core-js/modules/es.string.bold.js");(0,styled_components_browser_esm.ZP)(BaseToggleSection.QJ)(RemindersToggleSection_templateObject||(RemindersToggleSection_templateObject=function RemindersToggleSection_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border-top: 1px solid ",";\n ","\n\n "," {\n text-align: left;\n padding-top: ",";\n padding-bottom: ",";\n }\n\n "," {\n font-weight: ",";\n }\n"])),colours.FU,(function(_ref){return _ref.borderBottom&&"border-bottom: 1px solid ".concat(colours.FU,";")}),BaseToggleSection.CO,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_3,BaseToggleSection.BQ,govuk_react_constants_esm.Xw.bold)},"./src/client/components/Typeahead/Typeahead.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Typeahead_Typeahead});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _templateObject,react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),styled_components_browser_esm=__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js"),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),govuk_react_label_esm=__webpack_require__("./node_modules/@govuk-react/label/dist/govuk-react-label.esm.js"),colours=__webpack_require__("./src/client/utils/colours.js"),multiinstance=__webpack_require__("./src/client/utils/multiinstance.js"),actions=__webpack_require__("./src/client/actions.js"),Task=__webpack_require__("./src/client/components/Task/index.jsx"),react_string_replace=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.string.bold.js"),__webpack_require__("./node_modules/react-string-replace/index.js")),react_string_replace_default=__webpack_require__.n(react_string_replace),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledSpan=(0,styled_components_browser_esm.ZP)("span")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-weight: ",";\n"])),govuk_react_constants_esm.Xw.bold),Highlighter=function Highlighter(_ref){var _ref$optionLabel=_ref.optionLabel,optionLabel=void 0===_ref$optionLabel?null:_ref$optionLabel,searchStr=_ref.searchStr;return optionLabel&&react_string_replace_default()(optionLabel,searchStr,(function(matchedTxt,i){return(0,jsx_runtime.jsx)(StyledSpan,{children:matchedTxt},i)}))};Highlighter.propTypes={optionLabel:prop_types_default().string.isRequired,searchStr:prop_types_default().string.isRequired};const Typeahead_Highlighter=Highlighter;var AssistiveText=function AssistiveText(_ref){var name=_ref.name;return(0,jsx_runtime.jsx)("span",{id:"autocomplete-".concat(name,"-assistiveHint"),style:{display:"none"},children:"When autocomplete results are available use up and down arrows to review and enter to select."})};AssistiveText.displayName="AssistiveText",AssistiveText.__docgenInfo={description:"",methods:[],displayName:"AssistiveText"};const Typeahead_AssistiveText=AssistiveText;var ChipList=(0,styled_components_browser_esm.ZP)("ul")({listStyleType:"none",margin:"".concat(govuk_react_constants_esm.N_.SCALE_1," 0"),padding:0}),Chip=(0,styled_components_browser_esm.ZP)("li")({display:"inline-block",margin:"".concat(govuk_react_constants_esm.N_.SCALE_1," 0")}),ChipButton=(0,styled_components_browser_esm.ZP)("button")(govuk_react_constants_esm.jw,{backgroundColor:colours.nx,border:"none",borderRadius:3,color:colours.cK,fontSize:"0.75em",fontWeight:"bold",marginBottom:0,marginRight:6,padding:"".concat(govuk_react_constants_esm.N_.SCALE_1," 1.75em ").concat(govuk_react_constants_esm.N_.SCALE_1," ").concat(govuk_react_constants_esm.N_.SCALE_1),position:"relative",cursor:"pointer","&::before, &::after":{borderRight:"1px solid ".concat(colours.cK),content:'""',height:"1em",right:"0.75em",position:"absolute",top:"50%",width:0},"&::before":{transform:"translate(0, -50%) rotate(45deg)"},"&::after":{transform:"translate(0, -50%) rotate(-45deg)"}}),SelectedChips=function SelectedChips(_ref){var name=_ref.name,selectedOptions=_ref.selectedOptions,onOptionRemove=_ref.onOptionRemove;return(0,jsx_runtime.jsxs)(ChipList,{id:"".concat(name,"-selected"),"data-test":"typeahead-chip-list",children:[(0,jsx_runtime.jsx)("span",{id:"".concat(name,"-remove"),style:{display:"none"},children:"remove"}),selectedOptions.map((function(option){return(0,jsx_runtime.jsx)(Chip,{"data-test":"typeahead-chip",children:(0,jsx_runtime.jsx)(ChipButton,{type:"button","aria-describedby":"".concat(name,"-remove"),onClick:function onClick(){onOptionRemove(option)},children:option.chipLabel||option.label})},option.value)}))]})};SelectedChips.displayName="SelectedChips",SelectedChips.__docgenInfo={description:"",methods:[],displayName:"SelectedChips"};const Typeahead_SelectedChips=SelectedChips;var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),keys_down="ArrowDown",keys_end="End",keys_enter="Enter",keys_escape="Escape",keys_home="Home",keys_left="ArrowLeft",keys_right="ArrowRight",keys_up="ArrowUp",menuActions_close="close",menuActions_closeSelect="closeSelect",menuActions_first="first",menuActions_last="last",menuActions_next="next",menuActions_open="open",menuActions_previous="previous",getFilteredOptions=function getFilteredOptions(_ref){var input=_ref.input,options=_ref.options;return(input?options.filter((function(option){return option.label.toLowerCase().includes(input.toLowerCase())})):options)||[]},valueEqual=function valueEqual(item1,item2){return item1.value==item2.value},getNewSelectedOptions=function getNewSelectedOptions(_ref2){var selectedOptions=_ref2.selectedOptions,option=_ref2.option;return _ref2.isMulti?(0,lodash.xorWith)(selectedOptions,[option],valueEqual):[option]},valueAsArray=function valueAsArray(value){return value?Array.isArray(value)?value:[value]:[]};function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function Typeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Typeahead_objectSpread(e){for(var r=1;r-1,"aria-setsize":filteredOptions.length,"aria-posinset":index,onClick:function onClick(){inputRef.current&&inputRef.current.select(),onOptionToggle(option),onChange(getNewSelectedOptions({selectedOptions,isMulti,option})),closeOnSelect&&onMenuClose()},onMouseMove:function onMouseMove(){onActiveChange(index)},onMouseDown:function onMouseDown(){onOptionMouseDown(index)},"data-test":"typeahead-menu-option",children:(0,jsx_runtime.jsx)("span",{children:(0,jsx_runtime.jsx)(Typeahead_Highlighter,{optionLabel:option.label,searchStr:input})})},option.value)})),!filteredOptions.length&&(0,jsx_runtime.jsx)(NoOptionsMessage,{"data-test":"typeahead-no-options",children:noOptionsMessage})]})}})})]}),(0,jsx_runtime.jsx)(Typeahead_AssistiveText,{name})]})};Typeahead.displayName="Typeahead";var keyPairPropType=prop_types_default().shape({label:prop_types_default().string,value:prop_types_default().string});Typeahead.propTypes={id:prop_types_default().string.isRequired,name:prop_types_default().string,className:prop_types_default().string,label:prop_types_default().string,error:prop_types_default().string,closeMenuOnSelect:prop_types_default().bool,isMulti:prop_types_default().bool,noOptionsMessage:prop_types_default().string,defaultValue:prop_types_default().oneOfType([keyPairPropType,prop_types_default().arrayOf(keyPairPropType)]),value:prop_types_default().oneOfType([keyPairPropType,prop_types_default().arrayOf(keyPairPropType)]),menuOpen:prop_types_default().bool,loadOptions:prop_types_default().func,onChange:prop_types_default().func,options:prop_types_default().arrayOf(keyPairPropType),input:prop_types_default().string,selectedOptions:prop_types_default().arrayOf(keyPairPropType),activeIndex:prop_types_default().number,focusIndex:prop_types_default().number,onInitialise:prop_types_default().func,onBlur:prop_types_default().func,onActiveChange:prop_types_default().func,onInput:prop_types_default().func,onOptionMouseDown:prop_types_default().func,onOptionToggle:prop_types_default().func,onOptionRemove:prop_types_default().func,onOptionsClear:prop_types_default().func,onMenuClose:prop_types_default().func,onMenuOpen:prop_types_default().func};const Typeahead_Typeahead=(0,multiinstance.ZP)({name:"Typeahead",actionPattern:"TYPEAHEAD__",dispatchToProps:function dispatchToProps(dispatch){return{onInitialise:function onInitialise(_ref7){var isMulti=_ref7.isMulti,value=_ref7.value;dispatch({type:actions.Gh5,isMulti,value})},onBlur:function onBlur(){dispatch({type:actions.kQc})},onActiveChange:function onActiveChange(activeIndex){dispatch({type:actions.aAd,activeIndex})},onInput:function onInput(event){dispatch({type:actions.BWt,input:event.target.value})},onMenuClose:function onMenuClose(){dispatch({type:actions.Kfu})},onMenuOpen:function onMenuOpen(){dispatch({type:actions.jNH})},onOptionMouseDown:function onOptionMouseDown(focusIndex){dispatch({type:actions.NTO,focusIndex})},onOptionToggle:function onOptionToggle(option){dispatch({type:actions.TZF,option})},onOptionRemove:function onOptionRemove(option){dispatch({type:actions._zA,option})},onOptionsClear:function onOptionsClear(){dispatch({type:actions.ukg})}}},component:Typeahead,reducer:function(){var _state$selectedOption,_valueAsArray$,state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:initialState,_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,value=_ref.value,input=_ref.input,isMulti=_ref.isMulti,option=_ref.option,activeIndex=_ref.activeIndex,focusIndex=_ref.focusIndex,result=_ref.result,selectedValue=!state.isMulti&&(null===(_state$selectedOption=state.selectedOptions[0])||void 0===_state$selectedOption?void 0:_state$selectedOption.label),filteredOptions=getFilteredOptions({options:state.options,input:state.input});switch(type){case actions.Gh5:return _objectSpread(_objectSpread({},state),{},{isMulti,selectedOptions:valueAsArray(value),input:isMulti?state.input:(null===(_valueAsArray$=valueAsArray(value)[0])||void 0===_valueAsArray$?void 0:_valueAsArray$.label)||""});case actions.GRb:var newOptions=getFilteredOptions({options:result,input:state.input});return _objectSpread(_objectSpread({},state),{},{options:result||[],activeIndex:newOptions.indexOf(filteredOptions[state.activeIndex]),focusIndex:newOptions.indexOf(filteredOptions[state.focusIndex])});case actions.kQc:return _objectSpread(_objectSpread({},state),{},{menuOpen:!!state.ignoreBlur&&state.menuOpen,focusIndex:-1,input:state.ignoreBlur?state.input:state.input&&selectedValue||"",ignoreBlur:!1});case actions.BWt:var newInputOptions=getFilteredOptions({options:state.options,input});return _objectSpread(_objectSpread({},state),{},{input,activeIndex:newInputOptions.indexOf(filteredOptions[state.activeIndex]),focusIndex:newInputOptions.indexOf(filteredOptions[state.focusIndex]),menuOpen:!0});case actions.aAd:return _objectSpread(_objectSpread({},state),{},{activeIndex});case actions.Kfu:return _objectSpread(_objectSpread({},state),{},{input:state.isMulti?"":state.input,menuOpen:!1});case actions.jNH:var selectedIndex=state.options.map((function(_ref2){return _ref2.label})).indexOf(selectedValue);return _objectSpread(_objectSpread({},state),{},{menuOpen:!0,activeIndex:selectedIndex});case actions.NTO:return _objectSpread(_objectSpread({},state),{},{ignoreBlur:!0,focusIndex});case actions.TZF:var newInput=state.isMulti?state.input:option.label,toggledIndex=getFilteredOptions({options:state.options,input:state.isMulti&&newInput}).indexOf(option);return _objectSpread(_objectSpread({},state),{},{selectedOptions:state.isMulti?(0,lodash.xorWith)(state.selectedOptions,[option],valueEqual):[option],input:newInput,activeIndex:toggledIndex,focusIndex:toggledIndex});case actions._zA:return _objectSpread(_objectSpread({},state),{},{selectedOptions:state.selectedOptions.filter((function(_ref3){return _ref3.value!==option.value}))});case actions.ukg:return _objectSpread(_objectSpread({},state),{},{selectedOptions:[]});default:return state}}})},"./src/client/components/Typeahead/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var _Typeahead__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("./src/client/components/Typeahead/Typeahead.jsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["id","name"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var Typeahead=function Typeahead(_ref){var id=_ref.id,name=_ref.name,props=_objectWithoutProperties(_ref,_excluded);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_18__.jsx)(_Typeahead__WEBPACK_IMPORTED_MODULE_17__.Z,function _objectSpread(e){for(var r=1;r{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>TASK_GET_TYPEAHEAD_OPTIONS});var TASK_GET_TYPEAHEAD_OPTIONS="TASK_GET_TYPEAHEAD_OPTIONS"},"./src/client/components/index.jsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Ct:()=>Badge.Z,ZP:()=>ButtonLink.Z,Af:()=>Chip.Z,X8:()=>CollectionHeader.Z,ZQ:()=>CollectionHeaderRow.Z,j8:()=>CollectionItem.Z,CI:()=>CollectionList_CollectionSort,S3:()=>components_ContactLocalHeader,k1:()=>elements_FieldAddress,YU:()=>FieldCheckboxes.Z,_s:()=>FieldInput.Z,k2:()=>FieldRadios.Z,E9:()=>elements_FieldTextarea,LZ:()=>components_FilterReset,iN:()=>FormActions.Z,lt:()=>Layout_FormLayout,xk:()=>LocalHeader.Z,$8:()=>LocalNav,Zj:()=>LocalNavLink,or:()=>Main.Z,ke:()=>NewWindowLink.Z,tl:()=>components_Pagination.Z,yL:()=>ReadMore.Z,MP:()=>components_RoutedDownloadDataHeader,ci:()=>components_RoutedFilterChips,HF:()=>SummaryTable.Z,TY:()=>Timeline.Z});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.async-iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.json.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/es.math.to-string-tag.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),axios=__webpack_require__("./node_modules/axios/index.js"),axios_default=__webpack_require__.n(axios),styled_components_browser_esm=(__webpack_require__("./node_modules/core-js/modules/es.object.freeze.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/styled-components/dist/styled-components.browser.esm.js")),govuk_react_constants_esm=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lodash_default=__webpack_require__.n(lodash),mapPeople=function mapPeople(activity,personType,mapper){var attributedTo=activity.object.attributedTo;return(0,lodash.map)((0,lodash.filter)(attributedTo,(function(_ref){var type=_ref.type;return(0,lodash.includes)(type,personType)})),mapper)},getContacts=function getContacts(activity){return mapPeople(activity,"dit:Contact",(function(_ref2){var id=_ref2.id,url=_ref2.url,name=_ref2.name,jobTitle=_ref2["dit:jobTitle"],registrationStatus=_ref2.registrationStatus;return(0,lodash.pickBy)({id,url,name,jobTitle,type:"Contact",registrationStatus})}))};const CardUtils_canRenderByTypes=function canRenderByTypes(activity,types){var activityTypes=(0,lodash.get)(activity,"object.type");return(0,lodash.some)(types,(function(type){return(0,lodash.includes)(activityTypes,type)}))},CardUtils_getAdvisers=function getAdvisers(activity){return mapPeople(activity,"dit:Adviser",(function(_ref5){var id=_ref5.id,name=_ref5.name,emailAddress=_ref5["dit:emailAddress"],team=_ref5["dit:team"];return(0,lodash.pickBy)({id,name,emailAddress,team:(0,lodash.get)(team,"name"),type:"Adviser"})}))},CardUtils_getContacts=getContacts,CardUtils_getAdviser=function getAdviser(activity){var adviser={id:(0,lodash.get)(activity,"actor.id"),name:(0,lodash.get)(activity,"actor.name"),emailAddress:(0,lodash.get)(activity,"actor.dit:emailAddress")};return adviser.name&&adviser.emailAddress?adviser:null},CardUtils_transform=function transform(activity){return{url:(0,lodash.get)(activity,"object.url"),subject:(0,lodash.get)(activity,"object.dit:subject"),service:(0,lodash.get)(activity,"object.dit:service.name"),startTime:(0,lodash.get)(activity,"object.startTime")}},CardUtils_getContactsGroupedByRegistrationStatus=function getContactsGroupedByRegistrationStatus(activity){return getContacts(activity).filter((function(a){return a.registrationStatus})).reduce((function(r,a){return r[a.registrationStatus]?r[a.registrationStatus].push(a):r[a.registrationStatus]=[a],r}),{})},CardUtils_getStatusByLatest=function getStatusByLatest(contactsList){var status;return contactsList.WaitingList&&(status="Waiting List"),contactsList.Cancelled&&(status="Cancelled"),contactsList.Registered&&(status="Registered"),contactsList.Attended&&(status="Attended"),status};var _templateObject,number_utils=__webpack_require__("./src/client/utils/number-utils.js"),constants=__webpack_require__("./src/client/components/ActivityFeed/constants.js"),colours=__webpack_require__("./src/client/utils/colours.js"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");var StyledCardWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n border-bottom: 1px solid ",";\n padding: "," 0;\n"])),colours.FU,govuk_react_constants_esm.N_.SCALE_3),ActivityCardWrapper=function ActivityCardWrapper(_ref){var children=_ref.children,_ref$dataTest=_ref.dataTest,dataTest=void 0===_ref$dataTest?"activity-card-wrapper":_ref$dataTest;return(0,jsx_runtime.jsx)(StyledCardWrapper,{"data-test":dataTest,children})};ActivityCardWrapper.displayName="ActivityCardWrapper",ActivityCardWrapper.propTypes={dataTest:prop_types_default().string,children:prop_types_default().node.isRequired},ActivityCardWrapper.__docgenInfo={description:"",methods:[],displayName:"ActivityCardWrapper",props:{dataTest:{defaultValue:{value:"'activity-card-wrapper'",computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const card_ActivityCardWrapper=ActivityCardWrapper;__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");var Tag=__webpack_require__("./src/client/components/Tag/index.jsx");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r a:link,\n a:visited,\n a:hover,\n a:active {\n text-decoration: none;\n color: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_20,govuk_react_constants_esm.Xw.bold,govuk_react_constants_esm.Kt.SIZE_24,(function(_ref){var margin=_ref.margin;return"".concat(margin.top,"px")}),(function(_ref2){var margin=_ref2.margin;return"".concat(margin.bottom,"px")}),colours.Ej),ActivityCardSubject=function ActivityCardSubject(_ref3){var children=_ref3.children,_ref3$dataTest=_ref3.dataTest,dataTest=void 0===_ref3$dataTest?"activity-card-subject":_ref3$dataTest,_ref3$margin=_ref3.margin,margin=void 0===_ref3$margin?{bottom:10}:_ref3$margin;return(0,jsx_runtime.jsx)(StyledActivitySubject,{"data-test":dataTest,margin,children})};ActivityCardSubject.displayName="ActivityCardSubject",ActivityCardSubject.propTypes={children:prop_types_default().node.isRequired,dataTest:prop_types_default().string,margin:prop_types_default().shape({top:prop_types_default().number.isRequired,bottom:prop_types_default().number.isRequired})},ActivityCardSubject.defaultProps={isOverview:!1},ActivityCardSubject.__docgenInfo={description:"",methods:[],displayName:"ActivityCardSubject",props:{dataTest:{defaultValue:{value:"'activity-card-subject'",computed:!1},description:"",type:{name:"string"},required:!1},margin:{defaultValue:{value:"{ bottom: 10 }",computed:!1},description:"",type:{name:"shape",value:{top:{name:"number",required:!0},bottom:{name:"number",required:!0}}},required:!1},isOverview:{defaultValue:{value:"false",computed:!1},required:!1},children:{description:"",type:{name:"node"},required:!0}}};const card_ActivityCardSubject=ActivityCardSubject;var ActivityOverviewSummary_templateObject,_templateObject2,_templateObject3;function ActivityOverviewSummary_typeof(o){return ActivityOverviewSummary_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityOverviewSummary_typeof(o)}function ActivityOverviewSummary_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function _defineProperties(target,props){for(var i=0;inew Date?constants.Q_.UPCOMING:constants.Q_.INCOMPLETE}return constants.Q_.COMPLETE}(activity),badge=isServiceDelivery(activity)?constants.QV.INTERACTION.SERVICE_DELIVERY:constants.QV.INTERACTION[status.toUpperCase()],isUpcoming=status===constants.Q_.UPCOMING,typeText=isServiceDelivery(activity)?"service delivery":"interaction",service=(0,lodash.get)(activity,"object.dit:service.name"),serviceText=service?getServiceText(service):null,themeText=function getThemeText(activity){var themeTypes=(0,lodash.get)(activity,"object.type");return(0,lodash.includes)(themeTypes,"dit:datahub:theme:export")?"export":(0,lodash.includes)(themeTypes,"dit:datahub:theme:investment")?"investment":(0,lodash.includes)(themeTypes,"dit:datahub:theme:trade_agreement")?"trade agreement":(0,lodash.includes)(themeTypes,"dit:datahub:theme:other")?"other":null}(activity),communicationChannel=(0,lodash.get)(activity,"object.dit:communicationChannel.name"),interactionUrl=function getCompanyInteractionUrl(activity){var companyId=activity.object.attributedTo[0].id.split(":").pop(),interactionId=activity.id.split(":")[2];return urls_default().companies.interactions.detail(companyId,interactionId)}(activity);return{badge,isUpcoming,typeText,serviceText,themeText,communicationChannel,interactionUrl}}}]),InteractionUtils}();function Interaction_typeof(o){return Interaction_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Interaction_typeof(o)}function Interaction_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function Interaction_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Interaction_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i span {\n color: ",";\n }\n"])),colours.TK);function AventriAttendee(_ref){var _transformAventriAtte=function transformAventriAttendee(attendee){return{attendeeName:"".concat(attendee.object["dit:firstName"]," ").concat(attendee.object["dit:lastName"]),date:(0,utils_date.formatStartAndEndDate)(attendee.startDate,attendee.endDate),eventName:attendee.eventName,eventId:extractAventriId(attendee),registrationStatus:AVENTRI_ATTENDEE_REG_STATUSES[attendee.object["dit:registrationStatus"]],contactUrl:attendee.datahubContactUrl}}(_ref.activity),attendeeName=_transformAventriAtte.attendeeName,eventName=_transformAventriAtte.eventName,eventId=_transformAventriAtte.eventId,date=_transformAventriAtte.date,registrationStatus=_transformAventriAtte.registrationStatus,contactUrl=_transformAventriAtte.contactUrl;return eventName?(0,jsx_runtime.jsxs)(card_ActivityCardWrapper,{dataTest:"aventri-activity",children:[(0,jsx_runtime.jsxs)(card_ActivityCardSubject,{children:[(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:"/events/aventri/".concat(eventId,"/details"),children:eventName}),registrationStatus&&(0,jsx_runtime.jsxs)(StyledSpan,{children:[": ",(0,jsx_runtime.jsx)("span",{children:registrationStatus})]})]}),(0,jsx_runtime.jsx)(card_ActivityCardLabels,{service:"event",kind:"Attended"===registrationStatus?"aventri event":"interaction"}),(0,jsx_runtime.jsx)(card_ActivityCardMetadata,{metadata:[{label:"Event date",value:date||"Unknown"}]})]}):(0,jsx_runtime.jsx)(card_ActivityCardWrapper,{dataTest:"aventri-attendee",children:(0,jsx_runtime.jsx)(card_ActivityCardSubject,{dataTest:"aventri-attendee-name",children:contactUrl?(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:contactUrl,children:attendeeName}):attendeeName})})}AventriAttendee.propTypes={activity:prop_types_default().object.isRequired},AventriAttendee.canRender=function(attendee){return CardUtils_canRenderByTypes(attendee,constants.x8.AventriAttendee)},AventriAttendee.__docgenInfo={description:"",methods:[{name:"canRender",docblock:null,modifiers:["static"],params:[{name:"attendee",type:null}],returns:null}],displayName:"AventriAttendee",props:{activity:{description:"",type:{name:"object"},required:!0}}};var react_router_dom=__webpack_require__("./node_modules/react-router-dom/esm/react-router-dom.js");function DataHubEvent_typeof(o){return DataHubEvent_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},DataHubEvent_typeof(o)}function DataHubEvent_slicedToArray(arr,i){return function DataHubEvent_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function DataHubEvent_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function DataHubEvent_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return DataHubEvent_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DataHubEvent_arrayLikeToArray(o,minLen)}(arr,i)||function DataHubEvent_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DataHubEvent_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0?" by ":"",unFormattedContacts]})}):(0,jsx_runtime.jsxs)(card_ActivityCardWrapper,{dataTest:"aventri-event",children:[(0,jsx_runtime.jsxs)(card_ActivityCardSubject,{dataTest:"aventri-event-name",children:[subject,(0,jsx_runtime.jsxs)(RegisteredLabel,{children:[": ",status]})]}),(0,jsx_runtime.jsx)(card_ActivityCardLabels,{service:"Event",kind:"Aventri Event"}),(0,jsx_runtime.jsx)(card_ActivityCardMetadata,{metadata:[{label:"Event date",value:date}].concat(_toConsumableArray(formattedContacts))})]})}}],[{key:"canRender",value:function canRender(activity){return CardUtils_canRenderByTypes(activity,constants.x8.AventriEvent)}}]),AventriEvent}(react.PureComponent);AventriEvent.displayName="AventriEvent",function AventriEvent_defineProperty(obj,key,value){return(key=AventriEvent_toPropertyKey(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}(AventriEvent,"propTypes",{activity:prop_types_default().object.isRequired,showDetails:prop_types_default().bool.isRequired}),AventriEvent.__docgenInfo={description:"",methods:[{name:"canRender",docblock:null,modifiers:["static"],params:[{name:"activity",type:null}],returns:null}],displayName:"AventriEvent",props:{activity:{description:"",type:{name:"object"},required:!0},showDetails:{description:"",type:{name:"bool"},required:!0}}};var AventriEventSyncWarning_templateObject,StatusMessage=__webpack_require__("./src/client/components/StatusMessage/index.jsx");var StyledStatusMessage=(0,styled_components_browser_esm.ZP)(StatusMessage.Z)(AventriEventSyncWarning_templateObject||(AventriEventSyncWarning_templateObject=function AventriEventSyncWarning_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n div.statusHeader {\n font-size: x-large;\n }\n div.statusContent {\n font-size: medium;\n }\n div.statusLink {\n font-size: 80%;\n }\n"])));function AventriEventSyncWarning(_ref){var aventriEventLink="https://eu-admin.eventscloud.com/loggedin/eVent/index.php?eventid="+_ref.aventriEventId;return(0,jsx_runtime.jsxs)(StyledStatusMessage,{children:[(0,jsx_runtime.jsx)("div",{class:"statusHeader",children:"This event has been automatically synced from Aventri."}),(0,jsx_runtime.jsx)("div",{class:"statusContent",children:"Event details, registrants and attendees can only be edited in Aventri. Changes can take up to 24 hours to sync."}),(0,jsx_runtime.jsx)("div",{class:"statusLink",children:(0,jsx_runtime.jsx)(NewWindowLink.Z,{href:aventriEventLink,children:"View in Aventri"})})]})}AventriEventSyncWarning.displayName="AventriEventSyncWarning",AventriEventSyncWarning.propTypes={aventriEventId:prop_types_default().number},AventriEventSyncWarning.__docgenInfo={description:"",methods:[],displayName:"AventriEventSyncWarning",props:{aventriEventId:{description:"",type:{name:"number"},required:!1}}};const activities=[AventriAttendee,AventriEvent,CompaniesHouseAccount,CompaniesHouseCompany,DataHubEvent,DirectoryFormsApi,MaxemailCampaign,HmrcExporter,Interaction,InvestmentProject,Omis,Referral,AventriEventSyncWarning];function Activity(_ref){var activity=_ref.activity,showDetails=_ref.showDetails,filter=_ref.filter,isOverview=_ref.isOverview,ActivityToRender=(0,lodash.find)(activities,(function(a){return a.canRender&&"function"==typeof a.canRender?a.canRender(activity,filter):null}));return ActivityToRender?(0,jsx_runtime.jsx)(ActivityToRender,{activity,filter,showDetails,isOverview}):null}Activity.displayName="Activity",Activity.propTypes={activity:prop_types_default().object.isRequired,showDetails:prop_types_default().bool,filter:prop_types_default().array},Activity.defaultProps={showDetails:!1,filter:[]},Activity.__docgenInfo={description:"",methods:[],displayName:"Activity",props:{showDetails:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},filter:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},activity:{description:"",type:{name:"object"},required:!0}}};const ActivityFeed_Activity=Activity;var ActivityFeedHeader_templateObject,ActivityFeedHeader_templateObject2,ActivityFeedHeader_templateObject3,govuk_react_heading_esm=__webpack_require__("./node_modules/@govuk-react/heading/dist/govuk-react-heading.esm.js"),pluralize=__webpack_require__("./node_modules/pluralize/pluralize.js"),pluralize_default=__webpack_require__.n(pluralize);function ActivityFeedHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var HeaderSummary=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedHeader_templateObject||(ActivityFeedHeader_templateObject=ActivityFeedHeader_taggedTemplateLiteral(["\n display: flex;\n flex-flow: row wrap;\n border-bottom: 2px solid #000;\n margin-bottom: ",";\n padding-bottom: ",";\n\n & > div {\n width: 100%;\n margin-bottom: ",";\n\n "," {\n width: 0;\n flex-grow: 1;\n }\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.qk.TABLET),HeaderCount=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedHeader_templateObject2||(ActivityFeedHeader_templateObject2=ActivityFeedHeader_taggedTemplateLiteral(["\n margin-top: ",";\n\n & > h2 {\n font-weight: normal;\n font-size: 28px;\n margin-bottom: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_1),HeaderActions=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedHeader_templateObject3||(ActivityFeedHeader_templateObject3=ActivityFeedHeader_taggedTemplateLiteral(["\n text-align: right;\n min-width: 60%;\n\n & > button {\n margin-bottom: 0;\n }\n"]))),ActivityFeedHeader=function ActivityFeedHeader(_ref){var totalActivities=_ref.totalActivities,actions=_ref.actions,headerText=totalActivities?pluralize_default()("activity",totalActivities,!0):"Activities";return(0,jsx_runtime.jsxs)(HeaderSummary,{children:[(0,jsx_runtime.jsx)(HeaderCount,{children:(0,jsx_runtime.jsx)(govuk_react_heading_esm.H2,{children:headerText})}),actions&&(0,jsx_runtime.jsx)(HeaderActions,{children:actions})]})};ActivityFeedHeader.displayName="ActivityFeedHeader",ActivityFeedHeader.propTypes={totalActivities:prop_types_default().number,actions:prop_types_default().node},ActivityFeedHeader.defaultProps={totalActivities:0,actions:null},ActivityFeedHeader.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedHeader",props:{totalActivities:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"number"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1}}};const ActivityFeed_ActivityFeedHeader=ActivityFeedHeader;var SelectFilter_templateObject,govuk_react_select_esm=__webpack_require__("./node_modules/@govuk-react/select/dist/govuk-react-select.esm.js");var StyledDropdownContainer=(0,styled_components_browser_esm.ZP)("div")(SelectFilter_templateObject||(SelectFilter_templateObject=function SelectFilter_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n background: ",";\n padding: ","\n display: block;\n \n "," {\n display: inline-flex;\n }\n \n label {\n display: block;\n \n "," {\n display: inline-block;\n }\n \n span {\n display: inline-block;\n margin: 0 ","\n width: auto;\n margin: 0;\n \n "," {\n margin: 0 10px;\n }\n }\n \n select {\n width: 100%;\n \n "," {\n width: auto;\n }\n }\n } \n"])),colours.zT,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.qk.DESKTOP),SelectFilter=function SelectFilter(_ref){var filters=_ref.filters,onActivityTypeFilterChange=_ref.onActivityTypeFilterChange,value=_ref.value;return(0,jsx_runtime.jsx)(StyledDropdownContainer,{children:(0,jsx_runtime.jsx)(govuk_react_select_esm.ZP,{input:{defaultValue:value},name:"activity-types-filter",label:"Activity types",onChange:onActivityTypeFilterChange,children:(0,lodash.map)(filters,(function(item,index){return(0,jsx_runtime.jsx)("option",{value:item.value,children:item.label},"selectFilterKey_".concat(index))}))})})};SelectFilter.displayName="SelectFilter",SelectFilter.propTypes={filters:prop_types_default().array.isRequired,onActivityTypeFilterChange:prop_types_default().func.isRequired,value:prop_types_default().string.isRequired},SelectFilter.__docgenInfo={description:"",methods:[],displayName:"SelectFilter",props:{filters:{description:"",type:{name:"array"},required:!0},onActivityTypeFilterChange:{description:"",type:{name:"func"},required:!0},value:{description:"",type:{name:"string"},required:!0}}};const filters_SelectFilter=SelectFilter;var ActivityFeedFilters_templateObject,ActivityFeedFilters_templateObject2,Analytics=__webpack_require__("./src/client/components/Analytics/index.jsx");function ActivityFeedFilters_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var ActivityFeedFiltersRow=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedFilters_templateObject||(ActivityFeedFilters_templateObject=ActivityFeedFilters_taggedTemplateLiteral(["\n padding: ",";\n background: ",";\n display: block;\n align-items: center;\n\n "," {\n display: flex;\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,colours.nx,govuk_react_constants_esm.qk.DESKTOP),StyledTitle=(0,styled_components_browser_esm.ZP)("div")(ActivityFeedFilters_templateObject2||(ActivityFeedFilters_templateObject2=ActivityFeedFilters_taggedTemplateLiteral(["\n margin-right: ",";\n white-space: nowrap;\n"])),govuk_react_constants_esm.N_.SCALE_4),ActivityFeedFilters=function ActivityFeedFilters(_ref){var activityTypeFilter=_ref.activityTypeFilter,_onActivityTypeFilterChange=_ref.onActivityTypeFilterChange;return(0,jsx_runtime.jsxs)(ActivityFeedFiltersRow,{children:[(0,jsx_runtime.jsx)(StyledTitle,{children:"Filter by"}),(0,jsx_runtime.jsx)(Analytics.Z,{children:function children(pushAnalytics){return(0,jsx_runtime.jsx)(filters_SelectFilter,{onActivityTypeFilterChange:function onActivityTypeFilterChange(e){_onActivityTypeFilterChange(e),function trackAnalytics(e,pushAnalytics){var _e$target=e.target;pushAnalytics({event:"activityTypeDropDown",extra:{dropDownOptionSelected:_e$target.options[_e$target.selectedIndex].text}})}(e,pushAnalytics)},value:activityTypeFilter})}})]})};ActivityFeedFilters.displayName="ActivityFeedFilters",ActivityFeedFilters.propTypes={activityTypeFilter:prop_types_default().array.isRequired,onActivityTypeFilterChange:prop_types_default().func.isRequired},ActivityFeedFilters.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedFilters",props:{activityTypeFilter:{description:"",type:{name:"array"},required:!0},onActivityTypeFilterChange:{description:"",type:{name:"func"},required:!0}}};const ActivityFeed_ActivityFeedFilters=ActivityFeedFilters;var ActivityFeedPagination_templateObject,govuk_react_button_esm=__webpack_require__("./node_modules/@govuk-react/button/dist/govuk-react-button.esm.js"),govuk_react_loading_box_esm=__webpack_require__("./node_modules/@govuk-react/loading-box/dist/govuk-react-loading-box.esm.js"),activity_feed_constants=__webpack_require__("./src/apps/companies/apps/activity-feed/constants.js");function ActivityFeedPagination_typeof(o){return ActivityFeedPagination_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityFeedPagination_typeof(o)}function ActivityFeedPagination_defineProperties(target,props){for(var i=0;i {}",computed:!1},description:"",type:{name:"func"},required:!1},isLoading:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isOverview:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1}}};var ActivityFeedContainer=(0,styled_components_browser_esm.ZP)("div")(ActivityFeed_templateObject||(ActivityFeed_templateObject=ActivityFeed_taggedTemplateLiteral(["\n margin: "," 0;\n"])),govuk_react_constants_esm.N_.SCALE_2),ActivityFeedCardList=(0,styled_components_browser_esm.ZP)("ol")(ActivityFeed_templateObject2||(ActivityFeed_templateObject2=ActivityFeed_taggedTemplateLiteral(["\n list-style-type: none;\n padding: 0;\n margin-top: ",";\n\n & > li {\n margin-bottom: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2),ActivityFeed=function(_React$Component){!function ActivityFeed_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&ActivityFeed_setPrototypeOf(subClass,superClass)}(ActivityFeed,_React$Component);var _super=ActivityFeed_createSuper(ActivityFeed);function ActivityFeed(props){var _this;return function ActivityFeed_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ActivityFeed),(_this=_super.call(this,props)).state={},_this.onActivityTypeFilterChange=_this.onActivityTypeFilterChange.bind(ActivityFeed_assertThisInitialized(_this)),_this}return function ActivityFeed_createClass(Constructor,protoProps,staticProps){return protoProps&&ActivityFeed_defineProperties(Constructor.prototype,protoProps),staticProps&&ActivityFeed_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(ActivityFeed,[{key:"onActivityTypeFilterChange",value:function onActivityTypeFilterChange(e){var activityTypeFilter=e.target.value;(0,this.props.sendQueryParams)({activityTypeFilter}),this.setState({activityTypeFilter})}},{key:"render",value:function render(){var _this$props=this.props,activities=_this$props.activities,onLoadMore=_this$props.onLoadMore,hasMore=_this$props.hasMore,isLoading=_this$props.isLoading,actions=_this$props.actions,children=_this$props.children,totalActivities=_this$props.totalActivities,companyIsArchived=_this$props.companyIsArchived,isOverview=_this$props.isOverview,feedType=_this$props.feedType,activityTypeFilter=this.state.activityTypeFilter;return(0,jsx_runtime.jsxs)(ActivityFeedContainer,{"data-test":"activity-feed",children:[!isOverview&&(0,jsx_runtime.jsx)(ActivityFeed_ActivityFeedHeader,{totalActivities,actions}),!companyIsArchived&&!isOverview&&(0,jsx_runtime.jsx)(ActivityFeed_ActivityFeedFilters,{activityTypeFilter,onActivityTypeFilterChange:this.onActivityTypeFilterChange}),(0,jsx_runtime.jsx)(ActivityFeedCardList,{children:activities.map((function(activity){return(0,jsx_runtime.jsx)("li",{children:(0,jsx_runtime.jsx)(ActivityFeed_Activity,{activity,isOverview})},activity.id)}))}),hasMore&&(0,jsx_runtime.jsx)(ActivityFeedPagination,{isLoading,onLoadMore,feedType,isOverview}),children]})}}]),ActivityFeed}(react.Component);function ActivityFeedApp_typeof(o){return ActivityFeedApp_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityFeedApp_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==ActivityFeedApp_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function ActivityFeedApp_defineProperties(target,props){for(var i=0;i {}",computed:!1},description:"",type:{name:"func"},required:!1},sendQueryParams:{defaultValue:{value:"() => {}",computed:!1},description:"",type:{name:"func"},required:!1},children:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},activities:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"object"}},required:!1},hasMore:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},isLoading:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},totalActivities:{defaultValue:{value:"0",computed:!1},description:"",type:{name:"number"},required:!1},isGlobalUltimate:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},dnbHierarchyCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},companyIsArchived:{description:"",type:{name:"bool"},required:!1},isOverview:{description:"",type:{name:"bool"},required:!1}}};var ActivityFeedApp=function(_React$Component){!function ActivityFeedApp_inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&ActivityFeedApp_setPrototypeOf(subClass,superClass)}(ActivityFeedApp,_React$Component);var _fetchActivities,_onLoadMore,_componentDidMount,_super=ActivityFeedApp_createSuper(ActivityFeedApp);function ActivityFeedApp(props){var _this;!function ActivityFeedApp_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,ActivityFeedApp),_this=_super.call(this,props);var activityType=props.activityType,feedType=props.feedType;return _this.state={activities:[],error:!1,hasMore:!0,isLoading:!0,from:0,total:0,queryParams:{activityType,feedType}},_this.onLoadMore=_this.onLoadMore.bind(ActivityFeedApp_assertThisInitialized(_this)),_this.setQueryParams=_this.setQueryParams.bind(ActivityFeedApp_assertThisInitialized(_this)),_this}return function ActivityFeedApp_createClass(Constructor,protoProps,staticProps){return protoProps&&ActivityFeedApp_defineProperties(Constructor.prototype,protoProps),staticProps&&ActivityFeedApp_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(ActivityFeedApp,[{key:"componentDidMount",value:(_componentDidMount=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:return _context.next=2,this.onLoadMore();case 2:case"end":return _context.stop()}}),_callee,this)}))),function componentDidMount(){return _componentDidMount.apply(this,arguments)})},{key:"setQueryParams",value:function setQueryParams(queryParams){this.setState({from:0,activities:[],queryParams},this.onLoadMore)}},{key:"onLoadMore",value:(_onLoadMore=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var _this$state,activities,queryParams,from,_this$props,apiEndpoint,numberOfItems,_yield$ActivityFeedAp,newActivities,total,allActivities;return _regeneratorRuntime().wrap((function _callee2$(_context2){for(;;)switch(_context2.prev=_context2.next){case 0:return _this$state=this.state,activities=_this$state.activities,queryParams=_this$state.queryParams,from=_this$state.from,_this$props=this.props,apiEndpoint=_this$props.apiEndpoint,numberOfItems=_this$props.numberOfItems,this.setState({isLoading:!0}),_context2.prev=3,_context2.next=6,ActivityFeedApp.fetchActivities(apiEndpoint,from,numberOfItems,queryParams,this.props.isOverview);case 6:_yield$ActivityFeedAp=_context2.sent,newActivities=_yield$ActivityFeedAp.activities,total=_yield$ActivityFeedAp.total,allActivities=activities.concat(newActivities),this.setState({activities:allActivities,isLoading:!1,hasMore:total>allActivities.length,from:from+numberOfItems,total}),_context2.next=16;break;case 13:_context2.prev=13,_context2.t0=_context2.catch(3),this.setState({isLoading:!1,hasMore:!1,error:!0});case 16:case"end":return _context2.stop()}}),_callee2,this,[[3,13]])}))),function onLoadMore(){return _onLoadMore.apply(this,arguments)})},{key:"render",value:function render(){var _this$state2=this.state,activities=_this$state2.activities,isLoading=_this$state2.isLoading,hasMore=_this$state2.hasMore,error=_this$state2.error,total=_this$state2.total,_this$props2=this.props,actions=_this$props2.actions,isGlobalUltimate=_this$props2.isGlobalUltimate,dnbHierarchyCount=_this$props2.dnbHierarchyCount,companyIsArchived=_this$props2.companyIsArchived,isOverview=_this$props2.isOverview,feedType=_this$props2.feedType,activityType=_this$props2.activityType,isEmptyFeed=0===activities.length&&!hasMore;return(0,jsx_runtime.jsxs)(ActivityFeed,{activities,actions,isLoading,hasMore,onLoadMore:this.onLoadMore,sendQueryParams:this.setQueryParams,totalActivities:total,isGlobalUltimate,dnbHierarchyCount,companyIsArchived,isOverview,feedType,activityType,children:[isEmptyFeed&&!error&&(0,jsx_runtime.jsx)("div",{"data-test":"noActivities",children:"There are no activities to show."}),error&&(0,jsx_runtime.jsx)("div",{children:"Error occurred while loading activities."})]})}}],[{key:"fetchActivities",value:(_fetchActivities=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(apiEndpoint,from,numberOfItems,queryParams,isOverview){var activityType,feedType,params,_yield$axios$get,data,total,activities;return _regeneratorRuntime().wrap((function _callee3$(_context3){for(;;)switch(_context3.prev=_context3.next){case 0:return activityType=queryParams.activityType,feedType=queryParams.feedType,params={from,size:numberOfItems,activityType,feedType},_context3.next=4,axios_default().get(apiEndpoint,{params});case 4:return _yield$axios$get=_context3.sent,data=_yield$axios$get.data,isOverview&&data.activities&&data.activities.length&&(data.activities=data.activities.filter((function(activity){return"maxemail"!==activity["dit:application"]}))),total=data.total,activities=data.activities,_context3.abrupt("return",{total,activities});case 9:case"end":return _context3.stop()}}),_callee3)}))),function fetchActivities(_x,_x2,_x3,_x4,_x5){return _fetchActivities.apply(this,arguments)})}]),ActivityFeedApp}(react.Component);ActivityFeedApp.displayName="ActivityFeedApp",ActivityFeedApp_defineProperty(ActivityFeedApp,"propTypes",{actions:prop_types_default().node,activityType:prop_types_default().array.isRequired,apiEndpoint:prop_types_default().string.isRequired,isGlobalUltimate:prop_types_default().bool,dnbHierarchyCount:prop_types_default().number,companyIsArchived:prop_types_default().bool,numberOfItems:prop_types_default().number,feedType:prop_types_default().string}),ActivityFeedApp_defineProperty(ActivityFeedApp,"defaultProps",{activityType:[],actions:null,isGlobalUltimate:!1,dnbHierarchyCount:null,numberOfItems:20,feedType:activity_feed_constants.FILTER_FEED_TYPE.ALL}),ActivityFeedApp.__docgenInfo={description:"",methods:[{name:"setQueryParams",docblock:null,modifiers:[],params:[{name:"queryParams",type:null}],returns:null},{name:"onLoadMore",docblock:null,modifiers:["async"],params:[],returns:null},{name:"fetchActivities",docblock:null,modifiers:["static","async"],params:[{name:"apiEndpoint",type:null},{name:"from",type:null},{name:"numberOfItems",type:null},{name:"queryParams",type:null},{name:"isOverview",type:null}],returns:null}],displayName:"ActivityFeedApp",props:{activityType:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"array"},required:!1},actions:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},isGlobalUltimate:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},dnbHierarchyCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},numberOfItems:{defaultValue:{value:"20",computed:!1},description:"",type:{name:"number"},required:!1},feedType:{defaultValue:{value:"FILTER_FEED_TYPE.ALL",computed:!0},description:"",type:{name:"string"},required:!1},apiEndpoint:{description:"",type:{name:"string"},required:!0},companyIsArchived:{description:"",type:{name:"bool"},required:!1}}};var ActivityFeedAction_templateObject;__webpack_require__("./node_modules/core-js/modules/es.string.link.js");var Link=(0,styled_components_browser_esm.ZP)("a")(ActivityFeedAction_templateObject||(ActivityFeedAction_templateObject=function ActivityFeedAction_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: 0;\n margin-top: ",";\n "," {\n margin-left: ",";\n margin-top: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_3),ActivityFeedAction=function ActivityFeedAction(_ref){var text=_ref.text,link=_ref.link;return(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:Link,href:link,buttonColour:"#dee0e2",buttonTextColour:"#000",children:text},text)};ActivityFeedAction.displayName="ActivityFeedAction",ActivityFeedAction.propTypes={text:prop_types_default().string.isRequired,link:prop_types_default().string.isRequired},ActivityFeedAction.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedAction",props:{text:{description:"",type:{name:"string"},required:!0},link:{description:"",type:{name:"string"},required:!0}}};var Badge=__webpack_require__("./src/client/components/Badge/index.jsx"),ButtonLink=__webpack_require__("./src/client/components/ButtonLink/index.jsx"),CollectionItem=(__webpack_require__("./src/client/components/CollectionList/index.jsx"),__webpack_require__("./src/client/components/CollectionList/CollectionItem.jsx")),CollectionHeader=__webpack_require__("./src/client/components/CollectionList/CollectionHeader.jsx"),react_router=(__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/react-router/esm/react-router.js")),lib=__webpack_require__("./node_modules/qs/lib/index.js"),lib_default=__webpack_require__.n(lib),CollectionHeaderRow=__webpack_require__("./src/client/components/CollectionList/CollectionHeaderRow.jsx"),govuk_react_esm=__webpack_require__("./node_modules/govuk-react/dist/govuk-react.esm.js"),govuk_react_lib_esm=__webpack_require__("./node_modules/@govuk-react/lib/dist/govuk-react-lib.esm.js");function Select_typeof(o){return Select_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Select_typeof(o)}var Select_templateObject,_excluded=["input"],_excluded2=["onChange","initialValue"];function Select_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function Select_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledGovSelect=(0,styled_components_browser_esm.ZP)(govuk_react_esm.Ph)(Select_templateObject||(Select_templateObject=function Select_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n\n select {\n flex: 1;\n width: 'initial';\n min-width: 200px;\n }\n\n "," {\n display: flex;\n align-items: center;\n flex-direction: row;\n ","\n span {\n ","\n }\n }\n"])),govuk_react_lib_esm.W0.responsive({size:2,property:"margin",direction:["top"]}),govuk_react_constants_esm.qk.TABLET,govuk_react_lib_esm.W0.responsive({size:0,property:"margin",direction:["top"]}),govuk_react_lib_esm.W0.responsive({size:1,property:"margin",direction:["right"]})),Select=function Select(_ref){var input=_ref.input,props=_objectWithoutProperties(_ref,_excluded),_input$onChange=input.onChange,_onChange=void 0===_input$onChange?function(){}:_input$onChange,_input$initialValue=input.initialValue,initialValue=void 0===_input$initialValue?"":_input$initialValue,inputProps=_objectWithoutProperties(input,_excluded2),_useState2=Select_slicedToArray((0,react.useState)(initialValue),2),value=_useState2[0],setValue=_useState2[1];return(0,react.useEffect)((function(){return setValue(initialValue)}),[initialValue]),(0,jsx_runtime.jsx)(StyledGovSelect,Select_objectSpread(Select_objectSpread({},props),{},{input:Select_objectSpread({onChange:function onChange(e){setValue(e.target.value),_onChange(e)},value},inputProps)}))};Select.displayName="Select",Select.__docgenInfo={description:"",methods:[],displayName:"Select"};const components_Select=Select;function RoutedSelect_typeof(o){return RoutedSelect_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedSelect_typeof(o)}var RoutedSelect_excluded=["qsParamName"];function RoutedSelect_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedSelect_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedSelect=function RoutedSelect(_ref){var qsParamName=_ref.qsParamName,props=RoutedSelect_objectWithoutProperties(_ref,RoutedSelect_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var location=_ref2.location,history=_ref2.history,qsParams=lib_default().parse(location.search.slice(1)),initialValue=(0,lodash.get)(qsParams,qsParamName,"");return(0,jsx_runtime.jsx)(components_Select,RoutedSelect_objectSpread(RoutedSelect_objectSpread({},props),{},{input:{initialValue,onChange:function onChange(e){history.push({search:lib_default().stringify(RoutedSelect_objectSpread(RoutedSelect_objectSpread({},qsParams),{},RoutedSelect_defineProperty({},qsParamName,e.target.value)))})}}}))}})};RoutedSelect.displayName="RoutedSelect",RoutedSelect.__docgenInfo={description:"",methods:[],displayName:"RoutedSelect"};const components_RoutedSelect=RoutedSelect;var CollectionSort_templateObject;var CollectionSort_StyledSpan=(0,styled_components_browser_esm.ZP)("span")(CollectionSort_templateObject||(CollectionSort_templateObject=function CollectionSort_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n color: ",";\n"])),colours.au),CollectionSort=function CollectionSort(_ref){var sortOptions=_ref.sortOptions,totalPages=_ref.totalPages,actions=sortOptions?(0,jsx_runtime.jsx)(components_RoutedSelect,{"data-test":"sortby",name:"sortBy",qsParamName:"sortby",label:"Sort by",children:sortOptions.map((function(_ref2,i){var name=_ref2.name,value=_ref2.value;return(0,jsx_runtime.jsx)("option",{value,children:name},i)}))}):null;return(0,jsx_runtime.jsx)(CollectionHeaderRow.Z,{actions,children:(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref3){var search=_ref3.location.search,searchParams=lib_default().parse(search.slice(1));return(0,jsx_runtime.jsxs)(CollectionSort_StyledSpan,{"data-test":"pagination-summary",children:["Page ",searchParams.page||1," of ",totalPages]})}})})};CollectionSort.displayName="CollectionSort",CollectionSort.propTypes={sortOptions:prop_types_default().arrayOf(prop_types_default().shape({name:prop_types_default().string.isRequired,value:prop_types_default().string.isRequired})),totalPages:prop_types_default().number.isRequired},CollectionSort.__docgenInfo={description:"",methods:[],displayName:"CollectionSort",props:{sortOptions:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{name:{name:"string",required:!0},value:{name:"string",required:!0}}}},required:!1},totalPages:{description:"",type:{name:"number"},required:!0}}};const CollectionList_CollectionSort=CollectionSort;var Task=__webpack_require__("./src/client/components/Task/index.jsx");function CollectionFilters_typeof(o){return CollectionFilters_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CollectionFilters_typeof(o)}function CollectionFilters_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function CollectionFilters_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&(0,jsx_runtime.jsx)(StyledSelect,{label:"View list",htmlFor:"view-list",input:{onChange:function onChange(e){return _onChange(e.target.value)},initialValue:selectedId,id:"view-list"},children:Object.entries(lists).map((function(_ref4){var _ref5=Header_slicedToArray(_ref4,2),id=_ref5[0],name=_ref5[1].name;return(0,jsx_runtime.jsx)("option",{value:id,"aria-label":name,children:name},id)}))})]})}));var FormActions=__webpack_require__("./src/client/components/Form/elements/FormActions.jsx"),SecondaryButton=__webpack_require__("./src/client/components/SecondaryButton.jsx"),ListHeader_StyledRoot=styled_components_browser_esm.ZP.div({display:"flex",alignItems:"baseline",justifyContent:"space-between"}),ListHeader_StyledHeading=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H3)({flexGrow:1,marginBottom:0}),StyledFormActions=(0,styled_components_browser_esm.ZP)(FormActions.Z)({textAlign:"right"}),ListHeader=function ListHeader(_ref){var id=_ref.id,name=_ref.name;return(0,jsx_runtime.jsxs)(ListHeader_StyledRoot,{children:[(0,jsx_runtime.jsx)(ListHeader_StyledHeading,{children:name}),(0,jsx_runtime.jsxs)(StyledFormActions,{children:[(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:govuk_react_link_esm.Z,href:urls_default().companyLists.rename(id),children:"Edit list name"}),(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:govuk_react_link_esm.Z,href:urls_default().companyLists.delete(id),children:"Delete list"})]})]})};ListHeader.displayName="ListHeader",ListHeader.__docgenInfo={description:"",methods:[],displayName:"ListHeader"};const CompanyLists_ListHeader=ListHeader;var govuk_react_table_esm=__webpack_require__("./node_modules/@govuk-react/table/dist/govuk-react-table.esm.js"),govuk_react_visually_hidden_esm=__webpack_require__("./node_modules/@govuk-react/visually-hidden/dist/govuk-react-visually-hidden.esm.js"),index_modern=__webpack_require__("./node_modules/react-lines-ellipsis/lib/index.modern.mjs");function Table_typeof(o){return Table_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Table_typeof(o)}function Table_defineProperty(obj,key,value){return(key=function Table_toPropertyKey(arg){var key=function Table_toPrimitive(input,hint){if("object"!==Table_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==Table_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===Table_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var Table_format=__webpack_require__("./src/client/utils/date.js").format,getMediaQuery=function getMediaQuery(theme){return(null==theme?void 0:theme.toHorizontalMediaQuery)||govuk_react_constants_esm.qk.TABLET},StyledButtonLink=styled_components_browser_esm.ZP.a({marginBottom:0,width:"100%"}),StyledTableRow=styled_components_browser_esm.ZP.tr((function(_ref){var theme=_ref.theme;return Table_defineProperty({borderBottom:"1px solid ".concat(colours.DU)},getMediaQuery(theme),{borderBottom:"none"})})),StyledCell=styled_components_browser_esm.ZP.td({padding:0,borderBottom:"none"}),StyledHeaderCell=styled_components_browser_esm.ZP.th({padding:0,borderBottom:"none"}),StyledTableCell=(0,styled_components_browser_esm.ZP)(StyledCell)((function(_ref3){var theme=_ref3.theme;return Table_defineProperty({display:"inline-block",width:"100%"},getMediaQuery(theme),{display:"table-cell",width:"auto",padding:"".concat(govuk_react_constants_esm.N_.SCALE_2," ").concat(govuk_react_constants_esm.N_.SCALE_4," ").concat(govuk_react_constants_esm.N_.SCALE_2," 0"),borderBottom:"1px solid ".concat(colours.DU)})})),StyledTableHeaderCell=(0,styled_components_browser_esm.ZP)(StyledHeaderCell)((function(_ref5){var theme=_ref5.theme;return Table_defineProperty({display:"none",fontWeight:govuk_react_constants_esm.Xw.bold},getMediaQuery(theme),{display:"table-cell",borderBottom:"1px solid ".concat(colours.DU)})})),TitleCell=(0,styled_components_browser_esm.ZP)(StyledTableCell)((function(_ref7){var theme=_ref7.theme;return Table_defineProperty({paddingTop:govuk_react_constants_esm.N_.SCALE_3},getMediaQuery(theme),{paddingTop:govuk_react_constants_esm.N_.SCALE_2})})),ColumnLabelCell=(0,styled_components_browser_esm.ZP)(StyledTableCell)((function(_ref9){var theme=_ref9.theme;return Table_defineProperty({position:"relative",marginTop:"".concat(govuk_react_constants_esm.N_.SCALE_5),"::before":{content:"'Last interaction'",position:"absolute",top:"-".concat(govuk_react_constants_esm.N_.SCALE_4),fontSize:"smaller"}},getMediaQuery(theme),{marginTop:0,"::before":{content:"none"}})})),ActionCell=(0,styled_components_browser_esm.ZP)(StyledTableCell)((function(_ref11){var theme=_ref11.theme;return Table_defineProperty({paddingTop:govuk_react_constants_esm.N_.SCALE_2,paddingBottom:govuk_react_constants_esm.N_.SCALE_4},getMediaQuery(theme),{paddingRight:0,paddingBottom:govuk_react_constants_esm.N_.SCALE_2})})),StyledLink=(0,styled_components_browser_esm.ZP)(govuk_react_link_esm.Z)({":focus":{color:colours.su,":active":{color:colours.KW},":hover":{color:colours.oh},":visited":{color:colours.Pf}}}),StyledLinesEllipsis=(0,styled_components_browser_esm.ZP)(index_modern.Z)({display:"inline-block",background:colours.xm,textDecoration:"underline"}),Advisers=function Advisers(_ref13){var ditParticipants=_ref13.ditParticipants;return 0===ditParticipants.length?"Unknown adviser - Unknown team":ditParticipants.length>1?"Multiple advisers":ditParticipants.map((function(adviser,index){return(0,jsx_runtime.jsx)("div",{children:"".concat(adviser.name||"Unknown adviser"," - ").concat(adviser.team||"Unknown team")},index)}))},CompaniesTable=function CompaniesTable(_ref14){var companies=_ref14.companies;return(0,jsx_runtime.jsx)(govuk_react_table_esm.Z,{head:(0,jsx_runtime.jsxs)(govuk_react_table_esm.Z.Row,{children:[(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"auto",children:"Company name"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"15%",children:"Last interaction"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"25%",children:"Subject"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"20%",children:"Added by"}),(0,jsx_runtime.jsx)(StyledTableHeaderCell,{width:"151px",children:(0,jsx_runtime.jsx)(govuk_react_visually_hidden_esm.Z,{children:"Action"})})]}),children:companies.map((function(_ref15){var id=_ref15.id,name=_ref15.name,date=_ref15.date,subject=_ref15.subject,interactionId=_ref15.interactionId,ditParticipants=_ref15.ditParticipants;return(0,jsx_runtime.jsxs)(StyledTableRow,{children:[(0,jsx_runtime.jsx)(TitleCell,{children:(0,jsx_runtime.jsx)(StyledLink,{href:urls_default().companies.detail(id),children:(0,jsx_runtime.jsx)(StyledLinesEllipsis,{text:name,maxLine:"2",ellipsis:"...",trimRight:!0,basedOn:"words"})})}),(0,jsx_runtime.jsx)(ColumnLabelCell,{children:date?Table_format(date):"-"}),(0,jsx_runtime.jsx)(StyledTableCell,{children:interactionId?(0,jsx_runtime.jsx)(StyledLink,{href:urls_default().interactions.detail(interactionId),children:(0,jsx_runtime.jsx)(StyledLinesEllipsis,{text:subject,maxLine:"2",ellipsis:"...",trimRight:!0,basedOn:"words"})}):"No interactions have been recorded"}),(0,jsx_runtime.jsx)(StyledTableCell,{children:(0,jsx_runtime.jsx)(Advisers,{ditParticipants})}),(0,jsx_runtime.jsx)(ActionCell,{children:(0,jsx_runtime.jsx)(SecondaryButton.Z,{as:StyledButtonLink,href:urls_default().companies.interactions.create(id),"aria-label":"Add interaction with ".concat(name),children:"Add interaction"})})]},id)}))})};CompaniesTable.displayName="CompaniesTable",CompaniesTable.__docgenInfo={description:"",methods:[],displayName:"CompaniesTable"};const Table=CompaniesTable;function CompanyLists_typeof(o){return CompanyLists_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyLists_typeof(o)}function CompanyLists_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function CompanyLists_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&(0,jsx_runtime.jsx)(Filters.ZP,{}),(0,jsx_runtime.jsx)(Table,{companies:applyFilters(companies,query,orderBy)})]}):(0,jsx_runtime.jsxs)(govuk_react_hint_text_esm.Z,{children:["You have not added any companies to your list.",(0,jsx_runtime.jsx)("br",{}),"You can add companies to this list from a company page, and only you can see this list."]})}})]})})),EmptyState=function EmptyState(){return(0,jsx_runtime.jsx)(ContentWithHeading.Z,{heading:"My companies lists",children:(0,jsx_runtime.jsxs)(govuk_react_hint_text_esm.Z,{children:["You have not yet created any lists with companies.",(0,jsx_runtime.jsx)("br",{}),"You can add companies to lists from a company page, and only you can see these lists."]})})};EmptyState.displayName="EmptyState";const CompanyLists=(0,es.connect)(CompanyLists_state.H)((function(_ref2){var lists=_ref2.lists;return lists?Object.keys(lists).length?(0,jsx_runtime.jsx)(CompanyList,{}):(0,jsx_runtime.jsx)(EmptyState,{}):(0,jsx_runtime.jsx)(Task.Z.Status,{name:"Company lists",id:"dashboard",progressMessage:"Loading my companies lists",startOnRender:{onSuccessDispatch:actions.Og6}})}));var LocalHeaderCompanyLists_templateObject,LocalHeaderCompanyLists_templateObject2,LocalHeaderCompanyLists_templateObject3,govuk_react_main_esm=__webpack_require__("./node_modules/@govuk-react/main/dist/govuk-react-main.esm.js"),govuk_react_grid_col_esm=__webpack_require__("./node_modules/@govuk-react/grid-col/dist/govuk-react-grid-col.esm.js"),govuk_react_grid_row_esm=__webpack_require__("./node_modules/@govuk-react/grid-row/dist/govuk-react-grid-row.esm.js"),govuk_react_details_esm=__webpack_require__("./node_modules/@govuk-react/details/dist/govuk-react-details.esm.js"),LocalHeader=__webpack_require__("./src/client/components/LocalHeader/LocalHeader.jsx"),LocalHeaderHeading=__webpack_require__("./src/client/components/LocalHeader/LocalHeaderHeading.jsx"),state=__webpack_require__("./src/client/components/CompanyLocalHeader/state.js");function LocalHeaderCompanyLists_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledCompanyListButton=(0,styled_components_browser_esm.ZP)("button")(LocalHeaderCompanyLists_templateObject||(LocalHeaderCompanyLists_templateObject=LocalHeaderCompanyLists_taggedTemplateLiteral(["\n display: inline-table;\n padding: 4px 8px 4px 8px;\n border: none;\n vertical-align: middle;\n cursor: pointer;\n margin-right: 10px;\n font-size: ",";\n span {\n pointer-events: none;\n display: inline-block;\n font-size: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_14,govuk_react_constants_esm.Kt.SIZE_16),StyledCompanyListItemButton=(0,styled_components_browser_esm.ZP)(StyledCompanyListButton)(LocalHeaderCompanyLists_templateObject2||(LocalHeaderCompanyLists_templateObject2=LocalHeaderCompanyLists_taggedTemplateLiteral(["\n background-color: ",";\n color: ",";\n border-bottom: 3px solid ",";\n font-weight: ",";\n"])),colours.Zv,colours.hJ,colours.hJ,govuk_react_constants_esm.Xw.bold),StyledAddButton=(0,styled_components_browser_esm.ZP)(StyledCompanyListButton)(LocalHeaderCompanyLists_templateObject3||(LocalHeaderCompanyLists_templateObject3=LocalHeaderCompanyLists_taggedTemplateLiteral(["\n background-color: ",";\n border-bottom: 3px solid ",";\n"])),colours.nx,colours.N1),LocalHeaderCompanyLists=function LocalHeaderCompanyLists(_ref){var results=_ref.results,company=_ref.company,returnUrl=_ref.returnUrl,queryString=returnUrl?"".concat(returnUrl):"/companies/".concat(company.id),handleClickAddRemove=function handleClickAddRemove(){window.location.href="/companies/".concat(company.id,"/lists/add-remove?returnUrl=").concat(queryString)};return(0,jsx_runtime.jsx)(Task.Z.Status,{name:state.d,id:state.ID,progressMessage:"Loading my lists",startOnRender:{payload:{id:company.id},onSuccessDispatch:actions.aab},children:function children(){return results&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[Object.keys(results).map((function(list){return(0,jsx_runtime.jsxs)(StyledCompanyListItemButton,{"data-test":"list-item-".concat((0,lodash.kebabCase)(results[list].name),"-button"),onClick:handleClickAddRemove,children:[results[list].name," ",(0,jsx_runtime.jsx)("span",{children:"x"})]},list)})),(0,jsx_runtime.jsxs)(StyledAddButton,{"data-test":"add-to-list-button",onClick:handleClickAddRemove,children:[(0,jsx_runtime.jsx)("span",{children:"+"})," Add to list"]})]})}})};LocalHeaderCompanyLists.displayName="LocalHeaderCompanyLists",LocalHeaderCompanyLists.__docgenInfo={description:"",methods:[],displayName:"LocalHeaderCompanyLists"};const CompanyLocalHeader_LocalHeaderCompanyLists=(0,es.connect)(state.H)(LocalHeaderCompanyLists);var LocalHeaderCompanyRefer_templateObject;var StyledCompanyReferButton=(0,styled_components_browser_esm.ZP)("button")(LocalHeaderCompanyRefer_templateObject||(LocalHeaderCompanyRefer_templateObject=function LocalHeaderCompanyRefer_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: inline-table;\n padding: 4px 8px 4px 8px;\n border: none;\n vertical-align: middle;\n cursor: pointer;\n margin-right: 10px;\n font-size: ",";\n span {\n pointer-events: none;\n display: inline-block;\n }\n background-color: ",";\n border-bottom: 3px solid ",";\n"])),govuk_react_constants_esm.Kt.SIZE_14,colours.nx,colours.N1),LocalHeaderCompanyRefer=function LocalHeaderCompanyRefer(_ref){var companyId=_ref.companyId;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsx)(StyledCompanyReferButton,{"data-test":"refer-company-button",onClick:function handleClickRefer(){window.location.href=urls_default().companies.referrals.send(companyId)},children:(0,jsx_runtime.jsx)("span",{children:"Refer this company"})})})};LocalHeaderCompanyRefer.__docgenInfo={description:"",methods:[],displayName:"LocalHeaderCompanyRefer"};const CompanyLocalHeader_LocalHeaderCompanyRefer=LocalHeaderCompanyRefer;var utils_templateObject,utils_templateObject2,addresses=__webpack_require__("./src/client/utils/addresses.js"),ArchivePanel=__webpack_require__("./src/client/components/ArchivePanel/index.jsx");__webpack_require__("./src/client/modules/Companies/CollectionList/state.js");function utils_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var CollectionListPlaceholder_templateObject,CollectionListPlaceholder_templateObject2,CollectionListPlaceholder_templateObject3,shimmer=(0,styled_components_browser_esm.F4)(utils_templateObject||(utils_templateObject=utils_taggedTemplateLiteral(["\n 0% {\n background-position: -500px 0;\n }\n 100% {\n background-position: 500px 0;\n }\n"]))),animation=(0,styled_components_browser_esm.iv)(utils_templateObject2||(utils_templateObject2=utils_taggedTemplateLiteral(["\n animation-duration: 1.5s;\n animation-fill-mode: forwards;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n animation-name: ",";\n background: linear-gradient(to right, #eee 8%, #ddd 18%, #eee 33%);\n background-size: 1000px 104px;\n"])),shimmer);function CollectionListPlaceholder_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(0,styled_components_browser_esm.ZP)("ul")(CollectionListPlaceholder_templateObject||(CollectionListPlaceholder_templateObject=CollectionListPlaceholder_taggedTemplateLiteral(["\n margin-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),(0,styled_components_browser_esm.ZP)("li")(CollectionListPlaceholder_templateObject2||(CollectionListPlaceholder_templateObject2=CollectionListPlaceholder_taggedTemplateLiteral(["\n border-top: 1px solid ",";\n ",";\n"])),colours.zT,(function(_ref){var marginTop=_ref.marginTop;return marginTop&&"margin-top: ".concat(marginTop,"px;")})),(0,styled_components_browser_esm.ZP)("div")(CollectionListPlaceholder_templateObject3||(CollectionListPlaceholder_templateObject3=CollectionListPlaceholder_taggedTemplateLiteral(["\n ",";\n ",";\n ",";\n ",";\n"])),animation,(function(_ref2){var height=_ref2.height;return height&&"height: ".concat(height,"px;")}),(function(_ref3){var widthPercent=_ref3.widthPercent;return widthPercent&&"width: ".concat(widthPercent,"%;")}),(function(_ref4){var marginTop=_ref4.marginTop;return marginTop&&"margin-top: ".concat(marginTop,"px;")}));var CollectionListFiltersPlaceholder_templateObject,CollectionListFiltersPlaceholder_templateObject2,CollectionListFiltersPlaceholder_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10;__webpack_require__("./node_modules/core-js/modules/es.array.fill.js");function CollectionListFiltersPlaceholder_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(0,styled_components_browser_esm.ZP)("div")(CollectionListFiltersPlaceholder_templateObject||(CollectionListFiltersPlaceholder_templateObject=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 150px;\n height: ",";\n"])),animation,govuk_react_constants_esm.N_.SCALE_4),(0,styled_components_browser_esm.ZP)("ul")(CollectionListFiltersPlaceholder_templateObject2||(CollectionListFiltersPlaceholder_templateObject2=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n margin-bottom: 40px;\n"]))),(0,styled_components_browser_esm.ZP)("li")(CollectionListFiltersPlaceholder_templateObject3||(CollectionListFiltersPlaceholder_templateObject3=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n display: flex;\n margin-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),(0,styled_components_browser_esm.ZP)("div")(_templateObject4||(_templateObject4=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 25px;\n height: 25px;\n"])),animation),(0,styled_components_browser_esm.ZP)("div")(_templateObject5||(_templateObject5=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n align-self: center;\n width: ","%;\n height: ",";\n margin-left: ",";\n"])),animation,function randomNumberMinToMax(min,max){return Math.floor(Math.random()*(max-min+1)+min)}(50,90),govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.N_.SCALE_2);var InputList=(0,styled_components_browser_esm.ZP)("ul")(_templateObject6||(_templateObject6=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n margin-bottom: 30px;\n"]))),InputListItem=(0,styled_components_browser_esm.ZP)("li")(_templateObject7||(_templateObject7=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n &:first-child {\n margin-top: 50px;\n }\n &:only-child {\n margin-top: 0;\n }\n"]))),InputListItemLabel=(0,styled_components_browser_esm.ZP)("div")(_templateObject8||(_templateObject8=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 150px;\n height: ",";\n"])),animation,govuk_react_constants_esm.N_.SCALE_4),InputListItemField=(0,styled_components_browser_esm.ZP)("div")(_templateObject9||(_templateObject9=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: ",";\n height: 35px;\n margin-top: ",";\n"])),animation,govuk_react_constants_esm.Tq,govuk_react_constants_esm.N_.SCALE_1),CollectionListFiltersPlaceholder_InputPlaceholder=function InputPlaceholder(_ref2){var _ref2$count=_ref2.count,count=void 0===_ref2$count?1:_ref2$count;return(0,jsx_runtime.jsx)(InputList,{children:Array.from(Array(count).keys()).map((function(el,i){return(0,jsx_runtime.jsxs)(InputListItem,{children:[(0,jsx_runtime.jsx)(InputListItemLabel,{}),(0,jsx_runtime.jsx)(InputListItemField,{})]},i)}))})};CollectionListFiltersPlaceholder_InputPlaceholder.displayName="InputPlaceholder";(0,styled_components_browser_esm.ZP)("div")(_templateObject10||(_templateObject10=CollectionListFiltersPlaceholder_taggedTemplateLiteral(["\n ",";\n width: 250px;\n height: ",";\n margin-bottom: ",";\n"])),animation,govuk_react_constants_esm.N_.SCALE_5,govuk_react_constants_esm.N_.SCALE_4);CollectionListFiltersPlaceholder_InputPlaceholder.__docgenInfo={description:"",methods:[],displayName:"InputPlaceholder",props:{count:{defaultValue:{value:"1",computed:!1},required:!1}}};var CompanyLocalHeader_templateObject,CompanyLocalHeader_templateObject2,CompanyLocalHeader_templateObject3,CompanyLocalHeader_templateObject4,CompanyLocalHeader_templateObject5,CompanyLocalHeader_templateObject6,CompanyLocalHeader_templateObject7,CompanyLocalHeader_templateObject8,CompanyLocalHeader_templateObject9,CompanyLocalHeader_templateObject10,_templateObject11,isItaTierDAccount=function isItaTierDAccount(oneListGroupTier){return oneListGroupTier&&"1929c808-99b4-4abf-a891-45f2e187b410"===oneListGroupTier.id},buildCompanyBreadcrumbs=function buildCompanyBreadcrumbs(pageBreadcrumbs,companyId,companyName){return[{link:urls_default().dashboard.index(),text:"Home"},{link:urls_default().companies.index(),text:"Companies"},{link:urls_default().companies.detail(companyId),text:companyName}].concat(pageBreadcrumbs)};function CompanyLocalHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var LocalHeaderTradingNames=(0,styled_components_browser_esm.ZP)(govuk_react_heading_esm.H4)(CompanyLocalHeader_templateObject||(CompanyLocalHeader_templateObject=CompanyLocalHeader_taggedTemplateLiteral(["\n font-weight: normal;\n"]))),StyledAddress=(0,styled_components_browser_esm.ZP)("p")(CompanyLocalHeader_templateObject2||(CompanyLocalHeader_templateObject2=CompanyLocalHeader_taggedTemplateLiteral(["\n margin-top: ",";\n margin-bottom: ",";\n"])),govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_2),BadgeText=(0,styled_components_browser_esm.ZP)("span")(CompanyLocalHeader_templateObject3||(CompanyLocalHeader_templateObject3=CompanyLocalHeader_taggedTemplateLiteral(["\n font-weight: 600;\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),TypeWrapper=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject4||(CompanyLocalHeader_templateObject4=CompanyLocalHeader_taggedTemplateLiteral(["\n @media (min-width: ",") {\n display: table-row;\n }\n"])),govuk_react_constants_esm.j$.TABLET),StyledButtonContainer=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject5||(CompanyLocalHeader_templateObject5=CompanyLocalHeader_taggedTemplateLiteral(["\n width: 100%;\n display: inline-block;\n"]))),StyledList=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject6||(CompanyLocalHeader_templateObject6=CompanyLocalHeader_taggedTemplateLiteral(["\n padding-bottom: 10px;\n display: inline-flex;\n"]))),CompanyLocalHeader_StyledButtonLink=styled_components_browser_esm.ZP.a({marginBottom:10,float:"right"}),BadgeWrapper=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject7||(CompanyLocalHeader_templateObject7=CompanyLocalHeader_taggedTemplateLiteral(["\n @media (min-width: ",") {\n display: table-cell;\n }\n"])),govuk_react_constants_esm.j$.TABLET),StyledDetails=(0,styled_components_browser_esm.ZP)(govuk_react_details_esm.Z)(CompanyLocalHeader_templateObject8||(CompanyLocalHeader_templateObject8=CompanyLocalHeader_taggedTemplateLiteral(["\n @media (min-width: ",") {\n margin: 0 0 0 ",";\n }\n span,\n div {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.j$.TABLET,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.Kt.SIZE_16),StyledDescription=(0,styled_components_browser_esm.ZP)("div")(CompanyLocalHeader_templateObject9||(CompanyLocalHeader_templateObject9=CompanyLocalHeader_taggedTemplateLiteral(["\n padding: ",";\n background-color: ",";\n\n * + & {\n margin-top: ",";\n }\n\n p {\n margin-top: 0;\n margin-bottom: 0;\n\n &:not(:last-child) {\n margin-bottom: ",";\n }\n }\n\n & + * {\n margin-top: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_2,colours.nx,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.N_.SCALE_2,govuk_react_constants_esm.N_.SCALE_3),StyledMain=(0,styled_components_browser_esm.ZP)(govuk_react_main_esm.Z)(CompanyLocalHeader_templateObject10||(CompanyLocalHeader_templateObject10=CompanyLocalHeader_taggedTemplateLiteral(["\n padding-top: ",";\n div {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.Kt.SIZE_20),StyledRelatedCompaniesWrapper=(0,styled_components_browser_esm.ZP)("div")(_templateObject11||(_templateObject11=CompanyLocalHeader_taggedTemplateLiteral(["\n padding-bottom: 20px;\n"]))),isUltimate=function isUltimate(company){return!!company.isGlobalUltimate},isGlobalHQ=function isGlobalHQ(company){return company.headquarterType&&"ghq"===company.headquarterType.name},hasManagedAccountDetails=function hasManagedAccountDetails(company){return company.oneListGroupTier&&function hasAllocatedLeadIta(company){return null!=company.oneListGroupGlobalAccountManager}(company)},CompanyLocalHeader=function CompanyLocalHeader(_ref){var _company$tradingNames,breadcrumbs=_ref.breadcrumbs,flashMessages=_ref.flashMessages,company=_ref.company,dnbRelatedCompaniesCount=_ref.dnbRelatedCompaniesCount,returnUrl=_ref.returnUrl,csrfToken=_ref.csrfToken;return company&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(LocalHeader.Z,{breadcrumbs:buildCompanyBreadcrumbs(breadcrumbs,company.id,company.name),flashMessages,children:[(0,jsx_runtime.jsxs)(govuk_react_grid_row_esm.Z,{children:[(0,jsx_runtime.jsxs)(govuk_react_grid_col_esm.Z,{setWidth:"two-thirds",children:[(0,jsx_runtime.jsx)(LocalHeaderHeading.Z,{"data-test":"heading",children:company.name}),(null==company||null===(_company$tradingNames=company.tradingNames)||void 0===_company$tradingNames?void 0:_company$tradingNames.length)>0&&(0,jsx_runtime.jsxs)(LocalHeaderTradingNames,{"data-test":"trading-names",children:["Trading as: ",company.tradingNames.join(", ")]}),(0,jsx_runtime.jsx)(StyledAddress,{"data-test":"address",children:(0,addresses.addressToStringResource)(company.address)}),dnbRelatedCompaniesCount>0&&(0,jsx_runtime.jsx)(StyledRelatedCompaniesWrapper,{children:(0,jsx_runtime.jsx)(govuk_react_esm.rU,{href:urls_default().companies.dnbHierarchy.tree(company.id),"data-test":"company-tree-link",children:"View company tree: ".concat(dnbRelatedCompaniesCount+1," companies")})})]}),(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWith:"one-third",children:(0,jsx_runtime.jsxs)(StyledButtonContainer,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:CompanyLocalHeader_StyledButtonLink,"data-test":"header-add-interaction",href:urls_default().companies.interactions.create(company.id),"aria-label":"Add interaction with ".concat(company.name),children:"Add interaction"}),(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:CompanyLocalHeader_StyledButtonLink,"data-test":"header-add-export-project",href:urls_default().exportPipeline.create(company.id),"aria-label":"Add export project",buttonColour:colours.nx,buttonTextColour:colours.cK,children:"Add export project"})]})})]}),(0,jsx_runtime.jsxs)(StyledList,{children:[(0,jsx_runtime.jsx)(CompanyLocalHeader_LocalHeaderCompanyLists,{company,returnUrl}),(0,jsx_runtime.jsx)(CompanyLocalHeader_LocalHeaderCompanyRefer,{companyId:company.id})]}),(isUltimate(company)||isGlobalHQ(company))&&(0,jsx_runtime.jsxs)(TypeWrapper,{children:[(0,jsx_runtime.jsx)(BadgeWrapper,{children:(0,jsx_runtime.jsx)(Badge.Z,{children:(0,jsx_runtime.jsx)(BadgeText,{"data-test":"badge",children:isUltimate(company)?"Ultimate HQ":"Global HQ"})})}),isUltimate(company)&&(0,jsx_runtime.jsxs)(StyledDetails,{summary:"What does Ultimate HQ mean?","data-test":"ultimate-hq-details",children:["This HQ is in control of all related company records for"," ",company.name,"."]})]}),hasManagedAccountDetails(company)&&(0,jsx_runtime.jsx)(StyledDescription,{"data-test":"description",children:hasManagedAccountDetails(company)&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)("p",{children:["This is an account managed company (One List"," ",company.oneListGroupTier.name,")"]}),(0,jsx_runtime.jsxs)("p",{children:[isItaTierDAccount(company.oneListGroupTier)?"Lead ITA":"Global Account Manager",": ",company.oneListGroupGlobalAccountManager.name," ",(0,jsx_runtime.jsx)("a",{href:urls_default().companies.accountManagement.index(company.id),children:isItaTierDAccount(company.oneListGroupTier)?"View Lead adviser":"View core team"})]})]})})]}),company.archived&&(0,jsx_runtime.jsx)(ArchivePanel.Z,{archivedBy:company.archivedBy,archivedOn:company.archivedOn,archiveReason:company.archivedReason,unarchiveUrl:"".concat(urls_default().companies.unarchive(company.id),"?_csrf=").concat(csrfToken),type:"company"}),company.pendingDnbInvestigation&&(0,jsx_runtime.jsx)(StyledMain,{"data-test":"investigation-message",children:(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"This company record is based on information that has not yet been validated. This information is currently being checked by the Data Hub support team."})})]})};CompanyLocalHeader.propTypes={breadcrumbs:prop_types_default().arrayOf(prop_types_default().shape({link:prop_types_default().string,text:prop_types_default().string.isRequired})).isRequired,flashMessages:prop_types_default().shape({type:prop_types_default().oneOfType([prop_types_default().arrayOf(prop_types_default().shape({body:prop_types_default().string.isRequired,heading:prop_types_default().string.isRequired,id:prop_types_default().string})),prop_types_default().arrayOf(prop_types_default().string).isRequired])}),company:prop_types_default().object.isRequired,dnbRelatedCompaniesCount:prop_types_default().number,returnUrl:prop_types_default().string},CompanyLocalHeader.defaultProps={flashMessages:null,dnbRelatedCompaniesCount:null,returnUrl:null},CompanyLocalHeader.__docgenInfo={description:"",methods:[],displayName:"CompanyLocalHeader",props:{flashMessages:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"shape",value:{type:{name:"union",value:[{name:"arrayOf",value:{name:"shape",value:{body:{name:"string",required:!0},heading:{name:"string",required:!0},id:{name:"string",required:!1}}}},{name:"arrayOf",value:{name:"string"}}],required:!1}}},required:!1},dnbRelatedCompaniesCount:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"number"},required:!1},returnUrl:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},breadcrumbs:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{link:{name:"string",required:!1},text:{name:"string",required:!0}}}},required:!0},company:{description:"",type:{name:"object"},required:!0}}};var CompanyLocalTab_templateObject,CompanyLocalTab_templateObject2,CompanyLocalTab_templateObject3,_PropTypes$shape,govuk_react_paragraph_esm=__webpack_require__("./node_modules/@govuk-react/paragraph/dist/govuk-react-paragraph.esm.js"),govuk_react_warning_text_esm=__webpack_require__("./node_modules/@govuk-react/warning-text/dist/govuk-react-warning-text.esm.js");function CompanyLocalTab_typeof(o){return CompanyLocalTab_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyLocalTab_typeof(o)}function CompanyLocalTab_defineProperty(obj,key,value){return(key=function CompanyLocalTab_toPropertyKey(arg){var key=function CompanyLocalTab_toPrimitive(input,hint){if("object"!==CompanyLocalTab_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==CompanyLocalTab_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===CompanyLocalTab_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function CompanyLocalTab_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledListItem=styled_components_browser_esm.ZP.li(CompanyLocalTab_templateObject||(CompanyLocalTab_templateObject=CompanyLocalTab_taggedTemplateLiteral(["\n *,\n *:before,\n *:after {\n box-sizing: border-box;\n }\n border-left-width: 1px;\n text-align: center;\n border-bottom: 1px solid ",";\n\n @media (min-width: 1020px) {\n white-space: nowrap;\n }\n @media (max-width: 839px) {\n text-align: left;\n margin-left: 25px;\n line-height: 2.5em;\n border-bottom: none;\n &::before {\n content: '—';\n margin-left: -25px;\n padding-right: 5px;\n }\n a {\n width: calc(100% - 5px);\n }\n }\n"])),colours.FU),StyledAnchorTag=styled_components_browser_esm.ZP.a(CompanyLocalTab_templateObject2||(CompanyLocalTab_templateObject2=CompanyLocalTab_taggedTemplateLiteral(["\n display: inline-block;\n\n @media (min-width: 840px) {\n padding: 10px 11px;\n margin: 0 5px 0 0;\n &:link,\n &:visited,\n &:hover,\n &:active {\n color: ",";\n }\n background-color: ",";\n text-align: center;\n text-decoration: none;\n height: 90%;\n\n ","\n }\n"])),colours.E5,colours.zT,(function(props){return props.selected&&(0,styled_components_browser_esm.iv)(CompanyLocalTab_templateObject3||(CompanyLocalTab_templateObject3=CompanyLocalTab_taggedTemplateLiteral(["\n margin: -5px 5px -1px 0px;\n padding-top: 14px;\n padding-right: 19px;\n padding-bottom: 16px;\n padding-left: 19px;\n border: 1px solid ",";\n border-bottom: 0px;\n color: ",";\n background-color: ",";\n height: auto;\n "])),colours.FU,colours.E5,colours.Cj)})),CompanyLocalTab=function CompanyLocalTab(props){var navItem=props.navItem,index=props.index;return(0,jsx_runtime.jsx)(StyledListItem,{children:(0,jsx_runtime.jsx)(StyledAnchorTag,{selected:navItem.isActive,href:"".concat(navItem.url).concat(navItem.search?navItem.search:""),id:"tab-".concat(navItem.path),"aria-label":navItem.ariaDescription,children:navItem.label},"tab-link-".concat(navItem.path))},"tab-".concat(index))};CompanyLocalTab.displayName="CompanyLocalTab",CompanyLocalTab.propTypes={navItem:prop_types_default().shape((_PropTypes$shape={path:prop_types_default().string.isRequired,label:prop_types_default().string.isRequired,permissions:prop_types_default().array,url:prop_types_default().string.isRequired},CompanyLocalTab_defineProperty(_PropTypes$shape,"label",prop_types_default().string.isRequired),CompanyLocalTab_defineProperty(_PropTypes$shape,"isActive",prop_types_default().bool.isRequired),CompanyLocalTab_defineProperty(_PropTypes$shape,"ariaDescription",prop_types_default().string),_PropTypes$shape)).isRequired,index:prop_types_default().number.isRequired},CompanyLocalTab.__docgenInfo={description:"",methods:[],displayName:"CompanyLocalTab",props:{navItem:{description:"",type:{name:"shape",value:{path:{name:"string",required:!0},label:{name:"string",required:!0},permissions:{name:"array",required:!1},url:{name:"string",required:!0},isActive:{name:"bool",required:!0},ariaDescription:{name:"string",required:!1}}},required:!0},index:{description:"",type:{name:"number"},required:!0}}};const CompanyTabbedLocalNavigation_CompanyLocalTab=CompanyLocalTab;function CompanyTabbedLocalNavigation_typeof(o){return CompanyTabbedLocalNavigation_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},CompanyTabbedLocalNavigation_typeof(o)}var CompanyTabbedLocalNavigation_templateObject,CompanyTabbedLocalNavigation_templateObject2,CompanyTabbedLocalNavigation_templateObject3,CompanyTabbedLocalNavigation_templateObject4,CompanyTabbedLocalNavigation_templateObject5,CompanyTabbedLocalNavigation_PropTypes$shape;function CompanyTabbedLocalNavigation_defineProperty(obj,key,value){return(key=function CompanyTabbedLocalNavigation_toPropertyKey(arg){var key=function CompanyTabbedLocalNavigation_toPrimitive(input,hint){if("object"!==CompanyTabbedLocalNavigation_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==CompanyTabbedLocalNavigation_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===CompanyTabbedLocalNavigation_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function CompanyTabbedLocalNavigation_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledGridRow=styled_components_browser_esm.ZP.div(CompanyTabbedLocalNavigation_templateObject||(CompanyTabbedLocalNavigation_templateObject=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin-right: -15px;\n margin-left: -15px;\n"]))),StyledGridColumn=styled_components_browser_esm.ZP.div(CompanyTabbedLocalNavigation_templateObject2||(CompanyTabbedLocalNavigation_templateObject2=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n box-sizing: border-box;\n width: 100%;\n padding: 0 15px;\n @media (min-width: 840px) {\n width: 100%;\n float: left;\n }\n"]))),StyledNav=styled_components_browser_esm.ZP.nav(CompanyTabbedLocalNavigation_templateObject3||(CompanyTabbedLocalNavigation_templateObject3=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin-bottom: 15px;\n color: #0b0c0c;\n margin-top: 5px;\n @media (min-width: 840px) {\n margin-bottom: 30px;\n margin-top: 5px;\n }\n"]))),StyledUnorderedList=styled_components_browser_esm.ZP.ul(CompanyTabbedLocalNavigation_templateObject4||(CompanyTabbedLocalNavigation_templateObject4=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n border-bottom: none;\n @media (max-width: 839px) {\n display: block;\n padding-bottom: 20px;\n border-bottom: 0;\n }\n"]))),CompanyTabbedLocalNavigation_StyledLink=(0,styled_components_browser_esm.ZP)("a")(CompanyTabbedLocalNavigation_templateObject5||(CompanyTabbedLocalNavigation_templateObject5=CompanyTabbedLocalNavigation_taggedTemplateLiteral(["\n margin-bottom: 0;\n"]))),showMatchingPrompt=function showMatchingPrompt(company){return!company.dunsNumber&&!company.pendingDnbInvestigation},CompanyTabbedLocalNavigation=function CompanyTabbedLocalNavigation(_ref){var localNavItems=_ref.localNavItems,company=_ref.company;return(0,jsx_runtime.jsxs)(StyledGridRow,{children:[showMatchingPrompt(company)&&(0,jsx_runtime.jsxs)(StatusMessage.Z,{colour:colours.E5,id:"ga-company-details-matching-prompt",children:[(0,jsx_runtime.jsx)(govuk_react_warning_text_esm.Z,{children:"Business details on this company record have not been verified and could be wrong."}),(0,jsx_runtime.jsxs)(govuk_react_details_esm.Z,{summary:"Why verify?",children:[(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Using verified business details from a trusted third-party supplier means we can keep certain information up to date automatically. This helps reduce duplicate records, provide a shared view of complex companies and make it more likely we can link other data sources together."}),(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Verification can often be done in just 4 clicks."})]}),(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:CompanyTabbedLocalNavigation_StyledLink,href:urls_default().companies.match.index(company.id),children:"Verify business details"})]}),(0,jsx_runtime.jsx)(StyledGridColumn,{children:(0,jsx_runtime.jsx)(StyledNav,{"aria-label":"local navigation","data-test":"tabbedLocalNav",children:(0,jsx_runtime.jsx)(StyledUnorderedList,{"data-test":"tabbedLocalNavList",children:null==localNavItems?void 0:localNavItems.map((function(navItem,index){return(0,jsx_runtime.jsx)(CompanyTabbedLocalNavigation_CompanyLocalTab,{navItem,index},"company-tab-".concat(index))}))})})})]})};CompanyTabbedLocalNavigation.displayName="CompanyTabbedLocalNavigation",CompanyTabbedLocalNavigation.propTypes={localNavItems:prop_types_default().arrayOf(prop_types_default().shape((CompanyTabbedLocalNavigation_PropTypes$shape={path:prop_types_default().string.isRequired,label:prop_types_default().string.isRequired,permissions:prop_types_default().array,url:prop_types_default().string.isRequired},CompanyTabbedLocalNavigation_defineProperty(CompanyTabbedLocalNavigation_PropTypes$shape,"label",prop_types_default().string.isRequired),CompanyTabbedLocalNavigation_defineProperty(CompanyTabbedLocalNavigation_PropTypes$shape,"isActive",prop_types_default().bool.isRequired),CompanyTabbedLocalNavigation_defineProperty(CompanyTabbedLocalNavigation_PropTypes$shape,"ariaDescription",prop_types_default().string),CompanyTabbedLocalNavigation_PropTypes$shape))).isRequired},CompanyTabbedLocalNavigation.__docgenInfo={description:"",methods:[],displayName:"CompanyTabbedLocalNavigation",props:{localNavItems:{description:"",type:{name:"arrayOf",value:{name:"shape",value:{path:{name:"string",required:!0},label:{name:"string",required:!0},permissions:{name:"array",required:!1},url:{name:"string",required:!0},isActive:{name:"bool",required:!0},ariaDescription:{name:"string",required:!1}}}},required:!0}}};__webpack_require__("./src/client/components/ContactInformation/index.jsx");var govuk_react_error_summary_esm=__webpack_require__("./node_modules/@govuk-react/error-summary/dist/govuk-react-error-summary.esm.js"),govuk_react_inset_text_esm=__webpack_require__("./node_modules/@govuk-react/inset-text/dist/govuk-react-inset-text.esm.js"),govuk_react_list_item_esm=__webpack_require__("./node_modules/@govuk-react/list-item/dist/govuk-react-list-item.esm.js"),govuk_react_unordered_list_esm=__webpack_require__("./node_modules/@govuk-react/unordered-list/dist/govuk-react-unordered-list.esm.js"),DeleteCompanyListSection=function DeleteCompanyListSection(_ref){var companyList=_ref.companyList,errorMessage=_ref.errorMessage,onDelete=_ref.onDelete,returnUrl=_ref.returnUrl,companyCountText=pluralize_default()("company",companyList.item_count,!0);return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(LocalHeader.Z,{heading:"Delete list",breadcrumbs:[{link:urls_default().dashboard.index(),text:"Home"},{text:"Delete list"}]}),(0,jsx_runtime.jsxs)(Main.Z,{children:[errorMessage&&(0,jsx_runtime.jsx)(govuk_react_error_summary_esm.Z,{heading:"There was an error deleting this list",description:errorMessage,errors:[]}),(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Deleting this list will remove all companies from this list. These companies will remain on any other lists."}),(0,jsx_runtime.jsx)(govuk_react_inset_text_esm.Z,{children:(0,jsx_runtime.jsxs)(govuk_react_unordered_list_esm.Z,{listStyleType:"none",mb:0,children:[(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{"data-test":"list-name",children:(0,jsx_runtime.jsx)("strong",{children:companyList.name})}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{"data-test":"company-count",children:companyCountText})]})}),(0,jsx_runtime.jsxs)(FormActions.Z,{children:[(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{buttonColour:colours.hM,onClick:onDelete,children:"Delete list"}),(0,jsx_runtime.jsx)(govuk_react_link_esm.Z,{href:returnUrl,"data-test":"return-link",children:"Return without deleting"})]})]})]})};DeleteCompanyListSection.propTypes={companyList:prop_types_default().object.isRequired,errorMessage:prop_types_default().string,onDelete:prop_types_default().func.isRequired,returnUrl:prop_types_default().string.isRequired},DeleteCompanyListSection.defaultProps={errorMessage:null},DeleteCompanyListSection.__docgenInfo={description:"",methods:[],displayName:"DeleteCompanyListSection",props:{errorMessage:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},companyList:{description:"",type:{name:"object"},required:!0},onDelete:{description:"",type:{name:"func"},required:!0},returnUrl:{description:"",type:{name:"string"},required:!0}}};var DateField=__webpack_require__("./src/client/components/DateField/index.jsx"),EntityList=__webpack_require__("./src/client/components/EntityList/index.jsx"),Main=__webpack_require__("./src/client/components/Main/index.jsx"),NewWindowLink=(__webpack_require__("./src/client/components/Metadata/index.jsx"),__webpack_require__("./src/client/components/NewWindowLink/index.jsx")),components_Pagination=(__webpack_require__("./src/client/components/NotificationBadge/index.jsx"),__webpack_require__("./src/client/components/Pagination/index.jsx")),SummaryTable=(__webpack_require__("./src/client/components/Panel/index.jsx"),__webpack_require__("./src/client/components/SummaryList/index.jsx"),__webpack_require__("./src/client/components/SummaryTable/index.jsx")),FieldTypeahead=__webpack_require__("./src/client/components/Form/elements/FieldTypeahead/index.jsx"),formatAdviser=__webpack_require__("./src/common/formatAdviser.js"),utils=__webpack_require__("./src/client/components/Task/utils.js");function FieldAdvisersTypeahead_typeof(o){return FieldAdvisersTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FieldAdvisersTypeahead_typeof(o)}var FieldAdvisersTypeahead_excluded=["name","label","required","isMulti","onlyShowActiveAdvisers","placeholder"];function FieldAdvisersTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FieldAdvisersTypeahead_defineProperty(obj,key,value){return(key=function FieldAdvisersTypeahead_toPropertyKey(arg){var key=function FieldAdvisersTypeahead_toPrimitive(input,hint){if("object"!==FieldAdvisersTypeahead_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==FieldAdvisersTypeahead_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===FieldAdvisersTypeahead_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function FieldAdvisersTypeahead_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function FieldAdvisersTypeahead_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FieldAdvisersTypeahead=function FieldAdvisersTypeahead(_ref){var name=_ref.name,label=_ref.label,required=_ref.required,isMulti=_ref.isMulti,_ref$onlyShowActiveAd=_ref.onlyShowActiveAdvisers,onlyShowActiveAdvisers=void 0===_ref$onlyShowActiveAd||_ref$onlyShowActiveAd,_ref$placeholder=_ref.placeholder,placeholder=void 0===_ref$placeholder?"Type to search for advisers":_ref$placeholder,props=FieldAdvisersTypeahead_objectWithoutProperties(_ref,FieldAdvisersTypeahead_excluded);return(0,jsx_runtime.jsx)(FieldTypeahead.Z,function FieldAdvisersTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledTextareaWrapper=(0,styled_components_browser_esm.ZP)("div")(FieldTextarea_templateObject||(FieldTextarea_templateObject=function FieldTextarea_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ","\n textarea {\n width: 100%;\n }\n"])),(function(props){return props.error&&"\n border-left: ".concat(govuk_react_constants_esm.Ok," solid ").concat(colours.h,";\n margin-right: ").concat(govuk_react_constants_esm.N_.SCALE_3,";\n padding-left: ").concat(govuk_react_constants_esm.N_.SCALE_2,";\n ")})),FieldTextarea=function FieldTextarea(_ref){var name=_ref.name,validate=_ref.validate,required=_ref.required,label=_ref.label,legend=_ref.legend,hint=_ref.hint,initialValue=_ref.initialValue,rest=FieldTextarea_objectWithoutProperties(_ref,FieldTextarea_excluded),_useField=(0,hooks.U$)({name,validate,required,initialValue}),value=_useField.value,error=_useField.error,touched=_useField.touched,onChange=_useField.onChange,onBlur=_useField.onBlur;return(0,jsx_runtime.jsx)(FieldWrapper.Z,{name,label,legend,hint,error,children:(0,jsx_runtime.jsxs)(StyledTextareaWrapper,{error,children:[touched&&error&&(0,jsx_runtime.jsx)(govuk_react_error_text_esm.Z,{children:error}),(0,jsx_runtime.jsx)(govuk_react_text_area_esm.N7,FieldTextarea_objectSpread({id:name,error:touched&&error,name,value,onChange,onBlur,rows:"5"},rest),name)]})})};FieldTextarea.displayName="FieldTextarea",FieldTextarea.propTypes={name:prop_types_default().string.isRequired,validate:prop_types_default().oneOfType([prop_types_default().func,prop_types_default().arrayOf(prop_types_default().func)]),required:prop_types_default().string,label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,initialValue:prop_types_default().string},FieldTextarea.defaultProps={validate:null,required:null,label:null,legend:null,hint:null,initialValue:""},FieldTextarea.__docgenInfo={description:"",methods:[],displayName:"FieldTextarea",props:{validate:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"union",value:[{name:"func"},{name:"arrayOf",value:{name:"func"}}]},required:!1},required:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},initialValue:{defaultValue:{value:"''",computed:!1},description:"",type:{name:"string"},required:!1},name:{description:"",type:{name:"string"},required:!0}}};const elements_FieldTextarea=FieldTextarea;var FieldUneditable=function FieldUneditable(_ref){var name=_ref.name,label=_ref.label,legend=_ref.legend,hint=_ref.hint,onChangeClick=_ref.onChangeClick,children=_ref.children;return(0,jsx_runtime.jsxs)(FieldWrapper.Z,{name,label,legend,hint,children:[children," ",onChangeClick&&(0,jsx_runtime.jsxs)(ButtonLink.Z,{inline:!0,type:"button",onClick:onChangeClick,children:["Change ",(0,jsx_runtime.jsx)(govuk_react_visually_hidden_esm.Z,{children:label||legend})]})]})};FieldUneditable.displayName="FieldUneditable",FieldUneditable.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,onChangeClick:prop_types_default().func,children:prop_types_default().node.isRequired},FieldUneditable.defaultProps={label:null,legend:null,hint:null,onChangeClick:null},FieldUneditable.__docgenInfo={description:"",methods:[],displayName:"FieldUneditable",props:{label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},onChangeClick:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},name:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"node"},required:!0}}};const elements_FieldUneditable=FieldUneditable;var govuk_react_icons_esm=__webpack_require__("./node_modules/@govuk-react/icons/dist/govuk-react-icons.esm.js"),govuk_react_form_group_esm=__webpack_require__("./node_modules/@govuk-react/form-group/dist/govuk-react-form-group.esm.js");function useAddressSearch_typeof(o){return useAddressSearch_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},useAddressSearch_typeof(o)}function useAddressSearch_regeneratorRuntime(){useAddressSearch_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==useAddressSearch_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function useAddressSearch_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function useAddressSearch_slicedToArray(arr,i){return function useAddressSearch_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function useAddressSearch_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function useAddressSearch_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return useAddressSearch_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useAddressSearch_arrayLikeToArray(o,minLen)}(arr,i)||function useAddressSearch_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function useAddressSearch_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function usePostcodeLookup_toConsumableArray(arr){return function usePostcodeLookup_arrayWithoutHoles(arr){if(Array.isArray(arr))return usePostcodeLookup_arrayLikeToArray(arr)}(arr)||function usePostcodeLookup_iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function usePostcodeLookup_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return usePostcodeLookup_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return usePostcodeLookup_arrayLikeToArray(o,minLen)}(arr)||function usePostcodeLookup_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function usePostcodeLookup_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&(0,jsx_runtime.jsx)(govuk_react_form_group_esm.Z,{children:(0,jsx_runtime.jsx)(govuk_react_select_esm.ZP,{label:"Select an address",onChange:function onAddressSelect(evt){var index=evt.target.selectedIndex;if(0!==index){var address=addressList[index];setFieldValue("postcode",address.postcode),setFieldValue("address1",address.address1),setFieldValue("address2",address.address2),setFieldValue("city",address.city),setFieldValue("county",address.county),setFieldValue("country",isCountrySelectable?address.country:country.id),setFieldValue("country",country.id),onSelectUKAddress&&onSelectUKAddress(address)}},children:addressList.map((function(_ref2,index){var address1=_ref2.address1;return(0,jsx_runtime.jsx)("option",{value:index,children:address1},index)}))})})]}),(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"address1",label:"Address line 1",required:"Enter an address",initialValue:null==initialValue?void 0:initialValue.address1}),(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"address2",label:"Address line 2 (optional)",initialValue:null==initialValue?void 0:initialValue.address2}),(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"city",label:"Town or city",required:"Enter a town or city",initialValue:null==initialValue?void 0:initialValue.town}),(!(isUS||isCanada||hideCountyField)||useStaticCountyField)&&(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"county",label:"County (optional)",initialValue:null==initialValue?void 0:initialValue.county}),(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[function renderUsStateField(useStaticCountyField){if(isUS&&(null==usStates?void 0:usStates.length)>0&&!useStaticCountyField)return(0,jsx_runtime.jsx)(FieldSelect.Z,{type:"text",name:"area",label:"State",options:usStates,required:"Select a state",emptyOption:"Select"})}(useStaticCountyField),function renderCanadaProvinceField(useStaticCountyField){if(isCanada&&(null==canadaProvinces?void 0:canadaProvinces.length)>0&&!useStaticCountyField)return(0,jsx_runtime.jsx)(FieldSelect.Z,{type:"text",name:"areaCanada",label:"Province",options:canadaProvinces,required:"Select a province",emptyOption:"Select"})}(useStaticCountyField),administrativeAreaSearchError&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"Error occurred while retrieving Administrative Areas."})]}),useStaticPostcodeField&&(0,jsx_runtime.jsx)(FieldInput.Z,{type:"text",name:"postcode",label:postcodeLabel(isPostcodeRequired),required:postcodeErrorMessage(isPostcodeRequired),maxLength:10,validate:postcodeValidator,initialValue:null==initialValue?void 0:initialValue.postcode}),!isUK&&country_form_value!==common_constants.UNITED_KINGDOM_ID&&!useStaticPostcodeField&&(0,jsx_runtime.jsx)(StyledFieldPostcode,{type:"text",name:"postcode",label:postcodeLabel(isPostcodeRequired),required:postcodeErrorMessage(isPostcodeRequired),maxLength:null,validate:postcodeValidator})]})]})};FieldAddress.displayName="FieldAddress",FieldAddress.propTypes={label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,name:prop_types_default().string.isRequired,apiEndpoint:prop_types_default().string,onSelectUKAddress:prop_types_default().func,isCountrySelectable:prop_types_default().any,country:prop_types_default().shape({id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired})},FieldAddress.__docgenInfo={description:"",methods:[],displayName:"FieldAddress",props:{hideCountyField:{defaultValue:{value:"false",computed:!1},required:!1},initialValue:{defaultValue:{value:"null",computed:!1},required:!1},useStaticPostcodeField:{defaultValue:{value:"false",computed:!1},required:!1},isPostcodeRequired:{defaultValue:{value:"false",computed:!1},required:!1},showBorder:{defaultValue:{value:"true",computed:!1},required:!1},useStaticCountyField:{defaultValue:{value:"false",computed:!1},required:!1},label:{description:"",type:{name:"node"},required:!1},legend:{description:"",type:{name:"node"},required:!1},hint:{description:"",type:{name:"node"},required:!1},name:{description:"",type:{name:"string"},required:!0},apiEndpoint:{description:"",type:{name:"string"},required:!1},onSelectUKAddress:{description:"",type:{name:"func"},required:!1},isCountrySelectable:{description:"",type:{name:"any"},required:!1},country:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0},name:{name:"string",required:!0}}},required:!1}}};const elements_FieldAddress=FieldAddress;var FieldRadios=__webpack_require__("./src/client/components/Form/elements/FieldRadios/index.jsx"),EntityListItem=__webpack_require__("./src/client/components/EntityList/EntityListItem.jsx");function FieldCompany_typeof(o){return FieldCompany_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FieldCompany_typeof(o)}function FieldCompany_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FieldCompany_defineProperty(obj,key,value){return(key=function FieldCompany_toPropertyKey(arg){var key=function FieldCompany_toPrimitive(input,hint){if("object"!==FieldCompany_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==FieldCompany_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===FieldCompany_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var validateMinLength=function validateMinLength(minLength){return function(value){return value&&value.lengthmaxLength?"".concat(pluralize_default()("character",value.length-maxLength,!0)," too long"):null}},CompanyItemRenderer=function CompanyItemRenderer(item){var _useFormContext=(0,hooks.Gc)(),setFieldValue=_useFormContext.setFieldValue,goForward=_useFormContext.goForward;return(0,jsx_runtime.jsx)(EntityListItem.Z,function FieldCompany_objectSpread(e){for(var r=1;r0&&(0,jsx_runtime.jsx)(govuk_react_loading_box_esm.Z,{loading:progress,children:(0,jsx_runtime.jsx)(EntityList.Z,{entities:results,entityRenderer:CompanyItemRenderer})})]}),0===results.length&&!progress&&(0,jsx_runtime.jsxs)(StyledParagraph,{children:["If you can't find the company you're looking for,"," ",(0,jsx_runtime.jsxs)(govuk_react_link_esm.Z,{href:urls_default().companies.create(),"aria-label":"Add a new company",children:["add a new company."," "]}),"Unfortunately you will lose your progress."]})]})]})};FieldCompany.displayName="FieldCompany",FieldCompany.__docgenInfo={description:"",methods:[],displayName:"FieldCompany"};function useEntitySearch_typeof(o){return useEntitySearch_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},useEntitySearch_typeof(o)}function useEntitySearch_regeneratorRuntime(){useEntitySearch_regeneratorRuntime=function _regeneratorRuntime(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==useEntitySearch_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function useEntitySearch_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function useEntitySearch_slicedToArray(arr,i){return function useEntitySearch_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function useEntitySearch_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function useEntitySearch_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return useEntitySearch_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return useEntitySearch_arrayLikeToArray(o,minLen)}(arr,i)||function useEntitySearch_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function useEntitySearch_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==_args[0]?_args[0]:{},_context.prev=1,setSearching(!0),setError(null),_context.next=6,searchEntitiesCallback(filters);case 6:newEntities=_context.sent,setEntities(newEntities),_context.next=14;break;case 10:_context.prev=10,_context.t0=_context.catch(1),setEntities([]),setError("Error occurred while searching entities.");case 14:return _context.prev=14,setSearching(!1),setSearched(!0),_context.finish(14);case 18:case"end":return _context.stop()}}),_callee,null,[[1,10,14,18]])}))),_onEntitySearch.apply(this,arguments)}return{onEntitySearch:function onEntitySearch(){return _onEntitySearch.apply(this,arguments)},entities,error,searching,searched}};var useDnbSearch=__webpack_require__("./src/client/components/EntityList/useDnbSearch.jsx"),FormLayout=function FormLayout(_ref){var setWidth=_ref.setWidth,children=_ref.children;return(0,jsx_runtime.jsx)(govuk_react_grid_row_esm.Z,{children:(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWidth,children})})};FormLayout.displayName="FormLayout",FormLayout.propTypes={setWidth:prop_types_default().string.isRequired,children:prop_types_default().element.isRequired},FormLayout.__docgenInfo={description:"",methods:[],displayName:"FormLayout",props:{setWidth:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"element"},required:!0}}};const Layout_FormLayout=FormLayout;function FieldDnbCompany_typeof(o){return FieldDnbCompany_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FieldDnbCompany_typeof(o)}var FieldDnbCompany_templateObject;function FieldDnbCompany_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FieldDnbCompany_objectSpread(e){for(var r=1;rmaxLength?"".concat(pluralize_default()("character",value.length-maxLength,!0)," too long"):null}},FieldDnbCompany=function FieldDnbCompany(_ref){var name=_ref.name,label=_ref.label,legend=_ref.legend,hint=_ref.hint,country=_ref.country,apiEndpoint=_ref.apiEndpoint,queryParams=_ref.queryParams,entityRenderer=_ref.entityRenderer,onCannotFind=_ref.onCannotFind,searchResultsMessage=_ref.searchResultsMessage,features=_ref.features,_useFormContext=(0,hooks.Gc)(),values=_useFormContext.values,goBack=_useFormContext.goBack,validateForm=_useFormContext.validateForm,setIsLoading=_useFormContext.setIsLoading,findCompany=(0,useDnbSearch.Z)(apiEndpoint,features).findCompany,_useEntitySearch=EntityList_useEntitySearch(findCompany),onEntitySearch=_useEntitySearch.onEntitySearch,searching=_useEntitySearch.searching,searched=_useEntitySearch.searched,error=_useEntitySearch.error,entities=_useEntitySearch.entities;return(0,react.useEffect)((function(){return setIsLoading(searching)}),[searching]),(0,jsx_runtime.jsx)(Layout_FormLayout,{setWidth:common_constants.FORM_LAYOUT.THREE_QUARTERS,children:(0,jsx_runtime.jsxs)(FieldWrapper.Z,{name,label,legend,hint,children:[country&&(0,jsx_runtime.jsx)(elements_FieldUneditable,{legend:"Country",name:"dnbCountry",onChangeClick:goBack,children:country}),(0,jsx_runtime.jsx)(FieldInput.Z,{label:"Company name",name:"dnbCompanyName",type:"search",required:"Enter company name",validate:[FieldDnbCompany_validateMinLength(2),FieldDnbCompany_validateMaxLength(60)]}),(0,jsx_runtime.jsx)(FieldInput.Z,{label:"Company postcode (optional)",name:"dnbPostalCode",style:{width:govuk_react_constants_esm.n["one-third"]},type:"search"}),(0,jsx_runtime.jsx)(FormActions.Z,{children:(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{icon:(0,jsx_runtime.jsx)(govuk_react_icons_esm.HN,{}),onClick:function onSearchClick(e){return e.preventDefault(),(0,lodash.isEmpty)(validateForm())?onEntitySearch((0,lodash.omitBy)(FieldDnbCompany_objectSpread(FieldDnbCompany_objectSpread({},queryParams),{},{search_term:values.dnbCompanyName,postal_code:values.dnbPostalCode}),lodash.isEmpty)):null},children:"Find company"})}),searched&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[entities.length>0&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[searchResultsMessage&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:searchResultsMessage}),(0,jsx_runtime.jsx)(EntityList.Z,{entities,entityRenderer})]}),!error&&0===entities.length&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"No match found. Try one of the options below."}),error&&(0,jsx_runtime.jsx)(StatusMessage.Z,{children:"Error occurred while searching for company."}),(0,jsx_runtime.jsxs)(govuk_react_details_esm.Z,{summary:"I can't find what I'm looking for",children:[(0,jsx_runtime.jsx)(govuk_react_paragraph_esm.Z,{children:"Try:"}),(0,jsx_runtime.jsxs)(FieldDnbCompany_StyledUnorderedList,{children:[(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"checking or removing the postcode"}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:'removing "limited" or "ltd"'}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"checking for spelling errors"}),country&&(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"checking if the right country was selected"}),(0,jsx_runtime.jsx)(govuk_react_list_item_esm.Z,{children:"check you're using the company's registered name"})]}),onCannotFind&&(0,jsx_runtime.jsx)(ButtonLink.Z,{onClick:onCannotFind,children:"I still can't find what I'm looking for"})]})]})]})})};FieldDnbCompany.displayName="FieldDnbCompany",FieldDnbCompany.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().node,legend:prop_types_default().node,hint:prop_types_default().node,country:prop_types_default().string,apiEndpoint:prop_types_default().string.isRequired,queryParams:prop_types_default().shape({}),entityRenderer:prop_types_default().func,onCannotFind:prop_types_default().func,searchResultsMessage:prop_types_default().string},FieldDnbCompany.defaultProps={label:null,legend:null,hint:null,country:null,queryParams:{},entityRenderer:void 0,onCannotFind:null,searchResultsMessage:"The search results below are verified company records from an external and verified source of company information."},FieldDnbCompany.__docgenInfo={description:"",methods:[],displayName:"FieldDnbCompany",props:{label:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},legend:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},hint:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"node"},required:!1},country:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},queryParams:{defaultValue:{value:"{}",computed:!1},description:"",type:{name:"shape",value:{}},required:!1},entityRenderer:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"func"},required:!1},onCannotFind:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},searchResultsMessage:{defaultValue:{value:"'The search results below are verified company records from an external and verified source of company information.'",computed:!1},description:"",type:{name:"string"},required:!1},name:{description:"",type:{name:"string"},required:!0},apiEndpoint:{description:"",type:{name:"string"},required:!0}}};__webpack_require__("./src/client/components/Form/elements/FieldHelp/index.jsx"),__webpack_require__("./src/client/components/Form/elements/Step.jsx");var ReadMore=__webpack_require__("./src/client/components/ReadMore/index.jsx"),components_Typeahead=__webpack_require__("./src/client/components/Typeahead/index.jsx");function RoutedTypeahead_typeof(o){return RoutedTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedTypeahead_typeof(o)}var RoutedTypeahead_templateObject,RoutedTypeahead_excluded=["name","qsParam","label","hint","isMulti","placeholder","closeMenuOnSelect","selectedOptions","loadOptions","noOptionsMessage","options","labelAsQueryParam"];function RoutedTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function RoutedTypeahead_defineProperty(obj,key,value){return(key=function RoutedTypeahead_toPropertyKey(arg){var key=function RoutedTypeahead_toPrimitive(input,hint){if("object"!==RoutedTypeahead_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==RoutedTypeahead_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===RoutedTypeahead_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var StyledFieldWrapper=(0,styled_components_browser_esm.ZP)(FieldWrapper.Z)(RoutedTypeahead_templateObject||(RoutedTypeahead_templateObject=function RoutedTypeahead_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n label {\n font-weight: ",";\n line-height: ",";\n }\n"])),govuk_react_constants_esm.Xw.bold,govuk_react_constants_esm.Ac.SIZE_16),getParamIds=function getParamIds(qsParam,pickedOptions){return RoutedTypeahead_defineProperty({},qsParam,pickedOptions?pickedOptions.map((function(_ref){return _ref.value})):[])},getParamLabels=function getParamLabels(qsParam,pickedOptions){return RoutedTypeahead_defineProperty({},qsParam,pickedOptions?pickedOptions.map((function(_ref3){return _ref3.label})):[])},RoutedTypeahead=function RoutedTypeahead(_ref5){var name=_ref5.name,qsParam=_ref5.qsParam,label=_ref5.label,hint=_ref5.hint,isMulti=_ref5.isMulti,placeholder=_ref5.placeholder,closeMenuOnSelect=_ref5.closeMenuOnSelect,selectedOptions=_ref5.selectedOptions,loadOptions=_ref5.loadOptions,noOptionsMessage=_ref5.noOptionsMessage,options=_ref5.options,labelAsQueryParam=_ref5.labelAsQueryParam,props=RoutedTypeahead_objectWithoutProperties(_ref5,RoutedTypeahead_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref6){var history=_ref6.history,location=_ref6.location,qsParams=lib_default().parse(location.search.slice(1));return(0,jsx_runtime.jsx)(StyledFieldWrapper,RoutedTypeahead_objectSpread(RoutedTypeahead_objectSpread({label,name,hint},props),{},{children:(0,jsx_runtime.jsx)(components_Typeahead.Z,{name,"aria-label":label||name,placeholder,initialOptions:options,closeMenuOnSelect,isMulti,value:selectedOptions.map((function(_ref7){return{value:_ref7.value,label:_ref7.label}})),loadOptions,noOptionsMessage,onChange:function onChange(pickedOptions){history.push({search:lib_default().stringify(RoutedTypeahead_objectSpread(RoutedTypeahead_objectSpread(RoutedTypeahead_objectSpread({},qsParams),labelAsQueryParam?getParamLabels(qsParam,pickedOptions):getParamIds(qsParam,pickedOptions)),{},{page:1}))})}})}))}})};RoutedTypeahead.displayName="RoutedTypeahead",RoutedTypeahead.propTypes={name:prop_types_default().string.isRequired,qsParam:prop_types_default().string.isRequired,labelAsQueryParam:prop_types_default().bool},RoutedTypeahead.defaultProps={labelAsQueryParam:!1},RoutedTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedTypeahead",props:{labelAsQueryParam:{defaultValue:{value:"false",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},qsParam:{description:"",type:{name:"string"},required:!0}}};const components_RoutedTypeahead=RoutedTypeahead;function RoutedAdvisersTypeahead_typeof(o){return RoutedAdvisersTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedAdvisersTypeahead_typeof(o)}var RoutedAdvisersTypeahead_excluded=["taskProps","closeMenuOnSelect","onlyShowActiveAdvisers","loadOptions"];function RoutedAdvisersTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedAdvisersTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedAdvisersTypeahead=function RoutedAdvisersTypeahead(_ref2){var taskProps=_ref2.taskProps,closeMenuOnSelect=_ref2.closeMenuOnSelect,_ref2$onlyShowActiveA=_ref2.onlyShowActiveAdvisers,onlyShowActiveAdvisers=void 0===_ref2$onlyShowActiveA||_ref2$onlyShowActiveA,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?function fetchAdvisers(onlyShowActiveAdvisers){return(0,lodash.throttle)((function(searchString){return searchString.length?utils.Q8.get("/adviser/",{params:{autocomplete:searchString,is_active:!!onlyShowActiveAdvisers||null}}).then((function(_ref){var results=_ref.data.results;return(0,formatAdviser.parseAdviserData)(results)})):Promise.resolve([])}),500)}(onlyShowActiveAdvisers):_ref2$loadOptions,props=RoutedAdvisersTypeahead_objectWithoutProperties(_ref2,RoutedAdvisersTypeahead_excluded);return(0,jsx_runtime.jsx)(Task.Z.Status,RoutedAdvisersTypeahead_objectSpread(RoutedAdvisersTypeahead_objectSpread({},taskProps),{},{progressOverlay:!0,children:function children(){return(0,jsx_runtime.jsx)(components_RoutedTypeahead,RoutedAdvisersTypeahead_objectSpread({loadOptions,closeMenuOnSelect},props))}}))};RoutedAdvisersTypeahead.displayName="RoutedAdvisersTypeahead",RoutedAdvisersTypeahead.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().string,taskProps:prop_types_default().shape({name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired}).isRequired,closeMenuOnSelect:prop_types_default().bool},RoutedAdvisersTypeahead.defaultProps={closeMenuOnSelect:!0},RoutedAdvisersTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedAdvisersTypeahead",props:{onlyShowActiveAdvisers:{defaultValue:{value:"true",computed:!1},required:!1},loadOptions:{defaultValue:{value:"fetchAdvisers(onlyShowActiveAdvisers)",computed:!0},required:!1},closeMenuOnSelect:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},label:{description:"",type:{name:"string"},required:!1},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!0},id:{name:"string",required:!0}}},required:!0}}};const components_RoutedAdvisersTypeahead=RoutedAdvisersTypeahead;__webpack_require__("./node_modules/core-js/modules/es.string.trim.js");var client_transformers=__webpack_require__("./src/client/transformers/index.js");function RoutedCompanyTypeahead_typeof(o){return RoutedCompanyTypeahead_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedCompanyTypeahead_typeof(o)}var RoutedCompanyTypeahead_excluded=["taskProps","loadOptions","closeMenuOnSelect"];function RoutedCompanyTypeahead_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedCompanyTypeahead_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var fetchCompanies=function fetchCompanies(){return(0,lodash.throttle)((function(searchString){return searchString.length?utils.Q8.get("/v4/company",{params:{autocomplete:searchString}}).then((function(_ref){return function parseCompanyData(companies){return companies.filter((function(company){return company.name&&company.name.trim().length})).map(client_transformers.TZ)}(_ref.data.results)})):Promise.resolve([])}),500)},RoutedCompanyTypeahead=function RoutedCompanyTypeahead(_ref2){var taskProps=_ref2.taskProps,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?fetchCompanies():_ref2$loadOptions,closeMenuOnSelect=_ref2.closeMenuOnSelect,props=RoutedCompanyTypeahead_objectWithoutProperties(_ref2,RoutedCompanyTypeahead_excluded);return(0,jsx_runtime.jsx)(Task.Z.Status,RoutedCompanyTypeahead_objectSpread(RoutedCompanyTypeahead_objectSpread({},taskProps),{},{progressOverlay:!0,children:function children(){return(0,jsx_runtime.jsx)(components_RoutedTypeahead,RoutedCompanyTypeahead_objectSpread({loadOptions,closeMenuOnSelect},props))}}))};RoutedCompanyTypeahead.displayName="RoutedCompanyTypeahead",RoutedCompanyTypeahead.propTypes={name:prop_types_default().string.isRequired,label:prop_types_default().string,taskProps:prop_types_default().shape({name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired}).isRequired,closeMenuOnSelect:prop_types_default().bool},RoutedCompanyTypeahead.defaultProps={closeMenuOnSelect:!0},RoutedCompanyTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedCompanyTypeahead",props:{loadOptions:{defaultValue:{value:"fetchCompanies()",computed:!0},required:!1},closeMenuOnSelect:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},label:{description:"",type:{name:"string"},required:!1},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!0},id:{name:"string",required:!0}}},required:!0}}};const components_RoutedCompanyTypeahead=RoutedCompanyTypeahead;var ToggleSection=__webpack_require__("./src/client/components/ToggleSection/index.jsx"),DownloadDataHeader=(__webpack_require__("./src/client/components/Pagination/RoutedPagination.jsx"),__webpack_require__("./node_modules/core-js/modules/es.object.from-entries.js"),__webpack_require__("./src/client/components/DownloadDataHeader/index.jsx"));function RoutedDownloadDataHeader_typeof(o){return RoutedDownloadDataHeader_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedDownloadDataHeader_typeof(o)}var RoutedDownloadDataHeader_excluded=["page"],RoutedDownloadDataHeader_excluded2=["baseDownloadLink"];function RoutedDownloadDataHeader_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedDownloadDataHeader_defineProperty(obj,key,value){return(key=function RoutedDownloadDataHeader_toPropertyKey(arg){var key=function RoutedDownloadDataHeader_toPrimitive(input,hint){if("object"!==RoutedDownloadDataHeader_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==RoutedDownloadDataHeader_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===RoutedDownloadDataHeader_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function RoutedDownloadDataHeader_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function RoutedDownloadDataHeader_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var isBool=function isBool(value){return["true","false"].includes(value)},getDownloadLinkFromLocation=function getDownloadLinkFromLocation(location,baseDownloadLink){var _qs$parse=lib_default().parse(location.search.slice(1)),queryString=(_qs$parse.page,function getQueryStringFromQueryParams(params){var transformedParams={};for(var param in params){var field=params[param];(0,lodash.isArray)(field)&&field.every(isBool)?1===field.length&&(transformedParams[param]="true"===field[0]):transformedParams[param]=params[param]}return lib_default().stringify(transformedParams)}(RoutedDownloadDataHeader_objectWithoutProperties(_qs$parse,RoutedDownloadDataHeader_excluded)));return queryString?"".concat(baseDownloadLink,"?").concat(queryString):baseDownloadLink},RoutedDownloadDataHeader=function RoutedDownloadDataHeader(_ref){var baseDownloadLink=_ref.baseDownloadLink,props=RoutedDownloadDataHeader_objectWithoutProperties(_ref,RoutedDownloadDataHeader_excluded2);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var location=_ref2.location,downloadLink=getDownloadLinkFromLocation(location,baseDownloadLink);return(0,jsx_runtime.jsx)(DownloadDataHeader.Z,function RoutedDownloadDataHeader_objectSpread(e){for(var r=1;r div {\n border: none;\n }\n border-bottom: "," solid ",";\n"])),govuk_react_constants_esm.N_.SCALE_1,colours.E5),StyledDiv=(0,styled_components_browser_esm.ZP)("div")(FilteredCollectionHeader_templateObject6||(FilteredCollectionHeader_templateObject6=FilteredCollectionHeader_taggedTemplateLiteral(["\n display: flex;\n flex: 50%;\n align-items: center;\n flex-flow: nowrap;\n\n h2 {\n flex-grow: 2;\n }\n\n button {\n text-align: right;\n width: auto;\n margin: 0;\n }\n"]))),StyledSummary=(0,styled_components_browser_esm.ZP)("div")(FilteredCollectionHeader_templateObject7||(FilteredCollectionHeader_templateObject7=FilteredCollectionHeader_taggedTemplateLiteral(["\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),StyledSummaryTotal=(0,styled_components_browser_esm.ZP)("span")(FilteredCollectionHeader_templateObject8||(FilteredCollectionHeader_templateObject8=FilteredCollectionHeader_taggedTemplateLiteral(["\n font-weight: ",";\n"])),govuk_react_constants_esm.Xw.bold),RoutedFilterChipsCollection=function RoutedFilterChipsCollection(_ref){var selectedFilters=_ref.selectedFilters;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:Object.keys(selectedFilters).map((function(key){return(0,jsx_runtime.jsx)(components_RoutedFilterChips,{selectedOptions:selectedFilters[key].options,qsParamName:selectedFilters[key].queryParam},key)}))})};function FilteredCollectionHeader(_ref2){var totalItems=_ref2.totalItems,summary=_ref2.summary,_ref2$collectionName=_ref2.collectionName,collectionName=void 0===_ref2$collectionName?"result":_ref2$collectionName,_ref2$addItemUrl=_ref2.addItemUrl,addItemUrl=void 0===_ref2$addItemUrl?null:_ref2$addItemUrl,selectedFilters=_ref2.selectedFilters,hasFilters=_ref2.hasFilters,_ref2$useReactRouter=_ref2.useReactRouter,useReactRouter=void 0!==_ref2$useReactRouter&&_ref2$useReactRouter,formattedTotal=(0,number_utils.gH)(totalItems),counterSuffix=pluralize_default()(collectionName,totalItems),actions=addItemUrl&&(useReactRouter?(0,jsx_runtime.jsxs)(govuk_react_button_esm.Z,{id:"add-".concat((0,lodash.kebabCase)(collectionName)),as:StyledReactRouterLink,to:addItemUrl,buttonColour:colours.nx,buttonTextColour:colours.E5,"data-test":"add-collection-item-button",children:["Add ",collectionName]}):(0,jsx_runtime.jsxs)(govuk_react_button_esm.Z,{id:"add-".concat((0,lodash.kebabCase)(collectionName)),as:FilteredCollectionHeader_StyledLink,href:addItemUrl,buttonColour:colours.nx,buttonTextColour:colours.E5,"data-test":"add-collection-item-button",children:["Add ",collectionName]}));return(0,jsx_runtime.jsxs)(CollectionHeaderRowContainer,{children:[(0,jsx_runtime.jsx)(CollectionHeaderRow.Z,{actions,children:(0,jsx_runtime.jsxs)(StyledDiv,{role:"status",children:[(0,jsx_runtime.jsxs)(StyledHeaderText,{children:[(0,jsx_runtime.jsx)(StyledResultCount,{"data-test":"collectionCount",children:formattedTotal})," ",counterSuffix]}),hasFilters&&(0,jsx_runtime.jsx)(components_FilterReset,{"data-test":"clear-filters",id:"clear-filters",children:"Remove all filters"})]})}),summary&&(0,jsx_runtime.jsxs)(StyledSummary,{"data-test":"summary",children:["Total value:"," ",(0,jsx_runtime.jsxs)(StyledSummaryTotal,{children:["£",(0,number_utils.gH)(summary.total_subtotal_cost/100)]})]}),(0,jsx_runtime.jsx)(CollectionHeaderRow.Z,{"data-test":"filter-chips",id:"filter-chips",children:(0,jsx_runtime.jsx)(RoutedFilterChipsCollection,{selectedFilters})})]})}FilteredCollectionHeader.displayName="FilteredCollectionHeader",FilteredCollectionHeader.propTypes={totalItems:prop_types_default().number.isRequired,summary:prop_types_default().object,collectionName:prop_types_default().string.isRequired,addItemUrl:prop_types_default().string,selectedFilters:prop_types_default().objectOf(prop_types_default().shape({queryParam:prop_types_default().string.isRequired,options:prop_types_default().arrayOf(prop_types_default().shape({value:prop_types_default().string.isRequired,label:prop_types_default().string,categoryLabel:prop_types_default().string}))}))},FilteredCollectionHeader.__docgenInfo={description:"",methods:[],displayName:"FilteredCollectionHeader",props:{collectionName:{defaultValue:{value:"'result'",computed:!1},description:"",type:{name:"string"},required:!1},addItemUrl:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"string"},required:!1},useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},totalItems:{description:"",type:{name:"number"},required:!0},summary:{description:"",type:{name:"object"},required:!1},selectedFilters:{description:"",type:{name:"objectOf",value:{name:"shape",value:{queryParam:{name:"string",required:!0},options:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!0},label:{name:"string",required:!1},categoryLabel:{name:"string",required:!1}}},required:!1}}}},required:!1}}};const FilteredCollectionList_FilteredCollectionHeader=FilteredCollectionHeader;function FilteredCollectionList_typeof(o){return FilteredCollectionList_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FilteredCollectionList_typeof(o)}function FilteredCollectionList_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FilteredCollectionList_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i1&&void 0!==arguments[1]?arguments[1]:1,pageNumber=parseInt(qsParams.page,10);return isNaN(pageNumber)?defaultValue:pageNumber}(qsParams);return defaultQueryParams&&(0,lodash.isEmpty)(qsParams)&&history.push({search:lib_default().stringify(FilteredCollectionList_objectSpread({},defaultQueryParams))}),(0,jsx_runtime.jsxs)(govuk_react_esm.Jn,{"data-test":"collection-list",children:[_children,(0,jsx_runtime.jsx)(govuk_react_esm.$W,{children:(0,jsx_runtime.jsxs)("article",{children:[isComplete&&(0,jsx_runtime.jsx)(FilteredCollectionList_FilteredCollectionHeader,{totalItems:count,summary,collectionName,hasFilters:void 0!==_children,selectedFilters,addItemUrl,useReactRouter}),sortOptions&&(0,jsx_runtime.jsx)(CollectionList_CollectionSort,{sortOptions,totalPages}),baseDownloadLink&&(0,jsx_runtime.jsx)(components_RoutedDownloadDataHeader,{count,maxItems:maxItemsToDownload,"data-test":"download-data-header",baseDownloadLink,entityName,entityNamePlural}),(0,jsx_runtime.jsx)(Task.Z.Status,FilteredCollectionList_objectSpread(FilteredCollectionList_objectSpread({},taskProps),{},{children:function children(){return isComplete&&(0,jsx_runtime.jsx)("ol",{"aria-live":"polite",children:results.map((function(item){return(0,jsx_runtime.jsx)(Analytics.Z,{children:function children(pushAnalytics){return collectionItemTemplate(item,titleRenderer,useReactRouter,pushAnalytics,selectedFilters,sanitizeFiltersForAnalytics)}})}))})}})),(0,jsx_runtime.jsx)(components_Pagination.Z,{totalPages,activePage:initialPage,onPageClick:function onPageClick(page,e){e.preventDefault(),history.push({search:lib_default().stringify(FilteredCollectionList_objectSpread(FilteredCollectionList_objectSpread({},qsParams),{},{page}))})}})]})})]})}})};FilteredCollectionList.displayName="FilteredCollectionList",FilteredCollectionList.propTypes={taskProps:prop_types_default().shape({name:prop_types_default().string,id:prop_types_default().string,progressMessage:prop_types_default().string,renderProgress:prop_types_default().func,startOnRender:prop_types_default().shape({payload:prop_types_default().shape({page:prop_types_default().number,filters:prop_types_default().object,search:prop_types_default().string}).isRequired,onSuccessDispatch:prop_types_default().string}).isRequired}),isComplete:prop_types_default().bool,children:prop_types_default().node,collectionName:prop_types_default().string,router:prop_types_default().shape({location:prop_types_default().shape({search:prop_types_default().string.isRequired,query:prop_types_default().object.isRequired})}),maxItemsToPaginate:prop_types_default().number,maxItemsToDownload:prop_types_default().number,selectedFilters:prop_types_default().shape({label:prop_types_default().string,value:prop_types_default().string}),summary:prop_types_default().object,defaultQueryParams:prop_types_default().object,titleRenderer:prop_types_default().func,sanitizeFiltersForAnalytics:prop_types_default().func,width:prop_types_default().string},FilteredCollectionList.__docgenInfo={description:"",methods:[],displayName:"FilteredCollectionList",props:{results:{defaultValue:{value:"[]",computed:!1},required:!1},summary:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"object"},required:!1},itemsPerPage:{defaultValue:{value:"10",computed:!1},required:!1},sortOptions:{defaultValue:{value:"null",computed:!1},required:!1},count:{defaultValue:{value:"0",computed:!1},required:!1},maxItemsToPaginate:{defaultValue:{value:"10000",computed:!1},description:"",type:{name:"number"},required:!1},baseDownloadLink:{defaultValue:{value:"null",computed:!1},required:!1},titleRenderer:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},sanitizeFiltersForAnalytics:{defaultValue:{value:"null",computed:!1},description:"",type:{name:"func"},required:!1},useReactRouter:{defaultValue:{value:"false",computed:!1},required:!1},collectionItemTemplate:{defaultValue:{value:"(\n item,\n titleRenderer,\n useReactRouter,\n pushAnalytics,\n selectedFilters,\n sanitizeFiltersForAnalytics\n) => {\n return (\n {\n pushAnalytics({\n event: 'filterResultClick',\n extra: {\n ...filtersToAnalytics(selectedFilters),\n ...(sanitizeFiltersForAnalytics &&\n sanitizeFiltersForAnalytics(getSelectedFilters(selectedFilters))),\n },\n })\n }}\n />\n )\n}",computed:!1},required:!1},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!1},id:{name:"string",required:!1},progressMessage:{name:"string",required:!1},renderProgress:{name:"func",required:!1},startOnRender:{name:"shape",value:{payload:{name:"shape",value:{page:{name:"number",required:!1},filters:{name:"object",required:!1},search:{name:"string",required:!1}},required:!0},onSuccessDispatch:{name:"string",required:!1}},required:!0}}},required:!1},isComplete:{description:"",type:{name:"bool"},required:!1},children:{description:"",type:{name:"node"},required:!1},collectionName:{description:"",type:{name:"string"},required:!1},router:{description:"",type:{name:"shape",value:{location:{name:"shape",value:{search:{name:"string",required:!0},query:{name:"object",required:!0}},required:!1}}},required:!1},maxItemsToDownload:{description:"",type:{name:"number"},required:!1},selectedFilters:{description:"",type:{name:"shape",value:{label:{name:"string",required:!1},value:{name:"string",required:!1}}},required:!1},defaultQueryParams:{description:"",type:{name:"object"},required:!1},width:{description:"",type:{name:"string"},required:!1}}};function RoutedFilterChips_typeof(o){return RoutedFilterChips_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedFilterChips_typeof(o)}var RoutedFilterChips_excluded=["qsParamName","selectedOptions"];function RoutedFilterChips_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function RoutedFilterChips_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function RoutedFilterChips_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedFilterChips_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i2&&void 0!==arguments[2]?arguments[2]:null;return Object.entries(qsParams).map((function(_ref){var key=RoutedFilterChips_slicedToArray(_ref,1)[0];if(key===targetParam)return Array.isArray(qsParams[key])?RoutedFilterChips_objectSpread(RoutedFilterChips_objectSpread({},qsParams),{},RoutedFilterChips_defineProperty({},key,qsParams[key].filter((function(x){return x!==targetValue})))):(0,lodash.omit)(qsParams,targetParam)})).filter(Boolean)[0]}(lib_default().parse(location.search.slice(1)),qsParamName,value);history.push({search:lib_default().stringify(newQsParams)})};return selectedOptions.map((function(_ref5){var value=_ref5.value,label=_ref5.label,categoryLabel=_ref5.categoryLabel;return(0,jsx_runtime.jsx)(Chip.Z,RoutedFilterChips_objectSpread(RoutedFilterChips_objectSpread({value,onClick:function onClick(){return clearFilter(value)}},props),{},{children:categoryLabel?"".concat(categoryLabel,": ").concat(label):label}),value)}))}})};RoutedFilterChips.displayName="RoutedFilterChips",RoutedFilterChips.propTypes={qsParamName:prop_types_default().string.isRequired,selectedOptions:prop_types_default().arrayOf(prop_types_default().shape({value:prop_types_default().string.isRequired,label:prop_types_default().string.isRequired,categoryLabel:prop_types_default().string}))},RoutedFilterChips.__docgenInfo={description:"",methods:[],displayName:"RoutedFilterChips",props:{selectedOptions:{defaultValue:{value:"[]",computed:!1},description:"",type:{name:"arrayOf",value:{name:"shape",value:{value:{name:"string",required:!0},label:{name:"string",required:!0},categoryLabel:{name:"string",required:!1}}}},required:!1},qsParamName:{description:"",type:{name:"string"},required:!0}}};const components_RoutedFilterChips=RoutedFilterChips;var Chip=__webpack_require__("./src/client/components/Chip/index.jsx");function FilterReset_typeof(o){return FilterReset_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},FilterReset_typeof(o)}var FilterReset_templateObject,FilterReset_excluded=["children"],FilterReset_excluded2=["sortby","page"];function FilterReset_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function FilterReset_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var FilterReset_StyledButtonLink=(0,styled_components_browser_esm.ZP)(ButtonLink.Z)(FilterReset_templateObject||(FilterReset_templateObject=function FilterReset_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),FilterReset=function FilterReset(_ref){var _children=_ref.children,props=FilterReset_objectWithoutProperties(_ref,FilterReset_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var history=_ref2.history,_ref2$location=_ref2.location,pathname=_ref2$location.pathname,search=_ref2$location.search,_qs$parse=lib_default().parse(search.slice(1)),filters=(_qs$parse.sortby,_qs$parse.page,FilterReset_objectWithoutProperties(_qs$parse,FilterReset_excluded2));return!(0,lodash.isEmpty)(filters)&&(0,jsx_runtime.jsx)(FilterReset_StyledButtonLink,FilterReset_objectSpread(FilterReset_objectSpread({},props),{},{onClick:function onClick(){history.push("".concat(pathname,"?page=1"))},children:_children}))}})};FilterReset.displayName="FilterReset",FilterReset.propTypes={children:prop_types_default().node.isRequired},FilterReset.__docgenInfo={description:"",methods:[],displayName:"FilterReset",props:{children:{description:"",type:{name:"node"},required:!0}}};const components_FilterReset=FilterReset;__webpack_require__("./src/client/components/Checkbox/index.jsx");var CheckboxGroupField=__webpack_require__("./src/client/components/CheckboxGroupField/index.jsx");function RoutedCheckboxGroupField_typeof(o){return RoutedCheckboxGroupField_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},RoutedCheckboxGroupField_typeof(o)}var RoutedCheckboxGroupField_excluded=["qsParam"];function RoutedCheckboxGroupField_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function RoutedCheckboxGroupField_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedCheckboxGroupField=function RoutedCheckboxGroupField(_ref){var qsParam=_ref.qsParam,props=RoutedCheckboxGroupField_objectWithoutProperties(_ref,RoutedCheckboxGroupField_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var history=_ref2.history,location=_ref2.location,qsParams=lib_default().parse(location.search.slice(1));return(0,jsx_runtime.jsx)(CheckboxGroupField.Z,RoutedCheckboxGroupField_objectSpread(RoutedCheckboxGroupField_objectSpread({},props),{},{onChange:function onChange(pickedOptions){var _objectSpread2;return history.push({search:lib_default().stringify(RoutedCheckboxGroupField_objectSpread(RoutedCheckboxGroupField_objectSpread({},qsParams),{},(_objectSpread2={},RoutedCheckboxGroupField_defineProperty(_objectSpread2,qsParam,pickedOptions.map((function(_ref3){return _ref3.value}))),RoutedCheckboxGroupField_defineProperty(_objectSpread2,"page",1),_objectSpread2)))})}}))}})};RoutedCheckboxGroupField.displayName="RoutedCheckboxGroupField",RoutedCheckboxGroupField.propTypes={name:prop_types_default().string.isRequired},RoutedCheckboxGroupField.__docgenInfo={description:"",methods:[],displayName:"RoutedCheckboxGroupField",props:{name:{description:"",type:{name:"string"},required:!0}}};const components_RoutedCheckboxGroupField=RoutedCheckboxGroupField,timeline_namespaceObject=__webpack_require__.p+"static/media/timeline.ea4a156a.png";var NoInvestmentProjects_templateObject,NoInvestmentProjects_templateObject2,NoInvestmentProjects_templateObject3,NoInvestmentProjects_templateObject4,NoInvestmentProjects_templateObject5;function NoInvestmentProjects_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var StyledContainer=(0,styled_components_browser_esm.ZP)("div")(NoInvestmentProjects_templateObject||(NoInvestmentProjects_templateObject=NoInvestmentProjects_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-items: center;\n "," {\n margin: 25px 0 50px 0;\n }\n "," {\n margin: 45px 0 95px 0;\n }\n"])),govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.qk.DESKTOP),NoInvestmentProjects_StyledParagraph=(0,styled_components_browser_esm.ZP)("p")(NoInvestmentProjects_templateObject2||(NoInvestmentProjects_templateObject2=NoInvestmentProjects_taggedTemplateLiteral(["\n color: ",";\n "," {\n margin-bottom: 25px;\n font-size: ",";\n }\n"])),colours.au,govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.Kt.SIZE_24),StyledImage=(0,styled_components_browser_esm.ZP)("img")(NoInvestmentProjects_templateObject3||(NoInvestmentProjects_templateObject3=NoInvestmentProjects_taggedTemplateLiteral(["\n display: none;\n "," {\n display: block;\n width: 655px;\n margin-bottom: ",";\n }\n "," {\n width: 760px;\n margin: "," 0 35px 0;\n }\n"])),govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.DESKTOP,govuk_react_constants_esm.N_.SCALE_3),NoInvestmentProjects_StyledUnorderedList=(0,styled_components_browser_esm.ZP)(govuk_react_unordered_list_esm.Z)(NoInvestmentProjects_templateObject4||(NoInvestmentProjects_templateObject4=NoInvestmentProjects_taggedTemplateLiteral(["\n color: ",";\n margin-bottom: ",";\n "," {\n margin-left: 7px;\n margin-bottom: 40px;\n }\n"])),colours.au,govuk_react_constants_esm.N_.SCALE_4,govuk_react_constants_esm.qk.TABLET),NoInvestmentProjects_StyledListItem=(0,styled_components_browser_esm.ZP)("li")(NoInvestmentProjects_templateObject5||(NoInvestmentProjects_templateObject5=NoInvestmentProjects_taggedTemplateLiteral(["\n "," {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.qk.TABLET,govuk_react_constants_esm.Kt.SIZE_24),NoInvestmentProjects=function NoInvestmentProjects(){return(0,jsx_runtime.jsxs)(StyledContainer,{children:[(0,jsx_runtime.jsx)(govuk_react_heading_esm.H3,{as:govuk_react_heading_esm.H1,children:"No investment projects"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledParagraph,{children:"View and track investment projects from your dashboard"}),(0,jsx_runtime.jsx)(StyledImage,{src:timeline_namespaceObject,alt:"An image of the stage timeline and estimated land date"}),(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledParagraph,{children:"Once added, you'll be able to:"}),(0,jsx_runtime.jsxs)(NoInvestmentProjects_StyledUnorderedList,{listStyleType:"bullet",children:[(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"view the progress of each project"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"move projects onto the next stage"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"view estimated land dates"}),(0,jsx_runtime.jsx)(NoInvestmentProjects_StyledListItem,{children:"view project summaries for the next financial year."})]})]}),(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{as:govuk_react_link_esm.Z,href:urls.investments.index(),children:"Add project"})]})};NoInvestmentProjects.displayName="NoInvestmentProjects",NoInvestmentProjects.__docgenInfo={description:"",methods:[],displayName:"NoInvestmentProjects"};const MyInvestmentProjects_NoInvestmentProjects=NoInvestmentProjects;var MyInvestmentProjects_state=__webpack_require__("./src/client/components/MyInvestmentProjects/state.js"),govuk_react_checkbox_esm=__webpack_require__("./node_modules/@govuk-react/checkbox/dist/govuk-react-checkbox.esm.js");function ActivityFeedCheckbox_typeof(o){return ActivityFeedCheckbox_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ActivityFeedCheckbox_typeof(o)}var ActivityFeedCheckbox_templateObject,ActivityFeedCheckbox_excluded=["children"];function ActivityFeedCheckbox_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ActivityFeedCheckbox_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledCheckbox=(0,styled_components_browser_esm.ZP)(govuk_react_checkbox_esm.Z)(ActivityFeedCheckbox_templateObject||(ActivityFeedCheckbox_templateObject=function ActivityFeedCheckbox_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n display: flex;\n align-items: center;\n min-height: 26px;\n margin-bottom: 0;\n\n & > span {\n margin: 0;\n padding: 0;\n white-space: nowrap;\n\n &::before {\n background: ",";\n width: 26px;\n height: 26px;\n }\n\n &::after {\n top: 6px;\n left: ",";\n width: 12px;\n height: 6px;\n box-sizing: unset;\n border-width: 0 0 "," ",";\n }\n }\n\n input {\n width: 26px;\n height: 26px;\n margin: 0;\n padding: 0;\n }\n"])),colours.Cj,govuk_react_constants_esm.N_.SCALE_1,govuk_react_constants_esm.IA,govuk_react_constants_esm.IA),ActivityFeedCheckbox=function ActivityFeedCheckbox(_ref){var children=_ref.children,rest=ActivityFeedCheckbox_objectWithoutProperties(_ref,ActivityFeedCheckbox_excluded);return(0,jsx_runtime.jsx)(StyledCheckbox,ActivityFeedCheckbox_objectSpread(ActivityFeedCheckbox_objectSpread({},rest),{},{children}))};ActivityFeedCheckbox.displayName="ActivityFeedCheckbox",ActivityFeedCheckbox.propTypes={children:prop_types_default().node.isRequired,onChange:prop_types_default().func.isRequired,checked:prop_types_default().bool,disabled:prop_types_default().bool,name:prop_types_default().string},ActivityFeedCheckbox.__docgenInfo={description:"",methods:[],displayName:"ActivityFeedCheckbox",props:{children:{description:"",type:{name:"node"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checked:{description:"",type:{name:"bool"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!1}}};const ActivityFeed_ActivityFeedCheckbox=ActivityFeedCheckbox;function InvestmentListShowDetails_typeof(o){return InvestmentListShowDetails_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentListShowDetails_typeof(o)}var InvestmentListShowDetails_templateObject,InvestmentListShowDetails_excluded=["children"];function InvestmentListShowDetails_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentListShowDetails_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var CheckboxContainer=(0,styled_components_browser_esm.ZP)("div")(InvestmentListShowDetails_templateObject||(InvestmentListShowDetails_templateObject=function InvestmentListShowDetails_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n padding: ",";\n"])),govuk_react_constants_esm.N_.SCALE_2),InvestmentListShowDetails=function InvestmentListShowDetails(_ref){var children=_ref.children,rest=InvestmentListShowDetails_objectWithoutProperties(_ref,InvestmentListShowDetails_excluded);return(0,jsx_runtime.jsx)(CheckboxContainer,{children:(0,jsx_runtime.jsx)(ActivityFeed_ActivityFeedCheckbox,InvestmentListShowDetails_objectSpread(InvestmentListShowDetails_objectSpread({name:"investmentListShowDetails"},rest),{},{children}))})};InvestmentListShowDetails.displayName="InvestmentListShowDetails",InvestmentListShowDetails.propTypes={children:prop_types_default().node.isRequired,onChange:prop_types_default().func.isRequired,checked:prop_types_default().bool.isRequired,disabled:prop_types_default().bool.isRequired},InvestmentListShowDetails.__docgenInfo={description:"",methods:[],displayName:"InvestmentListShowDetails",props:{children:{description:"",type:{name:"node"},required:!0},onChange:{description:"",type:{name:"func"},required:!0},checked:{description:"",type:{name:"bool"},required:!0},disabled:{description:"",type:{name:"bool"},required:!0}}};var InvestmentListSelect_excluded=["initialValue","label","options","onChange","input"];function InvestmentListSelect_typeof(o){return InvestmentListSelect_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentListSelect_typeof(o)}function InvestmentListSelect_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentListSelect_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function InvestmentListSelect_defineProperty(obj,key,value){return(key=function InvestmentListSelect_toPropertyKey(arg){var key=function InvestmentListSelect_toPrimitive(input,hint){if("object"!==InvestmentListSelect_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==InvestmentListSelect_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===InvestmentListSelect_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var InvestmentListSelect_StyledSelect=(0,styled_components_browser_esm.ZP)(components_Select)(InvestmentListSelect_defineProperty({alignItems:"flex-start",flexDirection:"column",flex:"1 1",select:{width:"100%",minWidth:170},marginBottom:govuk_react_constants_esm.N_.SCALE_1},govuk_react_constants_esm.qk.DESKTOP,{margin:govuk_react_constants_esm.N_.SCALE_1})),InvestmentListSelect=function InvestmentListSelect(_ref){var initialValue=_ref.initialValue,label=_ref.label,options=_ref.options,onChange=_ref.onChange,input=_ref.input,props=InvestmentListSelect_objectWithoutProperties(_ref,InvestmentListSelect_excluded);return(0,jsx_runtime.jsx)(InvestmentListSelect_StyledSelect,InvestmentListSelect_objectSpread(InvestmentListSelect_objectSpread({label,input:InvestmentListSelect_objectSpread({onChange,initialValue},input)},props),{},{children:options.map((function(_ref2,index){var id=_ref2.id,name=_ref2.name;return(0,jsx_runtime.jsx)("option",{value:id,"aria-label":name,id:(0,lodash.kebabCase)(name),children:name},index)}))}))};InvestmentListSelect.displayName="InvestmentListSelect",InvestmentListSelect.__docgenInfo={description:"",methods:[],displayName:"InvestmentListSelect"};const MyInvestmentProjects_InvestmentListSelect=InvestmentListSelect;var PROJECT_STATUS_OPTIONS=[{name:"Show all",id:"all-statuses"},{name:"Ongoing",id:"ongoing"},{name:"Delayed",id:"delayed"},{name:"Abandoned",id:"abandoned"},{name:"Lost",id:"lost"},{name:"Dormant",id:"dormant"}],STAGE_OPTIONS=[{name:"Show all",id:"all-stages"},{name:"Prospect",id:"8a320cc9-ae2e-443e-9d26-2f36452c2ced"},{name:"Assign PM",id:"c9864359-fb1a-4646-a4c1-97d10189fc03"},{name:"Active",id:"7606cc19-20da-4b74-aba1-2cec0d753ad8"},{name:"Verify win",id:"49b8f6f3-0c50-4150-a965-2c974f3149e3"},{name:"Won",id:"945ea6d1-eee3-4f5b-9144-84a75b71b8e6"}],SORT_OPTIONS=[{name:"Recently created",id:"created_on:desc"},{name:"Recently updated",id:"modified_on:desc"},{name:"Earliest land date",id:"estimated_land_date:asc"},{name:"Latest land date",id:"estimated_land_date:desc"},{name:"Project name (A-Z)",id:"name:asc"},{name:"Project name (Z-A)",id:"name:desc"}],INCOMPLETE_FIELDS={client_cannot_provide_total_investment:"Can client provide total investment value?",number_new_jobs:"Number of new jobs",strategic_drivers:"Strategic drivers behind this investment",client_requirements:"Client requirements",client_considering_other_countries:"Is the client considering other countries?",total_investment:"Total investment",uk_region_locations:"Possible UK locations for this investment",project_manager:"Project Manager",project_assurance_adviser:"Project Assurance Adviser",government_assistance:"Is this project receiving government financial assistance?",number_safeguarded_jobs:"Number of safeguarded jobs",r_and_d_budget:"Does this project have budget for a research and development?",non_fdi_r_and_d_budget:"Is this project associated with a non-FDI R&D project?",new_tech_to_uk:"Does the project bring ‘New To World’ Technology, IP or Business Model to the UK site?",export_revenue:"Will the UK company export a significant proportion of their products and services produced in the UK as a result of the FDI project?",address_1:"Street",address_town:"Town",address_postcode:"Postcode",actual_uk_regions:"UK regions landed",actual_land_date:"Actual land date",average_salary:"Average salary of new jobs",client_cannot_provide_foreign_investment:"Can client provide capital expenditure value?",delivery_partners:"Delivery partners",competitor_countries:"Competitor countries",foreign_equity_investment:"Foreign equity investment",associated_non_fdi_r_and_d_project:"Non-FDI R&D project",fdi_type:"FDI type"},STAGE_TAG_COLOURS={Prospect:"purple","Assign PM":"red",Active:"blue","Verify win":"yellow",Won:"green"},Projects_constants=__webpack_require__("./src/client/modules/Investments/Projects/constants.js");function InvestmentEstimatedLandDate_typeof(o){return InvestmentEstimatedLandDate_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentEstimatedLandDate_typeof(o)}var InvestmentEstimatedLandDate_templateObject,InvestmentEstimatedLandDate_templateObject2,InvestmentEstimatedLandDate_templateObject3,InvestmentEstimatedLandDate_templateObject4,InvestmentEstimatedLandDate_templateObject5,InvestmentEstimatedLandDate_templateObject6,InvestmentEstimatedLandDate_templateObject7,InvestmentEstimatedLandDate_excluded=["estimatedLandDate"];function InvestmentEstimatedLandDate_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentEstimatedLandDate_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function InvestmentEstimatedLandDate_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var InvestmentEstimatedLandDate_require=__webpack_require__("./src/client/utils/date.js"),formatWithoutParsing=InvestmentEstimatedLandDate_require.formatWithoutParsing,getDifferenceInDays=InvestmentEstimatedLandDate_require.getDifferenceInDays,getDifferenceInDaysLabel=InvestmentEstimatedLandDate_require.getDifferenceInDaysLabel,StyledPanel=(0,styled_components_browser_esm.ZP)("div")(InvestmentEstimatedLandDate_templateObject||(InvestmentEstimatedLandDate_templateObject=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n padding: ",";\n color: ",";\n background-color: ",";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n"])),govuk_react_constants_esm.N_.SCALE_2,colours.E5,colours.$R),GreenPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject2||(InvestmentEstimatedLandDate_templateObject2=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.g$,.3)),AmberPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject3||(InvestmentEstimatedLandDate_templateObject3=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.$R,.5)),RedPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject4||(InvestmentEstimatedLandDate_templateObject4=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.hM,.4)),GreyPanel=(0,styled_components_browser_esm.ZP)(StyledPanel)(InvestmentEstimatedLandDate_templateObject5||(InvestmentEstimatedLandDate_templateObject5=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n background-color: ",";\n"])),(0,colours.m4)(colours.FU,.5)),InvestmentEstimatedLandDate_StyledTitle=(0,styled_components_browser_esm.ZP)("h2")(InvestmentEstimatedLandDate_templateObject6||(InvestmentEstimatedLandDate_templateObject6=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n margin: 0;\n text-align: center;\n font-size: ",";\n font-weight: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_24,govuk_react_constants_esm.Xw.bold),StyledBody=(0,styled_components_browser_esm.ZP)("div")(InvestmentEstimatedLandDate_templateObject7||(InvestmentEstimatedLandDate_templateObject7=InvestmentEstimatedLandDate_taggedTemplateLiteral(["\n text-align: center;\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_14),InvestmentEstimatedLandDate=function InvestmentEstimatedLandDate(_ref){var estimatedLandDate=_ref.estimatedLandDate,props=InvestmentEstimatedLandDate_objectWithoutProperties(_ref,InvestmentEstimatedLandDate_excluded),difference=getDifferenceInDays(estimatedLandDate),Panel=difference>=90?GreenPanel:difference>=30?AmberPanel:difference>=0?RedPanel:GreyPanel;return(0,jsx_runtime.jsxs)(Panel,InvestmentEstimatedLandDate_objectSpread(InvestmentEstimatedLandDate_objectSpread({"data-test":"estimated-land-date"},props),{},{children:[(0,jsx_runtime.jsx)(StyledBody,{"data-test":"estimated-land-date-label",children:"Estimated land date"}),(0,jsx_runtime.jsx)(InvestmentEstimatedLandDate_StyledTitle,{"data-test":"estimated-land-date-countdown",children:getDifferenceInDaysLabel(estimatedLandDate)}),(0,jsx_runtime.jsx)(StyledBody,{"data-test":"estimated-land-date-date",children:formatWithoutParsing(new Date(estimatedLandDate),common_constants.DATE_DAY_LONG_FORMAT)})]}))};InvestmentEstimatedLandDate.displayName="InvestmentEstimatedLandDate",InvestmentEstimatedLandDate.propTypes={estimatedLandDate:prop_types_default().string.isRequired},InvestmentEstimatedLandDate.__docgenInfo={description:"",methods:[],displayName:"InvestmentEstimatedLandDate",props:{estimatedLandDate:{description:"",type:{name:"string"},required:!0}}};const MyInvestmentProjects_InvestmentEstimatedLandDate=InvestmentEstimatedLandDate;function InvestmentTimeline_typeof(o){return InvestmentTimeline_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentTimeline_typeof(o)}var InvestmentTimeline_excluded=["stage"];function InvestmentTimeline_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentTimeline_defineProperty(obj,key,value){return(key=function InvestmentTimeline_toPropertyKey(arg){var key=function InvestmentTimeline_toPrimitive(input,hint){if("object"!==InvestmentTimeline_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==InvestmentTimeline_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===InvestmentTimeline_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function InvestmentTimeline_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function InvestmentTimeline_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var InvestmentTimeline=function InvestmentTimeline(_ref){var stage=_ref.stage,props=InvestmentTimeline_objectWithoutProperties(_ref,InvestmentTimeline_excluded);return(0,jsx_runtime.jsx)(Timeline.Z,function InvestmentTimeline_objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=3?totalSteps-3:0,hasAdditonalSteps=!!additionalSteps;return(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledDiv,{"data-test":"investment-steps",children:[(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledHeader,{children:["Next step",totalSteps>1&&"s"]}),hasStepsToComplete&&(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledList,{listStyleType:"bullet",children:[stepsToComplete.map((function(step,i){return i<=2&&(0,jsx_runtime.jsx)(InvestmentNextSteps_StyledListItem,{children:(0,jsx_runtime.jsx)(OverflowWrapper,{children:step})},i)})),hasAdditonalSteps&&(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledListItem,{children:["Plus ",additionalSteps," additional field",additionalSteps>1&&"s"]})]}),(0,jsx_runtime.jsxs)(InvestmentNextSteps_StyledLink,{href:urls.investments.projects.details(projectId),children:["Add details to move to ",nextStage," stage"]})]})]})};InvestmentNextSteps.displayName="InvestmentNextSteps",InvestmentNextSteps.propTypes={nextSteps:prop_types_default().arrayOf(prop_types_default().string),nextStage:prop_types_default().string.isRequired,projectId:prop_types_default().string.isRequired},InvestmentNextSteps.__docgenInfo={description:"",methods:[],displayName:"InvestmentNextSteps",props:{nextSteps:{description:"",type:{name:"arrayOf",value:{name:"string"}},required:!1},nextStage:{description:"",type:{name:"string"},required:!0},projectId:{description:"",type:{name:"string"},required:!0}}};const MyInvestmentProjects_InvestmentNextSteps=InvestmentNextSteps;function InvestmentListItem_typeof(o){return InvestmentListItem_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentListItem_typeof(o)}var InvestmentListItem_templateObject,InvestmentListItem_templateObject2,InvestmentListItem_templateObject3,InvestmentListItem_templateObject4;function InvestmentListItem_defineProperty(obj,key,value){return(key=function InvestmentListItem_toPropertyKey(arg){var key=function InvestmentListItem_toPrimitive(input,hint){if("object"!==InvestmentListItem_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==InvestmentListItem_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===InvestmentListItem_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function InvestmentListItem_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var Row=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_templateObject||(InvestmentListItem_templateObject=InvestmentListItem_taggedTemplateLiteral(["\n margin-bottom: ",";\n\n "," {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-wrap: wrap;\n }\n\n "," {\n flex-wrap: nowrap;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.LARGESCREEN,govuk_react_constants_esm.qk.DESKTOP),Col=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_templateObject2||(InvestmentListItem_templateObject2=InvestmentListItem_taggedTemplateLiteral(["\n margin-bottom: ",";\n\n "," {\n width: ",";\n margin-bottom: 0;\n }\n"])),govuk_react_constants_esm.N_.SCALE_3,govuk_react_constants_esm.qk.LARGESCREEN,(function(_ref){return _ref.fullWidth?"100%":"calc(50% - ".concat(govuk_react_constants_esm.N_.SCALE_2,")")})),InvestmentListItem_ListItem=(0,styled_components_browser_esm.ZP)("li")(InvestmentListItem_defineProperty({padding:"".concat(govuk_react_constants_esm.N_.SCALE_2," 0"),borderBottom:"1px solid ".concat(colours.w8),"&:last-child":{borderBottom:"none"},display:"grid",columnGap:govuk_react_constants_esm.N_.SCALE_2,rowGap:govuk_react_constants_esm.N_.SCALE_3,gridTemplateAreas:'\n "tags"\n "title"\n "details"\n "actions"\n ',gridTemplateColumns:"100%"},govuk_react_constants_esm.qk.DESKTOP,{gridTemplateColumns:"minmax(130px, 2fr) minmax(140px, 1fr) minmax(0, 170px)",gridTemplateAreas:'\n "title tags actions"\n "details details details"\n '})),ListItemTitle=(0,styled_components_browser_esm.ZP)("h2")({fontSize:govuk_react_constants_esm.Kt.SIZE_19,fontWeight:govuk_react_constants_esm.Xw.bold,margin:0,gridArea:"title"}),ListItemTags=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_defineProperty({gridArea:"tags"},govuk_react_constants_esm.qk.DESKTOP,{padding:"0 ".concat(govuk_react_constants_esm.N_.SCALE_5),marginBottom:"-".concat(govuk_react_constants_esm.N_.SCALE_6)})),ListItemTagRow=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_defineProperty({display:"inline-block",paddingBottom:govuk_react_constants_esm.N_.SCALE_4,marginRight:govuk_react_constants_esm.N_.SCALE_1},govuk_react_constants_esm.qk.DESKTOP,{minWidth:"140px",display:"block"})),ListItemActions=(0,styled_components_browser_esm.ZP)("div")(InvestmentListItem_defineProperty({boxSizing:"border-box",gridArea:"actions",a:{width:"100%",marginBottom:0}},govuk_react_constants_esm.qk.DESKTOP,{marginBottom:"-".concat(govuk_react_constants_esm.N_.SCALE_6)})),ListItemDetails=(0,styled_components_browser_esm.ZP)(ToggleSection.b3)({maxWidth:"100%",gridArea:"details"}),StyledInvestmentTimeline=(0,styled_components_browser_esm.ZP)(MyInvestmentProjects_InvestmentTimeline)(InvestmentListItem_templateObject3||(InvestmentListItem_templateObject3=InvestmentListItem_taggedTemplateLiteral(["\n display: none;\n box-sizing: border-box;\n\n "," {\n display: flex;\n flex: 1 0 100%;\n }\n\n "," {\n flex: 1 0 335px;\n }\n"])),govuk_react_constants_esm.qk.LARGESCREEN,govuk_react_constants_esm.qk.DESKTOP),StyledInvestmentEstimatedLandDate=(0,styled_components_browser_esm.ZP)(MyInvestmentProjects_InvestmentEstimatedLandDate)(InvestmentListItem_templateObject4||(InvestmentListItem_templateObject4=InvestmentListItem_taggedTemplateLiteral(["\n flex: 1 1 100%;\n box-sizing: border-box;\n min-height: 93px;\n\n "," {\n flex: 0 1 152px;\n }\n"])),govuk_react_constants_esm.qk.DESKTOP),InvestmentListItem=function InvestmentListItem(_ref2){var id=_ref2.id,name=_ref2.name,stage=_ref2.stage,status=_ref2.status,estimated_land_date=_ref2.estimated_land_date,investor_company=_ref2.investor_company,project_code=_ref2.project_code,sector=_ref2.sector,country_investment_originates_from=_ref2.country_investment_originates_from,latest_interaction=_ref2.latest_interaction,incomplete_fields=_ref2.incomplete_fields,hasStepsToComplete=!!incomplete_fields.length;return(0,jsx_runtime.jsxs)(InvestmentListItem_ListItem,{"data-test":"projects-list-item",children:[(0,jsx_runtime.jsx)(ListItemTitle,{"data-test":"project-title",children:(0,jsx_runtime.jsx)("a",{href:"".concat(urls.investments.projects.details(id)),children:name})}),(0,jsx_runtime.jsxs)(ListItemTags,{children:[(0,jsx_runtime.jsx)(ListItemTagRow,{children:(0,jsx_runtime.jsx)(Tag.Z,{colour:STAGE_TAG_COLOURS[stage.name],"data-test":"project-stage-tag","aria-label":"project stage",children:stage.name})}),(0,jsx_runtime.jsx)(ListItemTagRow,{children:(0,jsx_runtime.jsx)(Tag.Z,{colour:"grey","data-test":"project-status-tag","aria-label":"project status",children:status})})]}),(0,jsx_runtime.jsx)(ListItemActions,{children:(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{buttonColour:colours.Ej,href:urls.investments.projects.interactions.index(id),as:"a","data-test":"add-interaction",children:"View interactions"})}),(0,jsx_runtime.jsxs)(ListItemDetails,{id,label:project_code,"data-test":"project-details",children:[(0,jsx_runtime.jsxs)(Row,{children:[(0,jsx_runtime.jsx)(StyledInvestmentTimeline,{stage}),(0,jsx_runtime.jsx)(StyledInvestmentEstimatedLandDate,{estimatedLandDate:estimated_land_date})]}),(0,jsx_runtime.jsxs)(Row,{children:[(0,jsx_runtime.jsx)(Col,{fullWidth:!hasStepsToComplete,children:(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentDetails,{investor:investor_company,sector,countryOrigin:country_investment_originates_from,latestInteraction:latest_interaction})}),hasStepsToComplete&&(0,jsx_runtime.jsx)(Col,{children:(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentNextSteps,{nextSteps:incomplete_fields,nextStage:Projects_constants.pZ[Projects_constants.pZ.indexOf(stage.name)+1],projectId:id})})]})]})]})};InvestmentListItem.displayName="InvestmentListItem",InvestmentListItem.propTypes={id:prop_types_default().string.isRequired,name:prop_types_default().string.isRequired,project_code:prop_types_default().string.isRequired,stage:prop_types_default().shape({name:prop_types_default().string}).isRequired,estimated_land_date:prop_types_default().string.isRequired,investor_company:prop_types_default().shape({id:prop_types_default().string.isRequired}).isRequired},InvestmentListItem.__docgenInfo={description:"",methods:[],displayName:"InvestmentListItem",props:{id:{description:"",type:{name:"string"},required:!0},name:{description:"",type:{name:"string"},required:!0},project_code:{description:"",type:{name:"string"},required:!0},stage:{description:"",type:{name:"shape",value:{name:{name:"string",required:!1}}},required:!0},estimated_land_date:{description:"",type:{name:"string"},required:!0},investor_company:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0}}},required:!0}}};const MyInvestmentProjects_InvestmentListItem=InvestmentListItem;function InvestmentList_typeof(o){return InvestmentList_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},InvestmentList_typeof(o)}var InvestmentList_templateObject,InvestmentList_excluded=["items","isPaginated","showDetails"];function InvestmentList_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function InvestmentList_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledOrderedList=(0,styled_components_browser_esm.ZP)("ol")(InvestmentList_templateObject||(InvestmentList_templateObject=function InvestmentList_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-top: 0;\n ","\n"])),(function(_ref){return _ref.isPaginated&&"border-bottom: 1px solid ".concat(colours.w8,";")})),InvestmentList=function InvestmentList(_ref2){var items=_ref2.items,isPaginated=_ref2.isPaginated,showDetails=_ref2.showDetails,props=InvestmentList_objectWithoutProperties(_ref2,InvestmentList_excluded);return(0,jsx_runtime.jsx)(StyledOrderedList,InvestmentList_objectSpread(InvestmentList_objectSpread({isPaginated},props),{},{children:items.map((function(item){return(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListItem,InvestmentList_objectSpread({showDetails},item),item.id)}))}))};InvestmentList.displayName="InvestmentList",InvestmentList.propTypes={items:prop_types_default().array.isRequired},InvestmentList.__docgenInfo={description:"",methods:[],displayName:"InvestmentList",props:{items:{description:"",type:{name:"array"},required:!0}}};const MyInvestmentProjects_InvestmentList=InvestmentList;function MyInvestmentProjects_typeof(o){return MyInvestmentProjects_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},MyInvestmentProjects_typeof(o)}var MyInvestmentProjects_templateObject,MyInvestmentProjects_templateObject2;function MyInvestmentProjects_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var MyInvestmentProjects_StyledHeader=(0,styled_components_browser_esm.ZP)("header")(function MyInvestmentProjects_defineProperty(obj,key,value){return(key=function MyInvestmentProjects_toPropertyKey(arg){var key=function MyInvestmentProjects_toPrimitive(input,hint){if("object"!==MyInvestmentProjects_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==MyInvestmentProjects_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===MyInvestmentProjects_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}({},govuk_react_constants_esm.qk.DESKTOP,{display:"flex",flexWrap:"wrap",margin:"-".concat(govuk_react_constants_esm.N_.SCALE_1," -").concat(govuk_react_constants_esm.N_.SCALE_2)})),MyInvestmentProjects_StyledParagraph=(0,styled_components_browser_esm.ZP)(govuk_react_esm.nv)(MyInvestmentProjects_templateObject||(MyInvestmentProjects_templateObject=MyInvestmentProjects_taggedTemplateLiteral(["\n margin-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),StyledListContainer=(0,styled_components_browser_esm.ZP)("div")(MyInvestmentProjects_templateObject2||(MyInvestmentProjects_templateObject2=MyInvestmentProjects_taggedTemplateLiteral(["\n border-top: 1px solid ",";\n margin-top: ",";\n"])),colours.w8,govuk_react_constants_esm.N_.SCALE_3),MyInvestmentProjects=function MyInvestmentProjects(_ref){var results=_ref.results,count=_ref.count,itemsPerPage=_ref.itemsPerPage,page=_ref.page,stage=_ref.stage,status=_ref.status,landDateOptions=_ref.landDateOptions,landDate=_ref.landDate,sort=_ref.sort,onLoad=_ref.onLoad,onSortChange=_ref.onSortChange,onStageChange=_ref.onStageChange,onStatusChange=_ref.onStatusChange,onLandDateChange=_ref.onLandDateChange,onPaginationClick=_ref.onPaginationClick,adviser=(_ref.onShowDetailsChange,_ref.adviser),showDetails=_ref.showDetails;return(0,react.useEffect)((function(){onLoad()}),[]),(0,jsx_runtime.jsxs)("article",{children:[(0,jsx_runtime.jsxs)(MyInvestmentProjects_StyledHeader,{children:[!1,(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-stage-label",input:{id:"my-projects-stage-select"},"data-test":"stage-select",label:"Stage",options:STAGE_OPTIONS,initialValue:stage,onChange:function onChange(event){return onStageChange(event.target.value)}}),(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-status-label",input:{id:"my-projects-status-select"},"data-test":"status-select",label:"Status",options:PROJECT_STATUS_OPTIONS,initialValue:status,onChange:function onChange(event){return onStatusChange(event.target.value)}}),(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-land-date-label",input:{id:"my-projects-land-date-select"},"data-test":"land-date-select",label:"Land date",options:landDateOptions,initialValue:landDate,onChange:function onChange(event){return onLandDateChange(event.target.value)}}),(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentListSelect,{id:"my-projects-sort-label",input:{id:"my-projects-sort-select"},"data-test":"sort-select",label:"Sort",options:SORT_OPTIONS,initialValue:sort,onChange:function onChange(event){return onSortChange(event.target.value)}})]}),(0,jsx_runtime.jsx)(StyledListContainer,{children:(0,jsx_runtime.jsx)(Task.Z.Status,{name:MyInvestmentProjects_state.t,id:MyInvestmentProjects_state.ID,progressMessage:"Loading your investment projects",startOnRender:{payload:{adviser,page,stage,status,landDate,sort},onSuccessDispatch:actions.STt},children:function children(){var totalPages=Math.ceil(count/itemsPerPage);return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:results.length?(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(MyInvestmentProjects_InvestmentList,{"data-test":"my-investment-projects-list",items:results,isPaginated:totalPages>1,showDetails}),(0,jsx_runtime.jsx)(components_Pagination.Z,{totalPages,activePage:page,onPageClick:onPaginationClick})]}):(0,jsx_runtime.jsx)(MyInvestmentProjects_StyledParagraph,{children:"No investment projects"})})}})})]})};MyInvestmentProjects.displayName="MyInvestmentProjects",MyInvestmentProjects.propTypes={results:prop_types_default().array.isRequired,count:prop_types_default().number.isRequired,itemsPerPage:prop_types_default().number.isRequired,page:prop_types_default().number.isRequired,onStageChange:prop_types_default().func.isRequired,onStatusChange:prop_types_default().func.isRequired,onLandDateChange:prop_types_default().func.isRequired,onSortChange:prop_types_default().func.isRequired,onPaginationClick:prop_types_default().func.isRequired,onShowDetailsChange:prop_types_default().func.isRequired,adviser:prop_types_default().shape({id:prop_types_default().string.isRequired}).isRequired,showDetails:prop_types_default().bool.isRequired},MyInvestmentProjects.__docgenInfo={description:"",methods:[],displayName:"MyInvestmentProjects",props:{results:{description:"",type:{name:"array"},required:!0},count:{description:"",type:{name:"number"},required:!0},itemsPerPage:{description:"",type:{name:"number"},required:!0},page:{description:"",type:{name:"number"},required:!0},onStageChange:{description:"",type:{name:"func"},required:!0},onStatusChange:{description:"",type:{name:"func"},required:!0},onLandDateChange:{description:"",type:{name:"func"},required:!0},onSortChange:{description:"",type:{name:"func"},required:!0},onPaginationClick:{description:"",type:{name:"func"},required:!0},onShowDetailsChange:{description:"",type:{name:"func"},required:!0},adviser:{description:"",type:{name:"shape",value:{id:{name:"string",required:!0}}},required:!0},showDetails:{description:"",type:{name:"bool"},required:!0}}};const components_MyInvestmentProjects=(0,es.connect)(MyInvestmentProjects_state.H,(function(dispatch){return{onLoad:function onLoad(){dispatch({type:actions.gUm})},onShowDetailsChange:function onShowDetailsChange(showDetails){dispatch({type:actions.pb3,showDetails})},onStageChange:function onStageChange(stage){dispatch({type:actions.bgc,stage,page:1}),dispatch({type:actions.S77,stage,page:1})},onStatusChange:function onStatusChange(status){dispatch({type:actions.YWR,status,page:1}),dispatch({type:actions.S77,status,page:1})},onLandDateChange:function onLandDateChange(landDate){dispatch({type:actions.yFd,landDate,page:1}),dispatch({type:actions.S77,landDate,page:1})},onSortChange:function onSortChange(sort){dispatch({type:actions.l1G,sort,page:1}),dispatch({type:actions.S77,sort,page:1})},onPaginationClick:function onPaginationClick(page){dispatch({type:actions.mUn,page}),dispatch({type:actions.S77,page})}}}))(MyInvestmentProjects);var _styled,BaseToggleSection=__webpack_require__("./src/client/components/ToggleSection/BaseToggleSection.jsx");function ItemRenderer_typeof(o){return ItemRenderer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ItemRenderer_typeof(o)}function ItemRenderer_slicedToArray(arr,i){return function ItemRenderer_arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function ItemRenderer_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function ItemRenderer_unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return ItemRenderer_arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ItemRenderer_arrayLikeToArray(o,minLen)}(arr,i)||function ItemRenderer_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ItemRenderer_arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var RoutedDateField=function RoutedDateField(_ref){var qsParamName=_ref.qsParamName,props=RoutedDateField_objectWithoutProperties(_ref,RoutedDateField_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref2){var location=_ref2.location,history=_ref2.history,qsParams=lib_default().parse(location.search.slice(1));return(0,jsx_runtime.jsx)(DateField.Z,RoutedDateField_objectSpread(RoutedDateField_objectSpread({},props),{},{onChange:function onChange(e){var _objectSpread2;history.push({search:lib_default().stringify(RoutedDateField_objectSpread(RoutedDateField_objectSpread({},qsParams),{},(_objectSpread2={},RoutedDateField_defineProperty(_objectSpread2,qsParamName,e.target.value),RoutedDateField_defineProperty(_objectSpread2,"page",1),_objectSpread2)))})},initialValue:(0,lodash.get)(qsParams,qsParamName,"")}))}})};RoutedDateField.displayName="RoutedDateField",RoutedDateField.__docgenInfo={description:"",methods:[],displayName:"RoutedDateField"};const components_RoutedDateField=RoutedDateField,ExportDate=(0,styled_components_browser_esm.ZP)(components_RoutedDateField)({paddingBottom:0,marginBottom:0,label:{paddingBottom:2},input:{width:"100%",maxHeight:38}});var List_StyledList=(0,styled_components_browser_esm.ZP)("ol")({}),List_List=function List(_ref){var items=_ref.items,itemRenderer=_ref.itemRenderer;return(0,jsx_runtime.jsx)(List_StyledList,{"data-test":"export-list",children:items.map((function(item){return itemRenderer(item)}))})};List_List.displayName="List",List_List.__docgenInfo={description:"",methods:[],displayName:"List"};const ExportList_List=List_List;var ExportList_styled,ExportList_state=__webpack_require__("./src/client/modules/ExportPipeline/ExportList/state.js");function ExportList_typeof(o){return ExportList_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ExportList_typeof(o)}function ExportList_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ExportList_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var fetchTeams=function fetchTeams(){return(0,lodash.throttle)((function(searchString){return searchString.length?utils.Q8.get(urls_default().metadata.team(),{params:{autocomplete:searchString}}).then((function(_ref){return function parseTeamData(teams){return teams.filter((function(team){return team.name&&team.name.trim().length})).map(client_transformers.TZ)}(_ref.data)})):Promise.resolve([])}),500)},RoutedTeamsTypeahead=function RoutedTeamsTypeahead(_ref2){var taskProps=_ref2.taskProps,closeMenuOnSelect=_ref2.closeMenuOnSelect,_ref2$loadOptions=_ref2.loadOptions,loadOptions=void 0===_ref2$loadOptions?fetchTeams():_ref2$loadOptions,props=RoutedTeamsTypeahead_objectWithoutProperties(_ref2,RoutedTeamsTypeahead_excluded);return(0,jsx_runtime.jsx)(Task.Z.Status,RoutedTeamsTypeahead_objectSpread(RoutedTeamsTypeahead_objectSpread({},taskProps),{},{progressOverlay:!0,children:function children(){return(0,jsx_runtime.jsx)(components_RoutedTypeahead,RoutedTeamsTypeahead_objectSpread({loadOptions,closeMenuOnSelect},props))}}))};RoutedTeamsTypeahead.displayName="RoutedTeamsTypeahead",RoutedTeamsTypeahead.propTypes={name:prop_types_default().string.isRequired,taskProps:prop_types_default().shape({name:prop_types_default().string.isRequired,id:prop_types_default().string.isRequired}).isRequired,closeMenuOnSelect:prop_types_default().bool},RoutedTeamsTypeahead.defaultProps={closeMenuOnSelect:!0},RoutedTeamsTypeahead.__docgenInfo={description:"",methods:[],displayName:"RoutedTeamsTypeahead",props:{loadOptions:{defaultValue:{value:"fetchTeams()",computed:!0},required:!1},closeMenuOnSelect:{defaultValue:{value:"true",computed:!1},description:"",type:{name:"bool"},required:!1},name:{description:"",type:{name:"string"},required:!0},taskProps:{description:"",type:{name:"shape",value:{name:{name:"string",required:!0},id:{name:"string",required:!0}}},required:!0}}};const components_RoutedTeamsTypeahead=RoutedTeamsTypeahead;function LocalNav_typeof(o){return LocalNav_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},LocalNav_typeof(o)}var LocalNav_excluded=["children","href","dataTest"];function LocalNav_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function LocalNav_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledActiveLink=(0,styled_components_browser_esm.ZP)("a")({display:"block",fontSize:govuk_react_constants_esm.Kt.SIZE_20,padding:"11px 16px","&:link, &:visited":{color:colours.Cj,background:colours.hJ,textDecoration:"none",fontWeight:600}}),StyledInactiveLink=(0,styled_components_browser_esm.ZP)("a")({display:"block",fontSize:govuk_react_constants_esm.Kt.SIZE_20,padding:"11px 16px","&:link, &:visited":{color:colours.Ej,textDecoration:"none"},"&:hover, &:focus":{color:colours.E5,backgroundColor:colours.zT}}),LocalNav=function LocalNav(_ref){var children=_ref.children,_ref$dataTest=_ref.dataTest,dataTest=void 0===_ref$dataTest?"local-nav":_ref$dataTest;return children=children.filter((function(child){return!1!==child})),(0,jsx_runtime.jsx)("nav",{"data-test":dataTest,children:(0,jsx_runtime.jsx)("ul",{children:children.map((function(link){return(0,jsx_runtime.jsxs)("li",{children:[" ",link," "]})}))})})};LocalNav.displayName="LocalNav";var LocalNavLink=function LocalNavLink(_ref2){var _children=_ref2.children,href=_ref2.href,_ref2$dataTest=_ref2.dataTest,dataTest=void 0===_ref2$dataTest?"local-nav-link":_ref2$dataTest,rest=LocalNav_objectWithoutProperties(_ref2,LocalNav_excluded);return(0,jsx_runtime.jsx)(react_router.AW,{children:function children(_ref3){var pathname=_ref3.location.pathname,NavLink=null!=href&&href.includes(pathname)?StyledActiveLink:StyledInactiveLink;return(0,jsx_runtime.jsx)(NavLink,LocalNav_objectSpread(LocalNav_objectSpread({href,"data-test":dataTest},rest),{},{children:_children}))}})};LocalNavLink.displayName="LocalNavLink",LocalNav.propTypes={dataTest:prop_types_default().string,children:prop_types_default().node},LocalNavLink.propTypes={dataTest:prop_types_default().string,href:prop_types_default().string,children:prop_types_default().node},LocalNav.__docgenInfo={description:"",methods:[],displayName:"LocalNav",props:{dataTest:{defaultValue:{value:"'local-nav'",computed:!1},description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!1}}},LocalNavLink.__docgenInfo={description:"",methods:[],displayName:"LocalNavLink",props:{dataTest:{defaultValue:{value:"'local-nav-link'",computed:!1},description:"",type:{name:"string"},required:!1},href:{description:"",type:{name:"string"},required:!1},children:{description:"",type:{name:"node"},required:!1}}};__webpack_require__("./src/client/components/Layout/DefaultLayout.jsx");var AccessDenied=__webpack_require__("./src/client/components/AccessDenied/index.jsx");function ProtectedRoute_typeof(o){return ProtectedRoute_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ProtectedRoute_typeof(o)}var ProtectedRoute_excluded=["module","modulePermissions","userPermissions","routePermissions"];function ProtectedRoute_ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function ProtectedRoute_defineProperty(obj,key,value){return(key=function ProtectedRoute_toPropertyKey(arg){var key=function ProtectedRoute_toPrimitive(input,hint){if("object"!==ProtectedRoute_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==ProtectedRoute_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===ProtectedRoute_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function ProtectedRoute_objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=function ProtectedRoute_objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var ProtectedRoute=function ProtectedRoute(_ref){var module=_ref.module,modulePermissions=_ref.modulePermissions,_ref$userPermissions=_ref.userPermissions,userPermissions=void 0===_ref$userPermissions?[]:_ref$userPermissions,_ref$routePermissions=_ref.routePermissions,routePermissions=void 0===_ref$routePermissions?[]:_ref$routePermissions,rest=ProtectedRoute_objectWithoutProperties(_ref,ProtectedRoute_excluded);return routePermissions.every((function(p){return userPermissions.includes(p)}))&modulePermissions.includes(module)?(0,jsx_runtime.jsx)(react_router.AW,function ProtectedRoute_objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var StyledFilterLabel=(0,styled_components_browser_esm.ZP)(FilterLabel.Z)({marginBottom:govuk_react_constants_esm.N_.SCALE_5}),StyledHintText=(0,styled_components_browser_esm.ZP)(govuk_react_hint_text_esm.Z)({marginBottom:govuk_react_constants_esm.N_.SCALE_2}),RoutedAventriIdFieldFilter=function RoutedAventriIdFieldFilter(_ref){var label=_ref.label,hint=_ref.hint,props=Filter_objectWithoutProperties(_ref,Filter_excluded);return(0,jsx_runtime.jsxs)(StyledFilterLabel,{children:[label,(0,jsx_runtime.jsx)(StyledHintText,{children:hint}),(0,jsx_runtime.jsx)(RoutedInput_Filter.Z,Filter_objectSpread({},props))]})};RoutedAventriIdFieldFilter.displayName="RoutedAventriIdFieldFilter",RoutedAventriIdFieldFilter.propTypes={label:prop_types_default().node.isRequired,hint:prop_types_default().string},RoutedAventriIdFieldFilter.__docgenInfo={description:"",methods:[],displayName:"RoutedAventriIdFieldFilter",props:{label:{description:"",type:{name:"node"},required:!0},hint:{description:"",type:{name:"string"},required:!1}}};var Filter_templateObject,Filter_templateObject2,RoutedRelatedCompaniesCheckboxGroup_constants=__webpack_require__("./src/client/components/RoutedRelatedCompaniesCheckboxGroup/constants.js");function Filter_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SUBSIDIARIES_LIMITED_LABEL="Due to the large number of related companies in this tree, we can only show projects from parent companies.",Filter_StyledParagraph=(0,styled_components_browser_esm.ZP)(govuk_react_esm.nv)(Filter_templateObject||(Filter_templateObject=Filter_taggedTemplateLiteral(["\n font-size: ",";\n"])),govuk_react_constants_esm.Kt.SIZE_16),Filter_StyledDetails=(0,styled_components_browser_esm.ZP)(govuk_react_esm.PO)(Filter_templateObject2||(Filter_templateObject2=Filter_taggedTemplateLiteral(["\n margin-bottom: 0;\n span {\n font-size: ",";\n }\n"])),govuk_react_constants_esm.Kt.SIZE_16),RoutedRelatedCompaniesCheckboxGroup=function RoutedRelatedCompaniesCheckboxGroup(_ref){var company=_ref.company,selectedOptions=_ref.selectedOptions;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:company.dunsNumber&&(0,jsx_runtime.jsx)(Resource.F_,{id:company.id,children:function children(relatedCompaniesCountResponse){return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:relatedCompaniesCountResponse.relatedCompaniesCount>0&&(0,jsx_runtime.jsxs)(ToggleSection.er,{id:"ProjectCollection.include-related-companies-filters",label:"Related companies",isOpen:!0,children:[(0,jsx_runtime.jsx)(components_RoutedCheckboxGroupField,{legend:"Include related companies",name:"include_related_companies",qsParam:"include_related_companies",options:relatedCompaniesCountResponse.reducedTree?RoutedRelatedCompaniesCheckboxGroup_constants.v:RoutedRelatedCompaniesCheckboxGroup_constants.B,selectedOptions,"data-test":"include-related-companies-filter","aria-description":relatedCompaniesCountResponse.reducedTree?SUBSIDIARIES_LIMITED_LABEL:void 0}),relatedCompaniesCountResponse.reducedTree&&(0,jsx_runtime.jsx)(Filter_StyledDetails,{summary:"Why can't I filter by subsidiary companies?",children:(0,jsx_runtime.jsx)(Filter_StyledParagraph,{children:SUBSIDIARIES_LIMITED_LABEL})})]})})}})})};RoutedRelatedCompaniesCheckboxGroup.__docgenInfo={description:"",methods:[],displayName:"RoutedRelatedCompaniesCheckboxGroup"};RoutedInputField_Filter.Z,RoutedNumericRangeField_Filter.Z;var ContactLocalHeader_StyledLink=(0,styled_components_browser_esm.ZP)(govuk_react_link_esm.Z)({fontSize:govuk_react_constants_esm.Kt.SIZE_20}),StyledLocalHeaderHeading=(0,styled_components_browser_esm.ZP)(LocalHeaderHeading.Z)({display:"flex",flexWrap:"wrap",columnGap:govuk_react_constants_esm.N_.SCALE_2,marginTop:govuk_react_constants_esm.N_.SCALE_1}),currentTab=function getCurrentTab(currentPath){return currentPath.includes("/interactions")?"Activity":currentPath.includes("/audit")?"Audit history":null}(location.pathname),buildBreadcrumbs=function buildBreadcrumbs(currentTab,id,name){var initialBreadcrumbs=[{link:urls_default().dashboard.index(),text:"Home"},{link:urls_default().contacts.index(),text:"Contacts"}],dynamicBreadcrumbs=currentTab?[{link:urls_default().contacts.contact(id),text:name},{text:currentTab}]:[{text:name}];return initialBreadcrumbs.concat(dynamicBreadcrumbs)},ContactLocalHeader=function ContactLocalHeader(_ref){var contact=_ref.contact,writeFlashMessage=_ref.writeFlashMessage;return(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:(0,jsx_runtime.jsxs)(LocalHeader.Z,{breadcrumbs:buildBreadcrumbs(currentTab,contact.id,contact.name),children:[(0,jsx_runtime.jsxs)(govuk_react_grid_row_esm.Z,{children:[(0,jsx_runtime.jsxs)(govuk_react_grid_col_esm.Z,{children:[(0,jsx_runtime.jsx)(ContactLocalHeader_StyledLink,{"data-test":"company-link",href:urls_default().companies.overview.index(contact.company.id),children:contact.company.name}),(0,jsx_runtime.jsxs)(StyledLocalHeaderHeading,{"data-test":"contact-name",children:[contact.name,contact.primary&&(0,jsx_runtime.jsx)(Badge.Z,{"data-test":"primary-badge",borderColour:"purple",textColour:"purple",fontSize:govuk_react_constants_esm.Kt.SIZE_24,children:"Primary"})]})]}),!contact.archived&&(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWidth:"one-quarter",children:(0,jsx_runtime.jsx)(govuk_react_button_esm.Z,{"data-test":"add-interaction-button",as:govuk_react_link_esm.Z,href:urls_default().companies.interactions.create(contact.company.id),children:"Add interaction"})})]}),contact.archived&&(0,jsx_runtime.jsx)(ArchivePanel.Z,{archivedBy:contact.archivedBy,archivedOn:contact.archivedOn,archiveReason:contact.archivedReason,unarchiveUrl:urls_default().contacts.unarchive(contact.id),onClick:function onClick(){writeFlashMessage("Contact record updated")},type:"contact"})]})})};ContactLocalHeader.propTypes={contact:prop_types_default().object.isRequired,writeFlashMessage:prop_types_default().func},ContactLocalHeader.__docgenInfo={description:"",methods:[],displayName:"ContactLocalHeader",props:{contact:{description:"",type:{name:"object"},required:!0},writeFlashMessage:{description:"",type:{name:"func"},required:!1}}};const components_ContactLocalHeader=(0,es.connect)(null,(function dispatchToProps(dispatch){return{writeFlashMessage:function writeFlashMessage(message){return dispatch({type:"FLASH_MESSAGE__WRITE_TO_SESSION",messageType:"success",message})}}}))(ContactLocalHeader);var SearchLocalHeader_templateObject,SearchLocalHeader_templateObject2,SearchLocalHeader_templateObject3,SearchLocalHeader_templateObject4,FlashMessages=__webpack_require__("./src/client/components/LocalHeader/FlashMessages.jsx");function SearchLocalHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}var SearchLocalHeader_StyledSearchContainer=(0,styled_components_browser_esm.ZP)("div")(SearchLocalHeader_templateObject||(SearchLocalHeader_templateObject=SearchLocalHeader_taggedTemplateLiteral(["\n position: relative;\n width: 100%;\n margin-top: 10px;\n"]))),SearchLocalHeader_StyledSearchInput=(0,styled_components_browser_esm.ZP)(govuk_react_input_esm.Z)(SearchLocalHeader_templateObject2||(SearchLocalHeader_templateObject2=SearchLocalHeader_taggedTemplateLiteral(["\n border: 2px solid #0b0c0c;\n width: 100%;\n padding-left: ",";\n"])),govuk_react_constants_esm.N_.SCALE_3),SearchLocalHeader_StyledMain=(0,styled_components_browser_esm.ZP)(govuk_react_main_esm.Z)(SearchLocalHeader_templateObject3||(SearchLocalHeader_templateObject3=SearchLocalHeader_taggedTemplateLiteral(["\n padding-top: 40px;\n"]))),StyledLabel=(0,styled_components_browser_esm.ZP)("label")({marginTop:41,fontSize:19,color:colours.au}),SearchLocalHeader_StyledHeader=(0,styled_components_browser_esm.ZP)("div")(SearchLocalHeader_templateObject4||(SearchLocalHeader_templateObject4=SearchLocalHeader_taggedTemplateLiteral(["\n padding-bottom: ",";\n background-color: ",";\n padding-top: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5,colours.N1,govuk_react_constants_esm.N_.SCALE_6),SearchLocalHeader=function SearchLocalHeader(_ref){var csrfToken=_ref.csrfToken,flashMessages=_ref.flashMessages;return(0,jsx_runtime.jsx)(SearchLocalHeader_StyledHeader,{"aria-label":"local header","data-auto-id":"localHeader","data-test":"localHeader",role:"region",children:(0,jsx_runtime.jsxs)("form",{method:"GET",action:"".concat(urls_default().search.type("companies"),"?_csrf=").concat(csrfToken),children:[(0,jsx_runtime.jsx)(FlashMessages.Z,{flashMessages}),(0,jsx_runtime.jsxs)(SearchLocalHeader_StyledMain,{children:[(0,jsx_runtime.jsx)(StyledLabel,{htmlFor:"search-input",children:"Search for company, contact, event, investment project or OMIS order"}),(0,jsx_runtime.jsxs)(SearchLocalHeader_StyledSearchContainer,{role:"search",children:[(0,jsx_runtime.jsx)(SearchLocalHeader_StyledSearchInput,{name:"term",type:"text",id:"search-input",placeholder:"Enter your search term(s)"}),(0,jsx_runtime.jsx)(components_SearchButton,{backgroundColour:colours.Ej})]})]})]})})};SearchLocalHeader.displayName="SearchLocalHeader",SearchLocalHeader.propTypes={csrfToken:prop_types_default().string.isRequired},SearchLocalHeader.__docgenInfo={description:"",methods:[],displayName:"SearchLocalHeader",props:{csrfToken:{description:"",type:{name:"string"},required:!0}}};var SectionHeader_templateObject;var StyledSectionHeader=(0,styled_components_browser_esm.ZP)("div")(SectionHeader_templateObject||(SectionHeader_templateObject=function SectionHeader_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n ",";\n margin-bottom: ",";\n"])),govuk_react_lib_esm.cp.font({size:24,weight:"bold"}),govuk_react_constants_esm.N_.SCALE_4),SectionHeader=function SectionHeader(_ref){var type=_ref.type,children=_ref.children;return(0,jsx_runtime.jsx)(StyledSectionHeader,{"data-test":(0,lodash.kebabCase)("".concat(type,"-header")),children})};SectionHeader.displayName="SectionHeader",SectionHeader.propTypes={type:prop_types_default().string.isRequired,children:prop_types_default().string.isRequired},SectionHeader.__docgenInfo={description:"",methods:[],displayName:"SectionHeader",props:{type:{description:"",type:{name:"string"},required:!0},children:{description:"",type:{name:"string"},required:!0}}};var ContactLayout_templateObject;var StyledNavWrapper=(0,styled_components_browser_esm.ZP)("div")(ContactLayout_templateObject||(ContactLayout_templateObject=function ContactLayout_taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["\n margin-bottom: ",";\n"])),govuk_react_constants_esm.N_.SCALE_5),ContactLayout=function ContactLayout(_ref){var contact=_ref.contact,flashMessages=_ref.flashMessages,permissions=_ref.permissions,children=_ref.children,canViewActivityLink=permissions.includes("interaction.view_all_interaction");return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(components_ContactLocalHeader,{contact,writeFlashMessage:flashMessages}),(0,jsx_runtime.jsx)(Main.Z,{children:(0,jsx_runtime.jsxs)(govuk_react_grid_row_esm.Z,{children:[(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{setWidth:"one-quarter",children:(0,jsx_runtime.jsx)(StyledNavWrapper,{children:(0,jsx_runtime.jsxs)(LocalNav,{children:[(0,jsx_runtime.jsx)(LocalNavLink,{dataTest:"contact-details-link",href:urls_default().contacts.details(contact.id),children:"Details"}),canViewActivityLink&&(0,jsx_runtime.jsx)(LocalNavLink,{dataTest:"contact-activity-link",href:urls_default().contacts.interactions.index(contact.id),children:"Activity"}),(0,jsx_runtime.jsx)(LocalNavLink,{dataTest:"contact-audit-link",href:urls_default().contacts.audit(contact.id),children:"Audit history"})]})})}),(0,jsx_runtime.jsx)(govuk_react_grid_col_esm.Z,{children})]})})]})};ContactLayout.propTypes={contact:prop_types_default().object.isRequired,permissions:prop_types_default().array.isRequired,children:prop_types_default().element.isRequired},ContactLayout.__docgenInfo={description:"",methods:[],displayName:"ContactLayout",props:{contact:{description:"",type:{name:"object"},required:!0},permissions:{description:"",type:{name:"array"},required:!0},children:{description:"",type:{name:"element"},required:!0}}};__webpack_require__("./src/client/components/Form/elements/FieldCurrency/index.jsx")},"./src/client/filters.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var _require=__webpack_require__("./src/client/utils/date.js");_require.formatLongDate,_require.formatShortDate},"./src/client/modules/Companies/CollectionList/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict"},"./src/client/modules/Companies/CollectionList/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ID:()=>ID});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./src/apps/companies/apps/edit-company/client/constants.js"),__webpack_require__("./src/client/filters.js"),__webpack_require__("./src/client/modules/Companies/CollectionList/constants.js"),__webpack_require__("./src/client/modules/Companies/CollectionList/transformers.js"),__webpack_require__("./src/client/utils/index.js");var ID="companiesList"},"./src/client/modules/Companies/CollectionList/transformers.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.string.trim.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/lodash/lodash.js");__webpack_require__("./src/lib/urls.js"),__webpack_require__("./src/client/utils/addresses.js");var _require=__webpack_require__("./src/client/utils/date.js");_require.format,_require.formatMediumDateTime},"./src/client/modules/ExportPipeline/ExportList/state.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{ID:()=>ID,k0:()=>TASK_GET_EXPORT_PIPELINE_LIST,L2:()=>TASK_GET_EXPORT_PIPELINE_METADATA,Hq:()=>state2props});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");var lodash=__webpack_require__("./node_modules/lodash/lodash.js"),lib=(__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.search.js"),__webpack_require__("./node_modules/qs/lib/index.js")),lib_default=__webpack_require__.n(lib);function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _defineProperty(obj,key,value){return(key=function _toPropertyKey(arg){var key=function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(void 0!==prim){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}(arg,"string");return"symbol"===_typeof(key)?key:String(key)}(key))in obj?Object.defineProperty(obj,key,{value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}var getQueryParamsFromLocation=function getQueryParamsFromLocation(location){var queryString=location.search.slice(1);return(0,lodash.omitBy)(function _objectSpread(e){for(var r=1;r=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var TASK_GET_EXPORT_PIPELINE_LIST="TASK_GET_EXPORT_PIPELINE_LIST",TASK_GET_EXPORT_PIPELINE_METADATA="TASK_GET_EXPORT_PIPELINE_METADATA",ID="exportPipelineList",areFiltersActive=function areFiltersActive(queryParams){var filters=(0,lodash.omitBy)(queryParams,(function(filterValue,filterName){return"all-statuses"===filterValue||"page"===filterName}));return!(0,lodash.isEmpty)(filters)},state2props=function state2props(_ref){var router=_ref.router,state=_objectWithoutProperties(_ref,_excluded),queryParams=getQueryParamsFromLocation(router.location),_state$ID=state[ID],sectorOptions=_state$ID.sectorOptions,countryOptions=_state$ID.countryOptions,ownerOptions=_state$ID.ownerOptions;return state_objectSpread(state_objectSpread({},state[ID]),{},{payload:state_objectSpread(state_objectSpread({},queryParams),{},{page:(0,pagination.parsePage)(queryParams.page)}),filters:{areActive:areFiltersActive(queryParams),status:{options:STATUS_LIST_OPTIONS},exportPotential:{options:EXPORT_POTENTIAL_LIST_OPTIONS},sector:{options:sectorOptions},country:{options:countryOptions},owner:{options:ownerOptions},sortby:{options:SORT_OPTIONS}}})}},"./src/client/modules/Investments/Projects/constants.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Fg:()=>STAGE_PROSPECT,RH:()=>STAGE_ACTIVE,S7:()=>NOT_LINKED_TO_R_AND_D,Xg:()=>STAGE_ASSIGN_PM,Zq:()=>STAGE_VERIFY_WIN,aP:()=>SORT_OPTIONS,pS:()=>STAGE_WON,pZ:()=>INVESTMENT_PROJECT_STAGES});__webpack_require__("./node_modules/react/index.js"),__webpack_require__("./node_modules/react/jsx-runtime.js");var STAGE_PROSPECT="Prospect",STAGE_ASSIGN_PM="Assign PM",STAGE_ACTIVE="Active",STAGE_VERIFY_WIN="Verify win",STAGE_WON="Won",INVESTMENT_PROJECT_STAGES=[STAGE_PROSPECT,STAGE_ASSIGN_PM,STAGE_ACTIVE,STAGE_VERIFY_WIN,STAGE_WON],NOT_LINKED_TO_R_AND_D="Not linked to a non-FDI R&D project",SORT_OPTIONS=[{name:"Recently created",value:"created_on:desc"},{name:"Earliest land date",value:"estimated_land_date:asc"},{name:"Latest land date",value:"estimated_land_date:desc"},{name:"Project name A-Z",value:"name:asc"}]},"./src/client/styles.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>focusMixin});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var _govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/@govuk-react/constants/dist/govuk-react-constants.esm.js"),_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/client/utils/colours.js"),focusMixin={"&:focus":{outline:"".concat(_govuk_react_constants__WEBPACK_IMPORTED_MODULE_1__.lT," solid ").concat(_client_utils_colours__WEBPACK_IMPORTED_MODULE_2__.tL),outlineOffset:"0"}}},"./src/client/transformers/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{TZ:()=>transformIdNameToValueLabel});__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/lodash/lodash.js"),__webpack_require__("./src/common/constants.js"),__webpack_require__("./src/client/utils/date.js");var transformIdNameToValueLabel=function transformIdNameToValueLabel(value){return value?{value:value.id,label:value.name}:null}},"./src/client/utils/addresses.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js");var _require=__webpack_require__("./node_modules/lodash/lodash.js"),get=_require.get,compact=_require.compact;module.exports={addressToString:function addressToString(address){return["line_1","line_2","town","county","postcode","area.name","country.name"].map((function(component){return get(address,component)})).filter((function(value){return value})).join(", ")},addressToStringResource:function addressToStringResource(address){return["line1","line2","town","county","postcode","area.name","country.name"].map((function(component){return get(address,component)})).filter((function(value){return value})).join(", ")},getCompanyAddress:function getCompanyAddress(dnb_company){if(dnb_company)return compact([dnb_company.address_line_1,dnb_company.address_line_2,dnb_company.address_town,dnb_company.address_county,dnb_company.address_area_name,dnb_company.address_postcode]).join(", ")}}},"./src/client/utils/colours.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$C:()=>TAG_COLOURS,$R:()=>YELLOW,Cj:()=>WHITE,DU:()=>BORDER_COLOUR,E5:()=>BLACK,Ej:()=>BLUE,F3:()=>LIGHT_BLUE,FU:()=>GREY_2,J7:()=>LIGHT_GREY,KW:()=>LINK_ACTIVE_COLOUR,Ll:()=>FOOTER_BACKGROUND,N1:()=>GREY_3_LEGACY,Pf:()=>LINK_VISITED_COLOUR,Rt:()=>LIGHT_BLUE_50,TK:()=>GREY_1,Wd:()=>PURPLE,ZA:()=>GREEN,ZR:()=>FOOTER_TEXT,Zv:()=>LIGHT_BLUE_25,ar:()=>FOOTER_LINK_HOVER,au:()=>DARK_GREY,cK:()=>TEXT_COLOUR,d7:()=>SECONDARY_TEXT_COLOUR,et:()=>FOOTER_LINK,g$:()=>BUTTON_COLOUR,gX:()=>PROPOSITION_BORDER,gr:()=>FOOTER_BORDER_TOP,h:()=>ERROR_COLOUR,hJ:()=>DARK_BLUE_LEGACY,hM:()=>RED,jG:()=>YELLOW_25,lX:()=>BUTTON_COLOUR_DARKEN_15,m4:()=>rgba,nx:()=>GREY_3,oh:()=>LINK_HOVER_COLOUR,su:()=>LINK_COLOUR,tL:()=>FOCUS_COLOUR,ud:()=>ORANGE,w8:()=>MID_GREY,xm:()=>PAGE_COLOUR,zT:()=>GREY_4});__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.array.join.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");var rgba=function rgba(colorHex,alpha){return"rgba(".concat(function hexToRgb(colorHex){var colorValue=parseInt(colorHex.replace("#",""),16);return[colorValue>>16&255,colorValue>>8&255,255&colorValue].join()}(colorHex),",").concat(alpha,")")},GREY_3_LEGACY="#dee0e2",DARK_BLUE_LEGACY="#005ea5",DARK_GREY="#505a5f",MID_GREY="#b1b4b6",LIGHT_GREY="#f3f2f1",BLUE="#1d70b8",PURPLE="#2e358b",RED="#d4351c",ORANGE="#f47738",YELLOW="#ffdd00",YELLOW_25="#fff2d3",GREEN="#006435",LIGHT_BLUE="#2b8cc4",LIGHT_BLUE_50="#96c6e2",LIGHT_BLUE_25="#d5e8f3",BLACK="#0b0c0c",GREY_1=DARK_GREY,GREY_2="#bfc1c3",GREY_3=LIGHT_GREY,GREY_4="#f8f8f8",WHITE="#ffffff",LINK_COLOUR=BLUE,LINK_ACTIVE_COLOUR=LIGHT_BLUE,LINK_HOVER_COLOUR=LIGHT_BLUE,LINK_VISITED_COLOUR="#4c2c92",BUTTON_COLOUR="#00703c",BUTTON_COLOUR_DARKEN_15="#002413",FOCUS_COLOUR=YELLOW,TEXT_COLOUR=BLACK,SECONDARY_TEXT_COLOUR=DARK_GREY,BORDER_COLOUR=GREY_2,PAGE_COLOUR=WHITE,ERROR_COLOUR=RED,PROPOSITION_BORDER="#2e3133",FOOTER_BACKGROUND=LIGHT_GREY,FOOTER_BORDER_TOP="#a1acb2",FOOTER_LINK="#454a4c",FOOTER_LINK_HOVER="#171819",FOOTER_TEXT=FOOTER_LINK,TAG_COLOURS={default:{colour:WHITE,background:BLUE},grey:{colour:"#454a4d",background:"#eff0f1"},green:{colour:"#005a30",background:"#cce2d8"},darkGreen:{colour:WHITE,background:"#10403c"},turquoise:{colour:"#10403c",background:"#bfe3e0"},blue:{colour:"#144e81",background:"#d2e2f1"},purple:{colour:"#3d2375",background:"#dbd5e9"},pink:{colour:"#80224d",background:"#f7d7e6"},red:{colour:"#942514",background:"#f6d7d2"},orange:{colour:"#6e3619",background:"#fcd6c3"},yellow:{colour:"#594d00",background:"#fff7bf"}}},"./src/client/utils/date.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.number.is-nan.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js");var _require=__webpack_require__("./node_modules/date-fns/esm/index.js"),addDaysFns=_require.addDays,addMonthsFns=_require.addMonths,addYearsFns=_require.addYears,differenceInCalendarDays=_require.differenceInCalendarDays,endOfToday=_require.endOfToday,endOfYesterday=_require.endOfYesterday,formatFns=_require.format,formatDistanceToNowStrict=_require.formatDistanceToNowStrict,isAfter=_require.isAfter,isValid=_require.isValid,minutesToHours=_require.minutesToHours,parse=_require.parse,parseISO=_require.parseISO,subDays=_require.subDays,subMonths=_require.subMonths,subYears=_require.subYears,subWeeks=_require.subWeeks,differenceInCalendarMonths=_require.differenceInCalendarMonths,isFuture=_require.isFuture,_require2=__webpack_require__("./src/common/constants.js"),DATE_LONG_FORMAT_1=_require2.DATE_LONG_FORMAT_1,DATE_LONG_FORMAT_2=_require2.DATE_LONG_FORMAT_2,DATE_LONG_FORMAT_3=_require2.DATE_LONG_FORMAT_3,DATE_MEDIUM_FORMAT=_require2.DATE_MEDIUM_FORMAT,DATE_TIME_MEDIUM_FORMAT=_require2.DATE_TIME_MEDIUM_FORMAT,DATE_SHORT_FORMAT=_require2.DATE_SHORT_FORMAT,DATE_SHORT_FORMAT_2=_require2.DATE_SHORT_FORMAT_2,INTERACTION_TIMESTAMP_FORMAT=_require2.INTERACTION_TIMESTAMP_FORMAT,DATE_DAY_MONTH=_require2.DATE_DAY_MONTH;function isDateAfter(date1,date2){return isAfter(date1,date2)}function isDateValid(date){return isValid(parseISO(date))}function isUnparsedDateValid(date){return isValid(date)}function isNormalisedDateValid(year,month,day){var format=arguments.length>3&&void 0!==arguments[3]?arguments[3]:DATE_LONG_FORMAT_3,date=normaliseAndFormatDate(year,month,day);return isValid(parse(date,format,new Date))}function format(dateStr){var dateFormat=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DATE_LONG_FORMAT_2;return isDateValid(dateStr)?formatFns(parseISO(dateStr),dateFormat):null}var padZero=function padZero(value){var parsedValue=parseInt(value,10);return Number.isNaN(parsedValue)?value:parsedValue<10?"0".concat(parsedValue):parsedValue.toString()};function normaliseAndFormatDate(year,month,day){var y=padZero(year),m=padZero(month),yearAndMonth="".concat(padZero(y),"-").concat(padZero(m));return day?"".concat(yearAndMonth,"-").concat(padZero(day)):yearAndMonth}function getDifferenceInDays(dateIn){var today=endOfToday();return differenceInCalendarDays(new Date(dateIn),today)}function convertDateToFieldDateObject(date){var parsedTime=parseISO(date);return isValid(parsedTime)?{day:parsedTime.getDate(),month:parsedTime.getMonth()+1,year:parsedTime.getFullYear()}:{day:"",month:"",year:""}}module.exports={addDays:function addDays(date,daysToAdd){return addDaysFns(date,daysToAdd)},addMonths:function addMonths(date,numberOfMonths){return addMonthsFns(date,numberOfMonths)},addYears:function addYears(date,yearsToAdd){return addYearsFns(date,yearsToAdd)},convertMinutesToHours:function convertMinutesToHours(date){return minutesToHours(date)},createAndFormatDateObject:function createAndFormatDateObject(date){return parse(date,arguments.length>1&&void 0!==arguments[1]?arguments[1]:DATE_LONG_FORMAT_3,new Date)},format,formatMediumDate:function formatMediumDate(dateString){return format(dateString,DATE_MEDIUM_FORMAT)},formatMediumDateTime:function formatMediumDateTime(dateString){return format(dateString,DATE_TIME_MEDIUM_FORMAT)},formatLongDate:function formatLongDate(dateString){return format(dateString,DATE_LONG_FORMAT_1)},formatShortDate:function formatShortDate(dateString){return format(dateString,DATE_SHORT_FORMAT_2)},formatMonthYearDate:function formatMonthYearDate(date){return formatFns(parse(date,DATE_SHORT_FORMAT,new Date),DATE_LONG_FORMAT_3)},formatWithoutParsing:function formatWithoutParsing(date){var dateFormat=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DATE_LONG_FORMAT_2;return isUnparsedDateValid(date)?formatFns(date,dateFormat):null},generateFinancialYearLabel:function generateFinancialYearLabel(yearStart){return"".concat(yearStart,"-").concat((yearStart+1).toString().slice(-2))},getDifferenceInDays,getDifferenceInDaysLabel:function getDifferenceInDaysLabel(dateIn){var difference=getDifferenceInDays(dateIn);return 1===Math.abs(difference)?difference+" day":difference+" days"},getDifferenceInWords:function getDifferenceInWords(date){var suffix=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],formattedDate=formatDistanceToNowStrict(parseISO(date),{addSuffix:suffix});return"1 day ago"==formattedDate?"a day ago":formattedDate},getInteractionTimestamp:function getInteractionTimestamp(_ref2){var offset=_ref2.offset,date=new Date;return offset>0&&subMonths(date,offset),format(date,INTERACTION_TIMESTAMP_FORMAT)},getFinancialYearStart:function getFinancialYearStart(date){return date.getMonth()<3?date.getFullYear()-1:date.getFullYear()},getYesterday:function getYesterday(){return endOfYesterday()},isDateAfter,isDateValid,isNormalisedDateValid,isShortDateValid:function isShortDateValid(year,month){return isNormalisedDateValid(year,month,null,DATE_SHORT_FORMAT)},isUnparsedDateValid,parseDateString:function parseDateString(dateString){if(-1!==dateString.indexOf("/")){var parts=dateString.split("/");return new Date(parts[2],parts[1]-1,parts[0])}var date=new Date(dateString);return"Invalid Date"!==date.toString()?date:null},subtractDays:function subtractDays(date,daysToSubtract){return subDays(date,daysToSubtract)},subtractMonths:function subtractMonths(date,numberOfMonths){return subMonths(date,numberOfMonths)},subtractYears:function subtractYears(date,yearsToSubtract){return subYears(date,yearsToSubtract)},subtractWeeks:function subtractWeeks(date,numberOfweeks){return subWeeks(date,numberOfweeks)},today:function today(){return format(new Date)},transformValueForAPI:function transformValueForAPI(_ref){var year=_ref.year,month=_ref.month,_ref$day=_ref.day,day=void 0===_ref$day?1:_ref$day;return year&&month&&day?normaliseAndFormatDate(year,month,day):null},createDateFromObject:function createDateFromObject(_ref3){var day=_ref3.day,month=_ref3.month,year=_ref3.year,monthIndex=parseInt(month,10)-1;return new Date(year,monthIndex,day)},formatStartAndEndDate:function formatStartAndEndDate(startDate,endDate){var startDateParsed=parseISO(startDate),endDateParsed=parseISO(endDate),startDateFormatted=format(startDate),endDateFormatted=format(endDate);return endDate&&isDateAfter(endDateParsed,startDateParsed)?startDateParsed.toDateString()===endDateParsed.toDateString()?startDateFormatted:0==differenceInCalendarMonths(endDateParsed,startDateParsed)?"".concat(startDateParsed.getDate()," to ").concat(endDateFormatted):startDateParsed.getFullYear()===endDateParsed.getFullYear()?"".concat(format(startDate,DATE_DAY_MONTH)," to ").concat(endDateFormatted):"".concat(startDateFormatted," to ").concat(endDateFormatted):startDateFormatted},convertDateToFieldShortDateObject:function convertDateToFieldShortDateObject(date){var _convertDateToFieldDa=convertDateToFieldDateObject(date);return{month:_convertDateToFieldDa.month,year:_convertDateToFieldDa.year}},isDateInFuture:function isDateInFuture(date){return isFuture(parseISO(date))},parseDateISO:function parseDateISO(date){return parseISO(date)},convertDateToFieldDateObject}},"./src/client/utils/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U7:()=>idNamesToValueLabels,lI:()=>deepKeysToCamelCase});__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.object.from-entries.js"),__webpack_require__("./node_modules/core-js/modules/es.object.entries.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js");var lodash__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__("./node_modules/lodash/lodash.js");__webpack_require__("./node_modules/qs/lib/index.js");function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i{"use strict";__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js"),__webpack_require__("./node_modules/core-js/modules/es.string.starts-with.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.string.includes.js"),__webpack_require__("./node_modules/core-js/modules/es.object.values.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.match.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/react/index.js");var react_router_dom__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__("./node_modules/react-router/esm/react-router.js"),lodash__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__("./node_modules/lodash/lodash.js"),react_redux__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__("./node_modules/react-redux/es/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__("./node_modules/prop-types/index.js"),prop_types__WEBPACK_IMPORTED_MODULE_30___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_30__),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__("./node_modules/react/jsx-runtime.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var _excluded=["type"],_excluded2=["type"],_excluded3=["dispatch"];function _toConsumableArray(arr){return function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}(arr)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var interceptDispatch=function interceptDispatch(dispatch,id){return function(_ref2){var type=_ref2.type,action=_objectWithoutProperties(_ref2,_excluded2);return dispatch(_objectSpread(_objectSpread({},action),{},{type,id}))}},connect=function connect(componentState2props,dispatch2props){for(var _len=arguments.length,rest=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++)rest[_key-2]=arguments[_key];return(0,lodash__WEBPACK_IMPORTED_MODULE_27__.curry)((function(Component,name,idProp){componentState2props=componentState2props||function(x){return x};var Connected=react_redux__WEBPACK_IMPORTED_MODULE_28__.connect.apply(react_redux__WEBPACK_IMPORTED_MODULE_28__,[function(state,props){var _state$name;return componentState2props((null===(_state$name=state[name])||void 0===_state$name?void 0:_state$name[props[idProp]])||{},state,props)},dispatch2props&&function(dispatch,props){for(var _len2=arguments.length,rest=new Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)rest[_key2-2]=arguments[_key2];return dispatch2props.apply(void 0,[interceptDispatch(dispatch,props[idProp]),props].concat(rest))}].concat(rest))((function(_ref3){var dispatch=_ref3.dispatch,props=_objectWithoutProperties(_ref3,_excluded3);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_29__.jsx)(Component,_objectSpread(_objectSpread({},props),{},{dispatch:interceptDispatch(dispatch,props[idProp])}))}));return Connected.propTypes=_defineProperty({},idProp,prop_types__WEBPACK_IMPORTED_MODULE_30___default().string.isRequired),Connected}))};const __WEBPACK_DEFAULT_EXPORT__=function(_ref4){var name=_ref4.name,component=_ref4.component,reducer=_ref4.reducer,actionPattern=_ref4.actionPattern,_ref4$connectArgs=_ref4.connectArgs,connectArgs=void 0===_ref4$connectArgs?[]:_ref4$connectArgs,_ref4$componentStateT=_ref4.componentStateToProps,componentStateToProps=void 0===_ref4$componentStateT?function(x){return x}:_ref4$componentStateT,dispatchToProps=_ref4.dispatchToProps,_ref4$idProp=_ref4.idProp,idProp=void 0===_ref4$idProp?"id":_ref4$idProp;console.assert(component,"component is required"),console.assert(reducer,"reducer is required"),console.assert(name,"name is required"),console.assert(actionPattern,"actionPattern is required");var Connected=connect.apply(void 0,[componentStateToProps,dispatchToProps].concat(_toConsumableArray(connectArgs)))(component)(name,idProp);return Connected.reducerSpread=_defineProperty({},name,function reducerDecorator(reducer,actionPattern){var idProp=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return function(){var _String$Object$Array$,_String$Object$Array$2,state=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},_ref=arguments.length>1?arguments[1]:void 0,type=_ref.type,action=_objectWithoutProperties(_ref,_excluded),id=action[idProp],handleAction=null===(_String$Object$Array$=(_String$Object$Array$2={String:function String(){return type.startsWith(actionPattern)},Object:function(_Object){function Object(){return _Object.apply(this,arguments)}return Object.toString=function(){return _Object.toString()},Object}((function(){return Object.values(actionPattern).includes(type)})),Array:function Array(){return actionPattern.includes(type)},RegExp:function RegExp(){return type.match(actionPattern)}})[Object.prototype.toString.apply(actionPattern).slice(8,-1)])||void 0===_String$Object$Array$?void 0:_String$Object$Array$.call(_String$Object$Array$2);if(handleAction&&id){var nextState=reducer(state[id],_objectSpread({type},action));return(0,lodash__WEBPACK_IMPORTED_MODULE_27__.isEmpty)(nextState)?(0,lodash__WEBPACK_IMPORTED_MODULE_27__.omit)(state,id):_objectSpread(_objectSpread({},state),{},_defineProperty({},id,nextState))}return state}}(reducer,actionPattern,idProp)),Connected.displayName="multiInstance(".concat(name,")"),(0,react_router_dom__WEBPACK_IMPORTED_MODULE_31__.EN)(Connected)}},"./src/client/utils/number-utils.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{AO:()=>parseLocaleNumber,Jw:()=>indexToOrdinal,gH:()=>decimal,mk:()=>currencyGBP});__webpack_require__("./node_modules/core-js/modules/es.regexp.exec.js"),__webpack_require__("./node_modules/core-js/modules/es.string.replace.js"),__webpack_require__("./node_modules/core-js/modules/es.number.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.constructor.js"),__webpack_require__("./node_modules/core-js/modules/es.regexp.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-primitive.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.object.keys.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:{maximumSignificantDigits:21};return number||0===number?new Intl.NumberFormat("en-GB",_objectSpread({style:"currency",currency:"GBP"},options)).format(number):null},indexToOrdinal=function indexToOrdinal(zeroBasedIndex){var naturalIndex=zeroBasedIndex+1,units=naturalIndex%10;return units>3||1===~~(naturalIndex/10)%10?naturalIndex+"th":1===units?naturalIndex+"st":2===units?naturalIndex+"nd":3===units?naturalIndex+"rd":void 0},parseLocaleNumber=function parseLocaleNumber(stringNumber){var locale=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB";if(!stringNumber.length)return stringNumber;var thousandSeparator=Intl.NumberFormat(locale).format(11111).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g,""),decimalSeparator=Intl.NumberFormat(locale).format(1.1).replace(/(?:[0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D58-\u0D5E\u0D66-\u0D78\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDF50-\uDF59\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD839[\uDCF0-\uDCF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9])/g,"");return Number(stringNumber.replace(new RegExp("\\"+thousandSeparator,"g"),"").replace(new RegExp("\\"+decimalSeparator),"."))}},"./src/client/utils/pagination.js":module=>{module.exports={getPageOffset:function getPageOffset(_ref){var limit=_ref.limit,page=_ref.page,_ref$maxItems=_ref.maxItems,maxItems=void 0===_ref$maxItems?1e4:_ref$maxItems;return Math.min(limit*(page-1),maxItems-limit)||0},parsePage:function parsePage(page){var defaultValue=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,pageNumber=parseInt(page,10);return isNaN(pageNumber)?defaultValue:pageNumber}}},"./src/common/constants.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.object.values.js");var OPTIONS_YES_NO=[{label:"Yes",value:"yes"},{label:"No",value:"no"}],EXPORT_INTEREST_STATUS={EXPORTING_TO:"currently_exporting",FUTURE_INTEREST:"future_interest",NOT_INTERESTED:"not_interested"};module.exports={DATE_DAY_LONG_FORMAT:"E, dd MMM yyyy",DATE_DAY_MONTH:"dd MMM",DATE_LONG_FORMAT_1:"d MMMM yyyy",DATE_LONG_FORMAT_2:"dd MMM yyyy",DATE_LONG_FORMAT_3:"yyyy-MM-dd",DATE_MEDIUM_FORMAT:"d MMM yyyy",DATE_TIME_MEDIUM_FORMAT:"d MMM yyyy, h:mmaaa",DATE_SHORT_FORMAT:"yyyy-MM",DATE_SHORT_FORMAT_2:"MMMM yyyy",INTERACTION_TIMESTAMP_FORMAT:"y-MM-d",UNITED_KINGDOM_ID:"80756b9a-5d95-e211-a939-e4115bead28a",UNITED_STATES_ID:"81756b9a-5d95-e211-a939-e4115bead28a",CANADA_ID:"5daf72a6-5d95-e211-a939-e4115bead28a",PRIMARY_LINK_PARAMS:{companies:"?archived[0]=false&sortby=modified_on:desc&page=1",contacts:"?archived[0]=false&sortby=modified_on:desc&page=1",events:"?page=1&sortby=modified_on:desc",interactions:"?page=1&sortby=date:desc",investments:"?page=1&sortby=created_on:desc",omis:"?page=1&sortby=created_on:desc"},INVESTMENT_LINK_PARAM:"?sortby=-created_on&page=1",GENERIC_PHONE_NUMBER_REGEX:/^$|([0-9]|#|\+|\s|\(|\))+$/,OPTIONS_YES_NO,OPTION_YES:"yes",OPTION_NO:"no",FORM_LAYOUT:{THREE_QUARTERS:"three-quarters",ONE_THIRD:"one-third",TWO_THIRDS:"two-thirds",ONE_HALF:"one-half"},METHOD_PATCH:"PATCH",METHOD_POST:"POST",EXPORT_INTEREST_STATUS,EXPORT_INTEREST_STATUS_VALUES:Object.values(EXPORT_INTEREST_STATUS)}},"./src/common/formatAdviser.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.array.map.js"),__webpack_require__("./node_modules/core-js/modules/es.array.filter.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.string.trim.js"),__webpack_require__("./node_modules/core-js/modules/es.array.concat.js");module.exports={parseAdviserData:function parseAdviserData(advisers){return advisers.filter((function(adviser){return adviser.name&&adviser.name.trim().length})).map((function(_ref){var id=_ref.id,name=_ref.name,dit_team=_ref.dit_team;return{label:"".concat(name).concat(dit_team?", "+dit_team.name:""),chipLabel:name,value:id}}))}}},"./src/lib/group-export-countries.js":(module,__unused_webpack_exports,__webpack_require__)=>{__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.array.sort.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js");var EXPORT_INTEREST_STATUS_VALUES=__webpack_require__("./src/common/constants.js").EXPORT_INTEREST_STATUS_VALUES;module.exports=function(countries){var buckets={};return Array.isArray(countries)&&(EXPORT_INTEREST_STATUS_VALUES.forEach((function(status){buckets[status]=[]}),{}),countries.forEach((function(item){var bucket=buckets[item.status];bucket&&bucket.push(item.country)})),EXPORT_INTEREST_STATUS_VALUES.forEach((function(status){buckets[status]=buckets[status].sort((function(a,b){return a.name.localeCompare(b.name)}))}))),buckets}},"./src/lib/urls.js":(module,__unused_webpack_exports,__webpack_require__)=>{function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r1&&void 0!==arguments[1]?arguments[1]:"";return{index:"/interactions"===mountPoint?url(mountPoint,PRIMARY_LINK_PARAMS.interactions,pathPrefix):url(mountPoint,pathPrefix),detail:url(mountPoint,pathPrefix+"/:interactionId"),create:url(mountPoint,pathPrefix+"/create"),createType:url(mountPoint,pathPrefix+"/create/:theme/:kind"),edit:url(mountPoint,pathPrefix+"/:interactionId/edit")}}module.exports={testing:{index:url("/testing")},external:{greatProfile:function greatProfile(id){return"https://www.great.gov.uk/international/trade/suppliers/".concat(id)},companiesHouse:function companiesHouse(companyNumber){return"https://beta.companieshouse.gov.uk/company/".concat(companyNumber)},findExporters:function findExporters(){return"https://data.trade.gov.uk/datasets/4a0da123-a933-4250-90b5-df5cde34930b"},exportWins:function exportWins(){return"https://www.exportwins.service.trade.gov.uk/"},digitalWorkspace:{teams:"https://people.trade.gov.uk/teams/department-for-international-trade",accountManagement:"https://workspace.trade.gov.uk/working-at-dit/policies-and-guidance/strategic-relationship-account-management/",accountManagementStrategyTeam:"https://workspace.trade.gov.uk/working-at-dit/policies-and-guidance/the-account-management-strategy-team"},helpCentre:{community:{roadmap:function roadmap(){return"https://data-services-help.trade.gov.uk/data-hub/updates/roadmap/data-hub-roadmap/ "},feedback:function feedback(){return"https://data-services-help.trade.gov.uk/data-hub/crm-community/feedback-or-propose-changes"},principles:function principles(){return"https://data-services-help.trade.gov.uk/data-hub/crm-community/crm-principles"},training:function training(){return"https://data-services-help.trade.gov.uk/data-hub/crm-community/training"}},accessibilityStatement:function accessibilityStatement(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/data-hub-accessibility-statement/data-hub-accessibility-statement/"},dhHomepage:function dhHomepage(){return"https://data-services-help.trade.gov.uk/data-hub/"},pipeline:function pipeline(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/account-management/my-pipeline/"},policyFeedback:function policyFeedback(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/interactions-and-service-delivery/record-business-intelligence-interaction/"},tradeagreementGuidance:function tradeagreementGuidance(){return"https://data-services-help.trade.gov.uk/data-hub/how-articles/trade-agreement-activity/recording-trade-agreement-activity/"},cookies:function cookies(){return"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/data-hub-cookie-policy/"},privacyNotice:function privacyNotice(){return"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/data-hub-privacy-notice/"},allUpdates:function allUpdates(){return"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/"}},copyright:"https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",referrals:"https://data-services-help.trade.gov.uk/data-hub/updates/announcements/improving-collaboration-internal-referrals/",reminderAndSettings:"https://data-services-help.trade.gov.uk/data-hub/how-articles/reminders-and-email-notifications/",euVIES:"http://ec.europa.eu/taxation_customs/vies/"},dashboard:{index:url("/"),investmentProjects:url("/investment-projects")},oauth:{redirect:url("/oauth"),callback:url("/oauth/callback"),signout:url("/oauth/sign-out")},company:{exportWin:url("/api-proxy/v4/company","/:companyId/export-win")},community:{index:url("/community")},companies:{index:url("/companies",PRIMARY_LINK_PARAMS.companies),create:url("/companies","/create"),createFromDNB:url("/companies/create?duns_number=",":dunsNumber"),export:url("/companies","/export"),detail:url("/companies","/:companyId"),edit:url("/companies","/:companyId/edit"),audit:url("/companies","/:companyId/audit"),lists:{index:url("/companies","/:companyId/lists"),addRemove:url("/companies","/:companyId/lists/add-remove")},orders:url("/companies","/:companyId/orders"),details:url("/companies","/:companyId/details"),archive:url("/companies","/:companyId/archive"),contacts:url("/companies","/:companyId/contacts"),unarchive:url("/companies","/:companyId/unarchive"),businessDetails:url("/companies","/:companyId/business-details"),editOneList:url("/companies","/:companyId/edit-one-list"),editVirtualTeam:url("/companies","/:companyId/edit-one-list?step=oneListAdvisers"),interactions:createInteractionsSubApp("/companies","/:companyId/interactions"),manageCompanyList:url("/companies","/:companyId/manage-company-list"),referrals:{list:url("/my-referrals"),send:url("/companies","/:companyId/referrals/send"),details:url("/companies","/:companyId/referrals/:referralId"),help:url("/companies","/:companyId/referrals/:referralId/help"),interactions:createInteractionsSubApp("/companies","/:companyId/referrals/:referralId/interactions")},activity:{index:url("/companies","/:companyId/activity"),data:url("/companies","/:companyId/activity/data")},editHistory:{index:url("/companies","/:companyId/edit-history"),data:url("/companies","/:companyId/edit-history/data")},dnbHierarchy:{index:url("/companies","/:companyId/dnb-hierarchy"),data:url("/companies","/:companyId/dnb-hierarchy/data"),tree:url("/companies","/:companyId/company-tree"),relatedCompaniesCount:url("/v4/dnb","/:companyId/related-companies/count")},exports:{index:url("/companies","/:companyId/exports"),edit:url("/companies","/:companyId/exports/edit"),editCountries:url("/companies","/:companyId/exports/edit-countries"),history:{index:url("/companies","/:companyId/exports/history"),country:url("/companies","/:companyId/exports/history/:countryId")}},exportWins:{index:url("/exportwins"),confirmed:url("/exportwins/confirmed"),unconfirmed:url("/exportwins/unconfirmed")},overview:{index:url("/companies","/:companyId/overview")},hierarchies:{ghq:{add:url("/companies","/:companyId/hierarchies/ghq/:globalHqId/add"),link:url("/companies","/:companyId/hierarchies/ghq/search"),remove:url("/companies","/:companyId/hierarchies/ghq/remove")},subsidiaries:{search:url("/companies","/:companyId/hierarchies/subsidiaries/search"),add:url("/companies","/:companyId/hierarchies/subsidiaries/:subsidiaryCompanyId/add")}},investments:{companyInvestment:url("/companies","/:companyId/investments"),companyInvestmentProjects:url("/companies","/:companyId/investments/projects"),companyInvestmentProjectsWithSearch:url("/companies","/:companyId/investments/projects?page=1&sortby=created_on%3Adesc"),largeCapitalProfile:url("/companies","/:companyId/investments/large-capital-profile")},match:{index:url("/companies","/:companyId/match"),confirmation:url("/companies","/:companyId/match/:dunsNumber"),link:url("/companies","/:companyId/match/link"),merge:url("/companies","/:companyId/match/merge"),cannotFind:url("/companies","/:companyId/match/cannot-find")},subsidiaries:{index:url("/companies","/:companyId/subsidiaries"),link:url("/companies","/:companyId/subsidiaries/link")},accountManagement:{index:url("/companies","/:companyId/account-management"),strategy:{create:url("/companies","/:companyId/account-management/strategy/create"),edit:url("/companies","/:companyId/account-management/strategy/edit")},objectives:{create:url("/companies","/:companyId/account-management/objective/create"),edit:url("/companies","/:companyId/account-management/objective/:objectiveId/edit"),archived:url("/companies","/:companyId/account-management/objective/archived"),archive:url("/companies","/:companyId/account-management/objective/:objectiveId/archive")},advisers:{assign:url("/companies","/:companyId/account-management/advisers/assign"),remove:url("/companies","/:companyId/account-management/advisers/remove")}}},companyLists:{index:url("/company-lists"),delete:url("/company-lists","/:listId/delete"),rename:url("/company-lists","/:listId/rename")},contacts:{activity:{data:url("/contacts","/:contactId/activity/data")},index:url("/contacts",PRIMARY_LINK_PARAMS.contacts),export:url("/contacts","/export"),audit:url("/contacts","/:contactId/audit"),contact:url("/contacts","/:contactId"),create:url("/contacts/create?company=",":companyId"),contactActivities:url("/contacts","/:contactId/interactions"),details:url("/contacts","/:contactId/details"),edit:url("/contacts","/:contactId/edit"),interactions:createInteractionsSubApp("/contacts","/:contactId/interactions"),archive:url("/contacts","/:contactId/archive"),unarchive:url("/contacts","/:contactId/unarchive")},events:{activity:{data:url("/events","/activity/data")},index:url("/events",PRIMARY_LINK_PARAMS.events),create:url("/events/create"),details:url("/events","/:eventId/details"),edit:url("/events","/:eventId/edit"),attendees:url("/events","/:eventId/attendees"),find:url("/events","/:eventId/attendees/find-new"),addAttendee:url("/events","/:eventId/attendees/create/:contactId"),aventri:{details:url("/events","/aventri/:aventriEventId/details"),detailsData:url("/events","/aventri/:aventriEventId/details/data"),registrationStatus:url("/events","/aventri/:aventriEventId/registration/:status"),registrationStatusData:url("/events","/aventri/:aventriEventId/registration/attendees/data")}},search:{index:url("/search"),type:url("/search","/:searchPath?")},interactions:_objectSpread(_objectSpread({},createInteractionsSubApp("/interactions")),{},{activeEvents:url("/activeEvents"),activeEventsData:url("/interactions","/activeEvents"),export:url("/interactions","/export"),exportSupportService:{details:url("/interactions","/ess/:essInteractionId/details"),detailsData:url("/interactions","/ess/:essInteractionId/details/data")}}),investments:{index:url("/investments",PRIMARY_LINK_PARAMS.investments),projects:{index:url("/investments","/projects"),export:url("/investments","/projects","/export"),details:url("/investments","/projects/:investmentId/details"),editDetails:url("/investments","/projects/:investmentId/edit-details"),editRequirements:url("/investments","/projects/:investmentId/edit-requirements"),editTeamMembers:url("/investments","/projects/:investmentId/edit-team-members"),editValue:url("/investments","/projects/:investmentId/edit-value"),propositions:url("/investments","/projects/:investmentId/propositions",INVESTMENT_LINK_PARAM),proposition:{details:url("/investments","/projects/:investmentId/propositions/:propositionId"),abandon:url("/investments","/projects/:investmentId/propositions/:propositionId/abandon"),document:url("/investments","/projects/:investmentId/propositions/:propositionId/document"),complete:url("/investments","/projects/:investmentId/propositions/:propositionId/complete"),create:url("/investments","/projects/:investmentId/propositions/create/proposition")},team:url("/investments","/projects/:investmentId/team"),clientRelationshipManagement:url("/investments","/projects/:investmentId/edit-client-relationship-management"),interactions:createInteractionsSubApp("/investments/projects","/:investmentId/interactions",INVESTMENT_LINK_PARAM),status:url("/investments","/projects/:projectId/status"),admin:url("/investments","/projects/:projectId/admin"),create:url("/investments","/projects/create/:companyId"),editProjectManagement:url("/investments","/projects/:projectId/edit-project-management"),findAssociatedProject:url("/investments","/projects/:projectId/find-associated"),editAssociatedProject:url("/investments","/projects/:projectId/edit-associated/:associatedProjectId"),evidence:{index:url("/investments","/projects/:projectId/evidence"),add:url("/investments","/projects/:projectId/evidence/add-new"),delete:url("/investments","/projects/:projectId/evidence/:evidenceId/delete")},recipientCompany:url("/investments","/projects/:projectId/find-ukcompany"),editRecipientCompany:url("/investments","/projects/:projectId/edit-ukcompany/:companyId"),removeRecipientCompany:url("/investments","/projects/:projectId/remove-ukcompany"),removeAssociatedProject:url("/investments","/projects/:projectId/remove-associated"),evaluation:url("/investments","/projects/:projectId/evaluation"),tasks:{create:url("/investments","/projects/:projectId/tasks/create"),index:url("/investments","/projects/:projectId/tasks","?sortby=-task__created_on"),edit:url("/investments","/projects/:projectId/tasks/:taskId/edit")}},profiles:{index:url("/investments","/profiles"),data:url("/investments","/profiles/data")},opportunities:{index:url("/investments","/opportunities"),opportunity:url("/investments","/opportunities/:opportunityId"),details:url("/investments","/opportunities/:opportunityId/details"),interactions:url("/investments","/opportunities/:opportunityId/interactions"),status:url("/investments","/opportunities/:opportunityId/status"),create:url("/investments","/opportunities/create")},editHistory:{index:url("/investments/projects","/:investmentId/edit-history"),data:url("/investments/projects","/:investmentId/edit-history/data")}},metadata:{likelihoodToLand:url("/api-proxy/v4/metadata","/likelihood-to-land"),investmentInvestorType:url("/api-proxy/v4/metadata","/investment-investor-type"),investmentInvolvement:url("/api-proxy/v4/metadata","/investment-involvement"),investmentSpecificProgramme:url("/api-proxy/v4/metadata","/investment-specific-programme"),investmentProjectStage:url("/api-proxy/v4/metadata","/investment-project-stage"),investmentBusinessActivity:url("/api-proxy/v4/metadata","/investment-business-activity"),investmentType:url("/api-proxy/v4/metadata","/investment-type"),investmentStrategicDriver:url("/api-proxy/v4/metadata","/investment-strategic-driver"),orderServiceType:url("/api-proxy/v4/metadata","/order-service-type"),orderCancellationReason:url("/api-proxy/v4/metadata","/order-cancellation-reason"),omisMarket:url("/api-proxy/v4/metadata","/omis-market"),salaryRange:url("/api-proxy/v4/metadata","/salary-range"),fdiValue:url("/api-proxy/v4/metadata","/fdi-value"),fdiType:url("/api-proxy/v4/metadata","/fdi-type"),turnover:url("/api-proxy/v4/metadata","/turnover"),sector:url("/api-proxy/v4/metadata","/sector"),locationType:url("/api-proxy/v4/metadata","/location-type"),eventType:url("/api-proxy/v4/metadata","/event-type"),programme:url("/api-proxy/v4/metadata","/programme"),businessType:url("/api-proxy/v4/metadata","/business-type"),evidenceTag:url("/api-proxy/v4/metadata","/evidence-tag"),employeeRange:url("/api-proxy/v4/metadata","/employee-range"),country:url("/api-proxy/v4/metadata","/country"),ukRegion:url("/api-proxy/v4/metadata","/uk-region"),administrativeArea:url("/api-proxy/v4/metadata","/administrative-area"),referralSourceWebsite:url("/api-proxy/v4/metadata","/referral-source-website"),referralSourceMarketing:url("/api-proxy/v4/metadata","/referral-source-marketing"),referralSourceActivity:url("/api-proxy/v4/metadata","/referral-source-activity"),headquarterType:url("/api-proxy/v4/metadata","/headquarter-type"),service:url("/api-proxy/v4/metadata","/service"),communicationChannel:url("/api-proxy/v4/metadata","/communication-channel"),team:url("/api-proxy/v4/metadata","/team"),policyArea:url("/api-proxy/v4/metadata","/policy-area"),policyIssueType:url("/api-proxy/v4/metadata","/policy-issue-type"),serviceDeliveryStatus:url("/api-proxy/v4/metadata","/service-delivery-status"),capitalInvestmentInvestorType:url("/api-proxy/v4/metadata/capital-investment","/investor-type"),capitalInvestmentRequiredChecksConducted:url("/api-proxy/v4/metadata/capital-investment","/required-checks-conducted"),capitalInvestmentDealTicketSize:url("/api-proxy/v4/metadata/capital-investment","/deal-ticket-size"),capitalInvestmentLargeCapitalInvestment:url("/api-proxy/v4/metadata/capital-investment","/large-capital-investment"),capitalInvestmentReturnRate:url("/api-proxy/v4/metadata/capital-investment","/return-rate"),capitalInvestmentTimeHorizon:url("/api-proxy/v4/metadata/capital-investment","/time-horizon"),capitalInvestmentRestriction:url("/api-proxy/v4/metadata/capital-investment","/restriction"),capitalInvestmentConstructionRisk:url("/api-proxy/v4/metadata/capital-investment","/construction-risk"),capitalInvestmentEquityPercentage:url("/api-proxy/v4/metadata/capital-investment","/equity-percentage"),capitalInvestmentDesiredDealRole:url("/api-proxy/v4/metadata/capital-investment","/desired-deal-role"),capitalInvestmentAssetClassInterest:url("/api-proxy/v4/metadata/capital-investment","/asset-class-interest"),oneListTier:url("/api-proxy/v4/metadata","/one-list-tier"),tradeAgreement:url("/api-proxy/v4/metadata","/trade-agreement")},omis:{index:url("/omis",PRIMARY_LINK_PARAMS.omis),export:url("/omis","/export"),create:url("/omis/create?company=",":companyId"),reconciliation:url("/omis/reconciliation"),order:url("/omis","/:orderId"),paymentReconciliation:url("/omis","/:orderId","/edit/payment-reconciliation"),paymentReceipt:url("/omis","/:orderId/payment-receipt"),workOrder:url("/omis","/:orderId/work-order"),quote:url("/omis","/:orderId/quote"),edit:{quote:url("/omis","/:orderId/edit/quote-details"),assignees:url("/omis","/:orderId/edit/assignees"),subscribers:url("/omis","/:orderId/edit/subscribers"),internalInfo:url("/omis","/:orderId/edit/internal-details"),invoiceDetails:url("/omis","/:orderId/edit/invoice-details"),billingAddress:url("/omis","/:orderId/edit/billing-address"),vatStatus:url("/omis","/:orderId/edit/vat-status")},cancel:url("/omis","/:orderId/edit/cancel-order")},support:url("/support"),reminders:{index:url("/reminders"),investments:{estimatedLandDate:url("/reminders/investments-estimated-land-dates"),noRecentInteraction:url("/reminders/investments-no-recent-interactions"),outstandingPropositions:url("/reminders/investments-outstanding-propositions")},exports:{noRecentInteractions:url("/reminders/companies-no-recent-interactions"),newInteractions:url("/reminders/companies-new-interactions")},myTasks:{dueDateApproaching:url("/reminders/my-tasks-due-date-approaching")},settings:{index:url("/reminders/settings"),investments:{estimatedLandDate:url("/reminders/settings/investments-estimated-land-dates"),noRecentInteraction:url("/reminders/settings/investments-no-recent-interactions")},exports:{noRecentInteraction:url("/reminders/settings/companies-no-recent-interactions"),newInteraction:url("/reminders/settings/companies-new-interactions")}}},exportPipeline:{index:url("/export"),create:url("/export/create?companyId=",":companyId"),details:url("/export","/:exportId/details"),edit:url("/export","/:exportId/edit"),delete:url("/export","/:exportId/delete")},tasks:{details:url("/tasks","/:taskId")}}},"./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./Form/elements/__stories__/FieldAddAnother.stories":["./src/client/components/Form/elements/__stories__/FieldAddAnother.stories.jsx",1893],"./Form/elements/__stories__/FieldAddAnother.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldAddAnother.stories.jsx",1893],"./Form/elements/__stories__/FieldCheckboxes.stories":["./src/client/components/Form/elements/__stories__/FieldCheckboxes.stories.jsx",1716],"./Form/elements/__stories__/FieldCheckboxes.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldCheckboxes.stories.jsx",1716],"./Form/elements/__stories__/FieldCurrency.stories":["./src/client/components/Form/elements/__stories__/FieldCurrency.stories.jsx",5274],"./Form/elements/__stories__/FieldCurrency.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldCurrency.stories.jsx",5274],"./Form/elements/__stories__/FieldDate.stories":["./src/client/components/Form/elements/__stories__/FieldDate.stories.jsx",7020],"./Form/elements/__stories__/FieldDate.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldDate.stories.jsx",7020],"./Form/elements/__stories__/FieldHelp.stories":["./src/client/components/Form/elements/__stories__/FieldHelp.stories.jsx",4745],"./Form/elements/__stories__/FieldHelp.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldHelp.stories.jsx",4745],"./Form/elements/__stories__/FieldInput.stories":["./src/client/components/Form/elements/__stories__/FieldInput.stories.jsx",8277],"./Form/elements/__stories__/FieldInput.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldInput.stories.jsx",8277],"./Form/elements/__stories__/FieldSelect.stories":["./src/client/components/Form/elements/__stories__/FieldSelect.stories.jsx",60],"./Form/elements/__stories__/FieldSelect.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldSelect.stories.jsx",60],"./Form/elements/__stories__/FieldTypeahead.stories":["./src/client/components/Form/elements/__stories__/FieldTypeahead.stories.jsx",2450],"./Form/elements/__stories__/FieldTypeahead.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldTypeahead.stories.jsx",2450],"./Form/elements/__stories__/FieldWrapper.stories":["./src/client/components/Form/elements/__stories__/FieldWrapper.stories.jsx",185],"./Form/elements/__stories__/FieldWrapper.stories.jsx":["./src/client/components/Form/elements/__stories__/FieldWrapper.stories.jsx",185]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}));var ids=map[req],id=ids[0];return __webpack_require__.e(ids[1]).then((()=>__webpack_require__(id)))}webpackAsyncContext.keys=()=>Object.keys(map),webpackAsyncContext.id="./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$",module.exports=webpackAsyncContext},"./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./ArchivePanel/__stories__/ArchivePanel.stories":["./src/client/components/ArchivePanel/__stories__/ArchivePanel.stories.jsx",6344],"./ArchivePanel/__stories__/ArchivePanel.stories.jsx":["./src/client/components/ArchivePanel/__stories__/ArchivePanel.stories.jsx",6344],"./Badge/__stories__/Badge.stories":["./src/client/components/Badge/__stories__/Badge.stories.jsx",4521],"./Badge/__stories__/Badge.stories.jsx":["./src/client/components/Badge/__stories__/Badge.stories.jsx",4521],"./ButtonLink/__stories__/ButtonLink.stories":["./src/client/components/ButtonLink/__stories__/ButtonLink.stories.jsx",5560],"./ButtonLink/__stories__/ButtonLink.stories.jsx":["./src/client/components/ButtonLink/__stories__/ButtonLink.stories.jsx",5560],"./CheckboxGroupField/__stories__/CheckboxGroupField.stories":["./src/client/components/CheckboxGroupField/__stories__/CheckboxGroupField.stories.jsx",8727],"./CheckboxGroupField/__stories__/CheckboxGroupField.stories.jsx":["./src/client/components/CheckboxGroupField/__stories__/CheckboxGroupField.stories.jsx",8727],"./Chip/__stories__/Chip.stories":["./src/client/components/Chip/__stories__/Chip.stories.jsx",2384],"./Chip/__stories__/Chip.stories.jsx":["./src/client/components/Chip/__stories__/Chip.stories.jsx",2384],"./CollectionList/__stories__/CollectionHeader.stories":["./src/client/components/CollectionList/__stories__/CollectionHeader.stories.jsx",9963],"./CollectionList/__stories__/CollectionHeader.stories.jsx":["./src/client/components/CollectionList/__stories__/CollectionHeader.stories.jsx",9963],"./CollectionList/__stories__/CollectionItem.stories":["./src/client/components/CollectionList/__stories__/CollectionItem.stories.jsx",456],"./CollectionList/__stories__/CollectionItem.stories.jsx":["./src/client/components/CollectionList/__stories__/CollectionItem.stories.jsx",456],"./CollectionList/__stories__/CollectionList.stories":["./src/client/components/CollectionList/__stories__/CollectionList.stories.jsx",534],"./CollectionList/__stories__/CollectionList.stories.jsx":["./src/client/components/CollectionList/__stories__/CollectionList.stories.jsx",534],"./ContactInformation/__stories__/ContactInformation.stories":["./src/client/components/ContactInformation/__stories__/ContactInformation.stories.jsx",1335],"./ContactInformation/__stories__/ContactInformation.stories.jsx":["./src/client/components/ContactInformation/__stories__/ContactInformation.stories.jsx",1335],"./DataHubHeader/__stories__/DataHubHeader.stories":["./src/client/components/DataHubHeader/__stories__/DataHubHeader.stories.jsx",7311],"./DataHubHeader/__stories__/DataHubHeader.stories.jsx":["./src/client/components/DataHubHeader/__stories__/DataHubHeader.stories.jsx",7311],"./DateField/__stories__/DateField.stories":["./src/client/components/DateField/__stories__/DateField.stories.jsx",9439],"./DateField/__stories__/DateField.stories.jsx":["./src/client/components/DateField/__stories__/DateField.stories.jsx",9439],"./DownloadDataHeader/__stories__/DownloadDataHeader.stories":["./src/client/components/DownloadDataHeader/__stories__/DownloadDataHeader.stories.jsx",2614],"./DownloadDataHeader/__stories__/DownloadDataHeader.stories.jsx":["./src/client/components/DownloadDataHeader/__stories__/DownloadDataHeader.stories.jsx",2614],"./DropdownMenu/__stories__/DropdownMenu.stories":["./src/client/components/DropdownMenu/__stories__/DropdownMenu.stories.jsx",5151],"./DropdownMenu/__stories__/DropdownMenu.stories.jsx":["./src/client/components/DropdownMenu/__stories__/DropdownMenu.stories.jsx",5151],"./EntityList/__stories__/EntityList.stories":["./src/client/components/EntityList/__stories__/EntityList.stories.jsx",5689],"./EntityList/__stories__/EntityList.stories.jsx":["./src/client/components/EntityList/__stories__/EntityList.stories.jsx",5689],"./ErrorSummary/__stories__/ErrorSummary.stories":["./src/client/components/ErrorSummary/__stories__/ErrorSummary.stories.jsx",4864],"./ErrorSummary/__stories__/ErrorSummary.stories.jsx":["./src/client/components/ErrorSummary/__stories__/ErrorSummary.stories.jsx",4864],"./Footer/__stories__/Footer.stories":["./src/client/components/Footer/__stories__/Footer.stories.jsx",8520],"./Footer/__stories__/Footer.stories.jsx":["./src/client/components/Footer/__stories__/Footer.stories.jsx",8520],"./Form/__stories__/Form.stories":["./src/client/components/Form/__stories__/Form.stories.jsx",7509],"./Form/__stories__/Form.stories.jsx":["./src/client/components/Form/__stories__/Form.stories.jsx",7509],"./InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories":["./src/client/components/InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories.jsx",3564],"./InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories.jsx":["./src/client/components/InvestmentProjectLocalHeader/__stories__/InvestmentProjectLocalHeader.stories.jsx",3564],"./InvestmentReminders/__stories__/InvestmentReminders.stories":["./src/client/components/InvestmentReminders/__stories__/InvestmentReminders.stories.jsx",9366],"./InvestmentReminders/__stories__/InvestmentReminders.stories.jsx":["./src/client/components/InvestmentReminders/__stories__/InvestmentReminders.stories.jsx",9366],"./LocalHeader/__stories__/FlashMessages.stories":["./src/client/components/LocalHeader/__stories__/FlashMessages.stories.jsx",8417],"./LocalHeader/__stories__/FlashMessages.stories.jsx":["./src/client/components/LocalHeader/__stories__/FlashMessages.stories.jsx",8417],"./LocalHeader/__stories__/LocalHeader.stories":["./src/client/components/LocalHeader/__stories__/LocalHeader.stories.jsx",3790],"./LocalHeader/__stories__/LocalHeader.stories.jsx":["./src/client/components/LocalHeader/__stories__/LocalHeader.stories.jsx",3790],"./LocalHeaderDetails/__stories__/LocalHeaderDetails.stories":["./src/client/components/LocalHeaderDetails/__stories__/LocalHeaderDetails.stories.jsx",4234],"./LocalHeaderDetails/__stories__/LocalHeaderDetails.stories.jsx":["./src/client/components/LocalHeaderDetails/__stories__/LocalHeaderDetails.stories.jsx",4234],"./Main/__stories__/Main.stories":["./src/client/components/Main/__stories__/Main.stories.jsx",4359],"./Main/__stories__/Main.stories.jsx":["./src/client/components/Main/__stories__/Main.stories.jsx",4359],"./Metadata/__stories__/Metadata.stories":["./src/client/components/Metadata/__stories__/Metadata.stories.jsx",929],"./Metadata/__stories__/Metadata.stories.jsx":["./src/client/components/Metadata/__stories__/Metadata.stories.jsx",929],"./NewWindowLink/__stories__/NewWindowLink.stories":["./src/client/components/NewWindowLink/__stories__/NewWindowLink.stories.jsx",6005],"./NewWindowLink/__stories__/NewWindowLink.stories.jsx":["./src/client/components/NewWindowLink/__stories__/NewWindowLink.stories.jsx",6005],"./NotificationBadge/__stories__/NotificationBadge.stories":["./src/client/components/NotificationBadge/__stories__/NotificationBadge.stories.jsx",402],"./NotificationBadge/__stories__/NotificationBadge.stories.jsx":["./src/client/components/NotificationBadge/__stories__/NotificationBadge.stories.jsx",402],"./Pagination/__stories__/Pagination.stories":["./src/client/components/Pagination/__stories__/Pagination.stories.jsx",8723],"./Pagination/__stories__/Pagination.stories.jsx":["./src/client/components/Pagination/__stories__/Pagination.stories.jsx",8723],"./Panel/__stories__/Panel.stories":["./src/client/components/Panel/__stories__/Panel.stories.jsx",182],"./Panel/__stories__/Panel.stories.jsx":["./src/client/components/Panel/__stories__/Panel.stories.jsx",182],"./ReadMore/__stories__/ReadMore.stories":["./src/client/components/ReadMore/__stories__/ReadMore.stories.jsx",4501],"./ReadMore/__stories__/ReadMore.stories.jsx":["./src/client/components/ReadMore/__stories__/ReadMore.stories.jsx",4501],"./Resource/__stories__/Resource.stories":["./src/client/components/Resource/__stories__/Resource.stories.jsx",2798],"./Resource/__stories__/Resource.stories.jsx":["./src/client/components/Resource/__stories__/Resource.stories.jsx",2798],"./RoutedInput/__stories__/RoutedInput.stories":["./src/client/components/RoutedInput/__stories__/RoutedInput.stories.jsx",7809],"./RoutedInput/__stories__/RoutedInput.stories.jsx":["./src/client/components/RoutedInput/__stories__/RoutedInput.stories.jsx",7809],"./RoutedInputField/__stories__/RoutedInputFieldFilter.stories":["./src/client/components/RoutedInputField/__stories__/RoutedInputFieldFilter.stories.jsx",6729],"./RoutedInputField/__stories__/RoutedInputFieldFilter.stories.jsx":["./src/client/components/RoutedInputField/__stories__/RoutedInputFieldFilter.stories.jsx",6729],"./RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories":["./src/client/components/RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories.jsx",4729],"./RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories.jsx":["./src/client/components/RoutedNumericRangeField/__stories__/RoutedNumericRangeFieldFilter.stories.jsx",4729],"./StatusMessage/__stories__/DismissableStatusMessage.stories":["./src/client/components/StatusMessage/__stories__/DismissableStatusMessage.stories.jsx",7317],"./StatusMessage/__stories__/DismissableStatusMessage.stories.jsx":["./src/client/components/StatusMessage/__stories__/DismissableStatusMessage.stories.jsx",7317],"./StatusMessage/__stories__/StatusMessage.stories":["./src/client/components/StatusMessage/__stories__/StatusMessage.stories.jsx",9252],"./StatusMessage/__stories__/StatusMessage.stories.jsx":["./src/client/components/StatusMessage/__stories__/StatusMessage.stories.jsx",9252],"./SummaryList/__stories__/SummaryList.stories":["./src/client/components/SummaryList/__stories__/SummaryList.stories.jsx",5340],"./SummaryList/__stories__/SummaryList.stories.jsx":["./src/client/components/SummaryList/__stories__/SummaryList.stories.jsx",5340],"./SummaryTable/__stories__/SummaryTable.stories":["./src/client/components/SummaryTable/__stories__/SummaryTable.stories.jsx",109],"./SummaryTable/__stories__/SummaryTable.stories.jsx":["./src/client/components/SummaryTable/__stories__/SummaryTable.stories.jsx",109],"./TabNav/__stories__/TabNav.stories":["./src/client/components/TabNav/__stories__/TabNav.stories.jsx",7531],"./TabNav/__stories__/TabNav.stories.jsx":["./src/client/components/TabNav/__stories__/TabNav.stories.jsx",7531],"./Tag/__stories__/Tag.stories":["./src/client/components/Tag/__stories__/Tag.stories.jsx",5633],"./Tag/__stories__/Tag.stories.jsx":["./src/client/components/Tag/__stories__/Tag.stories.jsx",5633],"./Task/__stories__/Task.stories":["./src/client/components/Task/__stories__/Task.stories.jsx",664],"./Task/__stories__/Task.stories.jsx":["./src/client/components/Task/__stories__/Task.stories.jsx",664],"./Timeline/__stories__/Timeline.stories":["./src/client/components/Timeline/__stories__/Timeline.stories.jsx",7469],"./Timeline/__stories__/Timeline.stories.jsx":["./src/client/components/Timeline/__stories__/Timeline.stories.jsx",7469],"./ToggleSection/__stories__/ToggleSection.stories":["./src/client/components/ToggleSection/__stories__/ToggleSection.stories.jsx",944],"./ToggleSection/__stories__/ToggleSection.stories.jsx":["./src/client/components/ToggleSection/__stories__/ToggleSection.stories.jsx",944],"./Typeahead/__stories__/Typeahead.stories":["./src/client/components/Typeahead/__stories__/Typeahead.stories.jsx",3852],"./Typeahead/__stories__/Typeahead.stories.jsx":["./src/client/components/Typeahead/__stories__/Typeahead.stories.jsx",3852]};function webpackAsyncContext(req){if(!__webpack_require__.o(map,req))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}));var ids=map[req],id=ids[0];return __webpack_require__.e(ids[1]).then((()=>__webpack_require__(id)))}webpackAsyncContext.keys=()=>Object.keys(map),webpackAsyncContext.id="./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$",module.exports=webpackAsyncContext},"./storybook-config-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),external_STORYBOOK_MODULE_CHANNELS_=__webpack_require__("@storybook/channels");const importers=[async path=>{if(!/^\.[\\/](?:src\/client\/components\/(?!\.)(?=.)[^/]*?\/__stories__\/(?!\.)(?=.)[^/]*?\.stories\.jsx)$/.exec(path))return;const pathRemainder=path.substring(24);return __webpack_require__("./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$")("./"+pathRemainder)},async path=>{if(!/^\.[\\/](?:src\/client\/components\/(?!\.)(?=.)[^/]*?\/(?!\.)(?=.)[^/]*?\/__stories__\/(?!\.)(?=.)[^/]*?\.stories\.jsx)$/.exec(path))return;const pathRemainder=path.substring(24);return __webpack_require__("./src/client/components lazy recursive ^\\.\\/.*$ include: (?:\\/src\\/client\\/components\\/(?%21\\.)(?=.)[^/]*?\\/(?%21\\.)(?=.)[^/]*?\\/__stories__\\/(?%21\\.)(?=.)[^/]*?\\.stories\\.jsx)$")("./"+pathRemainder)}];const channel=(0,external_STORYBOOK_MODULE_CHANNELS_.createBrowserChannel)({page:"preview"});external_STORYBOOK_MODULE_PREVIEW_API_.addons.setChannel(channel),"DEVELOPMENT"===external_STORYBOOK_MODULE_GLOBAL_.global.CONFIG_TYPE&&(window.__STORYBOOK_SERVER_CHANNEL__=channel);const preview=new external_STORYBOOK_MODULE_PREVIEW_API_.PreviewWeb;window.__STORYBOOK_PREVIEW__=preview,window.__STORYBOOK_STORY_STORE__=preview.storyStore,window.__STORYBOOK_ADDONS_CHANNEL__=channel,window.__STORYBOOK_CLIENT_API__=new external_STORYBOOK_MODULE_PREVIEW_API_.ClientApi({storyStore:preview.storyStore}),preview.initialize({importFn:async function importFn(path){for(let i=0;iimporters[i](path),x());if(moduleExports)return moduleExports}var x},getProjectAnnotations:()=>(0,external_STORYBOOK_MODULE_PREVIEW_API_.composeConfigs)([__webpack_require__("./node_modules/@storybook/react/preview.js"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/docs/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/actions/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/backgrounds/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/measure/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/outline/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-essentials/dist/highlight/preview.mjs"),__webpack_require__("./node_modules/@storybook/addon-a11y/dist/preview.mjs"),__webpack_require__("./.storybook/preview.js")])})},"@storybook/channels":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CHANNELS__},"@storybook/client-logger":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CLIENT_LOGGER__},"@storybook/core-events":module=>{"use strict";module.exports=__STORYBOOK_MODULE_CORE_EVENTS__},"@storybook/global":module=>{"use strict";module.exports=__STORYBOOK_MODULE_GLOBAL__},"@storybook/preview-api":module=>{"use strict";module.exports=__STORYBOOK_MODULE_PREVIEW_API__},"?4f7e":()=>{}},__webpack_require__=>{__webpack_require__.O(0,[8323],(()=>{return moduleId="./storybook-config-entry.js",__webpack_require__(__webpack_require__.s=moduleId);var moduleId}));__webpack_require__.O()}]); \ No newline at end of file diff --git a/main.ed5ebacc.iframe.bundle.js.LICENSE.txt b/main.b83baeb3.iframe.bundle.js.LICENSE.txt similarity index 100% rename from main.ed5ebacc.iframe.bundle.js.LICENSE.txt rename to main.b83baeb3.iframe.bundle.js.LICENSE.txt diff --git a/project.json b/project.json index d38ac27c4bf..ab910736437 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1698408653057,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"9.5.0"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-webpack5","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.5.1","storybookVersionSpecifier":"^7.5.1","language":"javascript","storybookPackages":{"@storybook/addons":{"version":"7.5.1"},"@storybook/react":{"version":"7.5.1"},"@storybook/react-webpack5":{"version":"7.5.1"},"storybook":{"version":"7.5.1"}},"addons":{"@storybook/addon-essentials":{"version":"7.5.1"},"@storybook/addon-a11y":{"version":"7.5.1"}}} +{"generatedAt":1698661746565,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"9.5.0"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-webpack5","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.5.1","storybookVersionSpecifier":"^7.5.1","language":"javascript","storybookPackages":{"@storybook/addons":{"version":"7.5.1"},"@storybook/react":{"version":"7.5.1"},"@storybook/react-webpack5":{"version":"7.5.1"},"storybook":{"version":"7.5.2"}},"addons":{"@storybook/addon-essentials":{"version":"7.5.1"},"@storybook/addon-a11y":{"version":"7.5.1"}}} diff --git a/sb-manager/chunk-WZJAIZ64.js b/sb-manager/chunk-AOJK37XK.js similarity index 99% rename from sb-manager/chunk-WZJAIZ64.js rename to sb-manager/chunk-AOJK37XK.js index 7b4ff5532d3..cc0f0b62d70 100644 --- a/sb-manager/chunk-WZJAIZ64.js +++ b/sb-manager/chunk-AOJK37XK.js @@ -48,7 +48,7 @@ Output: it's possible a CORS error happened. Please check your dev-tools network tab. - `});let versions=ref.versions&&Object.keys(ref.versions).length?ref.versions:loadedData.versions;await api.setRef(id,{id,url:urlParseResult.url,...loadedData,...versions?{versions}:{},type:loadedData.storyIndex?"lazy":"auto-inject"})},getRefs:()=>{let{refs:refs22={}}=store22.getState();return refs22},setRef:(id,{storyIndex,setStoriesData,...rest},ready=!1)=>{if(singleStory)return;let{storyMapper=defaultStoryMapper}=provider.getConfig(),ref=api.getRefs()[id],index2;setStoriesData?index2=transformSetStoriesStoryDataToStoriesHash(map(setStoriesData,ref,{storyMapper}),{provider,docsOptions,filters:{},status:{}}):storyIndex&&(index2=transformStoryIndexToStoriesHash(storyIndex,{provider,docsOptions,filters:{},status:{}})),index2&&(index2=addRefIds(index2,ref)),api.updateRef(id,{index:index2,...rest})},updateRef:(id,data)=>{let{[id]:ref,...updated}=api.getRefs();updated[id]={...ref,...data};let ordered=Object.keys(initialState).reduce((obj,key2)=>(obj[key2]=updated[key2],obj),{});store22.setState({refs:ordered})}},refs2=!singleStory&&scope.REFS||{},initialState=refs2;return runCheck&&Object.entries(refs2).forEach(([id,ref])=>{api.checkRef({...ref,stories:{}})}),{api,state:{refs:initialState}}},getEventMetadata=(context,fullAPI)=>{let{source:source2,refId,type}=context,[sourceType,sourceLocation]=getSourceType(source2,refId),ref=refId&&fullAPI.getRefs()[refId]?fullAPI.getRefs()[refId]:fullAPI.findRef(sourceLocation),meta={source:source2,sourceType,sourceLocation,refId,ref,type};switch(!0){case typeof refId=="string":case sourceType==="local":case sourceType==="external":return meta;default:return logger.warn(`Received a ${type} frame that was not configured as a ref`),null}},{FEATURES,fetch:fetch2}=scope,STORY_INDEX_PATH="./index.json",removedOptions=["enableShortcuts","theme","showRoots"];function removeRemovedOptions(options3){if(!options3||typeof options3=="string")return options3;let result2={...options3};return removedOptions.forEach(option=>{option in result2&&delete result2[option]}),result2}var init7=({fullAPI,store:store22,navigate,provider,storyId:initialStoryId,viewMode:initialViewMode,docsOptions={}})=>{let api={storyId:N,getData:(storyId,refId)=>{let result2=api.resolveStory(storyId,refId);if(result2?.type==="story"||result2?.type==="docs")return result2},isPrepared:(storyId,refId)=>{let data=api.getData(storyId,refId);return data.type==="story"?data.prepared:!0},resolveStory:(storyId,refId)=>{let{refs:refs2,index:index2}=store22.getState();return refId&&!refs2[refId]?null:refId?refs2[refId].index?refs2[refId].index[storyId]:void 0:index2?index2[storyId]:void 0},getCurrentStoryData:()=>{let{storyId,refId}=store22.getState();return api.getData(storyId,refId)},getParameters:(storyIdOrCombo,parameterName)=>{let{storyId,refId}=typeof storyIdOrCombo=="string"?{storyId:storyIdOrCombo,refId:void 0}:storyIdOrCombo,data=api.getData(storyId,refId);if(["story","docs"].includes(data?.type)){let{parameters}=data;if(parameters)return parameterName?parameters[parameterName]:parameters}return null},getCurrentParameter:parameterName=>{let{storyId,refId}=store22.getState();return api.getParameters({storyId,refId},parameterName)||void 0},jumpToComponent:direction=>{let{index:index2,storyId,refs:refs2,refId}=store22.getState();if(!api.getData(storyId,refId))return;let hash=refId?refs2[refId].index||{}:index2,result2=api.findSiblingStoryId(storyId,hash,direction,!0);result2&&api.selectStory(result2,void 0,{ref:refId})},jumpToStory:direction=>{let{index:index2,storyId,refs:refs2,refId}=store22.getState(),story=api.getData(storyId,refId);if(!story)return;let hash=story.refId?refs2[story.refId].index:index2,result2=api.findSiblingStoryId(storyId,hash,direction,!1);result2&&api.selectStory(result2,void 0,{ref:refId})},selectFirstStory:()=>{let{index:index2}=store22.getState(),firstStory=Object.keys(index2).find(id=>index2[id].type==="story");if(firstStory){api.selectStory(firstStory);return}navigate("/")},selectStory:(titleOrId=void 0,name2=void 0,options3={})=>{let{ref}=options3,{storyId,index:index2,refs:refs2}=store22.getState(),hash=ref?refs2[ref].index:index2,kindSlug=storyId?.split("--",2)[0];if(name2)if(titleOrId){let id=ref?`${ref}_${N(titleOrId,name2)}`:N(titleOrId,name2);if(hash[id])api.selectStory(id,void 0,options3);else{let entry=hash[L(titleOrId)];if(entry?.type==="component"){let foundId=entry.children.find(childId=>hash[childId].name===name2);foundId&&api.selectStory(foundId,void 0,options3)}}}else{let id=N(kindSlug,name2);api.selectStory(id,void 0,options3)}else{let entry=titleOrId?hash[titleOrId]||hash[L(titleOrId)]:hash[kindSlug];if(!entry)throw new Error(`Unknown id or title: '${titleOrId}'`);let leafEntry=api.findLeafEntry(hash,entry.id),fullId=leafEntry.refId?`${leafEntry.refId}_${leafEntry.id}`:leafEntry.id;navigate(`/${leafEntry.type}/${fullId}`)}},findLeafEntry(index2,storyId){let entry=index2[storyId];if(entry.type==="docs"||entry.type==="story")return entry;let childStoryId=entry.children[0];return api.findLeafEntry(index2,childStoryId)},findLeafStoryId(index2,storyId){return api.findLeafEntry(index2,storyId)?.id},findSiblingStoryId(storyId,index2,direction,toSiblingGroup){if(toSiblingGroup){let lookupList2=getComponentLookupList(index2),position2=lookupList2.findIndex(i3=>i3.includes(storyId));return position2===lookupList2.length-1&&direction>0||position2===0&&direction<0?void 0:lookupList2[position2+direction]?lookupList2[position2+direction][0]:void 0}let lookupList=getStoriesLookupList(index2),position=lookupList.indexOf(storyId);if(!(position===lookupList.length-1&&direction>0)&&!(position===0&&direction<0))return lookupList[position+direction]},updateStoryArgs:(story,updatedArgs)=>{let{id:storyId,refId}=story;provider.channel.emit(UPDATE_STORY_ARGS,{storyId,updatedArgs,options:{target:refId}})},resetStoryArgs:(story,argNames)=>{let{id:storyId,refId}=story;provider.channel.emit(RESET_STORY_ARGS,{storyId,argNames,options:{target:refId}})},fetchIndex:async()=>{try{let result2=await fetch2(STORY_INDEX_PATH);if(result2.status!==200)throw new Error(await result2.text());let storyIndex=await result2.json();if(storyIndex.v<3){logger.warn(`Skipping story index with version v${storyIndex.v}, awaiting SET_STORIES.`);return}await api.setIndex(storyIndex)}catch(err){await store22.setState({indexError:err})}},setIndex:async input=>{let{index:oldHash,status,filters}=store22.getState(),newHash=transformStoryIndexToStoriesHash(input,{provider,docsOptions,status,filters}),output=addPreparedStories(newHash,oldHash);await store22.setState({internal_index:input,index:output,indexError:void 0})},updateStory:async(storyId,update2,ref)=>{if(ref){let{id:refId,index:index2}=ref;index2[storyId]={...index2[storyId],...update2},await fullAPI.updateRef(refId,{index:index2})}else{let{index:index2}=store22.getState();index2[storyId]={...index2[storyId],...update2},await store22.setState({index:index2})}},updateDocs:async(docsId,update2,ref)=>{if(ref){let{id:refId,index:index2}=ref;index2[docsId]={...index2[docsId],...update2},await fullAPI.updateRef(refId,{index:index2})}else{let{index:index2}=store22.getState();index2[docsId]={...index2[docsId],...update2},await store22.setState({index:index2})}},setPreviewInitialized:async ref=>{ref?fullAPI.updateRef(ref.id,{previewInitialized:!0}):store22.setState({previewInitialized:!0})},experimental_updateStatus:async(id,input)=>{let{status,internal_index:index2}=store22.getState(),newStatus={...status},update2=typeof input=="function"?input(status):input;Object.keys(update2).length!==0&&(Object.entries(update2).forEach(([storyId,value2])=>{newStatus[storyId]={...newStatus[storyId]||{}},value2===null?delete newStatus[storyId][id]:newStatus[storyId][id]=value2,Object.keys(newStatus[storyId]).length===0&&delete newStatus[storyId]}),await store22.setState({status:newStatus},{persistence:"session"}),await api.setIndex(index2))},experimental_setFilter:async(id,filterFunction)=>{let{internal_index:index2}=store22.getState();await store22.setState({filters:{...store22.getState().filters,[id]:filterFunction}}),await api.setIndex(index2)}};provider.channel.on(STORY_SPECIFIED,function({storyId,viewMode}){let{sourceType}=getEventMetadata(this,fullAPI);if(sourceType==="local"){let state=store22.getState(),isCanvasRoute=state.path==="/"||state.viewMode==="story"||state.viewMode==="docs",stateHasSelection=state.viewMode&&state.storyId,stateSelectionDifferent=state.viewMode!==viewMode||state.storyId!==storyId,{type}=state.index[state.storyId]||{};isCanvasRoute&&(stateHasSelection&&stateSelectionDifferent&&!(type==="root"||type==="component"||type==="group")?provider.channel.emit(SET_CURRENT_STORY,{storyId:state.storyId,viewMode:state.viewMode}):stateSelectionDifferent&&navigate(`/${viewMode}/${storyId}`))}}),provider.channel.on(CURRENT_STORY_WAS_SET,function(){let{ref}=getEventMetadata(this,fullAPI);api.setPreviewInitialized(ref)}),provider.channel.on(STORY_CHANGED,function(){let{sourceType}=getEventMetadata(this,fullAPI);if(sourceType==="local"){let options3=api.getCurrentParameter("options");options3&&fullAPI.setOptions(removeRemovedOptions(options3))}}),provider.channel.on(STORY_PREPARED,function({id,...update2}){let{ref,sourceType}=getEventMetadata(this,fullAPI);if(api.updateStory(id,{...update2,prepared:!0},ref),!ref&&!store22.getState().hasCalledSetOptions){let{options:options3}=update2.parameters;fullAPI.setOptions(removeRemovedOptions(options3)),store22.setState({hasCalledSetOptions:!0})}if(sourceType==="local"){let{storyId,index:index2,refId}=store22.getState(),toBePreloaded=Array.from(new Set([api.findSiblingStoryId(storyId,index2,1,!0),api.findSiblingStoryId(storyId,index2,-1,!0)])).filter(Boolean);provider.channel.emit(PRELOAD_ENTRIES,{ids:toBePreloaded,options:{target:refId}})}}),provider.channel.on(DOCS_PREPARED,function({id,...update2}){let{ref}=getEventMetadata(this,fullAPI);api.updateStory(id,{...update2,prepared:!0},ref)}),provider.channel.on(SET_INDEX,function(index2){let{ref}=getEventMetadata(this,fullAPI);if(ref)fullAPI.setRef(ref.id,{...ref,storyIndex:index2},!0);else{api.setIndex(index2);let options3=api.getCurrentParameter("options");fullAPI.setOptions(removeRemovedOptions(options3))}}),provider.channel.on(SET_STORIES,function(data){let{ref}=getEventMetadata(this,fullAPI),setStoriesData=data.v?denormalizeStoryParameters(data):data.stories;if(ref)fullAPI.setRef(ref.id,{...ref,setStoriesData},!0);else throw new Error("Cannot call SET_STORIES for local frame")}),provider.channel.on(SELECT_STORY,function({kind,title=kind,story,name:name2=story,storyId,...rest}){let{ref}=getEventMetadata(this,fullAPI);ref?fullAPI.selectStory(storyId||title,name2,{...rest,ref:ref.id}):fullAPI.selectStory(storyId||title,name2,rest)}),provider.channel.on(STORY_ARGS_UPDATED,function({storyId,args:args2}){let{ref}=getEventMetadata(this,fullAPI);api.updateStory(storyId,{args:args2},ref)}),provider.channel.on(CONFIG_ERROR,function(err){let{ref}=getEventMetadata(this,fullAPI);api.setPreviewInitialized(ref)}),provider.channel.on(STORY_MISSING,function(err){let{ref}=getEventMetadata(this,fullAPI);api.setPreviewInitialized(ref)}),provider.channel.on(SET_CONFIG,()=>{let config2=provider.getConfig();config2?.sidebar?.filters&&store22.setState({filters:{...store22.getState().filters,...config2?.sidebar?.filters}})});let config=provider.getConfig();return{api,state:{storyId:initialStoryId,viewMode:initialViewMode,hasCalledSetOptions:!1,previewInitialized:!1,status:{},filters:config?.sidebar?.filters||{}},init:async()=>{FEATURES?.storyStoreV7&&(provider.channel.on(STORY_INDEX_INVALIDATED,()=>api.fetchIndex()),await api.fetchIndex())}}},layout_exports={};__export2(layout_exports,{ActiveTabs:()=>ActiveTabs,focusableUIElements:()=>focusableUIElements,init:()=>init8});var{document:document3}=scope,ActiveTabs={SIDEBAR:"sidebar",CANVAS:"canvas",ADDONS:"addons"},defaultState={ui:{enableShortcuts:!0},layout:{initialActive:ActiveTabs.CANVAS,showToolbar:!0,isFullscreen:!1,showPanel:!0,showNav:!0,panelPosition:"bottom",showTabs:!0},selectedPanel:void 0,theme:create()},focusableUIElements={storySearchField:"storybook-explorer-searchfield",storyListMenu:"storybook-explorer-menu",storyPanelRoot:"storybook-panel-root"},init8=({store:store22,provider,singleStory,fullAPI})=>{let api={toggleFullscreen(toggled){return store22.setState(state=>{let{showNav}=state.layout,value2=typeof toggled=="boolean"?toggled:!state.layout.isFullscreen,shouldShowNav=showNav===!1&&value2===!1;return{layout:{...state.layout,isFullscreen:value2,showNav:!singleStory&&shouldShowNav?!0:showNav}}},{persistence:"session"})},togglePanel(toggled){return store22.setState(state=>{let{showNav,isFullscreen}=state.layout,value2=typeof toggled<"u"?toggled:!state.layout.showPanel,shouldToggleFullScreen=showNav===!1&&value2===!1;return{layout:{...state.layout,showPanel:value2,isFullscreen:shouldToggleFullScreen?!0:isFullscreen}}},{persistence:"session"})},togglePanelPosition(position){return typeof position<"u"?store22.setState(state=>({layout:{...state.layout,panelPosition:position}}),{persistence:"permanent"}):store22.setState(state=>({layout:{...state.layout,panelPosition:state.layout.panelPosition==="right"?"bottom":"right"}}),{persistence:"permanent"})},toggleNav(toggled){return store22.setState(state=>{if(singleStory)return{layout:state.layout};let{showPanel,isFullscreen}=state.layout,showNav=typeof toggled<"u"?toggled:!state.layout.showNav,shouldToggleFullScreen=showPanel===!1&&showNav===!1;return{layout:{...state.layout,showNav,isFullscreen:shouldToggleFullScreen?!0:!showNav&&isFullscreen}}},{persistence:"session"})},toggleToolbar(toggled){return store22.setState(state=>{let value2=typeof toggled<"u"?toggled:!state.layout.showToolbar;return{layout:{...state.layout,showToolbar:value2}}},{persistence:"session"})},resetLayout(){return store22.setState(state=>({layout:{...state.layout,showNav:!1,showPanel:!1,isFullscreen:!1}}),{persistence:"session"})},focusOnUIElement(elementId,select){if(!elementId)return;let element=document3.getElementById(elementId);element&&(element.focus(),select&&element.select())},getInitialOptions(){let{theme,selectedPanel,...options3}=provider.getConfig();return{...defaultState,layout:{...defaultState.layout,...(0,import_pick.default)(options3,Object.keys(defaultState.layout)),...singleStory&&{showNav:!1}},ui:{...defaultState.ui,...(0,import_pick.default)(options3,Object.keys(defaultState.ui))},selectedPanel:selectedPanel||defaultState.selectedPanel,theme:theme||defaultState.theme}},setOptions:options3=>{let{layout,ui,selectedPanel,theme}=store22.getState();if(options3){let updatedLayout={...layout,...options3.layout,...(0,import_pick.default)(options3,Object.keys(layout)),...singleStory&&{showNav:!1}},updatedUi={...ui,...options3.ui,...(0,import_pick.default)(options3,Object.keys(ui))},updatedTheme={...theme,...options3.theme},modification={};dequal2(ui,updatedUi)||(modification.ui=updatedUi),dequal2(layout,updatedLayout)||(modification.layout=updatedLayout),options3.selectedPanel&&!dequal2(selectedPanel,options3.selectedPanel)&&(modification.selectedPanel=options3.selectedPanel),Object.keys(modification).length&&store22.setState(modification,{persistence:"permanent"}),dequal2(theme,updatedTheme)||store22.setState({theme:updatedTheme})}}},persisted=(0,import_pick.default)(store22.getState(),"layout","selectedPanel");return{api,state:merge_default(api.getInitialOptions(),persisted),init:()=>{api.setOptions(merge_default(api.getInitialOptions(),persisted)),provider.channel.on(SET_CONFIG,()=>{api.setOptions(merge_default(api.getInitialOptions(),persisted))})}}},shortcuts_exports={};__export2(shortcuts_exports,{controlOrMetaKey:()=>controlOrMetaKey2,defaultShortcuts:()=>defaultShortcuts,init:()=>init9,isMacLike:()=>isMacLike2,keys:()=>keys});var{navigator:navigator2}=scope,isMacLike=()=>navigator2&&navigator2.platform?!!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,controlOrMetaSymbol=()=>isMacLike()?"\u2318":"ctrl",controlOrMetaKey=()=>isMacLike()?"meta":"control",optionOrAltSymbol=()=>isMacLike()?"\u2325":"alt",isShortcutTaken=(arr1,arr2)=>JSON.stringify(arr1)===JSON.stringify(arr2),eventToShortcut=e3=>{if(["Meta","Alt","Control","Shift"].includes(e3.key))return null;let keys2=[];if(e3.altKey&&keys2.push("alt"),e3.ctrlKey&&keys2.push("control"),e3.metaKey&&keys2.push("meta"),e3.shiftKey&&keys2.push("shift"),e3.key&&e3.key.length===1&&e3.key!==" "){let key2=e3.key.toUpperCase(),code=e3.code?.toUpperCase().replace("KEY","").replace("DIGIT","");code&&code.length===1&&code!==key2?keys2.push([key2,code]):keys2.push(key2)}return e3.key===" "&&keys2.push("space"),e3.key==="Escape"&&keys2.push("escape"),e3.key==="ArrowRight"&&keys2.push("ArrowRight"),e3.key==="ArrowDown"&&keys2.push("ArrowDown"),e3.key==="ArrowUp"&&keys2.push("ArrowUp"),e3.key==="ArrowLeft"&&keys2.push("ArrowLeft"),keys2.length>0?keys2:null},shortcutMatchesShortcut=(inputShortcut,shortcut)=>!inputShortcut||!shortcut||(inputShortcut.join("").startsWith("shift/")&&inputShortcut.shift(),inputShortcut.length!==shortcut.length)?!1:!inputShortcut.find((input,i3)=>Array.isArray(input)?!input.includes(shortcut[i3]):input!==shortcut[i3]),eventMatchesShortcut=(e3,shortcut)=>shortcutMatchesShortcut(eventToShortcut(e3),shortcut),keyToSymbol=key2=>key2==="alt"?optionOrAltSymbol():key2==="control"?"\u2303":key2==="meta"?"\u2318":key2==="shift"?"\u21E7\u200B":key2==="Enter"||key2==="Backspace"||key2==="Esc"||key2==="escape"?"":key2===" "?"SPACE":key2==="ArrowUp"?"\u2191":key2==="ArrowDown"?"\u2193":key2==="ArrowLeft"?"\u2190":key2==="ArrowRight"?"\u2192":key2.toUpperCase(),shortcutToHumanString=shortcut=>shortcut.map(keyToSymbol).join(" "),{navigator:navigator22,document:document23}=scope,isMacLike2=()=>navigator22&&navigator22.platform?!!navigator22.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,controlOrMetaKey2=()=>isMacLike2()?"meta":"control";function keys(o2){return Object.keys(o2)}var defaultShortcuts=Object.freeze({fullScreen:["F"],togglePanel:["A"],panelPosition:["D"],toggleNav:["S"],toolbar:["T"],search:["/"],focusNav:["1"],focusIframe:["2"],focusPanel:["3"],prevComponent:["alt","ArrowUp"],nextComponent:["alt","ArrowDown"],prevStory:["alt","ArrowLeft"],nextStory:["alt","ArrowRight"],shortcutsPage:[controlOrMetaKey2(),"shift",","],aboutPage:[","],escape:["escape"],collapseAll:[controlOrMetaKey2(),"shift","ArrowUp"],expandAll:[controlOrMetaKey2(),"shift","ArrowDown"],remount:["alt","R"]}),addonsShortcuts={};function focusInInput(event){let target=event.target;return/input|textarea/i.test(target.tagName)||target.getAttribute("contenteditable")!==null}var init9=({store:store22,fullAPI,provider})=>{let api={getShortcutKeys(){return store22.getState().shortcuts},getDefaultShortcuts(){return{...defaultShortcuts,...api.getAddonsShortcutDefaults()}},getAddonsShortcuts(){return addonsShortcuts},getAddonsShortcutLabels(){let labels={};return Object.entries(api.getAddonsShortcuts()).forEach(([actionName,{label}])=>{labels[actionName]=label}),labels},getAddonsShortcutDefaults(){let defaults={};return Object.entries(api.getAddonsShortcuts()).forEach(([actionName,{defaultShortcut}])=>{defaults[actionName]=defaultShortcut}),defaults},async setShortcuts(shortcuts){return await store22.setState({shortcuts},{persistence:"permanent"}),shortcuts},async restoreAllDefaultShortcuts(){return api.setShortcuts(api.getDefaultShortcuts())},async setShortcut(action,value2){let shortcuts=api.getShortcutKeys();return await api.setShortcuts({...shortcuts,[action]:value2}),value2},async setAddonShortcut(addon,shortcut){let shortcuts=api.getShortcutKeys();return await api.setShortcuts({...shortcuts,[`${addon}-${shortcut.actionName}`]:shortcut.defaultShortcut}),addonsShortcuts[`${addon}-${shortcut.actionName}`]=shortcut,shortcut},async restoreDefaultShortcut(action){let defaultShortcut=api.getDefaultShortcuts()[action];return api.setShortcut(action,defaultShortcut)},handleKeydownEvent(event){let shortcut=eventToShortcut(event),shortcuts=api.getShortcutKeys(),matchedFeature=keys(shortcuts).find(feature=>shortcutMatchesShortcut(shortcut,shortcuts[feature]));matchedFeature&&api.handleShortcutFeature(matchedFeature,event)},handleShortcutFeature(feature,event){let{layout:{isFullscreen,showNav,showPanel},ui:{enableShortcuts},storyId}=store22.getState();if(enableShortcuts)switch(event?.preventDefault&&event.preventDefault(),feature){case"escape":{isFullscreen?fullAPI.toggleFullscreen():showNav||fullAPI.toggleNav();break}case"focusNav":{isFullscreen&&fullAPI.toggleFullscreen(),showNav||fullAPI.toggleNav(),fullAPI.focusOnUIElement(focusableUIElements.storyListMenu);break}case"search":{isFullscreen&&fullAPI.toggleFullscreen(),showNav||fullAPI.toggleNav(),setTimeout(()=>{fullAPI.focusOnUIElement(focusableUIElements.storySearchField,!0)},0);break}case"focusIframe":{let element=document23.getElementById("storybook-preview-iframe");if(element)try{element.contentWindow.focus()}catch{}break}case"focusPanel":{isFullscreen&&fullAPI.toggleFullscreen(),showPanel||fullAPI.togglePanel(),fullAPI.focusOnUIElement(focusableUIElements.storyPanelRoot);break}case"nextStory":{fullAPI.jumpToStory(1);break}case"prevStory":{fullAPI.jumpToStory(-1);break}case"nextComponent":{fullAPI.jumpToComponent(1);break}case"prevComponent":{fullAPI.jumpToComponent(-1);break}case"fullScreen":{fullAPI.toggleFullscreen();break}case"togglePanel":{isFullscreen&&(fullAPI.toggleFullscreen(),fullAPI.resetLayout()),fullAPI.togglePanel();break}case"toggleNav":{isFullscreen&&(fullAPI.toggleFullscreen(),fullAPI.resetLayout()),fullAPI.toggleNav();break}case"toolbar":{fullAPI.toggleToolbar();break}case"panelPosition":{isFullscreen&&fullAPI.toggleFullscreen(),showPanel||fullAPI.togglePanel(),fullAPI.togglePanelPosition();break}case"aboutPage":{fullAPI.navigate("/settings/about");break}case"shortcutsPage":{fullAPI.navigate("/settings/shortcuts");break}case"collapseAll":{fullAPI.collapseAll();break}case"expandAll":{fullAPI.expandAll();break}case"remount":{fullAPI.emit(FORCE_REMOUNT,{storyId});break}default:addonsShortcuts[feature].action();break}}},{shortcuts:persistedShortcuts=defaultShortcuts}=store22.getState(),state={shortcuts:keys(defaultShortcuts).reduce((acc,key2)=>({...acc,[key2]:persistedShortcuts[key2]||defaultShortcuts[key2]}),defaultShortcuts)};return{api,state,init:()=>{document23.addEventListener("keydown",event=>{focusInInput(event)||api.handleKeydownEvent(event)}),provider.channel.on(PREVIEW_KEYDOWN,data=>{api.handleKeydownEvent(data.event)})}}},url_exports={};__export2(url_exports,{init:()=>init10});var{window:globalWindow}=scope,parseBoolean=value2=>{if(value2==="true"||value2==="1")return!0;if(value2==="false"||value2==="0")return!1},prevParams,initialUrlSupport=({state:{location:location22,path,viewMode,storyId:storyIdFromUrl},singleStory})=>{let{full,panel,nav,shortcuts,addonPanel,tabs,path:queryPath,...otherParams}=queryFromLocation(location22),layout={isFullscreen:parseBoolean(full),showNav:!singleStory&&parseBoolean(nav),showPanel:parseBoolean(panel),panelPosition:["right","bottom"].includes(panel)?panel:void 0,showTabs:parseBoolean(tabs)},ui={enableShortcuts:parseBoolean(shortcuts)},selectedPanel=addonPanel||void 0,storyId=storyIdFromUrl,customQueryParams=dequal2(prevParams,otherParams)?prevParams:otherParams;return prevParams=customQueryParams,{viewMode,layout,ui,selectedPanel,location:location22,path,customQueryParams,storyId}},init10=moduleArgs=>{let{store:store22,navigate,provider,fullAPI}=moduleArgs,navigateTo=(path,queryParams={},options3={})=>{let params=Object.entries(queryParams).filter(([,v2])=>v2).sort(([a2],[b3])=>a2`${k2}=${v2}`),to=[path,...params].join("&");return navigate(to,options3)},api={getQueryParam(key2){let{customQueryParams}=store22.getState();return customQueryParams?customQueryParams[key2]:void 0},getUrlState(){let{path,customQueryParams,storyId,url,viewMode}=store22.getState();return{path,queryParams:customQueryParams,storyId,url,viewMode}},setQueryParams(input){let{customQueryParams}=store22.getState(),queryParams={},update2={...customQueryParams,...Object.entries(input).reduce((acc,[key2,value2])=>(value2!==null&&(acc[key2]=value2),acc),queryParams)};dequal2(customQueryParams,update2)||(store22.setState({customQueryParams:update2}),provider.channel.emit(UPDATE_QUERY_PARAMS,update2))},navigateUrl(url,options3){navigate(url,{plain:!0,...options3})}},updateArgsParam=()=>{let{path,queryParams,viewMode}=api.getUrlState();if(viewMode!=="story")return;let currentStory=fullAPI.getCurrentStoryData();if(currentStory?.type!=="story")return;let{args:args2,initialArgs}=currentStory,argsString=buildArgsParam(initialArgs,args2);navigateTo(path,{...queryParams,args:argsString},{replace:!0}),api.setQueryParams({args:argsString})};provider.channel.on(SET_CURRENT_STORY,()=>updateArgsParam());let handleOrId;return provider.channel.on(STORY_ARGS_UPDATED,()=>{"requestIdleCallback"in globalWindow?(handleOrId&&globalWindow.cancelIdleCallback(handleOrId),handleOrId=globalWindow.requestIdleCallback(updateArgsParam,{timeout:1e3})):(handleOrId&&clearTimeout(handleOrId),setTimeout(updateArgsParam,100))}),provider.channel.on(GLOBALS_UPDATED,({globals,initialGlobals})=>{let{path,queryParams}=api.getUrlState(),globalsString=buildArgsParam(initialGlobals,globals);navigateTo(path,{...queryParams,globals:globalsString},{replace:!0}),api.setQueryParams({globals:globalsString})}),provider.channel.on(NAVIGATE_URL,(url,options3)=>{api.navigateUrl(url,options3)}),{api,state:initialUrlSupport(moduleArgs)}},versions_exports={};__export2(versions_exports,{init:()=>init11});var version="7.5.1",{VERSIONCHECK}=scope,getVersionCheckData=(0,import_memoizerific3.default)(1)(()=>{try{return{...JSON.parse(VERSIONCHECK).data||{}}}catch{return{}}}),init11=({store:store22})=>{let{dismissedVersionNotification}=store22.getState(),state={versions:{current:{version},...getVersionCheckData()},dismissedVersionNotification},api={getCurrentVersion:()=>{let{versions:{current}}=store22.getState();return current},getLatestVersion:()=>{let{versions:{latest,next,current}}=store22.getState();return current&&import_semver.default.prerelease(current.version)&&next?latest&&import_semver.default.gt(latest.version,next.version)?latest:next:latest},versionUpdateAvailable:()=>{let latest=api.getLatestVersion(),current=api.getCurrentVersion();if(latest){if(!latest.version||!current.version)return!0;let actualCurrent=import_semver.default.prerelease(current.version)?`${import_semver.default.major(current.version)}.${import_semver.default.minor(current.version)}.${import_semver.default.patch(current.version)}`:current.version,diff=import_semver.default.diff(actualCurrent,latest.version);return import_semver.default.gt(latest.version,actualCurrent)&&diff!=="patch"&&!diff.includes("pre")}return!1}};return{init:async()=>{let{versions={}}=store22.getState(),{latest,next}=getVersionCheckData();await store22.setState({versions:{...versions,latest,next}})},state,api}},whatsnew_exports={};__export2(whatsnew_exports,{init:()=>init12});var WHATS_NEW_NOTIFICATION_ID="whats-new",init12=({fullAPI,store:store22,provider})=>{let state={whatsNewData:void 0};function setWhatsNewState(newState){store22.setState({whatsNewData:newState}),state.whatsNewData=newState}let api={isWhatsNewUnread(){return state.whatsNewData?.status==="SUCCESS"&&!state.whatsNewData.postIsRead},whatsNewHasBeenRead(){state.whatsNewData?.status==="SUCCESS"&&(setWhatsNewCache({lastReadPost:state.whatsNewData.url}),setWhatsNewState({...state.whatsNewData,postIsRead:!0}),fullAPI.clearNotification(WHATS_NEW_NOTIFICATION_ID))},toggleWhatsNewNotifications(){state.whatsNewData?.status==="SUCCESS"&&(setWhatsNewState({...state.whatsNewData,disableWhatsNewNotifications:!state.whatsNewData.disableWhatsNewNotifications}),provider.channel.emit(TOGGLE_WHATS_NEW_NOTIFICATIONS,{disableWhatsNewNotifications:state.whatsNewData.disableWhatsNewNotifications}))}};function getLatestWhatsNewPost(){return provider.channel.emit(REQUEST_WHATS_NEW_DATA),new Promise(resolve=>provider.channel.once(RESULT_WHATS_NEW_DATA,({data})=>resolve(data)))}function setWhatsNewCache(cache){provider.channel.emit(SET_WHATS_NEW_CACHE,cache)}return{init:async()=>{if(scope.CONFIG_TYPE!=="DEVELOPMENT")return;let whatsNewData=await getLatestWhatsNewPost();setWhatsNewState(whatsNewData);let urlState=fullAPI.getUrlState();!(urlState?.path==="/onboarding"||urlState.queryParams?.onboarding==="true")&&whatsNewData.status==="SUCCESS"&&!whatsNewData.disableWhatsNewNotifications&&whatsNewData.showNotification&&fullAPI.addNotification({id:WHATS_NEW_NOTIFICATION_ID,link:"/settings/whats-new",content:{headline:whatsNewData.excerpt,subHeadline:"Click to learn what's new in Storybook"},icon:{name:"hearthollow"},onClear({dismissed}){dismissed&&setWhatsNewCache({lastDismissedPost:whatsNewData.url})}})},state,api}},globals_exports={};__export2(globals_exports,{init:()=>init13});var init13=({store:store22,fullAPI,provider})=>{let api={getGlobals(){return store22.getState().globals},getGlobalTypes(){return store22.getState().globalTypes},updateGlobals(newGlobals){provider.channel.emit(UPDATE_GLOBALS,{globals:newGlobals,options:{target:"storybook-preview-iframe"}})}},state={globals:{},globalTypes:{}},updateGlobals=globals=>{let currentGlobals=store22.getState()?.globals;dequal2(globals,currentGlobals)||store22.setState({globals})};return provider.channel.on(GLOBALS_UPDATED,function({globals}){let{ref}=getEventMetadata(this,fullAPI);ref?logger.warn("received a GLOBALS_UPDATED from a non-local ref. This is not currently supported."):updateGlobals(globals)}),provider.channel.on(SET_GLOBALS,function({globals,globalTypes}){let{ref}=getEventMetadata(this,fullAPI),currentGlobals=store22.getState()?.globals;ref?Object.keys(globals).length>0&&logger.warn("received globals from a non-local ref. This is not currently supported."):store22.setState({globals,globalTypes}),currentGlobals&&Object.keys(currentGlobals).length!==0&&!dequal2(globals,currentGlobals)&&api.updateGlobals(currentGlobals)}),{api,state}};function mockChannel(){let transport={setHandler:()=>{},send:()=>{}};return new Channel({transport})}var AddonStore=class{constructor(){this.loaders={},this.elements={},this.config={},this.getChannel=()=>(this.channel||this.setChannel(mockChannel()),this.channel),this.getServerChannel=()=>{if(!this.serverChannel)throw new Error("Accessing non-existent serverChannel");return this.serverChannel},this.ready=()=>this.promise,this.hasChannel=()=>!!this.channel,this.hasServerChannel=()=>!!this.serverChannel,this.setChannel=channel=>{this.channel=channel,this.resolve()},this.setServerChannel=channel=>{this.serverChannel=channel},this.addPanel=(id,options3)=>{this.add(id,{type:Addon_TypesEnum.PANEL,...options3})},this.setConfig=value2=>{Object.assign(this.config,value2),this.hasChannel()?this.getChannel().emit(SET_CONFIG,this.config):this.ready().then(channel=>{channel.emit(SET_CONFIG,this.config)})},this.getConfig=()=>this.config,this.register=(id,callback)=>{this.loaders[id]&&logger.warn(`${id} was loaded twice, this could have bad side-effects`),this.loaders[id]=callback},this.loadAddons=api=>{Object.values(this.loaders).forEach(value2=>value2(api))},this.promise=new Promise(res=>{this.resolve=()=>res(this.getChannel())})}getElements(type){return this.elements[type]||(this.elements[type]={}),this.elements[type]}add(id,addon){let{type}=addon,collection=this.getElements(type);collection[id]={id,...addon}}},KEY2="__STORYBOOK_ADDONS_MANAGER";function getAddonsStore(){return scope[KEY2]||(scope[KEY2]=new AddonStore),scope[KEY2]}var addons=getAddonsStore(),{ActiveTabs:ActiveTabs2}=layout_exports,ManagerContext=createContext2({api:void 0,state:initial_state_default({})}),combineParameters=(...parameterSets)=>(0,import_mergeWith.default)({},...parameterSets,(objValue,srcValue)=>{if(Array.isArray(srcValue))return srcValue}),ManagerProvider=class extends import_react2.Component{constructor(props){super(props),this.api={},this.initModules=()=>{this.modules.forEach(module=>{"init"in module&&module.init()})};let{location:location22,path,refId,viewMode=props.docsOptions.docsMode?"docs":props.viewMode,singleStory,storyId,docsOptions,navigate}=props,store22=new Store({getState:()=>this.state,setState:(stateChange,callback)=>this.setState(stateChange,callback)}),routeData={location:location22,path,viewMode,singleStory,storyId,refId},optionsData={docsOptions};this.state=store22.getInitialState(initial_state_default({...routeData,...optionsData}));let apiData={navigate,store:store22,provider:props.provider};this.modules=[provider_exports,channel_exports,addons_exports,layout_exports,notifications_exports,settings_exports,shortcuts_exports,stories_exports,refs_exports,globals_exports,url_exports,versions_exports,whatsnew_exports].map(m3=>m3.init({...routeData,...optionsData,...apiData,state:this.state,fullAPI:this.api}));let state=initial_state_default(this.state,...this.modules.map(m3=>m3.state)),api=Object.assign(this.api,{navigate},...this.modules.map(m3=>m3.api));this.state=state,this.api=api}static getDerivedStateFromProps(props,state){return state.path!==props.path?{...state,location:props.location,path:props.path,refId:props.refId,viewMode:props.viewMode,storyId:props.storyId}:null}shouldComponentUpdate(nextProps,nextState){let prevState=this.state,prevProps=this.props;return prevState!==nextState||prevProps.path!==nextProps.path}render(){let{children}=this.props,value2={state:this.state,api:this.api};return import_react2.default.createElement(EffectOnMount,{effect:this.initModules},import_react2.default.createElement(ManagerContext.Provider,{value:value2},import_react2.default.createElement(ManagerConsumer,null,children)))}};ManagerProvider.displayName="Manager";var EffectOnMount=({children,effect})=>(import_react2.default.useEffect(effect,[]),children),defaultFilter=c3=>c3;function ManagerConsumer({filter=defaultFilter,children}){let c3=(0,import_react2.useContext)(ManagerContext),renderer=(0,import_react2.useRef)(children),filterer=(0,import_react2.useRef)(filter);if(typeof renderer.current!="function")return import_react2.default.createElement(import_react2.Fragment,null,renderer.current);let data=filterer.current(c3),l2=(0,import_react2.useMemo)(()=>[...Object.entries(data).reduce((acc,keyval)=>acc.concat(keyval),[])],[c3.state]);return(0,import_react2.useMemo)(()=>{let Child=renderer.current;return import_react2.default.createElement(Child,{...data})},l2)}function useStorybookState(){let{state}=(0,import_react2.useContext)(ManagerContext);return{...state,get storiesHash(){return deprecate("state.storiesHash is deprecated, please use state.index"),this.index||{}},get storiesConfigured(){return deprecate("state.storiesConfigured is deprecated, please use state.previewInitialized"),this.previewInitialized},get storiesFailed(){return deprecate("state.storiesFailed is deprecated, please use state.indexError"),this.indexError}}}function useStorybookApi(){let{api}=(0,import_react2.useContext)(ManagerContext);return api}function orDefault(fromStore,defaultState2){return typeof fromStore>"u"?defaultState2:fromStore}var useChannel=(eventMap,deps=[])=>{let api=useStorybookApi();return(0,import_react2.useEffect)(()=>(Object.entries(eventMap).forEach(([type,listener])=>api.on(type,listener)),()=>{Object.entries(eventMap).forEach(([type,listener])=>api.off(type,listener))}),deps),api.emit};function useStoryPrepared(storyId){return useStorybookApi().isPrepared(storyId)}function useParameter(parameterKey,defaultValue){let result2=useStorybookApi().getCurrentParameter(parameterKey);return orDefault(result2,defaultValue)}globalThis.STORYBOOK_ADDON_STATE={};var{STORYBOOK_ADDON_STATE}=globalThis;function useSharedState(stateId,defaultState2){let api=useStorybookApi(),existingState=api.getAddonState(stateId)||STORYBOOK_ADDON_STATE[stateId],state=orDefault(existingState,STORYBOOK_ADDON_STATE[stateId]?STORYBOOK_ADDON_STATE[stateId]:defaultState2),quicksync=!1;state===defaultState2&&defaultState2!==void 0&&(STORYBOOK_ADDON_STATE[stateId]=defaultState2,quicksync=!0),(0,import_react2.useEffect)(()=>{quicksync&&api.setAddonState(stateId,defaultState2)},[quicksync]);let setState=async(s2,options3)=>{let result2=await api.setAddonState(stateId,s2,options3);return STORYBOOK_ADDON_STATE[stateId]=result2,result2},allListeners=(0,import_react2.useMemo)(()=>{let stateChangeHandlers={[`${SHARED_STATE_CHANGED}-client-${stateId}`]:setState,[`${SHARED_STATE_SET}-client-${stateId}`]:setState},stateInitializationHandlers={[SET_STORIES]:async()=>{let currentState=api.getAddonState(stateId);currentState?(STORYBOOK_ADDON_STATE[stateId]=currentState,api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,currentState)):STORYBOOK_ADDON_STATE[stateId]?(await setState(STORYBOOK_ADDON_STATE[stateId]),api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,STORYBOOK_ADDON_STATE[stateId])):defaultState2!==void 0&&(await setState(defaultState2),STORYBOOK_ADDON_STATE[stateId]=defaultState2,api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,defaultState2))},[STORY_CHANGED]:()=>{let currentState=api.getAddonState(stateId);currentState!==void 0&&api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,currentState)}};return{...stateChangeHandlers,...stateInitializationHandlers}},[stateId]),emit=useChannel(allListeners);return[state,async(newStateOrMerger,options3)=>{let result2=await setState(newStateOrMerger,options3);emit(`${SHARED_STATE_CHANGED}-manager-${stateId}`,result2)}]}function useAddonState(addonId,defaultState2){return useSharedState(addonId,defaultState2)}function useArgs(){let{getCurrentStoryData,updateStoryArgs,resetStoryArgs}=useStorybookApi(),data=getCurrentStoryData(),args2=data?.type==="story"?data.args:{},updateArgs=(0,import_react2.useCallback)(newArgs=>updateStoryArgs(data,newArgs),[data,updateStoryArgs]),resetArgs=(0,import_react2.useCallback)(argNames=>resetStoryArgs(data,argNames),[data,resetStoryArgs]);return[args2,updateArgs,resetArgs]}function useGlobals(){let api=useStorybookApi();return[api.getGlobals(),api.updateGlobals]}function useGlobalTypes(){return useStorybookApi().getGlobalTypes()}function useCurrentStory(){let{getCurrentStoryData}=useStorybookApi();return getCurrentStoryData()}function useArgTypes(){let current=useCurrentStory();return current?.type==="story"&¤t.argTypes||{}}var StorybookError=class extends Error{constructor(){super(...arguments),this.data={},this.documentation=!1,this.fromStorybook=!0}get fullErrorCode(){let paddedCode=String(this.code).padStart(4,"0");return`SB_${this.category}_${paddedCode}`}get name(){let errorName=this.constructor.name;return`${this.fullErrorCode} (${errorName})`}get message(){let page;return this.documentation===!0?page=`https://storybook.js.org/error/${this.fullErrorCode}`:typeof this.documentation=="string"?page=this.documentation:Array.isArray(this.documentation)&&(page=` + `});let versions=ref.versions&&Object.keys(ref.versions).length?ref.versions:loadedData.versions;await api.setRef(id,{id,url:urlParseResult.url,...loadedData,...versions?{versions}:{},type:loadedData.storyIndex?"lazy":"auto-inject"})},getRefs:()=>{let{refs:refs22={}}=store22.getState();return refs22},setRef:(id,{storyIndex,setStoriesData,...rest},ready=!1)=>{if(singleStory)return;let{storyMapper=defaultStoryMapper}=provider.getConfig(),ref=api.getRefs()[id],index2;setStoriesData?index2=transformSetStoriesStoryDataToStoriesHash(map(setStoriesData,ref,{storyMapper}),{provider,docsOptions,filters:{},status:{}}):storyIndex&&(index2=transformStoryIndexToStoriesHash(storyIndex,{provider,docsOptions,filters:{},status:{}})),index2&&(index2=addRefIds(index2,ref)),api.updateRef(id,{index:index2,...rest})},updateRef:(id,data)=>{let{[id]:ref,...updated}=api.getRefs();updated[id]={...ref,...data};let ordered=Object.keys(initialState).reduce((obj,key2)=>(obj[key2]=updated[key2],obj),{});store22.setState({refs:ordered})}},refs2=!singleStory&&scope.REFS||{},initialState=refs2;return runCheck&&Object.entries(refs2).forEach(([id,ref])=>{api.checkRef({...ref,stories:{}})}),{api,state:{refs:initialState}}},getEventMetadata=(context,fullAPI)=>{let{source:source2,refId,type}=context,[sourceType,sourceLocation]=getSourceType(source2,refId),ref=refId&&fullAPI.getRefs()[refId]?fullAPI.getRefs()[refId]:fullAPI.findRef(sourceLocation),meta={source:source2,sourceType,sourceLocation,refId,ref,type};switch(!0){case typeof refId=="string":case sourceType==="local":case sourceType==="external":return meta;default:return logger.warn(`Received a ${type} frame that was not configured as a ref`),null}},{FEATURES,fetch:fetch2}=scope,STORY_INDEX_PATH="./index.json",removedOptions=["enableShortcuts","theme","showRoots"];function removeRemovedOptions(options3){if(!options3||typeof options3=="string")return options3;let result2={...options3};return removedOptions.forEach(option=>{option in result2&&delete result2[option]}),result2}var init7=({fullAPI,store:store22,navigate,provider,storyId:initialStoryId,viewMode:initialViewMode,docsOptions={}})=>{let api={storyId:N,getData:(storyId,refId)=>{let result2=api.resolveStory(storyId,refId);if(result2?.type==="story"||result2?.type==="docs")return result2},isPrepared:(storyId,refId)=>{let data=api.getData(storyId,refId);return data.type==="story"?data.prepared:!0},resolveStory:(storyId,refId)=>{let{refs:refs2,index:index2}=store22.getState();return refId&&!refs2[refId]?null:refId?refs2[refId].index?refs2[refId].index[storyId]:void 0:index2?index2[storyId]:void 0},getCurrentStoryData:()=>{let{storyId,refId}=store22.getState();return api.getData(storyId,refId)},getParameters:(storyIdOrCombo,parameterName)=>{let{storyId,refId}=typeof storyIdOrCombo=="string"?{storyId:storyIdOrCombo,refId:void 0}:storyIdOrCombo,data=api.getData(storyId,refId);if(["story","docs"].includes(data?.type)){let{parameters}=data;if(parameters)return parameterName?parameters[parameterName]:parameters}return null},getCurrentParameter:parameterName=>{let{storyId,refId}=store22.getState();return api.getParameters({storyId,refId},parameterName)||void 0},jumpToComponent:direction=>{let{index:index2,storyId,refs:refs2,refId}=store22.getState();if(!api.getData(storyId,refId))return;let hash=refId?refs2[refId].index||{}:index2,result2=api.findSiblingStoryId(storyId,hash,direction,!0);result2&&api.selectStory(result2,void 0,{ref:refId})},jumpToStory:direction=>{let{index:index2,storyId,refs:refs2,refId}=store22.getState(),story=api.getData(storyId,refId);if(!story)return;let hash=story.refId?refs2[story.refId].index:index2,result2=api.findSiblingStoryId(storyId,hash,direction,!1);result2&&api.selectStory(result2,void 0,{ref:refId})},selectFirstStory:()=>{let{index:index2}=store22.getState(),firstStory=Object.keys(index2).find(id=>index2[id].type==="story");if(firstStory){api.selectStory(firstStory);return}navigate("/")},selectStory:(titleOrId=void 0,name2=void 0,options3={})=>{let{ref}=options3,{storyId,index:index2,refs:refs2}=store22.getState(),hash=ref?refs2[ref].index:index2,kindSlug=storyId?.split("--",2)[0];if(name2)if(titleOrId){let id=ref?`${ref}_${N(titleOrId,name2)}`:N(titleOrId,name2);if(hash[id])api.selectStory(id,void 0,options3);else{let entry=hash[L(titleOrId)];if(entry?.type==="component"){let foundId=entry.children.find(childId=>hash[childId].name===name2);foundId&&api.selectStory(foundId,void 0,options3)}}}else{let id=N(kindSlug,name2);api.selectStory(id,void 0,options3)}else{let entry=titleOrId?hash[titleOrId]||hash[L(titleOrId)]:hash[kindSlug];if(!entry)throw new Error(`Unknown id or title: '${titleOrId}'`);let leafEntry=api.findLeafEntry(hash,entry.id),fullId=leafEntry.refId?`${leafEntry.refId}_${leafEntry.id}`:leafEntry.id;navigate(`/${leafEntry.type}/${fullId}`)}},findLeafEntry(index2,storyId){let entry=index2[storyId];if(entry.type==="docs"||entry.type==="story")return entry;let childStoryId=entry.children[0];return api.findLeafEntry(index2,childStoryId)},findLeafStoryId(index2,storyId){return api.findLeafEntry(index2,storyId)?.id},findSiblingStoryId(storyId,index2,direction,toSiblingGroup){if(toSiblingGroup){let lookupList2=getComponentLookupList(index2),position2=lookupList2.findIndex(i3=>i3.includes(storyId));return position2===lookupList2.length-1&&direction>0||position2===0&&direction<0?void 0:lookupList2[position2+direction]?lookupList2[position2+direction][0]:void 0}let lookupList=getStoriesLookupList(index2),position=lookupList.indexOf(storyId);if(!(position===lookupList.length-1&&direction>0)&&!(position===0&&direction<0))return lookupList[position+direction]},updateStoryArgs:(story,updatedArgs)=>{let{id:storyId,refId}=story;provider.channel.emit(UPDATE_STORY_ARGS,{storyId,updatedArgs,options:{target:refId}})},resetStoryArgs:(story,argNames)=>{let{id:storyId,refId}=story;provider.channel.emit(RESET_STORY_ARGS,{storyId,argNames,options:{target:refId}})},fetchIndex:async()=>{try{let result2=await fetch2(STORY_INDEX_PATH);if(result2.status!==200)throw new Error(await result2.text());let storyIndex=await result2.json();if(storyIndex.v<3){logger.warn(`Skipping story index with version v${storyIndex.v}, awaiting SET_STORIES.`);return}await api.setIndex(storyIndex)}catch(err){await store22.setState({indexError:err})}},setIndex:async input=>{let{index:oldHash,status,filters}=store22.getState(),newHash=transformStoryIndexToStoriesHash(input,{provider,docsOptions,status,filters}),output=addPreparedStories(newHash,oldHash);await store22.setState({internal_index:input,index:output,indexError:void 0})},updateStory:async(storyId,update2,ref)=>{if(ref){let{id:refId,index:index2}=ref;index2[storyId]={...index2[storyId],...update2},await fullAPI.updateRef(refId,{index:index2})}else{let{index:index2}=store22.getState();index2[storyId]={...index2[storyId],...update2},await store22.setState({index:index2})}},updateDocs:async(docsId,update2,ref)=>{if(ref){let{id:refId,index:index2}=ref;index2[docsId]={...index2[docsId],...update2},await fullAPI.updateRef(refId,{index:index2})}else{let{index:index2}=store22.getState();index2[docsId]={...index2[docsId],...update2},await store22.setState({index:index2})}},setPreviewInitialized:async ref=>{ref?fullAPI.updateRef(ref.id,{previewInitialized:!0}):store22.setState({previewInitialized:!0})},experimental_updateStatus:async(id,input)=>{let{status,internal_index:index2}=store22.getState(),newStatus={...status},update2=typeof input=="function"?input(status):input;Object.keys(update2).length!==0&&(Object.entries(update2).forEach(([storyId,value2])=>{newStatus[storyId]={...newStatus[storyId]||{}},value2===null?delete newStatus[storyId][id]:newStatus[storyId][id]=value2,Object.keys(newStatus[storyId]).length===0&&delete newStatus[storyId]}),await store22.setState({status:newStatus},{persistence:"session"}),await api.setIndex(index2))},experimental_setFilter:async(id,filterFunction)=>{let{internal_index:index2}=store22.getState();await store22.setState({filters:{...store22.getState().filters,[id]:filterFunction}}),await api.setIndex(index2)}};provider.channel.on(STORY_SPECIFIED,function({storyId,viewMode}){let{sourceType}=getEventMetadata(this,fullAPI);if(sourceType==="local"){let state=store22.getState(),isCanvasRoute=state.path==="/"||state.viewMode==="story"||state.viewMode==="docs",stateHasSelection=state.viewMode&&state.storyId,stateSelectionDifferent=state.viewMode!==viewMode||state.storyId!==storyId,{type}=state.index[state.storyId]||{};isCanvasRoute&&(stateHasSelection&&stateSelectionDifferent&&!(type==="root"||type==="component"||type==="group")?provider.channel.emit(SET_CURRENT_STORY,{storyId:state.storyId,viewMode:state.viewMode}):stateSelectionDifferent&&navigate(`/${viewMode}/${storyId}`))}}),provider.channel.on(CURRENT_STORY_WAS_SET,function(){let{ref}=getEventMetadata(this,fullAPI);api.setPreviewInitialized(ref)}),provider.channel.on(STORY_CHANGED,function(){let{sourceType}=getEventMetadata(this,fullAPI);if(sourceType==="local"){let options3=api.getCurrentParameter("options");options3&&fullAPI.setOptions(removeRemovedOptions(options3))}}),provider.channel.on(STORY_PREPARED,function({id,...update2}){let{ref,sourceType}=getEventMetadata(this,fullAPI);if(api.updateStory(id,{...update2,prepared:!0},ref),!ref&&!store22.getState().hasCalledSetOptions){let{options:options3}=update2.parameters;fullAPI.setOptions(removeRemovedOptions(options3)),store22.setState({hasCalledSetOptions:!0})}if(sourceType==="local"){let{storyId,index:index2,refId}=store22.getState(),toBePreloaded=Array.from(new Set([api.findSiblingStoryId(storyId,index2,1,!0),api.findSiblingStoryId(storyId,index2,-1,!0)])).filter(Boolean);provider.channel.emit(PRELOAD_ENTRIES,{ids:toBePreloaded,options:{target:refId}})}}),provider.channel.on(DOCS_PREPARED,function({id,...update2}){let{ref}=getEventMetadata(this,fullAPI);api.updateStory(id,{...update2,prepared:!0},ref)}),provider.channel.on(SET_INDEX,function(index2){let{ref}=getEventMetadata(this,fullAPI);if(ref)fullAPI.setRef(ref.id,{...ref,storyIndex:index2},!0);else{api.setIndex(index2);let options3=api.getCurrentParameter("options");fullAPI.setOptions(removeRemovedOptions(options3))}}),provider.channel.on(SET_STORIES,function(data){let{ref}=getEventMetadata(this,fullAPI),setStoriesData=data.v?denormalizeStoryParameters(data):data.stories;if(ref)fullAPI.setRef(ref.id,{...ref,setStoriesData},!0);else throw new Error("Cannot call SET_STORIES for local frame")}),provider.channel.on(SELECT_STORY,function({kind,title=kind,story,name:name2=story,storyId,...rest}){let{ref}=getEventMetadata(this,fullAPI);ref?fullAPI.selectStory(storyId||title,name2,{...rest,ref:ref.id}):fullAPI.selectStory(storyId||title,name2,rest)}),provider.channel.on(STORY_ARGS_UPDATED,function({storyId,args:args2}){let{ref}=getEventMetadata(this,fullAPI);api.updateStory(storyId,{args:args2},ref)}),provider.channel.on(CONFIG_ERROR,function(err){let{ref}=getEventMetadata(this,fullAPI);api.setPreviewInitialized(ref)}),provider.channel.on(STORY_MISSING,function(err){let{ref}=getEventMetadata(this,fullAPI);api.setPreviewInitialized(ref)}),provider.channel.on(SET_CONFIG,()=>{let config2=provider.getConfig();config2?.sidebar?.filters&&store22.setState({filters:{...store22.getState().filters,...config2?.sidebar?.filters}})});let config=provider.getConfig();return{api,state:{storyId:initialStoryId,viewMode:initialViewMode,hasCalledSetOptions:!1,previewInitialized:!1,status:{},filters:config?.sidebar?.filters||{}},init:async()=>{FEATURES?.storyStoreV7&&(provider.channel.on(STORY_INDEX_INVALIDATED,()=>api.fetchIndex()),await api.fetchIndex())}}},layout_exports={};__export2(layout_exports,{ActiveTabs:()=>ActiveTabs,focusableUIElements:()=>focusableUIElements,init:()=>init8});var{document:document3}=scope,ActiveTabs={SIDEBAR:"sidebar",CANVAS:"canvas",ADDONS:"addons"},defaultState={ui:{enableShortcuts:!0},layout:{initialActive:ActiveTabs.CANVAS,showToolbar:!0,isFullscreen:!1,showPanel:!0,showNav:!0,panelPosition:"bottom",showTabs:!0},selectedPanel:void 0,theme:create()},focusableUIElements={storySearchField:"storybook-explorer-searchfield",storyListMenu:"storybook-explorer-menu",storyPanelRoot:"storybook-panel-root"},init8=({store:store22,provider,singleStory,fullAPI})=>{let api={toggleFullscreen(toggled){return store22.setState(state=>{let{showNav}=state.layout,value2=typeof toggled=="boolean"?toggled:!state.layout.isFullscreen,shouldShowNav=showNav===!1&&value2===!1;return{layout:{...state.layout,isFullscreen:value2,showNav:!singleStory&&shouldShowNav?!0:showNav}}},{persistence:"session"})},togglePanel(toggled){return store22.setState(state=>{let{showNav,isFullscreen}=state.layout,value2=typeof toggled<"u"?toggled:!state.layout.showPanel,shouldToggleFullScreen=showNav===!1&&value2===!1;return{layout:{...state.layout,showPanel:value2,isFullscreen:shouldToggleFullScreen?!0:isFullscreen}}},{persistence:"session"})},togglePanelPosition(position){return typeof position<"u"?store22.setState(state=>({layout:{...state.layout,panelPosition:position}}),{persistence:"permanent"}):store22.setState(state=>({layout:{...state.layout,panelPosition:state.layout.panelPosition==="right"?"bottom":"right"}}),{persistence:"permanent"})},toggleNav(toggled){return store22.setState(state=>{if(singleStory)return{layout:state.layout};let{showPanel,isFullscreen}=state.layout,showNav=typeof toggled<"u"?toggled:!state.layout.showNav,shouldToggleFullScreen=showPanel===!1&&showNav===!1;return{layout:{...state.layout,showNav,isFullscreen:shouldToggleFullScreen?!0:!showNav&&isFullscreen}}},{persistence:"session"})},toggleToolbar(toggled){return store22.setState(state=>{let value2=typeof toggled<"u"?toggled:!state.layout.showToolbar;return{layout:{...state.layout,showToolbar:value2}}},{persistence:"session"})},resetLayout(){return store22.setState(state=>({layout:{...state.layout,showNav:!1,showPanel:!1,isFullscreen:!1}}),{persistence:"session"})},focusOnUIElement(elementId,select){if(!elementId)return;let element=document3.getElementById(elementId);element&&(element.focus(),select&&element.select())},getInitialOptions(){let{theme,selectedPanel,...options3}=provider.getConfig();return{...defaultState,layout:{...defaultState.layout,...(0,import_pick.default)(options3,Object.keys(defaultState.layout)),...singleStory&&{showNav:!1}},ui:{...defaultState.ui,...(0,import_pick.default)(options3,Object.keys(defaultState.ui))},selectedPanel:selectedPanel||defaultState.selectedPanel,theme:theme||defaultState.theme}},setOptions:options3=>{let{layout,ui,selectedPanel,theme}=store22.getState();if(options3){let updatedLayout={...layout,...options3.layout,...(0,import_pick.default)(options3,Object.keys(layout)),...singleStory&&{showNav:!1}},updatedUi={...ui,...options3.ui,...(0,import_pick.default)(options3,Object.keys(ui))},updatedTheme={...theme,...options3.theme},modification={};dequal2(ui,updatedUi)||(modification.ui=updatedUi),dequal2(layout,updatedLayout)||(modification.layout=updatedLayout),options3.selectedPanel&&!dequal2(selectedPanel,options3.selectedPanel)&&(modification.selectedPanel=options3.selectedPanel),Object.keys(modification).length&&store22.setState(modification,{persistence:"permanent"}),dequal2(theme,updatedTheme)||store22.setState({theme:updatedTheme})}}},persisted=(0,import_pick.default)(store22.getState(),"layout","selectedPanel");return{api,state:merge_default(api.getInitialOptions(),persisted),init:()=>{api.setOptions(merge_default(api.getInitialOptions(),persisted)),provider.channel.on(SET_CONFIG,()=>{api.setOptions(merge_default(api.getInitialOptions(),persisted))})}}},shortcuts_exports={};__export2(shortcuts_exports,{controlOrMetaKey:()=>controlOrMetaKey2,defaultShortcuts:()=>defaultShortcuts,init:()=>init9,isMacLike:()=>isMacLike2,keys:()=>keys});var{navigator:navigator2}=scope,isMacLike=()=>navigator2&&navigator2.platform?!!navigator2.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,controlOrMetaSymbol=()=>isMacLike()?"\u2318":"ctrl",controlOrMetaKey=()=>isMacLike()?"meta":"control",optionOrAltSymbol=()=>isMacLike()?"\u2325":"alt",isShortcutTaken=(arr1,arr2)=>JSON.stringify(arr1)===JSON.stringify(arr2),eventToShortcut=e3=>{if(["Meta","Alt","Control","Shift"].includes(e3.key))return null;let keys2=[];if(e3.altKey&&keys2.push("alt"),e3.ctrlKey&&keys2.push("control"),e3.metaKey&&keys2.push("meta"),e3.shiftKey&&keys2.push("shift"),e3.key&&e3.key.length===1&&e3.key!==" "){let key2=e3.key.toUpperCase(),code=e3.code?.toUpperCase().replace("KEY","").replace("DIGIT","");code&&code.length===1&&code!==key2?keys2.push([key2,code]):keys2.push(key2)}return e3.key===" "&&keys2.push("space"),e3.key==="Escape"&&keys2.push("escape"),e3.key==="ArrowRight"&&keys2.push("ArrowRight"),e3.key==="ArrowDown"&&keys2.push("ArrowDown"),e3.key==="ArrowUp"&&keys2.push("ArrowUp"),e3.key==="ArrowLeft"&&keys2.push("ArrowLeft"),keys2.length>0?keys2:null},shortcutMatchesShortcut=(inputShortcut,shortcut)=>!inputShortcut||!shortcut||(inputShortcut.join("").startsWith("shift/")&&inputShortcut.shift(),inputShortcut.length!==shortcut.length)?!1:!inputShortcut.find((input,i3)=>Array.isArray(input)?!input.includes(shortcut[i3]):input!==shortcut[i3]),eventMatchesShortcut=(e3,shortcut)=>shortcutMatchesShortcut(eventToShortcut(e3),shortcut),keyToSymbol=key2=>key2==="alt"?optionOrAltSymbol():key2==="control"?"\u2303":key2==="meta"?"\u2318":key2==="shift"?"\u21E7\u200B":key2==="Enter"||key2==="Backspace"||key2==="Esc"||key2==="escape"?"":key2===" "?"SPACE":key2==="ArrowUp"?"\u2191":key2==="ArrowDown"?"\u2193":key2==="ArrowLeft"?"\u2190":key2==="ArrowRight"?"\u2192":key2.toUpperCase(),shortcutToHumanString=shortcut=>shortcut.map(keyToSymbol).join(" "),{navigator:navigator22,document:document23}=scope,isMacLike2=()=>navigator22&&navigator22.platform?!!navigator22.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,controlOrMetaKey2=()=>isMacLike2()?"meta":"control";function keys(o2){return Object.keys(o2)}var defaultShortcuts=Object.freeze({fullScreen:["F"],togglePanel:["A"],panelPosition:["D"],toggleNav:["S"],toolbar:["T"],search:["/"],focusNav:["1"],focusIframe:["2"],focusPanel:["3"],prevComponent:["alt","ArrowUp"],nextComponent:["alt","ArrowDown"],prevStory:["alt","ArrowLeft"],nextStory:["alt","ArrowRight"],shortcutsPage:[controlOrMetaKey2(),"shift",","],aboutPage:[","],escape:["escape"],collapseAll:[controlOrMetaKey2(),"shift","ArrowUp"],expandAll:[controlOrMetaKey2(),"shift","ArrowDown"],remount:["alt","R"]}),addonsShortcuts={};function focusInInput(event){let target=event.target;return/input|textarea/i.test(target.tagName)||target.getAttribute("contenteditable")!==null}var init9=({store:store22,fullAPI,provider})=>{let api={getShortcutKeys(){return store22.getState().shortcuts},getDefaultShortcuts(){return{...defaultShortcuts,...api.getAddonsShortcutDefaults()}},getAddonsShortcuts(){return addonsShortcuts},getAddonsShortcutLabels(){let labels={};return Object.entries(api.getAddonsShortcuts()).forEach(([actionName,{label}])=>{labels[actionName]=label}),labels},getAddonsShortcutDefaults(){let defaults={};return Object.entries(api.getAddonsShortcuts()).forEach(([actionName,{defaultShortcut}])=>{defaults[actionName]=defaultShortcut}),defaults},async setShortcuts(shortcuts){return await store22.setState({shortcuts},{persistence:"permanent"}),shortcuts},async restoreAllDefaultShortcuts(){return api.setShortcuts(api.getDefaultShortcuts())},async setShortcut(action,value2){let shortcuts=api.getShortcutKeys();return await api.setShortcuts({...shortcuts,[action]:value2}),value2},async setAddonShortcut(addon,shortcut){let shortcuts=api.getShortcutKeys();return await api.setShortcuts({...shortcuts,[`${addon}-${shortcut.actionName}`]:shortcut.defaultShortcut}),addonsShortcuts[`${addon}-${shortcut.actionName}`]=shortcut,shortcut},async restoreDefaultShortcut(action){let defaultShortcut=api.getDefaultShortcuts()[action];return api.setShortcut(action,defaultShortcut)},handleKeydownEvent(event){let shortcut=eventToShortcut(event),shortcuts=api.getShortcutKeys(),matchedFeature=keys(shortcuts).find(feature=>shortcutMatchesShortcut(shortcut,shortcuts[feature]));matchedFeature&&api.handleShortcutFeature(matchedFeature,event)},handleShortcutFeature(feature,event){let{layout:{isFullscreen,showNav,showPanel},ui:{enableShortcuts},storyId}=store22.getState();if(enableShortcuts)switch(event?.preventDefault&&event.preventDefault(),feature){case"escape":{isFullscreen?fullAPI.toggleFullscreen():showNav||fullAPI.toggleNav();break}case"focusNav":{isFullscreen&&fullAPI.toggleFullscreen(),showNav||fullAPI.toggleNav(),fullAPI.focusOnUIElement(focusableUIElements.storyListMenu);break}case"search":{isFullscreen&&fullAPI.toggleFullscreen(),showNav||fullAPI.toggleNav(),setTimeout(()=>{fullAPI.focusOnUIElement(focusableUIElements.storySearchField,!0)},0);break}case"focusIframe":{let element=document23.getElementById("storybook-preview-iframe");if(element)try{element.contentWindow.focus()}catch{}break}case"focusPanel":{isFullscreen&&fullAPI.toggleFullscreen(),showPanel||fullAPI.togglePanel(),fullAPI.focusOnUIElement(focusableUIElements.storyPanelRoot);break}case"nextStory":{fullAPI.jumpToStory(1);break}case"prevStory":{fullAPI.jumpToStory(-1);break}case"nextComponent":{fullAPI.jumpToComponent(1);break}case"prevComponent":{fullAPI.jumpToComponent(-1);break}case"fullScreen":{fullAPI.toggleFullscreen();break}case"togglePanel":{isFullscreen&&(fullAPI.toggleFullscreen(),fullAPI.resetLayout()),fullAPI.togglePanel();break}case"toggleNav":{isFullscreen&&(fullAPI.toggleFullscreen(),fullAPI.resetLayout()),fullAPI.toggleNav();break}case"toolbar":{fullAPI.toggleToolbar();break}case"panelPosition":{isFullscreen&&fullAPI.toggleFullscreen(),showPanel||fullAPI.togglePanel(),fullAPI.togglePanelPosition();break}case"aboutPage":{fullAPI.navigate("/settings/about");break}case"shortcutsPage":{fullAPI.navigate("/settings/shortcuts");break}case"collapseAll":{fullAPI.collapseAll();break}case"expandAll":{fullAPI.expandAll();break}case"remount":{fullAPI.emit(FORCE_REMOUNT,{storyId});break}default:addonsShortcuts[feature].action();break}}},{shortcuts:persistedShortcuts=defaultShortcuts}=store22.getState(),state={shortcuts:keys(defaultShortcuts).reduce((acc,key2)=>({...acc,[key2]:persistedShortcuts[key2]||defaultShortcuts[key2]}),defaultShortcuts)};return{api,state,init:()=>{document23.addEventListener("keydown",event=>{focusInInput(event)||api.handleKeydownEvent(event)}),provider.channel.on(PREVIEW_KEYDOWN,data=>{api.handleKeydownEvent(data.event)})}}},url_exports={};__export2(url_exports,{init:()=>init10});var{window:globalWindow}=scope,parseBoolean=value2=>{if(value2==="true"||value2==="1")return!0;if(value2==="false"||value2==="0")return!1},prevParams,initialUrlSupport=({state:{location:location22,path,viewMode,storyId:storyIdFromUrl},singleStory})=>{let{full,panel,nav,shortcuts,addonPanel,tabs,path:queryPath,...otherParams}=queryFromLocation(location22),layout={isFullscreen:parseBoolean(full),showNav:!singleStory&&parseBoolean(nav),showPanel:parseBoolean(panel),panelPosition:["right","bottom"].includes(panel)?panel:void 0,showTabs:parseBoolean(tabs)},ui={enableShortcuts:parseBoolean(shortcuts)},selectedPanel=addonPanel||void 0,storyId=storyIdFromUrl,customQueryParams=dequal2(prevParams,otherParams)?prevParams:otherParams;return prevParams=customQueryParams,{viewMode,layout,ui,selectedPanel,location:location22,path,customQueryParams,storyId}},init10=moduleArgs=>{let{store:store22,navigate,provider,fullAPI}=moduleArgs,navigateTo=(path,queryParams={},options3={})=>{let params=Object.entries(queryParams).filter(([,v2])=>v2).sort(([a2],[b3])=>a2`${k2}=${v2}`),to=[path,...params].join("&");return navigate(to,options3)},api={getQueryParam(key2){let{customQueryParams}=store22.getState();return customQueryParams?customQueryParams[key2]:void 0},getUrlState(){let{path,customQueryParams,storyId,url,viewMode}=store22.getState();return{path,queryParams:customQueryParams,storyId,url,viewMode}},setQueryParams(input){let{customQueryParams}=store22.getState(),queryParams={},update2={...customQueryParams,...Object.entries(input).reduce((acc,[key2,value2])=>(value2!==null&&(acc[key2]=value2),acc),queryParams)};dequal2(customQueryParams,update2)||(store22.setState({customQueryParams:update2}),provider.channel.emit(UPDATE_QUERY_PARAMS,update2))},navigateUrl(url,options3){navigate(url,{plain:!0,...options3})}},updateArgsParam=()=>{let{path,queryParams,viewMode}=api.getUrlState();if(viewMode!=="story")return;let currentStory=fullAPI.getCurrentStoryData();if(currentStory?.type!=="story")return;let{args:args2,initialArgs}=currentStory,argsString=buildArgsParam(initialArgs,args2);navigateTo(path,{...queryParams,args:argsString},{replace:!0}),api.setQueryParams({args:argsString})};provider.channel.on(SET_CURRENT_STORY,()=>updateArgsParam());let handleOrId;return provider.channel.on(STORY_ARGS_UPDATED,()=>{"requestIdleCallback"in globalWindow?(handleOrId&&globalWindow.cancelIdleCallback(handleOrId),handleOrId=globalWindow.requestIdleCallback(updateArgsParam,{timeout:1e3})):(handleOrId&&clearTimeout(handleOrId),setTimeout(updateArgsParam,100))}),provider.channel.on(GLOBALS_UPDATED,({globals,initialGlobals})=>{let{path,queryParams}=api.getUrlState(),globalsString=buildArgsParam(initialGlobals,globals);navigateTo(path,{...queryParams,globals:globalsString},{replace:!0}),api.setQueryParams({globals:globalsString})}),provider.channel.on(NAVIGATE_URL,(url,options3)=>{api.navigateUrl(url,options3)}),{api,state:initialUrlSupport(moduleArgs)}},versions_exports={};__export2(versions_exports,{init:()=>init11});var version="7.5.2",{VERSIONCHECK}=scope,getVersionCheckData=(0,import_memoizerific3.default)(1)(()=>{try{return{...JSON.parse(VERSIONCHECK).data||{}}}catch{return{}}}),init11=({store:store22})=>{let{dismissedVersionNotification}=store22.getState(),state={versions:{current:{version},...getVersionCheckData()},dismissedVersionNotification},api={getCurrentVersion:()=>{let{versions:{current}}=store22.getState();return current},getLatestVersion:()=>{let{versions:{latest,next,current}}=store22.getState();return current&&import_semver.default.prerelease(current.version)&&next?latest&&import_semver.default.gt(latest.version,next.version)?latest:next:latest},versionUpdateAvailable:()=>{let latest=api.getLatestVersion(),current=api.getCurrentVersion();if(latest){if(!latest.version||!current.version)return!0;let actualCurrent=import_semver.default.prerelease(current.version)?`${import_semver.default.major(current.version)}.${import_semver.default.minor(current.version)}.${import_semver.default.patch(current.version)}`:current.version,diff=import_semver.default.diff(actualCurrent,latest.version);return import_semver.default.gt(latest.version,actualCurrent)&&diff!=="patch"&&!diff.includes("pre")}return!1}};return{init:async()=>{let{versions={}}=store22.getState(),{latest,next}=getVersionCheckData();await store22.setState({versions:{...versions,latest,next}})},state,api}},whatsnew_exports={};__export2(whatsnew_exports,{init:()=>init12});var WHATS_NEW_NOTIFICATION_ID="whats-new",init12=({fullAPI,store:store22,provider})=>{let state={whatsNewData:void 0};function setWhatsNewState(newState){store22.setState({whatsNewData:newState}),state.whatsNewData=newState}let api={isWhatsNewUnread(){return state.whatsNewData?.status==="SUCCESS"&&!state.whatsNewData.postIsRead},whatsNewHasBeenRead(){state.whatsNewData?.status==="SUCCESS"&&(setWhatsNewCache({lastReadPost:state.whatsNewData.url}),setWhatsNewState({...state.whatsNewData,postIsRead:!0}),fullAPI.clearNotification(WHATS_NEW_NOTIFICATION_ID))},toggleWhatsNewNotifications(){state.whatsNewData?.status==="SUCCESS"&&(setWhatsNewState({...state.whatsNewData,disableWhatsNewNotifications:!state.whatsNewData.disableWhatsNewNotifications}),provider.channel.emit(TOGGLE_WHATS_NEW_NOTIFICATIONS,{disableWhatsNewNotifications:state.whatsNewData.disableWhatsNewNotifications}))}};function getLatestWhatsNewPost(){return provider.channel.emit(REQUEST_WHATS_NEW_DATA),new Promise(resolve=>provider.channel.once(RESULT_WHATS_NEW_DATA,({data})=>resolve(data)))}function setWhatsNewCache(cache){provider.channel.emit(SET_WHATS_NEW_CACHE,cache)}return{init:async()=>{if(scope.CONFIG_TYPE!=="DEVELOPMENT")return;let whatsNewData=await getLatestWhatsNewPost();setWhatsNewState(whatsNewData);let urlState=fullAPI.getUrlState();!(urlState?.path==="/onboarding"||urlState.queryParams?.onboarding==="true")&&whatsNewData.status==="SUCCESS"&&!whatsNewData.disableWhatsNewNotifications&&whatsNewData.showNotification&&fullAPI.addNotification({id:WHATS_NEW_NOTIFICATION_ID,link:"/settings/whats-new",content:{headline:whatsNewData.excerpt,subHeadline:"Click to learn what's new in Storybook"},icon:{name:"hearthollow"},onClear({dismissed}){dismissed&&setWhatsNewCache({lastDismissedPost:whatsNewData.url})}})},state,api}},globals_exports={};__export2(globals_exports,{init:()=>init13});var init13=({store:store22,fullAPI,provider})=>{let api={getGlobals(){return store22.getState().globals},getGlobalTypes(){return store22.getState().globalTypes},updateGlobals(newGlobals){provider.channel.emit(UPDATE_GLOBALS,{globals:newGlobals,options:{target:"storybook-preview-iframe"}})}},state={globals:{},globalTypes:{}},updateGlobals=globals=>{let currentGlobals=store22.getState()?.globals;dequal2(globals,currentGlobals)||store22.setState({globals})};return provider.channel.on(GLOBALS_UPDATED,function({globals}){let{ref}=getEventMetadata(this,fullAPI);ref?logger.warn("received a GLOBALS_UPDATED from a non-local ref. This is not currently supported."):updateGlobals(globals)}),provider.channel.on(SET_GLOBALS,function({globals,globalTypes}){let{ref}=getEventMetadata(this,fullAPI),currentGlobals=store22.getState()?.globals;ref?Object.keys(globals).length>0&&logger.warn("received globals from a non-local ref. This is not currently supported."):store22.setState({globals,globalTypes}),currentGlobals&&Object.keys(currentGlobals).length!==0&&!dequal2(globals,currentGlobals)&&api.updateGlobals(currentGlobals)}),{api,state}};function mockChannel(){let transport={setHandler:()=>{},send:()=>{}};return new Channel({transport})}var AddonStore=class{constructor(){this.loaders={},this.elements={},this.config={},this.getChannel=()=>(this.channel||this.setChannel(mockChannel()),this.channel),this.getServerChannel=()=>{if(!this.serverChannel)throw new Error("Accessing non-existent serverChannel");return this.serverChannel},this.ready=()=>this.promise,this.hasChannel=()=>!!this.channel,this.hasServerChannel=()=>!!this.serverChannel,this.setChannel=channel=>{this.channel=channel,this.resolve()},this.setServerChannel=channel=>{this.serverChannel=channel},this.addPanel=(id,options3)=>{this.add(id,{type:Addon_TypesEnum.PANEL,...options3})},this.setConfig=value2=>{Object.assign(this.config,value2),this.hasChannel()?this.getChannel().emit(SET_CONFIG,this.config):this.ready().then(channel=>{channel.emit(SET_CONFIG,this.config)})},this.getConfig=()=>this.config,this.register=(id,callback)=>{this.loaders[id]&&logger.warn(`${id} was loaded twice, this could have bad side-effects`),this.loaders[id]=callback},this.loadAddons=api=>{Object.values(this.loaders).forEach(value2=>value2(api))},this.promise=new Promise(res=>{this.resolve=()=>res(this.getChannel())})}getElements(type){return this.elements[type]||(this.elements[type]={}),this.elements[type]}add(id,addon){let{type}=addon,collection=this.getElements(type);collection[id]={id,...addon}}},KEY2="__STORYBOOK_ADDONS_MANAGER";function getAddonsStore(){return scope[KEY2]||(scope[KEY2]=new AddonStore),scope[KEY2]}var addons=getAddonsStore(),{ActiveTabs:ActiveTabs2}=layout_exports,ManagerContext=createContext2({api:void 0,state:initial_state_default({})}),combineParameters=(...parameterSets)=>(0,import_mergeWith.default)({},...parameterSets,(objValue,srcValue)=>{if(Array.isArray(srcValue))return srcValue}),ManagerProvider=class extends import_react2.Component{constructor(props){super(props),this.api={},this.initModules=()=>{this.modules.forEach(module=>{"init"in module&&module.init()})};let{location:location22,path,refId,viewMode=props.docsOptions.docsMode?"docs":props.viewMode,singleStory,storyId,docsOptions,navigate}=props,store22=new Store({getState:()=>this.state,setState:(stateChange,callback)=>this.setState(stateChange,callback)}),routeData={location:location22,path,viewMode,singleStory,storyId,refId},optionsData={docsOptions};this.state=store22.getInitialState(initial_state_default({...routeData,...optionsData}));let apiData={navigate,store:store22,provider:props.provider};this.modules=[provider_exports,channel_exports,addons_exports,layout_exports,notifications_exports,settings_exports,shortcuts_exports,stories_exports,refs_exports,globals_exports,url_exports,versions_exports,whatsnew_exports].map(m3=>m3.init({...routeData,...optionsData,...apiData,state:this.state,fullAPI:this.api}));let state=initial_state_default(this.state,...this.modules.map(m3=>m3.state)),api=Object.assign(this.api,{navigate},...this.modules.map(m3=>m3.api));this.state=state,this.api=api}static getDerivedStateFromProps(props,state){return state.path!==props.path?{...state,location:props.location,path:props.path,refId:props.refId,viewMode:props.viewMode,storyId:props.storyId}:null}shouldComponentUpdate(nextProps,nextState){let prevState=this.state,prevProps=this.props;return prevState!==nextState||prevProps.path!==nextProps.path}render(){let{children}=this.props,value2={state:this.state,api:this.api};return import_react2.default.createElement(EffectOnMount,{effect:this.initModules},import_react2.default.createElement(ManagerContext.Provider,{value:value2},import_react2.default.createElement(ManagerConsumer,null,children)))}};ManagerProvider.displayName="Manager";var EffectOnMount=({children,effect})=>(import_react2.default.useEffect(effect,[]),children),defaultFilter=c3=>c3;function ManagerConsumer({filter=defaultFilter,children}){let c3=(0,import_react2.useContext)(ManagerContext),renderer=(0,import_react2.useRef)(children),filterer=(0,import_react2.useRef)(filter);if(typeof renderer.current!="function")return import_react2.default.createElement(import_react2.Fragment,null,renderer.current);let data=filterer.current(c3),l2=(0,import_react2.useMemo)(()=>[...Object.entries(data).reduce((acc,keyval)=>acc.concat(keyval),[])],[c3.state]);return(0,import_react2.useMemo)(()=>{let Child=renderer.current;return import_react2.default.createElement(Child,{...data})},l2)}function useStorybookState(){let{state}=(0,import_react2.useContext)(ManagerContext);return{...state,get storiesHash(){return deprecate("state.storiesHash is deprecated, please use state.index"),this.index||{}},get storiesConfigured(){return deprecate("state.storiesConfigured is deprecated, please use state.previewInitialized"),this.previewInitialized},get storiesFailed(){return deprecate("state.storiesFailed is deprecated, please use state.indexError"),this.indexError}}}function useStorybookApi(){let{api}=(0,import_react2.useContext)(ManagerContext);return api}function orDefault(fromStore,defaultState2){return typeof fromStore>"u"?defaultState2:fromStore}var useChannel=(eventMap,deps=[])=>{let api=useStorybookApi();return(0,import_react2.useEffect)(()=>(Object.entries(eventMap).forEach(([type,listener])=>api.on(type,listener)),()=>{Object.entries(eventMap).forEach(([type,listener])=>api.off(type,listener))}),deps),api.emit};function useStoryPrepared(storyId){return useStorybookApi().isPrepared(storyId)}function useParameter(parameterKey,defaultValue){let result2=useStorybookApi().getCurrentParameter(parameterKey);return orDefault(result2,defaultValue)}globalThis.STORYBOOK_ADDON_STATE={};var{STORYBOOK_ADDON_STATE}=globalThis;function useSharedState(stateId,defaultState2){let api=useStorybookApi(),existingState=api.getAddonState(stateId)||STORYBOOK_ADDON_STATE[stateId],state=orDefault(existingState,STORYBOOK_ADDON_STATE[stateId]?STORYBOOK_ADDON_STATE[stateId]:defaultState2),quicksync=!1;state===defaultState2&&defaultState2!==void 0&&(STORYBOOK_ADDON_STATE[stateId]=defaultState2,quicksync=!0),(0,import_react2.useEffect)(()=>{quicksync&&api.setAddonState(stateId,defaultState2)},[quicksync]);let setState=async(s2,options3)=>{let result2=await api.setAddonState(stateId,s2,options3);return STORYBOOK_ADDON_STATE[stateId]=result2,result2},allListeners=(0,import_react2.useMemo)(()=>{let stateChangeHandlers={[`${SHARED_STATE_CHANGED}-client-${stateId}`]:setState,[`${SHARED_STATE_SET}-client-${stateId}`]:setState},stateInitializationHandlers={[SET_STORIES]:async()=>{let currentState=api.getAddonState(stateId);currentState?(STORYBOOK_ADDON_STATE[stateId]=currentState,api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,currentState)):STORYBOOK_ADDON_STATE[stateId]?(await setState(STORYBOOK_ADDON_STATE[stateId]),api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,STORYBOOK_ADDON_STATE[stateId])):defaultState2!==void 0&&(await setState(defaultState2),STORYBOOK_ADDON_STATE[stateId]=defaultState2,api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,defaultState2))},[STORY_CHANGED]:()=>{let currentState=api.getAddonState(stateId);currentState!==void 0&&api.emit(`${SHARED_STATE_SET}-manager-${stateId}`,currentState)}};return{...stateChangeHandlers,...stateInitializationHandlers}},[stateId]),emit=useChannel(allListeners);return[state,async(newStateOrMerger,options3)=>{let result2=await setState(newStateOrMerger,options3);emit(`${SHARED_STATE_CHANGED}-manager-${stateId}`,result2)}]}function useAddonState(addonId,defaultState2){return useSharedState(addonId,defaultState2)}function useArgs(){let{getCurrentStoryData,updateStoryArgs,resetStoryArgs}=useStorybookApi(),data=getCurrentStoryData(),args2=data?.type==="story"?data.args:{},updateArgs=(0,import_react2.useCallback)(newArgs=>updateStoryArgs(data,newArgs),[data,updateStoryArgs]),resetArgs=(0,import_react2.useCallback)(argNames=>resetStoryArgs(data,argNames),[data,resetStoryArgs]);return[args2,updateArgs,resetArgs]}function useGlobals(){let api=useStorybookApi();return[api.getGlobals(),api.updateGlobals]}function useGlobalTypes(){return useStorybookApi().getGlobalTypes()}function useCurrentStory(){let{getCurrentStoryData}=useStorybookApi();return getCurrentStoryData()}function useArgTypes(){let current=useCurrentStory();return current?.type==="story"&¤t.argTypes||{}}var StorybookError=class extends Error{constructor(){super(...arguments),this.data={},this.documentation=!1,this.fromStorybook=!0}get fullErrorCode(){let paddedCode=String(this.code).padStart(4,"0");return`SB_${this.category}_${paddedCode}`}get name(){let errorName=this.constructor.name;return`${this.fullErrorCode} (${errorName})`}get message(){let page;return this.documentation===!0?page=`https://storybook.js.org/error/${this.fullErrorCode}`:typeof this.documentation=="string"?page=this.documentation:Array.isArray(this.documentation)&&(page=` ${this.documentation.map(doc=>` - ${doc}`).join(` `)}`),`${this.template()}${page!=null?` diff --git a/sb-manager/index.js b/sb-manager/index.js index be695561268..e9ae10ca76e 100644 --- a/sb-manager/index.js +++ b/sb-manager/index.js @@ -1 +1 @@ -import{Provider,Root,renderStorybookUI}from"./chunk-WZJAIZ64.js";import"./chunk-OQCANWBN.js";import"./chunk-TCCQ5FBZ.js";import"./chunk-5AW67ZFX.js";import"./chunk-ZEU7PDD3.js";export{Provider,Root,renderStorybookUI}; +import{Provider,Root,renderStorybookUI}from"./chunk-AOJK37XK.js";import"./chunk-OQCANWBN.js";import"./chunk-TCCQ5FBZ.js";import"./chunk-5AW67ZFX.js";import"./chunk-ZEU7PDD3.js";export{Provider,Root,renderStorybookUI}; diff --git a/sb-manager/runtime.js b/sb-manager/runtime.js index 4edf792e343..03e8edb60b0 100644 --- a/sb-manager/runtime.js +++ b/sb-manager/runtime.js @@ -1 +1 @@ -import{Addon_TypesEnum,CHANNEL_CREATED,Provider,TELEMETRY_ERROR,UncaughtManagerError,addons,createBrowserChannel,dist_exports as dist_exports2,dist_exports2 as dist_exports3,dist_exports3 as dist_exports4,dist_exports4 as dist_exports5,dist_exports5 as dist_exports7,mockChannel,renderStorybookUI}from"./chunk-WZJAIZ64.js";import"./chunk-OQCANWBN.js";import"./chunk-TCCQ5FBZ.js";import{dist_exports,dist_exports2 as dist_exports6,require_react,require_react_dom,scope}from"./chunk-5AW67ZFX.js";import{__commonJS,__toESM}from"./chunk-ZEU7PDD3.js";var require_browser_dtector_umd_min=__commonJS({"../../node_modules/browser-dtector/browser-dtector.umd.min.js"(exports,module){(function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self).BrowserDetector=o()})(exports,function(){"use strict";function e(e2,o2){for(var r2=0;r21&&arguments[1]!==void 0?arguments[1]:-1,"})?")),r2=Number(e2).toString().match(o2);return r2?r2[0]:null},i=function(){return typeof window<"u"?window.navigator:null},t=function(){function t2(e2){var o2;(function(e3,o3){if(!(e3 instanceof o3))throw new TypeError("Cannot call a class as a function")})(this,t2),this.userAgent=e2||((o2=i())===null||o2===void 0?void 0:o2.userAgent)||null}var a,l,s;return a=t2,l=[{key:"parseUserAgent",value:function(e2){var t3,a2,l2,s2={},c=e2||this.userAgent||"",d=c.toLowerCase().replace(/\s\s+/g," "),u=/(edge)\/([\w.]+)/.exec(d)||/(edg)[/]([\w.]+)/.exec(d)||/(opr)[/]([\w.]+)/.exec(d)||/(opt)[/]([\w.]+)/.exec(d)||/(fxios)[/]([\w.]+)/.exec(d)||/(edgios)[/]([\w.]+)/.exec(d)||/(jsdom)[/]([\w.]+)/.exec(d)||/(samsungbrowser)[/]([\w.]+)/.exec(d)||/(electron)[/]([\w.]+)/.exec(d)||/(chrome)[/]([\w.]+)/.exec(d)||/(crios)[/]([\w.]+)/.exec(d)||/(opios)[/]([\w.]+)/.exec(d)||/(version)(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d)||/(webkit)[/]([\w.]+).*(version)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d)||/(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d)||/(webkit)[/]([\w.]+)/.exec(d)||/(opera)(?:.*version|)[/]([\w.]+)/.exec(d)||/(msie) ([\w.]+)/.exec(d)||/(fennec)[/]([\w.]+)/.exec(d)||d.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(d)||d.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(d)||[],f=/(ipad)/.exec(d)||/(ipod)/.exec(d)||/(iphone)/.exec(d)||/(jsdom)/.exec(d)||/(windows phone)/.exec(d)||/(xbox)/.exec(d)||/(win)/.exec(d)||/(tablet)/.exec(d)||/(android)/.test(d)&&/(mobile)/.test(d)===!1&&["androidTablet"]||/(android)/.exec(d)||/(mac)/.exec(d)||/(linux)/.exec(d)||/(cros)/.exec(d)||[],p=u[5]||u[3]||u[1]||null,w=f[0]||null,x=u[4]||u[2]||null,b=i();p==="chrome"&&typeof(b==null||(t3=b.brave)===null||t3===void 0?void 0:t3.isBrave)=="function"&&(p="brave"),p&&(s2[p]=!0),w&&(s2[w]=!0);var v=!!(s2.tablet||s2.android||s2.androidTablet),m=!!(s2.ipad||s2.tablet||s2.androidTablet),g=!!(s2.android||s2.androidTablet||s2.tablet||s2.ipad||s2.ipod||s2.iphone||s2["windows phone"]),h=!!(s2.cros||s2.mac||s2.linux||s2.win),y=!!(s2.brave||s2.chrome||s2.crios||s2.opr||s2.safari||s2.edg||s2.electron),A=!!(s2.msie||s2.rv);return{name:(a2=o[p])!==null&&a2!==void 0?a2:null,platform:(l2=r[w])!==null&&l2!==void 0?l2:null,userAgent:c,version:x,shortVersion:x?n(parseFloat(x),2):null,isAndroid:v,isTablet:m,isMobile:g,isDesktop:h,isWebkit:y,isIE:A}}},{key:"getBrowserInfo",value:function(){var e2=this.parseUserAgent();return{name:e2.name,platform:e2.platform,userAgent:e2.userAgent,version:e2.version,shortVersion:e2.shortVersion}}}],s=[{key:"VERSION",get:function(){return"3.4.0"}}],l&&e(a.prototype,l),s&&e(a,s),Object.defineProperty(a,"prototype",{writable:!1}),t2}();return t})}});var REACT=__toESM(require_react()),REACTDOM=__toESM(require_react_dom());var values={react:REACT,"react-dom":REACTDOM,"@storybook/components":dist_exports7,"@storybook/channels":dist_exports4,"@storybook/core-events":dist_exports3,"@storybook/router":dist_exports2,"@storybook/theming":dist_exports6,"@storybook/api":dist_exports5,"@storybook/manager-api":dist_exports5,"@storybook/addons":{addons,types:Addon_TypesEnum,mockChannel},"@storybook/client-logger":dist_exports};var Keys=(Keys2=>(Keys2.react="__REACT__",Keys2["react-dom"]="__REACTDOM__",Keys2["@storybook/components"]="__STORYBOOKCOMPONENTS__",Keys2["@storybook/channels"]="__STORYBOOKCHANNELS__",Keys2["@storybook/core-events"]="__STORYBOOKCOREEVENTS__",Keys2["@storybook/router"]="__STORYBOOKROUTER__",Keys2["@storybook/theming"]="__STORYBOOKTHEMING__",Keys2["@storybook/api"]="__STORYBOOKAPI__",Keys2["@storybook/manager-api"]="__STORYBOOKAPI__",Keys2["@storybook/addons"]="__STORYBOOKADDONS__",Keys2["@storybook/client-logger"]="__STORYBOOKCLIENTLOGGER__",Keys2))(Keys||{});var import_browser_dtector=__toESM(require_browser_dtector_umd_min()),browserInfo;function getBrowserInfo(){return browserInfo||(browserInfo=new import_browser_dtector.default(scope.navigator?.userAgent).getBrowserInfo()),browserInfo}var errorMessages=["ResizeObserver loop completed with undelivered notifications.","ResizeObserver loop limit exceeded","Script error."],shouldSkipError=error=>errorMessages.includes(error?.message);function prepareForTelemetry(originalError){let error=originalError;return(originalError.target===scope||originalError.currentTarget===scope||originalError.srcElement===scope)&&(error=new Error(originalError.message),error.name=originalError.name||error.name),originalError.fromStorybook||(error=new UncaughtManagerError({error})),error.browserInfo=getBrowserInfo(),error}var{FEATURES,CONFIG_TYPE}=scope,ReactProvider=class extends Provider{constructor(){super();let channel=createBrowserChannel({page:"manager"});addons.setChannel(channel),channel.emit(CHANNEL_CREATED),this.addons=addons,this.channel=channel,scope.__STORYBOOK_ADDONS_CHANNEL__=channel,FEATURES?.storyStoreV7&&CONFIG_TYPE==="DEVELOPMENT"&&(this.serverChannel=this.channel,addons.setServerChannel(this.serverChannel))}getElements(type){return this.addons.getElements(type)}getConfig(){return this.addons.getConfig()}handleAPI(api){this.addons.loadAddons(api)}};Object.keys(Keys).forEach(key=>{scope[Keys[key]]=values[key]});scope.sendTelemetryError=error=>{shouldSkipError(error)||scope.__STORYBOOK_ADDONS_CHANNEL__.emit(TELEMETRY_ERROR,prepareForTelemetry(error))};scope.addEventListener("error",args=>{let error=args.error||args;scope.sendTelemetryError(error)});scope.addEventListener("unhandledrejection",({reason})=>{scope.sendTelemetryError(reason)});var{document}=scope,rootEl=document.getElementById("root");renderStorybookUI(rootEl,new ReactProvider); +import{Addon_TypesEnum,CHANNEL_CREATED,Provider,TELEMETRY_ERROR,UncaughtManagerError,addons,createBrowserChannel,dist_exports as dist_exports2,dist_exports2 as dist_exports3,dist_exports3 as dist_exports4,dist_exports4 as dist_exports5,dist_exports5 as dist_exports7,mockChannel,renderStorybookUI}from"./chunk-AOJK37XK.js";import"./chunk-OQCANWBN.js";import"./chunk-TCCQ5FBZ.js";import{dist_exports,dist_exports2 as dist_exports6,require_react,require_react_dom,scope}from"./chunk-5AW67ZFX.js";import{__commonJS,__toESM}from"./chunk-ZEU7PDD3.js";var require_browser_dtector_umd_min=__commonJS({"../../node_modules/browser-dtector/browser-dtector.umd.min.js"(exports,module){(function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o():typeof define=="function"&&define.amd?define(o):(e=typeof globalThis<"u"?globalThis:e||self).BrowserDetector=o()})(exports,function(){"use strict";function e(e2,o2){for(var r2=0;r21&&arguments[1]!==void 0?arguments[1]:-1,"})?")),r2=Number(e2).toString().match(o2);return r2?r2[0]:null},i=function(){return typeof window<"u"?window.navigator:null},t=function(){function t2(e2){var o2;(function(e3,o3){if(!(e3 instanceof o3))throw new TypeError("Cannot call a class as a function")})(this,t2),this.userAgent=e2||((o2=i())===null||o2===void 0?void 0:o2.userAgent)||null}var a,l,s;return a=t2,l=[{key:"parseUserAgent",value:function(e2){var t3,a2,l2,s2={},c=e2||this.userAgent||"",d=c.toLowerCase().replace(/\s\s+/g," "),u=/(edge)\/([\w.]+)/.exec(d)||/(edg)[/]([\w.]+)/.exec(d)||/(opr)[/]([\w.]+)/.exec(d)||/(opt)[/]([\w.]+)/.exec(d)||/(fxios)[/]([\w.]+)/.exec(d)||/(edgios)[/]([\w.]+)/.exec(d)||/(jsdom)[/]([\w.]+)/.exec(d)||/(samsungbrowser)[/]([\w.]+)/.exec(d)||/(electron)[/]([\w.]+)/.exec(d)||/(chrome)[/]([\w.]+)/.exec(d)||/(crios)[/]([\w.]+)/.exec(d)||/(opios)[/]([\w.]+)/.exec(d)||/(version)(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d)||/(webkit)[/]([\w.]+).*(version)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d)||/(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d)||/(webkit)[/]([\w.]+)/.exec(d)||/(opera)(?:.*version|)[/]([\w.]+)/.exec(d)||/(msie) ([\w.]+)/.exec(d)||/(fennec)[/]([\w.]+)/.exec(d)||d.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(d)||d.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(d)||[],f=/(ipad)/.exec(d)||/(ipod)/.exec(d)||/(iphone)/.exec(d)||/(jsdom)/.exec(d)||/(windows phone)/.exec(d)||/(xbox)/.exec(d)||/(win)/.exec(d)||/(tablet)/.exec(d)||/(android)/.test(d)&&/(mobile)/.test(d)===!1&&["androidTablet"]||/(android)/.exec(d)||/(mac)/.exec(d)||/(linux)/.exec(d)||/(cros)/.exec(d)||[],p=u[5]||u[3]||u[1]||null,w=f[0]||null,x=u[4]||u[2]||null,b=i();p==="chrome"&&typeof(b==null||(t3=b.brave)===null||t3===void 0?void 0:t3.isBrave)=="function"&&(p="brave"),p&&(s2[p]=!0),w&&(s2[w]=!0);var v=!!(s2.tablet||s2.android||s2.androidTablet),m=!!(s2.ipad||s2.tablet||s2.androidTablet),g=!!(s2.android||s2.androidTablet||s2.tablet||s2.ipad||s2.ipod||s2.iphone||s2["windows phone"]),h=!!(s2.cros||s2.mac||s2.linux||s2.win),y=!!(s2.brave||s2.chrome||s2.crios||s2.opr||s2.safari||s2.edg||s2.electron),A=!!(s2.msie||s2.rv);return{name:(a2=o[p])!==null&&a2!==void 0?a2:null,platform:(l2=r[w])!==null&&l2!==void 0?l2:null,userAgent:c,version:x,shortVersion:x?n(parseFloat(x),2):null,isAndroid:v,isTablet:m,isMobile:g,isDesktop:h,isWebkit:y,isIE:A}}},{key:"getBrowserInfo",value:function(){var e2=this.parseUserAgent();return{name:e2.name,platform:e2.platform,userAgent:e2.userAgent,version:e2.version,shortVersion:e2.shortVersion}}}],s=[{key:"VERSION",get:function(){return"3.4.0"}}],l&&e(a.prototype,l),s&&e(a,s),Object.defineProperty(a,"prototype",{writable:!1}),t2}();return t})}});var REACT=__toESM(require_react()),REACTDOM=__toESM(require_react_dom());var values={react:REACT,"react-dom":REACTDOM,"@storybook/components":dist_exports7,"@storybook/channels":dist_exports4,"@storybook/core-events":dist_exports3,"@storybook/router":dist_exports2,"@storybook/theming":dist_exports6,"@storybook/api":dist_exports5,"@storybook/manager-api":dist_exports5,"@storybook/addons":{addons,types:Addon_TypesEnum,mockChannel},"@storybook/client-logger":dist_exports};var Keys=(Keys2=>(Keys2.react="__REACT__",Keys2["react-dom"]="__REACTDOM__",Keys2["@storybook/components"]="__STORYBOOKCOMPONENTS__",Keys2["@storybook/channels"]="__STORYBOOKCHANNELS__",Keys2["@storybook/core-events"]="__STORYBOOKCOREEVENTS__",Keys2["@storybook/router"]="__STORYBOOKROUTER__",Keys2["@storybook/theming"]="__STORYBOOKTHEMING__",Keys2["@storybook/api"]="__STORYBOOKAPI__",Keys2["@storybook/manager-api"]="__STORYBOOKAPI__",Keys2["@storybook/addons"]="__STORYBOOKADDONS__",Keys2["@storybook/client-logger"]="__STORYBOOKCLIENTLOGGER__",Keys2))(Keys||{});var import_browser_dtector=__toESM(require_browser_dtector_umd_min()),browserInfo;function getBrowserInfo(){return browserInfo||(browserInfo=new import_browser_dtector.default(scope.navigator?.userAgent).getBrowserInfo()),browserInfo}var errorMessages=["ResizeObserver loop completed with undelivered notifications.","ResizeObserver loop limit exceeded","Script error."],shouldSkipError=error=>errorMessages.includes(error?.message);function prepareForTelemetry(originalError){let error=originalError;return(originalError.target===scope||originalError.currentTarget===scope||originalError.srcElement===scope)&&(error=new Error(originalError.message),error.name=originalError.name||error.name),originalError.fromStorybook||(error=new UncaughtManagerError({error})),error.browserInfo=getBrowserInfo(),error}var{FEATURES,CONFIG_TYPE}=scope,ReactProvider=class extends Provider{constructor(){super();let channel=createBrowserChannel({page:"manager"});addons.setChannel(channel),channel.emit(CHANNEL_CREATED),this.addons=addons,this.channel=channel,scope.__STORYBOOK_ADDONS_CHANNEL__=channel,FEATURES?.storyStoreV7&&CONFIG_TYPE==="DEVELOPMENT"&&(this.serverChannel=this.channel,addons.setServerChannel(this.serverChannel))}getElements(type){return this.addons.getElements(type)}getConfig(){return this.addons.getConfig()}handleAPI(api){this.addons.loadAddons(api)}};Object.keys(Keys).forEach(key=>{scope[Keys[key]]=values[key]});scope.sendTelemetryError=error=>{shouldSkipError(error)||scope.__STORYBOOK_ADDONS_CHANNEL__.emit(TELEMETRY_ERROR,prepareForTelemetry(error))};scope.addEventListener("error",args=>{let error=args.error||args;scope.sendTelemetryError(error)});scope.addEventListener("unhandledrejection",({reason})=>{scope.sendTelemetryError(reason)});var{document}=scope,rootEl=document.getElementById("root");renderStorybookUI(rootEl,new ReactProvider);