diff --git a/client/dist/js/TinyMCE_sslink-email.js b/client/dist/js/TinyMCE_sslink-email.js
index dc0f94ce3..2e43e4033 100644
--- a/client/dist/js/TinyMCE_sslink-email.js
+++ b/client/dist/js/TinyMCE_sslink-email.js
@@ -1 +1 @@
-!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/TinyMCE_sslink-email.js")}({"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),l=i(a),s=n(6),u=i(s),c=n(0),d=i(c),f=n(3),m=i(f),p=n(5),g=n(4);l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51},editorIdentifier).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},_="insert-link__dialog-wrapper--email",b=(0,g.loadComponent)((0,p.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));m.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkEmailDialog:function(){var t=e("#"+_);t.length||(t=e('
'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+_).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),a=tinymce.activeEditor.selection,l=a.getContent()||"",s=a.getNode().tagName,c="A"!==s&&""===l.trim();d.default.render(u.default.createElement(b,{isOpen:e,onInsert:i,onClosed:n,title:o.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:c}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("?"),r=i[0].replace(/^mailto:/,"").split("?")[0];r.match(/.+@.+\..+/)||(r="");var o=i[1]?i[1].match(/subject=([^&]+)/):"";return{Link:r,Subject:o?decodeURIComponent(o[1]):"",Description:n.attr("title")}},buildAttributes:function(e){var t=this._super(e),n="",i=t.href.replace(/^mailto:/,"").split("?")[0];return i.match(/.+@.+\..+/)||(i=""),i&&(n="mailto:"+i),n&&e.Subject&&(n=n+"?subject="+encodeURIComponent(e.Subject)),t.href=n,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},0:function(e,t){e.exports=ReactDom},1:function(e,t){e.exports=TinyMCEActionRegistrar},2:function(e,t){e.exports=i18n},3:function(e,t){e.exports=jQuery},4:function(e,t){e.exports=Injector},5:function(e,t){e.exports=InsertLinkModal},6:function(e,t){e.exports=React}});
\ No newline at end of file
+!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/TinyMCE_sslink-email.js")}({"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),l=i(a),s=n(6),u=i(s),c=n(0),d=i(c),f=n(3),m=i(f),p=n(5),g=n(4);l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51},editorIdentifier).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},_="insert-link__dialog-wrapper--email",h=(0,g.loadComponent)((0,p.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));m.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkEmailDialog:function(){var t=e("#"+_);t.length||(t=e('
'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+_).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),c=l.getNode().tagName,f="A"!==c&&""===s.trim();d.default.render(u.default.createElement(h,{isOpen:e,onInsert:i,onClosed:n,title:o.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:f}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("?"),r=i[0].replace(/^mailto:/,"").split("?")[0];r.match(/.+@.+\..+/)||(r="");var o=i[1]?i[1].match(/subject=([^&]+)/):"";return{Link:r,Subject:o?decodeURIComponent(o[1]):"",Description:n.attr("title")}},buildAttributes:function(e){var t=this._super(e),n="",i=t.href.replace(/^mailto:/,"").split("?")[0];return i.match(/.+@.+\..+/)||(i=""),i&&(n="mailto:"+i),n&&e.Subject&&(n=n+"?subject="+encodeURIComponent(e.Subject)),t.href=n,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},0:function(e,t){e.exports=ReactDom},1:function(e,t){e.exports=TinyMCEActionRegistrar},2:function(e,t){e.exports=i18n},3:function(e,t){e.exports=jQuery},4:function(e,t){e.exports=Injector},5:function(e,t){e.exports=InsertLinkModal},6:function(e,t){e.exports=React}});
\ No newline at end of file
diff --git a/client/dist/js/TinyMCE_sslink-external.js b/client/dist/js/TinyMCE_sslink-external.js
index b97a9e267..5c41508dd 100644
--- a/client/dist/js/TinyMCE_sslink-external.js
+++ b/client/dist/js/TinyMCE_sslink-external.js
@@ -1 +1 @@
-!function(e){function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/legacy/TinyMCE_sslink-external.js")}({"./client/src/legacy/TinyMCE_sslink-external.js":function(e,n,t){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=t(2),o=i(r),a=t(1),l=i(a),s=t(6),u=i(s),c=t(0),d=i(c),f=t(3),p=i(f),x=t(5),m=t(4);l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onAction:function(e){return e.execCommand("sslinkexternal")},priority:70},editorIdentifier);var _={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},g="insert-link__dialog-wrapper--external",k=(0,m.loadComponent)((0,x.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+g);n.length||(n=e('
'),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+g).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),a=tinymce.activeEditor.selection,l=a.getContent()||"",s=a.getNode().tagName,c="A"!==s&&""===l.trim();d.default.render(u.default.createElement(k,{isOpen:e,onInsert:i,onClosed:t,title:o.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:r,identifier:"Admin.InsertLinkExternalModal",requireLinkText:c}),this[0])},buildAttributes:function(e){var n=this._super(e),t=n.href;return t.match(/:\/\//)||(t=window.location.protocol+"//"+t),t=t.replace(/.*:\/\/(#.*)$/,"$1"),t.match(/:\/\/$/)&&(t=""),n.href=t,n}})}),tinymce.PluginManager.add("sslinkexternal",function(e){return _.init(e)}),n.default=_},0:function(e,n){e.exports=ReactDom},1:function(e,n){e.exports=TinyMCEActionRegistrar},2:function(e,n){e.exports=i18n},3:function(e,n){e.exports=jQuery},4:function(e,n){e.exports=Injector},5:function(e,n){e.exports=InsertLinkModal},6:function(e,n){e.exports=React}});
\ No newline at end of file
+!function(e){function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/legacy/TinyMCE_sslink-external.js")}({"./client/src/legacy/TinyMCE_sslink-external.js":function(e,n,t){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=t(2),o=i(r),a=t(1),l=i(a),s=t(6),u=i(s),c=t(0),d=i(c),f=t(3),p=i(f),x=t(5),m=t(4);l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onAction:function(e){return e.execCommand("sslinkexternal")},priority:70},editorIdentifier);var g={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},_="insert-link__dialog-wrapper--external",k=(0,m.loadComponent)((0,x.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+_);n.length||(n=e('
'),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+_).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),c=l.getNode().tagName,f="A"!==c&&""===s.trim();d.default.render(u.default.createElement(k,{isOpen:e,onInsert:i,onClosed:t,title:o.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:r,identifier:"Admin.InsertLinkExternalModal",requireLinkText:f}),this[0])},buildAttributes:function(e){var n=this._super(e),t=n.href;return t.match(/:\/\//)||(t=window.location.protocol+"//"+t),t=t.replace(/.*:\/\/(#.*)$/,"$1"),t.match(/:\/\/$/)&&(t=""),n.href=t,n}})}),tinymce.PluginManager.add("sslinkexternal",function(e){return g.init(e)}),n.default=g},0:function(e,n){e.exports=ReactDom},1:function(e,n){e.exports=TinyMCEActionRegistrar},2:function(e,n){e.exports=i18n},3:function(e,n){e.exports=jQuery},4:function(e,n){e.exports=Injector},5:function(e,n){e.exports=InsertLinkModal},6:function(e,n){e.exports=React}});
\ No newline at end of file
diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js
index 8c8feaaa2..2fbef811a 100644
--- a/client/dist/js/bundle.js
+++ b/client/dist/js/bundle.js
@@ -1 +1 @@
-webpackJsonp([0],{"./client/src/boot/BootRoutes.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0}},{key:"handleBeforeUnload",value:function(e,t){return t(!this.shouldConfirmBeforeUnload()||confirm(C.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved.")))}},{key:"handleBeforeRoute",value:function(e,t){return t(!this.shouldConfirmBeforeUnload()||confirm(C.default._t("Admin.CONFIRMUNSAVED","Are you sure you want to navigate away\n from this page?\n\nWARNING: Your changes have not been saved.\n\n\n Press OK to continue, or Cancel to stay on the current page.")))}}]),e}();t.default=k},"./client/src/boot/apollo/buildCache.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/apollo-cache-inmemory/lib/bundle.esm.js"),o=n("./client/src/boot/apollo/dataIdFromObject.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e){return new r.InMemoryCache({fragmentMatcher:e?new r.IntrospectionFragmentMatcher({introspectionQueryResultData:e}):null,dataIdFromObject:a.default,addTypename:!0})};t.default=i},"./client/src/boot/apollo/buildClient.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&e.__typename?e.__typename+":"+t:null};t.default=r},"./client/src/boot/apollo/getGraphqlFragments.js":function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e){var t=e.data;return t.__schema.types=t.__schema.types.filter(function(e){return null!==e.possibleTypes}),t},s=function(e){if(!e.ok)throw new Error("The types.graphql file could not be loaded. You probably need to run a ?flush to generate it.\n Alternatively, you can use the IntrospectionProvider extension to generate the file dynamically.\n More information: https://github.com/silverstripe/silverstripe-graphql/#schema-introspection");return e},l=function(){var e=r(regeneratorRuntime.mark(function e(t){var n,o,l,c,u,d,f,p,h=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=!!document.body.getAttribute("data-graphql-legacy"),o=[t+"_graphql/admin.types.graphql",t+"admin.types.graphql"],l=[t+"admin/graphql/types",t+"assets/admin.types.graphql"],c=void 0,u=void 0,n?(h&&l.reverse(),c=l[0],u=l[1]):(c=o[0],u=o[1]),d={method:"GET",headers:{"Content-Type":"application/json"},uri:""+t,credentials:"same-origin"},f=function(){var e=r(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,a.default)(t,d).then(s).then(function(e){return e.json()}).then(i));case 1:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}(),p=void 0,e.prev=9,e.next=12,f(c);case 12:p=e.sent,e.next=28;break;case 15:if(e.prev=15,e.t0=e.catch(9),u){e.next=19;break}return e.abrupt("return",Promise.reject(e.t0));case 19:return e.prev=19,e.next=22,f(u);case 22:p=e.sent,e.next=28;break;case 25:return e.prev=25,e.t1=e.catch(19),e.abrupt("return",Promise.reject(e.t1));case 28:return e.abrupt("return",Promise.resolve(p));case 29:case"end":return e.stop()}},e,void 0,[[9,15],[19,25]])}));return function(t){return e.apply(this,arguments)}}();t.default=l},"./client/src/boot/applyDevtools.js":function(e,t,n){"use strict";function r(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,n=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension;return"function"==typeof t?t(e):"function"==typeof n?(0,o.compose)(e,n()):e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(7)},"./client/src/boot/applyTransforms.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=e.extraClass?e.extraClass.split(" ").reduce(function(e,t){return a({},e,o({},t,!0))},{}):{};"string"==typeof e.data.pristineClass&&(n[e.data.pristineClass]=t),"string"==typeof e.data.dirtyClass&&(n[e.data.dirtyClass]=!t);var r=t?e.data.pristineTitle:e.data.dirtyTitle,i=t?e.data.pristineIcon:e.data.dirtyIcon;return a({},e,{title:r||e.title,icon:i||e.icon,extraClass:(0,d.default)(n)})},b=function(){s.default.transform("field-holders",function(e){["FieldGroup"].forEach(function(t){return e.component("FieldGroup",h.default,t+"Holder")})}),s.default.transform("form-action-changed",function(e){e.form.alterSchema("*",function(e){return e.mutateField("action_save",function(t){var n=e.isPristine();return m(t,n)}),e.mutateField("action_publish",function(t){var n=t.data.isPublished&&!t.data.isModified&&e.isPristine();return m(t,n)}),e.getState()})}),s.default.transform("schema-validation",function(e){e.form.addValidation("*",function(e,t,n){var r=new c.default(e),i=Object.keys(e).reduce(function(e,t){var i=(0,f.findField)(n.fields,t);if(!i)return e;var s=r.validateFieldSchema(i),l=s.valid,c=s.errors;return l?e:a({},e,o({},t,c))},{});return t.addErrors(i),t.getState()})})};t.default=b},"./client/src/boot/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var a=function(){var e=o(regeneratorRuntime.mark(function e(){var t,n,r,o,a,i,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.default.get("absoluteBaseUrl"),e.next=3,(0,b.default)(t);case 3:n=e.sent,(0,y.default)(),(0,j.default)(),r=[f.default],o=h.default.get("debugging"),a=u.applyMiddleware.apply(void 0,r),o&&(a=(0,O.default)(a)),i=a(u.createStore),window.ss.apolloClient=n,l=new s.default(null,n),(0,C.default)(),c.default.init(function(){var e=(0,u.combineReducers)(c.default.reducer.getAll()),t=i(e,{});t.dispatch((0,v.setConfig)(h.default.getAll())),c.default.reducer.setStore(t),window.ss.store=t,l.setStore(t),l.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")}),window.setTimeout(function(){return c.default.load()},0);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),i=n("./client/src/boot/BootRoutes.js"),s=r(i),l=n(10),c=r(l),u=n(7),d=n(56),f=r(d),p=n(19),h=r(p),m=n("./client/src/boot/apollo/buildClient.js"),b=r(m),v=n("./client/src/state/config/ConfigActions.js"),g=n("./client/src/boot/registerComponents.js"),y=r(g),_=n("./client/src/boot/registerReducers.js"),j=r(_),w=n("./client/src/boot/applyDevtools.js"),O=r(w),E=n("./client/src/boot/applyTransforms.js"),C=r(E);window.ss=window.ss||{},window.onload=a},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(10),i=r(a),s=n("./client/src/components/ActionMenu/ActionMenu.js"),l=r(s),c=n(30),u=r(c),d=n(18),f=r(d),p=n(28),h=r(p),m=n("./client/src/components/TextField/TextField.js"),b=r(m),v=n("./client/src/components/HiddenField/HiddenField.js"),g=r(v),y=n("./client/src/components/DateField/DateField.js"),_=r(y),j=n("./client/src/components/TimeField/TimeField.js"),w=r(j),O=n("./client/src/components/DatetimeField/DatetimeField.js"),E=r(O),C=n("./client/src/components/CheckboxField/CheckboxField.js"),T=r(C),S=n("./client/src/components/CheckboxSetField/CheckboxSetField.js"),x=r(S),k=n("./client/src/components/OptionsetField/OptionsetField.js"),P=r(k),F=n(46),D=r(F),A=n("./client/src/components/GridFieldActions/GridFieldActions.js"),M=r(A),R=n("./client/src/components/SingleSelectField/SingleSelectField.js"),I=r(R),N=n("./client/src/components/PopoverField/PopoverField.js"),L=r(N),B=n("./client/src/components/HeaderField/HeaderField.js"),U=r(B),H=n(47),V=r(H),G=n("./client/src/components/HtmlReadonlyField/HtmlReadonlyField.js"),q=r(G),z=n("./client/src/components/LookupField/LookupField.js"),$=r(z),W=n("./client/src/components/CompositeField/CompositeField.js"),K=r(W),X=n("./client/src/components/LabelField/LabelField.js"),Y=r(X),Q=n("./client/src/components/Tabs/Tabs.js"),J=r(Q),Z=n("./client/src/components/Tabs/TabItem.js"),ee=r(Z),te=n(43),ne=r(te),re=n("./client/src/components/FieldGroup/FieldGroup.js"),oe=r(re),ae=n(38),ie=r(ae),se=n(33),le=r(se),ce=n("./client/src/components/NotFoundComponent/NotFoundComponent.js"),ue=r(ce),de=n("./client/src/components/Form/Form.js"),fe=r(de),pe=n(20),he=r(pe),me=n(49),be=r(me),ve=n("./client/src/containers/Form/Form.js"),ge=r(ve),ye=n("./client/src/components/UsedOnTable/UsedOnTable.js"),_e=r(ye),je=n(23),we=r(je),Oe=n(60),Ee=r(Oe),Ce=n(62),Te=r(Ce),Se=n(25),xe=r(Se),ke=n(26),Pe=r(ke),Fe=n(36),De=r(Fe),Ae=n(31),Me=r(Ae),Re=n("./client/src/components/Tip/Tip.js"),Ie=r(Re),Ne=n(35),Le=r(Ne),Be=n(58),Ue=r(Be),He=n("./client/src/components/HtmlEditorField/HtmlEditorField.js"),Ve=r(He),Ge=n("./client/src/components/NumberField/NumberField.js"),qe=r(Ge),ze=n("./client/src/components/PopoverOptionSet/PopoverOptionSet.js"),$e=r(ze),We=n("./client/src/containers/ToastsContainer/ToastsContainer.js"),Ke=r(We);t.default=function(){i.default.component.registerMany({ActionMenu:l.default,Badge:u.default,Button:f.default,BackButton:h.default,TextField:b.default,HiddenField:g.default,DateField:_.default,TimeField:w.default,DatetimeField:E.default,CheckboxField:T.default,CheckboxSetField:x.default,OptionsetField:P.default,GridField:D.default,GridFieldActions:M.default,FieldGroup:oe.default,SingleSelectField:I.default,PopoverField:L.default,HeaderField:U.default,LiteralField:V.default,HtmlReadonlyField:q.default,LookupField:$.default,CompositeField:K.default,Tabs:J.default,TabItem:ee.default,FormAction:ne.default,LabelField:Y.default,TreeDropdownField:ie.default,Preview:be.default,ReduxForm:ge.default,ReduxFormField:o.Field,Form:fe.default,FormAlert:he.default,FormBuilderModal:le.default,NotFoundComponent:ue.default,UsedOnTable:_e.default,Loading:we.default,VersionedBadge:Ee.default,ViewModeToggle:Te.default,ResizeAware:xe.default,Tag:Pe.default,TagList:De.default,CompactTagList:Me.default,Tip:Ie.default,Search:Le.default,SearchToggle:Ue.default,HtmlEditorField:Ve.default,NumberField:qe.default,PopoverOptionSet:$e.default,ToastsContainer:Ke.default})}},"./client/src/boot/registerReducers.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=(0,s.combineReducers)({formState:l.reducer,formSchemas:f.default});i.default.reducer.registerMany(o({config:u.default,form:t,records:h.default,breadcrumbs:b.default,treeDropdownField:g.default,tabs:_.default,mobileMenu:w.default,unsavedForms:E.default,usedOn:T.default,viewMode:P.default,toasts:D.default},e)),i.default.transform("admin",function(e){e.reducer("form",x.default)})}},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./client/src/i18n.js"),n("./node_modules/expose-loader/index.js?SilverStripeComponent!./client/src/lib/SilverStripeComponent.js-exposed"),n("./node_modules/expose-loader/index.js?Backend!./client/src/lib/Backend.js-exposed"),n("./node_modules/expose-loader/index.js?schemaFieldValues!./client/src/lib/schemaFieldValues.js-exposed"),n("./node_modules/expose-loader/index.js?FormAlert!./client/src/components/FormAlert/FormAlert.js-exposed"),n("./node_modules/expose-loader/index.js?Injector!./client/src/lib/Injector.js-exposed"),n("./node_modules/expose-loader/index.js?reduxFieldReducer!./client/src/lib/reduxFieldReducer.js-exposed"),n("./node_modules/expose-loader/index.js?getFormState!./client/src/lib/getFormState.js-exposed"),n("./node_modules/expose-loader/index.js?PopoverField!./client/src/components/PopoverField/PopoverField.js-exposed"),n("./node_modules/expose-loader/index.js?FieldHolder!./client/src/components/FieldHolder/FieldHolder.js-exposed"),n("./node_modules/expose-loader/index.js?Form!./client/src/components/Form/Form.js-exposed"),n("./node_modules/expose-loader/index.js?FormConstants!./client/src/components/Form/FormConstants.js-exposed"),n("./node_modules/expose-loader/index.js?FormAction!./client/src/components/FormAction/FormAction.js-exposed"),n("./node_modules/expose-loader/index.js?SchemaActions!./client/src/state/schema/SchemaActions.js-exposed"),n("./node_modules/expose-loader/index.js?ToastsActions!./client/src/state/toasts/ToastsActions.js-exposed"),n("./node_modules/expose-loader/index.js?FileStatusIcon!./client/src/components/FileStatusIcon/FileStatusIcon.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilder!./client/src/components/FormBuilder/FormBuilder.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderLoader!./client/src/containers/FormBuilderLoader/FormBuilderLoader.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderModal!./client/src/components/FormBuilderModal/FormBuilderModal.js-exposed"),n("./node_modules/expose-loader/index.js?FileSchemaModalHandler!./client/src/containers/InsertLinkModal/fileSchemaModalHandler.js-exposed"),n("./node_modules/expose-loader/index.js?InsertLinkModal!./client/src/containers/InsertLinkModal/InsertLinkModal.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActions!./client/src/state/records/RecordsActions.js-exposed"),n("./node_modules/expose-loader/index.js?GridField!./client/src/components/GridField/GridField.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldCell!./client/src/components/GridField/GridFieldCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeader!./client/src/components/GridField/GridFieldHeader.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeaderCell!./client/src/components/GridField/GridFieldHeaderCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldRow!./client/src/components/GridField/GridFieldRow.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldTable!./client/src/components/GridField/GridFieldTable.js-exposed"),n("./node_modules/expose-loader/index.js?Accordion!./client/src/components/Accordion/Accordion.js-exposed"),n("./node_modules/expose-loader/index.js?AccordionBlock!./client/src/components/Accordion/AccordionBlock.js-exposed"),n("./node_modules/expose-loader/index.js?Button!./client/src/components/Button/Button.js-exposed"),n("./node_modules/expose-loader/index.js?BackButton!./client/src/components/Button/BackButton.js-exposed"),n("./node_modules/expose-loader/index.js?HiddenField!./client/src/components/HiddenField/HiddenField.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroup!./client/src/components/ListGroup/ListGroup.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroupItem!./client/src/components/ListGroup/ListGroupItem.js-exposed"),n("./node_modules/expose-loader/index.js?Loading!./client/src/components/Loading/Loading.js-exposed"),n("./node_modules/expose-loader/index.js?TextField!./client/src/components/TextField/TextField.js-exposed"),n("./node_modules/expose-loader/index.js?LiteralField!./client/src/components/LiteralField/LiteralField.js-exposed"),n("./node_modules/expose-loader/index.js?Toolbar!./client/src/components/Toolbar/Toolbar.js-exposed"),n("./node_modules/expose-loader/index.js?FileStatusIcon!./client/src/components/FileStatusIcon/FileStatusIcon.js-exposed"),n("./node_modules/expose-loader/index.js?Breadcrumb!./client/src/components/Breadcrumb/Breadcrumb.js-exposed"),n("./node_modules/expose-loader/index.js?ResizeAware!./client/src/components/ResizeAware/ResizeAware.js-exposed"),n("./node_modules/expose-loader/index.js?TabsActions!./client/src/state/tabs/TabsActions.js-exposed"),n("./node_modules/expose-loader/index.js?Tag!./client/src/components/Tag/Tag.js-exposed"),n("./node_modules/expose-loader/index.js?TagList!./client/src/components/Tag/TagList.js-exposed"),n("./node_modules/expose-loader/index.js?CompactTagList!./client/src/components/Tag/CompactTagList.js-exposed"),n("./node_modules/expose-loader/index.js?Tip!./client/src/components/Tip/Tip.js-exposed"),n("./node_modules/expose-loader/index.js?Search!./client/src/components/Search/Search.js-exposed"),n("./node_modules/expose-loader/index.js?SearchToggle!./client/src/components/Search/SearchToggle.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldNode!./client/src/components/TreeDropdownField/TreeDropdownFieldNode.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldMenu!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownField!./client/src/components/TreeDropdownField/TreeDropdownField.js-exposed"),n("./node_modules/expose-loader/index.js?BreadcrumbsActions!./client/src/state/breadcrumbs/BreadcrumbsActions.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActionTypes!./client/src/state/records/RecordsActionTypes.js-exposed"),n("./node_modules/expose-loader/index.js?UnsavedFormsActions!./client/src/state/unsavedForms/UnsavedFormsActions.js-exposed"),n("./node_modules/expose-loader/index.js?Badge!./client/src/components/Badge/Badge.js-exposed"),n("./node_modules/expose-loader/index.js?Button!./client/src/components/Button/Button.js-exposed"),n("./node_modules/expose-loader/index.js?BackButton!./client/src/components/Button/BackButton.js-exposed"),n("./node_modules/expose-loader/index.js?VersionedBadge!./client/src/components/VersionedBadge/VersionedBadge.js-exposed"),n("./node_modules/expose-loader/index.js?CheckboxSetField!./client/src/components/CheckboxSetField/CheckboxSetField.js-exposed"),n("./node_modules/expose-loader/index.js?Preview!./client/src/components/Preview/Preview.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeStates!./client/src/state/viewMode/ViewModeStates.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeActions!./client/src/state/viewMode/ViewModeActions.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeToggle!./client/src/components/ViewModeToggle/ViewModeToggle.js-exposed"),n("./node_modules/expose-loader/index.js?Focusedzone!./client/src/components/Focusedzone/Focusedzone.js-exposed"),n("./node_modules/expose-loader/index.js?Config!./client/src/lib/Config.js-exposed"),n("./node_modules/expose-loader/index.js?DataFormat!./client/src/lib/DataFormat.js-exposed"),n("./node_modules/expose-loader/index.js?ReactRouteRegister!./client/src/lib/ReactRouteRegister.js-exposed"),n("./node_modules/expose-loader/index.js?Router!./client/src/lib/Router.js-exposed"),n("./node_modules/expose-loader/index.js?TinyMCEActionRegistrar!./client/src/lib/TinyMCEActionRegistrar.js-exposed"),n("./node_modules/expose-loader/index.js?ShortcodeSerialiser!./client/src/lib/ShortcodeSerialiser.js-exposed"),n("./node_modules/expose-loader/index.js?formatWrittenNumber!./client/src/lib/formatWrittenNumber.js-exposed"),n("./node_modules/expose-loader/index.js?withDragDropContext!./client/src/lib/withDragDropContext.js-exposed"),n("./client/src/legacy/jquery.changetracker.js"),n("./client/src/legacy/sspath.js"),n("./client/src/legacy/ssui.core.js"),n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/LeftAndMain.ActionTabSet.js"),n("./client/src/legacy/LeftAndMain.Panel.js"),n("./client/src/legacy/LeftAndMain.Tree.js"),n("./client/src/legacy/LeftAndMain.Content.js"),n("./client/src/legacy/LeftAndMain.EditForm.js"),n("./client/src/legacy/LeftAndMain.Menu.js"),n("./client/src/legacy/LeftAndMain.MobileMenuToggle.js"),n("./client/src/legacy/LeftAndMain.Preview.js"),n("./client/src/legacy/LeftAndMain.BatchActions.js"),n("./client/src/legacy/LeftAndMain.FieldHelp.js"),n("./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js"),n("./client/src/legacy/LeftAndMain.TreeDropdownField.js"),n("./client/src/legacy/AddToCampaignForm.js"),n("./client/src/legacy/SecurityAdmin.js"),n("./client/src/legacy/ModelAdmin.js"),n("./client/src/legacy/ToastsContainer.js"),n("./client/src/legacy/ConfirmedPasswordField.js"),n("./client/src/legacy/SelectionGroup.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/ToggleCompositeField.js"),n("./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js"),n("./client/src/legacy/UsedOnTable/UsedOnTableEntwine.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/DatetimeField.js"),n("./client/src/legacy/HtmlEditorField.js"),n("./client/src/legacy/TabSet.js"),n("./client/src/legacy/GridField.js"),n("./client/src/boot/index.js")},"./client/src/components/ActionMenu/ActionMenu.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(f.default,s({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);v.propTypes={className:b.default.string,extraClass:b.default.string,itemClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,source:b.default.arrayOf(b.default.shape({value:b.default.oneOfType([b.default.string,b.default.number]),title:b.default.any,disabled:b.default.bool})),onChange:b.default.func,value:b.default.any,readOnly:b.default.bool,disabled:b.default.bool},v.defaultProps={extraClass:"",className:"",value:[]},t.Component=v;var g=function(e){var t=(0,h.default)(v);return u.default.createElement(t,e)};t.default=g},"./client/src/components/CompositeField/CompositeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?this.renderMultipleActions(e):1===e.length?this.renderSingleAction(e[0]):null}}]),t}(l.PureComponent),_=f.default.propTypes;_.group=g.default.string,y.propTypes=g.default.arrayOf(g.default.shape(_)).isRequired,t.default=y},"./client/src/components/GridFieldActions/GridFieldDropdownAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,x.default)((0,D.default)(e),r),a=o&&o.values||{},i=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:a,formIsDirty:(0,T.isDirty)(r,D.default)(e),schemaName:r,tagData:i}}function d(e){return{actions:{schema:(0,w.bindActionCreators)(E,e),reduxForm:(0,w.bindActionCreators)({reset:C.reset,initialize:C.initialize,change:C.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var f=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.name,r=t.filterPrefix,o=t.formData,a=this.state.searchText,i={};return Object.keys(o).forEach(function(e){var t=o[e];t&&(i[e]=t)}),!e&&a&&void 0===o[""+r+n]&&(i[""+r+n]=a.trim()),i}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.name,a=n.filterPrefix,i=n.actions;void 0!==n.formData[""+a+o]&&i.reduxForm.change(r,""+a+o,t)}},{key:"focusInput",value:function(){if(this.state.display!==G.NONE){var e=j.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===G.EXPANDED){var t=j.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,{fields:[]}),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=a({},e,void 0),r=this.props,o=r.schemaName,i=r.filters;this.props.actions.reduxForm.change(o,e,""),this.setOverrides(p({},this.props,{filters:p({},i,a({},e,void 0))})),Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.clearSearchBox(),this.props.onHide?this.props.onHide():this.state.display!==G.NONE&&this.setState({display:G.NONE})}},{key:"show",value:function(){this.state.display!==G.VISIBLE&&this.setState({display:G.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==G.EXPANDED&&this.setState({display:G.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case G.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case G.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.name,r=t.filterPrefix,o={},a=this.getData();Object.entries(a).forEach(function(t){var i=f(t,2),s=i[0],l=i[1],c=s,u=l;e.hasOwnProperty(s)&&(u=e[s]),r.length>0&&s.startsWith(r)&&(c=s.substring(r.length)),(!r.length>0||s!==n||void 0===a[""+r+n])&&(o[c]=u)});var i=o[n]||"";this.state.display===G.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:G.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(o)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name,r=e.filterPrefix,o=Object.assign({},t),a=""+r+n;return o&&o[a]&&delete o[a],o?Object.values(o).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,a=e.displayBehavior,i=e.identifier,s=e.formIsDirty,l=(e.tagData,e.name),c=o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData","name"]);if(this.state.display===G.NONE)return a===q.TOGGLABLE?g.default.createElement(L.default,{onToggle:this.show}):g.default.createElement("div",null);var u=r+"_ExtraFields",d=this.state.searchText,f=this.state.display===G.EXPANDED,h=this.state.display===G.VISIBLE,m=[q.HIDEABLE,q.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),v=this.getData(),y=Object.keys(v).length>0;return g.default.createElement(P.default,{onClickOut:this.show,className:"search"},g.default.createElement(M.default,p({},c,{name:"SearchBox__"+l,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:d,hideable:m,expanded:f,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:b,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),g.default.createElement(I.default,{id:u,identifier:i,visible:h,expanded:f,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(v.Component);z.propTypes={onSearch:V.default.func,onHide:V.default.func,id:V.default.string.isRequired,display:V.default.oneOf(Object.values(G)),formSchemaUrl:V.default.string,filters:V.default.object,formData:V.default.object,placeholder:V.default.string,displayBehavior:V.default.oneOf(Object.values(q)),term:V.default.string,name:V.default.string,filterPrefix:V.default.string,forceFilters:V.default.bool,formIsDirty:V.default.bool,identifier:V.default.string,schemaName:V.default.string,tagHandlers:V.default.object,borders:V.default.shape({top:V.default.bool,right:V.default.bool,bottom:V.default.bool,left:V.default.bool})},z.defaultProps={placeholder:b.default._t("Admin.SEARCH","Search"),display:G.VISIBLE,displayBehavior:q.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=z,t.hasFilters=c,t.default=(0,y.connect)(u,d)(z)},"./client/src/components/Search/SearchBox.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n576?55:20;return this.state.tagWidth+e}},{key:"calculateSpaceForTags",value:function(){var e=this.state.width;e-=150,e=e-55-52;var t=this.props,n=t.hideable,r=t.showFilters;return n&&(e-=52),r&&(e-=52),e=Math.max(e,0)}},{key:"handleKeyDown",value:function(e){"Enter"===e.key?(e.preventDefault(),this.props.onSearch()):0===e.target.selectionStart&&("ArrowLeft"===e.key||"Backspace"===e.key&&e.target.selectionEnd-e.target.selectionStart==0)&&(e.preventDefault(),this.focusOnLastTag())}},{key:"handleFocus",value:function(){this.state.hasFocus||this.setState({hasFocus:!0}),this.props.onHideFilter&&this.props.onHideFilter()}},{key:"handleBlur",value:function(){this.state.hasFocus&&this.setState({hasFocus:!1})}},{key:"focusOnLastTag",value:function(){var e=O.default.findDOMNode(this);if(e){var t=e.querySelector(".compact-tag-list__visible .tag:last-child");t&&t.focus()}}},{key:"focusOnInput",value:function(){var e=O.default.findDOMNode(this);if(e){var t=e.querySelector("input");t&&t.focus()}}},{key:"renderInput",value:function(){var e,n=this.props,r=n.id,a=n.searchText,i=n.onChange,s=n.placeholder,l=n.name,c=n.borders,u={paddingLeft:this.calculateInputLeftPadding()+"px"},d=Object.assign({},t.defaultProps.borders,c),p="search-box__content-field",h=(0,m.default)("form-control",p,(e={},o(e,p+"--top-border",d.top),o(e,p+"--right-border",d.right),o(e,p+"--bottom-border",d.bottom),o(e,p+"--left-border",d.left),e));return f.default.createElement("input",{"aria-labelledby":r+"_label",type:"search",name:l,placeholder:s,className:h,onKeyDown:this.handleKeyDown,onChange:i,onFocus:this.handleFocus,onBlur:this.handleBlur,value:a,id:r,autoFocus:!0,style:u})}},{key:"renderTags",value:function(){var e=this.props,t=e.tagData,n=e.onTagDelete,r=e.onTagClick,o=e.onToggleFilter;return f.default.createElement("div",{className:"search-box__tags"},f.default.createElement(j.default,{onResize:this.onTagListResize},f.default.createElement(y.default,{onTagDelete:n,onTagClick:r,onHolderFocus:this.focusOnInput,tags:t,onSummary:o,maxSize:this.calculateSpaceForTags(),deletable:!0})))}},{key:"renderEnterHint",value:function(){var e=this;return f.default.createElement("div",{role:"presentation",className:"search-box__enter",onClick:function(t){t.stopPropagation(),t.preventDefault(),e.props.onSearch()}},u.default._t("Admin.ENTER","Enter")," ↵")}},{key:"renderFilterButton",value:function(){var e=this.props,t=e.expanded,n=e.onToggleFilter,r=e.formId,o=(0,m.default)("btn--icon","font-icon-caret-down-two","search-box__filter-trigger",{collapsed:!t});return f.default.createElement(p.Button,{"aria-expanded":t,"aria-controls":r,"aria-label":u.default._t("Admin.ADVANCED","Advanced"),onClick:n,className:o,title:u.default._t("Admin.ADVANCED","Advanced")},"Search options")}},{key:"renderHideButton",value:function(){var e=this.props,t=e.id,n=e.onHide;return f.default.createElement(p.Button,{onClick:n,title:u.default._t("Admin.CLOSE","Close"),"aria-label":u.default._t("Admin.CLOSE","Close"),className:"font-icon-cancel btn--no-text btn--icon-lg search-box__cancel","aria-controls":t,"aria-expanded":"true"})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.id,r=e.hideable,o=e.expanded,a=e.showFilters,i=e.dirty,s=e.clearable,l=(0,m.default)("search-box",{"search-box--hideable":r,"search-box--not-hideable":!r,"search-box--has-focus":this.state.hasFocus,"search-box--has-not-focus":!this.state.hasFocus,"search-box--has-filters":a,"search-box--has-not-filters":!a,"search-box--compact":this.state.width<576,"search-box--expanded":o}),c=(i||!s)&&this.state.hasFocus;return f.default.createElement("div",{className:l},f.default.createElement(j.default,{onResize:this.onResize},f.default.createElement("div",{className:"search-box__group"},f.default.createElement(p.Label,{for:n,id:n+"_label",hidden:!0},u.default._t("Admin.SEARCH","Search")),this.renderTags(),this.renderInput(),c&&this.renderEnterHint(),t,f.default.createElement("div",{className:"icon font-icon-search"}),a&&this.renderFilterButton(),r&&this.renderHideButton())))}}]),t}(d.Component);T.propTypes={onSearch:C.default.func,onToggleFilter:C.default.func,onHideFilter:C.default.func,onChange:C.default.func,onHide:C.default.func,onTagDelete:C.default.func,onTagClick:C.default.func,placeholder:C.default.string,expanded:C.default.bool,formId:C.default.string,id:C.default.string,searchText:C.default.string,hideable:C.default.bool,showFilters:C.default.bool,name:C.default.string,dirty:C.default.bool,clearable:C.default.bool,tagData:C.default.arrayOf(v.default)},T.defaultProps={placeholder:u.default._t("Admin.SEARCH","Search"),tagData:[],filters:{},formData:{},term:"",borders:{top:!1,right:!1,bottom:!0,left:!0}},t.Component=T,t.default=T},"./client/src/components/Search/SearchForm.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(t){"Enter"===t.key&&(t.preventDefault(),e())}}function a(e){var t=e.visible,n=e.expanded,r=e.onSearch,a=e.onClear,i=e.formSchemaUrl,s=e.id,l=e.identifier,u=e.clearable,p=o(r),h=t||n;return c.default.createElement(f.Collapse,{id:s,isOpen:n,className:"search-form"},c.default.createElement("div",{className:"search-form__wrapper",onKeyDown:p},h&&i&&c.default.createElement(d.default,{className:"no-change-track",formTag:"div",identifier:l,schemaUrl:i,onSubmit:function(){return r(),Promise.resolve()}}),c.default.createElement(f.Button,{className:"search-form__submit",onClick:function(){return r()},color:"primary",type:"button"},m),u&&c.default.createElement(f.Button,{className:"search-form__clear",onClick:function(){return a()}},b)))}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var i=n(4),s=r(i),l=n(0),c=r(l),u=n(32),d=r(u),f=n(5),p=n(1),h=r(p),m=s.default._t("Admin.SEARCH","Search"),b=s.default._t("Admin.CLEAR","Clear");a.propTypes={onSearch:h.default.func,onClear:h.default.func,visible:h.default.bool,expanded:h.default.bool,id:h.default.string.isRequired,formSchemaUrl:h.default.string,identifier:h.default.string,clearable:h.default.bool},a.defaultProps={formData:{}},t.Component=a,t.default=a},"./client/src/components/Search/SearchToggle.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(4),a=r(o),i=n(0),s=r(i),l=n(5),c=n(2),u=r(c),d=n(1),f=r(d),p=a.default._t("Admin.SHOW_SEARCH","Show search"),h=function(e){return(0,u.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e})},m=function(e){var t=e.onToggle,n=e.toggled;return s.default.createElement(l.Button,{title:p,onClick:t,className:h(n)},s.default.createElement("span",{className:"sr-only"},p))};m.propTypes={onToggle:f.default.func,toggled:f.default.bool},t.Component=m,t.default=m},"./client/src/components/Search/utilities/defaultTagHandlers.js":function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=n("./client/src/components/Search/utilities/genericDateTagHandler.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e,t,n){if(!Array.isArray(t)||0===t.length)return!1;var r=n.state.fields.find(function(t){return t.name===e});return!(!r||!r.source)&&(t.map(function(e){var t=r.source.find(function(t){return t.value.toString()===e.toString()});return t&&t.title?t.title:e}).join(", ")||!1)},s={Date:(0,a.default)("ll"),Time:(0,a.default)("LT"),Datetime:(0,a.default)("lll"),Hidden:function(){return!1},SingleSelect:function(e,t,n){if(void 0===e.value)return!1;var r=i(e.key,[e.value],n);return!!r&&Object.assign({},e,{value:r})},Boolean:function(e){return!!e.value&&(e.value,r(e,["value"]))},MultiSelect:function(e,t,n){var r=i(e.key,e.value,n);return!!r&&Object.assign({},e,{value:r})},default:function(e){return!!e.value&&e}};t.default=s},"./client/src/components/Search/utilities/genericDateTagHandler.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=function(e){return function(t,n){var r=n.lang;if(!t.value)return!1;if(t.value&&r){o.default.locale(r);var a=(0,o.default)(t.value);if(a.isValid())return Object.assign({},t,{value:a.format(e)})}return t}};t.default=a},"./client/src/components/Search/utilities/mapFormSchemaToTags.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./client/src/components/Search/utilities/defaultTagHandlers.js"),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=function(e,t){var n=t.key,r=t.value;return""+e+(t.label.toLowerCase()||n)+" "+(r||"")+" "},i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};var r=void 0,i=function(n){var o={key:n.name,label:n.title,value:t[n.name]};return("function"==typeof r["#"+o.key]?r["#"+o.key]:"function"==typeof r[n.schemaType]?r[n.schemaType]:r.default)(o,n,e,t)},s=function(e,t){var n=t.children;if(!Array.isArray(n)||0===n.length)return!1;var r=n.map(i).filter(function(e){return!1!==e}).reduce(a,"").trim(),o=n.map(function(e){return e.name}),s="[name="+n[0].name+"]";return!!r&&Object.assign({},e,{value:r,linkedFields:o,focusSelector:s})};r=Object.assign({},o.default,{Structural:s},n);var l=e.schema.fields,c=l.map(i).filter(function(e){return!1!==e}),u={};return c.forEach(function(e){u[e.key]=e}),u};t.default=i},"./client/src/components/SingleSelectField/SingleSelectField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t1?s.default.createElement(l.Nav,{tabs:!0,role:"tablist"},o):null}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1}}]),t}(f.default);t.Component=p,t.default=(0,u.default)(p)},"./client/src/components/TimeField/TimeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t0&&i.default.createElement(h.ToastActions,{actions:a,onDismiss:r,dismissed:o}))};g.propTypes=o({},v,{onDismiss:l.default.func.isRequired}),g.defaultProps={actions:[]},t.default=g},"./client/src/components/Toasts/ToastActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ToastActions=t.ToastAction=void 0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0;if(!n)return[];if(!t||0===Object.keys(t).length)return null;if(t.id===n)return[t.id];if(!t.children)return null;var o=!0,a=!1,i=void 0;try{for(var s,l=t.children[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var c=s.value,u=e(c,n);if(null!==u)return t.id&&t.id!==r&&u.unshift(t.id),u}}catch(e){a=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(a)throw i}}return null}},"./client/src/components/UsedOnTable/UsedOnTable.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=function(){function e(e,t){for(var n=0;n=25&&(o=o.substring(0,25).trim()+"..."),s&&(a=s);var l=t+"-"+n+"-"+r,u=["used-on__title-item"];return i&&(u.push("used-on__title-item--first"),i=!1),c.default.createElement("li",{className:(0,p.default)(u),key:l},o)}),l=t+"-"+n;return c.default.createElement("tr",{key:l,className:"used-on__row"},c.default.createElement("td",{className:"used-on__col--index"},c.default.createElement("a",{href:a,className:"used-on__cell-link"},t+1)),c.default.createElement("td",{className:"used-on__col--title"},c.default.createElement("a",{href:a,className:"used-on__cell-link"},c.default.createElement("ul",{className:"used-on__title-items"},s),c.default.createElement("span",{className:"used-on__type"},r))))}},{key:"render",value:function(){return c.default.createElement("table",{className:"table used-on__table"},this.renderHeader(),this.renderBody())}}]),t}(l.PureComponent);_.propTypes={loading:d.default.bool,usedOn:d.default.arrayOf(d.default.shape({id:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,type:d.default.string,link:d.default.string,ancestors:d.default.arrayOf(d.default.shape({title:d.default.string,link:d.default.string})).isRequired})),error:d.default.string},t.Component=_,t.default=(0,y.default)(_)},"./client/src/components/UsedOnTable/provideUsedOnData.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.data.readUsageEndpoint||{},n=t.method,r=t.url;this.haveFetchedData&&!this.props.forceFetch||e.loadUsedOn(e.identifier,n,r),this.haveFetchedData=!0}},{key:"render",value:function(){return c.default.createElement(e,this.props)}}]),n}(l.Component);t.propTypes={identifier:d.default.string,loading:d.default.bool,data:d.default.oneOfType([d.default.array,d.default.shape({recordClass:d.default.string,recordId:d.default.oneOfType([d.default.string,d.default.number]),readUsageEndpoint:d.default.shape({url:d.default.string,method:d.default.string})})]),usedOn:d.default.array,forceFetch:d.default.bool};var n=function(e,t){var n=t.data,r=n.recordClass,o=n.recordId,a=r&&o?r+"#"+o:"",i=e.usedOn;return{identifier:a,loading:i.loading.includes(a),usedOn:i.usedOn[a]||null,error:i.errors[a]||null}},r=(0,h.injectTabContext)(t),u=(0,f.connect)(n,{loadUsedOn:p.loadUsedOn})(r);return u.Component=r,u};t.default=m},"./client/src/containers/App/App.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(10),i=n("./node_modules/react-router-config/esm/react-router-config.js"),s=function(e){var t=e.route;return o.default.createElement("div",{className:"app"},(0,i.renderRoutes)(t.routes()))};t.default=(0,a.provideInjector)(s)},"./client/src/containers/Form/Form.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r '),e("body").append(t)),t.open(),!1}}),e(".add-to-campaign-modal .add-to-campaign-modal__nav-link").entwine({onclick:function(t){t.preventDefault();var n=e(t.target);window.location=n.attr("href")}}),e("#add-to-campaign__dialog-wrapper").entwine({onunmatch:function(){this._clearModal()},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},_renderModal:function(t){var n=this,r=function(){return n.close()},o=function(){return n._handleSubmitModal.apply(n,arguments)},i=e("form.cms-edit-form :input[name=ID]").val(),s=window.ss.store,l=s.getState().config.sections.find(function(e){return"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name}),u=l.form.AddToCampaignForm.schemaUrl+"/"+i,f=a.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign");d.default.render(c.default.createElement(p,{title:f,isOpen:t,onSubmit:o,onClosed:r,schemaUrl:u,bodyClassName:"modal__dialog",className:"add-to-campaign-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"Admin.AddToCampaign"}),this[0])},_clearModal:function(){d.default.unmountComponentAtNode(this[0])},_handleSubmitModal:function(e,t,n){return n()}})})},"./client/src/legacy/ConfirmedPasswordField.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).on("click",".confirmedpassword .showOnClick a",function(){var e=(0,o.default)(".showOnClickContainer",(0,o.default)(this).parent());return e.toggle("fast",function(){e.toggleClass("d-none").find('input[type="hidden"]').val(e.hasClass("d-none")?0:1)}),!1})},"./client/src/legacy/DateField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n(4),s=r(i),l=n(14),c=r(l),u=n(22),d=r(u);a.default.entwine("ss",function(e){e("input[type=date]").entwine({onadd:function(){if(!d.default.inputtypes.date&&!(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))){var t=e(" ",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L"))}this.val(r);var a=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L")});this.attr("placeholder",a),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e)for(var n=["L","YYYY-MM-DD"],r=0;r",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L LT"))}this.val(r);var a=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L LT")});this.attr("placeholder",a),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e){var n=(0,c.default)(e,["L LT",c.default.ISO_8601]);n.isValid()&&(t=n.format("YYYY-MM-DDTHH:mm:ss"))}this.parent().find("input[type=hidden]").val(t)}})})},"./client/src/legacy/GridField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t ").addClass("ss-gridfield-item loading").attr("colspan",l);s.append(e(" ").append(p)),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(o){if(r.empty().append(e(o).children()),a&&r.find(':input[name="'+a+'"]').focus(),r.find(".grid-field__filter-header, .grid-field__search-holder").length){var i="show"===t.data[0].filter;r.needsColumnFix()&&r.fixColumns(),r.injectSearchButton(i)}n&&n.apply(this,arguments),r.trigger("reload",r),!1!==t.data[0].triggerChange&&r.trigger("change")},error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION"))},complete:function(e,t){r.find(".loading").removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var n=this.getState();n[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(n))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())},hasFilters:function(){return!!this.getState().GridFieldFilterHeader},needsColumnFix:function(){return this.find(".grid-field__filter-header, .grid-field__search-holder").length&&!this.find(".grid-field__col-compact").length&&!this.find("th.col-Actions").length},fixColumns:function(t){this.find(".sortable-header").append(' '),this.find("tbody tr").each(function(){e(this).find("td:last").attr("colspan",2)});var n=e('');e(".grid-field__filter-header th:last .action").each(function(){e(this).detach(),n.append(e(this))}),e(".grid-field__filter-header").append(n)},injectSearchButton:function(e){var t=this.find(".grid-field__filter-header").length>0,n=void 0;e?(n=' ',this.addClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden"),t||this.find(":button[name=showFilter]").hide()):(n=' ',this.removeClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").addClass("grid-field__search-holder--hidden")),t&&this.find(".sortable-header th:last").html(n)},keepStateInHistory:function(){var t=this,n=e(this).find(".gridfield-actionmenu__container").data("schema");n&&n.length>0&&n.filter(function(e){if("link"===e.type){var n=t.buildURLString(e.url),r=n?"?"+n.join("&"):"";window.ss.router.replace(window.location.pathname+r,void 0,void 0,!1)}})},buildURLString:function(e){var t=[window.location.origin,e].join("/"),n=[window.location.search,new URL(t).searchParams.toString()].join("&").substring(1),r=[],o=[];return n.split("&").forEach(function(e){var t=e.split("=");r[t[0]]=t[1]?t[1]:""}),Object.keys(r).forEach(function(e){o.push([e,r[e]].join("="))}),o}}),e(".grid-field *").entwine({getGridField:function(){return this.closest(".grid-field")}}),e(".gridfield-actionmenu__container").entwine({Timer:null,Component:null,Actions:null,onmatch:function(){this._super();var t=[];e(".action-menu--handled",this.parent()).each(function(){var n=e(this).detach();t.push(n)}),this.setActions(t);var n=this.closest(".cms-content").attr("id"),r=n?{context:n}:{},o=(0,m.loadComponent)("GridFieldActions",r);this.setComponent(o),this.refresh()},onunmatch:function(){this._super();var t=this[0];t&&p.default.unmountComponentAtNode(t);var n=this.getActions(),r=this.parent();n&&e(n).each(function(){e(this).appendTo(r)})},refresh:function(){var e=this.data("schema"),t=this.getComponent();p.default.render(d.default.createElement(t,{schema:e}),this[0])}}),e(".grid-field :button[name=showFilter]").entwine({onclick:function(e){this.closest(".grid-field").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden").find(":input:first").focus(),this.closest(".grid-field").addClass("show-filter"),this.parent().html(' '),e.preventDefault()}}),e(".grid-field .ss-gridfield-item").entwine({onclick:function(t){if(t.target.classList.contains("action-menu__toggle"))return this._super(t),!1;if(e(t.target).closest(".action").length)return this._super(t),!1;var n=this.find(".edit-link, .view-link");n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function(){this.find(".edit-link, .view-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".grid-field .action.action_import:button").entwine({onclick:function(e){e.preventDefault(),this.openmodal()},onmatch:function(){this._super(),"open"===this.data("state")&&this.openmodal()},onunmatch:function(){this._super()},openmodal:function(){function t(){o.removeClass("show"),n.removeClass("show"),setTimeout(function(){o.remove()},150)}var n=e(this.data("target")),r=e(this.data("modal"));n.length<1?(n=r,n.appendTo(document.body)):n.innerHTML=r.innerHTML;var o=e(".modal-backdrop");o.length<1&&(o=e('
'),o.appendTo(document.body)),n.find("[data-dismiss]").add(".modal-backdrop").on("click",function(){t()}),e(document).on("keydown",function(e){27===e.keyCode&&t()}),setTimeout(function(){o.addClass("show"),n.addClass("show")},0)}}),e(".grid-field .action:button").entwine({onclick:function(t){var n="show",r=!0;if(this.is(":disabled"))return void t.preventDefault();!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(n="hidden"),(this.hasClass("ss-gridfield-pagination-action")||this.hasClass("grid-field__sort"))&&(r=!1);var o=[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:r}],a=this.data("action-state");a&&o.push({name:"ActionState",value:JSON.stringify(a)});var i=e(this).getGridField(),s=function(t,n,r){i.keepStateInHistory();var o=r.getResponseHeader("X-Message-Text"),a=r.getResponseHeader("X-Message-Type");if(o&&a){var s=e("#Form_EditForm_error");s.addClass(a),s.html(o),s.show()}};i.reload({data:o},s),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),r=this.closest("form"),o=r.find(":input.gridstate").serialize(),a=r.find('input[name="SecurityID"]').val();o+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),a&&(o+="&SecurityID="+encodeURIComponent(a));var i=this.data("action-state");i&&(o+="&ActionState="+encodeURIComponent(JSON.stringify(i))),window.location.search&&(o=window.location.search.replace(/^\?/,"")+"&"+o);var s=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+s+o,e("base").attr("href"))}}),e(".grid-field .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),n=""!==t.val(),r=e.is(":disabled");(n&&r||!n&&!r)&&e.attr("disabled",!r)}}),e(".grid-field .grid-field__col-compact .action--delete, .grid-field .grid-field__col-compact .action--archive, .cms-edit-form .btn-toolbar .action--delete, .cms-edit-form .btn-toolbar .action--archive").entwine({onclick:function(t){var n=e(this).hasClass("action--archive")?c.default._t("Admin.ARCHIVECONFIRMMESSAGE","Are you sure you want to archive this record?"):c.default._t("Admin.DELETECONFIRMMESSAGE","Are you sure you want to delete this record?");if(!confirm(n))return t.preventDefault(),!1;this._super(t)}}),e(".grid-field .grid-print-button.action:button").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus(),(this.contentWindow||this).print()})},onunmatch:function(){this._super()}}),e(".grid-field .action.no-ajax, .grid-field .no-ajax .action:button").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".grid-field[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".grid-field[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".js-injector-boot .grid-field .grid-field__search-holder").entwine({Component:null,onmatch:function(){this._super(),this.prependTo(this.parent());var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,m.loadComponent)("Search",t);this.setComponent(n),this.refresh()},onunmatch:function(){this._super();var e=this[0];e&&p.default.unmountComponentAtNode(e)},close:function(){var t=this.data("schema"),n=[{name:t.clearAction,value:"",filter:"hidden",triggerChange:!1}];t.clearActionState&&n.push({name:"ActionState",value:t.clearActionState});var r=e(this).getGridField(),o=function(){r.keepStateInHistory()};r.reload({data:n},o)},search:function(t){var n=this.data("schema"),r=[{name:n.searchAction,value:"",filter:"show",triggerChange:!1}];n.searchActionState&&r.push({name:"ActionState",value:n.searchActionState});var o=!0,i=!1,s=void 0;try{for(var l,c=Object.entries(t)[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value,d=a(u,2),f=d[0],p=d[1];if(p){var h="filter["+n.gridfield+"]["+f+"]";r.push({name:h,value:p})}}}catch(e){i=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}var m=e(this).getGridField(),b=function(){m.keepStateInHistory()};m.reload({data:r},b)},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},a=function(t){return e.search(t)};String(t.gridfield).replace(/\-/g,"."),p.default.render(d.default.createElement(n,o({id:t.gridfield+"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:r,onSearch:a},t)),this[0])}}),e(".js-injector-boot .grid-field .search-box__content-field").entwine({onkeydown:function(e){"Enter"===e.key&&e.preventDefault()}}),e(".grid-field .grid-field__filter-header :input").entwine({onmatch:function(){var e=this.closest(".extra").find(".ss-gridfield-button-filter"),t=this.closest(".extra").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(t){if(!this.closest(".ss-gridfield-button-reset").length){var n=this.closest(".extra").find(".ss-gridfield-button-filter"),r=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==t.keyCode){var o=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),a="show";!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(a="hidden");var i=[{name:o.attr("name"),value:o.val(),filter:a,triggerChange:!1}];o.data("action-state")&&i.push({name:"ActionState",value:JSON.stringify(o.data("action-state"))});var s=e(this).getGridField(),l=function(){s.keepStateInHistory()};return s.reload({data:i},l),!1}n.addClass("hover-alike"),r.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var r=e(this.element);e(this.element).closest("form"),e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("searchUrl"),data:encodeURIComponent(r.attr("name"))+"="+encodeURIComponent(r.val()),success:n,error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){var r=e(' ');r.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(r),e(this).closest(".grid-field").find(".action_gridfield_relationadd").removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){t.preventDefault();var n=parseInt(e(this).val(),10),r=e(this).getGridField();r.setState("GridFieldPaginator",{currentPage:n});var o=function(){r.keepStateInHistory()};return r.reload({},o),!1}}})})},"./client/src/legacy/HtmlEditorField.js":function(module,exports,__webpack_require__){"use strict";(function($){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _jquery=__webpack_require__(3),_jquery2=_interopRequireDefault(_jquery);__webpack_require__("./node_modules/events-polyfill/index.js");var ss=void 0!==window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jquery2.default)(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",function(){n.save()})},t},save:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getInstance();t.save(),e.silent||((0,_jquery2.default)(t.getElement()).trigger("change"),t.getElement().dispatchEvent(new Event("input",{bubbles:!0})))},create:function(){function e(e,t){var r=$(e).scrollTop();$(".mce-floatpanel").each(function(e,n){var o=parseFloat(n.style.top);$(n).css("top",o-(r-t)+"px")}),$(".mce-floatpanel").css("opacity","1"),n=void 0}function t(t){var a=t.target;!n||(new Date-n)/100>500?(o=$(a).scrollTop(),$(".mce-floatpanel").css("opacity","0")):window.clearTimeout(r),n=new Date,r=window.setTimeout(function(){return e(a,o)},500)}var n=void 0,r=void 0,o=void 0,a=this.getConfig();void 0!==a.baseURL&&(tinymce.EditorManager.baseURL=a.baseURL),tinymce.init(a).then(function(e){e.length>0&&e[0].container&&$(e[0].container).closest(".panel--scrollable").on("scroll",function(e){return t(e)})})},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t,n){if(n){n=n.replaceAll("<","<").replaceAll(">",">");var r=this.getInstance().dom.create("a",e,n);this.getInstance().selection.setNode(r)}else this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback,cu=tinyMCE.settings.convert_urls;return cb&&(href=eval(cb+"(href, node, true);")),cu&&href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers.default=ss.editorWrappers.tinyMCE,_jquery2.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onmatch:function(){this.getEditor()||this.onadd(),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},onunmatch:function(){this.getEditor()&&this.onremove(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save({silent:!0}),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openEmbedDialog:function(){this.openDialog("embed")},openDialog:function(t){if("media"===t&&window.InsertMediaModal){var n=e("#insert-media-react__dialog-wrapper");return n.length||(n=e('
'),e("body").append(n)),n.setElement(this),void n.open()}if("embed"===t&&window.InsertEmbedModal){var r=e("#insert-embed-react__dialog-wrapper");return r.length||(r=e('
'),e("body").append(r)),r.setElement(this),void r.open()}throw new Error("Dialog named "+t+" is not available.")}})})}).call(exports,__webpack_require__(3))},"./client/src/legacy/LeftAndMain.ActionTabSet.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){e(".cms-container").find("iframe").each(function(t,n){try{e(n).contents().off("click.ss-ui-action-tabset")}catch(e){console.warn("Unable to access iframe, possible https mis-match")}}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var r,o=this,a=e(".cms-container").find("iframe");r=function(t){var n,a;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(o).length||n.length||(o.tabs("option","active",!1),a=e(".cms-container").find("iframe"),a.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",r)}),e(document).off("click.ss-ui-action-tabset",r))},e(document).on("click.ss-ui-action-tabset",r),a.length>0&&a.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",r)})},riseUp:function(t,n){var r,o,a,i,s,l,c,u,d;return r=e(this).find(".ui-tabs-panel").outerHeight(),o=e(this).find(".ui-tabs-nav").outerHeight(),a=e(window).height()+e(document).scrollTop()-o,i=e(this).find(".ui-tabs-nav").offset().top,s=n.newPanel,l=n.newTab,i+r>=a&&i-r>0?(this.addClass("rise-up"),null!==l.position()&&(c=-s.outerHeight(),u=s.parents(".toolbar--south"),u&&(d=l.offset().top-u.offset().top,c-=d),e(s).css("top",c+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(s).css("bottom","100%")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},"./client/src/legacy/LeftAndMain.BatchActions.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(3),o=t(r),a=n(4),i=t(a);o.default.entwine("ss.tree",function(t){t("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return t(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},onmatch:function(){var e=this;e.getTree().bind("load_node.jstree",function(t,n){e.refreshSelected()})},onunmatch:function(){this.getTree().unbind("load_node.jstree")},registerDefault:function(){this.register("publish",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}))&&e}),this.register("unpublish",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:e.length}))&&e}),this.register("delete",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to delete these pages?\n\nThese pages and all of their children pages will be deleted and sent to the archive."),{num:e.length}))&&e}),this.register("restore",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:e.length}))&&e})},onadd:function(){this.registerDefault(),this._super()},register:function(e,t){this.trigger("register",{type:e,callback:t});var n=this.getActions();n[e]=t,this.setActions(n)},unregister:function(e){this.trigger("unregister",{type:e});var t=this.getActions();t[e]&&delete t[e],this.setActions(t)},refreshSelected:function(n){var r=this,o=this.getTree(),a=this.getIDs(),i=[],s=t(".cms-content-batchactions-button"),l=this.find(":input[name=Action]").val();null==n&&(n=o);for(var c in a)t(t(o).getNodeByID(c)).addClass("selected").attr("selected","selected");if(!l||-1==l||!s.hasClass("active"))return void t(n).find("li").each(function(){t(this).setEnabled(!0)});t(n).find("li").each(function(){i.push(t(this).data("id")),t(this).addClass("treeloading").setEnabled(!1)});var u=t.path.parseUrl(l),d=u.hrefNoSearch+"/applicablepages/";d=t.path.addSearchParams(d,u.search),d=t.path.addSearchParams(d,{csvIDs:i.join(",")}),e.getJSON(d,function(o){e(n).find("li").each(function(){t(this).removeClass("treeloading");var e=t(this).data("id");0==e||t.inArray(e,o)>=0?t(this).setEnabled(!0):(t(this).removeClass("selected").setEnabled(!1),t(this).prop("selected",!1))}),r.serializeFromTree()})},serializeFromTree:function(){var e=this.getTree(),t=e.getSelectedIDs();return this.setIDs(t),!0},setIDs:function(e){this.find(":input[name=csvIDs]").val(e?e.join(","):null)},getIDs:function(){var e=this.find(":input[name=csvIDs]").val();return e?e.split(","):[]},onsubmit:function(n){var r=this,o=this.getIDs(),a=this.getTree(),s=this.getActions();if(!o||!o.length)return alert(i.default._t("Admin.SELECTONEPAGE","Please select at least one page")),n.preventDefault(),!1;var l=this.find(":input[name=Action]").val();if(!l)return n.preventDefault(),!1;var c=l.split("/").filter(function(e){return!!e}).pop();if(s[c]&&(o=s[c].apply(this,[o])),!o||!o.length)return n.preventDefault(),!1;this.setIDs(o),a.find("li").removeClass("failed");var u=this.find(":submit:first");return u.addClass("loading"),e.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function(e,t){u.removeClass("loading"),a.jstree("refresh",-1),r.setIDs([]),r.find(":input[name=Action]").val("").change();var n=e.getResponseHeader("X-Status");n&&statusMessage(decodeURIComponent(n),"success"===t?"success":"error")},success:function(e,n){var r,o;if(e.modified){var i=[];for(r in e.modified)o=a.getNodeByID(r),a.jstree("set_text",o,e.modified[r].TreeTitle),i.push(o);t(i).effect("highlight")}if(e.deleted)for(r in e.deleted)o=a.getNodeByID(r),o.length&&a.jstree("delete_node",o);if(e.error)for(r in e.error)o=a.getNodeByID(r),t(o).addClass("failed")},dataType:"json"}),n.preventDefault(),!1}}),t(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var e=t(".cms-tree"),n=t("#Form_BatchActionsForm");this._super(),this.data("active")?(e.addClass("multiple"),e.removeClass("draggable"),n.serializeFromTree()):(e.removeClass("multiple"),e.addClass("draggable")),t("#Form_BatchActionsForm").refreshSelected()}}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(e){var n=t(e.target.form),r=(n.find(":submit"),t(e.target).val()),o=r.split("/"),a=o[o.length-1];t("#Form_BatchActionsForm").refreshSelected();var i=t("#BatchActionParameters_"+a);i.length?(i.find(":input").each(function(){var e=t(this)[0];"SELECT"===e.tagName?(e.selectedIndex=-1,t(this).trigger("chosen:updated")):"checkbox"===e.type?e.checked=e.defaultChecked:e.value=e.defaultValue}),i.siblings().hide(),i.show(),t("#BatchActionParameters").slideDown()):t("#BatchActionParameters").slideUp(),this.trigger("chosen:updated"),this._super(e)}})})}).call(t,n(3))},"./client/src/legacy/LeftAndMain.Content.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-content").entwine({onadd:function(){this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),e(".cms-content .cms-tree").entwine({onadd:function(){var t=this;this._super(),this.bind("select_node.jstree",function(n,r){var o=r.rslt.obj,a=t.find(":input[name=ID]").val(),i=r.args[2],s=e(".cms-container");if(!i)return!1;if(e(o).hasClass("disabled"))return!1;if(e(o).data("id")!=a){var l=e(o).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(o).find("a:first"))&&(l=l=e.path.makeUrlAbsolute(l,e("base").attr("href"))),document.location.search&&(l=e.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),s.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto");var e=parseInt(this.css("padding-top"),10),t=parseInt(this.css("padding-bottom"),10);this.height(this.innerHeight()-e-t)}})})},"./client/src/legacy/LeftAndMain.EditForm.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(3),o=t(r),a=n(4),i=t(a),s=window.onbeforeunload;window.onbeforeunload=function(e){var t=(0,o.default)(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges")?i.default._t("Admin.CONFIRMUNSAVEDSHORT"):"function"==typeof s?s():void 0},o.default.entwine("ss",function(e){e(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},ValidationErrorShown:!1,onadd:function(){this.attr("autocomplete","off"),this._setupChangeTracker();for(var e in{action:!0,method:!0,enctype:!0,name:!0}){var t=this.find(":input[name=_form_"+e+"]");t&&(this.attr(e,t.val()),t.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function(){var t=ss.i18n._t("Admin.VALIDATION_ERRORS_IN_TAB","This tab contains validation errors."),n=ss.i18n._t("Admin.VALIDATION_ERRORS_IN_TAB_SCREEN_READER","(Has validation errors)"),r=ss.i18n._t("Admin.VALIDATION_ERRORS_ON_PAGE","There are validation errors on this page, please fix them before saving or publishing."),o=ss.i18n._t("Admin.VALIDATIONERROR","Validation Error"),a=e("#Form_EditForm_error");this.find(".tab-attention, .tab-validation-error-sr").remove();var i=!1;if(this.hasClass("validationerror")&&(i=!0),""!==a.html()&&(i=!0),this.find(".alert.error").length>0&&(i=!0),!i)return void a.hide();!this.getValidationErrorShown()&&this.hasClass("validationerror")&&(l(o),this.setValidationErrorShown(!0));var s=this.find(".tab-pane .alert-danger, .tab-pane .alert.error").closest(".tab-pane");if(s.length){var c=s.closest(".tab-content").closest(".ss-tabset");c.length&&(s.each(function(r){var o=s.eq(r).attr("id"),a=c.find("#tab-"+o).closest("li"),i=e(' '),l=e(''+n+" ");a.append(i),a.append(l)}),a.attr("class","alert alert-danger"),a.html(r),a.show()),this.addClass("validationerror")}}},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function(){if(this.trigger("beforesubmitform"),!this.is(".changed")||this.is(".discardchanges"))return!0;if(this.find(".btn-toolbar :submit.btn--loading.loading").length>0)return!0;var e=confirm(i.default._t("Admin.CONFIRMUNSAVED"));return e&&this.addClass("discardchanges"),e},onsubmit:function(e,t){if("_blank"!=this.prop("target"))return t&&this.closest(".cms-container").submitForm(this,t),!1},validate:function(){return this.trigger("validate",{isValid:!0}),!0},"from .htmleditor":{oneditorinit:function(t){var n=this,r=e(t.target).closest(".field.htmleditor");r.find("textarea.htmleditor").getEditor().getInstance().onClick.add(function(e){n.saveFieldFocus(r.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(t){this.saveFieldFocus(e(t.target).attr("id"))},onfocus:function(t){this.saveFieldFocus(e(t.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(t){var n=e(t.target).closest(".field.treedropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function(t){var n=e(t.target).closest(".field.dropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(t){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var n=e(this).attr("id"),r=[];if(r.push({id:n,selected:t}),r)try{window.sessionStorage.setItem(n,JSON.stringify(r))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}},restoreFieldFocus:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var t,n,r,o,a,i=this,s=void 0!==window.sessionStorage&&window.sessionStorage,l=s?window.sessionStorage.getItem(this.attr("id")):null,c=!!l&&JSON.parse(l),u=0!==this.find(".ss-tabset").length;if(s&&c.length>0){if(e.each(c,function(n,r){i.is("#"+r.id)&&(t=e("#"+r.selected))}),e(t).length<1)return void this.focusFirstInput();if(n=e(t).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),r="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),u&&r!==n)return;o=e(t).closest(".togglecomposite"),o.length>0&&o.accordion("activate",o.find(".ui-accordion-header")),a=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),a=e(t).position().top),e(t).focus(),a>e(window).height()/2&&i.find(".cms-content-fields").scrollTop(a)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),e(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function(e){return this.is(":disabled")?(e.preventDefault(),!1):!1===this._super(e)||e.defaultPrevented||e.isDefaultPrevented()?void 0:(this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),e(".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel").entwine({onclick:function(e){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]),e.preventDefault()}}),e(".cms-edit-form .btn-toolbar button[name=action_doUnpublish].btn.action").entwine({onclick:function(e){var t=this.data("owners");if(t&&parseInt(t)>0){var n=[i.default.inject(i.default._t("Admin.OWNED_WARNING_1","You are unpublishing content that is being used in {count} other published section(s)."),{count:t}),i.default._t("Admin.OWNED_WARNING_2","This could cause a published page to have missing components on the live site."),i.default._t("Admin.OWNED_WARNING_3","Do you want to unpublish anyway?")];window.confirm(n.join("\n\n"))?this._super():e.preventDefault()}else this._super()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var e=this.find("> ul:first");1==e.children("li").length&&e.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}}),e('.cms-edit-form [name="CanViewType"], .cms-edit-form [name="CanEditType"], .cms-edit-form [name="CanCreateTopLevelType"]').entwine({onmatch:function(){"OnlyTheseUsers"===this.val()&&(this.is(":checked")?this.showList(!0):this.hideList(!0))},onchange:function(e){"OnlyTheseUsers"===e.target.value?this.showList():this.hideList()},showList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");t.addClass("field--merge-below"),e?n.show().css("overflow","visible"):n.slideDown(function(){n.css("overflow","visible")})},hideList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");n.css("overflow","hidden"),e?(n.hide().css("display","none"),t.removeClass("field--merge-below")):n.slideUp(function(){t.removeClass("field--merge-below")})}})});var l=function(t){e.noticeAdd({text:t,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(t,n(3))},"./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function(){var e=!1,t=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),n=this.find(".cms-description-trigger"),r=this.find(".description");this.hasClass("description-toggle-enabled")||(0===n.length&&(n=this.find(".middleColumn").first().after(' ').next()),this.addClass("description-toggle-enabled"),n.on("click",function(){r[e?"hide":"show"](),e=!e}),r.hide())}})})},"./client/src/legacy/LeftAndMain.FieldHelp.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var e=this.find(".description");e.length&&(this.attr("title",e.text()).tooltip({content:e.html()}),e.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},"./client/src/legacy/LeftAndMain.Menu.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,r){e(".cms-menu__list").children("li").each(function(){t?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"),e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)})}),this.toggleFlyoutState(t),this._super(t,n,r)},toggleFlyoutState:function(t){if(t)e(".collapsed").find("li").show(),e(".cms-menu__list").find(".child-flyout-indicator").hide();else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()});var n=e(".cms-menu__list ul.collapsed-flyout").parent();0===n.children(".child-flyout-indicator").length&&n.append(' ').fadeIn(),n.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&void 0!==(n=e.cookie("cms-menu-sticky"))&&null!==n&&(t="true"===n),t},setPersistedStickyState:function(t){void 0!==e.cookie&&e.cookie("cms-menu-sticky",t,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var t=this.getPersistedCollapsedState(),n=e(".cms-menu").getPersistedStickyState(),r=this.siteTreePresent();return void 0===t?r:t!==r&&n?t:r},onadd:function(){var t=this;setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),e(".cms-menu__list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(e){var t=e.getResponseHeader("X-Controller");if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function(e,t){this.updateMenuFromResponse(t.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(t){this.toggleClass("collapsed",e(t.target).hasClass("collapsed")),e(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||e(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function(){var t=this.find("#Menu-CMSMain");t[t.is(".current")?"show":"hide"]();var n=e(".cms-content input[name=ID]").val();n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(n)})}}),e(".cms-menu__list li").entwine({toggleFlyout:function(t){var n=e(this);if(n.children("ul").first().hasClass("collapsed-flyout"))if(t){if(!n.children("ul").first().children("li").first().hasClass("clone")){var r=n.clone();r.addClass("clone").css({}),r.children("ul").first().remove(),r.find("span").not(".text").remove(),r.find("a").first().unbind("click"),n.children("ul").prepend(r)}e(".collapsed-flyout").show(),n.addClass("opened"),n.children("ul").find("li").fadeIn("fast")}else r&&r.remove(),e(".collapsed-flyout").hide(),n.removeClass("opened"),n.find("toggle-children").removeClass("opened"),n.children("ul").find("li").hide()}}),e(".cms-menu__list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu__list .toggle").entwine({onclick:function(t){t.preventDefault(),e(this).toogleFlyout(!0)}}),e(".cms-menu__list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append(' '),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var e=this.getMenuItem();e&&e.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function(){var e=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings();e.addClass("current"),t.removeClass("current").close(),t.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu__list *").entwine({getMenu:function(){return this.parents(".cms-menu__list:first")}}),e(".cms-menu__list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),e(".cms-menu__list li a").entwine({onclick:function(t){var n=e.path.isExternal(this.attr("href"));if(!(t.which>1||n)&&"_blank"!=this.attr("target")){t.preventDefault();var r=this.getMenuItem(),o=this.attr("href");n||(o=e("base").attr("href")+o);var a=r.find("li");a.length?a.first().find("a").click():document.location.href=o,r.select()}}}),e(".cms-menu__list li .toggle-children").entwine({onclick:function(e){return this.closest("li").toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu__list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle__button").entwine({onadd:function(){var t=!!e(".cms-menu").getPersistedStickyState();this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function(e){this.next(".sticky-toggle__status").text(e?"fixed":"auto")},onclick:function(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),r=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&!1===r&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(r),this.toggleCSS(r),this.toggleIndicator(r),this._super()}}),e(".cms-help__menu").entwine({onclick:function(){var t="true"===this.attr("aria-expanded");this.attr("aria-expanded",!t),e(".cms-help__toggle").toggleClass("cms-help__toggle--show")}})})},"./client/src/legacy/LeftAndMain.MobileMenuToggle.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n("./client/src/components/MobileMenuToggle/MobileMenuToggleContainer.js"),s=r(i),l=n("./client/src/state/mobileMenu/MobileMenuActions.js"),c=n(8),u=r(c);a.default.entwine("ss",function(e){e(".js-react-boot").entwine({onmatch:function(){var t=e(".cms-mobile-menu-toggle-wrapper");t.length>0&&u.default.render(React.createElement(s.default,{store:window.ss.store,controls:"cms-menu"}),t[0]);var n=window.ss.store,r=e(".cms-menu"),o=e(".cms-menu-mobile-overlay");n.subscribe(function(){var e=n.getState(),t=e.mobileMenu.isOpen;r.toggleClass("cms-menu--open",t).attr("aria-expanded",t),o.attr("aria-expanded",t)})}}),e(".cms-menu-mobile-overlay").entwine({onclick:function(){window.ss.store.dispatch((0,l.closeMobileMenu)())}})})},"./client/src/legacy/LeftAndMain.Panel.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==e.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var t,n;return this.canSetCookie()&&void 0!==(n=e.cookie("cms-panel-collapsed-"+this.attr("id")))&&null!==n&&(t="true"===n),t},setPersistedCollapsedState:function(t){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),t,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var e=this.getPersistedCollapsedState();return void 0===e&&(e=this.hasClass("collapsed")),e},onadd:function(){var t,n;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(n=e("
").append('» ').append('« '),this.append(n)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),t=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(t.length?t.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(e,t,n){var r,o;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),r=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(r),o=this.find(".cms-panel-content-collapsed"),o.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),!1!==n&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")},expandPanel:function(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(e){!e&&this.hasClass("collapsed")||this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},"./client/src/legacy/LeftAndMain.Preview.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n(4),s=r(i);a.default.entwine("ss.preview",function(e){e(".cms-preview").entwine({AlreadyInitialised:!1,AllowedStates:["StageLink","LiveLink","Unversioned","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(t,n){var r=this,o=this._getNavigatorStates();return!1!==n&&e.each(o,function(e,n){r.saveState("state",t)}),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var r=e(".cms-container").entwine(".ss");if("split"==t)r.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)r.contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;r.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return!1!==n&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){return this.getSizes(),this.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);var n=e(".cms-container").entwine(".ss").getLayoutOptions();return n&&e(".preview-mode-selector").changeVisibleMode(n.mode),this.getCurrentSizeName()&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+e)},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),this.changeMode(this.getDefaultMode(),!1)),this},onadd:function(){var t=this,n=this.find("iframe");n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),this._unblock(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var e,t,n=new Date;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(e){console.warn("localStorge is not available due to current browser / system settings.")}},onforcecontent:function(){this.changeMode("content",!1)},onenable:function(){var t=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.find(".preview-note").show(),this},_unblock:function(){return this.find(".preview-note").hide(),this},_initialiseFromContent:function(){var t,n;if(e(".cms-previewable").length){t=this.loadState("mode"),n=this.loadState("size");var r=!0;this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw();var o=this.find("iframe").attr("src");this.getPendingURL()||o&&"about:blank"!==o||(t="content",r=!1),t&&this.changeMode(t,r),n&&this.changeSize(n)}else this.disablePreview();return this.setAlreadyInitialised(!0),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){return e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("href"),active:n.hasClass("active")}:null})},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),r=null;t&&(r=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var o=null;if(r[0]?o=r[0].url:t.length?(this.setCurrentStateName(t[0].name),o=t[0].url):this.setCurrentStateName(null),o){var a=o.split("#"),i=a.shift().split(/[?&]/),s=i.shift();i.push("CMSPreview=1"),a=a.length?"#"+a.join("#"):"",o=s+"?"+i.join("&")+a}return this.is(".column-hidden")?(this.setPendingURL(o),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),o?(this._loadUrl(o),this._unblock()):(this._loadUrl("about:blank"),this._block())),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls");e(".cms-edit-form .cms-navigator").length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t;e(".cms-container");try{t=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(t){var n=e(t).find("meta[name=x-page-id]").attr("content"),r=e(t).find("meta[name=x-cms-edit-link]").attr("content"),o=e(".cms-content");n&&o.find(":input[name=ID]").val()!=n&&e(".cms-container").entwine(".ss").loadPanel(r)}}},_adjustIframeForPreview:function(){var e,t=this.find("iframe")[0];if(t){try{e=t.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(e){for(var n=e.getElementsByTagName("A"),r=0;r'):this.parent().append('
')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})})},"./client/src/legacy/LeftAndMain.Tree.js":function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(o).default.entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,CanMoveCheckCompleted:!1,IsLoaded:!1,onadd:function(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));var n=function t(n,o){var a=o.rslt.o,i=o.rslt.np,s=e(i).data("id")||0,l=e(a).data("id"),c=e.map(e(a).siblings().andSelf(),function(t){return e(t).data("id")});if(!r.getIsUpdatingTree()){if(!r.getCanMoveCheckCompleted())return void r.canMove(o).then(function(a){a?(r.setCanMoveCheckCompleted(!0),t(n,o)):e.jstree.rollback(o.rlbk)});r.setCanMoveCheckCompleted(!1),e.ajax({url:e.path.addSearchParams(r.data("urlSavetreenode"),r.data("extraParams")),type:"POST",data:{ID:l,ParentID:s,SiblingIDs:c},success:function(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(s),r.updateNodesFromServer([l])},statusCode:{403:function(){e.jstree.rollback(o.rlbk)}}})}},r=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,n){r.setIsLoaded(!0),n.inst._set_settings({html_data:{ajax:{url:r.data("urlTree"),data:function(t){var n=r.data("searchparams")||[];return n=e.grep(n,function(e,t){return"ID"!=e.name&&"value"!=e.name}),n.push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),n.push({name:"ajax",value:1}),n}}}}),r.updateFromEditForm(),r.css("visibility","visible"),n.inst.hide_checkboxes()}).bind("before.jstree",function(t,n){if("start_drag"==n.func&&(!r.hasClass("draggable")||r.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(n.func,["check_node","uncheck_node"])){var o=e(n.args[0]).parents("li:first"),a=o.find("li:not(.disabled)");if(o.hasClass("disabled")&&0==a)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",n).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(t){var n=this,r=e(".cms-edit-form :input[name=ID]").val(),o=this.find("[data-id="+r+"]"),a=[+r];o.find("li").each(function(){a.push(e(this).data("id"))});for(var i=[];a.length;){var s=a.slice(0,50);i.push(s),a=a.slice(50)}i.map(function(e){return n.updateNodesFromServer(e,!1)}).reduce(function(e,t){return e.then(t)},Promise.resolve())}},canMove:function(){function e(e){return t.apply(this,arguments)}var t=r(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(!0));case 1:case"end":return e.stop()}},e,this)}));return e}(),getTreeConfig:function(){var t=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(n){var r=e(n.o),o=e(n.np),a=n.ot.get_container()[0]==n.np[0],i=r.getClassname(),s=o.getClassname(),l=t.getHints(),c=[],u=s||"Root",d=l&&void 0!==l[u]?l[u]:null;return d&&r.attr("class").match(/VirtualPage-([^\s]*)/)&&(i=RegExp.$1),d&&(c=void 0!==d.disallowedChildren?d.disallowedChildren:[]),!(0===r.data("id")||r.hasClass("status-archived")||a&&"inside"!=n.p||o.hasClass("nochildren")||c.length&&-1!=e.inArray(i,c))}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/admin/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function(e){return this.find("*[data-id="+e+"]")},createNode:function(t,n,r){var o=this,a=void 0!==n.ParentID&&o.getNodeByID(n.ParentID),i=e(t),s={data:""};i.hasClass("jstree-open")?s.state="open":i.hasClass("jstree-closed")&&(s.state="closed"),this.jstree("create_node",a.length?a:-1,"last",s,function(e){for(var t=e.attr("class"),n=0;n/g,"");var o=e(n),a=!!r.NextID&&this.getNodeByID(r.NextID),i=!!r.PrevID&&this.getNodeByID(r.PrevID),s=!!r.ParentID&&this.getNodeByID(r.ParentID),l=this.jstree("is_open",s);e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,o.attr(n))});var c=t.children("ul").detach();t.html(o.html()).append(c),a&&a.length?this.jstree("move_node",t,a,"before"):i&&i.length?this.jstree("move_node",t,i,"after"):this.jstree("move_node",t,s.length?s:-1),l?this.jstree("open_node",s):this.jstree("close_node",s)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.getIsLoaded()&&(!r||!this.getIsUpdatingTree())){var o=this;this.setIsUpdatingTree(!0),o.jstree("save_selected"),o.jstree("open_node",this.getNodeByID(0)),o.jstree("save_opened"),o.jstree("save_selected");var a=o.jstree("get_selected");return new Promise(function(r){e.ajax({url:e.path.addSearchParams(n.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(n,i){r(n),e.each(n,function(e,n){var r=o.getNodeByID(e);if(!n)return void o.jstree("delete_node",r);r.length?o.updateNode(r,n.html,n):n.ParentID&&!o.find("li[data-id="+n.ParentID+"]").length?o.jstree("load_node",-1):o.createNode(n.html,n,function(e){a.length||1!==t.length||(a=e)})}),a.length&&(o.jstree("deselect_all"),o.jstree("reopen"),o.jstree("select_node",a))},complete:function(){o.setIsUpdatingTree(!1)}})})}}}),e(".cms-tree.multiple").entwine({onmatch:function(){this._super(),this.jstree("show_checkboxes")},onunmatch:function(){this._super(),this.jstree("uncheck_all"),this.jstree("hide_checkboxes")},getSelectedIDs:function(){return e(this).jstree("get_checked").not(".disabled").map(function(){return e(this).data("id")}).get()}}),e(".cms-tree li").entwine({setEnabled:function(e){this.toggleClass("disabled",!e)},getClassname:function(){var e=this.attr("class").match(/class-([^\s]*)/i);return e?e[1]:""},getID:function(){return this.data("id")}})})},"./client/src/legacy/LeftAndMain.TreeDropdownField.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},"./client/src/legacy/LeftAndMain.js":function(module,exports,__webpack_require__){"use strict";(function(jQuery){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _extends=Object.assign||function(e){for(var t=1;t399?"error":"success",l=["OK","success","HTTP/2.0 200"];if(null===o||isSameUrl(r,o)&&isSameUrl(a,o)||window.ss.router.show(o,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:t.getResponseHeader("X-Pjax")?t.getResponseHeader("X-Pjax"):n.headers["X-Pjax"]}),t.getResponseHeader("X-Reauthenticate"))return void $(".cms-container").showLoginDialog();0!==t.status&&i&&-1===$.inArray(i,l)&&statusMessage(decodeURIComponent(i),s),ajaxCompleteEvent(this)}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){if($.browser.msie&&parseInt($.browser.version,10)<8)return $(".ss-loading-screen").append('Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.
').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super();this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),this._super()},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},updateLayoutOptions:function(e){var t=this.getLayoutOptions(),n=!1;for(var r in e)t[r]!==e[r]&&(t[r]=e[r],n=!0);n&&this.redraw()},clearViewMode:function(){this.removeClass("cms-container--split-mode"),this.removeClass("cms-container--preview-mode"),this.removeClass("cms-container--content-mode")},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.setProperMode()||(this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw()))},setProperMode:function(){var e=this.getLayoutOptions(),t=e.mode;this.clearViewMode();var n=this.find(".cms-content"),r=this.find(".cms-preview");if(n.css({"min-width":0}),r.css({"min-width":0}),n.width()+r.width()>=e.minContentWidth+e.minPreviewWidth)n.css({"min-width":e.minContentWidth}),r.css({"min-width":e.minPreviewWidth}),r.trigger("enable");else if(r.trigger("disable"),"split"==t)return r.trigger("forcecontent"),!0;return this.addClass("cms-container--"+t+"-mode"),!1},checkCanNavigate:function(e){var t=this._findFragments(e||["Content"]),n=t.find(":data(changetracker)").add(t.filter(":data(changetracker)")),r=!0;return!n.length||(n.each(function(){$(this).confirmUnsavedChanges()||(r=!1)}),r)},loadPanel:function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n=arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document.URL;this.checkCanNavigate(t.pjax?t.pjax.split(","):["Content"])&&(this.saveTabState(),t.__forceReferer=r,n&&(t.__forceReload=1+Math.random()),window.ss.router.show(e,t))},reloadCurrentPanel:function(){this.loadPanel(document.URL,null,null,!0)},submitForm:function(e,t,n,r){var o=this;t||(t=this.find(".btn-toolbar :submit[name=action_save]")),t||(t=this.find(".btn-toolbar :submit:first")),e.trigger("beforesubmitform"),this.trigger("submitform",{form:e,button:t}),$(t).addClass("btn--loading loading"),$(t).prop("disabled",!0),$(t).is("button")&&($(t).data("original-text",$(t).text()),$(t).append($('
')),$(t).css($(t).outerWidth()+"px"));var a=e.validate(),i=function(){$(t).removeClass("btn--loading loading"),$(t).prop("disabled",!1),$(t).find(".btn__loading-icon").remove(),$(t).css("width","auto"),$(t).text($(t).data("original-text"))};void 0===a||a||(statusMessage("Validation failed.","bad"),i());var s=e.serializeArray();return s.push({name:$(t).attr("name"),value:"1"}),s.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:e.attr("action"),data:s,type:"POST",complete:function(){i()},success:function(t,r,a){i(),e.removeClass("changed"),n&&n(t,r,a);var l=o.handleAjaxResponse(t,r,a);l&&l.filter("form").trigger("aftersubmitform",{status:r,xhr:a,formData:s})}},r)),!1},LastState:null,PauseState:!1,handleStateChange:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.history.state;if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var r=this,o=n.pjax||"Content",a={},i=o.split(","),s=this._findFragments(i);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate())return void this.reverseStateChange();if(s.length=0})),r.removeClass(a.join(" ")).addClass(s.join(" ")),o&&r.attr("style",o);var l=r.find("style").detach();l.length&&$(document).find("head").append(l),n.replaceWith(r)});var p=d.filter("form");p.hasClass("cms-tabset")&&p.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(r&&void 0!==r.tabState?r.tabState:null),d}},_findFragments:function(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ");for(t in e)if(-1!=$.inArray(e[t],n))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var e=[],t=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(t,n){var r=$(n).attr("id");r&&$(n).data("tabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:r,selected:$(n).tabs("option","selected")}))}),e){var n="tabs-"+t;try{window.sessionStorage.setItem(n,JSON.stringify(e))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}}},restoreTabState:function(e){var t=this,n=this._tabStateUrl(),r=void 0!==window.sessionStorage&&window.sessionStorage,o=r?window.sessionStorage.getItem("tabs-"+n):null,a=!!o&&JSON.parse(o),i=this.find(".cms-tabset, .ss-tabset");i.length?i.each(function(){var n,r,o=$(this),i=o.attr("id"),s=o.children("ul").children("li.ss-tabs-force-active");o.data("tabs")&&(o.tabs("refresh"),s.length?n=s.first().index():e&&e[i]?(r=o.find(e[i].tabSelector),r.length&&(n=r.index())):a&&$.each(a,function(e,t){i==t.id&&(n=t.selected)}),null!==n&&(o.tabs("option","active",n),t.trigger("tabstaterestored")))}):$("#Form_AddForm_action_doAdd").focus()},clearTabState:function(e){if(void 0!==window.sessionStorage){var t=window.sessionStorage;if(e)t.removeItem("tabs-"+e);else for(var n=0;n '),$("body").append(e),e.open()}}),$(".leftandmain__login-dialog").entwine({destroy:function(){this.close(),this.remove()},close:function(){this.renderModal(!1)},open:function(){this.renderModal(!0)},renderModal:function(e){var t=$("body").data("member-tempid"),n=$.path.addSearchParams("CMSSecurity/login",{tempid:t,BackURL:window.location.href});_reactDom2.default.render(_react2.default.createElement(_IframeDialog2.default,{title:i18n._t("Admin.CMS_LOGIN_TITLE","Login"),className:"login-dialog",bodyClassName:"login-dialog__body",iframeId:"login-dialog-iframe",iframeClassName:"login-dialog__body__iframe",isOpen:e,url:n}),this[0])},reauthenticate:function(e){void 0!==e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),void 0!==e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading,.ss-gridfield-item.loading").entwine({onmatch:function(){this._super();var e=$('
');this.append(e),_reactDom2.default.render(_react2.default.createElement(_Loading2.default,null),e[0])},onunmatch:function(){this._super();var e=this.find(".cms-loading-container");e&&e.length&&(_reactDom2.default.unmountComponentAtNode(e[0]),e.remove())}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),r={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,r),e.preventDefault()}}),$(".cms button.action.discard-confirmation").entwine({onclick:function(e){$(".cms-container").checkCanNavigate()||e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$(" ").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href||this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{void 0!==msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var e="ss-ui-dialog-"+this.getUUID(),t=$("#"+e);t.length||(t=$('
'),$("body").append(t));var n=this.data("popupclass")?this.data("popupclass"):"";return t.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:n}),!1}}),$(".cms .field.date input.text").entwine({onmatch:function(){var e=$(this).parents(".field.date:first"),t=e.data();if(!t.showcalendar)return void this._super();t.showOn="button",t.locale&&$.datepicker.regional[t.locale]&&(t=$.extend(t,$.datepicker.regional[t.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(t),this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){if(this.is(".no-chosen"))return void this._super();this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),this._super()},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field:not([cms-loading-ignore-url-params])").entwine({showDetailView:function(e){$(".cms-container").loadPanel(e)}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var t=$(this).parents("form");t.clearForm(),t.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),t.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var e=this,t=this.data("url");if(!t)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.data("deferredNoCache")||void 0===window._panelDeferredCache[t]?(this.addClass("loading"),$.ajax({url:t,complete:function(){e.removeClass("loading")},success:function(t,n,r){e.html(t)}})):this.html(window._panelDeferredCache[t])}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var e=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("tabs")||this.tabs({active:-1!=e.index()?e.index():0,beforeLoad:function(e,t){return!1},beforeActivate:function(e,t){var n=t.oldTab.find(".cms-panel-link");if(n&&1===n.length)return!1},activate:function(e,t){var n=$(this).closest("form").find(".btn-toolbar");$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");n?(this.addClass("active"),t.removeClass("cms-content-filters--hidden")):(this.removeClass("active"),t.addClass("cms-content-filters--hidden")),e.data("collapsed",!n)},onclick:function(){this.showHide()}}),$(".js-injector-boot .search-holder").entwine({Component:null,onmatch:function(){this._super();var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,_Injector.loadComponent)("Search",t);this.setComponent(n),this.refresh(),this.data("schema")},onunmatch:function(){this._super();var e=this[0];e&&_reactDom2.default.unmountComponentAtNode(e)},onfocusin:function(){this.css("z-index","100")},onfocusout:function(){this.css("z-index","")},close:function(){if($("#filters-button").showHide(),this.data("schema").filters){var e=$(".cms-search-form").attr("action");this.closest(".cms-container").loadPanel(e,"",{},!0)}},search:function(e){this._super();var t=$(".cms-search-form").attr("action");if(t&&e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=Object.entries(e)[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value,c=_slicedToArray(l,2),u=c[0],d=c[1];d&&(n["q["+u+"]"]=d)}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}0===Object.keys(n).length&&(n["q["+this.data("schema").name+"]"]=""),t=$.path.addSearchParams(t,n),$(".cms-panel-deferred.cms-content-view").data("deferredNoCache",!0),this.closest(".cms-container").loadPanel(t,"",{},!0)}},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},o=function(t){return e.search(t)},a="cms-content-tools-CMSMain"===this.closest(".cms-content-tools").attr("id");_reactDom2.default.render(_react2.default.createElement(n,_extends({id:"Search",identifier:"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:r,onSearch:o,borders:{left:!a}},t)),this[0])}})});var statusMessage=function(e,t){e=jQuery("
").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(exports,__webpack_require__(3))},"./client/src/legacy/ModelAdmin.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./client/src/legacy/LeftAndMain.js"),o.default.entwine("ss",function(e){e(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function(e){this.trigger("beforeSubmit")}}),e(".importSpec").entwine({onmatch:function(){this.find("div.details").hide(),this.find("a.detailsLink").click(function(){return e("#"+e(this).attr("href").replace(/.*#/,"")).slideToggle(),!1}),this._super()},onunmatch:function(){this._super()}}),e(".cms .btn.clear-search").entwine({onclick:function(e){e.preventDefault(),this.parents(".cms-container").loadPanel(this.attr("href"),"",{},!0,!1)}})})},"./client/src/legacy/PermissionCheckboxSetField.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".permissioncheckboxset .valADMIN input").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=e(this).parents(".field:eq(0)").find(".checkbox").not(this);e(this).is(":checked")?t.each(function(){e(this).data("SecurityAdmin.oldChecked",e(this).attr("checked")),e(this).data("SecurityAdmin.oldDisabled",e(this).attr("disabled")),e(this).attr("disabled","disabled"),e(this).attr("checked","checked")}):t.each(function(){var t=e(this).data("SecurityAdmin.oldChecked"),n=e(this).data("SecurityAdmin.oldDisabled");null!==t&&e(this).attr("checked",t),null!==n&&e(this).attr("disabled",n)})}}),e(".permissioncheckboxset .valCMS_ACCESS_LeftAndMain input").entwine({getCheckboxesExceptThisOne:function(){return e(this).parents(".field:eq(0)").find("li").filter(function(t){var n=e(this).attr("class");return!!n&&n.match(/CMS_ACCESS_/)}).find(".checkbox").not(this)},onadd:function(){this.toggleCheckboxes(),this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=this.getCheckboxesExceptThisOne();e(this).is(":checked")?t.each(function(){e(this).data("PermissionCheckboxSetField.oldChecked",e(this).is(":checked")),e(this).data("PermissionCheckboxSetField.oldDisabled",e(this).is(":disabled")),e(this).prop("disabled","disabled"),e(this).prop("checked","checked")}):t.each(function(){e(this).prop("checked",e(this).data("PermissionCheckboxSetField.oldChecked")),e(this).prop("disabled",e(this).data("PermissionCheckboxSetField.oldDisabled"))})}})})},"./client/src/legacy/SecurityAdmin.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/PermissionCheckboxSetField.js");var a=function(e){var t=(0,o.default)((0,o.default)(this).contents()).find(".message");if(t&&t.html()){var n=(0,o.default)(window.parent.document).find("#Form_EditForm_Members").get(0);n&&n.refresh();var r=(0,o.default)(window.parent.document).find(".cms-tree").get(0);r&&r.reload()}};(0,o.default)("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function(){this._super(),(0,o.default)(this).bind("load",a)}}),o.default.entwine("ss",function(e){e(".permissioncheckboxset .checkbox[value=ADMIN]").entwine({onadd:function(){this.toggleCheckboxes(),this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=this.parents(".field:eq(0)").find(".checkbox").not(this);this.is(":checked")?t.each(function(){e(this).data("SecurityAdmin.oldChecked",e(this).is(":checked")),e(this).data("SecurityAdmin.oldDisabled",e(this).is(":disabled")),e(this).prop("disabled",!0),e(this).prop("checked",!0)}):t.each(function(){e(this).prop("checked",e(this).data("SecurityAdmin.oldChecked")),e(this).prop("disabled",e(this).data("SecurityAdmin.oldDisabled"))})}})})},"./client/src/legacy/SelectionGroup.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).ready(function(){(0,o.default)("ul.SelectionGroup input.selector, ul.selection-group input.selector").live("click",function(){var e=(0,o.default)(this).closest("li");e.addClass("selected");var t=e.prevAll("li.selected");t.length&&t.removeClass("selected");var n=e.nextAll("li.selected");n.length&&n.removeClass("selected"),(0,o.default)(this).focus()})})},"./client/src/legacy/TabSet.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./thirdparty/jquery-ui/jquery-ui.js"),n("./thirdparty/jquery-cookie/jquery.cookie.js"),n("./thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),o.default.entwine("ss",function(e){e(".ss-tabset, .cms-tabset").entwine({onmatch:function(){var e=window.location.hash;""!==e&&this.openTabFromURL(e),this._super()},onadd:function(){this.on("tabsactivate",function(e,t){var n=t.newPanel;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this.on("tabscreate",function(e,t){var n=t.panel;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this._super()},triggerLazyLoad:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".lazy-loadable";t.find(r).each(function(t,r){var o=e(r),a=r.dataset.lazyEvent||"lazyload";o.closest(".ss-tabset, .cms-tabset").is(n)&&r.dispatchEvent(new Event(a))})},lazyLoadGridFields:function(t){var n=this;t.find(".grid-field--lazy-loadable").each(function(t,r){e(r).closest(".ss-tabset, .cms-tabset").is(n)&&e(r).lazyload()})},openTabFromURL:function(t){var n;e.each(this.find(".ui-tabs-anchor"),function(){if(-1!==this.href.indexOf(t)&&1===e(t).length)return n=e(this),!1}),void 0!==n&&e(function(){n.click()})}}),e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){e(this).hasClass("ss-tabset")?(this.rewriteHashlinks(),this.tabs()):this._super()},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}}),e(".ui-tabs-active .ui-tabs-anchor").entwine({onmatch:function(){this.addClass("nav-link active")},onunmatch:function(){this.removeClass("active")}})})},"./client/src/legacy/ToastsContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n(0),s=r(i),l=n(8),c=r(l),u=n(10),d=r(u),f=n(37),p=(0,u.loadComponent)("ToastsContainer");a.default.entwine("ss",function(e){e("body").entwine({onmatch:function(){var t=e('
');this.append(t),c.default.render(s.default.createElement(p,null),t[0])}})}),function(e){e.extend({noticeAdd:function(e){d.default.ready(function(){(0,d.default.reducer.store.dispatch)((0,f.display)(e))})}})}(a.default)},"./client/src/legacy/ToggleCompositeField.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./thirdparty/jquery-ui/jquery-ui.js"),o.default.entwine("ss",function(e){e(".ss-toggle").entwine({onadd:function(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0})},onremove:function(){this.data("accordion")&&this.accordion("destroy"),this._super()},getTabSet:function(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function(){this.accordion("resize")}}})})},"./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t1)return this.each(function(e,n){this.changetracker(t)}),this;this.defaults={fieldSelector:':input:not(:button,[type="submit"],[type="search"],.gridstate)',ignoreFieldSelector:'.no-change-track,[type="search"]',changedCssClass:"changed"};var o=e.extend({},this.defaults,t);if(this.initialize=function(){e.meta&&(o=e.extend({},o,this.data())),n.data("dirty",!1);var t=function(t){if(t.is(":radio")){var r=n.find(":input[name="+t.attr("name")+"]:checked");return r.length?r.val():0}if(t.is(":checkbox"))return t.is(":checked")?1:0;var o=t.val();if(t&&t.hasClass("htmleditor"))switch(t.data("editor")||"default"){case"tinyMCE":case"default":var a=e.extend({forced_root_block:"p"},t.data("config")),i=tinymce.html.Serializer(a),s=tinymce.html.DomParser(a);o=i.serialize(s.parse(o))}return o},a=function(){var r=[];return n.getFields().each(function(){var n=e(this).prop("name");n&&r.push({name:n,value:t(e(this))})}),JSON.stringify(r)},i=a(),s=function(){var e=a();return n.data("dirty")||i!==e},l=function(t){if(!t||!e(t.target).is(o.ignoreFieldSelector)){var r=s();n.toggleClass(o.changedCssClass,r)}},c=function(r){var a=e(r.target),i=a.data("changetracker.origVal");if(!a.is(o.ignoreFieldSelector)){var s=t(a);null===i||s!==i?(a.addClass(o.changedCssClass),n.addClass(o.changedCssClass)):(a.removeClass(o.changedCssClass),a.is(":radio")&&n.find(":radio[name="+a.attr("name")+"]").removeClass(o.changedCssClass),u())}},u=(0,r.default)(l,250,{leading:!0,trailing:!0}),d=(0,r.default)(c,250,{leading:!0,trailing:!0});n.on("click.changetracker",o.fieldSelector,d),n.on("keyup.changetracker",o.fieldSelector,d),n.on("change.changetracker",o.fieldSelector,d),n.on("change.changetracker",u),this.getFields().each(function(){var n=t(e(this));e(this).data("changetracker.origVal",n)}),n.on("dirty.changetracker",function(){n.data("dirty",!0),u()}),this.data("changetracker",!0)},this.destroy=function(){this.reset(),this.off(".changetracker").removeData("changetracker")},this.reset=function(){this.getFields().each(function(){n.resetField(this)}),this.data("dirty",!1).removeClass(o.changedCssClass)},this.resetField=function(t){return e(t).removeData("changetracker.origVal").removeClass(o.changedCssClass)},this.getFields=function(){return this.find(o.fieldSelector).not(o.ignoreFieldSelector+", .search-box *")},"string"==typeof arguments[0]){var a=(arguments[1],Array.prototype.slice.call(arguments));return a.splice(0,1),this[arguments[0]].apply(this,a)}var n=this;return setTimeout(function(){n.initialize()},0),this}}(e)}).call(t,n(3))},"./client/src/legacy/sspath.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=((0,o.default)(window),(0,o.default)("html"),(0,o.default)("head"),{urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===o.default.type(e))return e;var t=a.urlParseRE.exec(e||"")||[];return{href:t[0]||"",hrefNoHash:t[1]||"",hrefNoSearch:t[2]||"",domain:t[3]||"",protocol:t[4]||"",doubleSlash:t[5]||"",authority:t[6]||"",username:t[8]||"",password:t[9]||"",host:t[10]||"",hostname:t[11]||"",port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function(e,t){if(e&&"/"===e.charAt(0))return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";for(var n=t?t.split("/"):[],r=e.split("/"),o=0;o');t.bind("load",function(n){"about:blank"!=(0,r.default)(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){r.default.ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,r.default)(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){r.default.ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,r.default)(window).unbind("resize.ssdialog")},_resizeIframe:function(){var t,n,o={},a=this.element.children("iframe");this.options.widthRatio&&(t=(0,r.default)(window).width()*this.options.widthRatio,this.options.minWidth&&tthis.options.maxWidth?o.width=this.options.maxWidth:o.width=t),this.options.heightRatio&&(n=(0,r.default)(window).height()*this.options.heightRatio,this.options.minHeight&&nthis.options.maxHeight?o.height=this.options.maxHeight:o.height=n),e.isEmptyObject(o)||(this._setOptions(o),a.attr("width",o.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),a.attr("height",o.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),r.default.widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||" ",n=r.default.ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var o=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var a=(0,r.default)(' ').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){a.addClass("ui-state-hover")},function(){a.removeClass("ui-state-hover")}).focus(function(){a.addClass("ui-state-focus")}).blur(function(){a.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(o);(this.uiDialogTitlebarCloseText=(0,r.default)(" ")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(a)}(0,r.default)(" ").addClass("ui-dialog-title").attr("id",n).html(t).prependTo(o),o.find("*").add(o).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),r.default.extend(r.default.ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})}).call(t,n(3))},"./client/src/lib/Injector.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlTemplates=t.loadComponent=t.injectGraphql=t.inject=t.withInjector=t.provideContext=t.provideInjector=void 0;var o=n("./client/src/lib/dependency-injection/provideInjector.js"),a=r(o),i=n("./client/src/lib/dependency-injection/provideContext.js"),s=r(i),l=n("./client/src/lib/dependency-injection/withInjector.js"),c=r(l),u=n("./client/src/lib/dependency-injection/inject.js"),d=r(u),f=n("./client/src/lib/dependency-injection/injectGraphql.js"),p=r(f),h=n("./client/src/lib/dependency-injection/graphql/templates.js"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(h),b=n("./client/src/lib/dependency-injection/loadComponent.js"),v=r(b),g=n("./client/src/lib/dependency-injection/Container.js"),y=r(g);t.provideInjector=a.default,t.provideContext=s.default,t.withInjector=c.default,t.inject=d.default,t.injectGraphql=p.default,t.loadComponent=v.default,t.graphqlTemplates=m,t.default=y.default},"./client/src/lib/Validator.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(t&&void 0!==t.react)return l.default.createElement(e,n,t.react);if(t&&void 0!==t.html){if(null!==t.html){var r={__html:t.html};return l.default.createElement(e,i({},n,{dangerouslySetInnerHTML:r}))}return null}var o=null;if((o=t&&void 0!==t.text?t.text:t)&&"object"===(void 0===o?"undefined":a(o)))throw new Error("Unsupported string value "+JSON.stringify(o));return null!==o&&void 0!==o?l.default.createElement(e,n,o):null}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=this.config.params;return this.config.params=c({},t,e),this}},{key:"addArg",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.ROOT_FIELD;return this.addArgs(o({},e,t),n)}},{key:"addArgs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ROOT_FIELD,n=this.config.args[t]||{};return this.config.args[t]=c({},n,e),this}},{key:"addField",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ROOT_FIELD;return this.addFields([e],t)}},{key:"addFields",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ROOT_FIELD,r=[];return n.split("/").forEach(function(t){if(t===p.ROOT_FIELD)r=e.config.fields;else{var o=r.indexOf(t),a=r[o+1];if(-1===o||!Array.isArray(a))throw new Error("Invalid path to field: "+n);r=a}}),t.forEach(function(e){return r.push(e)}),this}},{key:"useFragment",value:function(e){return this.config.fragments=[].concat(i(this.config.fragments),[e]),this}},{key:"useTemplate",value:function(e){if(!Object.keys(this.templates).includes(e))throw new Error("\nTried to use template '"+e+"', which could not be found. Please make sure that it is registered with your Injector.\n ");return this.config.templateName=e,this}},{key:"addTempFragment",value:function(e,t){return this.fragments=c({},this.fragments,o({},e,t)),this.useFragment(e)}},{key:"setTemplate",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2])||arguments[2];return this.mutateField(e,function(e){var r=(0,d.default)(e.extraClass);return r[t]=n,i({},e,{extraClass:(0,c.default)(r)})})}},{key:"addFieldClass",value:function(e,t){return this.setFieldClass(e,t,!0)}},{key:"removeFieldClass",value:function(e,t){return this.setFieldClass(e,t,!1)}},{key:"getValues",value:function(){return(0,h.getFormValues)(this.schema.name,b)(this.mockGlobalState)||{}}},{key:"getValue",value:function(e){return this.getValues()[e]}},{key:"isDirty",value:function(){return(0,h.isDirty)(this.schema.name,b)(this.mockGlobalState)}},{key:"isPristine",value:function(){return(0,h.isPristine)(this.schema.name,b)(this.mockGlobalState)}},{key:"isValid",value:function(){return(0,h.isValid)(this.schema.name,b)(this.mockGlobalState)}},{key:"isInvalid",value:function(){return(0,h.isInvalid)(this.schema.name,b)(this.mockGlobalState)}},{key:"getState",value:function(){return this.schema}}]),e}();t.default=v},"./client/src/lib/dependency-injection/FormValidationManager.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1)throw new Error("\n Key "+n+" on "+e.name+' should only specify one key \n if using the "*" wildcard\n ');if(t)throw new Error("\n Cannot specify a "+n+" rule on "+e.name+" if a wildcard \n has been specified\n ");t=n}}),t},d=function(){function e(){r(this,e),this._middlewares=[],this._contextCache={}}return a(e,[{key:"sort",value:function(){var e=this,t=["__HEAD__","__TAIL__"],n=[t],r=[];return this._middlewares.forEach(function(e){var t=e.name,r=u(e);"after"===r?n.push(["__TAIL__",t]):"before"===r?n.push([t,"__HEAD__"]):(n.push([t,"__TAIL__"]),n.push(["__HEAD__",t]),e.before.forEach(function(e){n.push([t,e])}),e.after.forEach(function(e){n.push([e,t])}))}),(0,s.default)(n).filter(function(e){return!t.includes(e)}).forEach(function(t){r=r.concat(e._middlewares.filter(function(e){return e.name===t}))}),this._middlewares=r,this}},{key:"add",value:function(e,t,n){c(e),this._contextCache={};var r=n;r&&r.length?Array.isArray(r)||(r=[r]):r=["__GLOBAL__"];var a=o({},e,{factory:t,context:r});return l.forEach(function(t){Array.isArray(e[t])?a[t]=e[t]:a[t]=e[t]?[e[t]]:[]}),l.every(function(e){return!a[e].length})&&(a.after=["__HEAD__"],a.before=["__TAIL__"]),this._middlewares.push(a),this}},{key:"getMatchesForContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__GLOBAL__";if(!this._contextCache[e]){var t=e.split(".");this._contextCache[e]=this._middlewares.filter(function(e){return"__GLOBAL__"===e.context[0]||e.context.every(function(e,n){return"*"===e||t[n]===e})})}return this._contextCache[e]}}]),e}();t.GLOBAL_CONTEXT="__GLOBAL__",t.default=d},"./client/src/lib/dependency-injection/applyFormMiddleware.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:(0,l.default)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i({},e,{templates:i({},t),fragments:i({},n),scaffold:function(e,t,n){throw n.force,new Error("This API endpoint is not available yet")},register:function(t,n){var r,o=n.templateName;if(!o||!this.templates[o])throw new Error("\nTried to register a new query '"+t+"' without a defined template '"+o+"'. Please ensure the\ntemplateName config is defined and that you have registered the template before registering a query.\n ");for(var i=arguments.length,s=Array(i>2?i-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{},a=r.force;return e.isProtected.call(this),function(e){for(var r=arguments.length,s=Array(r>1?r-1:0),l=1;l2&&void 0!==arguments[2]?arguments[2]:{},a=r.force;if(e.isProtected.call(this),this.fragments[t]&&!a)throw new Error("\nTried to register fragment '"+t+"' more than once. This practice is discouraged. Consider\nadding a new fragment or using Injector.update() to enhance the template you're working with.\nOtherwise, invoke the registerFragment() function with '{ force: true }' as the third argument.\n ");this.fragments=i({},this.fragments,o({},t,n))},getTemplates:function(){return i({},this.templates)},getFragments:function(){return i({},this.fragments)},getProcessedManager:function(e,t){var n=t.map(function(e){return e.factory}).reverse(),r=this.services[e],o=new u.default(r,i({},this.templates),i({},this.fragments));return n.forEach(function(e){e(o)},r),o},getFactory:function(e,t){return this.getProcessedManager(e,t).getContainer()}})};t.default=d},"./client/src/lib/dependency-injection/buildApolloGraphqlScaffoldingContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a,i=n("./client/src/lib/dependency-injection/buildBaseContainer.js"),s=r(i),l=n("./client/src/lib/dependency-injection/buildApolloGraphqlContainer.js"),c=r(l),u=n("./client/src/lib/dependency-injection/graphql/buildCreateMutation.js"),d=r(u),f=n("./client/src/lib/dependency-injection/graphql/buildReadQuery.js"),p=r(f),h=n("./client/src/lib/dependency-injection/graphql/buildReadOneQuery.js"),m=r(h),b=n("./client/src/lib/dependency-injection/graphql/buildUpdateMutation.js"),v=r(b),g=n("./client/src/lib/dependency-injection/graphql/buildDeleteMutation.js"),y=r(g),_=n("./client/src/lib/dependency-injection/graphql/buildBaseQuery.js"),j=r(_),w=n("./client/src/lib/dependency-injection/graphql/templates.js"),O=n("./client/src/lib/dependency-injection/graphql/tags.js"),E=(a={},o(a,w.CREATE,(0,d.default)(O.captureTag)),o(a,w.READ,(0,p.default)(O.captureTag)),o(a,w.READ_ONE,(0,m.default)(O.captureTag)),o(a,w.UPDATE,(0,v.default)(O.captureTag)),o(a,w.DELETE,(0,y.default)(O.captureTag)),o(a,w.QUERY,(0,j.default)(O.captureTag)),a),C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,s.default)();return(0,c.default)(e,E)};t.default=C},"./client/src/lib/dependency-injection/buildBaseContainer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:s.GLOBAL_CONTEXT,o=n+"__"+t;if(!e.factoryCache[o]){var a=r.getMatchesForContext(t);e.factoryCache[o]=e.getFactory(n,a)}return e.factoryCache[o]}))):i({},t,o({},n,function(){return e.getFactory(n,[])}))},{}),this.initialised=!0},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.force;if(this.isProtected(),this.services[e]&&!0!==r)throw new Error("\n Tried to register service '"+e+"' more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ");this.services=i({},this.services,o({},e,t))},registerMany:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force;this.isProtected();var r=Object.keys(e),o=Object.keys(this.services).filter(function(e){return r.includes(e)});if(o.length&&!0!==n){var a=o.join(", ");throw new Error("\n Tried to register services ("+a+") more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ")}this.services=i({},this.services,e)},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isProtected(),t(this.createTransformer(e,n))},createTransformer:function(e,t){var n=this;return function(r,o){n.customise(i({name:e},t),r,o)}},getFactory:function(e,t){var n=this.services[e],o=t.map(function(e){return e.factory});return c.compose.apply(void 0,r(o))(n)}}};t.default=u},"./client/src/lib/dependency-injection/buildComponentContainer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:(0,i.default)();return o({},e,{get:function(t,n){for(var o,a=arguments.length,i=Array(a>2?a-2:0),s=2;s0&&void 0!==arguments[0]?arguments[0]:(0,l.default)();return i({},t,{services:(e={},a(e,"FormSchemaMiddleware",function(e){return e}),a(e,"FormValidationMiddleware",function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}),e),register:function(){throw new Error("\n Attempted to register a service on Injector.form. This container accepts only two\n services by design (FormSchemaMiddleware and FormValidationMiddleware) \n for updating form schema and adding validation, respectively. Consider using a more\n generic container, e.g. Injector.reducer.\n ")},registerMany:function(){this.register()},getSchema:function(e){for(var n,r=arguments.length,a=Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.force;if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");if(this.services[e]&&!0!==r)throw new Error("\n Tried to register service "+e+" more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ");if(void 0!==this[e]&&!this.services[e])throw new Error("\n Tried to register service "+e+" which is a reserved keyword. This would affect the behaviour\n of this API class, so it is forbidden to register with Injector.\n ");var o=["load","createTransformer","get","register"];if(!o.every(function(e){return"function"==typeof t[e]}))throw new Error("\n Tried to register service "+e+" that is not a valid object, Injector requires an object\n which contains the following methods: "+o.join(", ")+"\n ");this.services[e]=t,this[e]=t},load:function(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");Object.values(this.services).forEach(function(e){return e.load()}),this.initialised=!0,this.onInit&&this.onInit(),this.callbacks.forEach(function(e){e()}),this.callbacks=[]},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");t(Object.entries(this.services).reduce(function(t,r){var s=i(r,2),l=s[0],c=s[1];return a({},t,o({},l,c.createTransformer(e,n)))},{}))},ready:function(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");if(this.initialised)return void e();this.callbacks=[].concat(r(this.callbacks),[e])},init:function(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");if(this.initialised)throw new Error("Tried to add an init() callback after Injector was initialised");this.onInit=e}}};t.default=s},"./client/src/lib/dependency-injection/buildReducerContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:(0,l.default)();return i({},e,{store:null,setStore:function(e){this.store=e},customise:function(e,t,n){var r=this;this.isProtected();var a=this.middlewareRegistries[t];a||(a=new u.default,this.middlewareRegistries=i({},this.middlewareRegistries,o({},t,a)));var s=function(e){var t=r.store&&r.store.getState;return n(e)(t)};a.add(e,s)},getAll:function(){return this.initialised?Object.entries(this.factories).reduce(function(e,t){var n=a(t,2),r=n[0],s=n[1];return i({},e,o({},r,s()))},{}):Object.entries(this.services).reduce(function(e,t){var n=a(t,2),r=n[0],s=n[1];return i({},e,o({},r,s))},{})}})};t.default=d},"./client/src/lib/dependency-injection/graphql/buildBaseQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([""," ",""," {\n ","(",") {\n ","\n }\n }\n ",""],[""," ",""," {\n ","(",") {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(e){var t=e.operationName,n=e.queryName;return t||""+n.charAt(0).toUpperCase()+n.slice(1)},s=function(e){return e.queryName},l=function(e){return e.queryType},c=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,l,i,a.getVariables,s,a.getParams,a.getFields,a.getFragments)};t.default=c},"./client/src/lib/dependency-injection/graphql/buildCreateMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Create","(\n $Input:","CreateInputType!\n ) {\n create","(\n Input: $Input\n ) {\n ","\n }\n }\n ",""],["mutation Create","(\n $Input:","CreateInputType!\n ) {\n create","(\n Input: $Input\n ) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName,a.getSingularName,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildDeleteMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Delete","($IDs:[ID]!) {\n delete","(IDs: $IDs)\n }"],["mutation Delete","($IDs:[ID]!) {\n delete","(IDs: $IDs)\n }"]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildReadOneQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["query ReadOne","($ID: ID!) {\n readOne","(ID: $ID) {\n ","\n }\n }\n ",""],["query ReadOne","($ID: ID!) {\n readOne","(ID: $ID) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildReadQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["query Read",""," {\n read",""," {\n ","\n }\n }\n ",""],["query Read",""," {\n read",""," {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getPluralName,a.getVariables,a.getPluralName,a.getRootParams,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildUpdateMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Update","(\n $Input:","UpdateInputType!\n ","\n ) {\n update","(\n Input: $Input\n ","\n ) {\n ","\n }\n }\n ",""],["mutation Update","(\n $Input:","UpdateInputType!\n ","\n ) {\n update","(\n Input: $Input\n ","\n ) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName,a.getVariables,a.getSingularName,a.getParams,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/helpers.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:[i],d=o.map(function(t,a){if(Array.isArray(t))return"\n {\n "+e({args:n,fields:t,pagination:!1},[].concat(r(u),[o[a-1]]))+"\n }";var i=[].concat(r(u),[t]),s=i.join("/"),l=n[s]||{};return""+t+c({params:l,pagination:!1})});return s?l(d):d.join(" ")},t.getFragments=function(e){var t=e.availableFragments,n=e.fragments,r=void 0===n?[]:n;return Object.entries(t).reduce(function(e,t){var n=o(t,2),a=n[0],i=n[1];return r.includes(a)?e+" "+i:e},"")}},"./client/src/lib/dependency-injection/graphql/tags.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),r=1;r1?t-1:0),r=1;r1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:m;return function(r){if(e&&!Array.isArray(e))throw new Error("\n withInjector() passed an argument for dependencies that is "+("undefined"==typeof deps?"undefined":u(deps))+".\n Must be an array of named dependencies.\n ");if(t&&"function"!=typeof t)throw new Error("\n Second parameter of inject() [mapDependenciesToProps] must be a function, taking the resolved\n dependencies as enumerated arguments, and returning a map of prop names to dependencies.\n ");if("function"!=typeof n)throw new Error("\n Third parameter of inject() [getContext] must be a function, taking the component's props\n and current inject context as parameters, and returning a string representing the Injector\n context to use throughout the component.\n ");var p=function(d){function p(e,t){a(this,p);var r=i(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,e,t));return r.state={context:n(e,t.injector.context)},r}return s(p,d),c(p,[{key:"getChildContext",value:function(){return{injector:l({},this.context.injector,{context:this.state.context})}}},{key:"render",value:function(){var n=this,a={};if(e){var i=this.context.injector.get,s=e.map(function(e){return i(e,n.state.context)});if(t?a=t.apply(void 0,o(s)):e.forEach(function(e,t){a[e]=s[t]}),!a||"object"!==(void 0===a?"undefined":u(a)))throw new Error("\n mapDepedenciesToProps parameter passed to inject()\n should return an object that maps prop names to dependencies\n ")}var c=l({},a,this.props);return f.default.createElement(r,c)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=n(e,t.context);return r!==t.context?{context:r}:null}}]),p}(d.Component);return p.contextTypes=h.default,p.childContextTypes=h.default,p}};t.default=b},"./client/src/lib/dependency-injection/injectGraphql.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],r=function(n){function r(e){o(this,r);var t=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.state={target:null,error:!1},t}return i(r,n),l(r,[{key:"getChildContext",value:function(){var e=t&&t.context;return e?{injector:s({},this.context.injector,{context:e})}:this.context}},{key:"componentDidMount",value:function(){var n=this;g.default.ready(function(){if("string"==typeof e){var r=!0,o=null;try{o=n.context.injector.get(e,t&&t.context),r=!1}catch(e){throw n.setState({target:o,error:r}),e}return void n.setState({target:o,error:r})}n.setState({target:e})})}},{key:"render",value:function(){var n=this.state.target;if(this.state.error){var r=_.default;try{r=this.context.injector.get("NotFoundComponent")}catch(e){}return u.default.createElement(r,s({},this.props,{itemName:e}))}if(n){if(t){var o=s({},window.ss,t),a=o.store,i=o.apolloClient;return u.default.createElement(f.ApolloProvider,{client:i},u.default.createElement(d.Provider,{store:a},u.default.createElement(n,this.props)))}return u.default.createElement(n,this.props)}return null}}]),r}(c.Component);return r.childContextTypes=w.default,(n||h.default)((0,b.default)(r))};t.default=O},"./client/src/lib/dependency-injection/provideContext.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:f.default,n=function(n){function r(){return o(this,r),a(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return i(r,n),l(r,[{key:"getChildContext",value:function(){var e=t.component,n=t.form,r=t.query;return{injector:{query:r.get.bind(r),get:e.get.bind(e),validate:n.getValidation.bind(n)}}}},{key:"render",value:function(){return u.default.createElement(e,this.props)}}]),r}(c.Component);return n.childContextTypes=h.default,n}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case l.default.SET_BREADCRUMBS:return(0,i.default)(Object.assign([],t.payload.breadcrumbs));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),s=n("./client/src/state/breadcrumbs/BreadcrumbsActionTypes.js"),l=r(s),c=(0,i.default)([]);t.default=o},"./client/src/state/config/ConfigActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_CONFIG:"SET_CONFIG"}},"./client/src/state/config/ConfigActions.js":function(e,t,n){"use strict";function r(e){return{type:a.default.SET_CONFIG,payload:{config:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=r;var o=n("./client/src/state/config/ConfigActionTypes.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},"./client/src/state/config/ConfigReducer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];switch(t.type){case l.default.SET_CONFIG:return(0,i.default)(Object.assign({},e,t.payload.config));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),s=n("./client/src/state/config/ConfigActionTypes.js"),l=r(s);t.default=o},"./client/src/state/mobileMenu/MobileMenuActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_MENU:"TOGGLE_MENU",OPEN_MENU:"OPEN_MENU",CLOSE_MENU:"CLOSE_MENU"}},"./client/src/state/mobileMenu/MobileMenuActions.js":function(e,t,n){"use strict";function r(){return{type:s.default.TOGGLE_MENU,payload:null}}function o(){return{type:s.default.OPEN_MENU,payload:null}}function a(){return{type:s.default.CLOSE_MENU,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleMobileMenu=r,t.openMobileMenu=o,t.closeMobileMenu=a;var i=n("./client/src/state/mobileMenu/MobileMenuActionTypes.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(i)},"./client/src/state/mobileMenu/MobileMenuReducer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;switch(arguments[1].type){case c.default.TOGGLE_MENU:return(0,s.default)(a({},e,{isOpen:!e.isOpen}));case c.default.OPEN_MENU:return(0,s.default)(a({},e,{isOpen:!0}));case c.default.CLOSE_MENU:return(0,s.default)(a({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1];switch(t.type){case d.default.FETCH_RECORDS_SUCCESS:var n=t.payload.recordType;if(!n)throw new Error("Undefined record type");var r=t.payload.data._embedded[n]||[];return(0,c.default)(s({},e,a({},n,r)));case d.default.FETCH_RECORD_SUCCESS:var i=t.payload.recordType,l=t.payload.data;if(!i)throw new Error("Undefined record type");if(!l)throw new Error("Undefined record data given");var u=e[i]||[];return u.find(function(e){return e.ID===l.ID})?(0,c.default)(s({},e,a({},i,u.map(function(e){return e.ID===l.ID?l:e})))):(0,c.default)(s({},e,a({},i,[].concat(o(u),[l]))));case d.default.DELETE_RECORD_SUCCESS:var p=t.payload.recordType;if(!p)throw new Error("Undefined record type");var h=e[p].filter(function(e){return e.ID!==t.payload.id});return(0,c.default)(s({},e,a({},p,h)));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(t.type){case u.default.SET_SCHEMA:var n=e[t.payload.id]||{};return(0,l.default)(i({},e,o({},t.payload.id,i({},n,t.payload))));case u.default.SET_SCHEMA_STATE_OVERRIDES:var r=e[t.payload.id]||{},a=t.payload.stateOverride;return a&&a.fields?(0,l.default)(i({},e,o({},t.payload.id,i({},r,{stateOverride:a})))):e;case u.default.SET_SCHEMA_LOADING:var s=e[t.payload.id]||{},c=s.metadata||{};return(0,l.default)(i({},e,o({},t.payload.id,i({},s,{metadata:i({},c,{loading:t.payload.loading})}))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,l.default)(e,t,f);switch(t.type){case u.default.TABS_ACTIVATE_TAB:return n(function(){return{activeTab:t.payload.tab}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(11),i=r(a),s=n(40),l=r(s),c=n("./client/src/state/tabs/TabsActionTypes.js"),u=r(c),d=(0,i.default)({fields:{}}),f=(0,i.default)({activeTab:null})},"./client/src/state/toasts/ToastConstants.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STAY_TIME=6e3,t.FADEOUT_TIME=1200},"./client/src/state/toasts/ToastsActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={DISPLAY:"DISPLAY_TOAST",DISMISS:"DISMISS_TOAST",REMOVE:"REMOVE_TOAST",PAUSE:"PAUSE_TOAST",RESUME:"RESUME_TOAST"}},"./client/src/state/toasts/ToastsReducer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1],n=t.type,r=t.payload;switch(n){case l.default.DISPLAY:return m(e,r);case l.default.DISMISS:return b(e,r.id);case l.default.REMOVE:return v(e,r.id);case l.default.PAUSE:return f(e);case l.default.RESUME:return p(e);default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,p.default)(e,t,v),r=function(e,t){return e.filter(function(e){return e!==t})},a=function(e,t){return e.find(function(e){return e===t})?e:[].concat(o(e),[t]).sort()};switch(t.type){case m.default.TREEFIELD_SET_VISIBLE:return n(function(){return{visible:t.payload.path}});case m.default.TREEFIELD_UPDATING_TREE:return n(function(e){return{loading:a(e.loading,s(t.payload.path)),failed:r(e.failed,s(t.payload.path))}});case m.default.TREEFIELD_UPDATED_TREE:return n(function(e){return{tree:i(e.tree,t.payload.path,t.payload.tree),loading:r(e.loading,s(t.payload.path)),failed:r(e.failed,s(t.payload.path))}});case m.default.TREEFIELD_UPDATE_FAILED:return n(function(e){return{loading:r(e.loading,s(t.payload.path)),failed:a(e.failed,s(t.payload.path))}});case m.default.TREEFIELD_SET_SEARCH:return n(function(e){return c({},e,{search:t.payload.search})});case m.default.TREEFIELD_ADD_SELECTED_VALUES:var l=t.payload.values||[];return n(function(e){return c({},e,{selectedValues:[].concat(o(e.selectedValues.filter(function(e){return!l.find(function(t){return t.id===e.id})})),o(l)).sort(function(e,t){return e.id-t.id})})});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=t.meta&&t.meta.form;switch(t.type){case u.default.ADD_FORM_CHANGED:case l.actionTypes.CHANGE:return(0,s.default)([].concat(o(e.filter(function(e){return e.name!==n})),[{name:n}]));case u.default.REMOVE_FORM_CHANGED:case l.actionTypes.STOP_SUBMIT:return(0,s.default)([].concat(o(e.filter(function(e){return e.name!==n}))));case l.actionTypes.DESTROY:return(0,s.default)([].concat(o(e.filter(function(e){return!n.includes(e.name)}))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),s=r(i),l=n(12),c=n("./client/src/state/unsavedForms/UnsavedFormsActionTypes.js"),u=r(c);t.default=a},"./client/src/state/usedOn/usedOnActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return{type:u.default.SAVE_USED_ON,payload:{identifier:e,usedOn:t}}}function a(e,t){return{type:u.default.LOAD_USED_ON_FAILED,payload:{identifier:e,error:t.message}}}function i(e,t,n){var r={method:t,headers:{Accept:"application/json"},credentials:"same-origin"};return function(i){if(!e||!t||!n){var s=l.default._t("Admin.NOT_AVAILABLE_USED_DATA","The usage data is currently unavailable.");return Promise.resolve(i(a(e,s)))}return i({type:u.default.LOAD_USED_ON,payload:{identifier:e}}),(0,f.default)(n,r).then(function(e){return e.json()}).then(function(t){i(o(e,t))}).catch(function(t){i(a(e,t))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.saveUsedOn=o,t.loadUsedOnFailed=a,t.loadUsedOn=i;var s=n(4),l=r(s),c=n("./client/src/state/usedOn/usedOnTypes.js"),u=r(c),d=n(15),f=r(d)},"./client/src/state/usedOn/usedOnReducer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1],n=t&&t.payload&&t.payload.identifier;if(!n)return e;switch(t.type){case c.default.SAVE_USED_ON:var a=t.payload.usedOn;return s({},e,{loading:e.loading.filter(function(e){return e!==n}),usedOn:s({},e.usedOn,o({},n,a.usage))});case c.default.LOAD_USED_ON:return e.loading.includes(n)?e:s({},e,{loading:[].concat(r(e.loading),[n]),errors:Object.entries(e.errors).reduce(function(e,t){var r=i(t,2),a=r[0],l=r[1];return a===n?e:s({},e,o({},a,l))},{})});case c.default.LOAD_USED_ON_FAILED:var l=t.payload.error;return s({},e,{loading:e.loading.filter(function(e){return e!==n}),errors:s({},e.errors,o({},n,l))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case i.default.SELECT_EDIT:return o({},e,{activeState:l.VIEW_MODE_STATES.EDIT,lockState:!0});case i.default.SELECT_PREVIEW:return o({},e,{activeState:l.VIEW_MODE_STATES.PREVIEW,lockState:!0});case i.default.SELECT_SPLIT:return o({},e,{activeState:l.VIEW_MODE_STATES.SPLIT,lockState:!1});case i.default.SPLIT_AVAILABLE:var n=t.payload.panelWidth>s.SPLITMODE_BREAKPOINT,r=e.activeState;return e.lockState||r!==l.VIEW_MODE_STATES.SPLIT||n?!e.lockState&&r===l.VIEW_MODE_STATES.EDIT&&n&&(r=l.VIEW_MODE_STATES.SPLIT):r=l.VIEW_MODE_STATES.EDIT,o({},e,{splitAvailable:n,activeState:r});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return{crumbs:e.breadcrumbs}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var c=Object.assign||function(e){for(var t=1;t1&&f.default.createElement("div",{className:"breadcrumb__list-container"},f.default.createElement("ol",{className:"breadcrumb"},this.renderBreadcrumbs())),this.renderLastCrumb())}}]),t}(d.Component);_.propTypes={crumbs:v.default.arrayOf(v.default.shape({onClick:v.default.func,text:v.default.string,icon:v.default.shape({nodeName:v.default.string,className:v.default.string,onClick:v.default.func,action:function(e){if(e.action)throw new Error("action: no longer used")}}),icons:v.default.arrayOf(v.default.shape({nodeName:v.default.string,className:v.default.string,onClick:v.default.func}))}))},t.Component=_,t.default=(0,p.connect)(l)(_)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Button/BackButton.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(f.default,s({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);v.propTypes={className:b.default.string,extraClass:b.default.string,itemClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,source:b.default.arrayOf(b.default.shape({value:b.default.oneOfType([b.default.string,b.default.number]),title:b.default.any,disabled:b.default.bool})),onChange:b.default.func,value:b.default.any,readOnly:b.default.bool,disabled:b.default.bool},v.defaultProps={extraClass:"",className:"",value:[]},t.Component=v;var g=function(e){var t=(0,h.default)(v);return u.default.createElement(t,e)};t.default=g},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/FieldHolder/FieldHolder.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=function(t){function n(){return a(this,n),i(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return s(n,t),u(n,[{key:"getMessage",value:function(){var e=null;this.props.message&&this.props.message.value&&(e=this.props.message);var t=this.props.meta;return t&&t.error&&t.touched&&(!e||t.dirty)&&(e=t.error),e}},{key:"getHolderProps",value:function(){var e;return{className:(0,v.default)((e={field:!0},o(e,this.props.extraClass,!0),o(e,"readonly",this.props.readOnly),e)),id:this.props.holderId}}},{key:"renderMessage",value:function(){var e=this.getMessage();if(!e)return null;var t=(0,v.default)(["form__field-message","form__field-message--"+e.type]),n=(0,m.default)("div",e.value);return f.default.createElement("div",{className:t},n)}},{key:"renderLeftTitle",value:function(){var e=null!==this.props.leftTitle?this.props.leftTitle:this.props.title;return!e||this.props.hideLabels?null:(0,m.default)(p.Label,e,{className:"form__field-label",for:this.props.id})}},{key:"renderRightTitle",value:function(){return!this.props.rightTitle||this.props.hideLabels?null:(0,m.default)(p.Label,this.props.rightTitle,{className:"form__field-label",for:this.props.id})}},{key:"renderField",value:function(){var t=Boolean(this.getMessage()),n=c({},this.props,{extraClass:(0,v.default)(this.props.extraClass,{"is-invalid":t})}),r=f.default.createElement(e,n),o=this.props.data.prefix,a=this.props.data.suffix;return o||a?f.default.createElement(p.InputGroup,null,o&&f.default.createElement(p.InputGroupAddon,{addonType:"prepend"},o),r,a&&f.default.createElement(p.InputGroupAddon,{addonType:"append"},a)):r}},{key:"renderTitleTip",value:function(){return this.props.id&&this.props.titleTip&&this.props.titleTip.content?f.default.createElement(j.default,{id:"FieldHolder-"+this.props.id+"-titleTip",content:this.props.titleTip.content,fieldTitle:this.props.title,type:_.TIP_TYPES.TITLE,icon:"menu-help"}):null}},{key:"renderDescription",value:function(){return null===this.props.description?null:(0,m.default)("div",this.props.description,{className:"form__field-description"})}},{key:"render",value:function(){return this.props.noHolder?this.renderField():f.default.createElement(p.FormGroup,this.getHolderProps(),this.renderLeftTitle(),this.renderTitleTip(),f.default.createElement("div",{className:"form__field-holder"},this.renderField(),this.renderMessage(),this.renderDescription()),this.renderRightTitle())}}]),n}(d.Component);return t.propTypes={leftTitle:y.default.any,rightTitle:y.default.any,title:y.default.any,extraClass:y.default.string,holderId:y.default.string,id:y.default.string,name:y.default.string,description:y.default.any,hideLabels:y.default.bool,message:y.default.shape({extraClass:y.default.string,value:y.default.any,type:y.default.string}),data:y.default.oneOfType([y.default.array,y.default.shape({prefix:y.default.string,suffix:y.default.string})]),titleTip:y.default.shape(_.tipShape)},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null,title:"",description:null,hideLabels:!1,noHolder:!1,message:null,data:{}},t}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t-1})?null:this.isPrimary()?"primary":"secondary"}},{key:"getIcon",value:function(){return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function(){return this.props.loading?u.default.createElement("div",{className:"btn__loading-icon"},u.default.createElement("span",{className:"btn__circle btn__circle--1"}),u.default.createElement("span",{className:"btn__circle btn__circle--2"}),u.default.createElement("span",{className:"btn__circle btn__circle--3"})):null}},{key:"isDisabled",value:function(){var e=this.props,t=e.disabled,n=e.readOnly;return t||n}},{key:"isPrimary",value:function(){var e=this.props,t=e.extraClass,n=e.name,r=t.split(" ");return"action_save"===n||!!r.find(function(e){return"ss-ui-action-constructive"===e})}},{key:"handleClick",value:function(e){"function"==typeof this.props.onClick&&this.props.onClick(e,this.props.name||this.props.id)}},{key:"render",value:function(){var e=this.props.title;return u.default.createElement("button",this.getButtonProps(),this.getLoadingIcon(),(0,f.default)("span",e,{className:"btn__title"}))}}]),t}(c.Component);v.propTypes={id:b.default.string,name:b.default.string,onClick:b.default.func,title:b.default.string,type:b.default.string,loading:b.default.bool,icon:b.default.string,disabled:b.default.bool,readOnly:b.default.bool,data:b.default.oneOfType([b.default.array,b.default.shape({buttonStyle:b.default.string})]),extraClass:b.default.string,attributes:b.default.object},v.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1,readOnly:!1},t.default=v},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/FormAlert/FormAlert.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0];this.setState({frameLoaded:e})}},{key:"handleBackClick",value:function(e){"function"==typeof this.props.onBack&&(e.preventDefault(),this.props.onBack(e))}},{key:"buildToolbarButtons",value:function(){var e=[];if(this.props.itemLinks&&this.props.itemLinks.edit){var t=this.props.itemLinks.edit.href;e.push(c.default.createElement("a",{key:"edit",href:t,className:"btn btn-outline-secondary font-icon-edit"},c.default.createElement("span",{className:"btn__title"},d.default._t("Admin.EDIT","Edit"))))}return e}},{key:"renderMoreActions",value:function(){return this.props.moreActions&&0!==this.props.moreActions.length?c.default.createElement(p.default,null,this.props.moreActions):null}},{key:"renderBody",value:function(){var e=null,t="";return this.props.itemLinks&&this.props.itemLinks.preview&&(this.props.itemLinks.preview.Stage?(e=this.props.itemLinks.preview.Stage.href,t=this.props.itemLinks.preview.Stage.type):this.props.itemLinks.preview.Live&&(e=this.props.itemLinks.preview.Live.href,t=this.props.itemLinks.preview.Live.type)),this.props.itemId?e?t&&0===t.indexOf("image/")?c.default.createElement("div",{className:"preview__file-container panel--scrollable"},c.default.createElement("img",{alt:e,className:"preview__file--fits-space",src:e})):c.default.createElement("iframe",{style:{visibility:this.state.frameLoaded?"visible":"hidden"},className:"flexbox-area-grow preview__iframe",src:e,onLoad:this.setFrameLoaded}):c.default.createElement("div",{className:"preview__overlay"},c.default.createElement("h3",{className:"preview__overlay-text"},d.default._t("Admin.NO_ITEM_PREVIEW","There is no preview available for this item."))):c.default.createElement("div",{className:"preview__overlay"},c.default.createElement("h3",{className:"preview__overlay-text"},d.default._t("Admin.NO_PREVIEW","No preview available.")))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.ViewModeComponent,r=(0,m.default)("preview",t);return c.default.createElement("div",{className:r},this.renderBody(),c.default.createElement("div",{className:"toolbar toolbar--south"},c.default.createElement("div",{className:"btn-toolbar"},this.buildToolbarButtons(),c.default.createElement(n,{id:"view-mode-toggle-in-preview-nb",area:"preview"}),this.renderMoreActions())))}}]),t}(l.Component);y.propTypes={className:g.default.string,itemLinks:g.default.object,itemId:g.default.number,onBack:g.default.func,moreActions:g.default.arrayOf(g.default.element),ViewModeComponent:g.default.oneOfType([g.default.node,g.default.func])},y.defaultProps={className:"flexbox-area-grow fill-height"},t.Component=y,t.default=(0,b.inject)(["ViewModeToggle"],function(e){return{ViewModeComponent:e}},function(){return"Admin.Preview"})(y)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/ResizeAware/ResizeAware.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,x.default)((0,D.default)(e),r),a=o&&o.values||{},i=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:a,formIsDirty:(0,T.isDirty)(r,D.default)(e),schemaName:r,tagData:i}}function d(e){return{actions:{schema:(0,w.bindActionCreators)(E,e),reduxForm:(0,w.bindActionCreators)({reset:C.reset,initialize:C.initialize,change:C.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var f=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.name,r=t.filterPrefix,o=t.formData,a=this.state.searchText,i={};return Object.keys(o).forEach(function(e){var t=o[e];t&&(i[e]=t)}),!e&&a&&void 0===o[""+r+n]&&(i[""+r+n]=a.trim()),i}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.name,a=n.filterPrefix,i=n.actions;void 0!==n.formData[""+a+o]&&i.reduxForm.change(r,""+a+o,t)}},{key:"focusInput",value:function(){if(this.state.display!==G.NONE){var e=j.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===G.EXPANDED){var t=j.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,{fields:[]}),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=a({},e,void 0),r=this.props,o=r.schemaName,i=r.filters;this.props.actions.reduxForm.change(o,e,""),this.setOverrides(p({},this.props,{filters:p({},i,a({},e,void 0))})),Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.clearSearchBox(),this.props.onHide?this.props.onHide():this.state.display!==G.NONE&&this.setState({display:G.NONE})}},{key:"show",value:function(){this.state.display!==G.VISIBLE&&this.setState({display:G.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==G.EXPANDED&&this.setState({display:G.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case G.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case G.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.name,r=t.filterPrefix,o={},a=this.getData();Object.entries(a).forEach(function(t){var i=f(t,2),s=i[0],l=i[1],c=s,u=l;e.hasOwnProperty(s)&&(u=e[s]),r.length>0&&s.startsWith(r)&&(c=s.substring(r.length)),(!r.length>0||s!==n||void 0===a[""+r+n])&&(o[c]=u)});var i=o[n]||"";this.state.display===G.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:G.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(o)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name,r=e.filterPrefix,o=Object.assign({},t),a=""+r+n;return o&&o[a]&&delete o[a],o?Object.values(o).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,a=e.displayBehavior,i=e.identifier,s=e.formIsDirty,l=(e.tagData,e.name),c=o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData","name"]);if(this.state.display===G.NONE)return a===q.TOGGLABLE?g.default.createElement(L.default,{onToggle:this.show}):g.default.createElement("div",null);var u=r+"_ExtraFields",d=this.state.searchText,f=this.state.display===G.EXPANDED,h=this.state.display===G.VISIBLE,m=[q.HIDEABLE,q.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),v=this.getData(),y=Object.keys(v).length>0;return g.default.createElement(P.default,{onClickOut:this.show,className:"search"},g.default.createElement(M.default,p({},c,{name:"SearchBox__"+l,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:d,hideable:m,expanded:f,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:b,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),g.default.createElement(I.default,{id:u,identifier:i,visible:h,expanded:f,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(v.Component);z.propTypes={onSearch:V.default.func,onHide:V.default.func,id:V.default.string.isRequired,display:V.default.oneOf(Object.values(G)),formSchemaUrl:V.default.string,filters:V.default.object,formData:V.default.object,placeholder:V.default.string,displayBehavior:V.default.oneOf(Object.values(q)),term:V.default.string,name:V.default.string,filterPrefix:V.default.string,forceFilters:V.default.bool,formIsDirty:V.default.bool,identifier:V.default.string,schemaName:V.default.string,tagHandlers:V.default.object,borders:V.default.shape({top:V.default.bool,right:V.default.bool,bottom:V.default.bool,left:V.default.bool})},z.defaultProps={placeholder:b.default._t("Admin.SEARCH","Search"),display:G.VISIBLE,displayBehavior:q.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=z,t.hasFilters=c,t.default=(0,y.connect)(u,d)(z)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Search/SearchToggle.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(4),a=r(o),i=n(0),s=r(i),l=n(5),c=n(2),u=r(c),d=n(1),f=r(d),p=a.default._t("Admin.SHOW_SEARCH","Show search"),h=function(e){return(0,u.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e})},m=function(e){var t=e.onToggle,n=e.toggled;return s.default.createElement(l.Button,{title:p,onClick:t,className:h(n)},s.default.createElement("span",{className:"sr-only"},p))};m.propTypes={onToggle:f.default.func,toggled:f.default.bool},t.Component=m,t.default=m},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Tag/CompactTagList.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1}}]),t}(f.default);t.Component=p,t.default=(0,u.default)(p)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Tip/Tip.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=e.content,n=e.fieldTitle,r=e.icon,o=e.id,a=e.importance,i=j[a],s=i.iconColor,u=i.description,d=h.default.inject(h.default._t("Admin.TIP_LABEL","{description} for {fieldTitle}"),{description:u,fieldTitle:n}),p=["tip",e.extraClass];e.type===y.TITLE?p.push("tip--title"):e.type===y.INPUT_GROUP&&p.push("tip--input-group","btn--last","btn-outline-secondary","text-"+s);var m=o+"-tip",v={id:m,onClick:function(){},className:(0,g.default)(p),noText:!0,icon:r};return c.default.createElement(l.Fragment,null,c.default.createElement(b.default,v,d),c.default.createElement(f.UncontrolledPopover,{trigger:"legacy",placement:"top-end",target:m},c.default.createElement(f.PopoverBody,null,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.tipShape=t.TIP_IMPORTANCE_LEVELS=t.TIP_TYPES=void 0;var i,s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props.visible,t=[];if(!e)return t;var n=this.props.tree,r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value;if("break"===function(e){return n.children&&(n=n.children.find(function(t){return t.id===e}))?void t.push(n):"break"}(l))break}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return t}},{key:"getDropdownOptions",value:function(){var e=this.props.value,t=this.getVisibleTree(),n=t?[].concat(o(t.children)):[],r=this.props.selectedValues.filter(function(t){return t.id===e||Array.isArray(e)&&e.find(function(e){return e===t.id})});return!this.state.opened&&this.props.data.showSelectedPath?n=r.map(function(e){return d({},e,{title:e.titlePath||e.title})}):r.length&&(n=[].concat(o(r.filter(function(e){return!n.find(function(t){return t.id===e.id})})),o(n))),n.unshift({id:this.props.data.multiple?"":N,title:this.props.data.hasEmptyDefault?this.props.data.emptyString:null,disabled:!n.length||!this.props.data.hasEmptyDefault}),n}},{key:"getPath",value:function(e){var t=this.props.findTreePath(this.props.tree,e,this.props.data.treeBaseId);return this.getBreadcrumbs(t).reduce(function(e,t){return""+e+(t.contextString||"")+t.title+"/"},"")}},{key:"initialise",value:function(){var e=this;return this.loadTree([],this.props.search).then(function(t){var n=[];!e.props.data.multiple&&e.props.value&&(n=e.props.findTreePath(t,e.props.value,e.props.data.treeBaseId),n?n.pop():n=[]),e.props.actions.treeDropdownField.setVisible(e.props.id,n)})}},{key:"callFetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props,r=D.default.parse(n.data.urlTree,!0);n.data.showSearch&&t.length&&(r.query.search=t,r.query.flatList="1"),e.length?r.query.ID=e[e.length-1]:!n.data.multiple&&n.value&&(r.query.forceValue=n.value),r.query.format="json",r.search=null;var o=D.default.format(r);return this.props.fetch(o,{credentials:"same-origin"}).then(function(e){return e.json()})}},{key:"lazyLoad",value:function(e){var t=this;if(e.find(function(e){return t.props.loading.indexOf(e)>-1||t.props.failed.indexOf(e)>-1}))return Promise.resolve({});var n=this.props.findTreeByPath(this.props.tree,e);return n&&(0===n.count||n.children.length)?Promise.resolve({}):this.loadTree(e)}},{key:"loadTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;return n.actions.treeDropdownField.beginTreeUpdating(n.id,e),this.callFetch(e,t,n).then(function(t){return n.actions.treeDropdownField.updateTree(n.id,e,t),t}).catch(function(t){if(n.actions.treeDropdownField.updateTreeFailed(n.id,e),"function"==typeof n.onLoadingError)return n.onLoadingError({errors:[{value:t.message,type:"error"}]});throw t})}},{key:"hasSearch",value:function(){return this.props.data.showSearch&&Boolean(this.props.search)}},{key:"filterOptions",value:function(e){var t=this,n=this.getVisibleTree();return e.filter(function(e){if((e.id===N||""===e.id)&&(!t.props.data.hasEmptyDefault||t.props.visible.length||t.hasSearch()))return!1;var r=e.title&&e.title.toLocaleLowerCase(),o=t.props.search.toLocaleLowerCase();return o?r&&r.includes(o):!n||!e.id||n.children.find(function(t){return t.id===e.id})})}},{key:"handleOpen",value:function(){this.setState({opened:!0}),this.handleSearchReset()}},{key:"handleClose",value:function(){this.setState({opened:!1})}},{key:"handleSearchReset",value:function(){clearTimeout(this.searchTimer),this.props.actions.treeDropdownField.setSearch(this.props.id,"")}},{key:"handleSearchChange",value:function(e){var t=this;clearTimeout(this.searchTimer),this.searchTimer=setTimeout(function(){t.props.actions.treeDropdownField.setSearch(t.props.id,e)},500)}},{key:"handleChange",value:function(e){var t=null;if(this.handleSearchReset(),this.props.data.multiple){if(t=I,e&&e.length){var n=e&&e.filter(function(t,n){return e.findIndex(function(e){return e.id===t.id})===n});t=n.map(function(e){return e.id}),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,n)}}else{var r=e?e.id:null,o=this.getVisibleTree()||this.props.tree,a=o.children.find(function(e){return e.id===r});a&&(this.props.data.showSelectedPath&&(a=d({},a,{titlePath:this.getPath(r)})),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,[a])),t=r||N}"function"==typeof this.props.onChange&&this.props.onChange(t)}},{key:"handleNavigate",value:function(e,t){if(e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault(),!this.hasSearch()){var n=this.props.findTreePath(this.props.tree,t,this.props.data.treeBaseId);n||(n=this.props.visible.slice(0),n.push(t)),this.lazyLoad(n),this.props.actions.treeDropdownField.setVisible(this.props.id,n)}}},{key:"handleKeyDown",value:function(e){if(this.hasSearch())return void(27===e.keyCode&&this.handleSearchReset(e));var t=this.selectField.getFocusedOption();if(t)switch(e.keyCode){case 37:this.handleBack(e);break;case 39:t.count&&this.handleNavigate(e,t.id)}}},{key:"handleBack",value:function(e){if(e.stopPropagation(),e.preventDefault(),!this.hasSearch()){var t=this.props.visible;t.length&&(t=t.slice(0,t.length-1)),this.lazyLoad(t),this.props.actions.treeDropdownField.setVisible(this.props.id,t)}}},{key:"renderMenu",value:function(e){var t=this.getVisibleTree()||{},n=this.props.loading.indexOf(t.id||0)>-1,r=this.props.failed.indexOf(t.id||0)>-1,o=this.getBreadcrumbs();return h.default.createElement(x.default,{loading:n,failed:r,tree:t,breadcrumbs:o,renderMenuOptions:e,onBack:this.handleBack,search:this.hasSearch(),value:this.props.value})}},{key:"renderOption",value:function(e){var t=this,n=null;if(e.count&&!this.hasSearch()){var r=function(n){return t.handleNavigate(n,e.id)};n=h.default.createElement("button",{className:"treedropdownfield__option-button fill-width",onClick:r,onMouseDown:r,onTouchStart:r},h.default.createElement("span",{className:"treedropdownfield__option-count-icon font-icon-right-open-big"}))}var o=function(e){var t=e.children;return h.default.createElement("span",{className:"treedropdownfield__option-title--highlighted"},t)},a=this.props.search.length?(0,M.mapHighlight)(e.title,this.props.search,o):e.title,i=null;return this.hasSearch()&&((i=e.contextString)||!this.props.data.hasEmptyDefault||this.props.visible.length||(i=this.props.data.emptyString)),h.default.createElement("div",{className:"treedropdownfield__option fill-width"},h.default.createElement("div",{className:"treedropdownfield__option-title-box flexbox-area-grow fill-height"},h.default.createElement("span",{className:"treedropdownfield__option-title"},a),i&&h.default.createElement("span",{className:"treedropdownfield__option-context"},i)),n)}},{key:"renderReadOnly",value:function(){var e=this,t={id:this.props.id,readOnly:this.props.readOnly,disabled:this.props.disabled},n=this.props.extraClass?"treedropdownfield "+this.props.extraClass:"treedropdownfield",r=this.props.data.hasEmptyDefault?this.props.data.emptyString:"",o=this.props.selectedValues;if(this.props.data.multiple)r=this.props.value.map(function(e){return o.find(function(t){return t.id===e})||e}).map(function(e){return e.title}).join(", ");else{var a=o.find(function(t){return t.id===e.props.value});r=this.props.value,a&&"string"==typeof a.title&&(r=a.title)}return h.default.createElement("div",{className:n},h.default.createElement("span",{className:"treedropdownfield__title"},r),h.default.createElement(A.Input,d({type:"hidden",name:this.props.name,value:this.props.value},t)))}},{key:"render",value:function(){var e=this;if(this.props.readOnly||this.props.disabled)return this.renderReadOnly();var t={id:this.props.id},n=this.props.extraClass?"treedropdownfield "+this.props.extraClass:"treedropdownfield",r=this.getDropdownOptions(),o=this.props.value;this.props.data.multiple&&(o=this.props.value?this.props.selectedValues.filter(function(e){return o.includes(e.id)}):[]);var a=this.props.data.hasEmptyDefault&&!this.props.visible.length?"":null,i=void 0!==this.props.data.showSearch&&this.props.data.showSearch;return h.default.createElement(E.default,{searchable:i,multi:this.props.data.multiple,className:n,name:this.props.name,options:r,inputProps:t,menuRenderer:this.renderMenu,filterOptions:this.filterOptions,optionRenderer:this.renderOption,onChange:this.handleChange,onOpen:this.handleOpen,onClose:this.handleClose,onBlurResetsInput:!0,onInputKeyDown:this.handleKeyDown,onInputChange:this.handleSearchChange,isLoading:Boolean(this.props.loading.length),value:o,resetValue:a,joinValues:!0,ref:function(t){e.selectField=t},placeholder:this.props.data.emptyString,labelKey:"title",valueKey:"id"})}}]),t}(p.Component);E.default.prototype.componentWillReceiveProps=function(e){var t=this.getValueArray(e.value,e);e.required?this.setState({required:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)}(t[0],e.multi)}):this.props.required&&this.setState({required:!1});var n=[this.props.value,e.value].map(JSON.stringify),r=u(n,2),o=r[0],a=r[1];this.state.inputValue&&o!==a&&e.onSelectResetsInput&&this.setState({inputValue:this.handleInputValueChange("")})},L.propTypes={extraClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,onChange:b.default.func,value:b.default.oneOfType([b.default.string,b.default.number,b.default.array]),readOnly:b.default.bool,disabled:b.default.bool,tree:b.default.shape(P.default.propTypes),findTreeByPath:b.default.func,findTreePath:b.default.func,visible:b.default.array,loading:b.default.array,failed:b.default.array,selectedValues:b.default.array,data:b.default.shape({cacheKey:b.default.string,urlTree:b.default.string.isRequired,emptyString:b.default.string,valueObject:b.default.shape(P.default.propTypes),valueObjects:b.default.arrayOf(b.default.shape(P.default.propTypes)),hasEmptyDefault:b.default.bool,showSearch:b.default.bool,multiple:b.default.bool,showSelectedPath:b.default.bool,treeBaseId:b.default.number}),onLoadingError:b.default.func,search:b.default.string,actions:b.default.shape({treeDropdownField:b.default.object}),fetch:b.default.func},L.defaultProps={value:"",extraClass:"",className:"",tree:{},visible:[],loading:[],failed:[],findTreeByPath:R.findTreeByPath,findTreePath:R.findTreePath,fetch:w.default};var B=(0,v.connect)(l,c)(L);t.Component=L,t.ConnectedTreeDropdownField=B,t.MULTI_EMPTY_VALUE=I,t.SINGLE_EMPTY_VALUE=N,t.findTreePath=R.findTreePath,t.findTreeByID=R.findTreeByID,t.findTreeByPath=R.findTreeByPath,t.default=(0,_.default)(B)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.props)}},{key:"handleSubmit",value:function(e,t,n){var r=this,o=null,a=function(){return n().then(function(e){var t=e;if(t){var n=void 0!==t.state;if(t=r.reduceSchemaErrors(t),r.props.actions.schema.setSchema(r.props.schemaUrl,t,r.getIdentifier()),n){var o=t.schema||r.props.schema.schema,a=(0,T.default)(o,t.state);r.props.actions.reduxForm.initialize(r.getIdentifier(),a)}}return t})};if(!(o="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,a):a()))throw new Error("Promise was not returned for submitting");return o.then(function(e){if(!e||!e.state)return e;var t=r.getMessages(e.state);if(Object.keys(t).length)throw new E.SubmissionError(t);return e})}},{key:"reduceSchemaErrors",value:function(e){if(!e.errors)return e;var t=u({},e);return t.state||(t=u({},t,{state:this.props.schema.state})),t=u({},t,{state:u({},t.state,{fields:t.state.fields.map(function(t){var n=e.errors.find(function(e){return e.field===t.name});return n&&(n=(0,S.createErrorHtml)([n.value])),u({},t,{message:n})})}),messages:e.errors.filter(function(e){return!e.field})}),delete t.errors,(0,O.default)(t)}},{key:"overrideStateData",value:function(e){if(!this.props.stateOverrides||!e)return e;var t=this.props.stateOverrides.fields,n=e.fields;return t&&n&&(n=n.map(function(e){var n=t.find(function(t){return t.name===e.name});return n?F.default.recursive(!0,e,n):e})),Object.assign({},e,this.props.stateOverrides,{fields:n})}},{key:"callFetch",value:function(e){return(0,j.default)(this.props.schemaUrl,{headers:{"X-FormSchema-Request":e.join(","),Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.status>=200&&e.status<300?e.json():new Promise(function(t,n){return e.json().then(function(t){n({status:e.status,statusText:e.statusText,json:t})}).catch(function(){n({status:e.status,statusText:e.statusText,json:{}})})})})}},{key:"fetch",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.props.loading)return Promise.resolve({});var o=["auto",e&&"schema",n&&"state",r&&"errors"].filter(function(e){return e});return this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!0),"function"==typeof this.props.onFetchingSchema&&this.props.onFetchingSchema(),this.callFetch(o).then(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1),e.errors?"function"==typeof t.props.onLoadingError&&t.props.onLoadingError(e):"function"==typeof t.props.onLoadingSuccess&&t.props.onLoadingSuccess(),void 0!==e.id&&e.state){var n=Object.assign({},e,{state:t.overrideStateData(e.state)}),r=s(u({},t.props,{schema:u({},t.props.schema,n)}));t.props.actions.schema.setSchema(t.props.schemaUrl,n,r);var o=e.schema||t.props.schema.schema,a=(0,T.default)(o,n.state);return t.props.actions.reduxForm.initialize(r,a,!1,{keepSubmitSucceeded:!0}),"function"==typeof t.props.onReduxFormInit&&t.props.onReduxFormInit(),n}return e}).catch(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1),"function"==typeof t.props.onLoadingError)return t.props.onLoadingError(t.normaliseError(e));throw e})}},{key:"normaliseError",value:function(e){return e.json&&e.json.errors?e.json:e.status&&e.statusText?{errors:[{code:e.status,value:e.statusText,type:"error"}]}:{errors:[{value:e.message||p.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred."),type:"error"}]}}},{key:"handleAutofill",value:function(e,t){this.props.actions.reduxForm.autofill(this.getIdentifier(),e,t)}},{key:"render",value:function(){var e=this.props.loadingComponent;if(!this.props.schema||!this.props.schema.schema||this.props.loading)return m.default.createElement(e,{containerClass:"loading--form flexbox-area-grow"});var t=Object.assign({},this.props,{form:this.getIdentifier(),onSubmitSuccess:this.props.onSubmitSuccess,onSubmit:this.handleSubmit,onAutofill:this.handleAutofill,autoFocus:this.props.autoFocus});return m.default.createElement(A.default,t)}}]),t}(h.Component);B.propTypes=Object.assign({},D.basePropTypes,{actions:v.default.shape({schema:v.default.object,reduxFrom:v.default.object}),autoFocus:v.default.bool,identifier:v.default.string.isRequired,schemaUrl:v.default.string.isRequired,schema:D.schemaPropType,refetchSchemaOnMount:v.default.bool.isRequired,form:v.default.string,submitting:v.default.bool,onFetchingSchema:v.default.func,onReduxFormInit:v.default.func,loadingComponent:v.default.oneOfType([v.default.func,v.default.node]).isRequired}),B.defaultProps={refetchSchemaOnMount:!0},t.Component=B,t.default=(0,y.compose)((0,I.inject)(["ReduxForm","ReduxFormField","Loading"],function(e,t,n){return{loadingComponent:n,baseFormComponent:e,baseFieldComponent:t}},function(e){return e.identifier}),(0,g.connect)(l,c))(B)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/containers/InsertLinkModal/InsertLinkModal.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return{actions:{schema:(0,p.bindActionCreators)(_,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createInsertLinkModal=t.InsertLinkModal=void 0;var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=t&&t.actions||{};return{actions:u({},n,{schema:(0,v.bindActionCreators)(y,e)})}}function c(e){function t(){return{Component:e}}return(0,_.connect)(t,l)(j)}Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectedFileSchemaHandler=t.FileSchemaHandler=void 0;var u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;if(e){if(e.schemaUrl){var t=Object.assign({},e.fileAttributes);delete t.ID;var n={fields:Object.entries(t).map(function(e){var t=d(e,2);return{name:t[0],value:t[1]}})};this.props.actions.schema.setSchemaStateOverrides(e.schemaUrl,n)}}else{var r=this.props.schemaUrl;r&&this.props.actions.schema.setSchemaStateOverrides(r,null)}}},{key:"render",value:function(){var e=this.props,t=e.Component,n=o(e,["Component"]);return h.default.createElement(t,u({setOverrides:this.setOverrides},n))}}]),t}(p.Component);j.propTypes={fileAttributes:b.default.object,Component:b.default.oneOfType([b.default.element,b.default.func]),schemaUrl:b.default.string,actions:b.default.object};var w=(0,_.connect)(function(){return{}},l())(j);t.FileSchemaHandler=j,t.ConnectedFileSchemaHandler=w,t.default=c},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Backend.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=null;if(!(e.status>=200&&e.status<300))throw t=new Error(e.statusText),t.response=e,t;return e}function s(e){var t=null;if(e instanceof FormData||"string"==typeof e)t=e;else{if(!e||"object"!==(void 0===e?"undefined":m(e)))throw new Error("Invalid body type");t=JSON.stringify(e)}return t}function l(e,t){switch(e){case"application/x-www-form-urlencoded":return j.default.stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function c(e,t){switch(e){case"application/x-www-form-urlencoded":return j.default.parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function u(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function d(e){return e.text().then(function(t){return c(e.headers.get("Content-Type"),t)})}function f(e,t){return Object.keys(t).reduce(function(n,r){var o=e[r];return!o||!0!==o.remove&&!0!==o.querystring?Object.assign(n,a({},r,t[r])):n},{})}function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{setFromData:!1},o=t;return o=u(o,l("application/x-www-form-urlencoded",Object.keys(n).reduce(function(t,o){var i=e[o],s=!0===r.setFromData&&!(i&&!0===i.remove),l=i&&!0===i.querystring&&!0!==i.remove;return s||l?Object.assign(t,a({},o,n[o])):t},{}))),o=Object.keys(e).reduce(function(t,r){var o=e[r].urlReplacement;return o?t.replace(o,n[r]):t},o)}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object.assign({},r,{Accept:n.responseFormat,"Content-Type":n.payloadFormat}),a=O.default.recursive({},n.defaultData,e),i=p(n.payloadSchema,n.url,a,{setFromData:"get"===n.method.toLowerCase()}),s="get"!==n.method.toLowerCase()?l(n.payloadFormat,f(n.payloadSchema,a)):"",c="get"===n.method.toLowerCase()?[i,o]:[i,s,o];return t[n.method.toLowerCase()].apply(t,c).then(d)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(i)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",credentials:"same-origin",body:s(t),headers:Object.assign({},r,n)}).then(i)}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,{method:"put",credentials:"same-origin",body:s(t),headers:n}).then(i)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,{method:"delete",credentials:"same-origin",body:s(t),headers:n}).then(i)}}]),e}(),C=new E;t.default=C},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Config.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];if(e.path===this.rootRoute.path&&Array.isArray(e.routes))return void(this.childRoutes=e.routes.concat(this.childRoutes));var n=this.findChildRoute(t),r=Object.assign({},{routes:[]},e),o=r.routes[r.routes.length-1];o&&"**"===o.path||(o={path:"**"},r.routes.push(o));var a=n.findIndex(function(t){return t.path===e.path});a>=0?n[a]=r:n.unshift(r)}},{key:"findChildRoute",value:function(e){var t=this.childRoutes;return e&&e.forEach(function(e){var n=t.find(function(t){return t.path===e});if(!n)throw new Error("Parent path "+e+" could not be found.");t=n.routes}),t}},{key:"getRootRoute",value:function(){return this.rootRoute}},{key:"getChildRoutes",value:function(){return this.childRoutes}},{key:"remove",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.findChildRoute(t),r=n.findIndex(function(t){return t.path===e});return r<0?null:n.splice(r,1)[0]}}]),e}();window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new a,t.default=window.ss.routeRegister},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Router.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=c.default.getAbsoluteBase(),n=d.default.resolve(t,e);return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function a(e){return new c.default.Route(e).match(c.default.current,{})}function i(){return c.default.absoluteBaseURL}function s(e){c.default.absoluteBaseURL=e;var t=document.createElement("a");t.href=e;var n=t.pathname;n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n="/"+n),c.default.base(n)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(48),c=r(l),u=n(34),d=r(u);c.default.oldshow||(c.default.oldshow=c.default.show),c.default.setAbsoluteBase=s.bind(c.default),c.default.getAbsoluteBase=i.bind(c.default),c.default.resolveURLToBase=o.bind(c.default),c.default.show=function(e){return function(t,n,r,o){return e(c.default.resolveURLToBase(t),n,r,o)}}(c.default.oldshow),c.default.routeAppliesToCurrentLocation=a,window.ss=window.ss||{},window.ss.router=window.ss.router||c.default,t.default=window.ss.router},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/ShortcodeSerialiser.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.createHTMLSanitiser=t.sanitiseShortCodeProperties=void 0;var o=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=t?{sep:",",quote:"",replacer:/[^a-z0-9\-_.]/gi}:{sep:" ",quote:'"',replacer:/"/g},r=Object.entries(e.properties).map(function(e){var t=a(e,2),r=t[0],o=t[1];return o?""+n.sep+r+"="+n.quote+(""+o).replace(n.replacer,"")+n.quote:null}).filter(function(e){return null!==e}).join("");return e.wrapped?"["+e.name+r+"]"+e.content+"[/"+e.name+"]":"["+e.name+r+"]"}},b=function(){var e=document.createElement("div");return function(t){return void 0===t?"":(e.textContent=t,e.innerHTML)}},v=function(e){var t=b();return Object.entries(e).reduce(function(e,n){var i=a(n,2),s=i[0],l=i[1];return o({},e,r({},s,t(l)))},{})};t.sanitiseShortCodeProperties=v,t.createHTMLSanitiser=b,t.default=m},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/SilverStripeComponent.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2],o=t&&!n||!this.actions[e]?[]:this.actions[e],a=s(t,e);return t&&this.actions[a]&&(o=[].concat(r(o),r(this.actions[a]))),o}},{key:"getSortedActions",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.getActions(e,t,n).sort(function(e,t){return t.priority-e.priority||(e.text.toLocaleLowerCase()>t.text.toLocaleLowerCase()?1:-1)})}},{key:"addCommandWithUrlTest",value:function(e,t){return this.editorCommandsToUrlTestsMap[e]=t,this}},{key:"setDefaultCommand",value:function(e){return this.defaultCommand=e,this}},{key:"getDefaultCommand",value:function(){return this.defaultCommand}},{key:"getEditorCommandFromUrl",value:function(e){var t=this,n=this.getDefaultCommand(),r=Object.keys(this.editorCommandsToUrlTestsMap),o=r.find(function(n){return t.editorCommandsToUrlTestsMap[n]&&t.editorCommandsToUrlTestsMap[n].test(e)});return o&&(n=o),n}}]),e}();window.ss=window.ss||{},window.ss.tinymceactions=window.ss.tinymceactions||new l,t.default=window.ss.tinymceactions},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/formatWrittenNumber.js':function(e,t,n){"use strict";function r(e){var t=Number(e);return null!==e&&t>=0&&t<10?[a.default._t("Admin.WRITTEN_NUMBER_ZERO","zero"),a.default._t("Admin.WRITTEN_NUMBER_ONE","one"),a.default._t("Admin.WRITTEN_NUMBER_TWO","two"),a.default._t("Admin.WRITTEN_NUMBER_THREE","three"),a.default._t("Admin.WRITTEN_NUMBER_FOUR","four"),a.default._t("Admin.WRITTEN_NUMBER_FIVE","five"),a.default._t("Admin.WRITTEN_NUMBER_SIX","six"),a.default._t("Admin.WRITTEN_NUMBER_SEVEN","seven"),a.default._t("Admin.WRITTEN_NUMBER_EIGHT","eight"),a.default._t("Admin.WRITTEN_NUMBER_NINE","nine")][t]:t?String(t):null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(4),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/getFormState.js':function(e,t,n){"use strict";function r(e){return e.form&&e.form.formState||{}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/reduxFieldReducer.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o){if(!t.payload.fieldId)throw new Error("Invalid fieldId");var a=e.fields||{},s=a[t.payload.fieldId]?e.fields[t.payload.fieldId]:n;return(0,i.default)(Object.assign({},e,{fields:Object.assign({},a,r({},t.payload.fieldId,Object.assign({},s,o(s))))}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(11),i=function(e){return e&&e.__esModule?e:{default:e}}(a)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/schemaFieldValues.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return void 0===t?e:l.default.recursive(!0,e,t)}function a(e,t){return e?e.reduce(function(e,n){return e||a(n.children,t)},e.find(function(e){return e.name===t||e.name===t+"[]"})):null}function i(e,t){return t?t.fields.reduce(function(t,n){var o=a(e.fields,n.name);return o?"Structural"===o.type||!0===o.readOnly?t:Object.assign({},t,r({},n.name,n.value)):t},{}):{}}Object.defineProperty(t,"__esModule",{value:!0}),t.schemaMerge=o,t.findField=a,t.default=i;var s=n(21),l=function(e){return e&&e.__esModule?e:{default:e}}(s)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/withDragDropContext.js':function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),o=n(51),a=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=(0,r.DragDropContext)(a.default)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/breadcrumbs/BreadcrumbsActions.js':function(e,t,n){"use strict";function r(e){return{type:a.default.SET_BREADCRUMBS,payload:{breadcrumbs:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setBreadcrumbs=r;var o=n("./client/src/state/breadcrumbs/BreadcrumbsActionTypes.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/records/RecordsActionTypes.js':function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/records/RecordsActions.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return Object.keys(t).reduce(function(e,n){return e.replace(":"+n,t[n])},e)}function a(e,t,n){var r={recordType:e},a={Accept:"application/json"},i=t.toLowerCase();return function(t){t({type:d.default.FETCH_RECORDS_REQUEST,payload:r});var s="get"===i?[o(n,r),a]:[o(n,r),{},a];return c.default[i].apply(c.default,s).then(function(e){return e.json()}).then(function(n){t({type:d.default.FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})}).catch(function(n){throw t({type:d.default.FETCH_RECORDS_FAILURE,payload:{error:n,recordType:e}}),n})}}function i(e,t,n){var r={recordType:e},a={Accept:"application/json"},i=t.toLowerCase();return function(t){t({type:d.default.FETCH_RECORD_REQUEST,payload:r});var s="get"===i?[o(n,r),a]:[o(n,r),{},a];return c.default[i].apply(c.default,s).then(function(e){return e.json()}).then(function(n){t({type:d.default.FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})}).catch(function(n){throw t({type:d.default.FETCH_RECORD_FAILURE,payload:{error:n,recordType:e}}),n})}}function s(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i={recordType:e,id:t},s=n.toLowerCase(),l="get"===s?[o(r,i),a]:[o(r,i),{},a];return function(n){return n({type:d.default.DELETE_RECORD_REQUEST,payload:i}),c.default[s].apply(c.default,l).then(function(){n({type:d.default.DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})}).catch(function(r){throw n({type:d.default.DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}}),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRecords=a,t.fetchRecord=i,t.deleteRecord=s;var l=n(29),c=r(l),u=n("./client/src/state/records/RecordsActionTypes.js"),d=r(u)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/schema/SchemaActions.js':function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:l.default.SET_SCHEMA,payload:i({},t,{id:e,name:n})}}function o(e,t){return{type:l.default.SET_SCHEMA_STATE_OVERRIDES,payload:{id:e,stateOverride:t}}}function a(e,t){return{type:l.default.SET_SCHEMA_LOADING,payload:{id:e,loading:t}}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0}},{key:"handleBeforeUnload",value:function(e,t){return t(!this.shouldConfirmBeforeUnload()||confirm(C.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved.")))}},{key:"handleBeforeRoute",value:function(e,t){return t(!this.shouldConfirmBeforeUnload()||confirm(C.default._t("Admin.CONFIRMUNSAVED","Are you sure you want to navigate away\n from this page?\n\nWARNING: Your changes have not been saved.\n\n\n Press OK to continue, or Cancel to stay on the current page.")))}}]),e}();t.default=k},"./client/src/boot/apollo/buildCache.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./node_modules/apollo-cache-inmemory/lib/bundle.esm.js"),o=n("./client/src/boot/apollo/dataIdFromObject.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e){return new r.InMemoryCache({fragmentMatcher:e?new r.IntrospectionFragmentMatcher({introspectionQueryResultData:e}):null,dataIdFromObject:a.default,addTypename:!0})};t.default=i},"./client/src/boot/apollo/buildClient.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&e.__typename?e.__typename+":"+t:null};t.default=r},"./client/src/boot/apollo/getGraphqlFragments.js":function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(15),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e){var t=e.data;return t.__schema.types=t.__schema.types.filter(function(e){return null!==e.possibleTypes}),t},s=function(e){if(!e.ok)throw new Error("The types.graphql file could not be loaded. You probably need to run a ?flush to generate it.\n Alternatively, you can use the IntrospectionProvider extension to generate the file dynamically.\n More information: https://github.com/silverstripe/silverstripe-graphql/#schema-introspection");return e},l=function(){var e=r(regeneratorRuntime.mark(function e(t){var n,o,l,c,u,d,f,p,h=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=!!document.body.getAttribute("data-graphql-legacy"),o=[t+"_graphql/admin.types.graphql",t+"admin.types.graphql"],l=[t+"admin/graphql/types",t+"assets/admin.types.graphql"],c=void 0,u=void 0,n?(h&&l.reverse(),c=l[0],u=l[1]):(c=o[0],u=o[1]),d={method:"GET",headers:{"Content-Type":"application/json"},uri:""+t,credentials:"same-origin"},f=function(){var e=r(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,a.default)(t,d).then(s).then(function(e){return e.json()}).then(i));case 1:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}(),p=void 0,e.prev=9,e.next=12,f(c);case 12:p=e.sent,e.next=28;break;case 15:if(e.prev=15,e.t0=e.catch(9),u){e.next=19;break}return e.abrupt("return",Promise.reject(e.t0));case 19:return e.prev=19,e.next=22,f(u);case 22:p=e.sent,e.next=28;break;case 25:return e.prev=25,e.t1=e.catch(19),e.abrupt("return",Promise.reject(e.t1));case 28:return e.abrupt("return",Promise.resolve(p));case 29:case"end":return e.stop()}},e,void 0,[[9,15],[19,25]])}));return function(t){return e.apply(this,arguments)}}();t.default=l},"./client/src/boot/applyDevtools.js":function(e,t,n){"use strict";function r(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,n=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension;return"function"==typeof t?t(e):"function"==typeof n?(0,o.compose)(e,n()):e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(7)},"./client/src/boot/applyTransforms.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=e.extraClass?e.extraClass.split(" ").reduce(function(e,t){return a({},e,o({},t,!0))},{}):{};"string"==typeof e.data.pristineClass&&(n[e.data.pristineClass]=t),"string"==typeof e.data.dirtyClass&&(n[e.data.dirtyClass]=!t);var r=t?e.data.pristineTitle:e.data.dirtyTitle,i=t?e.data.pristineIcon:e.data.dirtyIcon;return a({},e,{title:r||e.title,icon:i||e.icon,extraClass:(0,d.default)(n)})},b=function(){s.default.transform("field-holders",function(e){["FieldGroup"].forEach(function(t){return e.component("FieldGroup",h.default,t+"Holder")})}),s.default.transform("form-action-changed",function(e){e.form.alterSchema("*",function(e){return e.mutateField("action_save",function(t){var n=e.isPristine();return m(t,n)}),e.mutateField("action_publish",function(t){var n=t.data.isPublished&&!t.data.isModified&&e.isPristine();return m(t,n)}),e.getState()})}),s.default.transform("schema-validation",function(e){e.form.addValidation("*",function(e,t,n){var r=new c.default(e),i=Object.keys(e).reduce(function(e,t){var i=(0,f.findField)(n.fields,t);if(!i)return e;var s=r.validateFieldSchema(i),l=s.valid,c=s.errors;return l?e:a({},e,o({},t,c))},{});return t.addErrors(i),t.getState()})})};t.default=b},"./client/src/boot/index.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var a=function(){var e=o(regeneratorRuntime.mark(function e(){var t,n,r,o,a,i,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.default.get("absoluteBaseUrl"),e.next=3,(0,b.default)(t);case 3:n=e.sent,(0,y.default)(),(0,j.default)(),r=[f.default],o=h.default.get("debugging"),a=u.applyMiddleware.apply(void 0,r),o&&(a=(0,O.default)(a)),i=a(u.createStore),window.ss.apolloClient=n,l=new s.default(null,n),(0,C.default)(),c.default.init(function(){var e=(0,u.combineReducers)(c.default.reducer.getAll()),t=i(e,{});t.dispatch((0,v.setConfig)(h.default.getAll())),c.default.reducer.setStore(t),window.ss.store=t,l.setStore(t),l.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")}),window.setTimeout(function(){return c.default.load()},0);case 16:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),i=n("./client/src/boot/BootRoutes.js"),s=r(i),l=n(10),c=r(l),u=n(7),d=n(56),f=r(d),p=n(19),h=r(p),m=n("./client/src/boot/apollo/buildClient.js"),b=r(m),v=n("./client/src/state/config/ConfigActions.js"),g=n("./client/src/boot/registerComponents.js"),y=r(g),_=n("./client/src/boot/registerReducers.js"),j=r(_),w=n("./client/src/boot/applyDevtools.js"),O=r(w),E=n("./client/src/boot/applyTransforms.js"),C=r(E);window.ss=window.ss||{},window.onload=a},"./client/src/boot/registerComponents.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),a=n(10),i=r(a),s=n("./client/src/components/ActionMenu/ActionMenu.js"),l=r(s),c=n(30),u=r(c),d=n(18),f=r(d),p=n(28),h=r(p),m=n("./client/src/components/TextField/TextField.js"),b=r(m),v=n("./client/src/components/HiddenField/HiddenField.js"),g=r(v),y=n("./client/src/components/DateField/DateField.js"),_=r(y),j=n("./client/src/components/TimeField/TimeField.js"),w=r(j),O=n("./client/src/components/DatetimeField/DatetimeField.js"),E=r(O),C=n("./client/src/components/CheckboxField/CheckboxField.js"),T=r(C),S=n("./client/src/components/CheckboxSetField/CheckboxSetField.js"),x=r(S),k=n("./client/src/components/OptionsetField/OptionsetField.js"),P=r(k),F=n(46),D=r(F),A=n("./client/src/components/GridFieldActions/GridFieldActions.js"),M=r(A),R=n("./client/src/components/SingleSelectField/SingleSelectField.js"),I=r(R),N=n("./client/src/components/PopoverField/PopoverField.js"),L=r(N),B=n("./client/src/components/HeaderField/HeaderField.js"),U=r(B),H=n(47),V=r(H),G=n("./client/src/components/HtmlReadonlyField/HtmlReadonlyField.js"),q=r(G),z=n("./client/src/components/LookupField/LookupField.js"),$=r(z),W=n("./client/src/components/CompositeField/CompositeField.js"),K=r(W),X=n("./client/src/components/LabelField/LabelField.js"),Y=r(X),Q=n("./client/src/components/Tabs/Tabs.js"),J=r(Q),Z=n("./client/src/components/Tabs/TabItem.js"),ee=r(Z),te=n(43),ne=r(te),re=n("./client/src/components/FieldGroup/FieldGroup.js"),oe=r(re),ae=n(38),ie=r(ae),se=n(33),le=r(se),ce=n("./client/src/components/NotFoundComponent/NotFoundComponent.js"),ue=r(ce),de=n("./client/src/components/Form/Form.js"),fe=r(de),pe=n(20),he=r(pe),me=n(49),be=r(me),ve=n("./client/src/containers/Form/Form.js"),ge=r(ve),ye=n("./client/src/components/UsedOnTable/UsedOnTable.js"),_e=r(ye),je=n(23),we=r(je),Oe=n(60),Ee=r(Oe),Ce=n(62),Te=r(Ce),Se=n(25),xe=r(Se),ke=n(26),Pe=r(ke),Fe=n(36),De=r(Fe),Ae=n(31),Me=r(Ae),Re=n("./client/src/components/Tip/Tip.js"),Ie=r(Re),Ne=n(35),Le=r(Ne),Be=n(58),Ue=r(Be),He=n("./client/src/components/HtmlEditorField/HtmlEditorField.js"),Ve=r(He),Ge=n("./client/src/components/NumberField/NumberField.js"),qe=r(Ge),ze=n("./client/src/components/PopoverOptionSet/PopoverOptionSet.js"),$e=r(ze),We=n("./client/src/containers/ToastsContainer/ToastsContainer.js"),Ke=r(We);t.default=function(){i.default.component.registerMany({ActionMenu:l.default,Badge:u.default,Button:f.default,BackButton:h.default,TextField:b.default,HiddenField:g.default,DateField:_.default,TimeField:w.default,DatetimeField:E.default,CheckboxField:T.default,CheckboxSetField:x.default,OptionsetField:P.default,GridField:D.default,GridFieldActions:M.default,FieldGroup:oe.default,SingleSelectField:I.default,PopoverField:L.default,HeaderField:U.default,LiteralField:V.default,HtmlReadonlyField:q.default,LookupField:$.default,CompositeField:K.default,Tabs:J.default,TabItem:ee.default,FormAction:ne.default,LabelField:Y.default,TreeDropdownField:ie.default,Preview:be.default,ReduxForm:ge.default,ReduxFormField:o.Field,Form:fe.default,FormAlert:he.default,FormBuilderModal:le.default,NotFoundComponent:ue.default,UsedOnTable:_e.default,Loading:we.default,VersionedBadge:Ee.default,ViewModeToggle:Te.default,ResizeAware:xe.default,Tag:Pe.default,TagList:De.default,CompactTagList:Me.default,Tip:Ie.default,Search:Le.default,SearchToggle:Ue.default,HtmlEditorField:Ve.default,NumberField:qe.default,PopoverOptionSet:$e.default,ToastsContainer:Ke.default})}},"./client/src/boot/registerReducers.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=(0,s.combineReducers)({formState:l.reducer,formSchemas:f.default});i.default.reducer.registerMany(o({config:u.default,form:t,records:h.default,breadcrumbs:b.default,treeDropdownField:g.default,tabs:_.default,mobileMenu:w.default,unsavedForms:E.default,usedOn:T.default,viewMode:P.default,toasts:D.default},e)),i.default.transform("admin",function(e){e.reducer("form",x.default)})}},"./client/src/bundles/bundle.js":function(e,t,n){"use strict";n("./client/src/i18n.js"),n("./node_modules/expose-loader/index.js?SilverStripeComponent!./client/src/lib/SilverStripeComponent.js-exposed"),n("./node_modules/expose-loader/index.js?Backend!./client/src/lib/Backend.js-exposed"),n("./node_modules/expose-loader/index.js?schemaFieldValues!./client/src/lib/schemaFieldValues.js-exposed"),n("./node_modules/expose-loader/index.js?FormAlert!./client/src/components/FormAlert/FormAlert.js-exposed"),n("./node_modules/expose-loader/index.js?Injector!./client/src/lib/Injector.js-exposed"),n("./node_modules/expose-loader/index.js?reduxFieldReducer!./client/src/lib/reduxFieldReducer.js-exposed"),n("./node_modules/expose-loader/index.js?getFormState!./client/src/lib/getFormState.js-exposed"),n("./node_modules/expose-loader/index.js?PopoverField!./client/src/components/PopoverField/PopoverField.js-exposed"),n("./node_modules/expose-loader/index.js?FieldHolder!./client/src/components/FieldHolder/FieldHolder.js-exposed"),n("./node_modules/expose-loader/index.js?Form!./client/src/components/Form/Form.js-exposed"),n("./node_modules/expose-loader/index.js?FormConstants!./client/src/components/Form/FormConstants.js-exposed"),n("./node_modules/expose-loader/index.js?FormAction!./client/src/components/FormAction/FormAction.js-exposed"),n("./node_modules/expose-loader/index.js?SchemaActions!./client/src/state/schema/SchemaActions.js-exposed"),n("./node_modules/expose-loader/index.js?ToastsActions!./client/src/state/toasts/ToastsActions.js-exposed"),n("./node_modules/expose-loader/index.js?FileStatusIcon!./client/src/components/FileStatusIcon/FileStatusIcon.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilder!./client/src/components/FormBuilder/FormBuilder.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderLoader!./client/src/containers/FormBuilderLoader/FormBuilderLoader.js-exposed"),n("./node_modules/expose-loader/index.js?FormBuilderModal!./client/src/components/FormBuilderModal/FormBuilderModal.js-exposed"),n("./node_modules/expose-loader/index.js?FileSchemaModalHandler!./client/src/containers/InsertLinkModal/fileSchemaModalHandler.js-exposed"),n("./node_modules/expose-loader/index.js?InsertLinkModal!./client/src/containers/InsertLinkModal/InsertLinkModal.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActions!./client/src/state/records/RecordsActions.js-exposed"),n("./node_modules/expose-loader/index.js?GridField!./client/src/components/GridField/GridField.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldCell!./client/src/components/GridField/GridFieldCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeader!./client/src/components/GridField/GridFieldHeader.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldHeaderCell!./client/src/components/GridField/GridFieldHeaderCell.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldRow!./client/src/components/GridField/GridFieldRow.js-exposed"),n("./node_modules/expose-loader/index.js?GridFieldTable!./client/src/components/GridField/GridFieldTable.js-exposed"),n("./node_modules/expose-loader/index.js?Accordion!./client/src/components/Accordion/Accordion.js-exposed"),n("./node_modules/expose-loader/index.js?AccordionBlock!./client/src/components/Accordion/AccordionBlock.js-exposed"),n("./node_modules/expose-loader/index.js?Button!./client/src/components/Button/Button.js-exposed"),n("./node_modules/expose-loader/index.js?BackButton!./client/src/components/Button/BackButton.js-exposed"),n("./node_modules/expose-loader/index.js?HiddenField!./client/src/components/HiddenField/HiddenField.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroup!./client/src/components/ListGroup/ListGroup.js-exposed"),n("./node_modules/expose-loader/index.js?ListGroupItem!./client/src/components/ListGroup/ListGroupItem.js-exposed"),n("./node_modules/expose-loader/index.js?Loading!./client/src/components/Loading/Loading.js-exposed"),n("./node_modules/expose-loader/index.js?TextField!./client/src/components/TextField/TextField.js-exposed"),n("./node_modules/expose-loader/index.js?LiteralField!./client/src/components/LiteralField/LiteralField.js-exposed"),n("./node_modules/expose-loader/index.js?Toolbar!./client/src/components/Toolbar/Toolbar.js-exposed"),n("./node_modules/expose-loader/index.js?FileStatusIcon!./client/src/components/FileStatusIcon/FileStatusIcon.js-exposed"),n("./node_modules/expose-loader/index.js?Breadcrumb!./client/src/components/Breadcrumb/Breadcrumb.js-exposed"),n("./node_modules/expose-loader/index.js?ResizeAware!./client/src/components/ResizeAware/ResizeAware.js-exposed"),n("./node_modules/expose-loader/index.js?TabsActions!./client/src/state/tabs/TabsActions.js-exposed"),n("./node_modules/expose-loader/index.js?Tag!./client/src/components/Tag/Tag.js-exposed"),n("./node_modules/expose-loader/index.js?TagList!./client/src/components/Tag/TagList.js-exposed"),n("./node_modules/expose-loader/index.js?CompactTagList!./client/src/components/Tag/CompactTagList.js-exposed"),n("./node_modules/expose-loader/index.js?Tip!./client/src/components/Tip/Tip.js-exposed"),n("./node_modules/expose-loader/index.js?Search!./client/src/components/Search/Search.js-exposed"),n("./node_modules/expose-loader/index.js?SearchToggle!./client/src/components/Search/SearchToggle.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldNode!./client/src/components/TreeDropdownField/TreeDropdownFieldNode.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownFieldMenu!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js-exposed"),n("./node_modules/expose-loader/index.js?TreeDropdownField!./client/src/components/TreeDropdownField/TreeDropdownField.js-exposed"),n("./node_modules/expose-loader/index.js?BreadcrumbsActions!./client/src/state/breadcrumbs/BreadcrumbsActions.js-exposed"),n("./node_modules/expose-loader/index.js?RecordsActionTypes!./client/src/state/records/RecordsActionTypes.js-exposed"),n("./node_modules/expose-loader/index.js?UnsavedFormsActions!./client/src/state/unsavedForms/UnsavedFormsActions.js-exposed"),n("./node_modules/expose-loader/index.js?Badge!./client/src/components/Badge/Badge.js-exposed"),n("./node_modules/expose-loader/index.js?Button!./client/src/components/Button/Button.js-exposed"),n("./node_modules/expose-loader/index.js?BackButton!./client/src/components/Button/BackButton.js-exposed"),n("./node_modules/expose-loader/index.js?VersionedBadge!./client/src/components/VersionedBadge/VersionedBadge.js-exposed"),n("./node_modules/expose-loader/index.js?CheckboxSetField!./client/src/components/CheckboxSetField/CheckboxSetField.js-exposed"),n("./node_modules/expose-loader/index.js?Preview!./client/src/components/Preview/Preview.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeStates!./client/src/state/viewMode/ViewModeStates.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeActions!./client/src/state/viewMode/ViewModeActions.js-exposed"),n("./node_modules/expose-loader/index.js?ViewModeToggle!./client/src/components/ViewModeToggle/ViewModeToggle.js-exposed"),n("./node_modules/expose-loader/index.js?Focusedzone!./client/src/components/Focusedzone/Focusedzone.js-exposed"),n("./node_modules/expose-loader/index.js?Config!./client/src/lib/Config.js-exposed"),n("./node_modules/expose-loader/index.js?DataFormat!./client/src/lib/DataFormat.js-exposed"),n("./node_modules/expose-loader/index.js?ReactRouteRegister!./client/src/lib/ReactRouteRegister.js-exposed"),n("./node_modules/expose-loader/index.js?Router!./client/src/lib/Router.js-exposed"),n("./node_modules/expose-loader/index.js?TinyMCEActionRegistrar!./client/src/lib/TinyMCEActionRegistrar.js-exposed"),n("./node_modules/expose-loader/index.js?ShortcodeSerialiser!./client/src/lib/ShortcodeSerialiser.js-exposed"),n("./node_modules/expose-loader/index.js?formatWrittenNumber!./client/src/lib/formatWrittenNumber.js-exposed"),n("./node_modules/expose-loader/index.js?withDragDropContext!./client/src/lib/withDragDropContext.js-exposed"),n("./client/src/legacy/jquery.changetracker.js"),n("./client/src/legacy/sspath.js"),n("./client/src/legacy/ssui.core.js"),n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/LeftAndMain.ActionTabSet.js"),n("./client/src/legacy/LeftAndMain.Panel.js"),n("./client/src/legacy/LeftAndMain.Tree.js"),n("./client/src/legacy/LeftAndMain.Content.js"),n("./client/src/legacy/LeftAndMain.EditForm.js"),n("./client/src/legacy/LeftAndMain.Menu.js"),n("./client/src/legacy/LeftAndMain.MobileMenuToggle.js"),n("./client/src/legacy/LeftAndMain.Preview.js"),n("./client/src/legacy/LeftAndMain.BatchActions.js"),n("./client/src/legacy/LeftAndMain.FieldHelp.js"),n("./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js"),n("./client/src/legacy/LeftAndMain.TreeDropdownField.js"),n("./client/src/legacy/AddToCampaignForm.js"),n("./client/src/legacy/SecurityAdmin.js"),n("./client/src/legacy/ModelAdmin.js"),n("./client/src/legacy/ToastsContainer.js"),n("./client/src/legacy/ConfirmedPasswordField.js"),n("./client/src/legacy/SelectionGroup.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/ToggleCompositeField.js"),n("./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js"),n("./client/src/legacy/UsedOnTable/UsedOnTableEntwine.js"),n("./client/src/legacy/DateField.js"),n("./client/src/legacy/DatetimeField.js"),n("./client/src/legacy/HtmlEditorField.js"),n("./client/src/legacy/TabSet.js"),n("./client/src/legacy/GridField.js"),n("./client/src/boot/index.js")},"./client/src/components/ActionMenu/ActionMenu.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(f.default,s({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);v.propTypes={className:b.default.string,extraClass:b.default.string,itemClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,source:b.default.arrayOf(b.default.shape({value:b.default.oneOfType([b.default.string,b.default.number]),title:b.default.any,disabled:b.default.bool})),onChange:b.default.func,value:b.default.any,readOnly:b.default.bool,disabled:b.default.bool},v.defaultProps={extraClass:"",className:"",value:[]},t.Component=v;var g=function(e){var t=(0,h.default)(v);return u.default.createElement(t,e)};t.default=g},"./client/src/components/CompositeField/CompositeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t1?this.renderMultipleActions(e):1===e.length?this.renderSingleAction(e[0]):null}}]),t}(l.PureComponent),_=f.default.propTypes;_.group=g.default.string,y.propTypes=g.default.arrayOf(g.default.shape(_)).isRequired,t.default=y},"./client/src/components/GridFieldActions/GridFieldDropdownAction.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,x.default)((0,D.default)(e),r),a=o&&o.values||{},i=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:a,formIsDirty:(0,T.isDirty)(r,D.default)(e),schemaName:r,tagData:i}}function d(e){return{actions:{schema:(0,w.bindActionCreators)(E,e),reduxForm:(0,w.bindActionCreators)({reset:C.reset,initialize:C.initialize,change:C.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var f=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.name,r=t.filterPrefix,o=t.formData,a=this.state.searchText,i={};return Object.keys(o).forEach(function(e){var t=o[e];t&&(i[e]=t)}),!e&&a&&void 0===o[""+r+n]&&(i[""+r+n]=a.trim()),i}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.name,a=n.filterPrefix,i=n.actions;void 0!==n.formData[""+a+o]&&i.reduxForm.change(r,""+a+o,t)}},{key:"focusInput",value:function(){if(this.state.display!==G.NONE){var e=j.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===G.EXPANDED){var t=j.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,{fields:[]}),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=a({},e,void 0),r=this.props,o=r.schemaName,i=r.filters;this.props.actions.reduxForm.change(o,e,""),this.setOverrides(p({},this.props,{filters:p({},i,a({},e,void 0))})),Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.clearSearchBox(),this.props.onHide?this.props.onHide():this.state.display!==G.NONE&&this.setState({display:G.NONE})}},{key:"show",value:function(){this.state.display!==G.VISIBLE&&this.setState({display:G.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==G.EXPANDED&&this.setState({display:G.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case G.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case G.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.name,r=t.filterPrefix,o={},a=this.getData();Object.entries(a).forEach(function(t){var i=f(t,2),s=i[0],l=i[1],c=s,u=l;e.hasOwnProperty(s)&&(u=e[s]),r.length>0&&s.startsWith(r)&&(c=s.substring(r.length)),(!r.length>0||s!==n||void 0===a[""+r+n])&&(o[c]=u)});var i=o[n]||"";this.state.display===G.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:G.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(o)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name,r=e.filterPrefix,o=Object.assign({},t),a=""+r+n;return o&&o[a]&&delete o[a],o?Object.values(o).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,a=e.displayBehavior,i=e.identifier,s=e.formIsDirty,l=(e.tagData,e.name),c=o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData","name"]);if(this.state.display===G.NONE)return a===q.TOGGLABLE?g.default.createElement(L.default,{onToggle:this.show}):g.default.createElement("div",null);var u=r+"_ExtraFields",d=this.state.searchText,f=this.state.display===G.EXPANDED,h=this.state.display===G.VISIBLE,m=[q.HIDEABLE,q.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),v=this.getData(),y=Object.keys(v).length>0;return g.default.createElement(P.default,{onClickOut:this.show,className:"search"},g.default.createElement(M.default,p({},c,{name:"SearchBox__"+l,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:d,hideable:m,expanded:f,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:b,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),g.default.createElement(I.default,{id:u,identifier:i,visible:h,expanded:f,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(v.Component);z.propTypes={onSearch:V.default.func,onHide:V.default.func,id:V.default.string.isRequired,display:V.default.oneOf(Object.values(G)),formSchemaUrl:V.default.string,filters:V.default.object,formData:V.default.object,placeholder:V.default.string,displayBehavior:V.default.oneOf(Object.values(q)),term:V.default.string,name:V.default.string,filterPrefix:V.default.string,forceFilters:V.default.bool,formIsDirty:V.default.bool,identifier:V.default.string,schemaName:V.default.string,tagHandlers:V.default.object,borders:V.default.shape({top:V.default.bool,right:V.default.bool,bottom:V.default.bool,left:V.default.bool})},z.defaultProps={placeholder:b.default._t("Admin.SEARCH","Search"),display:G.VISIBLE,displayBehavior:q.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=z,t.hasFilters=c,t.default=(0,y.connect)(u,d)(z)},"./client/src/components/Search/SearchBox.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var n=0;n576?55:20;return this.state.tagWidth+e}},{key:"calculateSpaceForTags",value:function(){var e=this.state.width;e-=150,e=e-55-52;var t=this.props,n=t.hideable,r=t.showFilters;return n&&(e-=52),r&&(e-=52),e=Math.max(e,0)}},{key:"handleKeyDown",value:function(e){"Enter"===e.key?(e.preventDefault(),this.props.onSearch()):0===e.target.selectionStart&&("ArrowLeft"===e.key||"Backspace"===e.key&&e.target.selectionEnd-e.target.selectionStart==0)&&(e.preventDefault(),this.focusOnLastTag())}},{key:"handleFocus",value:function(){this.state.hasFocus||this.setState({hasFocus:!0}),this.props.onHideFilter&&this.props.onHideFilter()}},{key:"handleBlur",value:function(){this.state.hasFocus&&this.setState({hasFocus:!1})}},{key:"focusOnLastTag",value:function(){var e=O.default.findDOMNode(this);if(e){var t=e.querySelector(".compact-tag-list__visible .tag:last-child");t&&t.focus()}}},{key:"focusOnInput",value:function(){var e=O.default.findDOMNode(this);if(e){var t=e.querySelector("input");t&&t.focus()}}},{key:"renderInput",value:function(){var e,n=this.props,r=n.id,a=n.searchText,i=n.onChange,s=n.placeholder,l=n.name,c=n.borders,u={paddingLeft:this.calculateInputLeftPadding()+"px"},d=Object.assign({},t.defaultProps.borders,c),p="search-box__content-field",h=(0,m.default)("form-control",p,(e={},o(e,p+"--top-border",d.top),o(e,p+"--right-border",d.right),o(e,p+"--bottom-border",d.bottom),o(e,p+"--left-border",d.left),e));return f.default.createElement("input",{"aria-labelledby":r+"_label",type:"search",name:l,placeholder:s,className:h,onKeyDown:this.handleKeyDown,onChange:i,onFocus:this.handleFocus,onBlur:this.handleBlur,value:a,id:r,autoFocus:!0,style:u})}},{key:"renderTags",value:function(){var e=this.props,t=e.tagData,n=e.onTagDelete,r=e.onTagClick,o=e.onToggleFilter;return f.default.createElement("div",{className:"search-box__tags"},f.default.createElement(j.default,{onResize:this.onTagListResize},f.default.createElement(y.default,{onTagDelete:n,onTagClick:r,onHolderFocus:this.focusOnInput,tags:t,onSummary:o,maxSize:this.calculateSpaceForTags(),deletable:!0})))}},{key:"renderEnterHint",value:function(){var e=this;return f.default.createElement("div",{role:"presentation",className:"search-box__enter",onClick:function(t){t.stopPropagation(),t.preventDefault(),e.props.onSearch()}},u.default._t("Admin.ENTER","Enter")," ↵")}},{key:"renderFilterButton",value:function(){var e=this.props,t=e.expanded,n=e.onToggleFilter,r=e.formId,o=(0,m.default)("btn--icon","font-icon-caret-down-two","search-box__filter-trigger",{collapsed:!t});return f.default.createElement(p.Button,{"aria-expanded":t,"aria-controls":r,"aria-label":u.default._t("Admin.ADVANCED","Advanced"),onClick:n,className:o,title:u.default._t("Admin.ADVANCED","Advanced")},"Search options")}},{key:"renderHideButton",value:function(){var e=this.props,t=e.id,n=e.onHide;return f.default.createElement(p.Button,{onClick:n,title:u.default._t("Admin.CLOSE","Close"),"aria-label":u.default._t("Admin.CLOSE","Close"),className:"font-icon-cancel btn--no-text btn--icon-lg search-box__cancel","aria-controls":t,"aria-expanded":"true"})}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.id,r=e.hideable,o=e.expanded,a=e.showFilters,i=e.dirty,s=e.clearable,l=(0,m.default)("search-box",{"search-box--hideable":r,"search-box--not-hideable":!r,"search-box--has-focus":this.state.hasFocus,"search-box--has-not-focus":!this.state.hasFocus,"search-box--has-filters":a,"search-box--has-not-filters":!a,"search-box--compact":this.state.width<576,"search-box--expanded":o}),c=(i||!s)&&this.state.hasFocus;return f.default.createElement("div",{className:l},f.default.createElement(j.default,{onResize:this.onResize},f.default.createElement("div",{className:"search-box__group"},f.default.createElement(p.Label,{for:n,id:n+"_label",hidden:!0},u.default._t("Admin.SEARCH","Search")),this.renderTags(),this.renderInput(),c&&this.renderEnterHint(),t,f.default.createElement("div",{className:"icon font-icon-search"}),a&&this.renderFilterButton(),r&&this.renderHideButton())))}}]),t}(d.Component);T.propTypes={onSearch:C.default.func,onToggleFilter:C.default.func,onHideFilter:C.default.func,onChange:C.default.func,onHide:C.default.func,onTagDelete:C.default.func,onTagClick:C.default.func,placeholder:C.default.string,expanded:C.default.bool,formId:C.default.string,id:C.default.string,searchText:C.default.string,hideable:C.default.bool,showFilters:C.default.bool,name:C.default.string,dirty:C.default.bool,clearable:C.default.bool,tagData:C.default.arrayOf(v.default)},T.defaultProps={placeholder:u.default._t("Admin.SEARCH","Search"),tagData:[],filters:{},formData:{},term:"",borders:{top:!1,right:!1,bottom:!0,left:!0}},t.Component=T,t.default=T},"./client/src/components/Search/SearchForm.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(t){"Enter"===t.key&&(t.preventDefault(),e())}}function a(e){var t=e.visible,n=e.expanded,r=e.onSearch,a=e.onClear,i=e.formSchemaUrl,s=e.id,l=e.identifier,u=e.clearable,p=o(r),h=t||n;return c.default.createElement(f.Collapse,{id:s,isOpen:n,className:"search-form"},c.default.createElement("div",{className:"search-form__wrapper",onKeyDown:p},h&&i&&c.default.createElement(d.default,{className:"no-change-track",formTag:"div",identifier:l,schemaUrl:i,onSubmit:function(){return r(),Promise.resolve()}}),c.default.createElement(f.Button,{className:"search-form__submit",onClick:function(){return r()},color:"primary",type:"button"},m),u&&c.default.createElement(f.Button,{className:"search-form__clear",onClick:function(){return a()}},b)))}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var i=n(4),s=r(i),l=n(0),c=r(l),u=n(32),d=r(u),f=n(5),p=n(1),h=r(p),m=s.default._t("Admin.SEARCH","Search"),b=s.default._t("Admin.CLEAR","Clear");a.propTypes={onSearch:h.default.func,onClear:h.default.func,visible:h.default.bool,expanded:h.default.bool,id:h.default.string.isRequired,formSchemaUrl:h.default.string,identifier:h.default.string,clearable:h.default.bool},a.defaultProps={formData:{}},t.Component=a,t.default=a},"./client/src/components/Search/SearchToggle.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(4),a=r(o),i=n(0),s=r(i),l=n(5),c=n(2),u=r(c),d=n(1),f=r(d),p=a.default._t("Admin.SHOW_SEARCH","Show search"),h=function(e){return(0,u.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e})},m=function(e){var t=e.onToggle,n=e.toggled;return s.default.createElement(l.Button,{title:p,onClick:t,className:h(n)},s.default.createElement("span",{className:"sr-only"},p))};m.propTypes={onToggle:f.default.func,toggled:f.default.bool},t.Component=m,t.default=m},"./client/src/components/Search/utilities/defaultTagHandlers.js":function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=n("./client/src/components/Search/utilities/genericDateTagHandler.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),i=function(e,t,n){if(!Array.isArray(t)||0===t.length)return!1;var r=n.state.fields.find(function(t){return t.name===e});return!(!r||!r.source)&&(t.map(function(e){var t=r.source.find(function(t){return t.value.toString()===e.toString()});return t&&t.title?t.title:e}).join(", ")||!1)},s={Date:(0,a.default)("ll"),Time:(0,a.default)("LT"),Datetime:(0,a.default)("lll"),Hidden:function(){return!1},SingleSelect:function(e,t,n){if(void 0===e.value)return!1;var r=i(e.key,[e.value],n);return!!r&&Object.assign({},e,{value:r})},Boolean:function(e){return!!e.value&&(e.value,r(e,["value"]))},MultiSelect:function(e,t,n){var r=i(e.key,e.value,n);return!!r&&Object.assign({},e,{value:r})},default:function(e){return!!e.value&&e}};t.default=s},"./client/src/components/Search/utilities/genericDateTagHandler.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=function(e){return function(t,n){var r=n.lang;if(!t.value)return!1;if(t.value&&r){o.default.locale(r);var a=(0,o.default)(t.value);if(a.isValid())return Object.assign({},t,{value:a.format(e)})}return t}};t.default=a},"./client/src/components/Search/utilities/mapFormSchemaToTags.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("./client/src/components/Search/utilities/defaultTagHandlers.js"),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=function(e,t){var n=t.key,r=t.value;return""+e+(t.label.toLowerCase()||n)+" "+(r||"")+" "},i=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};var r=void 0,i=function(n){var o={key:n.name,label:n.title,value:t[n.name]};return("function"==typeof r["#"+o.key]?r["#"+o.key]:"function"==typeof r[n.schemaType]?r[n.schemaType]:r.default)(o,n,e,t)},s=function(e,t){var n=t.children;if(!Array.isArray(n)||0===n.length)return!1;var r=n.map(i).filter(function(e){return!1!==e}).reduce(a,"").trim(),o=n.map(function(e){return e.name}),s="[name="+n[0].name+"]";return!!r&&Object.assign({},e,{value:r,linkedFields:o,focusSelector:s})};r=Object.assign({},o.default,{Structural:s},n);var l=e.schema.fields,c=l.map(i).filter(function(e){return!1!==e}),u={};return c.forEach(function(e){u[e.key]=e}),u};t.default=i},"./client/src/components/SingleSelectField/SingleSelectField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t1?s.default.createElement(l.Nav,{tabs:!0,role:"tablist"},o):null}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1}}]),t}(f.default);t.Component=p,t.default=(0,u.default)(p)},"./client/src/components/TimeField/TimeField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=Object.assign||function(e){for(var t=1;t0&&i.default.createElement(h.ToastActions,{actions:a,onDismiss:r,dismissed:o}))};g.propTypes=o({},v,{onDismiss:l.default.func.isRequired}),g.defaultProps={actions:[]},t.default=g},"./client/src/components/Toasts/ToastActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ToastActions=t.ToastAction=void 0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0;if(!n)return[];if(!t||0===Object.keys(t).length)return null;if(t.id===n)return[t.id];if(!t.children)return null;var o=!0,a=!1,i=void 0;try{for(var s,l=t.children[Symbol.iterator]();!(o=(s=l.next()).done);o=!0){var c=s.value,u=e(c,n);if(null!==u)return t.id&&t.id!==r&&u.unshift(t.id),u}}catch(e){a=!0,i=e}finally{try{!o&&l.return&&l.return()}finally{if(a)throw i}}return null}},"./client/src/components/UsedOnTable/UsedOnTable.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var s=function(){function e(e,t){for(var n=0;n=25&&(o=o.substring(0,25).trim()+"..."),s&&(a=s);var l=t+"-"+n+"-"+r,u=["used-on__title-item"];return i&&(u.push("used-on__title-item--first"),i=!1),c.default.createElement("li",{className:(0,p.default)(u),key:l},o)}),l=t+"-"+n;return c.default.createElement("tr",{key:l,className:"used-on__row"},c.default.createElement("td",{className:"used-on__col--index"},c.default.createElement("a",{href:a,className:"used-on__cell-link"},t+1)),c.default.createElement("td",{className:"used-on__col--title"},c.default.createElement("a",{href:a,className:"used-on__cell-link"},c.default.createElement("ul",{className:"used-on__title-items"},s),c.default.createElement("span",{className:"used-on__type"},r))))}},{key:"render",value:function(){return c.default.createElement("table",{className:"table used-on__table"},this.renderHeader(),this.renderBody())}}]),t}(l.PureComponent);_.propTypes={loading:d.default.bool,usedOn:d.default.arrayOf(d.default.shape({id:d.default.oneOfType([d.default.string,d.default.number]),title:d.default.string,type:d.default.string,link:d.default.string,ancestors:d.default.arrayOf(d.default.shape({title:d.default.string,link:d.default.string})).isRequired})),error:d.default.string},t.Component=_,t.default=(0,y.default)(_)},"./client/src/components/UsedOnTable/provideUsedOnData.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.data.readUsageEndpoint||{},n=t.method,r=t.url;this.haveFetchedData&&!this.props.forceFetch||e.loadUsedOn(e.identifier,n,r),this.haveFetchedData=!0}},{key:"render",value:function(){return c.default.createElement(e,this.props)}}]),n}(l.Component);t.propTypes={identifier:d.default.string,loading:d.default.bool,data:d.default.oneOfType([d.default.array,d.default.shape({recordClass:d.default.string,recordId:d.default.oneOfType([d.default.string,d.default.number]),readUsageEndpoint:d.default.shape({url:d.default.string,method:d.default.string})})]),usedOn:d.default.array,forceFetch:d.default.bool};var n=function(e,t){var n=t.data,r=n.recordClass,o=n.recordId,a=r&&o?r+"#"+o:"",i=e.usedOn;return{identifier:a,loading:i.loading.includes(a),usedOn:i.usedOn[a]||null,error:i.errors[a]||null}},r=(0,h.injectTabContext)(t),u=(0,f.connect)(n,{loadUsedOn:p.loadUsedOn})(r);return u.Component=r,u};t.default=m},"./client/src/containers/App/App.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=n(10),i=n("./node_modules/react-router-config/esm/react-router-config.js"),s=function(e){var t=e.route;return o.default.createElement("div",{className:"app"},(0,i.renderRoutes)(t.routes()))};t.default=(0,a.provideInjector)(s)},"./client/src/containers/Form/Form.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r '),e("body").append(t)),t.open(),!1}}),e(".add-to-campaign-modal .add-to-campaign-modal__nav-link").entwine({onclick:function(t){t.preventDefault();var n=e(t.target);window.location=n.attr("href")}}),e("#add-to-campaign__dialog-wrapper").entwine({onunmatch:function(){this._clearModal()},open:function(){this._renderModal(!0)},close:function(){this._renderModal(!1)},_renderModal:function(t){var n=this,r=function(){return n.close()},o=function(){return n._handleSubmitModal.apply(n,arguments)},i=e("form.cms-edit-form :input[name=ID]").val(),s=window.ss.store,l=s.getState().config.sections.find(function(e){return"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name}),u=l.form.AddToCampaignForm.schemaUrl+"/"+i,f=a.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign");d.default.render(c.default.createElement(p,{title:f,isOpen:t,onSubmit:o,onClosed:r,schemaUrl:u,bodyClassName:"modal__dialog",className:"add-to-campaign-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"Admin.AddToCampaign"}),this[0])},_clearModal:function(){d.default.unmountComponentAtNode(this[0])},_handleSubmitModal:function(e,t,n){return n()}})})},"./client/src/legacy/ConfirmedPasswordField.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).on("click",".confirmedpassword .showOnClick a",function(){var e=(0,o.default)(".showOnClickContainer",(0,o.default)(this).parent());return e.toggle("fast",function(){e.toggleClass("d-none").find('input[type="hidden"]').val(e.hasClass("d-none")?0:1)}),!1})},"./client/src/legacy/DateField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n(4),s=r(i),l=n(14),c=r(l),u=n(22),d=r(u);a.default.entwine("ss",function(e){e("input[type=date]").entwine({onadd:function(){if(!d.default.inputtypes.date&&!(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))){var t=e(" ",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L"))}this.val(r);var a=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L")});this.attr("placeholder",a),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e)for(var n=["L","YYYY-MM-DD"],r=0;r",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),c.default.locale(this.attr("lang"));var n=this.val(),r="";if(n){var o=(0,c.default)(n);o.isValid()&&(r=o.format("L LT"))}this.val(r);var a=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,c.default)().endOf("month").format("L LT")});this.attr("placeholder",a),this.updateValue()}},onchange:function(){this.updateValue()},updateValue:function(){var e=this.val(),t="";if(e){var n=(0,c.default)(e,["L LT",c.default.ISO_8601]);n.isValid()&&(t=n.format("YYYY-MM-DDTHH:mm:ss"))}this.parent().find("input[type=hidden]").val(t)}})})},"./client/src/legacy/GridField.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t ").addClass("ss-gridfield-item loading").attr("colspan",l);s.append(e(" ").append(p)),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(o){if(r.empty().append(e(o).children()),a&&r.find(':input[name="'+a+'"]').focus(),r.find(".grid-field__filter-header, .grid-field__search-holder").length){var i="show"===t.data[0].filter;r.needsColumnFix()&&r.fixColumns(),r.injectSearchButton(i)}n&&n.apply(this,arguments),r.trigger("reload",r),!1!==t.data[0].triggerChange&&r.trigger("change")},error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION"))},complete:function(e,t){r.find(".loading").removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var n=this.getState();n[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(n))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())},hasFilters:function(){return!!this.getState().GridFieldFilterHeader},needsColumnFix:function(){return this.find(".grid-field__filter-header, .grid-field__search-holder").length&&!this.find(".grid-field__col-compact").length&&!this.find("th.col-Actions").length},fixColumns:function(t){this.find(".sortable-header").append(' '),this.find("tbody tr").each(function(){e(this).find("td:last").attr("colspan",2)});var n=e('');e(".grid-field__filter-header th:last .action").each(function(){e(this).detach(),n.append(e(this))}),e(".grid-field__filter-header").append(n)},injectSearchButton:function(e){var t=this.find(".grid-field__filter-header").length>0,n=void 0;e?(n=' ',this.addClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden"),t||this.find(":button[name=showFilter]").hide()):(n=' ',this.removeClass("show-filter").find(".grid-field__filter-header, .grid-field__search-holder").addClass("grid-field__search-holder--hidden")),t&&this.find(".sortable-header th:last").html(n)},keepStateInHistory:function(){var t=this,n=e(this).find(".gridfield-actionmenu__container").data("schema");n&&n.length>0&&n.filter(function(e){if("link"===e.type){var n=t.buildURLString(e.url),r=n?"?"+n.join("&"):"";window.ss.router.replace(window.location.pathname+r,void 0,void 0,!1)}})},buildURLString:function(e){var t=[window.location.origin,e].join("/"),n=[window.location.search,new URL(t).searchParams.toString()].join("&").substring(1),r=[],o=[];return n.split("&").forEach(function(e){var t=e.split("=");r[t[0]]=t[1]?t[1]:""}),Object.keys(r).forEach(function(e){o.push([e,r[e]].join("="))}),o}}),e(".grid-field *").entwine({getGridField:function(){return this.closest(".grid-field")}}),e(".gridfield-actionmenu__container").entwine({Timer:null,Component:null,Actions:null,onmatch:function(){this._super();var t=[];e(".action-menu--handled",this.parent()).each(function(){var n=e(this).detach();t.push(n)}),this.setActions(t);var n=this.closest(".cms-content").attr("id"),r=n?{context:n}:{},o=(0,m.loadComponent)("GridFieldActions",r);this.setComponent(o),this.refresh()},onunmatch:function(){this._super();var t=this[0];t&&p.default.unmountComponentAtNode(t);var n=this.getActions(),r=this.parent();n&&e(n).each(function(){e(this).appendTo(r)})},refresh:function(){var e=this.data("schema"),t=this.getComponent();p.default.render(d.default.createElement(t,{schema:e}),this[0])}}),e(".grid-field :button[name=showFilter]").entwine({onclick:function(e){this.closest(".grid-field").find(".grid-field__filter-header, .grid-field__search-holder").removeClass("grid-field__search-holder--hidden").find(":input:first").focus(),this.closest(".grid-field").addClass("show-filter"),this.parent().html(' '),e.preventDefault()}}),e(".grid-field .ss-gridfield-item").entwine({onclick:function(t){if(t.target.classList.contains("action-menu__toggle"))return this._super(t),!1;if(e(t.target).closest(".action").length)return this._super(t),!1;var n=this.find(".edit-link, .view-link");n.length&&this.getGridField().showDetailView(n.prop("href"))},onmouseover:function(){this.find(".edit-link, .view-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".grid-field .action.action_import:button").entwine({onclick:function(e){e.preventDefault(),this.openmodal()},onmatch:function(){this._super(),"open"===this.data("state")&&this.openmodal()},onunmatch:function(){this._super()},openmodal:function(){function t(){o.removeClass("show"),n.removeClass("show"),setTimeout(function(){o.remove()},150)}var n=e(this.data("target")),r=e(this.data("modal"));n.length<1?(n=r,n.appendTo(document.body)):n.innerHTML=r.innerHTML;var o=e(".modal-backdrop");o.length<1&&(o=e('
'),o.appendTo(document.body)),n.find("[data-dismiss]").add(".modal-backdrop").on("click",function(){t()}),e(document).on("keydown",function(e){27===e.keyCode&&t()}),setTimeout(function(){o.addClass("show"),n.addClass("show")},0)}}),e(".grid-field .action:button").entwine({onclick:function(t){var n="show",r=!0;if(this.is(":disabled"))return void t.preventDefault();!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(n="hidden"),(this.hasClass("ss-gridfield-pagination-action")||this.hasClass("grid-field__sort"))&&(r=!1);var o=[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:r}],a=this.data("action-state");a&&o.push({name:"ActionState",value:JSON.stringify(a)});var i=e(this).getGridField(),s=function(t,n,r){i.keepStateInHistory();var o=r.getResponseHeader("X-Message-Text"),a=r.getResponseHeader("X-Message-Type");if(o&&a){var s=e("#Form_EditForm_error");s.addClass(a),s.html(o),s.show()}};i.reload({data:o},s),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),r=this.closest("form"),o=r.find(":input.gridstate").serialize(),a=r.find('input[name="SecurityID"]').val();o+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),a&&(o+="&SecurityID="+encodeURIComponent(a));var i=this.data("action-state");i&&(o+="&ActionState="+encodeURIComponent(JSON.stringify(i))),window.location.search&&(o=window.location.search.replace(/^\?/,"")+"&"+o);var s=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+s+o,e("base").attr("href"))}}),e(".grid-field .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),n=""!==t.val(),r=e.is(":disabled");(n&&r||!n&&!r)&&e.attr("disabled",!r)}}),e(".grid-field .grid-field__col-compact .action--delete, .grid-field .grid-field__col-compact .action--archive, .cms-edit-form .btn-toolbar .action--delete, .cms-edit-form .btn-toolbar .action--archive").entwine({onclick:function(t){var n=e(this).hasClass("action--archive")?c.default._t("Admin.ARCHIVECONFIRMMESSAGE","Are you sure you want to archive this record?"):c.default._t("Admin.DELETECONFIRMMESSAGE","Are you sure you want to delete this record?");if(!confirm(n))return t.preventDefault(),!1;this._super(t)}}),e(".grid-field .grid-print-button.action:button").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var t=this.actionurl();return window.open(t),e.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus(),(this.contentWindow||this).print()})},onunmatch:function(){this._super()}}),e(".grid-field .action.no-ajax, .grid-field .no-ajax .action:button").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".grid-field[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".grid-field[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".js-injector-boot .grid-field .grid-field__search-holder").entwine({Component:null,onmatch:function(){this._super(),this.prependTo(this.parent());var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,m.loadComponent)("Search",t);this.setComponent(n),this.refresh()},onunmatch:function(){this._super();var e=this[0];e&&p.default.unmountComponentAtNode(e)},close:function(){var t=this.data("schema"),n=[{name:t.clearAction,value:"",filter:"hidden",triggerChange:!1}];t.clearActionState&&n.push({name:"ActionState",value:t.clearActionState});var r=e(this).getGridField(),o=function(){r.keepStateInHistory()};r.reload({data:n},o)},search:function(t){var n=this.data("schema"),r=[{name:n.searchAction,value:"",filter:"show",triggerChange:!1}];n.searchActionState&&r.push({name:"ActionState",value:n.searchActionState});var o=!0,i=!1,s=void 0;try{for(var l,c=Object.entries(t)[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value,d=a(u,2),f=d[0],p=d[1];if(p){var h="filter["+n.gridfield+"]["+f+"]";r.push({name:h,value:p})}}}catch(e){i=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}var m=e(this).getGridField(),b=function(){m.keepStateInHistory()};m.reload({data:r},b)},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},a=function(t){return e.search(t)};String(t.gridfield).replace(/\-/g,"."),p.default.render(d.default.createElement(n,o({id:t.gridfield+"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:r,onSearch:a},t)),this[0])}}),e(".js-injector-boot .grid-field .search-box__content-field").entwine({onkeydown:function(e){"Enter"===e.key&&e.preventDefault()}}),e(".grid-field .grid-field__filter-header :input").entwine({onmatch:function(){var e=this.closest(".extra").find(".ss-gridfield-button-filter"),t=this.closest(".extra").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(t){if(!this.closest(".ss-gridfield-button-reset").length){var n=this.closest(".extra").find(".ss-gridfield-button-filter"),r=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==t.keyCode){var o=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),a="show";!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(a="hidden");var i=[{name:o.attr("name"),value:o.val(),filter:a,triggerChange:!1}];o.data("action-state")&&i.push({name:"ActionState",value:JSON.stringify(o.data("action-state"))});var s=e(this).getGridField(),l=function(){s.keepStateInHistory()};return s.reload({data:i},l),!1}n.addClass("hover-alike"),r.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var r=e(this.element);e(this.element).closest("form"),e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(r).data("searchUrl"),data:encodeURIComponent(r.attr("name"))+"="+encodeURIComponent(r.val()),success:n,error:function(e){alert(c.default._t("Admin.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){var r=e(' ');r.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(r),e(this).closest(".grid-field").find(".action_gridfield_relationadd").removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){t.preventDefault();var n=parseInt(e(this).val(),10),r=e(this).getGridField();r.setState("GridFieldPaginator",{currentPage:n});var o=function(){r.keepStateInHistory()};return r.reload({},o),!1}}})})},"./client/src/legacy/HtmlEditorField.js":function(module,exports,__webpack_require__){"use strict";(function($){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _jquery=__webpack_require__(3),_jquery2=_interopRequireDefault(_jquery);__webpack_require__("./node_modules/events-polyfill/index.js");var ss=void 0!==window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(e){editorID=e,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var e="#"+editorID,t=(0,_jquery2.default)(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",function(){n.save()})},t},save:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getInstance();t.save(),e.silent||((0,_jquery2.default)(t.getElement()).trigger("change"),t.getElement().dispatchEvent(new Event("input",{bubbles:!0})))},create:function(){function e(e,t){var r=$(e).scrollTop();$(".mce-floatpanel").each(function(e,n){var o=parseFloat(n.style.top);$(n).css("top",o-(r-t)+"px")}),$(".mce-floatpanel").css("opacity","1"),n=void 0}function t(t){var a=t.target;!n||(new Date-n)/100>500?(o=$(a).scrollTop(),$(".mce-floatpanel").css("opacity","0")):window.clearTimeout(r),n=new Date,r=window.setTimeout(function(){return e(a,o)},500)}var n=void 0,r=void 0,o=void 0,a=this.getConfig();void 0!==a.baseURL&&(tinymce.EditorManager.baseURL=a.baseURL),tinymce.init(a).then(function(e){e.length>0&&e[0].container&&$(e[0].container).closest(".panel--scrollable").on("scroll",function(e){return t(e)})})},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getSelection:function(){var e=this.getInstance(),t=e.selection.getContent({format:"text"});return t||(t=e.selection.getSel().toString()),t||""},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().setContent(e,t)},insertContent:function(e,t){this.getInstance().insertContent(e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t,n){if(n){n=n.replaceAll("<","<").replaceAll(">",">");var r=this.getInstance().dom.create("a",e,n);this.getInstance().selection.setNode(r)}else this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback,cu=tinyMCE.settings.convert_urls;return cb&&(href=eval(cb+"(href, node, true);")),cu&&href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers.default=ss.editorWrappers.tinyMCE,_jquery2.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),t.init(this.attr("id")),this._super()},onmatch:function(){this.getEditor()||this.onadd(),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},onunmatch:function(){this.getEditor()&&this.onremove(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save({silent:!0}),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openEmbedDialog:function(){this.openDialog("embed")},openDialog:function(t){if("media"===t&&window.InsertMediaModal){var n=e("#insert-media-react__dialog-wrapper");return n.length||(n=e('
'),e("body").append(n)),n.setElement(this),void n.open()}if("embed"===t&&window.InsertEmbedModal){var r=e("#insert-embed-react__dialog-wrapper");return r.length||(r=e('
'),e("body").append(r)),r.setElement(this),void r.open()}throw new Error("Dialog named "+t+" is not available.")}})})}).call(exports,__webpack_require__(3))},"./client/src/legacy/LeftAndMain.ActionTabSet.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){e(".cms-container").find("iframe").each(function(t,n){try{e(n).contents().off("click.ss-ui-action-tabset")}catch(e){console.warn("Unable to access iframe, possible https mis-match")}}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var r,o=this,a=e(".cms-container").find("iframe");r=function(t){var n,a;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(o).length||n.length||(o.tabs("option","active",!1),a=e(".cms-container").find("iframe"),a.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",r)}),e(document).off("click.ss-ui-action-tabset",r))},e(document).on("click.ss-ui-action-tabset",r),a.length>0&&a.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",r)})},riseUp:function(t,n){var r,o,a,i,s,l,c,u,d;return r=e(this).find(".ui-tabs-panel").outerHeight(),o=e(this).find(".ui-tabs-nav").outerHeight(),a=e(window).height()+e(document).scrollTop()-o,i=e(this).find(".ui-tabs-nav").offset().top,s=n.newPanel,l=n.newTab,i+r>=a&&i-r>0?(this.addClass("rise-up"),null!==l.position()&&(c=-s.outerHeight(),u=s.parents(".toolbar--south"),u&&(d=l.offset().top-u.offset().top,c-=d),e(s).css("top",c+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(s).css("bottom","100%")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},"./client/src/legacy/LeftAndMain.BatchActions.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(3),o=t(r),a=n(4),i=t(a);o.default.entwine("ss.tree",function(t){t("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return t(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},onmatch:function(){var e=this;e.getTree().bind("load_node.jstree",function(t,n){e.refreshSelected()})},onunmatch:function(){this.getTree().unbind("load_node.jstree")},registerDefault:function(){this.register("publish",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}))&&e}),this.register("unpublish",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:e.length}))&&e}),this.register("delete",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to delete these pages?\n\nThese pages and all of their children pages will be deleted and sent to the archive."),{num:e.length}))&&e}),this.register("restore",function(e){return!!confirm(i.default.inject(i.default._t("Admin.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:e.length}))&&e})},onadd:function(){this.registerDefault(),this._super()},register:function(e,t){this.trigger("register",{type:e,callback:t});var n=this.getActions();n[e]=t,this.setActions(n)},unregister:function(e){this.trigger("unregister",{type:e});var t=this.getActions();t[e]&&delete t[e],this.setActions(t)},refreshSelected:function(n){var r=this,o=this.getTree(),a=this.getIDs(),i=[],s=t(".cms-content-batchactions-button"),l=this.find(":input[name=Action]").val();null==n&&(n=o);for(var c in a)t(t(o).getNodeByID(c)).addClass("selected").attr("selected","selected");if(!l||-1==l||!s.hasClass("active"))return void t(n).find("li").each(function(){t(this).setEnabled(!0)});t(n).find("li").each(function(){i.push(t(this).data("id")),t(this).addClass("treeloading").setEnabled(!1)});var u=t.path.parseUrl(l),d=u.hrefNoSearch+"/applicablepages/";d=t.path.addSearchParams(d,u.search),d=t.path.addSearchParams(d,{csvIDs:i.join(",")}),e.getJSON(d,function(o){e(n).find("li").each(function(){t(this).removeClass("treeloading");var e=t(this).data("id");0==e||t.inArray(e,o)>=0?t(this).setEnabled(!0):(t(this).removeClass("selected").setEnabled(!1),t(this).prop("selected",!1))}),r.serializeFromTree()})},serializeFromTree:function(){var e=this.getTree(),t=e.getSelectedIDs();return this.setIDs(t),!0},setIDs:function(e){this.find(":input[name=csvIDs]").val(e?e.join(","):null)},getIDs:function(){var e=this.find(":input[name=csvIDs]").val();return e?e.split(","):[]},onsubmit:function(n){var r=this,o=this.getIDs(),a=this.getTree(),s=this.getActions();if(!o||!o.length)return alert(i.default._t("Admin.SELECTONEPAGE","Please select at least one page")),n.preventDefault(),!1;var l=this.find(":input[name=Action]").val();if(!l)return n.preventDefault(),!1;var c=l.split("/").filter(function(e){return!!e}).pop();if(s[c]&&(o=s[c].apply(this,[o])),!o||!o.length)return n.preventDefault(),!1;this.setIDs(o),a.find("li").removeClass("failed");var u=this.find(":submit:first");return u.addClass("loading"),e.ajax({url:l,type:"POST",data:this.serializeArray(),complete:function(e,t){u.removeClass("loading"),a.jstree("refresh",-1),r.setIDs([]),r.find(":input[name=Action]").val("").change();var n=e.getResponseHeader("X-Status");n&&statusMessage(decodeURIComponent(n),"success"===t?"success":"error")},success:function(e,n){var r,o;if(e.modified){var i=[];for(r in e.modified)o=a.getNodeByID(r),a.jstree("set_text",o,e.modified[r].TreeTitle),i.push(o);t(i).effect("highlight")}if(e.deleted)for(r in e.deleted)o=a.getNodeByID(r),o.length&&a.jstree("delete_node",o);if(e.error)for(r in e.error)o=a.getNodeByID(r),t(o).addClass("failed")},dataType:"json"}),n.preventDefault(),!1}}),t(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var e=t(".cms-tree"),n=t("#Form_BatchActionsForm");this._super(),this.data("active")?(e.addClass("multiple"),e.removeClass("draggable"),n.serializeFromTree()):(e.removeClass("multiple"),e.addClass("draggable")),t("#Form_BatchActionsForm").refreshSelected()}}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(e){var n=t(e.target.form),r=(n.find(":submit"),t(e.target).val()),o=r.split("/"),a=o[o.length-1];t("#Form_BatchActionsForm").refreshSelected();var i=t("#BatchActionParameters_"+a);i.length?(i.find(":input").each(function(){var e=t(this)[0];"SELECT"===e.tagName?(e.selectedIndex=-1,t(this).trigger("chosen:updated")):"checkbox"===e.type?e.checked=e.defaultChecked:e.value=e.defaultValue}),i.siblings().hide(),i.show(),t("#BatchActionParameters").slideDown()):t("#BatchActionParameters").slideUp(),this.trigger("chosen:updated"),this._super(e)}})})}).call(t,n(3))},"./client/src/legacy/LeftAndMain.Content.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-content").entwine({onadd:function(){this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),e(".cms-content .cms-tree").entwine({onadd:function(){var t=this;this._super(),this.bind("select_node.jstree",function(n,r){var o=r.rslt.obj,a=t.find(":input[name=ID]").val(),i=r.args[2],s=e(".cms-container");if(!i)return!1;if(e(o).hasClass("disabled"))return!1;if(e(o).data("id")!=a){var l=e(o).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(o).find("a:first"))&&(l=l=e.path.makeUrlAbsolute(l,e("base").attr("href"))),document.location.search&&(l=e.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),s.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto");var e=parseInt(this.css("padding-top"),10),t=parseInt(this.css("padding-bottom"),10);this.height(this.innerHeight()-e-t)}})})},"./client/src/legacy/LeftAndMain.EditForm.js":function(e,t,n){"use strict";(function(e){function t(e){return e&&e.__esModule?e:{default:e}}var r=n(3),o=t(r),a=n(4),i=t(a),s=window.onbeforeunload;window.onbeforeunload=function(e){var t=(0,o.default)(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges")?i.default._t("Admin.CONFIRMUNSAVEDSHORT"):"function"==typeof s?s():void 0},o.default.entwine("ss",function(e){e(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},ValidationErrorShown:!1,onadd:function(){this.attr("autocomplete","off"),this._setupChangeTracker();for(var e in{action:!0,method:!0,enctype:!0,name:!0}){var t=this.find(":input[name=_form_"+e+"]");t&&(this.attr(e,t.val()),t.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function(){var t=ss.i18n._t("Admin.VALIDATION_ERRORS_IN_TAB","This tab contains validation errors."),n=ss.i18n._t("Admin.VALIDATION_ERRORS_IN_TAB_SCREEN_READER","(Has validation errors)"),r=ss.i18n._t("Admin.VALIDATION_ERRORS_ON_PAGE","There are validation errors on this page, please fix them before saving or publishing."),o=ss.i18n._t("Admin.VALIDATIONERROR","Validation Error"),a=e("#Form_EditForm_error");this.find(".tab-attention, .tab-validation-error-sr").remove();var i=!1;if(this.hasClass("validationerror")&&(i=!0),""!==a.html()&&(i=!0),this.find(".alert.error").length>0&&(i=!0),!i)return void a.hide();!this.getValidationErrorShown()&&this.hasClass("validationerror")&&(l(o),this.setValidationErrorShown(!0));var s=this.find(".tab-pane .alert-danger, .tab-pane .alert.error").closest(".tab-pane");if(s.length){var c=s.closest(".tab-content").closest(".ss-tabset");c.length&&(s.each(function(r){var o=s.eq(r).attr("id"),a=c.find("#tab-"+o).closest("li"),i=e(' '),l=e(''+n+" ");a.append(i),a.append(l)}),a.attr("class","alert alert-danger"),a.html(r),a.show()),this.addClass("validationerror")}}},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function(){if(this.trigger("beforesubmitform"),!this.is(".changed")||this.is(".discardchanges"))return!0;if(this.find(".btn-toolbar :submit.btn--loading.loading").length>0)return!0;var e=confirm(i.default._t("Admin.CONFIRMUNSAVED"));return e&&this.addClass("discardchanges"),e},onsubmit:function(e,t){if("_blank"!=this.prop("target"))return t&&this.closest(".cms-container").submitForm(this,t),!1},validate:function(){return this.trigger("validate",{isValid:!0}),!0},"from .htmleditor":{oneditorinit:function(t){var n=this,r=e(t.target).closest(".field.htmleditor");r.find("textarea.htmleditor").getEditor().getInstance().onClick.add(function(e){n.saveFieldFocus(r.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(t){this.saveFieldFocus(e(t.target).attr("id"))},onfocus:function(t){this.saveFieldFocus(e(t.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(t){var n=e(t.target).closest(".field.treedropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function(t){var n=e(t.target).closest(".field.dropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(t){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var n=e(this).attr("id"),r=[];if(r.push({id:n,selected:t}),r)try{window.sessionStorage.setItem(n,JSON.stringify(r))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}},restoreFieldFocus:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var t,n,r,o,a,i=this,s=void 0!==window.sessionStorage&&window.sessionStorage,l=s?window.sessionStorage.getItem(this.attr("id")):null,c=!!l&&JSON.parse(l),u=0!==this.find(".ss-tabset").length;if(s&&c.length>0){if(e.each(c,function(n,r){i.is("#"+r.id)&&(t=e("#"+r.selected))}),e(t).length<1)return void this.focusFirstInput();if(n=e(t).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),r="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),u&&r!==n)return;o=e(t).closest(".togglecomposite"),o.length>0&&o.accordion("activate",o.find(".ui-accordion-header")),a=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),a=e(t).position().top),e(t).focus(),a>e(window).height()/2&&i.find(".cms-content-fields").scrollTop(a)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),e(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function(e){return this.is(":disabled")?(e.preventDefault(),!1):!1===this._super(e)||e.defaultPrevented||e.isDefaultPrevented()?void 0:(this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),e(".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel").entwine({onclick:function(e){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]),e.preventDefault()}}),e(".cms-edit-form .btn-toolbar button[name=action_doUnpublish].btn.action").entwine({onclick:function(e){var t=this.data("owners");if(t&&parseInt(t)>0){var n=[i.default.inject(i.default._t("Admin.OWNED_WARNING_1","You are unpublishing content that is being used in {count} other published section(s)."),{count:t}),i.default._t("Admin.OWNED_WARNING_2","This could cause a published page to have missing components on the live site."),i.default._t("Admin.OWNED_WARNING_3","Do you want to unpublish anyway?")];window.confirm(n.join("\n\n"))?this._super():e.preventDefault()}else this._super()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var e=this.find("> ul:first");1==e.children("li").length&&e.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}}),e('.cms-edit-form [name="CanViewType"], .cms-edit-form [name="CanEditType"], .cms-edit-form [name="CanCreateTopLevelType"]').entwine({onmatch:function(){"OnlyTheseUsers"===this.val()&&(this.is(":checked")?this.showList(!0):this.hideList(!0))},onchange:function(e){"OnlyTheseUsers"===e.target.value?this.showList():this.hideList()},showList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");t.addClass("field--merge-below"),e?n.show().css("overflow","visible"):n.slideDown(function(){n.css("overflow","visible")})},hideList:function(e){var t=this.closest(".field"),n=t.next().filter(".listbox, .treedropdown, .treemultiselect");n.css("overflow","hidden"),e?(n.hide().css("display","none"),t.removeClass("field--merge-below")):n.slideUp(function(){t.removeClass("field--merge-below")})}})});var l=function(t){e.noticeAdd({text:t,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(t,n(3))},"./client/src/legacy/LeftAndMain.FieldDescriptionToggle.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function(){var e=!1,t=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),n=this.find(".cms-description-trigger"),r=this.find(".description");this.hasClass("description-toggle-enabled")||(0===n.length&&(n=this.find(".middleColumn").first().after(' ').next()),this.addClass("description-toggle-enabled"),n.on("click",function(){r[e?"hide":"show"](),e=!e}),r.hide())}})})},"./client/src/legacy/LeftAndMain.FieldHelp.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var e=this.find(".description");e.length&&(this.attr("title",e.text()).tooltip({content:e.html()}),e.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},"./client/src/legacy/LeftAndMain.Menu.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,r){e(".cms-menu__list").children("li").each(function(){t?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"),e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)})}),this.toggleFlyoutState(t),this._super(t,n,r)},toggleFlyoutState:function(t){if(t)e(".collapsed").find("li").show(),e(".cms-menu__list").find(".child-flyout-indicator").hide();else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()});var n=e(".cms-menu__list ul.collapsed-flyout").parent();0===n.children(".child-flyout-indicator").length&&n.append(' ').fadeIn(),n.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&void 0!==(n=e.cookie("cms-menu-sticky"))&&null!==n&&(t="true"===n),t},setPersistedStickyState:function(t){void 0!==e.cookie&&e.cookie("cms-menu-sticky",t,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var t=this.getPersistedCollapsedState(),n=e(".cms-menu").getPersistedStickyState(),r=this.siteTreePresent();return void 0===t?r:t!==r&&n?t:r},onadd:function(){var t=this;setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),e(".cms-menu__list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(e){var t=e.getResponseHeader("X-Controller");if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function(e,t){this.updateMenuFromResponse(t.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(t){this.toggleClass("collapsed",e(t.target).hasClass("collapsed")),e(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||e(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function(){var t=this.find("#Menu-CMSMain");t[t.is(".current")?"show":"hide"]();var n=e(".cms-content input[name=ID]").val();n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(n)})}}),e(".cms-menu__list li").entwine({toggleFlyout:function(t){var n=e(this);if(n.children("ul").first().hasClass("collapsed-flyout"))if(t){if(!n.children("ul").first().children("li").first().hasClass("clone")){var r=n.clone();r.addClass("clone").css({}),r.children("ul").first().remove(),r.find("span").not(".text").remove(),r.find("a").first().unbind("click"),n.children("ul").prepend(r)}e(".collapsed-flyout").show(),n.addClass("opened"),n.children("ul").find("li").fadeIn("fast")}else r&&r.remove(),e(".collapsed-flyout").hide(),n.removeClass("opened"),n.find("toggle-children").removeClass("opened"),n.children("ul").find("li").hide()}}),e(".cms-menu__list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu__list .toggle").entwine({onclick:function(t){t.preventDefault(),e(this).toogleFlyout(!0)}}),e(".cms-menu__list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append(' '),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var e=this.getMenuItem();e&&e.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function(){var e=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings();e.addClass("current"),t.removeClass("current").close(),t.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu__list *").entwine({getMenu:function(){return this.parents(".cms-menu__list:first")}}),e(".cms-menu__list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),e(".cms-menu__list li a").entwine({onclick:function(t){var n=e.path.isExternal(this.attr("href"));if(!(t.which>1||n)&&"_blank"!=this.attr("target")){t.preventDefault();var r=this.getMenuItem(),o=this.attr("href");n||(o=e("base").attr("href")+o);var a=r.find("li");a.length?a.first().find("a").click():document.location.href=o,r.select()}}}),e(".cms-menu__list li .toggle-children").entwine({onclick:function(e){return this.closest("li").toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu__list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle__button").entwine({onadd:function(){var t=!!e(".cms-menu").getPersistedStickyState();this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function(e){this.next(".sticky-toggle__status").text(e?"fixed":"auto")},onclick:function(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),r=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&!1===r&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(r),this.toggleCSS(r),this.toggleIndicator(r),this._super()}}),e(".cms-help__menu").entwine({onclick:function(){var t="true"===this.attr("aria-expanded");this.attr("aria-expanded",!t),e(".cms-help__toggle").toggleClass("cms-help__toggle--show")}})})},"./client/src/legacy/LeftAndMain.MobileMenuToggle.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n("./client/src/components/MobileMenuToggle/MobileMenuToggleContainer.js"),s=r(i),l=n("./client/src/state/mobileMenu/MobileMenuActions.js"),c=n(8),u=r(c);a.default.entwine("ss",function(e){e(".js-react-boot").entwine({onmatch:function(){var t=e(".cms-mobile-menu-toggle-wrapper");t.length>0&&u.default.render(React.createElement(s.default,{store:window.ss.store,controls:"cms-menu"}),t[0]);var n=window.ss.store,r=e(".cms-menu"),o=e(".cms-menu-mobile-overlay");n.subscribe(function(){var e=n.getState(),t=e.mobileMenu.isOpen;r.toggleClass("cms-menu--open",t).attr("aria-expanded",t),o.attr("aria-expanded",t)})}}),e(".cms-menu-mobile-overlay").entwine({onclick:function(){window.ss.store.dispatch((0,l.closeMobileMenu)())}})})},"./client/src/legacy/LeftAndMain.Panel.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==e.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var t,n;return this.canSetCookie()&&void 0!==(n=e.cookie("cms-panel-collapsed-"+this.attr("id")))&&null!==n&&(t="true"===n),t},setPersistedCollapsedState:function(t){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),t,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var e=this.getPersistedCollapsedState();return void 0===e&&(e=this.hasClass("collapsed")),e},onadd:function(){var t,n;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(n=e("
").append('» ').append('« '),this.append(n)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),t=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(t.length?t.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(e,t,n){var r,o;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),r=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(r),o=this.find(".cms-panel-content-collapsed"),o.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),!1!==n&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")},expandPanel:function(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(e){!e&&this.hasClass("collapsed")||this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},"./client/src/legacy/LeftAndMain.Preview.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n(4),s=r(i);a.default.entwine("ss.preview",function(e){e(".cms-preview").entwine({AlreadyInitialised:!1,AllowedStates:["StageLink","LiveLink","Unversioned","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(t,n){var r=this,o=this._getNavigatorStates();return!1!==n&&e.each(o,function(e,n){r.saveState("state",t)}),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var r=e(".cms-container").entwine(".ss");if("split"==t)r.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)r.contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;r.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return!1!==n&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){return this.getSizes(),this.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);var n=e(".cms-container").entwine(".ss").getLayoutOptions();return n&&e(".preview-mode-selector").changeVisibleMode(n.mode),this.getCurrentSizeName()&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+e)},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),this.changeMode(this.getDefaultMode(),!1)),this},onadd:function(){var t=this,n=this.find("iframe");n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),this._unblock(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var e,t,n=new Date;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(e){console.warn("localStorge is not available due to current browser / system settings.")}},onforcecontent:function(){this.changeMode("content",!1)},onenable:function(){var t=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.find(".preview-note").show(),this},_unblock:function(){return this.find(".preview-note").hide(),this},_initialiseFromContent:function(){var t,n;if(e(".cms-previewable").length){t=this.loadState("mode"),n=this.loadState("size");var r=!0;this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw();var o=this.find("iframe").attr("src");this.getPendingURL()||o&&"about:blank"!==o||(t="content",r=!1),t&&this.changeMode(t,r),n&&this.changeSize(n)}else this.disablePreview();return this.setAlreadyInitialised(!0),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){return e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("href"),active:n.hasClass("active")}:null})},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),r=null;t&&(r=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var o=null;if(r[0]?o=r[0].url:t.length?(this.setCurrentStateName(t[0].name),o=t[0].url):this.setCurrentStateName(null),o){var a=o.split("#"),i=a.shift().split(/[?&]/),s=i.shift();i.push("CMSPreview=1"),a=a.length?"#"+a.join("#"):"",o=s+"?"+i.join("&")+a}return this.is(".column-hidden")?(this.setPendingURL(o),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),o?(this._loadUrl(o),this._unblock()):(this._loadUrl("about:blank"),this._block())),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls");e(".cms-edit-form .cms-navigator").length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t;e(".cms-container");try{t=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(t){var n=e(t).find("meta[name=x-page-id]").attr("content"),r=e(t).find("meta[name=x-cms-edit-link]").attr("content"),o=e(".cms-content");n&&o.find(":input[name=ID]").val()!=n&&e(".cms-container").entwine(".ss").loadPanel(r)}}},_adjustIframeForPreview:function(){var e,t=this.find("iframe")[0];if(t){try{e=t.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(e){for(var n=e.getElementsByTagName("A"),r=0;r'):this.parent().append('
')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})})},"./client/src/legacy/LeftAndMain.Tree.js":function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,a){try{var i=t[o](a),s=i.value}catch(e){return void n(e)}if(!i.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}var o=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(o).default.entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,CanMoveCheckCompleted:!1,IsLoaded:!1,onadd:function(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));var n=function t(n,o){var a=o.rslt.o,i=o.rslt.np,s=e(i).data("id")||0,l=e(a).data("id"),c=e.map(e(a).siblings().andSelf(),function(t){return e(t).data("id")});if(!r.getIsUpdatingTree()){if(!r.getCanMoveCheckCompleted())return void r.canMove(o).then(function(a){a?(r.setCanMoveCheckCompleted(!0),t(n,o)):e.jstree.rollback(o.rlbk)});r.setCanMoveCheckCompleted(!1),e.ajax({url:e.path.addSearchParams(r.data("urlSavetreenode"),r.data("extraParams")),type:"POST",data:{ID:l,ParentID:s,SiblingIDs:c},success:function(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(s),r.updateNodesFromServer([l])},statusCode:{403:function(){e.jstree.rollback(o.rlbk)}}})}},r=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,n){r.setIsLoaded(!0),n.inst._set_settings({html_data:{ajax:{url:r.data("urlTree"),data:function(t){var n=r.data("searchparams")||[];return n=e.grep(n,function(e,t){return"ID"!=e.name&&"value"!=e.name}),n.push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),n.push({name:"ajax",value:1}),n}}}}),r.updateFromEditForm(),r.css("visibility","visible"),n.inst.hide_checkboxes()}).bind("before.jstree",function(t,n){if("start_drag"==n.func&&(!r.hasClass("draggable")||r.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(n.func,["check_node","uncheck_node"])){var o=e(n.args[0]).parents("li:first"),a=o.find("li:not(.disabled)");if(o.hasClass("disabled")&&0==a)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",n).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(t){var n=this,r=e(".cms-edit-form :input[name=ID]").val(),o=this.find("[data-id="+r+"]"),a=[+r];o.find("li").each(function(){a.push(e(this).data("id"))});for(var i=[];a.length;){var s=a.slice(0,50);i.push(s),a=a.slice(50)}i.map(function(e){return n.updateNodesFromServer(e,!1)}).reduce(function(e,t){return e.then(t)},Promise.resolve())}},canMove:function(){function e(e){return t.apply(this,arguments)}var t=r(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve(!0));case 1:case"end":return e.stop()}},e,this)}));return e}(),getTreeConfig:function(){var t=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(n){var r=e(n.o),o=e(n.np),a=n.ot.get_container()[0]==n.np[0],i=r.getClassname(),s=o.getClassname(),l=t.getHints(),c=[],u=s||"Root",d=l&&void 0!==l[u]?l[u]:null;return d&&r.attr("class").match(/VirtualPage-([^\s]*)/)&&(i=RegExp.$1),d&&(c=void 0!==d.disallowedChildren?d.disallowedChildren:[]),!(0===r.data("id")||r.hasClass("status-archived")||a&&"inside"!=n.p||o.hasClass("nochildren")||c.length&&-1!=e.inArray(i,c))}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/admin/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function(e){return this.find("*[data-id="+e+"]")},createNode:function(t,n,r){var o=this,a=void 0!==n.ParentID&&o.getNodeByID(n.ParentID),i=e(t),s={data:""};i.hasClass("jstree-open")?s.state="open":i.hasClass("jstree-closed")&&(s.state="closed"),this.jstree("create_node",a.length?a:-1,"last",s,function(e){for(var t=e.attr("class"),n=0;n/g,"");var o=e(n),a=!!r.NextID&&this.getNodeByID(r.NextID),i=!!r.PrevID&&this.getNodeByID(r.PrevID),s=!!r.ParentID&&this.getNodeByID(r.ParentID),l=this.jstree("is_open",s);e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,o.attr(n))});var c=t.children("ul").detach();t.html(o.html()).append(c),a&&a.length?this.jstree("move_node",t,a,"before"):i&&i.length?this.jstree("move_node",t,i,"after"):this.jstree("move_node",t,s.length?s:-1),l?this.jstree("open_node",s):this.jstree("close_node",s)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.getIsLoaded()&&(!r||!this.getIsUpdatingTree())){var o=this;this.setIsUpdatingTree(!0),o.jstree("save_selected"),o.jstree("open_node",this.getNodeByID(0)),o.jstree("save_opened"),o.jstree("save_selected");var a=o.jstree("get_selected");return new Promise(function(r){e.ajax({url:e.path.addSearchParams(n.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(n,i){r(n),e.each(n,function(e,n){var r=o.getNodeByID(e);if(!n)return void o.jstree("delete_node",r);r.length?o.updateNode(r,n.html,n):n.ParentID&&!o.find("li[data-id="+n.ParentID+"]").length?o.jstree("load_node",-1):o.createNode(n.html,n,function(e){a.length||1!==t.length||(a=e)})}),a.length&&(o.jstree("deselect_all"),o.jstree("reopen"),o.jstree("select_node",a))},complete:function(){o.setIsUpdatingTree(!1)}})})}}}),e(".cms-tree.multiple").entwine({onmatch:function(){this._super(),this.jstree("show_checkboxes")},onunmatch:function(){this._super(),this.jstree("uncheck_all"),this.jstree("hide_checkboxes")},getSelectedIDs:function(){return e(this).jstree("get_checked").not(".disabled").map(function(){return e(this).data("id")}).get()}}),e(".cms-tree li").entwine({setEnabled:function(e){this.toggleClass("disabled",!e)},getClassname:function(){var e=this.attr("class").match(/class-([^\s]*)/i);return e?e[1]:""},getID:function(){return this.data("id")}})})},"./client/src/legacy/LeftAndMain.TreeDropdownField.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},"./client/src/legacy/LeftAndMain.js":function(module,exports,__webpack_require__){"use strict";(function(jQuery){function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _extends=Object.assign||function(e){for(var t=1;t399?"error":"success",l=["OK","success","HTTP/2.0 200"];if(null===o||isSameUrl(r,o)&&isSameUrl(a,o)||window.ss.router.show(o,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:t.getResponseHeader("X-Pjax")?t.getResponseHeader("X-Pjax"):n.headers["X-Pjax"]}),t.getResponseHeader("X-Reauthenticate"))return void $(".cms-container").showLoginDialog();0!==t.status&&i&&-1===$.inArray(i,l)&&statusMessage(decodeURIComponent(i),s),ajaxCompleteEvent(this)}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){if($.browser.msie&&parseInt($.browser.version,10)<8)return $(".ss-loading-screen").append('Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.
').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super();this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),this._super()},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},updateLayoutOptions:function(e){var t=this.getLayoutOptions(),n=!1;for(var r in e)t[r]!==e[r]&&(t[r]=e[r],n=!0);n&&this.redraw()},clearViewMode:function(){this.removeClass("cms-container--split-mode"),this.removeClass("cms-container--preview-mode"),this.removeClass("cms-container--content-mode")},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.setProperMode()||(this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw()))},setProperMode:function(){var e=this.getLayoutOptions(),t=e.mode;this.clearViewMode();var n=this.find(".cms-content"),r=this.find(".cms-preview");if(n.css({"min-width":0}),r.css({"min-width":0}),n.width()+r.width()>=e.minContentWidth+e.minPreviewWidth)n.css({"min-width":e.minContentWidth}),r.css({"min-width":e.minPreviewWidth}),r.trigger("enable");else if(r.trigger("disable"),"split"==t)return r.trigger("forcecontent"),!0;return this.addClass("cms-container--"+t+"-mode"),!1},checkCanNavigate:function(e){var t=this._findFragments(e||["Content"]),n=t.find(":data(changetracker)").add(t.filter(":data(changetracker)")),r=!0;return!n.length||(n.each(function(){$(this).confirmUnsavedChanges()||(r=!1)}),r)},loadPanel:function(e){var t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n=arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document.URL;this.checkCanNavigate(t.pjax?t.pjax.split(","):["Content"])&&(this.saveTabState(),t.__forceReferer=r,n&&(t.__forceReload=1+Math.random()),window.ss.router.show(e,t))},reloadCurrentPanel:function(){this.loadPanel(document.URL,null,null,!0)},submitForm:function(e,t,n,r){var o=this;t||(t=this.find(".btn-toolbar :submit[name=action_save]")),t||(t=this.find(".btn-toolbar :submit:first")),e.trigger("beforesubmitform"),this.trigger("submitform",{form:e,button:t}),$(t).addClass("btn--loading loading"),$(t).prop("disabled",!0),$(t).is("button")&&($(t).data("original-text",$(t).text()),$(t).append($('
')),$(t).css($(t).outerWidth()+"px"));var a=e.validate(),i=function(){$(t).removeClass("btn--loading loading"),$(t).prop("disabled",!1),$(t).find(".btn__loading-icon").remove(),$(t).css("width","auto"),$(t).text($(t).data("original-text"))};void 0===a||a||(statusMessage("Validation failed.","bad"),i());var s=e.serializeArray();return s.push({name:$(t).attr("name"),value:"1"}),s.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:e.attr("action"),data:s,type:"POST",complete:function(){i()},success:function(t,r,a){i(),e.removeClass("changed"),n&&n(t,r,a);var l=o.handleAjaxResponse(t,r,a);l&&l.filter("form").trigger("aftersubmitform",{status:r,xhr:a,formData:s})}},r)),!1},LastState:null,PauseState:!1,handleStateChange:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.history.state;if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var r=this,o=n.pjax||"Content",a={},i=o.split(","),s=this._findFragments(i);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate())return void this.reverseStateChange();if(s.length=0})),r.removeClass(a.join(" ")).addClass(s.join(" ")),o&&r.attr("style",o);var l=r.find("style").detach();l.length&&$(document).find("head").append(l),n.replaceWith(r)});var p=d.filter("form");p.hasClass("cms-tabset")&&p.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(r&&void 0!==r.tabState?r.tabState:null),d}},_findFragments:function(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ");for(t in e)if(-1!=$.inArray(e[t],n))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){var e=[],t=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(t,n){var r=$(n).attr("id");r&&$(n).data("tabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:r,selected:$(n).tabs("option","selected")}))}),e){var n="tabs-"+t;try{window.sessionStorage.setItem(n,JSON.stringify(e))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw e}}}},restoreTabState:function(e){var t=this,n=this._tabStateUrl(),r=void 0!==window.sessionStorage&&window.sessionStorage,o=r?window.sessionStorage.getItem("tabs-"+n):null,a=!!o&&JSON.parse(o),i=this.find(".cms-tabset, .ss-tabset");i.length?i.each(function(){var n,r,o=$(this),i=o.attr("id"),s=o.children("ul").children("li.ss-tabs-force-active");o.data("tabs")&&(o.tabs("refresh"),s.length?n=s.first().index():e&&e[i]?(r=o.find(e[i].tabSelector),r.length&&(n=r.index())):a&&$.each(a,function(e,t){i==t.id&&(n=t.selected)}),null!==n&&(o.tabs("option","active",n),t.trigger("tabstaterestored")))}):$("#Form_AddForm_action_doAdd").focus()},clearTabState:function(e){if(void 0!==window.sessionStorage){var t=window.sessionStorage;if(e)t.removeItem("tabs-"+e);else for(var n=0;n '),$("body").append(e),e.open()}}),$(".leftandmain__login-dialog").entwine({destroy:function(){this.close(),this.remove()},close:function(){this.renderModal(!1)},open:function(){this.renderModal(!0)},renderModal:function(e){var t=$("body").data("member-tempid"),n=$.path.addSearchParams("CMSSecurity/login",{tempid:t,BackURL:window.location.href});_reactDom2.default.render(_react2.default.createElement(_IframeDialog2.default,{title:i18n._t("Admin.CMS_LOGIN_TITLE","Login"),className:"login-dialog",bodyClassName:"login-dialog__body",iframeId:"login-dialog-iframe",iframeClassName:"login-dialog__body__iframe",isOpen:e,url:n}),this[0])},reauthenticate:function(e){void 0!==e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),void 0!==e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading,.ss-gridfield-item.loading").entwine({onmatch:function(){this._super();var e=$('
');this.append(e),_reactDom2.default.render(_react2.default.createElement(_Loading2.default,null),e[0])},onunmatch:function(){this._super();var e=this.find(".cms-loading-container");e&&e.length&&(_reactDom2.default.unmountComponentAtNode(e[0]),e.remove())}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),r={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,r),e.preventDefault()}}),$(".cms button.action.discard-confirmation").entwine({onclick:function(e){$(".cms-container").checkCanNavigate()||e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$(" ").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href||this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{void 0!==msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var e="ss-ui-dialog-"+this.getUUID(),t=$("#"+e);t.length||(t=$('
'),$("body").append(t));var n=this.data("popupclass")?this.data("popupclass"):"";return t.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:n}),!1}}),$(".cms .field.date input.text").entwine({onmatch:function(){var e=$(this).parents(".field.date:first"),t=e.data();if(!t.showcalendar)return void this._super();t.showOn="button",t.locale&&$.datepicker.regional[t.locale]&&(t=$.extend(t,$.datepicker.regional[t.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(t),this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){if(this.is(".no-chosen"))return void this._super();this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),this._super()},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field:not([cms-loading-ignore-url-params])").entwine({showDetailView:function(e){$(".cms-container").loadPanel(e)}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var t=$(this).parents("form");t.clearForm(),t.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),t.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var e=this,t=this.data("url");if(!t)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.data("deferredNoCache")||void 0===window._panelDeferredCache[t]?(this.addClass("loading"),$.ajax({url:t,complete:function(){e.removeClass("loading")},success:function(t,n,r){e.html(t)}})):this.html(window._panelDeferredCache[t])}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var e=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("tabs")||this.tabs({active:-1!=e.index()?e.index():0,beforeLoad:function(e,t){return!1},beforeActivate:function(e,t){var n=t.oldTab.find(".cms-panel-link");if(n&&1===n.length)return!1},activate:function(e,t){var n=$(this).closest("form").find(".btn-toolbar");$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");n?(this.addClass("active"),t.removeClass("cms-content-filters--hidden")):(this.removeClass("active"),t.addClass("cms-content-filters--hidden")),e.data("collapsed",!n)},onclick:function(){this.showHide()}}),$(".js-injector-boot .search-holder").entwine({Component:null,onmatch:function(){this._super();var e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,_Injector.loadComponent)("Search",t);this.setComponent(n),this.refresh(),this.data("schema")},onunmatch:function(){this._super();var e=this[0];e&&_reactDom2.default.unmountComponentAtNode(e)},onfocusin:function(){this.css("z-index","100")},onfocusout:function(){this.css("z-index","")},close:function(){if($("#filters-button").showHide(),this.data("schema").filters){var e=$(".cms-search-form").attr("action");this.closest(".cms-container").loadPanel(e,"",{},!0)}},search:function(e){this._super();var t=$(".cms-search-form").attr("action");if(t&&e){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=Object.entries(e)[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value,c=_slicedToArray(l,2),u=c[0],d=c[1];d&&(n["q["+u+"]"]=d)}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}0===Object.keys(n).length&&(n["q["+this.data("schema").name+"]"]=""),t=$.path.addSearchParams(t,n),$(".cms-panel-deferred.cms-content-view").data("deferredNoCache",!0),this.closest(".cms-container").loadPanel(t,"",{},!0)}},refresh:function(){var e=this,t=this.data("schema"),n=this.getComponent(),r=function(){return e.close()},o=function(t){return e.search(t)},a="cms-content-tools-CMSMain"===this.closest(".cms-content-tools").attr("id");_reactDom2.default.render(_react2.default.createElement(n,_extends({id:"Search",identifier:"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:r,onSearch:o,borders:{left:!a}},t)),this[0])}})});var statusMessage=function(e,t){e=jQuery("
").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(exports,__webpack_require__(3))},"./client/src/legacy/ModelAdmin.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./client/src/legacy/LeftAndMain.js"),o.default.entwine("ss",function(e){e(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function(e){this.trigger("beforeSubmit")}}),e(".importSpec").entwine({onmatch:function(){this.find("div.details").hide(),this.find("a.detailsLink").click(function(){return e("#"+e(this).attr("href").replace(/.*#/,"")).slideToggle(),!1}),this._super()},onunmatch:function(){this._super()}}),e(".cms .btn.clear-search").entwine({onclick:function(e){e.preventDefault(),this.parents(".cms-container").loadPanel(this.attr("href"),"",{},!0,!1)}})})},"./client/src/legacy/PermissionCheckboxSetField.js":function(e,t,n){"use strict";var r=n(3);(function(e){return e&&e.__esModule?e:{default:e}})(r).default.entwine("ss",function(e){e(".permissioncheckboxset .valADMIN input").entwine({onmatch:function(){this._super()},onunmatch:function(){this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=e(this).parents(".field:eq(0)").find(".checkbox").not(this);e(this).is(":checked")?t.each(function(){e(this).data("SecurityAdmin.oldChecked",e(this).attr("checked")),e(this).data("SecurityAdmin.oldDisabled",e(this).attr("disabled")),e(this).attr("disabled","disabled"),e(this).attr("checked","checked")}):t.each(function(){var t=e(this).data("SecurityAdmin.oldChecked"),n=e(this).data("SecurityAdmin.oldDisabled");null!==t&&e(this).attr("checked",t),null!==n&&e(this).attr("disabled",n)})}}),e(".permissioncheckboxset .valCMS_ACCESS_LeftAndMain input").entwine({getCheckboxesExceptThisOne:function(){return e(this).parents(".field:eq(0)").find("li").filter(function(t){var n=e(this).attr("class");return!!n&&n.match(/CMS_ACCESS_/)}).find(".checkbox").not(this)},onadd:function(){this.toggleCheckboxes(),this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=this.getCheckboxesExceptThisOne();e(this).is(":checked")?t.each(function(){e(this).data("PermissionCheckboxSetField.oldChecked",e(this).is(":checked")),e(this).data("PermissionCheckboxSetField.oldDisabled",e(this).is(":disabled")),e(this).prop("disabled","disabled"),e(this).prop("checked","checked")}):t.each(function(){e(this).prop("checked",e(this).data("PermissionCheckboxSetField.oldChecked")),e(this).prop("disabled",e(this).data("PermissionCheckboxSetField.oldDisabled"))})}})})},"./client/src/legacy/SecurityAdmin.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./client/src/legacy/LeftAndMain.js"),n("./client/src/legacy/PermissionCheckboxSetField.js");var a=function(e){var t=(0,o.default)((0,o.default)(this).contents()).find(".message");if(t&&t.html()){var n=(0,o.default)(window.parent.document).find("#Form_EditForm_Members").get(0);n&&n.refresh();var r=(0,o.default)(window.parent.document).find(".cms-tree").get(0);r&&r.reload()}};(0,o.default)("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function(){this._super(),(0,o.default)(this).bind("load",a)}}),o.default.entwine("ss",function(e){e(".permissioncheckboxset .checkbox[value=ADMIN]").entwine({onadd:function(){this.toggleCheckboxes(),this._super()},onclick:function(e){this.toggleCheckboxes()},toggleCheckboxes:function(){var t=this.parents(".field:eq(0)").find(".checkbox").not(this);this.is(":checked")?t.each(function(){e(this).data("SecurityAdmin.oldChecked",e(this).is(":checked")),e(this).data("SecurityAdmin.oldDisabled",e(this).is(":disabled")),e(this).prop("disabled",!0),e(this).prop("checked",!0)}):t.each(function(){e(this).prop("checked",e(this).data("SecurityAdmin.oldChecked")),e(this).prop("disabled",e(this).data("SecurityAdmin.oldDisabled"))})}})})},"./client/src/legacy/SelectionGroup.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);(0,o.default)(document).ready(function(){(0,o.default)("ul.SelectionGroup input.selector, ul.selection-group input.selector").live("click",function(){var e=(0,o.default)(this).closest("li");e.addClass("selected");var t=e.prevAll("li.selected");t.length&&t.removeClass("selected");var n=e.nextAll("li.selected");n.length&&n.removeClass("selected"),(0,o.default)(this).focus()})})},"./client/src/legacy/TabSet.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./thirdparty/jquery-ui/jquery-ui.js"),n("./thirdparty/jquery-cookie/jquery.cookie.js"),n("./thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),o.default.entwine("ss",function(e){e(".ss-tabset, .cms-tabset").entwine({onmatch:function(){var e=window.location.hash;""!==e&&this.openTabFromURL(e),this._super()},onadd:function(){this.on("tabsactivate",function(e,t){var n=t.newPanel;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this.on("tabscreate",function(e,t){var n=t.panel;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this._super()},triggerLazyLoad:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".lazy-loadable";t.find(r).each(function(t,r){var o=e(r),a=r.dataset.lazyEvent||"lazyload";o.closest(".ss-tabset, .cms-tabset").is(n)&&r.dispatchEvent(new Event(a))})},lazyLoadGridFields:function(t){var n=this;t.find(".grid-field--lazy-loadable").each(function(t,r){e(r).closest(".ss-tabset, .cms-tabset").is(n)&&e(r).lazyload()})},openTabFromURL:function(t){var n;e.each(this.find(".ui-tabs-anchor"),function(){if(-1!==this.href.indexOf(t)&&1===e(t).length)return n=e(this),!1}),void 0!==n&&e(function(){n.click()})}}),e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){e(this).hasClass("ss-tabset")?(this.rewriteHashlinks(),this.tabs()):this._super()},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}}),e(".ui-tabs-active .ui-tabs-anchor").entwine({onmatch:function(){this.addClass("nav-link active")},onunmatch:function(){this.removeClass("active")}})})},"./client/src/legacy/ToastsContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=n(3),a=r(o),i=n(0),s=r(i),l=n(8),c=r(l),u=n(10),d=r(u),f=n(37),p=(0,u.loadComponent)("ToastsContainer");a.default.entwine("ss",function(e){e("body").entwine({onmatch:function(){var t=e('
');this.append(t),c.default.render(s.default.createElement(p,null),t[0])}})}),function(e){e.extend({noticeAdd:function(e){d.default.ready(function(){(0,d.default.reducer.store.dispatch)((0,f.display)(e))})}})}(a.default)},"./client/src/legacy/ToggleCompositeField.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r);n("./thirdparty/jquery-ui/jquery-ui.js"),o.default.entwine("ss",function(e){e(".ss-toggle").entwine({onadd:function(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0})},onremove:function(){this.data("accordion")&&this.accordion("destroy"),this._super()},getTabSet:function(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function(){this.accordion("resize")}}})})},"./client/src/legacy/TreeDropdownField/TreeDropdownFieldEntwine.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var o=Object.assign||function(e){for(var t=1;t1)return this.each(function(e,n){this.changetracker(t)}),this;this.defaults={fieldSelector:':input:not(:button,[type="submit"],[type="search"],.gridstate)',ignoreFieldSelector:'.no-change-track,[type="search"]',changedCssClass:"changed"};var o=e.extend({},this.defaults,t);if(this.initialize=function(){e.meta&&(o=e.extend({},o,this.data())),n.data("dirty",!1);var t=function(t){if(t.is(":radio")){var r=n.find(":input[name="+t.attr("name")+"]:checked");return r.length?r.val():0}if(t.is(":checkbox"))return t.is(":checked")?1:0;var o=t.val();if(t&&t.hasClass("htmleditor"))switch(t.data("editor")||"default"){case"tinyMCE":case"default":var a=e.extend({forced_root_block:"p"},t.data("config")),i=tinymce.html.Serializer(a),s=tinymce.html.DomParser(a);o=i.serialize(s.parse(o))}return o},a=function(){var r=[];return n.getFields().each(function(){var n=e(this).prop("name");n&&r.push({name:n,value:t(e(this))})}),JSON.stringify(r)},i=a(),s=function(){var e=a();return n.data("dirty")||i!==e},l=function(t){if(!t||!e(t.target).is(o.ignoreFieldSelector)){var r=s();n.toggleClass(o.changedCssClass,r)}},c=function(r){var a=e(r.target),i=a.data("changetracker.origVal");if(!a.is(o.ignoreFieldSelector)){var s=t(a);null===i||s!==i?(a.addClass(o.changedCssClass),n.addClass(o.changedCssClass)):(a.removeClass(o.changedCssClass),a.is(":radio")&&n.find(":radio[name="+a.attr("name")+"]").removeClass(o.changedCssClass),u())}},u=(0,r.default)(l,250,{leading:!0,trailing:!0}),d=(0,r.default)(c,250,{leading:!0,trailing:!0});n.on("click.changetracker",o.fieldSelector,d),n.on("keyup.changetracker",o.fieldSelector,d),n.on("change.changetracker",o.fieldSelector,d),n.on("change.changetracker",u),this.getFields().each(function(){var n=t(e(this));e(this).data("changetracker.origVal",n)}),n.on("dirty.changetracker",function(){n.data("dirty",!0),u()}),this.data("changetracker",!0)},this.destroy=function(){this.reset(),this.off(".changetracker").removeData("changetracker")},this.reset=function(){this.getFields().each(function(){n.resetField(this)}),this.data("dirty",!1).removeClass(o.changedCssClass)},this.resetField=function(t){return e(t).removeData("changetracker.origVal").removeClass(o.changedCssClass)},this.getFields=function(){return this.find(o.fieldSelector).not(o.ignoreFieldSelector+", .search-box *")},"string"==typeof arguments[0]){var a=(arguments[1],Array.prototype.slice.call(arguments));return a.splice(0,1),this[arguments[0]].apply(this,a)}var n=this;return setTimeout(function(){n.initialize()},0),this}}(e)}).call(t,n(3))},"./client/src/legacy/sspath.js":function(e,t,n){"use strict";var r=n(3),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=((0,o.default)(window),(0,o.default)("html"),(0,o.default)("head"),{urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===o.default.type(e))return e;var t=a.urlParseRE.exec(e||"")||[];return{href:t[0]||"",hrefNoHash:t[1]||"",hrefNoSearch:t[2]||"",domain:t[3]||"",protocol:t[4]||"",doubleSlash:t[5]||"",authority:t[6]||"",username:t[8]||"",password:t[9]||"",host:t[10]||"",hostname:t[11]||"",port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function(e,t){if(e&&"/"===e.charAt(0))return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";for(var n=t?t.split("/"):[],r=e.split("/"),o=0;o');t.bind("load",function(n){"about:blank"!=(0,r.default)(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){r.default.ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,r.default)(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){r.default.ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,r.default)(window).unbind("resize.ssdialog")},_resizeIframe:function(){var t,n,o={},a=this.element.children("iframe");this.options.widthRatio&&(t=(0,r.default)(window).width()*this.options.widthRatio,this.options.minWidth&&tthis.options.maxWidth?o.width=this.options.maxWidth:o.width=t),this.options.heightRatio&&(n=(0,r.default)(window).height()*this.options.heightRatio,this.options.minHeight&&nthis.options.maxHeight?o.height=this.options.maxHeight:o.height=n),e.isEmptyObject(o)||(this._setOptions(o),a.attr("width",o.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),a.attr("height",o.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),r.default.widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||" ",n=r.default.ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var o=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var a=(0,r.default)(' ').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){a.addClass("ui-state-hover")},function(){a.removeClass("ui-state-hover")}).focus(function(){a.addClass("ui-state-focus")}).blur(function(){a.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(o);(this.uiDialogTitlebarCloseText=(0,r.default)(" ")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(a)}(0,r.default)(" ").addClass("ui-dialog-title").attr("id",n).html(t).prependTo(o),o.find("*").add(o).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),r.default.extend(r.default.ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})}).call(t,n(3))},"./client/src/lib/Injector.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlTemplates=t.loadComponent=t.injectGraphql=t.inject=t.withInjector=t.provideContext=t.provideInjector=void 0;var o=n("./client/src/lib/dependency-injection/provideInjector.js"),a=r(o),i=n("./client/src/lib/dependency-injection/provideContext.js"),s=r(i),l=n("./client/src/lib/dependency-injection/withInjector.js"),c=r(l),u=n("./client/src/lib/dependency-injection/inject.js"),d=r(u),f=n("./client/src/lib/dependency-injection/injectGraphql.js"),p=r(f),h=n("./client/src/lib/dependency-injection/graphql/templates.js"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(h),b=n("./client/src/lib/dependency-injection/loadComponent.js"),v=r(b),g=n("./client/src/lib/dependency-injection/Container.js"),y=r(g);t.provideInjector=a.default,t.provideContext=s.default,t.withInjector=c.default,t.inject=d.default,t.injectGraphql=p.default,t.loadComponent=v.default,t.graphqlTemplates=m,t.default=y.default},"./client/src/lib/Validator.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};if(t&&void 0!==t.react)return l.default.createElement(e,n,t.react);if(t&&void 0!==t.html){if(null!==t.html){var r={__html:t.html};return l.default.createElement(e,i({},n,{dangerouslySetInnerHTML:r}))}return null}var o=null;if((o=t&&void 0!==t.text?t.text:t)&&"object"===(void 0===o?"undefined":a(o)))throw new Error("Unsupported string value "+JSON.stringify(o));return null!==o&&void 0!==o?l.default.createElement(e,n,o):null}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=this.config.params;return this.config.params=c({},t,e),this}},{key:"addArg",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p.ROOT_FIELD;return this.addArgs(o({},e,t),n)}},{key:"addArgs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ROOT_FIELD,n=this.config.args[t]||{};return this.config.args[t]=c({},n,e),this}},{key:"addField",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ROOT_FIELD;return this.addFields([e],t)}},{key:"addFields",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.ROOT_FIELD,r=[];return n.split("/").forEach(function(t){if(t===p.ROOT_FIELD)r=e.config.fields;else{var o=r.indexOf(t),a=r[o+1];if(-1===o||!Array.isArray(a))throw new Error("Invalid path to field: "+n);r=a}}),t.forEach(function(e){return r.push(e)}),this}},{key:"useFragment",value:function(e){return this.config.fragments=[].concat(i(this.config.fragments),[e]),this}},{key:"useTemplate",value:function(e){if(!Object.keys(this.templates).includes(e))throw new Error("\nTried to use template '"+e+"', which could not be found. Please make sure that it is registered with your Injector.\n ");return this.config.templateName=e,this}},{key:"addTempFragment",value:function(e,t){return this.fragments=c({},this.fragments,o({},e,t)),this.useFragment(e)}},{key:"setTemplate",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2])||arguments[2];return this.mutateField(e,function(e){var r=(0,d.default)(e.extraClass);return r[t]=n,i({},e,{extraClass:(0,c.default)(r)})})}},{key:"addFieldClass",value:function(e,t){return this.setFieldClass(e,t,!0)}},{key:"removeFieldClass",value:function(e,t){return this.setFieldClass(e,t,!1)}},{key:"getValues",value:function(){return(0,h.getFormValues)(this.schema.name,b)(this.mockGlobalState)||{}}},{key:"getValue",value:function(e){return this.getValues()[e]}},{key:"isDirty",value:function(){return(0,h.isDirty)(this.schema.name,b)(this.mockGlobalState)}},{key:"isPristine",value:function(){return(0,h.isPristine)(this.schema.name,b)(this.mockGlobalState)}},{key:"isValid",value:function(){return(0,h.isValid)(this.schema.name,b)(this.mockGlobalState)}},{key:"isInvalid",value:function(){return(0,h.isInvalid)(this.schema.name,b)(this.mockGlobalState)}},{key:"getState",value:function(){return this.schema}}]),e}();t.default=v},"./client/src/lib/dependency-injection/FormValidationManager.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1)throw new Error("\n Key "+n+" on "+e.name+' should only specify one key \n if using the "*" wildcard\n ');if(t)throw new Error("\n Cannot specify a "+n+" rule on "+e.name+" if a wildcard \n has been specified\n ");t=n}}),t},d=function(){function e(){r(this,e),this._middlewares=[],this._contextCache={}}return a(e,[{key:"sort",value:function(){var e=this,t=["__HEAD__","__TAIL__"],n=[t],r=[];return this._middlewares.forEach(function(e){var t=e.name,r=u(e);"after"===r?n.push(["__TAIL__",t]):"before"===r?n.push([t,"__HEAD__"]):(n.push([t,"__TAIL__"]),n.push(["__HEAD__",t]),e.before.forEach(function(e){n.push([t,e])}),e.after.forEach(function(e){n.push([e,t])}))}),(0,s.default)(n).filter(function(e){return!t.includes(e)}).forEach(function(t){r=r.concat(e._middlewares.filter(function(e){return e.name===t}))}),this._middlewares=r,this}},{key:"add",value:function(e,t,n){c(e),this._contextCache={};var r=n;r&&r.length?Array.isArray(r)||(r=[r]):r=["__GLOBAL__"];var a=o({},e,{factory:t,context:r});return l.forEach(function(t){Array.isArray(e[t])?a[t]=e[t]:a[t]=e[t]?[e[t]]:[]}),l.every(function(e){return!a[e].length})&&(a.after=["__HEAD__"],a.before=["__TAIL__"]),this._middlewares.push(a),this}},{key:"getMatchesForContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__GLOBAL__";if(!this._contextCache[e]){var t=e.split(".");this._contextCache[e]=this._middlewares.filter(function(e){return"__GLOBAL__"===e.context[0]||e.context.every(function(e,n){return"*"===e||t[n]===e})})}return this._contextCache[e]}}]),e}();t.GLOBAL_CONTEXT="__GLOBAL__",t.default=d},"./client/src/lib/dependency-injection/applyFormMiddleware.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:(0,l.default)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i({},e,{templates:i({},t),fragments:i({},n),scaffold:function(e,t,n){throw n.force,new Error("This API endpoint is not available yet")},register:function(t,n){var r,o=n.templateName;if(!o||!this.templates[o])throw new Error("\nTried to register a new query '"+t+"' without a defined template '"+o+"'. Please ensure the\ntemplateName config is defined and that you have registered the template before registering a query.\n ");for(var i=arguments.length,s=Array(i>2?i-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{},a=r.force;return e.isProtected.call(this),function(e){for(var r=arguments.length,s=Array(r>1?r-1:0),l=1;l2&&void 0!==arguments[2]?arguments[2]:{},a=r.force;if(e.isProtected.call(this),this.fragments[t]&&!a)throw new Error("\nTried to register fragment '"+t+"' more than once. This practice is discouraged. Consider\nadding a new fragment or using Injector.update() to enhance the template you're working with.\nOtherwise, invoke the registerFragment() function with '{ force: true }' as the third argument.\n ");this.fragments=i({},this.fragments,o({},t,n))},getTemplates:function(){return i({},this.templates)},getFragments:function(){return i({},this.fragments)},getProcessedManager:function(e,t){var n=t.map(function(e){return e.factory}).reverse(),r=this.services[e],o=new u.default(r,i({},this.templates),i({},this.fragments));return n.forEach(function(e){e(o)},r),o},getFactory:function(e,t){return this.getProcessedManager(e,t).getContainer()}})};t.default=d},"./client/src/lib/dependency-injection/buildApolloGraphqlScaffoldingContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a,i=n("./client/src/lib/dependency-injection/buildBaseContainer.js"),s=r(i),l=n("./client/src/lib/dependency-injection/buildApolloGraphqlContainer.js"),c=r(l),u=n("./client/src/lib/dependency-injection/graphql/buildCreateMutation.js"),d=r(u),f=n("./client/src/lib/dependency-injection/graphql/buildReadQuery.js"),p=r(f),h=n("./client/src/lib/dependency-injection/graphql/buildReadOneQuery.js"),m=r(h),b=n("./client/src/lib/dependency-injection/graphql/buildUpdateMutation.js"),v=r(b),g=n("./client/src/lib/dependency-injection/graphql/buildDeleteMutation.js"),y=r(g),_=n("./client/src/lib/dependency-injection/graphql/buildBaseQuery.js"),j=r(_),w=n("./client/src/lib/dependency-injection/graphql/templates.js"),O=n("./client/src/lib/dependency-injection/graphql/tags.js"),E=(a={},o(a,w.CREATE,(0,d.default)(O.captureTag)),o(a,w.READ,(0,p.default)(O.captureTag)),o(a,w.READ_ONE,(0,m.default)(O.captureTag)),o(a,w.UPDATE,(0,v.default)(O.captureTag)),o(a,w.DELETE,(0,y.default)(O.captureTag)),o(a,w.QUERY,(0,j.default)(O.captureTag)),a),C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,s.default)();return(0,c.default)(e,E)};t.default=C},"./client/src/lib/dependency-injection/buildBaseContainer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:s.GLOBAL_CONTEXT,o=n+"__"+t;if(!e.factoryCache[o]){var a=r.getMatchesForContext(t);e.factoryCache[o]=e.getFactory(n,a)}return e.factoryCache[o]}))):i({},t,o({},n,function(){return e.getFactory(n,[])}))},{}),this.initialised=!0},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.force;if(this.isProtected(),this.services[e]&&!0!==r)throw new Error("\n Tried to register service '"+e+"' more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ");this.services=i({},this.services,o({},e,t))},registerMany:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force;this.isProtected();var r=Object.keys(e),o=Object.keys(this.services).filter(function(e){return r.includes(e)});if(o.length&&!0!==n){var a=o.join(", ");throw new Error("\n Tried to register services ("+a+") more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ")}this.services=i({},this.services,e)},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isProtected(),t(this.createTransformer(e,n))},createTransformer:function(e,t){var n=this;return function(r,o){n.customise(i({name:e},t),r,o)}},getFactory:function(e,t){var n=this.services[e],o=t.map(function(e){return e.factory});return c.compose.apply(void 0,r(o))(n)}}};t.default=u},"./client/src/lib/dependency-injection/buildComponentContainer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:(0,i.default)();return o({},e,{get:function(t,n){for(var o,a=arguments.length,i=Array(a>2?a-2:0),s=2;s0&&void 0!==arguments[0]?arguments[0]:(0,l.default)();return i({},t,{services:(e={},a(e,"FormSchemaMiddleware",function(e){return e}),a(e,"FormValidationMiddleware",function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}),e),register:function(){throw new Error("\n Attempted to register a service on Injector.form. This container accepts only two\n services by design (FormSchemaMiddleware and FormValidationMiddleware) \n for updating form schema and adding validation, respectively. Consider using a more\n generic container, e.g. Injector.reducer.\n ")},registerMany:function(){this.register()},getSchema:function(e){for(var n,r=arguments.length,a=Array(r>1?r-1:0),i=1;i1?r-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.force;if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");if(this.services[e]&&!0!==r)throw new Error("\n Tried to register service "+e+" more than once. This practice is discouraged. Consider\n using Injector.update() to enhance the service rather than override it completely.\n Otherwise, invoke the register() function with { force: true } as the third argument.\n ");if(void 0!==this[e]&&!this.services[e])throw new Error("\n Tried to register service "+e+" which is a reserved keyword. This would affect the behaviour\n of this API class, so it is forbidden to register with Injector.\n ");var o=["load","createTransformer","get","register"];if(!o.every(function(e){return"function"==typeof t[e]}))throw new Error("\n Tried to register service "+e+" that is not a valid object, Injector requires an object\n which contains the following methods: "+o.join(", ")+"\n ");this.services[e]=t,this[e]=t},load:function(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");Object.values(this.services).forEach(function(e){return e.load()}),this.initialised=!0,this.onInit&&this.onInit(),this.callbacks.forEach(function(e){e()}),this.callbacks=[]},transform:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");t(Object.entries(this.services).reduce(function(t,r){var s=i(r,2),l=s[0],c=s[1];return a({},t,o({},l,c.createTransformer(e,n)))},{}))},ready:function(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");if(this.initialised)return void e();this.callbacks=[].concat(r(this.callbacks),[e])},init:function(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");if(this.initialised)throw new Error("Tried to add an init() callback after Injector was initialised");this.onInit=e}}};t.default=s},"./client/src/lib/dependency-injection/buildReducerContainer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:(0,l.default)();return i({},e,{store:null,setStore:function(e){this.store=e},customise:function(e,t,n){var r=this;this.isProtected();var a=this.middlewareRegistries[t];a||(a=new u.default,this.middlewareRegistries=i({},this.middlewareRegistries,o({},t,a)));var s=function(e){var t=r.store&&r.store.getState;return n(e)(t)};a.add(e,s)},getAll:function(){return this.initialised?Object.entries(this.factories).reduce(function(e,t){var n=a(t,2),r=n[0],s=n[1];return i({},e,o({},r,s()))},{}):Object.entries(this.services).reduce(function(e,t){var n=a(t,2),r=n[0],s=n[1];return i({},e,o({},r,s))},{})}})};t.default=d},"./client/src/lib/dependency-injection/graphql/buildBaseQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([""," ",""," {\n ","(",") {\n ","\n }\n }\n ",""],[""," ",""," {\n ","(",") {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(e){var t=e.operationName,n=e.queryName;return t||""+n.charAt(0).toUpperCase()+n.slice(1)},s=function(e){return e.queryName},l=function(e){return e.queryType},c=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,l,i,a.getVariables,s,a.getParams,a.getFields,a.getFragments)};t.default=c},"./client/src/lib/dependency-injection/graphql/buildCreateMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Create","(\n $Input:","CreateInputType!\n ) {\n create","(\n Input: $Input\n ) {\n ","\n }\n }\n ",""],["mutation Create","(\n $Input:","CreateInputType!\n ) {\n create","(\n Input: $Input\n ) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName,a.getSingularName,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildDeleteMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Delete","($IDs:[ID]!) {\n delete","(IDs: $IDs)\n }"],["mutation Delete","($IDs:[ID]!) {\n delete","(IDs: $IDs)\n }"]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildReadOneQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["query ReadOne","($ID: ID!) {\n readOne","(ID: $ID) {\n ","\n }\n }\n ",""],["query ReadOne","($ID: ID!) {\n readOne","(ID: $ID) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildReadQuery.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["query Read",""," {\n read",""," {\n ","\n }\n }\n ",""],["query Read",""," {\n read",""," {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getPluralName,a.getVariables,a.getPluralName,a.getRootParams,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/buildUpdateMutation.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["mutation Update","(\n $Input:","UpdateInputType!\n ","\n ) {\n update","(\n Input: $Input\n ","\n ) {\n ","\n }\n }\n ",""],["mutation Update","(\n $Input:","UpdateInputType!\n ","\n ) {\n update","(\n Input: $Input\n ","\n ) {\n ","\n }\n }\n ",""]),o=n("./client/src/lib/dependency-injection/graphql/tags.js"),a=n("./client/src/lib/dependency-injection/graphql/helpers.js"),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.defaultTag)(r,a.getSingularName,a.getSingularName,a.getVariables,a.getSingularName,a.getParams,a.getFields,a.getFragments)};t.default=i},"./client/src/lib/dependency-injection/graphql/helpers.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:[i],d=o.map(function(t,a){if(Array.isArray(t))return"\n {\n "+e({args:n,fields:t,pagination:!1},[].concat(r(u),[o[a-1]]))+"\n }";var i=[].concat(r(u),[t]),s=i.join("/"),l=n[s]||{};return""+t+c({params:l,pagination:!1})});return s?l(d):d.join(" ")},t.getFragments=function(e){var t=e.availableFragments,n=e.fragments,r=void 0===n?[]:n;return Object.entries(t).reduce(function(e,t){var n=o(t,2),a=n[0],i=n[1];return r.includes(a)?e+" "+i:e},"")}},"./client/src/lib/dependency-injection/graphql/tags.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),r=1;r1?t-1:0),r=1;r1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:m;return function(r){if(e&&!Array.isArray(e))throw new Error("\n withInjector() passed an argument for dependencies that is "+("undefined"==typeof deps?"undefined":u(deps))+".\n Must be an array of named dependencies.\n ");if(t&&"function"!=typeof t)throw new Error("\n Second parameter of inject() [mapDependenciesToProps] must be a function, taking the resolved\n dependencies as enumerated arguments, and returning a map of prop names to dependencies.\n ");if("function"!=typeof n)throw new Error("\n Third parameter of inject() [getContext] must be a function, taking the component's props\n and current inject context as parameters, and returning a string representing the Injector\n context to use throughout the component.\n ");var p=function(d){function p(e,t){a(this,p);var r=i(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,e,t));return r.state={context:n(e,t.injector.context)},r}return s(p,d),c(p,[{key:"getChildContext",value:function(){return{injector:l({},this.context.injector,{context:this.state.context})}}},{key:"render",value:function(){var n=this,a={};if(e){var i=this.context.injector.get,s=e.map(function(e){return i(e,n.state.context)});if(t?a=t.apply(void 0,o(s)):e.forEach(function(e,t){a[e]=s[t]}),!a||"object"!==(void 0===a?"undefined":u(a)))throw new Error("\n mapDepedenciesToProps parameter passed to inject()\n should return an object that maps prop names to dependencies\n ")}var c=l({},a,this.props);return f.default.createElement(r,c)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=n(e,t.context);return r!==t.context?{context:r}:null}}]),p}(d.Component);return p.contextTypes=h.default,p.childContextTypes=h.default,p}};t.default=b},"./client/src/lib/dependency-injection/injectGraphql.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2],r=function(n){function r(e){o(this,r);var t=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.state={target:null,error:!1},t}return i(r,n),l(r,[{key:"getChildContext",value:function(){var e=t&&t.context;return e?{injector:s({},this.context.injector,{context:e})}:this.context}},{key:"componentDidMount",value:function(){var n=this;g.default.ready(function(){if("string"==typeof e){var r=!0,o=null;try{o=n.context.injector.get(e,t&&t.context),r=!1}catch(e){throw n.setState({target:o,error:r}),e}return void n.setState({target:o,error:r})}n.setState({target:e})})}},{key:"render",value:function(){var n=this.state.target;if(this.state.error){var r=_.default;try{r=this.context.injector.get("NotFoundComponent")}catch(e){}return u.default.createElement(r,s({},this.props,{itemName:e}))}if(n){if(t){var o=s({},window.ss,t),a=o.store,i=o.apolloClient;return u.default.createElement(f.ApolloProvider,{client:i},u.default.createElement(d.Provider,{store:a},u.default.createElement(n,this.props)))}return u.default.createElement(n,this.props)}return null}}]),r}(c.Component);return r.childContextTypes=w.default,(n||h.default)((0,b.default)(r))};t.default=O},"./client/src/lib/dependency-injection/provideContext.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:f.default,n=function(n){function r(){return o(this,r),a(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return i(r,n),l(r,[{key:"getChildContext",value:function(){var e=t.component,n=t.form,r=t.query;return{injector:{query:r.get.bind(r),get:e.get.bind(e),validate:n.getValidation.bind(n)}}}},{key:"render",value:function(){return u.default.createElement(e,this.props)}}]),r}(c.Component);return n.childContextTypes=h.default,n}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case l.default.SET_BREADCRUMBS:return(0,i.default)(Object.assign([],t.payload.breadcrumbs));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),s=n("./client/src/state/breadcrumbs/BreadcrumbsActionTypes.js"),l=r(s),c=(0,i.default)([]);t.default=o},"./client/src/state/config/ConfigActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={SET_CONFIG:"SET_CONFIG"}},"./client/src/state/config/ConfigActions.js":function(e,t,n){"use strict";function r(e){return{type:a.default.SET_CONFIG,payload:{config:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=r;var o=n("./client/src/state/config/ConfigActionTypes.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},"./client/src/state/config/ConfigReducer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];switch(t.type){case l.default.SET_CONFIG:return(0,i.default)(Object.assign({},e,t.payload.config));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(11),i=r(a),s=n("./client/src/state/config/ConfigActionTypes.js"),l=r(s);t.default=o},"./client/src/state/mobileMenu/MobileMenuActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={TOGGLE_MENU:"TOGGLE_MENU",OPEN_MENU:"OPEN_MENU",CLOSE_MENU:"CLOSE_MENU"}},"./client/src/state/mobileMenu/MobileMenuActions.js":function(e,t,n){"use strict";function r(){return{type:s.default.TOGGLE_MENU,payload:null}}function o(){return{type:s.default.OPEN_MENU,payload:null}}function a(){return{type:s.default.CLOSE_MENU,payload:null}}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleMobileMenu=r,t.openMobileMenu=o,t.closeMobileMenu=a;var i=n("./client/src/state/mobileMenu/MobileMenuActionTypes.js"),s=function(e){return e&&e.__esModule?e:{default:e}}(i)},"./client/src/state/mobileMenu/MobileMenuReducer.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;switch(arguments[1].type){case c.default.TOGGLE_MENU:return(0,s.default)(a({},e,{isOpen:!e.isOpen}));case c.default.OPEN_MENU:return(0,s.default)(a({},e,{isOpen:!0}));case c.default.CLOSE_MENU:return(0,s.default)(a({},e,{isOpen:!1}));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:f,t=arguments[1];switch(t.type){case d.default.FETCH_RECORDS_SUCCESS:var n=t.payload.recordType;if(!n)throw new Error("Undefined record type");var r=t.payload.data._embedded[n]||[];return(0,c.default)(s({},e,a({},n,r)));case d.default.FETCH_RECORD_SUCCESS:var i=t.payload.recordType,l=t.payload.data;if(!i)throw new Error("Undefined record type");if(!l)throw new Error("Undefined record data given");var u=e[i]||[];return u.find(function(e){return e.ID===l.ID})?(0,c.default)(s({},e,a({},i,u.map(function(e){return e.ID===l.ID?l:e})))):(0,c.default)(s({},e,a({},i,[].concat(o(u),[l]))));case d.default.DELETE_RECORD_SUCCESS:var p=t.payload.recordType;if(!p)throw new Error("Undefined record type");var h=e[p].filter(function(e){return e.ID!==t.payload.id});return(0,c.default)(s({},e,a({},p,h)));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(t.type){case u.default.SET_SCHEMA:var n=e[t.payload.id]||{};return(0,l.default)(i({},e,o({},t.payload.id,i({},n,t.payload))));case u.default.SET_SCHEMA_STATE_OVERRIDES:var r=e[t.payload.id]||{},a=t.payload.stateOverride;return a&&a.fields?(0,l.default)(i({},e,o({},t.payload.id,i({},r,{stateOverride:a})))):e;case u.default.SET_SCHEMA_LOADING:var s=e[t.payload.id]||{},c=s.metadata||{};return(0,l.default)(i({},e,o({},t.payload.id,i({},s,{metadata:i({},c,{loading:t.payload.loading})}))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,l.default)(e,t,f);switch(t.type){case u.default.TABS_ACTIVATE_TAB:return n(function(){return{activeTab:t.payload.tab}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(11),i=r(a),s=n(40),l=r(s),c=n("./client/src/state/tabs/TabsActionTypes.js"),u=r(c),d=(0,i.default)({fields:{}}),f=(0,i.default)({activeTab:null})},"./client/src/state/toasts/ToastConstants.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STAY_TIME=6e3,t.FADEOUT_TIME=1200},"./client/src/state/toasts/ToastsActionTypes.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={DISPLAY:"DISPLAY_TOAST",DISMISS:"DISMISS_TOAST",REMOVE:"REMOVE_TOAST",PAUSE:"PAUSE_TOAST",RESUME:"RESUME_TOAST"}},"./client/src/state/toasts/ToastsReducer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1],n=t.type,r=t.payload;switch(n){case l.default.DISPLAY:return m(e,r);case l.default.DISMISS:return b(e,r.id);case l.default.REMOVE:return v(e,r.id);case l.default.PAUSE:return f(e);case l.default.RESUME:return p(e);default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,p.default)(e,t,v),r=function(e,t){return e.filter(function(e){return e!==t})},a=function(e,t){return e.find(function(e){return e===t})?e:[].concat(o(e),[t]).sort()};switch(t.type){case m.default.TREEFIELD_SET_VISIBLE:return n(function(){return{visible:t.payload.path}});case m.default.TREEFIELD_UPDATING_TREE:return n(function(e){return{loading:a(e.loading,s(t.payload.path)),failed:r(e.failed,s(t.payload.path))}});case m.default.TREEFIELD_UPDATED_TREE:return n(function(e){return{tree:i(e.tree,t.payload.path,t.payload.tree),loading:r(e.loading,s(t.payload.path)),failed:r(e.failed,s(t.payload.path))}});case m.default.TREEFIELD_UPDATE_FAILED:return n(function(e){return{loading:r(e.loading,s(t.payload.path)),failed:a(e.failed,s(t.payload.path))}});case m.default.TREEFIELD_SET_SEARCH:return n(function(e){return c({},e,{search:t.payload.search})});case m.default.TREEFIELD_ADD_SELECTED_VALUES:var l=t.payload.values||[];return n(function(e){return c({},e,{selectedValues:[].concat(o(e.selectedValues.filter(function(e){return!l.find(function(t){return t.id===e.id})})),o(l)).sort(function(e,t){return e.id-t.id})})});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=t.meta&&t.meta.form;switch(t.type){case u.default.ADD_FORM_CHANGED:case l.actionTypes.CHANGE:return(0,s.default)([].concat(o(e.filter(function(e){return e.name!==n})),[{name:n}]));case u.default.REMOVE_FORM_CHANGED:case l.actionTypes.STOP_SUBMIT:return(0,s.default)([].concat(o(e.filter(function(e){return e.name!==n}))));case l.actionTypes.DESTROY:return(0,s.default)([].concat(o(e.filter(function(e){return!n.includes(e.name)}))));default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),s=r(i),l=n(12),c=n("./client/src/state/unsavedForms/UnsavedFormsActionTypes.js"),u=r(c);t.default=a},"./client/src/state/usedOn/usedOnActions.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return{type:u.default.SAVE_USED_ON,payload:{identifier:e,usedOn:t}}}function a(e,t){return{type:u.default.LOAD_USED_ON_FAILED,payload:{identifier:e,error:t.message}}}function i(e,t,n){var r={method:t,headers:{Accept:"application/json"},credentials:"same-origin"};return function(i){if(!e||!t||!n){var s=l.default._t("Admin.NOT_AVAILABLE_USED_DATA","The usage data is currently unavailable.");return Promise.resolve(i(a(e,s)))}return i({type:u.default.LOAD_USED_ON,payload:{identifier:e}}),(0,f.default)(n,r).then(function(e){return e.json()}).then(function(t){i(o(e,t))}).catch(function(t){i(a(e,t))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.saveUsedOn=o,t.loadUsedOnFailed=a,t.loadUsedOn=i;var s=n(4),l=r(s),c=n("./client/src/state/usedOn/usedOnTypes.js"),u=r(c),d=n(15),f=r(d)},"./client/src/state/usedOn/usedOnReducer.js":function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:u,t=arguments[1],n=t&&t.payload&&t.payload.identifier;if(!n)return e;switch(t.type){case c.default.SAVE_USED_ON:var a=t.payload.usedOn;return s({},e,{loading:e.loading.filter(function(e){return e!==n}),usedOn:s({},e.usedOn,o({},n,a.usage))});case c.default.LOAD_USED_ON:return e.loading.includes(n)?e:s({},e,{loading:[].concat(r(e.loading),[n]),errors:Object.entries(e.errors).reduce(function(e,t){var r=i(t,2),a=r[0],l=r[1];return a===n?e:s({},e,o({},a,l))},{})});case c.default.LOAD_USED_ON_FAILED:var l=t.payload.error;return s({},e,{loading:e.loading.filter(function(e){return e!==n}),errors:s({},e.errors,o({},n,l))});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1];switch(t.type){case i.default.SELECT_EDIT:return o({},e,{activeState:l.VIEW_MODE_STATES.EDIT,lockState:!0});case i.default.SELECT_PREVIEW:return o({},e,{activeState:l.VIEW_MODE_STATES.PREVIEW,lockState:!0});case i.default.SELECT_SPLIT:return o({},e,{activeState:l.VIEW_MODE_STATES.SPLIT,lockState:!1});case i.default.SPLIT_AVAILABLE:var n=t.payload.panelWidth>s.SPLITMODE_BREAKPOINT,r=e.activeState;return e.lockState||r!==l.VIEW_MODE_STATES.SPLIT||n?!e.lockState&&r===l.VIEW_MODE_STATES.EDIT&&n&&(r=l.VIEW_MODE_STATES.SPLIT):r=l.VIEW_MODE_STATES.EDIT,o({},e,{splitAvailable:n,activeState:r});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return{crumbs:e.breadcrumbs}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var c=Object.assign||function(e){for(var t=1;t1&&f.default.createElement("div",{className:"breadcrumb__list-container"},f.default.createElement("ol",{className:"breadcrumb"},this.renderBreadcrumbs())),this.renderLastCrumb())}}]),t}(d.Component);_.propTypes={crumbs:v.default.arrayOf(v.default.shape({onClick:v.default.func,text:v.default.string,icon:v.default.shape({nodeName:v.default.string,className:v.default.string,onClick:v.default.func,action:function(e){if(e.action)throw new Error("action: no longer used")}}),icons:v.default.arrayOf(v.default.shape({nodeName:v.default.string,className:v.default.string,onClick:v.default.func}))}))},t.Component=_,t.default=(0,p.connect)(l)(_)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Button/BackButton.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t-1,title:e.title,type:"checkbox"}}},{key:"handleChange",value:function(e,t){var n=this;if("function"==typeof this.props.onChange){var r=this.getValues(),o=this.props.source.filter(function(e,o){return n.getItemKey(e,o)===t.id?1===t.value:r.indexOf(""+e.value)>-1}).map(function(e){return""+e.value});this.props.onChange(e,{id:this.props.id,value:o})}}},{key:"render",value:function(){var e=this;return this.props.source?u.default.createElement("div",null,this.props.source.map(function(t,n){return u.default.createElement(f.default,s({},e.getOptionProps(t,n),{hideLabels:!0}))})):null}}]),t}(c.Component);v.propTypes={className:b.default.string,extraClass:b.default.string,itemClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,source:b.default.arrayOf(b.default.shape({value:b.default.oneOfType([b.default.string,b.default.number]),title:b.default.any,disabled:b.default.bool})),onChange:b.default.func,value:b.default.any,readOnly:b.default.bool,disabled:b.default.bool},v.defaultProps={extraClass:"",className:"",value:[]},t.Component=v;var g=function(e){var t=(0,h.default)(v);return u.default.createElement(t,e)};t.default=g},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/FieldHolder/FieldHolder.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t=function(t){function n(){return a(this,n),i(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return s(n,t),u(n,[{key:"getMessage",value:function(){var e=null;this.props.message&&this.props.message.value&&(e=this.props.message);var t=this.props.meta;return t&&t.error&&t.touched&&(!e||t.dirty)&&(e=t.error),e}},{key:"getHolderProps",value:function(){var e;return{className:(0,v.default)((e={field:!0},o(e,this.props.extraClass,!0),o(e,"readonly",this.props.readOnly),e)),id:this.props.holderId}}},{key:"renderMessage",value:function(){var e=this.getMessage();if(!e)return null;var t=(0,v.default)(["form__field-message","form__field-message--"+e.type]),n=(0,m.default)("div",e.value);return f.default.createElement("div",{className:t},n)}},{key:"renderLeftTitle",value:function(){var e=null!==this.props.leftTitle?this.props.leftTitle:this.props.title;return!e||this.props.hideLabels?null:(0,m.default)(p.Label,e,{className:"form__field-label",for:this.props.id})}},{key:"renderRightTitle",value:function(){return!this.props.rightTitle||this.props.hideLabels?null:(0,m.default)(p.Label,this.props.rightTitle,{className:"form__field-label",for:this.props.id})}},{key:"renderField",value:function(){var t=Boolean(this.getMessage()),n=c({},this.props,{extraClass:(0,v.default)(this.props.extraClass,{"is-invalid":t})}),r=f.default.createElement(e,n),o=this.props.data.prefix,a=this.props.data.suffix;return o||a?f.default.createElement(p.InputGroup,null,o&&f.default.createElement(p.InputGroupAddon,{addonType:"prepend"},o),r,a&&f.default.createElement(p.InputGroupAddon,{addonType:"append"},a)):r}},{key:"renderTitleTip",value:function(){return this.props.id&&this.props.titleTip&&this.props.titleTip.content?f.default.createElement(j.default,{id:"FieldHolder-"+this.props.id+"-titleTip",content:this.props.titleTip.content,fieldTitle:this.props.title,type:_.TIP_TYPES.TITLE,icon:"menu-help"}):null}},{key:"renderDescription",value:function(){return null===this.props.description?null:(0,m.default)("div",this.props.description,{className:"form__field-description"})}},{key:"render",value:function(){return this.props.noHolder?this.renderField():f.default.createElement(p.FormGroup,this.getHolderProps(),this.renderLeftTitle(),this.renderTitleTip(),f.default.createElement("div",{className:"form__field-holder"},this.renderField(),this.renderMessage(),this.renderDescription()),this.renderRightTitle())}}]),n}(d.Component);return t.propTypes={leftTitle:y.default.any,rightTitle:y.default.any,title:y.default.any,extraClass:y.default.string,holderId:y.default.string,id:y.default.string,name:y.default.string,description:y.default.any,hideLabels:y.default.bool,message:y.default.shape({extraClass:y.default.string,value:y.default.any,type:y.default.string}),data:y.default.oneOfType([y.default.array,y.default.shape({prefix:y.default.string,suffix:y.default.string})]),titleTip:y.default.shape(_.tipShape)},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null,title:"",description:null,hideLabels:!1,noHolder:!1,message:null,data:{}},t}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t-1})?null:this.isPrimary()?"primary":"secondary"}},{key:"getIcon",value:function(){return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function(){return this.props.loading?u.default.createElement("div",{className:"btn__loading-icon"},u.default.createElement("span",{className:"btn__circle btn__circle--1"}),u.default.createElement("span",{className:"btn__circle btn__circle--2"}),u.default.createElement("span",{className:"btn__circle btn__circle--3"})):null}},{key:"isDisabled",value:function(){var e=this.props,t=e.disabled,n=e.readOnly;return t||n}},{key:"isPrimary",value:function(){var e=this.props,t=e.extraClass,n=e.name,r=t.split(" ");return"action_save"===n||!!r.find(function(e){return"ss-ui-action-constructive"===e})}},{key:"handleClick",value:function(e){"function"==typeof this.props.onClick&&this.props.onClick(e,this.props.name||this.props.id)}},{key:"render",value:function(){var e=this.props.title;return u.default.createElement("button",this.getButtonProps(),this.getLoadingIcon(),(0,f.default)("span",e,{className:"btn__title"}))}}]),t}(c.Component);v.propTypes={id:b.default.string,name:b.default.string,onClick:b.default.func,title:b.default.string,type:b.default.string,loading:b.default.bool,icon:b.default.string,disabled:b.default.bool,readOnly:b.default.bool,data:b.default.oneOfType([b.default.array,b.default.shape({buttonStyle:b.default.string})]),extraClass:b.default.string,attributes:b.default.object},v.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1,readOnly:!1},t.default=v},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/FormAlert/FormAlert.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0];this.setState({frameLoaded:e})}},{key:"handleBackClick",value:function(e){"function"==typeof this.props.onBack&&(e.preventDefault(),this.props.onBack(e))}},{key:"buildToolbarButtons",value:function(){var e=[];if(this.props.itemLinks&&this.props.itemLinks.edit){var t=this.props.itemLinks.edit.href;e.push(c.default.createElement("a",{key:"edit",href:t,className:"btn btn-outline-secondary font-icon-edit"},c.default.createElement("span",{className:"btn__title"},d.default._t("Admin.EDIT","Edit"))))}return e}},{key:"renderMoreActions",value:function(){return this.props.moreActions&&0!==this.props.moreActions.length?c.default.createElement(p.default,null,this.props.moreActions):null}},{key:"renderBody",value:function(){var e=null,t="";return this.props.itemLinks&&this.props.itemLinks.preview&&(this.props.itemLinks.preview.Stage?(e=this.props.itemLinks.preview.Stage.href,t=this.props.itemLinks.preview.Stage.type):this.props.itemLinks.preview.Live&&(e=this.props.itemLinks.preview.Live.href,t=this.props.itemLinks.preview.Live.type)),this.props.itemId?e?t&&0===t.indexOf("image/")?c.default.createElement("div",{className:"preview__file-container panel--scrollable"},c.default.createElement("img",{alt:e,className:"preview__file--fits-space",src:e})):c.default.createElement("iframe",{style:{visibility:this.state.frameLoaded?"visible":"hidden"},className:"flexbox-area-grow preview__iframe",src:e,onLoad:this.setFrameLoaded}):c.default.createElement("div",{className:"preview__overlay"},c.default.createElement("h3",{className:"preview__overlay-text"},d.default._t("Admin.NO_ITEM_PREVIEW","There is no preview available for this item."))):c.default.createElement("div",{className:"preview__overlay"},c.default.createElement("h3",{className:"preview__overlay-text"},d.default._t("Admin.NO_PREVIEW","No preview available.")))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.ViewModeComponent,r=(0,m.default)("preview",t);return c.default.createElement("div",{className:r},this.renderBody(),c.default.createElement("div",{className:"toolbar toolbar--south"},c.default.createElement("div",{className:"btn-toolbar"},this.buildToolbarButtons(),c.default.createElement(n,{id:"view-mode-toggle-in-preview-nb",area:"preview"}),this.renderMoreActions())))}}]),t}(l.Component);y.propTypes={className:g.default.string,itemLinks:g.default.object,itemId:g.default.number,onBack:g.default.func,moreActions:g.default.arrayOf(g.default.element),ViewModeComponent:g.default.oneOfType([g.default.node,g.default.func])},y.defaultProps={className:"flexbox-area-grow fill-height"},t.Component=y,t.default=(0,b.inject)(["ViewModeToggle"],function(e){return{ViewModeComponent:e}},function(){return"Admin.Preview"})(y)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/ResizeAware/ResizeAware.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return e&&Object.keys(e).length>0}function u(e,t){var n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};var r=n.name,o=(0,x.default)((0,D.default)(e),r),a=o&&o.values||{},i=(0,U.default)(n,t.filters,t.tagHandlers||{});return{formData:a,formIsDirty:(0,T.isDirty)(r,D.default)(e),schemaName:r,tagData:i}}function d(e){return{actions:{schema:(0,w.bindActionCreators)(E,e),reduxForm:(0,w.bindActionCreators)({reset:C.reset,initialize:C.initialize,change:C.change},e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.hasFilters=t.Component=void 0;var f=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=this.props,n=t.name,r=t.filterPrefix,o=t.formData,a=this.state.searchText,i={};return Object.keys(o).forEach(function(e){var t=o[e];t&&(i[e]=t)}),!e&&a&&void 0===o[""+r+n]&&(i[""+r+n]=a.trim()),i}},{key:"handleChange",value:function(e){var t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});var n=this.props,r=n.schemaName,o=n.name,a=n.filterPrefix,i=n.actions;void 0!==n.formData[""+a+o]&&i.reduxForm.change(r,""+a+o,t)}},{key:"focusInput",value:function(){if(this.state.display!==G.NONE){var e=j.default.findDOMNode(this);if(e){var t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}}}},{key:"focusFirstFormField",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input, textarea, select, button";if(this.state.display===G.EXPANDED){var t=j.default.findDOMNode(this);if(t){var n=t.querySelector(".search-form");if(n){var r=n.querySelector(e);r&&(r.focus(),r.select&&r.select())}}}}},{key:"clearFormData",value:function(e){""!==this.state.searchText&&this.setState({searchText:""});var t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){var n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,{fields:[]}),this.props.actions.reduxForm.reset(n)}}},{key:"clearFormFilter",value:function(e){var t=this.props.tagData[e],n=a({},e,void 0),r=this.props,o=r.schemaName,i=r.filters;this.props.actions.reduxForm.change(o,e,""),this.setOverrides(p({},this.props,{filters:p({},i,a({},e,void 0))})),Array.isArray(t.linkedFields)&&t.linkedFields.forEach(function(e){n[e]=void 0}),this.doSearch(n)}},{key:"focusFormFilter",value:function(e){var t=this,n=this.props.tagData[e],r=n.focusSelector||"[name="+e+"]";this.expand(),setTimeout(function(){return t.focusFirstFormField(r)},50)}},{key:"open",value:function(){this.show(),this.focusInput()}},{key:"hide",value:function(){this.clearSearchBox(),this.props.onHide?this.props.onHide():this.state.display!==G.NONE&&this.setState({display:G.NONE})}},{key:"show",value:function(){this.state.display!==G.VISIBLE&&this.setState({display:G.VISIBLE});var e=this.props,t=e.schemaName,n=e.formData,r=e.name,o=e.actions;void 0!==n[r]&&o.reduxForm.change(t,r,this.state.searchText)}},{key:"expand",value:function(){this.state.display!==G.EXPANDED&&this.setState({display:G.EXPANDED})}},{key:"toggle",value:function(){switch(this.state.display){case G.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case G.EXPANDED:this.show()}}},{key:"searchTermIsDirty",value:function(){var e=this.state,t=e.searchText,n=e.initialSearchText;return t.trim()!==n.trim()}},{key:"doSearch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.name,r=t.filterPrefix,o={},a=this.getData();Object.entries(a).forEach(function(t){var i=f(t,2),s=i[0],l=i[1],c=s,u=l;e.hasOwnProperty(s)&&(u=e[s]),r.length>0&&s.startsWith(r)&&(c=s.substring(r.length)),(!r.length>0||s!==n||void 0===a[""+r+n])&&(o[c]=u)});var i=o[n]||"";this.state.display===G.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:G.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(o)}},{key:"clearFilters",value:function(){this.clearFormData(),this.focusFirstFormField()}},{key:"clearSearchBox",value:function(){this.clearFormData(),this.focusInput()}},{key:"formatTagData",value:function(){var e=this.props,t=e.tagData,n=e.name,r=e.filterPrefix,o=Object.assign({},t),a=""+r+n;return o&&o[a]&&delete o[a],o?Object.values(o).map(function(e){return{key:e.key,label:e.label,value:e.value}}):[]}},{key:"render",value:function(){var e=this.props,t=e.formSchemaUrl,n=e.forceFilters,r=e.id,a=e.displayBehavior,i=e.identifier,s=e.formIsDirty,l=(e.tagData,e.name),c=o(e,["formSchemaUrl","forceFilters","id","displayBehavior","identifier","formIsDirty","tagData","name"]);if(this.state.display===G.NONE)return a===q.TOGGLABLE?g.default.createElement(L.default,{onToggle:this.show}):g.default.createElement("div",null);var u=r+"_ExtraFields",d=this.state.searchText,f=this.state.display===G.EXPANDED,h=this.state.display===G.VISIBLE,m=[q.HIDEABLE,q.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),v=this.getData(),y=Object.keys(v).length>0;return g.default.createElement(P.default,{onClickOut:this.show,className:"search"},g.default.createElement(M.default,p({},c,{name:"SearchBox__"+l,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:d,hideable:m,expanded:f,id:r+"_searchbox",showFilters:Boolean(n||t),dirty:b,clearable:y,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),g.default.createElement(I.default,{id:u,identifier:i,visible:h,expanded:f,formSchemaUrl:t,onSearch:this.doSearch,onClear:this.clearFilters,clearable:y})))}}]),t}(v.Component);z.propTypes={onSearch:V.default.func,onHide:V.default.func,id:V.default.string.isRequired,display:V.default.oneOf(Object.values(G)),formSchemaUrl:V.default.string,filters:V.default.object,formData:V.default.object,placeholder:V.default.string,displayBehavior:V.default.oneOf(Object.values(q)),term:V.default.string,name:V.default.string,filterPrefix:V.default.string,forceFilters:V.default.bool,formIsDirty:V.default.bool,identifier:V.default.string,schemaName:V.default.string,tagHandlers:V.default.object,borders:V.default.shape({top:V.default.bool,right:V.default.bool,bottom:V.default.bool,left:V.default.bool})},z.defaultProps={placeholder:b.default._t("Admin.SEARCH","Search"),display:G.VISIBLE,displayBehavior:q.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"},t.Component=z,t.hasFilters=c,t.default=(0,y.connect)(u,d)(z)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Search/SearchToggle.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(4),a=r(o),i=n(0),s=r(i),l=n(5),c=n(2),u=r(c),d=n(1),f=r(d),p=a.default._t("Admin.SHOW_SEARCH","Show search"),h=function(e){return(0,u.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e})},m=function(e){var t=e.onToggle,n=e.toggled;return s.default.createElement(l.Button,{title:p,onClick:t,className:h(n)},s.default.createElement("span",{className:"sr-only"},p))};m.propTypes={onToggle:f.default.func,toggled:f.default.bool},t.Component=m,t.default=m},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Tag/CompactTagList.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t1}}]),t}(f.default);t.Component=p,t.default=(0,u.default)(p)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/Tip/Tip.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=e.content,n=e.fieldTitle,r=e.icon,o=e.id,a=e.importance,i=j[a],s=i.iconColor,u=i.description,d=h.default.inject(h.default._t("Admin.TIP_LABEL","{description} for {fieldTitle}"),{description:u,fieldTitle:n}),p=["tip",e.extraClass];e.type===y.TITLE?p.push("tip--title"):e.type===y.INPUT_GROUP&&p.push("tip--input-group","btn--last","btn-outline-secondary","text-"+s);var m=o+"-tip",v={id:m,onClick:function(){},className:(0,g.default)(p),noText:!0,icon:r};return c.default.createElement(l.Fragment,null,c.default.createElement(b.default,v,d),c.default.createElement(f.UncontrolledPopover,{trigger:"legacy",placement:"top-end",target:m},c.default.createElement(f.PopoverBody,null,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.tipShape=t.TIP_IMPORTANCE_LEVELS=t.TIP_TYPES=void 0;var i,s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props.visible,t=[];if(!e)return t;var n=this.props.tree,r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value;if("break"===function(e){return n.children&&(n=n.children.find(function(t){return t.id===e}))?void t.push(n):"break"}(l))break}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return t}},{key:"getDropdownOptions",value:function(){var e=this.props.value,t=this.getVisibleTree(),n=t?[].concat(o(t.children)):[],r=this.props.selectedValues.filter(function(t){return t.id===e||Array.isArray(e)&&e.find(function(e){return e===t.id})});return!this.state.opened&&this.props.data.showSelectedPath?n=r.map(function(e){return d({},e,{title:e.titlePath||e.title})}):r.length&&(n=[].concat(o(r.filter(function(e){return!n.find(function(t){return t.id===e.id})})),o(n))),n.unshift({id:this.props.data.multiple?"":N,title:this.props.data.hasEmptyDefault?this.props.data.emptyString:null,disabled:!n.length||!this.props.data.hasEmptyDefault}),n}},{key:"getPath",value:function(e){var t=this.props.findTreePath(this.props.tree,e,this.props.data.treeBaseId);return this.getBreadcrumbs(t).reduce(function(e,t){return""+e+(t.contextString||"")+t.title+"/"},"")}},{key:"initialise",value:function(){var e=this;return this.loadTree([],this.props.search).then(function(t){var n=[];!e.props.data.multiple&&e.props.value&&(n=e.props.findTreePath(t,e.props.value,e.props.data.treeBaseId),n?n.pop():n=[]),e.props.actions.treeDropdownField.setVisible(e.props.id,n)})}},{key:"callFetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props,r=D.default.parse(n.data.urlTree,!0);n.data.showSearch&&t.length&&(r.query.search=t,r.query.flatList="1"),e.length?r.query.ID=e[e.length-1]:!n.data.multiple&&n.value&&(r.query.forceValue=n.value),r.query.format="json",r.search=null;var o=D.default.format(r);return this.props.fetch(o,{credentials:"same-origin"}).then(function(e){return e.json()})}},{key:"lazyLoad",value:function(e){var t=this;if(e.find(function(e){return t.props.loading.indexOf(e)>-1||t.props.failed.indexOf(e)>-1}))return Promise.resolve({});var n=this.props.findTreeByPath(this.props.tree,e);return n&&(0===n.count||n.children.length)?Promise.resolve({}):this.loadTree(e)}},{key:"loadTree",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;return n.actions.treeDropdownField.beginTreeUpdating(n.id,e),this.callFetch(e,t,n).then(function(t){return n.actions.treeDropdownField.updateTree(n.id,e,t),t}).catch(function(t){if(n.actions.treeDropdownField.updateTreeFailed(n.id,e),"function"==typeof n.onLoadingError)return n.onLoadingError({errors:[{value:t.message,type:"error"}]});throw t})}},{key:"hasSearch",value:function(){return this.props.data.showSearch&&Boolean(this.props.search)}},{key:"filterOptions",value:function(e){var t=this,n=this.getVisibleTree();return e.filter(function(e){if((e.id===N||""===e.id)&&(!t.props.data.hasEmptyDefault||t.props.visible.length||t.hasSearch()))return!1;var r=e.title&&e.title.toLocaleLowerCase(),o=t.props.search.toLocaleLowerCase();return o?r&&r.includes(o):!n||!e.id||n.children.find(function(t){return t.id===e.id})})}},{key:"handleOpen",value:function(){this.setState({opened:!0}),this.handleSearchReset()}},{key:"handleClose",value:function(){this.setState({opened:!1})}},{key:"handleSearchReset",value:function(){clearTimeout(this.searchTimer),this.props.actions.treeDropdownField.setSearch(this.props.id,"")}},{key:"handleSearchChange",value:function(e){var t=this;clearTimeout(this.searchTimer),this.searchTimer=setTimeout(function(){t.props.actions.treeDropdownField.setSearch(t.props.id,e)},500)}},{key:"handleChange",value:function(e){var t=null;if(this.handleSearchReset(),this.props.data.multiple){if(t=I,e&&e.length){var n=e&&e.filter(function(t,n){return e.findIndex(function(e){return e.id===t.id})===n});t=n.map(function(e){return e.id}),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,n)}}else{var r=e?e.id:null,o=this.getVisibleTree()||this.props.tree,a=o.children.find(function(e){return e.id===r});a&&(this.props.data.showSelectedPath&&(a=d({},a,{titlePath:this.getPath(r)})),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,[a])),t=r||N}"function"==typeof this.props.onChange&&this.props.onChange(t)}},{key:"handleNavigate",value:function(e,t){if(e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault(),!this.hasSearch()){var n=this.props.findTreePath(this.props.tree,t,this.props.data.treeBaseId);n||(n=this.props.visible.slice(0),n.push(t)),this.lazyLoad(n),this.props.actions.treeDropdownField.setVisible(this.props.id,n)}}},{key:"handleKeyDown",value:function(e){if(this.hasSearch())return void(27===e.keyCode&&this.handleSearchReset(e));var t=this.selectField.getFocusedOption();if(t)switch(e.keyCode){case 37:this.handleBack(e);break;case 39:t.count&&this.handleNavigate(e,t.id)}}},{key:"handleBack",value:function(e){if(e.stopPropagation(),e.preventDefault(),!this.hasSearch()){var t=this.props.visible;t.length&&(t=t.slice(0,t.length-1)),this.lazyLoad(t),this.props.actions.treeDropdownField.setVisible(this.props.id,t)}}},{key:"renderMenu",value:function(e){var t=this.getVisibleTree()||{},n=this.props.loading.indexOf(t.id||0)>-1,r=this.props.failed.indexOf(t.id||0)>-1,o=this.getBreadcrumbs();return h.default.createElement(x.default,{loading:n,failed:r,tree:t,breadcrumbs:o,renderMenuOptions:e,onBack:this.handleBack,search:this.hasSearch(),value:this.props.value})}},{key:"renderOption",value:function(e){var t=this,n=null;if(e.count&&!this.hasSearch()){var r=function(n){return t.handleNavigate(n,e.id)};n=h.default.createElement("button",{className:"treedropdownfield__option-button fill-width",onClick:r,onMouseDown:r,onTouchStart:r},h.default.createElement("span",{className:"treedropdownfield__option-count-icon font-icon-right-open-big"}))}var o=function(e){var t=e.children;return h.default.createElement("span",{className:"treedropdownfield__option-title--highlighted"},t)},a=this.props.search.length?(0,M.mapHighlight)(e.title,this.props.search,o):e.title,i=null;return this.hasSearch()&&((i=e.contextString)||!this.props.data.hasEmptyDefault||this.props.visible.length||(i=this.props.data.emptyString)),h.default.createElement("div",{className:"treedropdownfield__option fill-width"},h.default.createElement("div",{className:"treedropdownfield__option-title-box flexbox-area-grow fill-height"},h.default.createElement("span",{className:"treedropdownfield__option-title"},a),i&&h.default.createElement("span",{className:"treedropdownfield__option-context"},i)),n)}},{key:"renderReadOnly",value:function(){var e=this,t={id:this.props.id,readOnly:this.props.readOnly,disabled:this.props.disabled},n=this.props.extraClass?"treedropdownfield "+this.props.extraClass:"treedropdownfield",r=this.props.data.hasEmptyDefault?this.props.data.emptyString:"",o=this.props.selectedValues;if(this.props.data.multiple)r=this.props.value.map(function(e){return o.find(function(t){return t.id===e})||e}).map(function(e){return e.title}).join(", ");else{var a=o.find(function(t){return t.id===e.props.value});r=this.props.value,a&&"string"==typeof a.title&&(r=a.title)}return h.default.createElement("div",{className:n},h.default.createElement("span",{className:"treedropdownfield__title"},r),h.default.createElement(A.Input,d({type:"hidden",name:this.props.name,value:this.props.value},t)))}},{key:"render",value:function(){var e=this;if(this.props.readOnly||this.props.disabled)return this.renderReadOnly();var t={id:this.props.id},n=this.props.extraClass?"treedropdownfield "+this.props.extraClass:"treedropdownfield",r=this.getDropdownOptions(),o=this.props.value;this.props.data.multiple&&(o=this.props.value?this.props.selectedValues.filter(function(e){return o.includes(e.id)}):[]);var a=this.props.data.hasEmptyDefault&&!this.props.visible.length?"":null,i=void 0!==this.props.data.showSearch&&this.props.data.showSearch;return h.default.createElement(E.default,{searchable:i,multi:this.props.data.multiple,className:n,name:this.props.name,options:r,inputProps:t,menuRenderer:this.renderMenu,filterOptions:this.filterOptions,optionRenderer:this.renderOption,onChange:this.handleChange,onOpen:this.handleOpen,onClose:this.handleClose,onBlurResetsInput:!0,onInputKeyDown:this.handleKeyDown,onInputChange:this.handleSearchChange,isLoading:Boolean(this.props.loading.length),value:o,resetValue:a,joinValues:!0,ref:function(t){e.selectField=t},placeholder:this.props.data.emptyString,labelKey:"title",valueKey:"id"})}}]),t}(p.Component);E.default.prototype.componentWillReceiveProps=function(e){var t=this.getValueArray(e.value,e);e.required?this.setState({required:function(e,t){return!e||(t?0===e.length:0===Object.keys(e).length)}(t[0],e.multi)}):this.props.required&&this.setState({required:!1});var n=[this.props.value,e.value].map(JSON.stringify),r=u(n,2),o=r[0],a=r[1];this.state.inputValue&&o!==a&&e.onSelectResetsInput&&this.setState({inputValue:this.handleInputValueChange("")})},L.propTypes={extraClass:b.default.string,id:b.default.string,name:b.default.string.isRequired,onChange:b.default.func,value:b.default.oneOfType([b.default.string,b.default.number,b.default.array]),readOnly:b.default.bool,disabled:b.default.bool,tree:b.default.shape(P.default.propTypes),findTreeByPath:b.default.func,findTreePath:b.default.func,visible:b.default.array,loading:b.default.array,failed:b.default.array,selectedValues:b.default.array,data:b.default.shape({cacheKey:b.default.string,urlTree:b.default.string.isRequired,emptyString:b.default.string,valueObject:b.default.shape(P.default.propTypes),valueObjects:b.default.arrayOf(b.default.shape(P.default.propTypes)),hasEmptyDefault:b.default.bool,showSearch:b.default.bool,multiple:b.default.bool,showSelectedPath:b.default.bool,treeBaseId:b.default.number}),onLoadingError:b.default.func,search:b.default.string,actions:b.default.shape({treeDropdownField:b.default.object}),fetch:b.default.func},L.defaultProps={value:"",extraClass:"",className:"",tree:{},visible:[],loading:[],failed:[],findTreeByPath:R.findTreeByPath,findTreePath:R.findTreePath,fetch:w.default};var B=(0,v.connect)(l,c)(L);t.Component=L,t.ConnectedTreeDropdownField=B,t.MULTI_EMPTY_VALUE=I,t.SINGLE_EMPTY_VALUE=N,t.findTreePath=R.findTreePath,t.findTreeByID=R.findTreeByID,t.findTreeByPath=R.findTreeByPath,t.default=(0,_.default)(B)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/components/TreeDropdownField/TreeDropdownFieldMenu.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.props)}},{key:"handleSubmit",value:function(e,t,n){var r=this,o=null,a=function(){return n().then(function(e){var t=e;if(t){var n=void 0!==t.state;if(t=r.reduceSchemaErrors(t),r.props.actions.schema.setSchema(r.props.schemaUrl,t,r.getIdentifier()),n){var o=t.schema||r.props.schema.schema,a=(0,T.default)(o,t.state);r.props.actions.reduxForm.initialize(r.getIdentifier(),a)}}return t})};if(!(o="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,a):a()))throw new Error("Promise was not returned for submitting");return o.then(function(e){if(!e||!e.state)return e;var t=r.getMessages(e.state);if(Object.keys(t).length)throw new E.SubmissionError(t);return e})}},{key:"reduceSchemaErrors",value:function(e){if(!e.errors)return e;var t=u({},e);return t.state||(t=u({},t,{state:this.props.schema.state})),t=u({},t,{state:u({},t.state,{fields:t.state.fields.map(function(t){var n=e.errors.find(function(e){return e.field===t.name});return n&&(n=(0,S.createErrorHtml)([n.value])),u({},t,{message:n})})}),messages:e.errors.filter(function(e){return!e.field})}),delete t.errors,(0,O.default)(t)}},{key:"overrideStateData",value:function(e){if(!this.props.stateOverrides||!e)return e;var t=this.props.stateOverrides.fields,n=e.fields;return t&&n&&(n=n.map(function(e){var n=t.find(function(t){return t.name===e.name});return n?F.default.recursive(!0,e,n):e})),Object.assign({},e,this.props.stateOverrides,{fields:n})}},{key:"callFetch",value:function(e){return(0,j.default)(this.props.schemaUrl,{headers:{"X-FormSchema-Request":e.join(","),Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.status>=200&&e.status<300?e.json():new Promise(function(t,n){return e.json().then(function(t){n({status:e.status,statusText:e.statusText,json:t})}).catch(function(){n({status:e.status,statusText:e.statusText,json:{}})})})})}},{key:"fetch",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.props.loading)return Promise.resolve({});var o=["auto",e&&"schema",n&&"state",r&&"errors"].filter(function(e){return e});return this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!0),"function"==typeof this.props.onFetchingSchema&&this.props.onFetchingSchema(),this.callFetch(o).then(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1),e.errors?"function"==typeof t.props.onLoadingError&&t.props.onLoadingError(e):"function"==typeof t.props.onLoadingSuccess&&t.props.onLoadingSuccess(),void 0!==e.id&&e.state){var n=Object.assign({},e,{state:t.overrideStateData(e.state)}),r=s(u({},t.props,{schema:u({},t.props.schema,n)}));t.props.actions.schema.setSchema(t.props.schemaUrl,n,r);var o=e.schema||t.props.schema.schema,a=(0,T.default)(o,n.state);return t.props.actions.reduxForm.initialize(r,a,!1,{keepSubmitSucceeded:!0}),"function"==typeof t.props.onReduxFormInit&&t.props.onReduxFormInit(),n}return e}).catch(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1),"function"==typeof t.props.onLoadingError)return t.props.onLoadingError(t.normaliseError(e));throw e})}},{key:"normaliseError",value:function(e){return e.json&&e.json.errors?e.json:e.status&&e.statusText?{errors:[{code:e.status,value:e.statusText,type:"error"}]}:{errors:[{value:e.message||p.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred."),type:"error"}]}}},{key:"handleAutofill",value:function(e,t){this.props.actions.reduxForm.autofill(this.getIdentifier(),e,t)}},{key:"render",value:function(){var e=this.props.loadingComponent;if(!this.props.schema||!this.props.schema.schema||this.props.loading)return m.default.createElement(e,{containerClass:"loading--form flexbox-area-grow"});var t=Object.assign({},this.props,{form:this.getIdentifier(),onSubmitSuccess:this.props.onSubmitSuccess,onSubmit:this.handleSubmit,onAutofill:this.handleAutofill,autoFocus:this.props.autoFocus});return m.default.createElement(A.default,t)}}]),t}(h.Component);B.propTypes=Object.assign({},D.basePropTypes,{actions:v.default.shape({schema:v.default.object,reduxFrom:v.default.object}),autoFocus:v.default.bool,identifier:v.default.string.isRequired,schemaUrl:v.default.string.isRequired,schema:D.schemaPropType,refetchSchemaOnMount:v.default.bool.isRequired,form:v.default.string,submitting:v.default.bool,onFetchingSchema:v.default.func,onReduxFormInit:v.default.func,loadingComponent:v.default.oneOfType([v.default.func,v.default.node]).isRequired}),B.defaultProps={refetchSchemaOnMount:!0},t.Component=B,t.default=(0,y.compose)((0,I.inject)(["ReduxForm","ReduxFormField","Loading"],function(e,t,n){return{loadingComponent:n,baseFormComponent:e,baseFieldComponent:t}},function(e){return e.identifier}),(0,g.connect)(l,c))(B)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/containers/InsertLinkModal/InsertLinkModal.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){return{actions:{schema:(0,p.bindActionCreators)(_,e)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createInsertLinkModal=t.InsertLinkModal=void 0;var l=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=t&&t.actions||{};return{actions:u({},n,{schema:(0,v.bindActionCreators)(y,e)})}}function c(e){function t(){return{Component:e}}return(0,_.connect)(t,l)(j)}Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectedFileSchemaHandler=t.FileSchemaHandler=void 0;var u=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;if(e){if(e.schemaUrl){var t=Object.assign({},e.fileAttributes);delete t.ID;var n={fields:Object.entries(t).map(function(e){var t=d(e,2);return{name:t[0],value:t[1]}})};this.props.actions.schema.setSchemaStateOverrides(e.schemaUrl,n)}}else{var r=this.props.schemaUrl;r&&this.props.actions.schema.setSchemaStateOverrides(r,null)}}},{key:"render",value:function(){var e=this.props,t=e.Component,n=o(e,["Component"]);return h.default.createElement(t,u({setOverrides:this.setOverrides},n))}}]),t}(p.Component);j.propTypes={fileAttributes:b.default.object,Component:b.default.oneOfType([b.default.element,b.default.func]),schemaUrl:b.default.string,actions:b.default.object};var w=(0,_.connect)(function(){return{}},l())(j);t.FileSchemaHandler=j,t.ConnectedFileSchemaHandler=w,t.default=c},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Backend.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=null;if(!(e.status>=200&&e.status<300))throw t=new Error(e.statusText),t.response=e,t;return e}function s(e){var t=null;if(e instanceof FormData||"string"==typeof e)t=e;else{if(!e||"object"!==(void 0===e?"undefined":m(e)))throw new Error("Invalid body type");t=JSON.stringify(e)}return t}function l(e,t){switch(e){case"application/x-www-form-urlencoded":return j.default.stringify(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.stringify(t);default:throw new Error("Can't encode format: "+e)}}function c(e,t){switch(e){case"application/x-www-form-urlencoded":return j.default.parse(t);case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t);default:throw new Error("Can't decode format: "+e)}}function u(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function d(e){return e.text().then(function(t){return c(e.headers.get("Content-Type"),t)})}function f(e,t){return Object.keys(t).reduce(function(n,r){var o=e[r];return!o||!0!==o.remove&&!0!==o.querystring?Object.assign(n,a({},r,t[r])):n},{})}function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{setFromData:!1},o=t;return o=u(o,l("application/x-www-form-urlencoded",Object.keys(n).reduce(function(t,o){var i=e[o],s=!0===r.setFromData&&!(i&&!0===i.remove),l=i&&!0===i.querystring&&!0!==i.remove;return s||l?Object.assign(t,a({},o,n[o])):t},{}))),o=Object.keys(e).reduce(function(t,r){var o=e[r].urlReplacement;return o?t.replace(o,n[r]):t},o)}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Object.assign({},r,{Accept:n.responseFormat,"Content-Type":n.payloadFormat}),a=O.default.recursive({},n.defaultData,e),i=p(n.payloadSchema,n.url,a,{setFromData:"get"===n.method.toLowerCase()}),s="get"!==n.method.toLowerCase()?l(n.payloadFormat,f(n.payloadSchema,a)):"",c="get"===n.method.toLowerCase()?[i,o]:[i,s,o];return t[n.method.toLowerCase()].apply(t,c).then(d)}}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(i)}},{key:"post",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",credentials:"same-origin",body:s(t),headers:Object.assign({},r,n)}).then(i)}},{key:"put",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,{method:"put",credentials:"same-origin",body:s(t),headers:n}).then(i)}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.fetch(e,{method:"delete",credentials:"same-origin",body:s(t),headers:n}).then(i)}}]),e}(),C=new E;t.default=C},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Config.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];if(e.path===this.rootRoute.path&&Array.isArray(e.routes))return void(this.childRoutes=e.routes.concat(this.childRoutes));var n=this.findChildRoute(t),r=Object.assign({},{routes:[]},e),o=r.routes[r.routes.length-1];o&&"**"===o.path||(o={path:"**"},r.routes.push(o));var a=n.findIndex(function(t){return t.path===e.path});a>=0?n[a]=r:n.unshift(r)}},{key:"findChildRoute",value:function(e){var t=this.childRoutes;return e&&e.forEach(function(e){var n=t.find(function(t){return t.path===e});if(!n)throw new Error("Parent path "+e+" could not be found.");t=n.routes}),t}},{key:"getRootRoute",value:function(){return this.rootRoute}},{key:"getChildRoutes",value:function(){return this.childRoutes}},{key:"remove",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.findChildRoute(t),r=n.findIndex(function(t){return t.path===e});return r<0?null:n.splice(r,1)[0]}}]),e}();window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new a,t.default=window.ss.routeRegister},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/Router.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=c.default.getAbsoluteBase(),n=d.default.resolve(t,e);return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function a(e){return new c.default.Route(e).match(c.default.current,{})}function i(){return c.default.absoluteBaseURL}function s(e){c.default.absoluteBaseURL=e;var t=document.createElement("a");t.href=e;var n=t.pathname;n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n="/"+n),c.default.base(n)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(48),c=r(l),u=n(34),d=r(u);c.default.oldshow||(c.default.oldshow=c.default.show),c.default.setAbsoluteBase=s.bind(c.default),c.default.getAbsoluteBase=i.bind(c.default),c.default.resolveURLToBase=o.bind(c.default),c.default.show=function(e){return function(t,n,r,o){return e(c.default.resolveURLToBase(t),n,r,o)}}(c.default.oldshow),c.default.routeAppliesToCurrentLocation=a,window.ss=window.ss||{},window.ss.router=window.ss.router||c.default,t.default=window.ss.router},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/ShortcodeSerialiser.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.createHTMLSanitiser=t.sanitiseShortCodeProperties=void 0;var o=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=t?{sep:",",quote:"",replacer:/[^a-z0-9\-_.]/gi}:{sep:" ",quote:'"',replacer:/"/g},r=Object.entries(e.properties).map(function(e){var t=a(e,2),r=t[0],o=t[1];return o?""+n.sep+r+"="+n.quote+(""+o).replace(n.replacer,"")+n.quote:null}).filter(function(e){return null!==e}).join("");return e.wrapped?"["+e.name+r+"]"+e.content+"[/"+e.name+"]":"["+e.name+r+"]"}},b=function(){var e=document.createElement("div");return function(t){return void 0===t?"":(e.textContent=t,e.innerHTML)}},v=function(e){var t=b();return Object.entries(e).reduce(function(e,n){var i=a(n,2),s=i[0],l=i[1];return o({},e,r({},s,t(l)))},{})};t.sanitiseShortCodeProperties=v,t.createHTMLSanitiser=b,t.default=m},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/SilverStripeComponent.js':function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2],o=t&&!n||!this.actions[e]?[]:this.actions[e],a=s(t,e);return t&&this.actions[a]&&(o=[].concat(r(o),r(this.actions[a]))),o}},{key:"getSortedActions",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.getActions(e,t,n).sort(function(e,t){return t.priority-e.priority||(e.text.toLocaleLowerCase()>t.text.toLocaleLowerCase()?1:-1)})}},{key:"addCommandWithUrlTest",value:function(e,t){return this.editorCommandsToUrlTestsMap[e]=t,this}},{key:"setDefaultCommand",value:function(e){return this.defaultCommand=e,this}},{key:"getDefaultCommand",value:function(){return this.defaultCommand}},{key:"getEditorCommandFromUrl",value:function(e){var t=this,n=this.getDefaultCommand(),r=Object.keys(this.editorCommandsToUrlTestsMap),o=r.find(function(n){return t.editorCommandsToUrlTestsMap[n]&&t.editorCommandsToUrlTestsMap[n].test(e)});return o&&(n=o),n}}]),e}();window.ss=window.ss||{},window.ss.tinymceactions=window.ss.tinymceactions||new l,t.default=window.ss.tinymceactions},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/formatWrittenNumber.js':function(e,t,n){"use strict";function r(e){var t=Number(e);return null!==e&&t>=0&&t<10?[a.default._t("Admin.WRITTEN_NUMBER_ZERO","zero"),a.default._t("Admin.WRITTEN_NUMBER_ONE","one"),a.default._t("Admin.WRITTEN_NUMBER_TWO","two"),a.default._t("Admin.WRITTEN_NUMBER_THREE","three"),a.default._t("Admin.WRITTEN_NUMBER_FOUR","four"),a.default._t("Admin.WRITTEN_NUMBER_FIVE","five"),a.default._t("Admin.WRITTEN_NUMBER_SIX","six"),a.default._t("Admin.WRITTEN_NUMBER_SEVEN","seven"),a.default._t("Admin.WRITTEN_NUMBER_EIGHT","eight"),a.default._t("Admin.WRITTEN_NUMBER_NINE","nine")][t]:t?String(t):null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(4),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/getFormState.js':function(e,t,n){"use strict";function r(e){return e.form&&e.form.formState||{}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/reduxFieldReducer.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(o){if(!t.payload.fieldId)throw new Error("Invalid fieldId");var a=e.fields||{},s=a[t.payload.fieldId]?e.fields[t.payload.fieldId]:n;return(0,i.default)(Object.assign({},e,{fields:Object.assign({},a,r({},t.payload.fieldId,Object.assign({},s,o(s))))}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(11),i=function(e){return e&&e.__esModule?e:{default:e}}(a)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/schemaFieldValues.js':function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return void 0===t?e:l.default.recursive(!0,e,t)}function a(e,t){return e?e.reduce(function(e,n){return e||a(n.children,t)},e.find(function(e){return e.name===t||e.name===t+"[]"})):null}function i(e,t){return t?t.fields.reduce(function(t,n){var o=a(e.fields,n.name);return o?"Structural"===o.type||!0===o.readOnly?t:Object.assign({},t,r({},n.name,n.value)):t},{}):{}}Object.defineProperty(t,"__esModule",{value:!0}),t.schemaMerge=o,t.findField=a,t.default=i;var s=n(21),l=function(e){return e&&e.__esModule?e:{default:e}}(s)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/lib/withDragDropContext.js':function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(50),o=n(51),a=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=(0,r.DragDropContext)(a.default)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/breadcrumbs/BreadcrumbsActions.js':function(e,t,n){"use strict";function r(e){return{type:a.default.SET_BREADCRUMBS,payload:{breadcrumbs:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setBreadcrumbs=r;var o=n("./client/src/state/breadcrumbs/BreadcrumbsActionTypes.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/records/RecordsActionTypes.js':function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/records/RecordsActions.js':function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return Object.keys(t).reduce(function(e,n){return e.replace(":"+n,t[n])},e)}function a(e,t,n){var r={recordType:e},a={Accept:"application/json"},i=t.toLowerCase();return function(t){t({type:d.default.FETCH_RECORDS_REQUEST,payload:r});var s="get"===i?[o(n,r),a]:[o(n,r),{},a];return c.default[i].apply(c.default,s).then(function(e){return e.json()}).then(function(n){t({type:d.default.FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})}).catch(function(n){throw t({type:d.default.FETCH_RECORDS_FAILURE,payload:{error:n,recordType:e}}),n})}}function i(e,t,n){var r={recordType:e},a={Accept:"application/json"},i=t.toLowerCase();return function(t){t({type:d.default.FETCH_RECORD_REQUEST,payload:r});var s="get"===i?[o(n,r),a]:[o(n,r),{},a];return c.default[i].apply(c.default,s).then(function(e){return e.json()}).then(function(n){t({type:d.default.FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})}).catch(function(n){throw t({type:d.default.FETCH_RECORD_FAILURE,payload:{error:n,recordType:e}}),n})}}function s(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i={recordType:e,id:t},s=n.toLowerCase(),l="get"===s?[o(r,i),a]:[o(r,i),{},a];return function(n){return n({type:d.default.DELETE_RECORD_REQUEST,payload:i}),c.default[s].apply(c.default,l).then(function(){n({type:d.default.DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})}).catch(function(r){throw n({type:d.default.DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}}),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRecords=a,t.fetchRecord=i,t.deleteRecord=s;var l=n(29),c=r(l),u=n("./client/src/state/records/RecordsActionTypes.js"),d=r(u)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/state/schema/SchemaActions.js':function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];return{type:l.default.SET_SCHEMA,payload:i({},t,{id:e,name:n})}}function o(e,t){return{type:l.default.SET_SCHEMA_STATE_OVERRIDES,payload:{id:e,stateOverride:t}}}function a(e,t){return{type:l.default.SET_SCHEMA_LOADING,payload:{id:e,loading:t}}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t {
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
- const selection = tinymce.activeEditor.selection;
- const selectionContent = selection.getContent() || '';
+ const editor = this.getElement().getEditor();
+ const selection = editor.getInstance().selection;
+ const selectionContent = editor.getSelection();
const tagName = selection.getNode().tagName;
const requireLinkText = tagName !== 'A' && selectionContent.trim() === '';
diff --git a/client/src/legacy/TinyMCE_sslink-external.js b/client/src/legacy/TinyMCE_sslink-external.js
index f5d55a0bd..4ae80c7a5 100644
--- a/client/src/legacy/TinyMCE_sslink-external.js
+++ b/client/src/legacy/TinyMCE_sslink-external.js
@@ -54,8 +54,9 @@ jQuery.entwine('ss', ($) => {
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
- const selection = tinymce.activeEditor.selection;
- const selectionContent = selection.getContent() || '';
+ const editor = this.getElement().getEditor();
+ const selection = editor.getInstance().selection;
+ const selectionContent = editor.getSelection();
const tagName = selection.getNode().tagName;
const requireLinkText = tagName !== 'A' && selectionContent.trim() === '';