diff --git a/client/dist/js/TinyMCE_sslink-email.js b/client/dist/js/TinyMCE_sslink-email.js
index 2ec3e85d9..0d5d7d03d 100644
--- a/client/dist/js/TinyMCE_sslink-email.js
+++ b/client/dist/js/TinyMCE_sslink-email.js
@@ -1 +1 @@
-!function(){"use strict";var t={648:function(t){t.exports=Injector},595:function(t){t.exports=InsertLinkModal},363:function(t){t.exports=React},691:function(t){t.exports=ReactDomClient},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}!function(){var t=s(i(754)),e=s(i(196)),n=s(i(363)),o=i(691),r=s(i(311)),a=i(595),l=i(648);function s(t){return t&&t.__esModule?t:{default:t}}const d="sslinkemail";e.default.addAction("sslink",{text:t.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:t=>t.execCommand(d),priority:51},editorIdentifier).addCommandWithUrlTest(d,/^mailto:/);const c={init(t){t.addCommand(d,(()=>{window.jQuery(`#${t.id}`).entwine("ss").openLinkEmailDialog()}))}},u="insert-link__dialog-wrapper--email",m=(0,l.loadComponent)((0,a.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));r.default.entwine("ss",(e=>{e("textarea.htmleditor").entwine({openLinkEmailDialog(){let t=e(`#${u}`);t.length||(t=e(`
`),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(`#${u}`).entwine({ReactRoot:null,renderModal(e){var i=this;const r=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),d="A"!==l.getNode().tagName&&""===s.trim();let c=this.getReactRoot();c||(c=(0,o.createRoot)(this[0]),this.setReactRoot(c)),c.render(n.default.createElement(m,{isOpen:e,onInsert:function(){return i.handleInsert(...arguments)},onClosed:()=>this.close(),title:t.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:d}))},getOriginalAttributes(){const t=this.getElement().getEditor(),i=e(t.getSelectedNode()),n=(i.attr("href")||"").split("?");let o=n[0].replace(/^mailto:/,"").split("?")[0];o.match(/.+@.+\..+/)||(o="");const r=n[1]?n[1].match(/subject=([^&]+)/):"";return{Link:o,Subject:r?decodeURIComponent(r[1]):"",Description:i.attr("title")}},buildAttributes(t){const e=this._super(t);let i="",n=e.href.replace(/^mailto:/,"").split("?")[0];return n.match(/.+@.+\..+/)||(n=""),n&&(i=`mailto:${n}`),i&&t.Subject&&(i=`${i}?subject=${encodeURIComponent(t.Subject)}`),e.href=i,delete e.target,e}})})),tinymce.PluginManager.add(d,(t=>c.init(t)))}()}();
\ No newline at end of file
+!function(){"use strict";var t={648:function(t){t.exports=Injector},595:function(t){t.exports=InsertLinkModal},363:function(t){t.exports=React},691:function(t){t.exports=ReactDomClient},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}!function(){var t=s(i(754)),e=s(i(196)),n=s(i(363)),o=i(691),r=s(i(311)),a=i(595),l=i(648);function s(t){return t&&t.__esModule?t:{default:t}}const d="sslinkemail";e.default.addAction("sslink",{text:t.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:t=>t.execCommand(d),priority:51},editorIdentifier).addCommandWithUrlTest(d,/^mailto:/);const c={init(t){t.addCommand(d,(()=>{window.jQuery(`#${t.id}`).entwine("ss").openLinkEmailDialog()}))}},u="insert-link__dialog-wrapper--email",m=(0,l.loadComponent)((0,a.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));r.default.entwine("ss",(e=>{e("textarea.htmleditor").entwine({openLinkEmailDialog(){let t=e(`#${u}`);t.length||(t=e(`
`),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(`#${u}`).entwine({ReactRoot:null,renderModal(e){var i=this;const r=this.getOriginalAttributes(),a=this.getRequireLinkText();let l=this.getReactRoot();l||(l=(0,o.createRoot)(this[0]),this.setReactRoot(l)),l.render(n.default.createElement(m,{isOpen:e,onInsert:function(){return i.handleInsert(...arguments)},onClosed:()=>this.close(),title:t.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:a}))},getOriginalAttributes(){const t=this.getElement().getEditor(),i=e(t.getSelectedNode()),n=(i.attr("href")||"").split("?");let o=n[0].replace(/^mailto:/,"").split("?")[0];o.match(/.+@.+\..+/)||(o="");const r=n[1]?n[1].match(/subject=([^&]+)/):"";return{Link:o,Subject:r?decodeURIComponent(r[1]):"",Description:i.attr("title")}},buildAttributes(t){const e=this._super(t);let i="",n=e.href.replace(/^mailto:/,"").split("?")[0];return n.match(/.+@.+\..+/)||(n=""),n&&(i=`mailto:${n}`),i&&t.Subject&&(i=`${i}?subject=${encodeURIComponent(t.Subject)}`),e.href=i,delete e.target,e}})})),tinymce.PluginManager.add(d,(t=>c.init(t)))}()}();
\ 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 20715339c..9c28db71d 100644
--- a/client/dist/js/TinyMCE_sslink-external.js
+++ b/client/dist/js/TinyMCE_sslink-external.js
@@ -1 +1 @@
-!function(){"use strict";var e={648:function(e){e.exports=Injector},595:function(e){e.exports=InsertLinkModal},363:function(e){e.exports=React},691:function(e){e.exports=ReactDomClient},196:function(e){e.exports=TinyMCEActionRegistrar},754:function(e){e.exports=i18n},311:function(e){e.exports=jQuery}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}!function(){var e=s(n(754)),t=s(n(196)),i=s(n(363)),r=n(691),o=s(n(311)),a=n(595),l=n(648);function s(e){return e&&e.__esModule?e:{default:e}}t.default.addAction("sslink",{text:e.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onAction:e=>e.execCommand("sslinkexternal"),priority:70},editorIdentifier);const d={init(e){e.addCommand("sslinkexternal",(()=>{window.jQuery(`#${e.id}`).entwine("ss").openLinkExternalDialog()}))}},c="insert-link__dialog-wrapper--external",u=(0,l.loadComponent)((0,a.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));o.default.entwine("ss",(t=>{t("textarea.htmleditor").entwine({openLinkExternalDialog(){let e=t(`#${c}`);e.length||(e=t(`
`),t("body").append(e)),e.addClass("insert-link__dialog-wrapper"),e.setElement(this),e.open()}}),t(`#${c}`).entwine({ReactRoot:null,renderModal(t){var n=this;const o=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),d="A"!==l.getNode().tagName&&""===s.trim();let c=this.getReactRoot();c||(c=(0,r.createRoot)(this[0]),this.setReactRoot(c)),c.render(i.default.createElement(u,{isOpen:t,onInsert:function(){return n.handleInsert(...arguments)},onClosed:()=>this.close(),title:e.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:o,identifier:"Admin.InsertLinkExternalModal",requireLinkText:d}))},buildAttributes(e){const t=this._super(e);let n=t.href;return n.match(/:\/\//)||(n=`${window.location.protocol}//${n}`),n=n.replace(/.*:\/\/(#.*)$/,"$1"),n.match(/:\/\/$/)&&(n=""),t.href=n,t}})})),tinymce.PluginManager.add("sslinkexternal",(e=>d.init(e)))}()}();
\ No newline at end of file
+!function(){"use strict";var e={648:function(e){e.exports=Injector},595:function(e){e.exports=InsertLinkModal},363:function(e){e.exports=React},691:function(e){e.exports=ReactDomClient},196:function(e){e.exports=TinyMCEActionRegistrar},754:function(e){e.exports=i18n},311:function(e){e.exports=jQuery}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}!function(){var e=s(n(754)),t=s(n(196)),i=s(n(363)),r=n(691),o=s(n(311)),a=n(595),l=n(648);function s(e){return e&&e.__esModule?e:{default:e}}t.default.addAction("sslink",{text:e.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onAction:e=>e.execCommand("sslinkexternal"),priority:70},editorIdentifier);const d={init(e){e.addCommand("sslinkexternal",(()=>{window.jQuery(`#${e.id}`).entwine("ss").openLinkExternalDialog()}))}},c="insert-link__dialog-wrapper--external",u=(0,l.loadComponent)((0,a.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));o.default.entwine("ss",(t=>{t("textarea.htmleditor").entwine({openLinkExternalDialog(){let e=t(`#${c}`);e.length||(e=t(`
`),t("body").append(e)),e.addClass("insert-link__dialog-wrapper"),e.setElement(this),e.open()}}),t(`#${c}`).entwine({ReactRoot:null,renderModal(t){var n=this;const o=this.getOriginalAttributes(),a=this.getRequireLinkText();let l=this.getReactRoot();l||(l=(0,r.createRoot)(this[0]),this.setReactRoot(l)),l.render(i.default.createElement(u,{isOpen:t,onInsert:function(){return n.handleInsert(...arguments)},onClosed:()=>this.close(),title:e.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:o,identifier:"Admin.InsertLinkExternalModal",requireLinkText:a}))},buildAttributes(e){const t=this._super(e);let n=t.href;return n.match(/:\/\//)||(n=`${window.location.protocol}//${n}`),n=n.replace(/.*:\/\/(#.*)$/,"$1"),n.match(/:\/\/$/)&&(n=""),t.href=n,t}})})),tinymce.PluginManager.add("sslinkexternal",(e=>d.init(e)))}()}();
\ No newline at end of file
diff --git a/client/dist/js/TinyMCE_sslink.js b/client/dist/js/TinyMCE_sslink.js
index 94520b298..6d958308e 100644
--- a/client/dist/js/TinyMCE_sslink.js
+++ b/client/dist/js/TinyMCE_sslink.js
@@ -1 +1 @@
-!function(){"use strict";var t={265:function(t){t.exports=ShortcodeSerialiser},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}!function(){var t=r(n(196)),e=r(n(311)),i=n(265),o=r(n(754));function r(t){return t&&t.__esModule?t:{default:t}}const s={init(n){const i=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl",r=o.default._t("Admin.INSERT_LINK","Insert link"),s=o.default.inject(o.default._t("Admin.INSERT_LINK_WITH_SHORTCUT","Insert link {shortcut}"),{shortcut:`[${i}+K]`}),l=t.default.getSortedActions("sslink",n.getParam("editorIdentifier"),!0).map((t=>Object.assign({},t,{onAction:()=>t.onAction(n)})));return n.ui.registry.addMenuButton("sslink",{icon:"link",tooltip:s,fetch:t=>t(l)}),n.ui.registry.addNestedMenuItem("sslink",{icon:"link",text:r,getSubmenuItems:()=>l}),n.addShortcut("Meta+k","Open link menu",(()=>{(0,e.default)(`[aria-label^="${r}"] > button`,n.container).first().click()})),n.ui.registry.addButton("sslink-edit",{text:o.default._t("Admin.EDIT_LINK","Edit link"),onAction:function(){const e=tinymce.activeEditor.selection.getNode().getAttribute("href");e&&n.execCommand(t.default.getEditorCommandFromUrl(e))}}),n.ui.registry.addButton("sslink-remove",{text:o.default._t("Admin.REMOVE_LINK","Remove link"),onAction:()=>this.handleRemoveLinkClick(n)}),n.ui.registry.addContextToolbar("sslink",{predicate:t=>n.dom.is(t,"a[href]"),position:"node",scope:"node",items:"sslink-edit sslink-remove"}),{getMetadata(){return{name:"Silverstripe Link",url:"https://docs.silverstripe.org/en/4/developer_guides/forms/field_types/htmleditorfield"}}}},handleRemoveLinkClick(t){const e=t.execCommand("unlink"),n=t.selection.getNode();return n&&void 0!==n.normalize&&n.normalize(),e}};e.default.entwine("ss",(t=>{t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch(){this._clearModal()},_clearModal(){const t=this.getReactRoot();t&&(t.unmount(),this.setReactRoot(null))},open(){const t=this.getElement().getEditor().getInstance();this.setBookmark(t.selection.getBookmark(2,!0)),this.renderModal(!0)},close(){this.setData({}),this.renderModal(!1)},renderModal(){},handleInsert(t){this.getElement().getEditor().getInstance().selection.moveToBookmark(this.getBookmark());const e=this.buildAttributes(t),n=(0,i.createHTMLSanitiser)()(t.Text);return this.insertLinkInEditor(e,n),this.close(),Promise.resolve()},buildAttributes(t){let{Anchor:e,Link:n,TargetBlank:i,Description:o}=t,r=e&&e.length?`#${e}`:"";r=r.replace(/^#+/,"#");return{href:`${n}${r}`,target:i?"_blank":"",title:o}},insertLinkInEditor(t,e){const n=this.getElement().getEditor();n.insertLink(t,null,e),n.addUndo(),n.repaint();const i=n.getInstance().selection;setTimeout((()=>i&&i.collapse()),0)},getOriginalAttributes(){const e=this.getElement().getEditor(),n=t(e.getSelectedNode()),i=(n.attr("href")||"").split("#");return{Link:i[0]||"",Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}}})})),tinymce.PluginManager.add("sslink",(t=>s.init(t)))}()}();
\ No newline at end of file
+!function(){"use strict";var t={265:function(t){t.exports=ShortcodeSerialiser},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}!function(){var t=r(n(196)),e=r(n(311)),i=n(265),o=r(n(754));function r(t){return t&&t.__esModule?t:{default:t}}const s={init(n){const i=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl",r=o.default._t("Admin.INSERT_LINK","Insert link"),s=o.default.inject(o.default._t("Admin.INSERT_LINK_WITH_SHORTCUT","Insert link {shortcut}"),{shortcut:`[${i}+K]`}),l=t.default.getSortedActions("sslink",n.getParam("editorIdentifier"),!0).map((t=>Object.assign({},t,{onAction:()=>t.onAction(n)})));return n.ui.registry.addMenuButton("sslink",{icon:"link",tooltip:s,fetch:t=>t(l)}),n.ui.registry.addNestedMenuItem("sslink",{icon:"link",text:r,getSubmenuItems:()=>l}),n.addShortcut("Meta+k","Open link menu",(()=>{(0,e.default)(`[aria-label^="${r}"] > button`,n.container).first().click()})),n.ui.registry.addButton("sslink-edit",{text:o.default._t("Admin.EDIT_LINK","Edit link"),onAction:function(){const e=tinymce.activeEditor.selection.getNode().getAttribute("href");e&&n.execCommand(t.default.getEditorCommandFromUrl(e))}}),n.ui.registry.addButton("sslink-remove",{text:o.default._t("Admin.REMOVE_LINK","Remove link"),onAction:()=>this.handleRemoveLinkClick(n)}),n.ui.registry.addContextToolbar("sslink",{predicate:t=>n.dom.is(t,"a[href]"),position:"node",scope:"node",items:"sslink-edit sslink-remove"}),{getMetadata(){return{name:"Silverstripe Link",url:"https://docs.silverstripe.org/en/4/developer_guides/forms/field_types/htmleditorfield"}}}},handleRemoveLinkClick(t){const e=t.execCommand("unlink"),n=t.selection.getNode();return n&&void 0!==n.normalize&&n.normalize(),e}};e.default.entwine("ss",(t=>{t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch(){this._clearModal()},_clearModal(){const t=this.getReactRoot();t&&(t.unmount(),this.setReactRoot(null))},open(){const t=this.getElement().getEditor().getInstance();this.setBookmark(t.selection.getBookmark(2,!0)),this.renderModal(!0)},close(){this.setData({}),this.renderModal(!1)},renderModal(){},checkNodeMatches(t,e){return t===e||1===e.children.length&&t===e.children[0]},linkCanWrapSelection(t,e){const n=t.getSelection()||"",i=e.getNode();if(n)return""!==n.trim();const o=document.createElement(i.nodeName);if(o.textContent="Check the outer HTML",o.outerHTML.includes("Check the outer HTML"))return!1;if(this.checkNodeMatches(i,e.getSel().focusNode)&&this.checkNodeMatches(i,e.getSel().anchorNode)){if(1===tinymce.activeEditor.dom.createFragment(`${i.outerHTML} `).childNodes.length)return!0}return!1},getRequireLinkText(){const t=this.getElement().getEditor(),e=t.getInstance().selection,n=this.linkCanWrapSelection(t,e);return"A"!==e.getNode().tagName&&!n},handleInsert(t){this.getElement().getEditor().getInstance().selection.moveToBookmark(this.getBookmark());const e=this.buildAttributes(t),n=(0,i.createHTMLSanitiser)()(t.Text);return this.insertLinkInEditor(e,n),this.close(),Promise.resolve()},buildAttributes(t){let{Anchor:e,Link:n,TargetBlank:i,Description:o}=t,r=e&&e.length?`#${e}`:"";r=r.replace(/^#+/,"#");return{href:`${n}${r}`,target:i?"_blank":"",title:o}},insertLinkInEditor(t,e){const n=this.getElement().getEditor();n.insertLink(t,null,e),n.addUndo(),n.repaint();const i=n.getInstance().selection;setTimeout((()=>i&&i.collapse()),0)},getOriginalAttributes(){const e=this.getElement().getEditor(),n=t(e.getSelectedNode()),i=(n.attr("href")||"").split("#");return{Link:i[0]||"",Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}}})})),tinymce.PluginManager.add("sslink",(t=>s.init(t)))}()}();
\ No newline at end of file
diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js
index d32c434ca..e8e5e09a6 100644
--- a/client/dist/js/bundle.js
+++ b/client/dist/js/bundle.js
@@ -1,4 +1,4 @@
-(self.webpackChunksilverstripe_admin=self.webpackChunksilverstripe_admin||[]).push([[296],{13978:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(19755)),r=_(n(67294)),i=n(86706),s=n(20745),o=n(79655),l=_(n(94974)),d=_(n(15586)),u=_(n(80507)),c=_(n(55766)),f=n(75378),p=_(n(4754)),h=n(11962),m=_(n(96869)),g=n(89250),v=n(80195),b=_(n(3730));function _(e){return e&&e.__esModule?e:{default:e}}var y=class{constructor(e,t){this.store=e,this.client=t;const n=l.default.get("absoluteBaseUrl");d.default.setAbsoluteBase(n),this.shouldConfirmBeforeUnload=this.shouldConfirmBeforeUnload.bind(this)}setStore(e){this.store=e}setClient(e){this.client=e}start(e){this.matchesReactRoute(e)?this.initReactRouter():this.initLegacyRouter();const t=window.onbeforeunload;window.onbeforeunload=()=>this.shouldConfirmBeforeUnload()?p.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved."):"function"==typeof t?t():void 0}matchesReactRoute(e){const t=l.default.get("sections"),n=d.default.resolveURLToBase(e).replace(/\/$/,"");return!!t.find((e=>{const t=d.default.resolveURLToBase(e.url).replace(/\/$/,"");return!!e.reactRouter&&n.match(t)}))}initReactRouter(){u.default.updateRootRoute({component:c.default});const e=u.default.getRootRoute(),t=(0,o.createBrowserRouter)((0,o.createRoutesFromElements)(r.default.createElement(g.Route,{path:e.path,element:r.default.createElement(e.component,null,r.default.createElement(b.default,{shouldBlockFn:this.shouldConfirmBeforeUnload,blockMessage:this.getUnsavedChangesMessage()}))},u.default.getChildRoutes().map((e=>r.default.createElement(g.Route,{key:e.path,path:e.path,element:r.default.createElement(e.component,null)}))))),{basename:(0,v.joinUrlPaths)(l.default.get("baseUrl"),l.default.get("adminUrl"))});(0,s.createRoot)(document.getElementsByClassName("cms-content")[0]).render(r.default.createElement(f.ApolloProvider,{client:this.client},r.default.createElement(i.Provider,{store:this.store},r.default.createElement(o.RouterProvider,{router:t}))))}initLegacyRouter(){const e=l.default.get("sections"),t=this.store;(0,d.default)("*",((e,n)=>{const a=this.getUnsavedChangesMessage();this.shouldConfirmBeforeUnload()&&!window.confirm(a)||(e.store=t,n())}));let n=null;e.forEach((e=>{let t=d.default.resolveURLToBase(e.url);t=t.replace(/\/$/,""),t=`${t}(/*?)?`,(0,d.default)(t,((e,t)=>{if("complete"!==document.readyState||e.init)return void t();n||(n=window.location.pathname);const r=e.state&&e.state.__forceReload;(e.path!==n||r)&&(n=e.path.replace(/#.*$/,""),(0,a.default)(".cms-container").entwine("ss").handleStateChange(null,e.state))}))}));(0,s.createRoot)(document.createElement("div")).render(r.default.createElement("a",{role:"none",onClick:()=>{}})),d.default.start()}shouldConfirmBeforeUnload(){const e=this.store.getState(),t=e.unsavedForms||[],n=e.form.formSchemas;return t.filter((t=>{const a=Object.values(n).find((e=>e.name===t.name));return!!(a&&a.state&&a.state.notifyUnsavedChanges)&&(0,h.isDirty)(t.name,m.default)(e)})).length>0}getUnsavedChangesMessage(){return p.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.")}};t.default=y},56029:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(71745),i=(a=n(2395))&&a.__esModule?a:{default:a};var s=e=>{const t={};return e&&e.__schema.types.forEach((e=>{e.possibleTypes&&(t[e.name]=e.possibleTypes.map((e=>e.name)))})),new r.InMemoryCache({possibleTypes:t,dataIdFromObject:i.default,addTypename:!0})};t.default=s},56062:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(75378),r=l(n(94974)),i=l(n(85478)),s=l(n(66783)),o=l(n(56029));function l(e){return e&&e.__esModule?e:{default:e}}var d=async e=>{const t=r.default.getSection("SilverStripe\\Admin\\LeftAndMain").graphql,n=t&&t.cachedTypenames;let l;try{l=await(0,i.default)(e,n)}catch(e){l=null}const d=(0,o.default)(l),u=(0,s.default)(e),c=(0,a.from)(u);return new a.ApolloClient({cache:d,link:c})};t.default=d},66783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(75378),i=n(63200),s=(a=n(94974))&&a.__esModule?a:{default:a},o=n(80195);var l=e=>{const t=new r.HttpLink({uri:(0,o.joinUrlPaths)(e,"admin/graphql"),fetchOptions:{credentials:"same-origin",headers:{accept:"application/json"}}}),n=(0,i.onError)((e=>{let{networkError:t}=e;t&&console.log(`[Network error]: ${t}`)}));return[new r.ApolloLink(((e,t)=>(e.setContext({headers:{"X-CSRF-TOKEN":s.default.get("SecurityID")}}),t(e)))),n,t]};t.default=l},2395:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=e=>{const t=e.id||e.ID;return t&&t>=0&&e.__typename?`${e.__typename}:${t}`:null};t.default=n},85478:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(94301))&&a.__esModule?a:{default:a},i=n(80195);const s=e=>{const t=e.data;return t.__schema.types=t.__schema.types.filter((e=>null!==e.possibleTypes)),t},o=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};var l=async function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=!!document.body.getAttribute("data-graphql-legacy"),a=[(0,i.joinUrlPaths)(e,"_graphql/admin.types.graphql"),(0,i.joinUrlPaths)(e,"admin.types.graphql")],l=[(0,i.joinUrlPaths)(e,"admin/graphql/types"),(0,i.joinUrlPaths)(e,"assets/admin.types.graphql")];let d,u;n?(t&&l.reverse(),[d,u]=l):[d,u]=a;const c={method:"GET",headers:{"Content-Type":"application/json"},uri:e,credentials:"same-origin"},f=async e=>(0,r.default)(e,c).then(o).then((e=>e.json())).then(s);let p;try{p=await f(d)}catch(e){if(!u)return Promise.reject(e);try{p=await f(u)}catch(e){return Promise.reject(e)}}return Promise.resolve(p)};t.default=l},59467:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,n=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension;if("function"==typeof t)return t(e);if("function"==typeof n)return(0,a.compose)(e,n());return e};var a=n(14890)},10374:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(54582)),r=l(n(39062)),i=l(n(94184)),s=n(48834),o=l(n(98028));function l(e){return e&&e.__esModule?e:{default:e}}const d=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.extraClass?e.extraClass.split(" ").reduce(((e,t)=>({...e,[t]:!0})),{}):{};"string"==typeof e.data.pristineClass&&(n[e.data.pristineClass]=t),"string"==typeof e.data.dirtyClass&&(n[e.data.dirtyClass]=!t);const a=t?e.data.pristineTitle:e.data.dirtyTitle,r=t?e.data.pristineIcon:e.data.dirtyIcon;return{...e,title:a||e.title,icon:r||e.icon,extraClass:(0,i.default)(n)}};var u=()=>{a.default.transform("field-holders",(e=>{["FieldGroup"].forEach((t=>e.component("FieldGroup",o.default,`${t}Holder`)))})),a.default.transform("form-action-changed",(e=>{e.form.alterSchema("*",(e=>(e.mutateField("action_save",(t=>{const n=e.isPristine();return d(t,n)})),e.mutateField("action_publish",(t=>{const n=t.data.isPublished&&!t.data.isModified&&e.isPristine();return d(t,n)})),e.getState())))})),a.default.transform("schema-validation",(e=>{e.form.addValidation("*",((e,t,n)=>{const a=new r.default(e),i=Object.keys(e).reduce(((e,t)=>{const r=(0,s.findField)(n.fields,t);if(!r)return e;const{valid:i,errors:o}=a.validateFieldSchema(r);return i?e:{...e,[t]:o}}),{});return t.addErrors(i),t.getState()}))}))};t.default=u},27274:function(e,t,n){"use strict";var a=h(n(54582)),r=n(14890),i=h(n(53894)),s=h(n(94974)),o=h(n(56062)),l=n(32212),d=h(n(89521)),u=h(n(24180)),c=h(n(59467)),f=h(n(10374)),p=h(n(13978));function h(e){return e&&e.__esModule?e:{default:e}}window.ss=window.ss||{},window.onload=async function(){const e=s.default.get("absoluteBaseUrl"),t=await(0,o.default)(e);(0,d.default)(),(0,u.default)();const n=[i.default],h=s.default.get("debugging");let m=(0,r.applyMiddleware)(...n);h&&(m=(0,c.default)(m));const g=m(r.createStore);window.ss.apolloClient=t;const v=new p.default(null,t);(0,f.default)(),a.default.init((()=>{const e=(0,r.combineReducers)(a.default.reducer.getAll()),t=g(e,{});t.dispatch((0,l.setConfig)(s.default.getAll())),a.default.reducer.setStore(t),window.ss.store=t,v.setStore(t),v.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")})),window.setTimeout((()=>a.default.load()),0)}},89521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(11962),r=te(n(54582)),i=te(n(95393)),s=te(n(37294)),o=te(n(22602)),l=te(n(45332)),d=te(n(74898)),u=te(n(19423)),c=te(n(81463)),f=te(n(63182)),p=te(n(79629)),h=te(n(49954)),m=te(n(41370)),g=te(n(5110)),v=te(n(88940)),b=te(n(71375)),_=te(n(63980)),y=te(n(20693)),w=te(n(65732)),O=te(n(7162)),C=te(n(618)),E=te(n(21677)),T=te(n(82432)),S=te(n(75917)),P=te(n(61404)),M=te(n(40505)),j=te(n(59644)),D=te(n(52935)),k=te(n(59888)),R=te(n(48297)),I=te(n(55742)),x=te(n(65963)),A=te(n(23296)),N=te(n(3080)),F=te(n(36800)),L=te(n(80384)),$=te(n(34411)),U=te(n(18871)),B=te(n(57129)),V=te(n(98031)),W=te(n(72543)),H=te(n(85362)),q=te(n(97023)),z=te(n(97228)),G=te(n(20164)),K=te(n(62266)),Y=te(n(65693)),X=te(n(1922)),Q=te(n(92227)),J=te(n(71255)),Z=te(n(49331)),ee=te(n(6734));function te(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({ActionMenu:i.default,Badge:s.default,Button:o.default,BackButton:l.default,TextField:d.default,HiddenField:u.default,DateField:c.default,TimeField:f.default,DatetimeField:p.default,CheckboxField:h.default,CheckboxSetField:m.default,OptionsetField:g.default,GridField:v.default,GridFieldActions:b.default,FieldGroup:D.default,SingleSelectField:_.default,PopoverField:y.default,HeaderField:w.default,LiteralField:O.default,HtmlReadonlyField:C.default,LookupField:E.default,CompositeField:T.default,Tabs:P.default,TabItem:M.default,FormAction:j.default,LabelField:S.default,TreeDropdownField:k.default,Preview:N.default,ReduxForm:F.default,ReduxFormField:a.Field,Form:x.default,FormAlert:A.default,FormBuilderModal:R.default,NotFoundComponent:I.default,UsedOnTable:L.default,Loading:$.default,CircularLoading:U.default,VersionedBadge:B.default,ViewModeToggle:V.default,ResizeAware:W.default,Tag:H.default,TagList:q.default,CompactTagList:z.default,Tip:G.default,Search:K.default,SearchToggle:Y.default,HtmlEditorField:X.default,NumberField:Q.default,PopoverOptionSet:J.default,ToastsContainer:Z.default,ListboxField:ee.default})}},24180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=b(n(54582)),r=n(14890),i=n(11962),s=b(n(18373)),o=b(n(54191)),l=b(n(81951)),d=b(n(20430)),u=b(n(5452)),c=b(n(54558)),f=b(n(80573)),p=b(n(13346)),h=b(n(11146)),m=b(n(32659)),g=b(n(22793)),v=b(n(84231));function b(e){return e&&e.__esModule?e:{default:e}}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.combineReducers)({formState:i.reducer,formSchemas:o.default});a.default.reducer.registerMany({config:s.default,form:t,records:l.default,breadcrumbs:d.default,treeDropdownField:u.default,tabs:c.default,mobileMenu:f.default,unsavedForms:p.default,usedOn:h.default,viewMode:g.default,toasts:v.default,...e}),a.default.transform("admin",(e=>{e.reducer("form",m.default)}))}},61534:function(e,t,n){"use strict";n(28432),n(77300),n(12523),n(46844),n(58794),n(91044),n(94033),n(39432),n(10452),n(99324),n(66273),n(62746),n(86673),n(92173),n(65986),n(64482),n(4567),n(77511),n(64300),n(16741),n(31968),n(31643),n(63063),n(16089),n(14755),n(50194),n(37386),n(87577),n(43109),n(4193),n(40127),n(44368),n(40256),n(29094),n(60462),n(49841),n(99511),n(14536),n(96582),n(1488),n(69860),n(33281),n(79035),n(8592),n(46508),n(28170),n(53438),n(83361),n(94813),n(72472),n(55488),n(40829),n(47157),n(53877),n(71080),n(37904),n(97976),n(8145),n(87746),n(86317),n(87603),n(59628),n(70184),n(91673),n(60128),n(87872),n(60140),n(57006),n(19602),n(27729),n(54218),n(98441),n(96007),n(43893),n(1913),n(88854),n(47640),n(50628),n(62596),n(73843),n(49266),n(95075),n(49958),n(60395),n(41221),n(88615),n(82165),n(56970),n(73366),n(81047),n(87594),n(15878),n(75350),n(8162),n(76406),n(8298),n(40303),n(44686),n(49785),n(13305),n(57893),n(49414),n(42886),n(17106),n(27274)},34625:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>r.default.createElement("div",{className:"accordion",role:"tablist","aria-multiselectable":"true"},e.children);t.default=i},56448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>{const t=`${e.groupid}_Header`,n=`${e.groupid}_Items`,a=n.replace(/\\/g,"_"),i=t.replace(/\\/g,"_"),s={id:a,"aria-expanded":!0,className:"list-group list-group-flush collapse show",role:"tabpanel","aria-labelledby":t};return r.default.createElement("div",{className:"accordion__block"},r.default.createElement("a",{className:"accordion__title","data-toggle":"collapse",href:`#${a}`,"aria-expanded":"true","aria-controls":n,id:i,role:"tab"},e.title),r.default.createElement("div",s,e.children))};t.default=i},95393:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(45697)),i=n(53556),s=l(n(4754)),o=l(n(94184));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.setState({isOpen:!this.state.isOpen})),0)}render(){const{dropdownToggleProps:e,dropdownMenuProps:t,dropdownToggleClassNames:n,className:r,toggleCallback:l,...d}=this.props,c=(0,o.default)(n,e.className),f=(0,o.default)("action-menu__dropdown",t.className);return a.default.createElement(i.Dropdown,u({className:(0,o.default)("action-menu",r),isOpen:this.state.isOpen,toggle:this.toggle},d),a.default.createElement(i.DropdownToggle,u({className:c,"aria-label":s.default._t("Admin.ACTIONS","View actions")},e)),a.default.createElement(i.DropdownMenu,u({className:f},t),this.props.children))}}c.propTypes={toggleCallback:r.default.func,dropdownToggleClassNames:r.default.arrayOf(r.default.string)},c.defaultProps={className:"",dropdownToggleClassNames:["action-menu__toggle","btn","btn--no-text","btn--icon-xl","font-icon-dot-3"],dropdownToggleProps:{},dropdownMenuProps:{}};var f=c;t.default=f},37294:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statuses=t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(94184)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}const l=["default","info","success","warning","danger","primary","secondary"];t.statuses=l;class d extends a.PureComponent{render(){const{status:e,inverted:t,className:n,message:i}=this.props;if(!e)return null;const s=t?`badge-${e}--inverted`:"",o=(0,r.default)(n,"badge",`badge-${e}`,s);return a.default.createElement("span",{className:o},i)}}d.propTypes={message:i.default.node,status:i.default.oneOf(l),className:i.default.string,inverted:i.default.bool},d.defaultProps={status:"default",className:"badge-pill",inverted:!1};var u=d;t.default=u},71691:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(86706),i=d(n(94184)),s=d(n(45697)),o=d(n(67388)),l=d(n(5257));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.Component{getLastCrumb(){return this.props.crumbs&&this.props.crumbs[this.props.crumbs.length-1]}renderBreadcrumbs(){return this.props.crumbs?this.props.crumbs.slice(0,-1).map((e=>a.default.createElement("li",{key:e.text,className:"breadcrumb__item"},a.default.createElement(l.default,{className:"breadcrumb__item-title",href:e.href,onClick:e.onClick},e.text)))):null}renderLastCrumb(){const e=this.getLastCrumb();return e?a.default.createElement("div",{className:"breadcrumb__item breadcrumb__item--last"},a.default.createElement("h2",{className:"breadcrumb__item-title"},e.text,e.icon&&this.renderIcons([e.icon]),e.icons&&this.renderIcons(e.icons))):null}renderIcons(e){return e.map(((e,t)=>{const{nodeName:n,className:r,hasRestrictedAccess:s,...l}=e;let d={...l};const u=(0,i.default)(["breadcrumb__icon",r]);return d={tabIndex:"0",...d},d.hasOwnProperty("onClick")&&(d={role:"button",...d}),d.key=`breadcrumb-icon-${t}`,"FileStatusIcon"===n?(d.fileID=0,d.hasRestrictedAccess=s,d.extraClassName=u,a.default.createElement(o.default,d)):(d.className=u,a.default.createElement("span",d))}))}render(){return a.default.createElement("div",{className:"breadcrumb__container fill-height flexbox-area-grow"},this.props.crumbs&&this.props.crumbs.length>1&&a.default.createElement("div",{className:"breadcrumb__list-container"},a.default.createElement("ol",{className:"breadcrumb"},this.renderBreadcrumbs())),this.renderLastCrumb())}}t.Component=c,c.propTypes={crumbs:s.default.arrayOf(s.default.shape({onClick:s.default.func,text:s.default.string,icon:s.default.shape({nodeName:s.default.string,className:s.default.string,onClick:s.default.func,action:e=>{if(e.action)throw new Error("action: no longer used")}}),icons:s.default.arrayOf(s.default.shape({nodeName:s.default.string,className:s.default.string,onClick:s.default.func}))}))};var f=(0,r.connect)((function(e){return{crumbs:e.breadcrumbs}}))(c);t.default=f},45332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=o(n(22602)),i=o(n(94184)),s=o(n(4754));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,...n}=e;return a.default.createElement(r.default,l({className:(0,i.default)(t,"back-button")},n))};d.propTypes=r.default.propTypes,d.defaultProps={...r.default.defaultProps,noText:!0,icon:"left-open-big",children:s.default._t("Admin.BACK","Back")};var u=d;t.default=u},22602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=n(53556),i=l(n(45697)),s=l(n(94184)),o=l(n(29258));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,noText:n,children:i,...o}=e;return a.default.createElement(r.Button,d({className:(0,s.default)(t,{"btn--no-text":n}),"aria-label":n?i:void 0},o),n?void 0:i)};u.propTypes={...r.Button.propTypes,noText:i.default.bool},u.defaultProps={...r.Button.defaultProps,noText:!1};var c=(0,o.default)(u);t.default=c},29258:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(94184));function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=t=>{let{icon:n,className:r,...s}=t;return a.default.createElement(e,o({className:(0,i.default)(r,n&&`font-icon-${n}`)},s))};return t.propTypes={...e.propTypes,icon:r.default.string},t.defaultProps=e.defaultProps,t.displayName=e.name,t};t.default=l},49954:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=s(n(67294)),r=s(n(98028)),i=s(n(31885));function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(i.default,o({},e,{type:"checkbox"}));t.Component=l;var d=e=>{const t=(0,r.default)(l);return a.default.createElement(t,o({},e,{hideLabels:!0}))};t.default=d},41370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(31885)),i=o(n(98028)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t`${e}`)):[]}getOptionProps(e,t){const n=this.getValues(),a=this.getItemKey(e,t);return{key:a,id:a,name:this.props.name,className:this.props.itemClass,disabled:e.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:n.indexOf(`${e.value}`)>-1,title:e.title,type:"checkbox"}}handleChange(e,t){if("function"==typeof this.props.onChange){const n=this.getValues(),a=this.props.source.filter(((e,a)=>this.getItemKey(e,a)===t.id?1===t.value:n.indexOf(`${e.value}`)>-1)).map((e=>`${e.value}`));this.props.onChange(e,{id:this.props.id,value:a})}}render(){return this.props.source?a.default.createElement("div",null,this.props.source.map(((e,t)=>a.default.createElement(r.default,d({},this.getOptionProps(e,t),{hideLabels:!0}))))):null}}t.Component=u,u.propTypes={className:s.default.string,extraClass:s.default.string,itemClass:s.default.string,id:s.default.string,name:s.default.string.isRequired,source:s.default.arrayOf(s.default.shape({value:s.default.oneOfType([s.default.string,s.default.number]),title:s.default.any,disabled:s.default.bool})),onChange:s.default.func,value:s.default.any,readOnly:s.default.bool,disabled:s.default.bool},u.defaultProps={extraClass:"",className:"",value:[]};var c=e=>{const t=(0,i.default)(u);return a.default.createElement(t,e)};t.default=c},82432:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(10259)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}class l extends a.Component{getLegend(){return"fieldset"===this.props.data.tag&&this.props.data.legend?(0,r.default)("legend",this.props.data.legend):null}getClassName(){return`${this.props.className} ${this.props.extraClass}`}render(){const e=this.getLegend(),t=this.props.data.tag||"div",n=this.getClassName();return a.default.createElement(t,{className:n},e,this.props.children)}}t.Component=l,l.propTypes={data:i.default.oneOfType([i.default.array,i.default.shape({tag:i.default.string,legend:i.default.string})]),extraClass:i.default.string},l.defaultProps={className:"",extraClass:""};var d=l;t.default=d},81463:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(98028)),r=d(n(30381)),i=d(n(68300)),s=d(n(4754)),o=d(n(45697)),l=n(74898);function d(e){return e&&e.__esModule?e:{default:e}}class u extends l.Component{render(){return super.render()}moment(){return r.default.locale(this.getLang()),(0,r.default)(...arguments)}getLang(){return(this.asHTML5()?this.props.isoLang:this.props.lang)||(0,r.default)().locale()}asHTML5(){return this.props.data.html5&&this.hasNativeSupport()}hasNativeSupport(){return this.props.modernizr.inputtypes.date}getInputProps(){const e=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:this.moment().endOf("month").format("L")}),t=this.asHTML5()?this.props.value:this.getLocalisedValue(),n=this.asHTML5()?"date":"text";return{...super.getInputProps(),type:n,value:t,placeholder:e}}getLocalisedValue(){return this.convertToLocalised(this.props.value)}isMultiline(){return!1}handleChange(e){const t=e.target.value;let n="";n=this.asHTML5()?t:this.convertToIso(t),"function"==typeof this.props.onChange&&this.triggerChange(e,n)}triggerChange(e,t){this.props.onChange(e,{id:this.props.id,value:t})}convertToIso(e){let t="";if(e){const n=this.moment(e,["L","YYYY-MM-DD"]);n.isValid()&&(t=n.format("YYYY-MM-DD"))}return t}convertToLocalised(e){let t="";if(e){const n=this.moment(e);n.isValid()&&(t=n.format("L"))}return t}}t.Component=u,u.propTypes={lang:o.default.string,isoLang:o.default.string,modernizr:o.default.object,data:o.default.shape({html5:o.default.bool})},u.defaultProps={modernizr:i.default,data:{}};var c=(0,a.default)(u);t.default=c},79629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(98028)),r=o(n(30381)),i=o(n(4754)),s=n(81463);function o(e){return e&&e.__esModule?e:{default:e}}const l="L LT";class d extends s.Component{getInputProps(){const e=i.default.inject(i.default._t("Admin.FormatExample","Example: {format}"),{format:this.moment().endOf("month").format(l)}),t=this.asHTML5()?"datetime-local":"text";return{...super.getInputProps(),type:t,placeholder:e}}isMultiline(){return!1}hasNativeSupport(){return this.props.modernizr.inputtypes["datetime-local"]}triggerChange(e,t){/^\d{4}-\d\d-\d\dT\d\d:\d\d$/.test(t)?this.props.onChange(e,{id:this.props.id,value:`${t}:00`}):this.props.onChange(e,{id:this.props.id,value:t})}convertToLocalised(e){r.default.locale(this.props.lang);let t="";if(e){const n=this.moment(e);n.isValid()&&(t=n.format(l))}return t}convertToIso(e){r.default.locale(this.props.lang);let t="";if(e){const n=[l,"L",r.default.ISO_8601],a=this.moment(e,n);a.isValid()&&(t=a.format("YYYY-MM-DDTHH:mm:ss"))}return t}}t.Component=d,d.propTypes=s.Component.propTypes,d.defaultProps=s.Component.defaultProps;var u=(0,a.default)(d);t.default=u},52935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(82432)),r=s(n(45697)),i=s(n(94184));function s(e){return e&&e.__esModule?e:{default:e}}class o extends a.default{getClassName(){return(0,i.default)("field-group-component",{"field-group-component__small-holder":this.props.smallholder},super.getClassName())}}o.propTypes={...a.default.propTypes,smallholder:r.default.bool},o.defaultProps={...a.default.defaultProps,smallholder:!0};var l=o;t.default=l},98028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=c(n(67294)),r=n(53556),i=d(n(10259)),s=d(n(94184)),o=d(n(45697)),l=c(n(20164));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}var f=function(e){class t extends a.Component{getMessage(){let e=null;this.props.message&&this.props.message.value&&(e=this.props.message);const t=this.props.meta;return t&&t.error&&t.touched&&(!e||t.dirty)&&(e=t.error),e}getHolderProps(){return{className:(0,s.default)({field:!0,[this.props.extraClass]:!0,readonly:this.props.readOnly}),id:this.props.holderId}}renderMessage(){const e=this.getMessage();if(!e)return null;const t=(0,s.default)(["form__field-message",`form__field-message--${e.type}`]),n=(0,i.default)("div",e.value);return a.default.createElement("div",{className:t},n)}renderLeftTitle(){const e=this.props.leftTitle?this.props.leftTitle:this.props.title;return!e||this.props.hideLabels?null:(0,i.default)(r.Label,e,{className:"form__field-label",for:this.props.id})}renderRightTitle(){return!this.props.rightTitle||this.props.hideLabels?null:(0,i.default)(r.Label,this.props.rightTitle,{className:"form__field-label",for:this.props.id})}renderField(){const t=Boolean(this.getMessage()),n={...this.props,extraClass:(0,s.default)(this.props.extraClass,{"is-invalid":t})},i=a.default.createElement(e,n),o=this.props.data&&this.props.data.prefix?this.props.data.prefix:"",l=this.props.data&&this.props.data.suffix?this.props.data.suffix:"";return o||l?a.default.createElement(r.InputGroup,null,o&&a.default.createElement(r.InputGroupAddon,{addonType:"prepend"},o),i,l&&a.default.createElement(r.InputGroupAddon,{addonType:"append"},l)):i}renderTitleTip(){return this.props.id&&this.props.titleTip&&this.props.titleTip.content?a.default.createElement(l.default,{id:`FieldHolder-${this.props.id}-titleTip`,content:this.props.titleTip.content,fieldTitle:this.props.title,type:l.TIP_TYPES.TITLE,icon:"menu-help"}):null}renderDescription(){return null===this.props.description?null:(0,i.default)("div",this.props.description,{className:"form__field-description"})}render(){return this.props.noHolder?this.renderField():a.default.createElement(r.FormGroup,this.getHolderProps(),this.renderLeftTitle(),this.renderTitleTip(),a.default.createElement("div",{className:"form__field-holder"},this.renderField(),this.renderMessage(),this.renderDescription()),this.renderRightTitle())}}return t.propTypes={leftTitle:o.default.any,rightTitle:o.default.any,title:o.default.any,extraClass:o.default.string,holderId:o.default.string,id:o.default.string,name:o.default.string,description:o.default.any,hideLabels:o.default.bool,message:o.default.shape({extraClass:o.default.string,value:o.default.any,type:o.default.string}),data:o.default.oneOfType([o.default.array,o.default.shape({prefix:o.default.string,suffix:o.default.string})]),titleTip:o.default.shape(l.tipShape)},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null,title:"",description:null,hideLabels:!1,noHolder:!1,message:null,data:{}},t};t.default=f},67388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(45697)),i=l(n(4754)),s=l(n(94184)),o=n(53556);function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.container=e}},this.props.children)}}o.propTypes={children:i.default.any,className:i.default.string,onClickOut:i.default.func.isRequired},o.defaultProps={className:""};var l=o;t.default=l},65963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(23296)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(e,l({key:n,className:n?"":"message-box--panel-top"},t)))):null}render(){const e=!1!==this.props.valid,t=this.props.mapFieldsToComponents(this.props.fields),n=this.props.mapActionsToComponents(this.props.actions),r=this.renderMessages(),i=this.props.formTag,s=["form"];!1===e&&s.push("form--invalid"),this.props.attributes&&this.props.attributes.className&&s.push(this.props.attributes.className);const o={...this.props.attributes,onSubmit:this.props.handleSubmit,className:s.join(" ")};return a.default.createElement(i,l({},o,{ref:e=>{this.form=e,this.props.setDOM(e)},role:"form"}),t&&a.default.createElement("fieldset",this.props.fieldHolder,r,this.props.afterMessages,t),n&&n.length?a.default.createElement("div",this.props.actionHolder,n):null)}}t.Component=d,d.propTypes={autoFocus:i.default.bool,setDOM:i.default.func,valid:i.default.bool,actions:i.default.array,fieldHolder:i.default.shape({className:i.default.string}),actionHolder:i.default.shape({className:i.default.string}),extraClass:i.default.string,afterMessages:i.default.node,attributes:i.default.shape({action:i.default.string.isRequired,className:i.default.string,encType:i.default.string,id:i.default.string,method:i.default.string.isRequired}),fields:i.default.array.isRequired,handleSubmit:i.default.func,mapActionsToComponents:i.default.func.isRequired,mapFieldsToComponents:i.default.func.isRequired,messages:i.default.arrayOf(i.default.shape({extraClass:i.default.string,value:i.default.any,type:i.default.string})),formTag:i.default.oneOfType([i.default.func,i.default.string]),FormAlertComponent:i.default.oneOfType([i.default.object,i.default.func])},d.defaultProps={setDOM:()=>null,formTag:"form",actionHolder:{className:"btn-toolbar"},FormAlertComponent:r.default};var u=d;t.default=u},430:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={CSRF_HEADER:"X-SecurityID"}},59644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(10259)),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}getButtonProps(){const{attributes:e,id:t,name:n}=this.props;return{...void 0===e?{}:e,id:t,name:n,className:this.getButtonClasses(),disabled:this.isDisabled(),onClick:this.handleClick}}getButtonClasses(){const{title:e,loading:t,extraClass:n}=this.props,a={btn:!0,"btn--no-text":"string"!=typeof e,"btn--loading":t,disabled:this.isDisabled()},r=this.getButtonStyle();r&&(a[`btn-${r}`]=!0);const s=this.getIcon();return s&&(a[`font-icon-${s}`]=!0),"string"==typeof n&&(a[n]=!0),(0,i.default)(a)}getButtonStyle(){if(void 0!==this.props.data.buttonStyle)return this.props.data.buttonStyle;if(void 0!==this.props.buttonStyle)return this.props.buttonStyle;return this.props.extraClass.split(" ").find((e=>e.indexOf("btn-")>-1))?null:this.isPrimary()?"primary":"secondary"}getIcon(){return this.props.icon||this.props.data.icon||null}getLoadingIcon(){return this.props.loading?a.default.createElement("div",{className:"btn__loading-icon"},a.default.createElement("span",{className:"btn__circle btn__circle--1"}),a.default.createElement("span",{className:"btn__circle btn__circle--2"}),a.default.createElement("span",{className:"btn__circle btn__circle--3"})):null}isDisabled(){const{disabled:e,readOnly:t}=this.props;return e||t}isPrimary(){const{extraClass:e,name:t}=this.props,n=e?e.split(" "):[];return"action_save"===t||!!n.find((e=>"ss-ui-action-constructive"===e))}handleClick(e){"function"==typeof this.props.onClick&&this.props.onClick(e,this.props.name||this.props.id)}render(){const{title:e}=this.props;return a.default.createElement("button",this.getButtonProps(),this.getLoadingIcon(),(0,r.default)("span",e,{className:"btn__title"}))}}d.propTypes={id:s.default.string,name:s.default.string,onClick:s.default.func,title:s.default.string,type:s.default.string,loading:s.default.bool,icon:s.default.string,disabled:s.default.bool,readOnly:s.default.bool,data:s.default.oneOfType([s.default.array,s.default.shape({buttonStyle:s.default.string})]),extraClass:s.default.string,attributes:s.default.object},d.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1,readOnly:!1};var u=d;t.default=u},23296:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=l(n(10259)),s=l(n(94184)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class u extends a.Component{constructor(e){super(e),this.handleClosed=this.handleClosed.bind(this),this.state={visible:!0}}getMessageStyle(){switch(this.props.type){case"good":case"success":return"success";case"info":return"info";case"warn":case"warning":return"warning";default:return"danger"}}getMessageProps(){const e=this.props.type||"no-type";return{className:(0,s.default)(["message-box",`message-box--${e}`,this.props.className,this.props.extraClass]),color:this.getMessageStyle(),toggle:this.props.closeLabel?this.handleClosed:null,isOpen:!this.props.closeLabel||this.state.visible}}handleClosed(){"function"==typeof this.props.onClosed?this.props.onClosed():this.setState({visible:!1})}render(){if("boolean"!=typeof this.props.visible&&this.state.visible||this.props.visible){const e=(0,i.default)("div",this.props.value);if(e)return a.default.createElement(r.Alert,this.getMessageProps(),e)}return null}}u.propTypes={extraClass:o.default.string,value:o.default.any,type:o.default.string,onClosed:o.default.func,closeLabel:o.default.string,visible:o.default.bool},u.defaultProps={extraClass:"",className:""};var c=u;t.default=c},56334:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemaPropType=t.default=t.basePropTypes=t.Component=void 0;var a=f(n(67294)),r=u(n(45697)),i=u(n(21965)),s=f(n(48834)),o=n(48942),l=u(n(1591)),d=n(54582);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.context.injector.get(e,`${n}.${t}`);switch(e){case"Integer":case"Decimal":return a("NumberField");case"String":case"Text":return a("TextField");case"Date":return a("DateField");case"Time":return a("TimeField");case"Datetime":return a("DatetimeField");case"Hidden":return a("HiddenField");case"SingleSelect":return a("SingleSelectField");case"Custom":return a("GridField");case"Structural":return a("CompositeField");case"Boolean":return a("CheckboxField");case"MultiSelect":return a("CheckboxSetField");default:return null}}validateForm(e){if("function"==typeof this.props.validate)return this.props.validate(e);if(!(this.props.schema&&this.props.schema.schema))return{};const t=this.context.injector.validate(this.props.identifier);let n={};return t&&(n=t(e,this.props.schema.schema)||{}),(0,o.createErrorBlock)(n)}buildComponent(e){const t=e.input||{},n={...e,...e.input,onChange:t.onChange?(e,n)=>{t.onChange(n?n.value:e)}:null};delete n.input;const r=this.getComponent(n);if(null===r)return null;if(null!==n.schemaComponent&&void 0===r)throw Error(`Component not found in injector: ${n.schemaComponent}`);const i=this.props.createFn;return"function"==typeof i?i(r,n):a.default.createElement(r,p({key:n.id},n))}mapFieldsToComponents(e){const t=this.props.baseFieldComponent;return e.map((e=>{let n=e;return e.children&&(n=Object.assign({},e,{children:this.mapFieldsToComponents(e.children)})),n=Object.assign({onAutofill:this.props.onAutofill,formid:this.props.form},n),"Structural"===e.schemaType||!0===e.readOnly?this.buildComponent(n):a.default.createElement(t,p({key:n.id},n,{component:this.buildComponent}))}))}handleAction(e){"function"==typeof this.props.onAction&&this.props.onAction(e,this.props.values),e.isPropagationStopped()||this.setState({submittingAction:e.currentTarget.name})}handleSubmit(e){let t="";this.state.submittingAction?t=this.state.submittingAction:this.props.schema.schema.actions[0]&&(t=this.props.schema.schema.actions[0].name);const n=Object.assign({},e,t?{[t]:1}:{}),a={"X-Formschema-Request":this.props.responseRequestedSchema.join(),"X-Requested-With":"XMLHttpRequest"},r=e=>this.submitApi(e||n,a).then((e=>(this.setState({submittingAction:null}),e))).catch((e=>{throw this.setState({submittingAction:null}),e}));return"function"==typeof this.props.onSubmit?this.props.onSubmit(n,t,r):r()}mapActionsToComponents(e){return e.map((e=>{const t=Object.assign({},e);return e.children?t.children=this.mapActionsToComponents(e.children):(t.onClick=this.handleAction,this.props.submitting&&this.state.submittingAction===e.name&&(t.loading=!0)),this.buildComponent(t)}))}normalizeFields(e,t){return e.map((e=>{const n=t&&t.fields?t.fields.find((t=>t.id===e.id)):{},a=i.default.recursive(!0,(0,s.schemaMerge)(e,n),{schemaComponent:n&&n.component?n.component:e.component});return e.children&&(a.children=this.normalizeFields(e.children,t)),a}))}render(){const e=this.props.schema.schema,t=this.props.schema.state,n=this.props.baseFormComponent,r={...e.attributes,className:e.attributes.class,encType:e.attributes.enctype,noValidate:!0};delete r.class,delete r.enctype;const{asyncValidate:i,fieldHolder:o,actionHolder:l,onSubmitFail:d,onSubmitSuccess:u,shouldAsyncValidate:c,touchOnBlur:f,touchOnChange:p,persistentSubmitErrors:h,form:m,afterMessages:g,autoFocus:v,formTag:b}=this.props,_={form:m,afterMessages:g,fields:this.normalizeFields(e.fields,t),fieldHolder:o,actions:this.normalizeFields(e.actions,t),actionHolder:l,attributes:r,data:e.data,initialValues:(0,s.default)(e,t),onSubmit:this.handleSubmit,valid:t&&t.valid,messages:t&&Array.isArray(t.messages)?t.messages:[],mapActionsToComponents:this.mapActionsToComponents,mapFieldsToComponents:this.mapFieldsToComponents,asyncValidate:i,onSubmitFail:d,onSubmitSuccess:u,shouldAsyncValidate:c,touchOnBlur:f,touchOnChange:p,persistentSubmitErrors:h,validate:this.validateForm,autoFocus:v,setDOM:e=>{this.formDOM=e},formTag:b};return a.default.createElement(n,_)}}t.Component=h;const m=r.default.shape({id:r.default.string,schema:r.default.shape({attributes:r.default.shape({class:r.default.string,enctype:r.default.string}),fields:r.default.array.isRequired}),state:r.default.shape({fields:r.default.array}),loading:r.default.bool,stateOverride:r.default.shape({fields:r.default.array})});t.schemaPropType=m;const g={createFn:r.default.func,onSubmit:r.default.func,onAction:r.default.func,asyncValidate:r.default.func,onSubmitFail:r.default.func,onSubmitSuccess:r.default.func,shouldAsyncValidate:r.default.func,touchOnBlur:r.default.bool,touchOnChange:r.default.bool,persistentSubmitErrors:r.default.bool,validate:r.default.func,values:r.default.object,submitting:r.default.bool,baseFormComponent:r.default.elementType.isRequired,baseFieldComponent:r.default.elementType.isRequired,getCustomFields:r.default.func,responseRequestedSchema:r.default.arrayOf(r.default.oneOf(["schema","state","errors","auto"])),identifier(e,t,n){return/^[A-Za-z0-9_.]+$/.test(e[t])?null:new Error(`\n Invalid identifier supplied to ${n}. Must be a set of\n dot-separated alphanumeric strings.\n `)}};t.basePropTypes=g,h.propTypes=Object.assign({},g,{form:r.default.string.isRequired,schema:m.isRequired,autoFocus:r.default.bool}),h.defaultProps={responseRequestedSchema:["auto"],autoFocus:!1};var v=(0,d.withInjector)(h);t.default=v},48297:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=u(n(4754)),i=n(53556),s=u(n(16304)),o=u(n(10259)),l=u(n(94184)),d=u(n(45697));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const f=()=>null;class p extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),this.handleHide=this.handleHide.bind(this),this.clearResponse=this.clearResponse.bind(this),this.handleLoadingError=this.handleLoadingError.bind(this)}getForm(){const{FormBuilderLoaderComponent:e}=this.props;return this.props.schemaUrl?a.default.createElement(e,{fieldHolder:{className:(0,l.default)("modal-body",this.props.bodyClassName)},actionHolder:{className:"modal-footer"},autoFocus:this.props.autoFocus,schemaUrl:this.props.schemaUrl,onSubmit:this.handleSubmit,onAction:this.props.onAction,onLoadingError:this.handleLoadingError,identifier:this.props.identifier}):null}getResponse(){if(!this.state||!this.state.response)return null;let e="";return e=this.state.error?this.props.responseClassBad:this.props.responseClassGood,a.default.createElement("div",{className:e},(0,o.default)("span",{html:this.state.response}))}clearResponse(){this.setState({response:null})}handleLoadingError(e){const t=this.props.onLoadingError!==f;if(this.props.showErrorMessage||!t){const t=e.errors&&e.errors[0];this.setState({response:t.value,error:!0})}t&&this.props.onLoadingError(e)}handleHide(){this.clearResponse(),"function"==typeof this.props.onClosed&&this.props.onClosed()}handleSubmit(e,t,n){this.clearResponse();let a=null;if(a="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,n):n(),!a)throw new Error("Promise was not returned for submitting");return a.then((e=>(e&&this.setState({response:e.message,error:!1}),e))).catch((e=>{e.then((e=>{this.setState({response:e,error:!0})}))})),a}renderHeader(){let{title:e}=this.props;const{ModalHeaderComponent:t}=this.props;if(!1!==e){if("object"==typeof e){e=(new DOMParser).parseFromString(e.html,"text/html").body.textContent||""}return a.default.createElement(t,{toggle:this.handleHide},e)}return!0===this.props.showCloseButton&&"function"==typeof this.props.onClosed?a.default.createElement("button",{type:"button",className:"close modal__close-button",onClick:this.handleHide,"aria-label":r.default._t("Admin.CLOSE","Close")}):null}render(){const e=this.getForm(),t=this.getResponse(),{ModalComponent:n}=this.props;return a.default.createElement(n,{isOpen:this.props.isOpen,toggle:this.handleHide,className:this.props.className,modalClassName:this.props.modalClassName,size:this.props.size},this.renderHeader(),t,e,this.props.children)}}p.propTypes={autoFocus:d.default.bool,isOpen:d.default.bool,title:d.default.oneOfType([d.default.string,d.default.bool,d.default.shape({html:d.default.string})]),className:d.default.string,bodyClassName:d.default.string,modalClassName:d.default.string,showCloseButton:d.default.bool,size:d.default.string,onClosed:d.default.func,schemaUrl:d.default.string,onSubmit:d.default.func,onAction:d.default.func,responseClassGood:d.default.string,responseClassBad:d.default.string,identifier:d.default.string,showErrorMessage:d.default.bool,onLoadingError:d.default.func,ModalComponent:d.default.oneOfType([d.default.object,d.default.func]),ModalHeaderComponent:d.default.oneOfType([d.default.object,d.default.func]),FormBuilderLoaderComponent:d.default.oneOfType([d.default.object,d.default.func])},p.defaultProps={showErrorMessage:!1,showCloseButton:!0,onLoadingError:f,isOpen:!1,title:null,modalClassName:"form-builder-modal",responseClassGood:"alert alert-success",responseClassBad:"alert alert-danger",ModalComponent:i.Modal,ModalHeaderComponent:i.ModalHeader,FormBuilderLoaderComponent:s.default};var h=p;t.default=h},88940:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(67294)),r=v(n(4754)),i=n(14890),s=n(86706),o=v(n(430)),l=_(n(30772)),d=v(n(10259)),u=v(n(45697)),c=v(n(59746)),f=v(n(73542)),p=v(n(84002)),h=v(n(58227)),m=v(n(18052)),g=v(n(13527));function v(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}const y=[];class w extends a.Component{constructor(e){super(e),this.deleteRecord=this.deleteRecord.bind(this),this.editRecord=this.editRecord.bind(this)}componentDidMount(){const e=this.props.data;this.props.actions.fetchRecords(e.recordType,e.collectionReadEndpoint.method,e.collectionReadEndpoint.url)}createRowActions(e){return a.default.createElement(m.default,{className:"grid-field__cell--actions",key:"Actions"},a.default.createElement(g.default,{icon:"cog",onClick:this.editRecord,record:e}),a.default.createElement(g.default,{icon:"cancel",onClick:this.deleteRecord,record:e}))}createCell(e,t){const n=this.props.data.onDrillDown,a={className:n?"grid-field__cell--drillable":"",onDrillDown:n?t=>n(t,e):null,key:`${t.name}`,width:t.width},r=t.field.split(".").reduce(((e,t)=>e[t]),e);return(0,d.default)(m.default,r,a)}createRow(e){const t={className:this.props.data.onDrillDown?"grid-field__row--drillable":"",key:`${e.ID}`},n=this.props.data.columns.map((t=>this.createCell(e,t))),r=this.createRowActions(e);return a.default.createElement(h.default,t,n,r)}deleteRecord(e,t){e.preventDefault();const n={};n[o.default.CSRF_HEADER]=this.props.config.SecurityID,confirm(r.default._t("CampaignAdmin.DELETECAMPAIGN","Are you sure you want to delete this record?"))&&this.props.actions.deleteRecord(this.props.data.recordType,t,this.props.data.itemDeleteEndpoint.method,this.props.data.itemDeleteEndpoint.url,n)}editRecord(e,t){e.preventDefault(),this.props.data&&"function"==typeof this.props.data.onEditRecord&&this.props.data.onEditRecord(e,t)}render(){if(this.props.records===y)return a.default.createElement("div",null,r.default._t("CampaignAdmin.LOADING","Loading..."));if(!this.props.records.length)return a.default.createElement("div",null,r.default._t("CampaignAdmin.NO_RECORDS","No campaigns created yet."));const e=a.default.createElement("th",{key:"holder",className:"grid-field__action-placeholder"}),t=this.props.data.columns.map((e=>a.default.createElement(p.default,{key:e.name},e.name))),n=a.default.createElement(f.default,null,t.concat(e)),i=this.props.records.map((e=>this.createRow(e)));return a.default.createElement(c.default,{header:n,rows:i})}}w.propTypes={data:u.default.shape({recordType:u.default.string.isRequired,headerColumns:u.default.array,collectionReadEndpoint:u.default.object,onDrillDown:u.default.func,onEditRecord:u.default.func})};var O=(0,s.connect)((function(e,t){const n=t.data&&t.data.recordType;return{config:e.config,records:n&&e.records[n]?e.records[n]:y}}),(function(e){return{actions:(0,i.bindActionCreators)(l,e)}}))(w);t.default=O},13527:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class o extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}handleClick(e){this.props.onClick(e,this.props.record.ID)}render(){return r.default.createElement("button",{className:`grid-field__icon-action font-icon-${this.props.icon} btn--icon-lg`,onClick:this.handleClick})}}o.propTypes={onClick:i.default.func.isRequired};var l=o;t.default=l},18052:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(94184)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(r.default,null,e.children);t.default=s},84002:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>r.default.createElement("th",null,e.children);t.default=i},58227:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>{const t=`grid-field__row ${e.className}`;return r.default.createElement("tr",{tabIndex:0,className:t},e.children)};t.default=i},59746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class o extends r.Component{generateHeader(){return void 0!==this.props.header?this.props.header:(this.props.data,null)}generateRows(){return void 0!==this.props.rows?this.props.rows:(this.props.data,null)}render(){return r.default.createElement("div",{className:"grid-field"},r.default.createElement("table",{className:"table table-hover grid-field__table"},r.default.createElement("thead",null,this.generateHeader()),r.default.createElement("tbody",null,this.generateRows())))}}o.propTypes={data:i.default.object,header:i.default.object,rows:i.default.array};var l=o;t.default=l},71375:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=d(n(94184)),s=d(n(45697)),o=d(n(86010)),l=d(n(95393));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.PureComponent{renderMultipleActions(e){const t=e.reduce(((e,t)=>{const n=e,a=t.group;if(!a)throw new Error(`Action: "${t.title}" has no group assigned`);return n[a]||(n[a]=[]),n[a].push(t),n}),[]);return a.default.createElement(l.default,{dropdownMenuProps:{right:!0},dropdownToggleClassNames:["action-menu__toggle","btn","btn--no-text","btn-sm","font-icon-dot-3"]},Object.keys(t).map(((e,n)=>[0!==n&&a.default.createElement(r.DropdownItem,{divider:!0,key:e}),t[e].map(((e,t)=>a.default.createElement(o.default,{data:e.data,title:e.title,type:e.type,url:e.url,key:t})))])))}renderSingleAction(e){const{type:t,title:n,data:s}=e;let o,{url:l}=e;"submit"===t&&(o="submit",l=void 0);const d=(0,i.default)("action",s.classNames);return a.default.createElement(r.Button,{className:d,type:o,href:l,"data-url":s["data-url"],"data-action-state":s["data-action-state"],name:s.name,color:"secondary"},n)}render(){const{schema:e}=this.props;return e.length>1?this.renderMultipleActions(e):1===e.length?this.renderSingleAction(e[0]):null}}const f=o.default.propTypes;f.group=s.default.string,c.propTypes=s.default.arrayOf(s.default.shape(f)).isRequired;var p=c;t.default=p},86010:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.PureComponent{render(){const{type:e,title:t,data:n}=this.props;let{url:s}=this.props;const o=(0,i.default)("action",n.classNames);let l=null;switch(e){case"submit":case"button":l="button",s=void 0;break;case"link":l="a";break;default:l=void 0}return a.default.createElement(r.DropdownItem,{className:o,href:s,tag:l,type:"button"===l?"button":void 0,"data-url":n["data-url"],"data-action-state":n["data-action-state"],name:n.name},t)}}d.propTypes={data:s.default.object,title:s.default.string.isRequired,type:s.default.oneOf(["submit","link"]),url:s.default.string};var u=d;t.default=u},65732:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(94184));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){let{className:t,extraClass:n,id:r,data:{headingLevel:s,title:o}}=e;const l=`h${s||3}`;return a.default.createElement("div",{className:"field"},a.default.createElement(l,{className:(0,i.default)(t,n),id:r},o))}o.propTypes={className:r.default.string,extraClass:r.default.string,id:r.default.string,data:r.default.oneOfType([r.default.array,r.default.shape({headingLevel:r.default.number,title:r.default.string})]).isRequired},o.defaultProps={className:"",extraClass:""};var l=o;t.default=l},19423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.Component{getInputProps(){return{className:(0,i.default)(this.props.className,this.props.extraClass),id:this.props.id,name:this.props.name,type:"hidden",value:this.props.value||""}}render(){return a.default.createElement(r.Input,this.getInputProps())}}d.propTypes={id:s.default.string,extraClass:s.default.string,name:s.default.string.isRequired,value:s.default.any},d.defaultProps={className:"",extraClass:"",value:""};var u=d;t.default=u},1922:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(67294)),r=o(n(69227)),i=n(74898),s=o(n(98028));function o(e){return e&&e.__esModule?e:{default:e}}n(51726);class l extends i.Component{constructor(e){super(e),this.state={isReady:!e.data.editorjs},this.inputRef=null,this.handleReady=this.handleReady.bind(this)}getInputProps(){return{...super.getInputProps(),...this.props.data.attributes,innerRef:e=>{this.inputRef=e}}}getEditorElement(){return document.getElementById(this.getInputProps().id)}getEditor(){return window.TinyMCE&&window.TinyMCE.get(this.getInputProps().id)}handleReady(){!window.TinyMCE&&window.tinymce&&(window.TinyMCE=window.tinymce),this.setState({isReady:!0})}registerChangeListener(){const e=this.getEditorElement();this.getEditor().on("change keyup setcontent",(()=>{super.handleChange({target:e})}))}renderDependencyScript(){return window.tinymce||window.TinyMCE?(setTimeout((()=>{this.handleReady()}),0),null):a.default.createElement(r.default,{url:this.props.data.editorjs,onLoad:this.handleReady})}render(){return this.state.isReady?super.render():this.renderDependencyScript()}componentDidUpdate(e,t){const{isReady:n}=this.state;if(!n)return;n!==t.isReady&&setTimeout((()=>{const{document:e,jQuery:t}=window,n=t?t.Event("EntwineElementsAdded"):new Event("noop"),a=this.getEditorElement();n.targets=[a],t&&t(e).triggerHandler(n),this.registerChangeListener()}),1);const{value:a}=this.props;if(a!==e.value){const e=new Event("change",{bubbles:!0});e.simulated=!0,e.value=a,this.inputRef.dispatchEvent(e)}}componentWillUnmount(){if(!this.state.isReady)return;const{document:e,jQuery:t}=window,n=t?t.Event("EntwineElementsRemoved"):new Event("noop"),a=this.getEditorElement(),r=this.getEditor();r&&r.save(),n.targets=[a],super.handleChange({target:a}),t&&t(e).triggerHandler(n)}}t.Component=l;var d=(0,s.default)(l);t.default=d},618:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(98028)),i=n(53556),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,className:n,title:r,extraClass:i,data:s}=e;const o=s&&s.target,l=`${n} ${i}`;return a.default.createElement("label",{id:t,className:l,htmlFor:o},r)};s.propTypes={id:r.default.number,className:r.default.string,extraClass:r.default.string,title:r.default.node,data:r.default.shape({target:r.default.string})},s.defaultProps={className:"",extraClass:""};var o=s;t.default=o},5257:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=n(79655);function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement("div",{className:"list-group"},e.items.map((e=>a.default.createElement(i.default,e))));o.propTypes={items:r.default.array};var l=o;t.default=l},12906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class o extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}handleClick(e){this.props.onClick&&this.props.onClick(e,this.props.onClickArg)}render(){const e=`list-group-item ${this.props.className}`;return r.default.createElement("a",{role:"button",tabIndex:0,className:e,onClick:this.handleClick},this.props.children)}}o.propTypes={onClickArg:i.default.any,onClick:i.default.func};var l=o;t.default=l},6734:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=m(n(14504)),i=m(n(66244)),s=m(n(92332)),o=m(n(39301)),l=m(n(25114)),d=m(n(4754)),u=m(n(94301)),c=m(n(98028)),f=m(n(8575)),p=m(n(69496)),h=m(n(45697));function m(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;te.json())).then((e=>e.items.map((e=>({[n]:e.Title,[a]:e.Value,Selected:e.Selected})))))}isValidNewOption(e,t,n){const{valueKey:a}=this.props;if(!e)return!1;if(Array.isArray(t)){if(this.valueInOptions(e,t,a))return!1}else if(e===t[a])return!1;return!this.valueInOptions(e,n,a)}valueInOptions(e,t,n){for(const a of t)if(e===a[n])return!0;return!1}render(){const{lazyLoad:e,options:t,creatable:n,multi:r,disabled:i,labelKey:s,valueKey:o,SelectComponent:u,AsyncCreatableSelectComponent:c,AsyncSelectComponent:f,CreatableSelectComponent:p,...h}=this.props,m=e?{loadOptions:this.getOptions}:{options:t};let g=u;if(e&&n?g=c:e?g=f:n&&(g=p),this.isControlled()||(h.value=this.state.value),!r&&h.value&&Object.keys(h.value).length>0){const e=h.value[Object.keys(h.value)[0]];"object"==typeof e&&(h.value=e)}return a.default.createElement(l.default,null,a.default.createElement(g,v({},h,{isMulti:r,isDisabled:i,cacheOptions:!0,onChange:this.handleChange,onBlur:this.handleOnBlur},m,{getOptionLabel:e=>e[s],getOptionValue:e=>e[o],noOptionsMessage:e=>{let{inputValue:t}=e;return t?d.default._t("ListboxField.NO_OPTIONS","No options"):d.default._t("ListboxField.TYPE_TO_SEARCH","Type to search")},isValidNewOption:this.isValidNewOption,getNewOptionData:(e,t)=>({[s]:t,[o]:e}),classNamePrefix:"ss-listbox-field"})))}}t.Component=b,b.propTypes={name:h.default.string.isRequired,labelKey:h.default.string.isRequired,valueKey:h.default.string.isRequired,lazyLoad:h.default.bool,creatable:h.default.bool,multi:h.default.bool,disabled:h.default.bool,options:h.default.arrayOf(h.default.object),optionUrl:h.default.string,value:h.default.any,onChange:h.default.func,onBlur:h.default.func,SelectComponent:h.default.oneOfType([h.default.object,h.default.func]),AsyncCreatableSelectComponent:h.default.oneOfType([h.default.object,h.default.func]),AsyncSelectComponent:h.default.oneOfType([h.default.object,h.default.func]),CreatableSelectComponent:h.default.oneOfType([h.default.object,h.default.func])},b.defaultProps={labelKey:"Title",valueKey:"Value",disabled:!1,lazyLoad:!1,creatable:!1,multi:!1,SelectComponent:r.default,AsyncCreatableSelectComponent:s.default,AsyncSelectComponent:i.default,CreatableSelectComponent:o.default};var _=(0,c.default)(b);t.default=_},7162:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;tt.value===e));return t?t.title:""}return e&&e.length?e.map((e=>{const t=this.props.source.find((t=>t.value===e));return t&&t.title})).filter((e=>`${e}`.length)).join(", "):""}getFieldProps(){return{id:this.props.id,name:this.props.name,className:`${this.props.className} ${this.props.extraClass}`}}render(){if(!this.props.source)return null;const e=`('${s.default._t("Admin.NONE","None")}')`,t=this.getValueCSV()||e;return a.default.createElement(r.Input,u({plaintext:!0},this.getFieldProps(),{tag:"p"}),t)}}t.Component=c,c.propTypes={extraClass:o.default.string,id:o.default.string,name:o.default.string.isRequired,source:o.default.arrayOf(o.default.shape({value:o.default.oneOfType([o.default.string,o.default.number]),title:o.default.any,disabled:o.default.bool})),value:o.default.any},c.defaultProps={extraClass:"",className:"",value:[]};var f=(0,i.default)(c);t.default=f},86827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(94184)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}class l extends a.Component{constructor(){super(),this.handleClick=this.handleClick.bind(this)}handleClick(e){e.preventDefault(),"function"==typeof this.props.onClick&&this.props.onClick(e)}render(){const e=(0,r.default)({"cms-mobile-menu-toggle":!0,"cms-mobile-menu-toggle--open":this.props.isOpen});return a.default.createElement("button",{type:"button",className:e,href:"#toggle-mobile-menu",onClick:this.handleClick,"aria-controls":this.props.controls,"aria-expanded":Boolean(this.props.isOpen)},a.default.createElement("span",null),a.default.createElement("span",null),a.default.createElement("span",null),a.default.createElement("span",null))}}l.propTypes={isOpen:i.default.bool.isRequired,onClick:i.default.func.isRequired,controls:i.default.string},l.defaultProps={controls:""};var d=l;t.default=d},26195:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(11521),i=n(86706),s=(a=n(86827))&&a.__esModule?a:{default:a};var o=(0,i.connect)((e=>({isOpen:e.mobileMenu.isOpen})),(e=>({onClick(){e((0,r.toggleMobileMenu)())}})))(s.default);t.default=o},3730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a,r=n(67294),i=(a=n(45697))&&a.__esModule?a:{default:a},s=n(79655);function o(e){let{shouldBlockFn:t,blockMessage:n}=e;const a=(0,s.unstable_useBlocker)(t);return(0,r.useEffect)((()=>{if("blocked"===a.state){confirm(n)?a.proceed():a.reset()}}),[a.state]),null}o.propTypes={shouldBlockFn:i.default.func.isRequired,blockMessage:i.default.string.isRequired}},55742:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=l(n(4754)),i=l(n(94184)),s=l(n(23296)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>{let{itemName:t,name:n,value:o}=e;return a.default.createElement("div",{className:(0,i.default)(t,"not-found-component")},a.default.createElement(s.default,{value:r.default.inject(r.default._t("Admin.NOT_FOUND_COMPONENT","The component here ({component}) failed to load, there is a chance that you may lose data when saving due to this."),{component:t})}),n&&"string"==typeof o?a.default.createElement("input",{type:"hidden",name:n,value:o}):null)};d.propTypes={itemName:o.default.string.isRequired,name:o.default.string,value:o.default.any};var u=d;t.default=u},92227:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(98028)),r=i(n(16725));function i(e){return e&&e.__esModule?e:{default:e}}class s extends r.default{getInputProps(){const e=super.getInputProps();return Object.assign(e,{type:"number"}),e}}t.Component=s;var o=(0,a.default)(s);t.default=o},31885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=l(n(94184)),s=l(n(10259)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class u extends a.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}getInputProps(){const e=(0,i.default)({[this.props.className]:!0,[this.props.extraClass]:!0,"form-check":!0,checked:this.props.value,disabled:this.props.readOnly,"option-field--disabled":this.props.readOnly||this.props.disabled});return{id:this.props.id,type:this.props.type,name:this.props.name,disabled:this.props.disabled||this.props.readOnly,readOnly:this.props.readOnly,className:e,onChange:this.handleChange,checked:!!this.props.value,value:1}}handleChange(e){if(this.props.readOnly||this.props.disabled)return void e.preventDefault();let t=null;"function"==typeof this.props.onChange?t=this.props.onChange:"function"==typeof this.props.onClick&&(t=this.props.onClick),t&&t(e,{id:this.props.id,value:e.target.checked?1:0})}render(){const e=null!==this.props.leftTitle?this.props.leftTitle:this.props.title,t=null!==this.props.rightTitle?`${e} ${this.props.rightTitle}`:e;return a.default.createElement(r.FormGroup,{check:!0},a.default.createElement(r.Label,{check:!0},a.default.createElement(r.Input,this.getInputProps()),(0,s.default)("span",t)))}}t.Component=u,u.propTypes={type:o.default.oneOf(["checkbox","radio"]),leftTitle:o.default.any,rightTitle:o.default.any,title:o.default.any,extraClass:o.default.string,id:o.default.string,name:o.default.string,onChange:o.default.func,value:o.default.oneOfType([o.default.string,o.default.number,o.default.bool]),readOnly:o.default.bool,disabled:o.default.bool},u.defaultProps={extraClass:"",className:"",type:"radio",leftTitle:null,rightTitle:null};var c=u;t.default=c},5110:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(31885)),i=o(n(98028)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.getItemKey(e,n)===t.id));this.props.onChange(e,{id:this.props.id,value:n.value})}}render(){return this.props.source?a.default.createElement("div",null,this.props.source.map(((e,t)=>a.default.createElement(r.default,d({},this.getOptionProps(e,t),{hideLabels:!0}))))):null}}t.Component=u,u.propTypes={extraClass:s.default.string,itemClass:s.default.string,id:s.default.string,name:s.default.string.isRequired,source:s.default.arrayOf(s.default.shape({value:s.default.oneOfType([s.default.string,s.default.number]),title:s.default.oneOfType([s.default.string,s.default.number]),disabled:s.default.bool})),onChange:s.default.func,value:s.default.oneOfType([s.default.string,s.default.number]),readOnly:s.default.bool,disabled:s.default.bool},u.defaultProps={extraClass:"",className:"",itemClass:""};var c=(0,i.default)(u);t.default=c},20693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={isOpen:!1}}getPlacement(){return this.props.data.placement||"bottom"}getContainer(){return this.props.container?this.props.container:this.wrapper}toggle(){const{toggleCallback:e}=this.props;window.setTimeout((()=>this.setState({isOpen:!this.state.isOpen},e)),0)}render(){const e=this.getPlacement(),t=(0,i.default)({btn:!0,"btn-secondary":!0,[this.props.className]:!0,[this.props.buttonClassName]:!0,"btn--no-focus":this.state.isOpen,"font-icon-dot-3 btn--no-text":!this.props.title,[`btn--icon-${this.props.buttonSize}`]:!this.props.title}),n={id:this.props.id,type:"button",className:t,onClick:this.toggle,title:this.props.data.buttonTooltip},s=(0,i.default)({[this.props.className]:!0,"popover-container":!0,"popover-field":!0});return a.default.createElement("div",{className:s,ref:e=>{this.wrapper=e}},a.default.createElement(r.Button,n,this.props.title),a.default.createElement(r.Popover,{id:`${this.props.id}_Popover`,placement:e,isOpen:this.state.isOpen,target:this.props.id,toggle:this.toggle,className:this.props.popoverClassName,container:this.getContainer()},a.default.createElement(r.PopoverHeader,null,this.props.data.popoverTitle),a.default.createElement(r.PopoverBody,null,this.props.children)))}}d.propTypes={id:s.default.string.isRequired,title:s.default.any,container:s.default.any,className:s.default.string,buttonClassName:s.default.string,popoverClassName:s.default.string,buttonSize:s.default.oneOf(["sm","md","large","xl"]),data:s.default.oneOfType([s.default.array,s.default.shape({popoverTitle:s.default.string,buttonTooltip:s.default.string,placement:s.default.oneOf(["top","bottom","left","right"])})]),toggleCallback:s.default.func},d.defaultProps={data:{},className:"",buttonClassName:"",popoverClassName:"",buttonSize:"xl",toggleCallback:()=>{}};var u=d;t.default=u},71255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(45697)),i=n(53556),s=l(n(94184)),o=l(n(4754));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(l,u({},e.buttonProps,{className:(0,s.default)(e.className,i),key:e.key,onClick:e.onClick}),e.content))))}render(){const{container:e,className:t,isOpen:n,placement:r,target:i,PopoverComponent:o}=this.props;return a.default.createElement(o,{className:(0,s.default)(t),container:e,hideArrow:!0,isOpen:n,onKeyDown:this.handleKeyDown,placement:r,target:i,toggle:this.handleToggle,trigger:"legacy"},this.renderSearchBox(),this.renderOptionButtons())}}c.propTypes={buttons:r.default.arrayOf(r.default.shape({key:r.default.string.isRequired,content:r.default.node.isRequired,onClick:r.default.func.isRequired,className:r.default.oneOfType([r.default.string,r.default.object,r.default.arrayOf(r.default.string)]),buttonProps:r.default.object})).isRequired,onSearch:r.default.func,container:r.default.oneOfType([r.default.string,r.default.elementType]),isOpen:r.default.bool.isRequired,placement:r.default.string,target:r.default.oneOfType([r.default.string,r.default.elementType]).isRequired,toggle:r.default.func.isRequired,searchPlaceholder:r.default.string,disableSearch:r.default.bool,ButtonComponent:r.default.oneOfType([r.default.object,r.default.func]),PopoverComponent:r.default.oneOfType([r.default.object,r.default.func]),className:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),searchClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),searchInputClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),clearButtonClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),buttonContainerClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),emptyResultClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),buttonClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object])},c.defaultProps={searchPlaceholder:o.default._t("PopoverOptionSet.SEARCH_PLACEHOLDER","Search"),onSearch:(e,t)=>t.filter((t=>{let{content:n}=t;return n.toLowerCase().includes(e.toLowerCase())})),disableSearch:!1,ButtonComponent:i.Button,PopoverComponent:i.Popover,className:"popover-option-set",searchClassName:"popover-option-set__search",searchInputClassName:"popover-option-set__search-input",clearButtonClassName:"popover-option-set__search-clear btn btn-link",buttonContainerClassName:"popover-option-set__button-container",emptyResultClassName:"popover-option-set__no-results",buttonClassName:"popover-option-set__button"};var f=c;t.default=f},3080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(4754)),i=d(n(94184)),s=n(54582),o=d(n(45697)),l=d(n(95393));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.Component{constructor(e){super(e),this.state={frameLoaded:!1},this.handleBackClick=this.handleBackClick.bind(this),this.setFrameLoaded=this.setFrameLoaded.bind(this)}componentDidUpdate(e){this.state.frameLoaded&&e.previewUrl!==this.props.previewUrl&&this.setFrameLoaded(!1)}setFrameLoaded(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState({frameLoaded:e})}handleBackClick(e){"function"==typeof this.props.onBack&&(e.preventDefault(),this.props.onBack(e))}buildToolbarButtons(){const e=[];if(this.props.itemLinks&&this.props.itemLinks.edit){const t=this.props.itemLinks.edit.href;e.push(a.default.createElement("a",{key:"edit",href:t,className:"btn btn-outline-secondary font-icon-edit"},a.default.createElement("span",{className:"btn__title"},r.default._t("Admin.EDIT","Edit"))))}return e}renderMoreActions(){return this.props.moreActions&&0!==this.props.moreActions.length?a.default.createElement(l.default,null,this.props.moreActions):null}renderBody(){let 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/")?a.default.createElement("div",{className:"preview__file-container panel--scrollable"},a.default.createElement("img",{alt:e,className:"preview__file--fits-space",src:e})):a.default.createElement("iframe",{style:{visibility:this.state.frameLoaded?"visible":"hidden"},className:"flexbox-area-grow preview__iframe",src:e,onLoad:this.setFrameLoaded}):a.default.createElement("div",{className:"preview__overlay"},a.default.createElement("h3",{className:"preview__overlay-text"},r.default._t("Admin.NO_ITEM_PREVIEW","There is no preview available for this item."))):a.default.createElement("div",{className:"preview__overlay"},a.default.createElement("h3",{className:"preview__overlay-text"},r.default._t("Admin.NO_PREVIEW","No preview available.")))}render(){const{className:e,ViewModeComponent:t}=this.props,n=(0,i.default)("preview",e);return a.default.createElement("div",{className:n},this.renderBody(),a.default.createElement("div",{className:"toolbar toolbar--south"},a.default.createElement("div",{className:"btn-toolbar"},this.buildToolbarButtons(),a.default.createElement(t,{id:"view-mode-toggle-in-preview-nb",area:"preview"}),this.renderMoreActions())))}}t.Component=c,c.propTypes={className:o.default.string,itemLinks:o.default.object,itemId:o.default.number,onBack:o.default.func,moreActions:o.default.arrayOf(o.default.element),ViewModeComponent:o.default.elementType},c.defaultProps={className:"flexbox-area-grow fill-height"};var f=(0,s.inject)(["ViewModeToggle"],(e=>({ViewModeComponent:e})),(()=>"Admin.Preview"))(c);t.default=f},72543:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(67294),r=s(n(91033)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}class o extends a.Component{constructor(e){super(e),this.render=this.render.bind(this),this.handleResize=this.handleResize.bind(this),this.state={},this.observer=new r.default((e=>e.forEach((e=>{let{contentRect:t}=e;return this.handleResize(t)}))))}componentDidMount(){this.observer.observe(this.container);const e={width:this.container.offsetWidth,height:this.container.offsetHeight};this.handleResize(e)}componentWillUnmount(){this.observer.disconnect()}handleResize(e){const{width:t,height:n}=this.state;t===e.width&&n===e.height||this.setState(e),this.props.onResize&&this.props.onResize(e)}render(){const{children:e,onlyEvent:t,component:n,onResize:r,widthPropName:i,heightPropName:s,...o}=this.props,{width:l,height:d}=this.state,u="string"!=typeof n,c={[[i||"width"]]:l,[[s||"height"]]:d};return(0,a.createElement)(n,{[u?"getRef":"ref"]:e=>{this.container=e},...u&&c,...o},"function"==typeof e?e({width:l,height:d}):a.Children.map(e,(e=>(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t?null:c):e)))}}o.propTypes={component:i.default.oneOfType([i.default.string,i.default.elementType]),onResize:i.default.func},o.defaultProps={component:"div"};var l=o;t.default=l},62266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0,t.hasFilters=E;var a=y(n(4754)),r=_(n(67294)),i=n(86706),s=n(14890),o=_(n(39042)),l=n(11962),d=n(35237),u=y(n(79298)),c=y(n(96869)),f=y(n(45697)),p=y(n(90161)),h=y(n(31824)),m=y(n(97019)),g=y(n(65693)),v=y(n(18992));function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function y(e){return e&&e.__esModule?e:{default:e}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t0}class T extends r.Component{constructor(e){super(e),this.expand=this.expand.bind(this),this.handleChange=this.handleChange.bind(this),this.getData=this.getData.bind(this),this.doSearch=this.doSearch.bind(this),this.focusInput=this.focusInput.bind(this),this.focusFirstFormField=this.focusFirstFormField.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.toggle=this.toggle.bind(this),this.open=this.open.bind(this),this.searchTermIsDirty=this.searchTermIsDirty.bind(this),this.clearFilters=this.clearFilters.bind(this),this.clearSearchBox=this.clearSearchBox.bind(this),this.clearFormFilter=this.clearFormFilter.bind(this),this.focusFormFilter=this.focusFormFilter.bind(this),this.formatTagData=this.formatTagData.bind(this);const t=e.term||e.filters&&e.filters[`${e.filterPrefix}${e.name}`]||"";this.state={display:e.display,searchText:t,initialSearchText:t}}componentDidMount(){this.setOverrides(this.props)}componentWillUnmount(){this.setOverrides()}setOverrides(e){if(e&&(!E(e.filters)||this.props.formSchemaUrl!==e.formSchemaUrl)){const t=e&&e.formSchemaUrl||this.props.formSchemaUrl;t&&this.props.actions.schema.setSchemaStateOverrides(t,null)}if(e&&E(e.filters)&&e.formSchemaUrl){const t=e.filters||{},n={fields:Object.keys(t).map((e=>({name:e,value:t[e]})))};this.props.actions.schema.setSchemaStateOverrides(e.formSchemaUrl,n)}}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{name:t,filterPrefix:n,formData:a}=this.props,{searchText:r}=this.state,i={};return Object.keys(a).forEach((e=>{const t=a[e];t&&(i[e]=t)})),!e&&r&&void 0===a[`${n}${t}`]&&(i[`${n}${t}`]=r.trim()),i}handleChange(e){const t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});const{schemaName:n,name:a,filterPrefix:r,actions:i,formData:s}=this.props;void 0!==s[`${r}${a}`]&&i.reduxForm.change(n,`${r}${a}`,t)}focusInput(){if(this.state.display===O.NONE)return;const e=this.nodeRef.container;if(!e)return;const t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}focusFirstFormField(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input:not([type=hidden]), textarea, select, button";if(this.state.display!==O.EXPANDED)return;const t=this.nodeRef.container;if(!t)return;const n=t.querySelector(".search-form");if(!n)return;const a=n.querySelector(e);a&&(a.focus(),a.select&&a.select())}clearFormData(e){""!==this.state.searchText&&this.setState({searchText:""});const t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){const n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,{fields:[]}),this.props.actions.reduxForm.reset(n)}}clearFormFilter(e){const t=this.props.tagData[e],n={[e]:void 0},{schemaName:a,filters:r}=this.props;this.props.actions.reduxForm.change(a,e,""),this.setOverrides({...this.props,filters:{...r,[e]:void 0}}),Array.isArray(t.linkedFields)&&t.linkedFields.forEach((e=>{n[e]=void 0})),this.doSearch(n)}focusFormFilter(e){const t=this.props.tagData[e].focusSelector||`[name=${e}]`;this.expand(),setTimeout((()=>this.focusFirstFormField(t)),50)}open(){this.show(),this.focusInput()}hide(){this.clearSearchBox(),this.props.onHide?this.props.onHide():this.state.display!==O.NONE&&this.setState({display:O.NONE})}show(){this.state.display!==O.VISIBLE&&this.setState({display:O.VISIBLE});const{schemaName:e,formData:t,name:n,actions:a}=this.props;void 0!==t[n]&&a.reduxForm.change(e,n,this.state.searchText)}expand(){this.state.display!==O.EXPANDED&&this.setState({display:O.EXPANDED})}toggle(){switch(this.state.display){case O.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case O.EXPANDED:this.show()}}searchTermIsDirty(){const{searchText:e,initialSearchText:t}=this.state;return e.trim()!==t.trim()}doSearch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{name:t,filterPrefix:n}=this.props,a={},r=this.getData();Object.entries(r).forEach((i=>{let[s,o]=i,l=s,d=o;e.hasOwnProperty(s)&&(d=e[s]),n.length>0&&s.startsWith(n)&&(l=s.substring(n.length)),(!n.length>0||s!==t||void 0===r[`${n}${t}`])&&(a[l]=d)}));const i=a[t]||"";this.state.display===O.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:O.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(a)}clearFilters(){this.clearFormData(),this.focusFirstFormField()}clearSearchBox(){this.clearFormData(),this.focusInput()}formatTagData(){const{tagData:e,name:t,filterPrefix:n}=this.props,a=Object.assign({},e),r=`${n}${t}`;return a&&a[r]&&delete a[r],a?Object.values(a).map((e=>{let{key:t,label:n,value:a}=e;return{key:t,label:n,value:a}})):[]}render(){const{formSchemaUrl:e,forceFilters:t,id:n,displayBehavior:a,identifier:i,formIsDirty:s,tagData:o,name:l,...d}=this.props;if(this.state.display===O.NONE)return a===C.TOGGLABLE?r.default.createElement(g.default,{onToggle:this.show}):r.default.createElement("div",null);const u=`${n}_ExtraFields`,c=this.state.searchText,f=this.state.display===O.EXPANDED,v=this.state.display===O.VISIBLE,b=[C.HIDEABLE,C.TOGGLABLE].includes(a),_=s||this.searchTermIsDirty(),y=this.getData(),E=Object.keys(y).length>0;return r.default.createElement(p.default,{onClickOut:this.show,className:"search",ref:e=>{this.nodeRef=e}},r.default.createElement(h.default,w({},d,{name:`SearchBox__${l}`,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:c,hideable:b,expanded:f,id:`${n}_searchbox`,showFilters:Boolean(t||e),dirty:_,clearable:E,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),r.default.createElement(m.default,{id:u,identifier:i,visible:v,expanded:f,formSchemaUrl:e,onSearch:this.doSearch,onClear:this.clearFilters,clearable:E})))}}t.Component=T,T.propTypes={onSearch:f.default.func,onHide:f.default.func,id:f.default.string.isRequired,display:f.default.oneOf(Object.values(O)),formSchemaUrl:f.default.string,filters:f.default.object,formData:f.default.object,placeholder:f.default.string,displayBehavior:f.default.oneOf(Object.values(C)),term:f.default.string,name:f.default.string,filterPrefix:f.default.string,forceFilters:f.default.bool,formIsDirty:f.default.bool,identifier:f.default.string,schemaName:f.default.string,tagHandlers:f.default.object,borders:f.default.shape({top:f.default.bool,right:f.default.bool,bottom:f.default.bool,left:f.default.bool})},T.defaultProps={placeholder:a.default._t("Admin.SEARCH","Search"),display:O.VISIBLE,displayBehavior:C.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"};var S=(0,i.connect)((function(e,t){const n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};const a=n.name,r=(0,u.default)((0,c.default)(e),a),i=r&&r.values||{},s=(0,v.default)(n,t.filters,t.tagHandlers||{});return{formData:i,formIsDirty:(0,d.isDirty)(a,c.default)(e),schemaName:a,tagData:s}}),(function(e){return{actions:{schema:(0,s.bindActionCreators)(o,e),reduxForm:(0,s.bindActionCreators)({reset:l.reset,initialize:l.initialize,change:l.change},e)}}}))(T);t.default=S},31824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=f(n(4754)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=n(53556),s=f(n(94184)),o=f(n(97228)),l=f(n(72543)),d=f(n(45697)),u=f(n(43117));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}class p extends r.Component{constructor(e){super(e),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.renderInput=this.renderInput.bind(this),this.renderFilterButton=this.renderFilterButton.bind(this),this.renderEnterHint=this.renderEnterHint.bind(this),this.renderHideButton=this.renderHideButton.bind(this),this.componentDidUpdate=this.componentDidUpdate.bind(this),this.onResize=this.onResize.bind(this),this.setWidth=this.setWidth.bind(this),this.renderTags=this.renderTags.bind(this),this.getComponentWidth=this.getComponentWidth.bind(this),this.calculateSpaceForTags=this.calculateSpaceForTags.bind(this),this.calculateInputLeftPadding=this.calculateInputLeftPadding.bind(this),this.calculateInputRightPadding=this.calculateInputRightPadding.bind(this),this.onTagListResize=this.onTagListResize.bind(this),this.focusOnLastTag=this.focusOnLastTag.bind(this),this.focusOnInput=this.focusOnInput.bind(this),this.state={hasFocus:!1,width:window.innerWidth-180-55,tagWidth:0}}componentDidUpdate(){const e=this.getComponentWidth();this.setWidth(e)}onResize(e){this.setWidth(e.width)}onTagListResize(e){const t=e.width;this.state.tagWidth!==t&&this.setState({tagWidth:t})}setWidth(e){this.state.width!==e&&this.setState({width:e})}getComponentWidth(){const e=this.nodeRef;return e?e.getBoundingClientRect().width:0}calculateInputLeftPadding(){const e=this.state.width>576?55:20;return this.state.tagWidth+e}calculateInputRightPadding(){return this.state.width<576?121:264}calculateSpaceForTags(){let e=this.state.width;e-=150,e=e-55-52;const{hideable:t,showFilters:n}=this.props;return t&&(e-=52),n&&(e-=52),e=Math.max(e,0),e}handleKeyDown(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())}handleFocus(){this.state.hasFocus||this.setState({hasFocus:!0}),this.props.onHideFilter&&this.props.onHideFilter()}handleBlur(){this.state.hasFocus&&this.setState({hasFocus:!1})}focusOnLastTag(){const e=this.nodeRef;if(!e)return;const t=e.querySelector(".compact-tag-list__visible .tag:last-child");t&&t.focus()}focusOnInput(){const e=this.nodeRef;if(!e)return;const t=e.querySelector("input");t&&t.focus()}renderInput(){const{id:e,searchText:t,onChange:n,placeholder:a,name:i,borders:o}=this.props,l={paddingLeft:`${this.calculateInputLeftPadding()}px`,paddingRight:`${this.calculateInputRightPadding()}px`},d=Object.assign({},p.defaultProps.borders,o),u="search-box__content-field",c=(0,s.default)("form-control",u,{[`${u}--top-border`]:d.top,[`${u}--right-border`]:d.right,[`${u}--bottom-border`]:d.bottom,[`${u}--left-border`]:d.left});return r.default.createElement("input",{"aria-labelledby":`${e}_label`,type:"search",name:i,placeholder:a,className:c,onKeyDown:this.handleKeyDown,onChange:n,onFocus:this.handleFocus,onBlur:this.handleBlur,value:t,id:e,autoFocus:!0,style:l})}renderTags(){const{tagData:e,onTagDelete:t,onTagClick:n,onToggleFilter:a}=this.props;return r.default.createElement("div",{className:"search-box__tags"},r.default.createElement(l.default,{onResize:this.onTagListResize},r.default.createElement(o.default,{onTagDelete:t,onTagClick:n,onHolderFocus:this.focusOnInput,tags:e,onSummary:a,maxSize:this.calculateSpaceForTags(),deletable:!0})))}renderEnterHint(){return r.default.createElement("div",{role:"presentation",className:"search-box__enter",onClick:e=>{e.stopPropagation(),e.preventDefault(),this.props.onSearch()}},a.default._t("Admin.ENTER","Enter")," ↵")}renderFilterButton(){const{expanded:e,onToggleFilter:t,formId:n}=this.props,o=(0,s.default)("btn--icon","font-icon-caret-down-two","search-box__filter-trigger",this.state.width<576?"search-box--no-label":"",{collapsed:!e}),l=this.state.width<576?"sr-only":"";return r.default.createElement(i.Button,{"aria-expanded":e,"aria-controls":n,"aria-label":a.default._t("Admin.ADVANCED","Advanced"),onClick:t,className:o,title:a.default._t("Admin.ADVANCED","Advanced")},r.default.createElement("span",{className:l},"Search options"))}renderHideButton(){const{id:e,onHide:t}=this.props;return r.default.createElement(i.Button,{onClick:t,title:a.default._t("Admin.CLOSE","Close"),"aria-label":a.default._t("Admin.CLOSE","Close"),className:"font-icon-cancel btn--no-text btn--icon-lg search-box__cancel","aria-controls":e,"aria-expanded":"true"})}render(){const{children:e,id:t,hideable:n,expanded:o,showFilters:d,dirty:u,clearable:c}=this.props,f=(0,s.default)("search-box",{"search-box--hideable":n,"search-box--not-hideable":!n,"search-box--has-focus":this.state.hasFocus,"search-box--has-not-focus":!this.state.hasFocus,"search-box--has-filters":d,"search-box--has-not-filters":!d,"search-box--compact":this.state.width<576,"search-box--expanded":o}),p=(u||!c)&&this.state.hasFocus;return r.default.createElement("div",{className:f,ref:e=>{this.nodeRef=e}},r.default.createElement(l.default,{onResize:this.onResize},r.default.createElement("div",{className:"search-box__group"},r.default.createElement(i.Label,{for:t,id:`${t}_label`,hidden:!0},a.default._t("Admin.SEARCH","Search")),this.renderTags(),this.renderInput(),p&&this.renderEnterHint(),e,r.default.createElement("div",{className:"icon font-icon-search"}),d&&this.renderFilterButton(),n&&this.renderHideButton())))}}t.Component=p,p.propTypes={onSearch:d.default.func,onToggleFilter:d.default.func,onHideFilter:d.default.func,onChange:d.default.func,onHide:d.default.func,onTagDelete:d.default.func,onTagClick:d.default.func,placeholder:d.default.string,expanded:d.default.bool,formId:d.default.string,id:d.default.string,searchText:d.default.string,hideable:d.default.bool,showFilters:d.default.bool,name:d.default.string,dirty:d.default.bool,clearable:d.default.bool,tagData:d.default.arrayOf(u.default)},p.defaultProps={placeholder:a.default._t("Admin.SEARCH","Search"),tagData:[],filters:{},formData:{},term:"",borders:{top:!1,right:!1,bottom:!0,left:!0}};var h=p;t.default=h},97019:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=c,t.default=void 0;var a=l(n(4754)),r=l(n(67294)),i=l(n(16304)),s=n(53556),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=a.default._t("Admin.SEARCH","Search"),u=a.default._t("Admin.CLEAR","Clear");function c(e){let{visible:t,expanded:n,onSearch:a,onClear:o,formSchemaUrl:l,id:c,identifier:f,clearable:p}=e;const h=(m=a,e=>{"Enter"===e.key&&(e.preventDefault(),m())});var m;const g=t||n;return r.default.createElement(s.Collapse,{id:c,isOpen:n,className:"search-form"},r.default.createElement("div",{className:"search-form__wrapper",onKeyDown:h},g&&l&&r.default.createElement(i.default,{className:"no-change-track",formTag:"div",identifier:f,schemaUrl:l,onSubmit:()=>(a(),Promise.resolve())}),r.default.createElement(s.Button,{className:"search-form__submit",onClick:()=>a(),color:"primary",type:"button"},d),p&&r.default.createElement(s.Button,{className:"search-form__clear",onClick:()=>o()},u)))}c.propTypes={onSearch:o.default.func,onClear:o.default.func,visible:o.default.bool,expanded:o.default.bool,id:o.default.string.isRequired,formSchemaUrl:o.default.string,identifier:o.default.string,clearable:o.default.bool},c.defaultProps={formData:{}};var f=c;t.default=f},65693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=l(n(4754)),r=l(n(67294)),i=n(53556),s=l(n(94184)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=a.default._t("Admin.SHOW_SEARCH","Show search"),u=e=>(0,s.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e}),c=e=>{let{onToggle:t,toggled:n}=e;return r.default.createElement(i.Button,{title:d,onClick:t,className:u(n)},r.default.createElement("span",{className:"sr-only"},d))};t.Component=c,c.propTypes={onToggle:o.default.func,toggled:o.default.bool};var f=c;t.default=f},47465:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(58592))&&a.__esModule?a:{default:a};const i=(e,t,n)=>{if(!Array.isArray(t)||0===t.length)return!1;const a=n.state.fields.find((t=>{let{name:n}=t;return n===e}));if(a&&a.source){return t.map((e=>{const t=a.source.find((t=>{let{value:n}=t;return n.toString()===e.toString()}));return t&&t.title?t.title:e})).join(", ")||!1}return!1};var s={Date:(0,r.default)("ll"),Time:(0,r.default)("LT"),Datetime:(0,r.default)("lll"),Hidden:()=>!1,SingleSelect:(e,t,n)=>{if(void 0===e.value)return!1;const a=i(e.key,[e.value],n);return!!a&&Object.assign({},e,{value:a})},Boolean:e=>{if(e.value){const{value:t,...n}=e;return n}return!1},MultiSelect:(e,t,n)=>{const a=i(e.key,e.value,n);return!!a&&Object.assign({},e,{value:a})},default:e=>!!e.value&&e};t.default=s},58592:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(30381))&&a.__esModule?a:{default:a};var i=e=>(t,n)=>{let{lang:a}=n;if(!t.value)return!1;if(t.value&&a){r.default.locale(a);const n=(0,r.default)(t.value);if(n.isValid())return Object.assign({},t,{value:n.format(e)})}return t};t.default=i},18992:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(47465))&&a.__esModule?a:{default:a};const i=(e,t)=>{let{key:n,value:a,label:r}=t;return`${e}${r.toLowerCase()||n} ${a||""} `};var s=function(e,t){let n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};const s=a=>{const r={key:a.name,label:a.title,value:t[a.name]};let i;return i="function"==typeof n[`#${r.key}`]?n[`#${r.key}`]:"function"==typeof n[a.schemaType]?n[a.schemaType]:n.default,i(r,a,e,t)};n=Object.assign({},r.default,{Structural:(e,t)=>{const{children:n}=t;if(!Array.isArray(n)||0===n.length)return!1;const a=n.map(s).filter((e=>!1!==e)).reduce(i,"").trim(),r=n.map((e=>e.name)),o=`[name=${n[0].name}]`;return!!a&&Object.assign({},e,{value:a,linkedFields:r,focusSelector:o})}},a);const o=e.schema.fields.map(s).filter((e=>!1!==e)),l={};return o.forEach((e=>{l[e.key]=e})),l};t.default=s},63980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(98028)),i=l(n(4754)),s=n(53556),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;te.value===this.props.value));return e="string"==typeof e?e:this.props.value||"",a.default.createElement(s.Input,u({plaintext:!0},this.getInputProps(),{tag:"p"}),e)}getSelectField(){const e=this.props.source?this.props.source.slice():[];return this.props.data.hasEmptyDefault&&!e.find((e=>!e.value))&&e.unshift({value:"",title:this.props.data.emptyString,disabled:!1}),a.default.createElement(s.Input,u({type:"select"},this.getInputProps()),e.map(((e,t)=>{const n=`${this.props.name}-${e.value||`empty${t}`}`,r=e.description||null;return a.default.createElement("option",{key:n,value:e.value,disabled:e.disabled,title:r},e.title)})))}getInputProps(){const e={className:`${this.props.className} ${this.props.extraClass} no-chosen`,id:this.props.id,name:this.props.name,disabled:this.props.disabled};return this.props.readOnly||Object.assign(e,{onChange:this.handleChange,value:this.props.value||""}),e}handleChange(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{id:this.props.id,value:e.target.value})}render(){let e=null;return e=this.props.readOnly?this.getReadonlyField():this.getSelectField(),e}}t.Component=c,c.propTypes={id:o.default.string,name:o.default.string.isRequired,onChange:o.default.func,value:o.default.oneOfType([o.default.string,o.default.number]),readOnly:o.default.bool,disabled:o.default.bool,source:o.default.arrayOf(o.default.shape({value:o.default.oneOfType([o.default.string,o.default.number]),title:o.default.oneOfType([o.default.string,o.default.number]),description:o.default.string,disabled:o.default.bool})),data:o.default.oneOfType([o.default.array,o.default.shape({hasEmptyDefault:o.default.bool,emptyString:o.default.oneOfType([o.default.string,o.default.number])})])},c.defaultProps={source:[],extraClass:"",className:"",data:{emptyString:i.default._t("Boolean.ANY","Any")}};var f=(0,r.default)(c);t.default=f},10202:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){let{title:t,disabled:n,active:s,tabClassName:o,onToggle:l}=e;if(!t)return null;const d=(0,i.default)(o,{active:s});return a.default.createElement(r.NavItem,null,a.default.createElement(r.NavLink,{onClick:l,disabled:n,className:d},t))}l.propTypes={title:s.default.string,disabled:s.default.bool,active:s.default.bool,tabClassName:s.default.string,onToggle:s.default.func.isRequired},l.defaultProps={disabled:!1,active:!1};var d=l;t.default=d},40505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=u(n(67294)),r=n(53556),i=l(n(45697)),s=u(n(93390)),o=l(n(94184));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function c(e){let{name:t,className:n,extraClass:i,disabled:l,children:d}=e;const{activeTab:u,isOnActiveTab:c}=(0,s.default)(),f=t,p=(0,a.useMemo)((()=>({activeTab:u,currentTab:f,isOnActiveTab:!1!==c&&u===t})),[u,f,c]);return a.default.createElement(s.TabContext.Provider,{value:p},a.default.createElement(r.TabPane,{tabId:t,className:(0,o.default)(n,i),disabled:l},a.default.createElement(r.Fade,{in:c},d)))}c.propTypes={name:i.default.string.isRequired,extraClass:i.default.string,className:i.default.string,disabled:i.default.bool};var f=c;t.default=f},96870:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=n(53556),i=o(n(45697)),s=o(n(10202));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{props:n}=e;return a.default.createElement(s.default,l({},n,{onToggle:()=>t!==n.name&&i(n.name),active:t===n.name}))}));return o&&o.length>1?a.default.createElement(r.Nav,{tabs:!0,role:"tablist"},o):null}d.propTypes={currentTab:i.default.string,onToggle:i.default.func.isRequired};var u=d;t.default=u},61404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=m,t.default=void 0;var a=h(n(67294)),r=n(53556),i=f(n(94184)),s=f(n(45697)),o=n(86706),l=h(n(53104)),d=h(n(93390)),u=f(n(96870)),c=f(n(56204));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function m(e){let{hideNav:t,children:n,activeTab:s,className:o,extraClass:l,id:f,activateTab:p,defaultActiveKey:h}=e;const m={className:(0,i.default)([o,l]),id:f},g=s||(0,c.default)(h,n),v=(0,d.default)(),b=v?v.isOnActiveTab:void 0,_=(0,a.useMemo)((()=>({activeTab:g,isOnActiveTab:b})),[s,b]);return a.default.createElement("div",m,a.default.createElement("div",{className:"wrapper"},!t&&a.default.createElement(u.default,{currentTab:g,onToggle:p},n),a.default.createElement(r.TabContent,{activeTab:g},a.default.createElement(d.TabContext.Provider,{value:_},n))))}m.propTypes={id:s.default.string.isRequired,defaultActiveKey:s.default.string,extraClass:s.default.string,hideNav:s.default.bool,activateTab:s.default.func,activeTab:s.default.string},m.defaultProps={className:"",extraClass:"",hideNav:!1};const g=e=>`${e.formid}__${e.id}`;var v=(0,o.connect)((function(e,t){const n=g(t);return{...e.tabs.fields[n]?e.tabs.fields[n]:{activeTab:null}}}),(function(e,t){const n=g(t);return{activateTab(t){e(l.activateTab(n,t))}}}))(m);t.default=v},56204:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=a.Children.toArray(t);if(!n||0===n.length)return"";let r;"string"==typeof e&&(r=n.find((t=>{let{props:{name:n}}=t;return n===e})));r||(r=n[0]);return r.props.name};var a=n(67294)},97228:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(97023)),i=d(n(72543)),s=d(n(94184)),o=d(n(45697)),l=d(n(53621));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t({showSummaryView:t})))}render(){const{maxSize:e,onSummary:t,...n}=this.props,o=this.state.showSummaryView,d=this.props.tags.length,u=(0,s.default)("compact-tag-list",{"compact-tag-list__show-summary-view":o});return a.default.createElement("div",{className:u,ref:e=>{this.nodeRef=e}},a.default.createElement(i.default,{onResize:this.onResize,className:"compact-tag-list__placeholder","aria-hidden":!0},a.default.createElement(r.default,c({},n,{focusable:!1}))),a.default.createElement("div",{className:"compact-tag-list__visible"},o?a.default.createElement(l.default,{count:d,onClick:t,onNext:n.onHolderFocus}):a.default.createElement(r.default,n)))}}f.propTypes=Object.assign({},r.default.propTypes,{maxSize:o.default.number,onSummary:o.default.func}),f.defaultProps={maxSize:0,onSummary:()=>{}};var p=f;t.default=p},53621:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=o(n(85362)),i=o(n(4754)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{label:t,count:n,...i}=e;return a.default.createElement(r.default,l({},i,{deletable:!1,title:`${n} ${t}`}),n," ",a.default.createElement("span",{className:"font-icon-sliders","aria-label":t}))};d.propTypes=Object.assign({},r.default.propTypes,{label:s.default.string,count:s.default.number}),d.defaultProps={label:i.default._t("Admin.SUMMARY_TAG_LABEL","filters")};var u=d;t.default=u},85362:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=n(53556),i=l(n(94184)),s=l(n(4754)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onClick:t,onDelete:n,onDeleteKey:s,onBackSpace:o,onPrevious:l,onNext:u,deletable:c,dataKey:p,label:h,value:m,children:g,focusable:v,...b}=e;const _=((e,t,n)=>(t||e)+(n?`: ${n}`:""))(p,h,m);return a.default.createElement(r.Button,d({},b,{role:"button",className:(0,i.default)("tag-component","btn-sm",{"tag-component--deletable":c}),onClick:e=>{e.preventDefault(),t(p)},tabIndex:v?0:void 0,onKeyDown:e=>{((e,t,n,a,r,i)=>{switch(e.key){case"Backspace":e.preventDefault(),a(t);break;case"Delete":e.preventDefault(),n(t);break;case"ArrowLeft":e.preventDefault(),r(t);break;case"ArrowRight":e.preventDefault(),i(t)}})(e,p,s,o,l,u)},title:_}),c&&a.default.createElement(f,{onDelete:n,dataKey:p}),g||_)},c=e=>{e.target.parentElement.focus()},f=e=>{let{dataKey:t,onDelete:n}=e;return a.default.createElement(r.Button,{onClick:e=>{e.stopPropagation(),e.preventDefault(),n(t)},"aria-label":s.default._t("Admin.REMOVE_TAG","Remove Tag"),title:s.default._t("Admin.REMOVE_TAG","Remove Tag"),onFocus:c,tabIndex:-1,className:"tag-component__delete font-icon-cancel btn--no-text btn--icon-sm"})};u.propTypes={onClick:o.default.func,onDelete:o.default.func,onDeleteKey:o.default.func,onBackSpace:o.default.func,onPrevious:o.default.func,onNext:o.default.func,deletable:o.default.bool,dataKey:o.default.string,label:o.default.string,value:o.default.string,focusable:o.default.bool},u.defaultProps={tag:"span",deletable:!1,onClick:()=>{},onDelete:()=>{},onDeleteKey:()=>{},onBackSpace:()=>{},onPrevious:()=>{},onNext:()=>{},focusable:!0};var p=u;t.default=p},97023:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(67294)),r=o(n(85362)),i=o(n(45697)),s=o(n(43117));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=document.activeElement[e?"nextElementSibling":"previousElementSibling"];return!!t&&(t.focus(),!0)},c=e=>{let{tags:t,deletable:n,focusable:i,onTagDelete:s,onTagClick:o,onHolderFocus:c}=e;const f=e=>{u(d)||c(),s(e)},p=e=>{u(false)||u(d)||c(),s(e)};return a.default.createElement("ul",{className:"tag-list"},t.map((e=>a.default.createElement(r.default,l({},e,{tag:"li",deletable:n,dataKey:e.key,focusable:i,onDelete:s,onDeleteKey:n&&s?f:void 0,onBackSpace:n&&s?p:void 0,onNext:()=>{u(d)||c()},onPrevious:()=>{u(false)},onClick:o})))))};t.Component=c,c.propTypes={onTagClick:i.default.func,onTagDelete:i.default.func,onHolderFocus:i.default.func,deletable:i.default.bool,tags:i.default.arrayOf(s.default),focusable:i.default.bool},c.defaultProps={deletable:!1,focusable:!0,onTagDelete:()=>{},onTagClick:()=>{},onHolderFocus:()=>{}};var f=c;t.default=f},43117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(45697))&&a.__esModule?a:{default:a};var i=r.default.shape({key:r.default.string.isRequired,label:r.default.string,value:r.default.string});t.default=i},74898:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(98028)),r=i(n(16725));function i(e){return e&&e.__esModule?e:{default:e}}class s extends r.default{getInputProps(){const e=super.getInputProps();return this.isMultiline()&&Object.assign(e,{type:"textarea",rows:this.props.data.rows,cols:this.props.data.columns}),e}isMultiline(){return this.props.data&&this.props.data.rows>1}}t.Component=s;var o=(0,a.default)(s);t.default=o},63182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(98028)),r=d(n(30381)),i=d(n(68300)),s=d(n(4754)),o=d(n(45697)),l=n(81463);function d(e){return e&&e.__esModule?e:{default:e}}const u="LT";class c extends l.Component{getInputProps(){const e=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,r.default)().endOf("month").format(u)}),t=this.asHTML5()?"time":"text";return{...super.getInputProps(),type:t,placeholder:e}}isMultiline(){return!1}hasNativeSupport(){return this.props.modernizr.inputtypes.time}convertToLocalised(e){let t="";if(e){const n=(0,r.default)(e,"HH:mm:ss");n.isValid()&&(t=n.format(u))}return t}convertToIso(e){let t="";if(e){const n=(0,r.default)(e,u);n.isValid()&&(t=n.format("HH:mm:ss"))}return t}}t.Component=c,c.propTypes={lang:o.default.string,modernizr:o.default.object,data:o.default.shape({html5:o.default.bool})},c.defaultProps={modernizr:i.default,data:{}};var f=(0,a.default)(c);t.default=f},20164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tipShape=t.default=t.TIP_TYPES=t.TIP_IMPORTANCE_LEVELS=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(45697)),i=n(53556),s=d(n(4754)),o=d(n(94184)),l=d(n(22602));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}const c={TITLE:"title",INPUT_GROUP:"input-group"};t.TIP_TYPES=c;const f={NORMAL:"normal",HIGH:"high"};t.TIP_IMPORTANCE_LEVELS=f;const p={[f.NORMAL]:{iconColor:"muted",description:s.default._t("Admin.NORMAL_TIP","Tip")},[f.HIGH]:{iconColor:"danger",description:s.default._t("Admin.IMPORTANT_TIP","Important tip")}};function h(e){const{content:t,fieldTitle:n,icon:r,id:d,importance:u}=e,{iconColor:f,description:h}=p[u],m=s.default.inject(s.default._t("Admin.TIP_LABEL","{description} for {fieldTitle}"),{description:h,fieldTitle:n}),g=["tip",e.extraClass];e.type===c.TITLE?g.push("tip--title"):e.type===c.INPUT_GROUP&&g.push("tip--input-group","btn--last","btn-outline-secondary",`text-${f}`);const v=`${d}-tip`,b={id:v,onClick:()=>{},className:(0,o.default)(g),noText:!0,icon:r};return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,b,m),a.default.createElement(i.UncontrolledPopover,{trigger:"legacy",placement:"top-end",target:v},a.default.createElement(i.PopoverBody,null,t)))}const m={content:r.default.string.isRequired,importance:r.default.oneOf(Object.values(f)),type:r.default.oneOf(Object.values(c)),icon:r.default.string};t.tipShape=m,h.propTypes={...m,extraClass:r.default.string,fieldTitle:r.default.string.isRequired,id:r.default.string.isRequired},h.defaultProps={importance:f.NORMAL,icon:"lamp",type:c.INPUT_GROUP};var g=h;t.default=g},87890:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toastShape=t.default=void 0;var a=u(n(67294)),r=u(n(45697)),i=u(n(4754)),s=n(53556),o=u(n(94184)),l=u(n(22602)),d=n(46735);function u(e){return e&&e.__esModule?e:{default:e}}const c={text:r.default.string.isRequired,dismissed:r.default.bool.isRequired,type:r.default.string.isRequired,actions:r.default.arrayOf(r.default.shape(l.default.propTypes))};t.toastShape=c;const f=e=>{let{type:t,text:n,onDismiss:r,dismissed:u,actions:c}=e;const f=(0,o.default)("toast",`toast--${t}`,{"toast--dismissing":u});return a.default.createElement(s.Toast,{className:f,isOpen:!0},a.default.createElement(s.ToastBody,{className:"toast__body"},a.default.createElement(l.default,{className:"toast__close",icon:"cancel",noText:!0,onClick:e=>{e.preventDefault(),r()},color:"none"},i.default._t("Admin.DISMISS","Dismiss")),a.default.createElement("div",{className:"toast__content",role:"alert","aria-live":"assertive","aria-atomic":"true"},n)),c.length>0&&a.default.createElement(d.ToastActions,{actions:c,onDismiss:r,dismissed:u}))};f.propTypes={...c,onDismiss:r.default.func.isRequired},f.defaultProps={actions:[]};var p=f;t.default=p},46735:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ToastActions=t.ToastAction=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(22602));function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{label:t,href:n,onClick:r,dismissed:s,onDismiss:l}=e;const d=n?{href:n,tag:"a"}:{onClick:e=>{e.preventDefault(),s||(r&&r(),l())}};return a.default.createElement(i.default,o({color:"link",className:"toast__action"},d),t)};t.ToastAction=l;const d=e=>{let{actions:t,dismissed:n,onDismiss:r}=e;return 0===t.length?null:a.default.createElement("div",{className:"toast__actions"},t.slice(0,2).map(((e,t)=>a.default.createElement(l,o({key:t},e,{onDismiss:r,dismissed:n})))))};t.ToastActions=d,d.propTypes={dismissed:r.default.bool.isRequired,actions:r.default.arrayOf(r.default.shape({label:r.default.string.isRequired,href:r.default.string,onClick:r.default.func})),onDismiss:r.default.func.isRequired},d.defaultProps={actions:[]};var u=d;t.default=u},60452:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(45697)),i=s(n(87890));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{toasts:t,onDismiss:n,onPause:r,onResume:s}=e;const[o,d]=(0,a.useState)(void 0),u=e=>()=>{o&&clearTimeout(o),d(setTimeout(e,100))},c=u(r),f=u(s),p={onMouseEnter:c,onFocus:c,onMouseLeave:f,onBlur:f};return a.default.createElement("div",l({className:"toasts","aria-live":"polite","aria-atomic":"true"},p),a.default.createElement("div",{className:"toasts__wrapper"},t.map((e=>{let{id:t,...r}=e;return a.default.createElement(i.default,l({key:t},r,{onDismiss:()=>n(t)}))}))))};d.propTypes={toasts:r.default.arrayOf(r.default.shape(i.default.propTypes)).isRequired,onDismiss:r.default.func.isRequired,onPause:r.default.func.isRequired,onResume:r.default.func.isRequired},d.defaultProps={};var u=d;t.default=u},53330:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(45332));function s(e){return e&&e.__esModule?e:{default:e}}const o=e=>{let{showBackButton:t,children:n,onBackButtonClick:r}=e;return a.default.createElement("div",{className:"toolbar toolbar--north"},a.default.createElement("div",{className:"toolbar__navigation fill-width"},t&&a.default.createElement(i.default,{onClick:e=>{e.preventDefault(),"function"==typeof r&&r(e)},className:"toolbar__back-button"}),n))};o.propTypes={onBackButtonClick:r.default.func,showBackButton:r.default.bool},o.defaultProps={showBackButton:!1};var l=o;t.default=l},59888:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SINGLE_EMPTY_VALUE=t.MULTI_EMPTY_VALUE=t.ConnectedTreeDropdownField=t.Component=void 0,Object.defineProperty(t,"findTreeByID",{enumerable:!0,get:function(){return b.findTreeByID}}),Object.defineProperty(t,"findTreeByPath",{enumerable:!0,get:function(){return b.findTreeByPath}}),Object.defineProperty(t,"findTreePath",{enumerable:!0,get:function(){return b.findTreePath}});var a=w(n(67294)),r=_(n(45697)),i=n(86706),s=n(14890),o=_(n(10932)),l=_(n(25114)),d=_(n(4754)),u=_(n(98028)),c=_(n(94301)),f=w(n(14504)),p=w(n(25548)),h=_(n(98268)),m=_(n(8575)),g=n(53556),v=n(10259),b=n(11355);function _(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t}=e;return a.default.createElement("span",{className:"treedropdownfield__option-title--highlighted"},t)};class T extends a.Component{constructor(e){super(e),this.render=this.render.bind(this),this.renderInput=this.renderInput.bind(this),this.renderMenuList=this.renderMenuList.bind(this),this.renderOption=this.renderOption.bind(this),this.formatOptionLabel=this.formatOptionLabel.bind(this),this.getBreadcrumbs=this.getBreadcrumbs.bind(this),this.getDropdownOptions=this.getDropdownOptions.bind(this),this.getVisibleTree=this.getVisibleTree.bind(this),this.handleBack=this.handleBack.bind(this),this.handleChange=this.handleChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNavigate=this.handleNavigate.bind(this),this.handleSearchChange=this.handleSearchChange.bind(this),this.handleSearchReset=this.handleSearchReset.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.callFetch=this.callFetch.bind(this),this.lazyLoad=this.lazyLoad.bind(this),this.filterOption=this.filterOption.bind(this),this.noOptionsMessage=this.noOptionsMessage.bind(this),this.state={opened:!1},this.searchTimer=null}componentDidMount(){this.props.readOnly||this.props.disabled||this.initialise();const e=this.props.id,t=(this.props.data.multiple?this.props.data.valueObjects||[]:[this.props.data.valueObject]).filter((e=>e));t.length&&this.props.actions.treeDropdownField.addSelectedValues(e,t)}componentDidUpdate(e){if(this.props.readOnly||this.props.disabled)return;let t=!1,n=[];this.props.search!==e.search&&(t=!0,n=this.props.visible),e.data.urlTree!==this.props.data.urlTree&&(t=!0),e.data.cacheKey!==this.props.data.cacheKey&&(t=!0),t&&this.loadTree(n,this.props.search,this.props)}getVisibleTree(){return this.props.findTreeByPath(this.props.tree,this.props.visible)}getBreadcrumbs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.visible;const t=[];if(!e)return t;let n=this.props.tree;for(const a of e){if(!n.children)break;if(n=n.children.find((e=>e.id===a)),!n)break;t.push(n)}return t}getDropdownOptions(){const e=this.props.value,t=this.getVisibleTree();let n=t?[...t.children]:[];const a=this.props.selectedValues.filter((t=>t.id===e||Array.isArray(e)&&e.find((e=>e===t.id))));return!this.state.opened&&this.props.data.showSelectedPath?n=a.map((e=>({...e,title:e.titlePath||e.title}))):a.length&&(n=[...a.filter((e=>!n.find((t=>t.id===e.id)))),...n]),n.unshift({id:this.props.data.multiple?"":0,title:this.props.data.hasEmptyDefault?this.props.data.emptyString:null,disabled:!n.length||!this.props.data.hasEmptyDefault}),n}getPath(e){const t=this.props.findTreePath(this.props.tree,e,this.props.data.treeBaseId);return this.getBreadcrumbs(t).reduce(((e,t)=>`${e}${t.contextString||""}${t.title}/`),"")}initialise(){return this.loadTree([],this.props.search).then((e=>{let t=[];!this.props.data.multiple&&this.props.value&&(t=this.props.findTreePath(e,this.props.value,this.props.data.treeBaseId),t?t.pop():t=[]),this.props.actions.treeDropdownField.setVisible(this.props.id,t)}))}callFetch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;const a=m.default.parse(n.data.urlTree,!0);n.data.showSearch&&t.length&&(a.query.search=t,a.query.flatList="1"),e.length?a.query.ID=e[e.length-1]:!n.data.multiple&&n.value&&(a.query.forceValue=n.value),a.query.format="json",a.search=null;const r=m.default.format(a);return this.props.fetch(r,{credentials:"same-origin"}).then((e=>e.json()))}lazyLoad(e){if(e.find((e=>this.props.loading.indexOf(e)>-1||this.props.failed.indexOf(e)>-1)))return Promise.resolve({});const t=this.props.findTreeByPath(this.props.tree,e);return t&&(0===t.count||t.children.length)?Promise.resolve({}):this.loadTree(e)}loadTree(e){let 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((t=>(n.actions.treeDropdownField.updateTree(n.id,e,t),t))).catch((t=>{if(n.actions.treeDropdownField.updateTreeFailed(n.id,e),"function"==typeof n.onLoadingError)return n.onLoadingError({errors:[{value:t.message,type:"error"}]});throw t}))}hasSearch(){return this.props.data.showSearch&&Boolean(this.props.search)}filterOption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=this.getVisibleTree();if((0===e.value||""===e.value)&&(!this.props.data.hasEmptyDefault||this.props.visible.length||this.hasSearch()))return!1;const a=e.label&&e.label.toLocaleLowerCase(),r=t.toLocaleLowerCase();return r?a&&a.includes(r):!n||!e.value||n.children.find((t=>t.id===e.value))}handleOpen(){this.setState({opened:!0}),this.handleSearchReset()}handleClose(){this.setState({opened:!1})}handleSearchReset(){clearTimeout(this.searchTimer),this.props.actions.treeDropdownField.setSearch(this.props.id,"")}handleSearchChange(e){clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.props.actions.treeDropdownField.setSearch(this.props.id,e)}),500)}handleChange(e){let t=null;if(this.handleSearchReset(),this.props.data.multiple){if(t=C,e&&e.length){const n=e&&e.filter(((t,n)=>e.findIndex((e=>e.id===t.id))===n));t=n.map((e=>e.id)),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,n)}}else{const n=e?e.id:null;let a=(this.getVisibleTree()||this.props.tree).children.find((e=>e.id===n));a&&(this.props.data.showSelectedPath&&(a={...a,titlePath:this.getPath(n)}),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,[a])),t=n||0}"function"==typeof this.props.onChange&&this.props.onChange(t)}handleNavigate(e,t){if(this.hasSearch())return;e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault();let 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)}handleKeyDown(e){if(this.hasSearch())return void(27===e.keyCode&&this.handleSearchReset(e));const t=this.selectField.state.focusedOption;if(t)switch(e.keyCode){case 37:this.handleBack(e);break;case 39:t.count&&this.handleNavigate(e,t.id)}}handleBack(e){if(this.hasSearch())return;e.stopPropagation(),e.preventDefault();let 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)}renderInput(e){let{children:t,...n}=e;return n.id=this.props.id,a.default.createElement(f.components.Input,n,t)}renderBreadcrumbs(e,t){let{cx:n,getStyles:r,getClassNames:i,...s}=t;if(0===e.length)return null;e=e.map((e=>e.title)).join(" / ");const l=this.hasSearch()?"font-icon-search":"font-icon-left-open-big",d=n({option:!0,breadcrumbs:!0},i("option",{})),u=o.default.div(r("option",s));return a.default.createElement(u,{className:d,onClick:this.handleBack,role:"button",tabIndex:0},a.default.createElement("button",{type:"button",className:"treedropdownfield__breadcrumbs-button"},a.default.createElement("span",{className:`icon ${l}`})),a.default.createElement("span",{className:"treedropdownfield__breadcrumbs-crumbs flexbox-area-grow"},e))}renderMenuList(e){let{children:t,...n}=e;const r=this.getBreadcrumbs();return a.default.createElement(f.components.MenuList,n,this.renderBreadcrumbs(r,n),t)}renderOption(e){let{children:t,...n}=e,r=null;const i=n.data;if(i.count&&!this.hasSearch()){const e=e=>this.handleNavigate(e,i.id);r=a.default.createElement("button",{type:"button",className:"treedropdownfield__option-button fill-width",onClick:e,onMouseDown:e,onTouchStart:e},a.default.createElement("span",{className:"treedropdownfield__option-count-icon font-icon-right-open-big"}))}let s=null;return this.hasSearch()&&(s=i.contextString,s||!this.props.data.hasEmptyDefault||this.props.visible.length||(s=this.props.data.emptyString)),a.default.createElement(f.components.Option,n,a.default.createElement("span",{className:"treedropdownfield__option-title-box flexbox-area-grow fill-height"},a.default.createElement("span",{className:"treedropdownfield__option-title"},t),s&&a.default.createElement("span",{className:"treedropdownfield__option-context"},s)),r)}renderReadOnly(){const e={id:this.props.id,readOnly:this.props.readOnly,disabled:this.props.disabled},t=this.props.extraClass?`treedropdownfield ${this.props.extraClass}`:"treedropdownfield";let n=this.props.data.hasEmptyDefault?this.props.data.emptyString:"";const r=this.props.selectedValues;if(this.props.data.multiple){n=this.props.value.map((e=>r.find((t=>t.id===e))||e)).map((e=>e.title)).join(", ")}else{const e=r.find((e=>e.id===this.props.value));n=this.props.value,e&&"string"==typeof e.title&&(n=e.title)}return a.default.createElement("div",{className:t},a.default.createElement("span",{className:"treedropdownfield__title"},n),a.default.createElement(g.Input,O({type:"hidden",name:this.props.name,value:this.props.value},e)))}formatOptionLabel(e){const{title:t}=e;return this.props.search.length?(0,v.mapHighlight)(t||"",this.props.search,E):t}noOptionsMessage(e){let{inputValue:t}=e;const n=this.getVisibleTree()||{};return this.props.failed.indexOf(n.id||0)>=0?d.default._t("Admin.TREEDROPDOWN_FAILED","Failed to load"):t||!n.id?d.default._t("Admin.TREEDROPDOWN_NO_OPTIONS","No options"):d.default._t("Admin.TREEDROPDOWN_NO_CHILDREN","No children")}render(){if(this.props.readOnly||this.props.disabled)return this.renderReadOnly();const e=this.props.extraClass?`treedropdownfield ${this.props.extraClass}`:"treedropdownfield",t=this.getDropdownOptions(),n=Array.isArray(this.props.value)?this.props.value:[this.props.value];let r=this.props.selectedValues.filter((e=>n.includes(e.id)));r.length||(r=t.filter((e=>n.includes(e.id)))),!r.length&&this.props.data.hasEmptyDefault&&(r=t[0]);const i=void 0!==this.props.data.showSearch&&this.props.data.showSearch,s={Input:this.renderInput,MenuList:this.renderMenuList,Option:this.renderOption},o=this.getVisibleTree()||{},u=this.props.loading.indexOf(o.id||0)>=0;return a.default.createElement(l.default,null,a.default.createElement(f.default,{isSearchable:i,isMulti:this.props.data.multiple,isClearable:!0,className:e,name:this.props.name,options:t,delimiter:",",components:s,formatOptionLabel:this.formatOptionLabel,filterOption:this.filterOption,onChange:this.handleChange,onMenuOpen:this.handleOpen,onMenuClose:this.handleClose,onKeyDown:this.handleKeyDown,onInputChange:this.handleSearchChange,isLoading:u,loadingMessage:()=>d.default._t("Admin.TREEDROPDOWN_LOADING","Loading..."),noOptionsMessage:this.noOptionsMessage,value:r,ref:e=>{this.selectField=e},placeholder:this.props.data.emptyString,getOptionLabel:e=>{let{title:t}=e;return t},getOptionValue:e=>{let{id:t}=e;return t},classNamePrefix:"treedropdownfield",classNames:{option:()=>"fill-width"}}))}}t.Component=T,T.propTypes={className:r.default.string,extraClass:r.default.string,id:r.default.string,name:r.default.string.isRequired,onChange:r.default.func,value:r.default.oneOfType([r.default.string,r.default.number,r.default.array]),readOnly:r.default.bool,disabled:r.default.bool,tree:r.default.shape(h.default.propTypes),findTreeByPath:r.default.func,findTreePath:r.default.func,visible:r.default.array,loading:r.default.array,failed:r.default.array,selectedValues:r.default.array,data:r.default.shape({cacheKey:r.default.string,urlTree:r.default.string.isRequired,emptyString:r.default.string,valueObject:r.default.shape(h.default.propTypes),valueObjects:r.default.arrayOf(r.default.shape(h.default.propTypes)),hasEmptyDefault:r.default.bool,showSearch:r.default.bool,multiple:r.default.bool,showSelectedPath:r.default.bool,treeBaseId:r.default.number}),onLoadingError:r.default.func,search:r.default.string,actions:r.default.shape({treeDropdownField:r.default.object}),fetch:r.default.func},T.defaultProps={value:"",extraClass:"",className:"",tree:{},visible:[],loading:[],failed:[],findTreeByPath:b.findTreeByPath,findTreePath:b.findTreePath,fetch:c.default};const S=(0,i.connect)((function(e,t){const n=t.id,a=e.treeDropdownField.fields[n]?e.treeDropdownField.fields[n]:{tree:{},visible:[],loading:[],failed:[],search:"",selectedValues:[]};let r=t.value;return t.data.multiple&&t.value===C&&(r=[]),t.data.multiple||t.value||(r=0),{...a,value:r}}),(function(e){return{actions:{treeDropdownField:(0,s.bindActionCreators)(p,e)}}}))(T);t.ConnectedTreeDropdownField=S;var P=(0,u.default)(S);t.default=P},98268:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(45697))&&a.__esModule?a:{default:a};const i=()=>null;i.propTypes={id:r.default.oneOfType([r.default.string,r.default.number]),title:r.default.string,titlePath:r.default.string,disabled:r.default.bool,parentid:r.default.number,count:r.default.number,depth:r.default.number,expanded:r.default.bool,limited:r.default.bool,marked:r.default.bool,opened:r.default.bool,children:r.default.array};var s=i;t.default=s},11355:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findTreePath=t.findTreeByPath=t.findTreeByID=void 0;const n=(e,t)=>{if(!e||0===Object.keys(e).length)return null;if(0===t.length)return e;const a=t.slice(0),r=a.shift(),i=e.children.find((e=>e.id===r));return i?n(i,a):null};t.findTreeByPath=n;const a=(e,t)=>{if(!t||!e||!e.children||0===Object.keys(e).length)return null;if(e.id===t)return e;for(const n of e.children){const e=a(n,t);if(null!==e)return e}return null};t.findTreeByID=a;const r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t)return[];if(!e||0===Object.keys(e).length)return null;if(e.id===t)return[e.id];if(!e.children)return null;for(const a of e.children){const i=r(a,t);if(null!==i)return e.id&&e.id!==n&&i.unshift(e.id),i}return null};t.findTreePath=r},80384:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(45697)),i=d(n(94184)),s=d(n(4754)),o=d(n(34411)),l=d(n(6732));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.PureComponent{renderHeader(){return a.default.createElement("thead",null,a.default.createElement("tr",null,a.default.createElement("th",{scope:"col",className:"used-on__col--index"},s.default._t("Admin.USED_ON_NUM","#")),a.default.createElement("th",{scope:"col",className:"used-on__col--title"},s.default._t("Admin.USED_ON","Used on"))))}renderBody(){const{usedOn:e,loading:t,error:n}=this.props;if(n||!e||!e.length){let e=null,r=null;n?(e=s.default.inject(s.default._t("Admin.LOADING_ERROR","As error occured when loading the data: {message}"),{message:n}),r="error"):t?(e=a.default.createElement(o.default,null),r="loading"):(e=s.default._t("Admin.NOT_USED","This file is currently not in use."),r="empty");const l=(0,i.default)(["used-on__message",`used-on__message--${r}`]);return a.default.createElement("tbody",{"aria-live":"polite"},a.default.createElement("tr",null,a.default.createElement("td",{className:l,colSpan:"3"},e)))}return a.default.createElement("tbody",{"aria-live":"polite"},e.map(this.renderRow))}renderRow(e,t){const{id:n,type:r}=e,s=e.ancestors?[e].concat(e.ancestors).reverse():[e].reverse();let o="#",l=!0;const d=s.map(((e,r)=>{let s=e.title;const d=e.link;s&&s.length>=25&&(s=`${s.substring(0,25).trim()}...`),d&&(o=d);const u=`${t}-${n}-${r}`,c=["used-on__title-item"];return l&&(c.push("used-on__title-item--first"),l=!1),a.default.createElement("li",{className:(0,i.default)(c),key:u},s)})),u=`${t}-${n}`;return a.default.createElement("tr",{key:u,className:"used-on__row"},a.default.createElement("td",{className:"used-on__col--index"},a.default.createElement("a",{href:o,className:"used-on__cell-link"},t+1)),a.default.createElement("td",{className:"used-on__col--title"},a.default.createElement("a",{href:o,className:"used-on__cell-link"},a.default.createElement("ul",{className:"used-on__title-items"},d),a.default.createElement("span",{className:"used-on__type"},r))))}render(){return a.default.createElement("table",{className:"table used-on__table"},this.renderHeader(),this.renderBody())}}t.Component=c,c.propTypes={loading:r.default.bool,usedOn:r.default.arrayOf(r.default.shape({id:r.default.oneOfType([r.default.string,r.default.number]),title:r.default.string,type:r.default.string,link:r.default.string,ancestors:r.default.arrayOf(r.default.shape({title:r.default.string,link:r.default.string})).isRequired})),error:r.default.string};var f=(0,l.default)(c);t.default=f},6732:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a},s=n(86706),o=n(36992),l=n(93390);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}var u=e=>{class t extends r.Component{componentDidMount(){this.haveFetchedData=!1,this.props.forceFetch&&this.fetchDataFromEndpoint()}componentDidUpdate(e){const t=this.props.tabContext;(e.identifier!==this.props.identifier||!t||t.isOnActiveTab)&&this.fetchDataFromEndpoint()}fetchDataFromEndpoint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const{method:t,url:n}=e.data.readUsageEndpoint||{};this.haveFetchedData&&!this.props.forceFetch||e.loadUsedOn(e.identifier,t,n),this.haveFetchedData=!0}render(){return r.default.createElement(e,this.props)}}t.propTypes={identifier:i.default.string,loading:i.default.bool,data:i.default.oneOfType([i.default.array,i.default.shape({recordClass:i.default.string,recordId:i.default.oneOfType([i.default.string,i.default.number]),readUsageEndpoint:i.default.shape({url:i.default.string,method:i.default.string})})]),usedOn:i.default.array,forceFetch:i.default.bool};const n=(0,l.injectTabContext)(t),a=(0,s.connect)(((e,t)=>{const{recordClass:n,recordId:a}=t.data,r=n&&a?`${n}#${a}`:"",i=e.usedOn;return{identifier:r,loading:i.loading.includes(r),usedOn:i.usedOn[r]||null,error:i.errors[r]||null}}),{loadUsedOn:o.loadUsedOn})(n);return a.Component=n,a};t.default=u},57129:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statuses=t.default=void 0;var a=l(n(67294)),r=l(n(94184)),i=l(n(45697)),s=l(n(37294)),o=l(n(4754));function l(e){return e&&e.__esModule?e:{default:e}}const d=["draft","modified","live","archived"];t.statuses=d;const u=e=>{let{status:t,className:n}=e;const i={className:(0,r.default)(n,"versioned-badge",`versioned-badge--${t}`),message:o.default._t(`ADMIN.${t.toUpperCase()}`,(l=t,l.replace(/^\w/,(e=>e.toUpperCase())))),status:"default"};var l;return a.default.createElement(s.default,i)};u.propTypes={status:i.default.oneOf(d).isRequired,className:i.default.string};var c=u;t.default=c},98031:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=f(n(45697)),i=n(53556),s=f(n(4754)),o=n(86706),l=n(14890),d=n(56486),u=n(15005),c=f(n(94184));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.setState((e=>({dropdownOpen:!e.dropdownOpen})))),0)}handleSplitSelect(){this.props.onSplitSelect()}handlePreviewSelect(){this.props.onPreviewSelect()}handleEditSelect(){this.props.onEditSelect()}renderSplitDropdownItem(){const{activeState:e,splitAvailable:t,splitIconClass:n}=this.props,r=(0,c.default)("btn","icon-view","first",n,{"viewmode-toggle__button":!0,"viewmode-toggle--selected":e===u.VIEW_MODE_STATES.SPLIT,disabled:!t});return a.default.createElement(i.DropdownItem,{type:"button",disabled:!t,className:r,value:u.VIEW_MODE_STATES.SPLIT,onClick:this.handleSplitSelect,id:"splitModeButton"},s.default._t("Admin.SPLIT_MODE","Split mode"))}renderEditDropDownItem(){const{activeState:e,editIconClass:t}=this.props,n=(0,c.default)("btn","icon-view","last","viewmode-toggle__button",t,{"viewmode-toggle--selected":e===u.VIEW_MODE_STATES.EDIT});return a.default.createElement(i.DropdownItem,{type:"button",className:n,value:"content",onClick:this.handleEditSelect},s.default._t("Admin.EDIT_MODE","Edit mode"))}renderPreviewDropDownItem(){const{activeState:e,previewIconClass:t}=this.props,n=(0,c.default)("btn","icon-view","viewmode-toggle__button",t,{"viewmode-toggle--selected":e===u.VIEW_MODE_STATES.PREVIEW});return a.default.createElement(i.DropdownItem,{type:"button",className:n,value:"preview",onClick:this.handlePreviewSelect},s.default._t("Admin.PREVIEW_MODE","Preview mode"))}render(){const{activeState:e,area:t,splitAvailable:n,dropdownToggleProps:r}=this.props;if(t===u.VIEW_MODE_STATES.EDIT&&e===u.VIEW_MODE_STATES.SPLIT)return null;const o=(0,c.default)(this.getIconClass(),"btn","viewmode-toggle__dropdown",r.classname);return a.default.createElement(i.Dropdown,{isOpen:this.state.dropdownOpen,toggle:this.toggle,className:"viewmode-toggle"},a.default.createElement(i.DropdownToggle,h({className:o,caret:!0},r),a.default.createElement("span",{className:"viewmode-toggle__chosen-view-title"},this.getTitle())),a.default.createElement(i.DropdownMenu,null,this.renderSplitDropdownItem(),this.renderEditDropDownItem(),this.renderPreviewDropDownItem(),!n&&a.default.createElement("div",{className:"disabled-tooltip"},a.default.createElement("span",{className:"disabled-tooltip-span"},s.default._t("Admin.SCREEN_TOO_SMALL","Screen size too small")))))}}t.Component=m,m.propTypes={activeState:r.default.oneOf(Object.values(u.VIEW_MODE_STATES)),area:r.default.string.isRequired,splitAvailable:r.default.bool,onPreviewSelect:r.default.func,onEditSelect:r.default.func,onSplitSelect:r.default.func,editIconClass:r.default.string,previewIconClass:r.default.string,splitIconClass:r.default.string},m.defaultProps={splitAvailable:!0,editIconClass:"font-icon-edit-write",previewIconClass:"font-icon-eye",splitIconClass:"font-icon-columns",dropdownToggleProps:{}};var g=(0,l.compose)((0,o.connect)((function(e){return{activeState:e.viewMode.activeState,splitAvailable:e.viewMode.splitAvailable}}),(function(e){return{onSplitSelect(){e((0,d.selectSplitMode)())},onEditSelect(){e((0,d.selectEditMode)())},onPreviewSelect(){e((0,d.selectPreviewMode)())}}})))(m);t.default=g},55766:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a},i=n(54582),s=n(89250);var o=(0,i.provideInjector)((e=>{let{children:t}=e;return r.default.createElement("div",{className:"app"},t,r.default.createElement(s.Outlet,null))}));t.default=o},25114:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(66751)),i=n(70917);function s(e){return e&&e.__esModule?e:{default:e}}var o=function(e){let{children:t}=e;return window.ssReactSelectCache||(window.ssReactSelectCache=(0,r.default)({key:"react-select",insertionPoint:document.querySelector("title")})),a.default.createElement(i.CacheProvider,{value:window.ssReactSelectCache},t)};t.default=o},36800:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=n(11962),i=n(54582),s=l(n(96869)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>{const t=e.formComponent,n={...e};return delete n.formComponent,a.default.createElement(t,n)};d.propTypes={formComponent:o.default.elementType.isRequired};const u=(0,i.inject)(["Form"],(e=>({formComponent:e})))(d);var c=(0,r.reduxForm)({getFormState:s.default,destroyOnUnmount:!1})(u);t.default=c},16304:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0,t.createFormIdentifierFromProps=O,t.default=void 0;var a=w(n(4754)),r=y(n(67294)),i=w(n(45697)),s=n(86706),o=n(14890),l=w(n(94301)),d=w(n(16012)),u=n(11962),c=w(n(48834)),f=n(48942),p=y(n(39042)),h=w(n(21965)),m=y(n(56334)),g=w(n(79298)),v=n(54582),b=w(n(96869));function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function w(e){return e&&e.__esModule?e:{default:e}}function O(e){let{identifier:t,schema:n={}}=e;return[t,n.schema&&n.schema.name].filter((e=>e)).join(".")}class C extends r.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),this.reduceSchemaErrors=this.reduceSchemaErrors.bind(this),this.handleAutofill=this.handleAutofill.bind(this)}componentDidMount(){const{schema:e,refetchSchemaOnMount:t}=this.props;!t&&e||this.fetch()}componentDidUpdate(e){this.props.schemaUrl!==e.schemaUrl&&this.fetch()}getMessages(e){const t={};return e&&e.fields&&e.fields.forEach((e=>{e.message&&(t[e.name]=e.message)})),t}getIdentifier(){return O(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props)}handleSubmit(e,t,n){let a=null;const r=()=>n().then((e=>{let t=e;if(t){const e=void 0!==t.state;if(t=this.reduceSchemaErrors(t),this.props.actions.schema.setSchema(this.props.schemaUrl,t,this.getIdentifier()),e){const e=t.schema||this.props.schema.schema,n=(0,c.default)(e,t.state);this.props.actions.reduxForm.initialize(this.getIdentifier(),n)}}return t}));if(a="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,r):r(),!a)throw new Error("Promise was not returned for submitting");return a.then((e=>{if(!e||!e.state)return e;const t=this.getMessages(e.state);if(Object.keys(t).length)throw new u.SubmissionError(t);return e}))}reduceSchemaErrors(e){if(!e.errors)return e;let t={...e};return t.state||(t={...t,state:this.props.schema.state}),t={...t,state:{...t.state,fields:t.state.fields.map((t=>{let n=e.errors.find((e=>e.field===t.name));return n&&(n=(0,f.createErrorHtml)([n.value])),{...t,message:n}}))},messages:e.errors.filter((e=>!e.field))},delete t.errors,(0,d.default)(t)}overrideStateData(e){if(!this.props.stateOverrides||!e)return e;const t=this.props.stateOverrides.fields;let n=e.fields;return t&&n&&(n=n.map((e=>{const n=t.find((t=>t.name===e.name));return n?h.default.recursive(!0,e,n):e}))),Object.assign({},e,this.props.stateOverrides,{fields:n})}callFetch(e){return(0,l.default)(this.props.schemaUrl,{headers:{"X-FormSchema-Request":e.join(","),Accept:"application/json"},credentials:"same-origin"}).then((e=>e.status>=200&&e.status<300?e.json():new Promise(((t,n)=>e.json().then((t=>{n({status:e.status,statusText:e.statusText,json:t})})).catch((()=>{n({status:e.status,statusText:e.statusText,json:{}})}))))))}fetch(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.props.loading)return Promise.resolve({});const a=["auto",e&&"schema",t&&"state",n&&"errors"].filter((e=>e));return this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!0),"function"==typeof this.props.onFetchingSchema&&this.props.onFetchingSchema(),this.callFetch(a).then((e=>{if(this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!1),e.errors?"function"==typeof this.props.onLoadingError&&this.props.onLoadingError(e):"function"==typeof this.props.onLoadingSuccess&&this.props.onLoadingSuccess(),void 0!==e.id&&e.state){const t=Object.assign({},e,{state:this.overrideStateData(e.state)}),n=O({...this.props,schema:{...this.props.schema,...t}});this.props.actions.schema.setSchema(this.props.schemaUrl,t,n);const a=e.schema||this.props.schema.schema,r=(0,c.default)(a,t.state);return this.props.actions.reduxForm.initialize(n,r,!1,{keepSubmitSucceeded:!0}),"function"==typeof this.props.onReduxFormInit&&this.props.onReduxFormInit(),t}return e})).catch((e=>{if(this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!1),"function"==typeof this.props.onLoadingError)return this.props.onLoadingError(this.normaliseError(e));throw e}))}normaliseError(e){if(e.json&&e.json.errors)return e.json;if(e.status&&e.statusText)return{errors:[{code:e.status,value:e.statusText,type:"error"}]};return{errors:[{value:e.message||a.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred."),type:"error"}]}}handleAutofill(e,t){this.props.actions.reduxForm.autofill(this.getIdentifier(),e,t)}render(){const e=this.props.loadingComponent;if(!this.props.schema||!this.props.schema.schema||this.props.loading)return r.default.createElement(e,{containerClass:"loading--form flexbox-area-grow"});const t=Object.assign({},this.props,{form:this.getIdentifier(),onSubmitSuccess:this.props.onSubmitSuccess,onSubmit:this.handleSubmit,onAutofill:this.handleAutofill,autoFocus:this.props.autoFocus});return r.default.createElement(m.default,t)}}t.Component=C,C.propTypes=Object.assign({},m.basePropTypes,{actions:i.default.shape({schema:i.default.object,reduxFrom:i.default.object}),autoFocus:i.default.bool,identifier:i.default.string.isRequired,schemaUrl:i.default.string.isRequired,schema:m.schemaPropType,refetchSchemaOnMount:i.default.bool.isRequired,form:i.default.string,submitting:i.default.bool,onFetchingSchema:i.default.func,onReduxFormInit:i.default.func,loadingComponent:i.default.elementType.isRequired}),C.defaultProps={refetchSchemaOnMount:!0};var E=(0,o.compose)((0,v.inject)(["ReduxForm","ReduxFormField","Loading"],((e,t,n)=>({loadingComponent:n,baseFormComponent:e,baseFieldComponent:t})),(e=>{let{identifier:t}=e;return t})),(0,s.connect)((function(e,t){const n=e.form.formSchemas[t.schemaUrl],a=O({...t,schema:n}),r=(0,g.default)((0,b.default)(e),a);return{schema:n,submitting:r&&r.submitting,values:r&&r.values,stateOverrides:n&&n.stateOverride,loading:n&&n.metadata&&n.metadata.loading}}),(function(e){return{actions:{schema:(0,o.bindActionCreators)(p,e),reduxForm:(0,o.bindActionCreators)({autofill:u.autofill,initialize:u.initialize},e)}}})))(C);t.default=E},52583:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createInsertLinkModal=t.InsertLinkModal=void 0;var a=f(n(67294)),r=u(n(45697)),i=n(14890),s=n(86706),o=u(n(48297)),l=u(n(63596)),d=f(n(39042));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}class p extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),e.isOpen||e.setOverrides(null)}componentDidUpdate(e){const t=this.props;(t.isOpen&&!e.isOpen||!t.isOpen&&e.isOpen)&&t.setOverrides(t.isOpen?t:null)}getModalProps(){const e=Object.assign({},this.props,{onSubmit:this.handleSubmit,onClosed:this.props.onClosed,autoFocus:!0,showErrorMessage:!0});return delete e.onInsert,delete e.sectionConfig,e}handleSubmit(e,t){if("action_cancel"===t)this.props.onClosed();else this.props.onInsert(e,t);return Promise.resolve()}render(){const e=this.getModalProps();return a.default.createElement(o.default,e)}}function h(e){return{actions:{schema:(0,i.bindActionCreators)(d,e)}}}t.InsertLinkModal=p,p.propTypes={isOpen:r.default.bool,schemaUrl:r.default.string,onInsert:r.default.func.isRequired,onClosed:r.default.func.isRequired,setOverrides:r.default.func.isRequired,actions:r.default.object,requireLinkText:r.default.bool,currentPageID:r.default.number},p.defaultProps={};t.createInsertLinkModal=(e,t)=>(0,i.compose)((0,s.connect)((function(n,a){const r=n.config.sections.find((t=>t.name===e)),i=a.requireLinkText?"?requireLinkText":"";return{sectionConfig:r,schemaUrl:`${r.form[t].schemaUrl}${i}`.replace(/:pageid/,a.currentPageID)}}),h),l.default)(p);var m=(0,i.compose)((0,s.connect)((()=>({})),h),l.default)(p);t.default=m},63596:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FileSchemaHandler=t.ConnectedFileSchemaHandler=void 0;var a,r=u(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a},s=n(14890),o=u(n(39042)),l=n(86706);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;if(e){if(e.schemaUrl){const t=Object.assign({},e.fileAttributes);delete t.ID;const n={fields:Object.entries(t).map((e=>{const[t,n]=e;return{name:t,value:n}}))};this.props.actions.schema.setSchemaStateOverrides(e.schemaUrl,n)}}else{const e=this.props.schemaUrl;e&&this.props.actions.schema.setSchemaStateOverrides(e,null)}}render(){const{Component:e,...t}=this.props;return r.default.createElement(e,c({setOverrides:this.setOverrides},t))}}function p(e,t){return{actions:{...t&&t.actions||{},schema:(0,s.bindActionCreators)(o,e)}}}t.FileSchemaHandler=f,f.propTypes={fileAttributes:i.default.object,Component:i.default.elementType,schemaUrl:i.default.string,actions:i.default.object};const h=(0,l.connect)((()=>({})),p())(f);t.ConnectedFileSchemaHandler=h;var m=function(e){return(0,l.connect)((function(){return{Component:e}}),p)(f)};t.default=m},73276:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(45697)),i=n(53556),s=n(54582),o=d(n(94301)),l=d(n(94974));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{class t extends a.Component{constructor(e){super(e),this.state={active:l.default.getSection(f).sudoModeActive||!1,showVerification:!1,loading:!1,errorMessage:null},this.handleConfirmNotice=this.handleConfirmNotice.bind(this),this.handleVerify=this.handleVerify.bind(this),this.handleVerifyInputKeyPress=this.handleVerifyInputKeyPress.bind(this),this.passwordInput=null,this.setPasswordInput=e=>{this.passwordInput=e}}handleConfirmNotice(){this.setState({showVerification:!0},(()=>this.passwordInput&&this.passwordInput.focus()))}handleVerify(){this.setState({loading:!0});const e=new FormData;e.append("SecurityID",l.default.get("SecurityID")),e.append("Password",this.passwordInput.value),(0,o.default)(l.default.getSection(f).endpoints.activate,{method:"POST",body:e}).then((e=>e.json().then((e=>e.result?this.setState({loading:!1,active:!0}):this.setState({loading:!1,errorMessage:e.message},(()=>this.passwordInput.focus()))))))}handleVerifyInputKeyPress(e){13===e.charCode&&(e.stopPropagation(),e.preventDefault(),this.handleVerify())}isSudoModeActive(){return!0===this.state.active}renderSudoModeNotice(){const{i18n:e}=window,{showVerification:t}=this.state,n=l.default.getSection(f).helpLink||null;return a.default.createElement("div",{className:"sudo-mode__notice sudo-mode__notice--required"},a.default.createElement("p",{className:"sudo-mode__notice-message"},e._t("Admin.VERIFY_ITS_YOU","Verify it's you first."),n&&a.default.createElement("a",{href:n,className:"sudo-mode__notice-help",target:"_blank",rel:"noopener noreferrer"},e._t("Admin.WHATS_THIS","What is this?"))),!t&&a.default.createElement(i.Button,{className:"sudo-mode__notice-button font-icon-lock",color:"info",onClick:this.handleConfirmNotice},e._t("Admin.VERIFY_TO_CONTINUE","Verify to continue")))}renderSudoModeVerification(){const{i18n:e}=window,{errorMessage:t}=this.state,n={type:"password",name:"sudoModePassword",id:"sudoModePassword",className:"no-change-track",onKeyPress:this.handleVerifyInputKeyPress,innerRef:this.setPasswordInput},r=t?{valid:!1,invalid:!0}:{};return a.default.createElement("div",{className:"sudo-mode__verify"},a.default.createElement(i.FormGroup,{className:"sudo-mode__verify-form-group"},a.default.createElement(i.Label,{for:"sudoModePassword"},e._t("Admin.ENTER_PASSWORD","Enter your password")),a.default.createElement(i.InputGroup,null,a.default.createElement(i.Input,c({},n,r)),a.default.createElement(i.InputGroupAddon,{addonType:"append"},a.default.createElement(i.Button,{className:"sudo-mode__verify-button",color:"info",onClick:this.handleVerify},e._t("Admin.VERIFY","Verify"))),a.default.createElement(i.FormFeedback,null,t))))}renderSudoMode(){const{showVerification:e,loading:t}=this.state,n=this.props.LoadingComponent||(0,s.loadComponent)("CircularLoading","SudoMode");return t?a.default.createElement("div",{className:"sudo-mode alert alert-info"},a.default.createElement(n,{block:!0})):a.default.createElement("div",{className:"sudo-mode alert alert-info"},this.renderSudoModeNotice(),e&&this.renderSudoModeVerification())}render(){return this.isSudoModeActive()?a.default.createElement(e,this.props):this.renderSudoMode()}}return t.propTypes={LoadingComponent:r.default.oneOfType([r.default.node,r.default.func])},t};t.default=p},49331:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=d(n(67294)),r=d(n(60452)),i=n(86706),s=n(14890),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(36158));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}var u=(0,i.connect)((e=>{let{toasts:{toasts:t}}=e;return{toasts:t}}),(e=>({actions:(0,s.bindActionCreators)(o,e)})))((e=>{let{toasts:t,actions:{dismiss:n,pause:i,resume:s}}=e;return a.default.createElement(r.default,{toasts:t,onDismiss:n,onPause:i,onResume:s})}));t.default=u},93390:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TabContext=void 0,t.injectTabContext=function(e){return t=>{const n=o();return a.default.createElement(e,i({},t,{tabContext:n}))}},t.useTabFirstShow=function(e){const t=o(),n=!t||t.isOnActiveTab,[r,i]=(0,a.useState)(!1);(0,a.useEffect)((()=>{n&&(i(!0),e(t))}),[r||n])};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(a,s,o):a[s]=e[s]}a.default=e,n&&n.set(e,a);return a}(n(67294));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?t-1:0),a=1;a{e(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick(){let t=e("#add-to-campaign__dialog-wrapper");return t.length||(t=e('
'),e("body").append(t)),t.open(),!1}}),e(".add-to-campaign-modal .add-to-campaign-modal__nav-link").entwine({onclick:t=>{t.preventDefault();const n=e(t.target);window.location=n.attr("href")}}),e("#add-to-campaign__dialog-wrapper").entwine({ReactRoot:null,onunmatch(){this._clearModal()},open(){this._renderModal(!0)},close(){this._renderModal(!1)},_renderModal(t){var n=this;const r=e("form.cms-edit-form :input[name=ID]").val(),o=`${window.ss.store.getState().config.sections.find((e=>"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name)).form.AddToCampaignForm.schemaUrl}/${r}`,d=a.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign");let u=this.getReactRoot();u||(u=(0,s.createRoot)(this[0])),u.render(i.default.createElement(l,{title:d,isOpen:t,onSubmit:function(){return n._handleSubmitModal(...arguments)},onClosed:()=>this.close(),schemaUrl:o,bodyClassName:"modal__dialog",className:"add-to-campaign-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"Admin.AddToCampaign"})),this.setReactRoot(u)},_clearModal(){const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},_handleSubmitModal(e,t,n){return n()}})}))},76406:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};(0,r.default)(document).on("click",".confirmedpassword .showOnClick a",(function(){var e=(0,r.default)(".showOnClickContainer",(0,r.default)(this).parent());return e.toggle("fast",(function(){e.toggleClass("d-none").find('input[type="hidden"]').val(e.hasClass("d-none")?0:1)})),!1}))},40303:function(e,t,n){"use strict";var a=o(n(19755)),r=o(n(4754)),i=o(n(30381)),s=o(n(68300));function o(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss",(e=>{e("input[type=date]").entwine({onadd(){if(s.default.inputtypes.date)return;if(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))return;const t=e(" ",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),i.default.locale(this.attr("lang"));const n=this.val();let a="";if(n){const e=(0,i.default)(n);e.isValid()&&(a=e.format("L"))}this.val(a);const o=r.default.inject(r.default._t("Admin.FormatExample","Example: {format}"),{format:(0,i.default)().endOf("month").format("L")});this.attr("placeholder",o),this.updateValue()},onchange(){this.updateValue()},updateValue(){const e=this.val();let t="";if(e)for(const n of["L","YYYY-MM-DD"]){const a=(0,i.default)(e,n);if(a.isValid()){t=a.format("YYYY-MM-DD");break}}this.parent().find("input[type=hidden]").val(t)}})}))},57893:function(e,t,n){"use strict";var a=o(n(19755)),r=o(n(4754)),i=o(n(30381)),s=o(n(68300));function o(e){return e&&e.__esModule?e:{default:e}}n(881),a.default.entwine("ss",(e=>{e("input[type=datetime-local]").entwine({onadd(){if(s.default.inputtypes["datetime-local"])return;if(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))return;const t=e(" ",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),i.default.locale(this.attr("lang"));const n=this.val();let a="";if(n){const e=(0,i.default)(n);e.isValid()&&(a=e.format("L LT"))}this.val(a);const o=r.default.inject(r.default._t("Admin.FormatExample","Example: {format}"),{format:(0,i.default)().endOf("month").format("L LT")});this.attr("placeholder",o),this.updateValue()},onchange(){this.updateValue()},updateValue(){const e=this.val();let t="";if(e){const n=(0,i.default)(e,["L LT",i.default.ISO_8601]);n.isValid()&&(t=n.format("YYYY-MM-DDTHH:mm:ss"))}this.parent().find("input[type=hidden]").val(t)}})}))},17106:function(e,t,n){"use strict";var a=l(n(19755)),r=l(n(4754)),i=l(n(67294)),s=n(20745),o=(l(n(62266)),n(48834),n(54582));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t ").addClass("ss-gridfield-item loading").attr("colspan",d);l.append(e(" ").append(u));e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(r){if(a.empty().append(e(r).children()),s&&a.find(':input[name="'+s+'"]').focus(),a.find(".grid-field__filter-header, .grid-field__search-holder").length){var i="show"===t.data[0].filter;a.needsColumnFix()&&a.fixColumns(),a.injectSearchButton(i)}n&&n.apply(this,arguments),a.trigger("reload",a),!1!==t.data[0].triggerChange&&a.trigger("change")},error:function(e){alert(r.default._t("Admin.ERRORINTRANSACTION"))},complete:function(e,t){a.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(){const e=this.find(':input[name="'+this.data("name")+'[GridState]"]').val();return e?JSON.parse(e):{}},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){const t=this.find(".grid-field__filter-header").length>0;let n;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(){const t=e(this).find(".gridfield-actionmenu__container").data("schema");t&&t.length>0&&t.filter((e=>{if("link"===e.type){const t=this.buildURLString(e.url),n=t?"?"+t.join("&"):"";window.ss.router.replace(window.location.pathname+n,void 0,void 0,!1)}}))},buildURLString:function(e){const t=[window.location.origin,e].join("/"),n=[window.location.search,new URL(t).searchParams.toString()].join("&").substring(1),a=[],r=[];return n.split("&").forEach((e=>{const t=e.split("=");a[t[0]]=t[1]?t[1]:""})),Object.keys(a).forEach((e=>{r.push([e,a[e]].join("="))})),r}}),e(".grid-field *").entwine({getGridField:function(){return this.closest(".grid-field")}}),e(".gridfield-actionmenu__container").entwine({Timer:null,Component:null,Actions:null,ReactRoot:null,onmatch(){this._super();let t=[];e(".action-menu--handled",this.parent()).each((function(){const n=e(this).detach();t.push(n)})),this.setActions(t);const n=this.closest(".cms-content").attr("id"),a=n?{context:n}:{},r=(0,o.loadComponent)("GridFieldActions",a);this.setComponent(r),this.refresh()},onunmatch(){this._super();const t=this.getReactRoot();t&&(t.unmount(),this.setReactRoot(null));const n=this.getActions(),a=this.parent();n&&e(n).each((function(){e(this).appendTo(a)}))},refresh(){const e=this.data("schema"),t=this.getComponent();let n=this.getReactRoot();n||(n=(0,s.createRoot)(this[0])),n.render(i.default.createElement(t,{schema:e})),this.setReactRoot(n)}}),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(){let t=e(this.data("target")),n=e(this.data("modal"));t.length<1?(t=n,t.appendTo(document.body)):t.innerHTML=n.innerHTML;let a=e(".modal-backdrop");function r(){a.removeClass("show"),t.removeClass("show"),setTimeout((function(){a.remove()}),150)}a.length<1&&(a=e('
'),a.appendTo(document.body)),t.find("[data-dismiss]").add(".modal-backdrop").on("click",(function(){r()})),e(document).on("keydown",(function(e){27===e.keyCode&&r()})),setTimeout((function(){a.addClass("show"),t.addClass("show")}),0)}}),e(".grid-field .action:button").entwine({onclick:function(t){var n="show";let a=!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"))&&(a=!1);var r=[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:a}],i=this.data("action-state");i&&r.push({name:"ActionState",value:JSON.stringify(i)});const s=e(this).getGridField();s.reload({data:r},(function(t,n,a){s.keepStateInHistory();const r=a.getResponseHeader("X-Message-Text"),i=a.getResponseHeader("X-Message-Type");if(r&&i){var o=e("#Form_EditForm_error");o.addClass(i),o.html(r),o.show()}})),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),a=this.closest("form"),r=a.find(":input.gridstate").serialize(),i=a.find('input[name="SecurityID"]').val();r+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),i&&(r+="&SecurityID="+encodeURIComponent(i));var s=this.data("action-state");s&&(r+="&ActionState="+encodeURIComponent(JSON.stringify(s))),window.location.search&&(r=window.location.search.replace(/^\?/,"")+"&"+r);var o=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+o+r,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"]').val(),n=e.is(":disabled");(t&&n||!t&&!n)&&e.attr("disabled",!n)}}),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){const n=e(this).hasClass("action--archive")?r.default._t("Admin.ARCHIVECONFIRMMESSAGE","Are you sure you want to archive this record?"):r.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().on("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,ReactRoot:null,onmatch(){this._super(),this.prependTo(this.parent());const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,o.loadComponent)("Search",t);this.setComponent(n),this.refresh()},onunmatch(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},close(){const t=this.data("schema"),n=[{name:t.clearAction,value:"",filter:"hidden",triggerChange:!1}];t.clearActionState&&n.push({name:"ActionState",value:t.clearActionState});const a=e(this).getGridField();a.reload({data:n},(function(){a.keepStateInHistory()}))},search(t){const n=this.data("schema"),a=[{name:n.searchAction,value:"",filter:"show",triggerChange:!1}];n.searchActionState&&a.push({name:"ActionState",value:n.searchActionState});for(const[e,r]of Object.entries(t))if(r){const t=`filter[${n.gridfield}][${e}]`;a.push({name:t,value:r})}const r=e(this).getGridField();r.reload({data:a},(function(){r.keepStateInHistory()}))},refresh(){const e=this.data("schema"),t=this.getComponent();String(e.gridfield).replace(/\-/g,".");let n=this.getReactRoot();n||(n=(0,s.createRoot)(this[0])),n.render(i.default.createElement(t,d({id:`${e.gridfield}Search`,display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:()=>this.close(),onSearch:e=>this.search(e)},e))),this.setReactRoot(n)}}),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"),a=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==t.keyCode){var r=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),i="show";!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(i="hidden");var s=[{name:r.attr("name"),value:r.val(),filter:i,triggerChange:!1}];r.data("action-state")&&s.push({name:"ActionState",value:JSON.stringify(r.data("action-state"))});const t=e(this).getGridField(),n=function(){t.keepStateInHistory()};return t.reload({data:s},n),!1}n.addClass("hover-alike"),a.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var a=e(this.element);e(this.element).closest("form");e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(a).data("searchUrl"),data:encodeURIComponent(a.attr("name"))+"="+encodeURIComponent(a.val()),success:n,error:function(e){alert(r.default._t("Admin.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){var a=e(' ');a.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(a),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),a=e(this).getGridField();a.setState("GridFieldPaginator",{currentPage:n});const r=function(){a.keepStateInHistory()};return a.reload({},r),!1}}})}))},49414:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(19755));__webpack_require__(51726);var _lodash=_interopRequireDefault(__webpack_require__(91658));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}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,_jquery.default)(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",(function(){n.save()}))},t},save:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this.getInstance();t.save(),e.silent||((0,_jquery.default)(t.getElement()).trigger("change"),t.getElement().dispatchEvent(new Event("input",{bubbles:!0})))},create:function(){let e,t,n;function a(a){const r=a.target;!e||(new Date-e)/100>500?(n=$(r).scrollTop(),$(".mce-floatpanel").css("opacity","0")):window.clearTimeout(t),e=new Date,t=window.setTimeout((()=>function(t,n){const a=$(t).scrollTop();$(".mce-floatpanel").each(((e,t)=>{const r=parseFloat(t.style.top);$(t).css("top",r-(a-n)+"px")})),$(".mce-floatpanel").css("opacity","1"),e=void 0}(r,n)),500)}var r=this.getConfig();void 0!==r.baseURL&&(tinymce.EditorManager.baseURL=r.baseURL),r.skin=r.skin||"silverstripe",tinymce.init(r).then((e=>{if(e.length>0&&e[0].container){$(e[0].container).closest(".panel--scrollable").on("scroll",(e=>a(e)))}}))},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getSelection:function(){return this.getInstance().selection.getSel().toString()||""},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(">",">");const t=this.getInstance().dom.create("a",e,n);this.getInstance().selection.setNode(t)}else this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function(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("^"+(0,_lodash.default)(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,_jquery.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){let t=e("#insert-media-react__dialog-wrapper");return t.length||(t=e('
'),e("body").append(t)),t.setElement(this),void t.open()}if("embed"===t&&window.InsertEmbedModal){let t=e("#insert-embed-react__dialog-wrapper");return t.length||(t=e('
'),e("body").append(t)),t.setElement(this),void t.open()}throw new Error(`Dialog named ${t} is not available.`)}})}))},62596:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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 a,r=this,i=e(".cms-container").find("iframe");a=function(t){var n;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(r).length||n.length||(r.tabs("option","active",!1),e(".cms-container").find("iframe").each((function(t,n){e(n).contents().off("click.ss-ui-action-tabset",a)})),e(document).off("click.ss-ui-action-tabset",a))},e(document).on("click.ss-ui-action-tabset",a),i.length>0&&i.each((function(t,n){e(n).contents().on("click.ss-ui-action-tabset",a)}))},riseUp:function(t,n){var a,r,i,s,o,l,d,u;if(a=e(this).find(".ui-tabs-panel").outerHeight(),r=e(this).find(".ui-tabs-nav").outerHeight(),i=e(window).height()+e(document).scrollTop()-r,s=e(this).find(".ui-tabs-nav").offset().top,o=n.newPanel,l=n.newTab,s+a>=i&&s-a>0){if(this.addClass("rise-up"),null!==l.position()){if(d=-o.outerHeight(),u=o.parents(".toolbar--south")){const e=l.offset();d-=e?e.top-u.offset().top:0}e(o).css("top",d+"px")}}else this.removeClass("rise-up"),null!==l.position()&&e(o).css("bottom","100%");return!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")}})}))},82165:function(e,t,n){"use strict";var a=i(n(19755)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss.tree",(function(e){e("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return e(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},onmatch:function(){var e=this;e.getTree().on("load_node.jstree",(function(t,n){e.refreshSelected()}))},onunmatch:function(){this.getTree().off("load_node.jstree")},registerDefault:function(){this.register("publish",(function(e){return!!confirm(r.default.inject(r.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(r.default.inject(r.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(r.default.inject(r.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(r.default.inject(r.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(t){var n=this,a=this.getTree(),r=this.getIDs(),i=[],s=e(".cms-content-batchactions-button"),o=this.find(":input[name=Action]").val();for(var l in null==t&&(t=a),r)e(e(a).getNodeByID(l)).addClass("selected").attr("selected","selected");if(o&&-1!=o&&s.hasClass("active")){e(t).find("li").each((function(){i.push(e(this).data("id")),e(this).addClass("treeloading").setEnabled(!1)}));var d=e.path.parseUrl(o),u=d.hrefNoSearch+"/applicablepages/";u=e.path.addSearchParams(u,d.search),u=e.path.addSearchParams(u,{csvIDs:i.join(",")}),jQuery.getJSON(u,(function(a){jQuery(t).find("li").each((function(){e(this).removeClass("treeloading");var t=e(this).data("id");0==t||e.inArray(t,a)>=0?e(this).setEnabled(!0):(e(this).removeClass("selected").setEnabled(!1),e(this).prop("selected",!1))})),n.serializeFromTree()}))}else e(t).find("li").each((function(){e(this).setEnabled(!0)}))},serializeFromTree:function(){var e=this.getTree().getSelectedIDs();return this.setIDs(e),!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(t){var n=this,a=this.getIDs(),i=this.getTree(),s=this.getActions();if(!a||!a.length)return alert(r.default._t("Admin.SELECTONEPAGE","Please select at least one page")),t.preventDefault(),!1;var o=this.find(":input[name=Action]").val();if(!o)return t.preventDefault(),!1;var l=o.split("/").filter((e=>!!e)).pop();if(s[l]&&(a=s[l].apply(this,[a])),!a||!a.length)return t.preventDefault(),!1;this.setIDs(a),i.find("li").removeClass("failed");var d=this.find(":submit:first");return d.addClass("loading"),jQuery.ajax({url:o,type:"POST",data:this.serializeArray(),complete:function(e,t){d.removeClass("loading"),i.jstree("refresh",-1),n.setIDs([]),n.find(":input[name=Action]").val("").change();var a=e.getResponseHeader("X-Status");a&&statusMessage(decodeURIComponent(a),"success"===t?"success":"error")},success:function(t,n){var a,r;if(t.modified){var s=[];for(a in t.modified)r=i.getNodeByID(a),i.jstree("set_text",r,t.modified[a].TreeTitle),s.push(r);e(s).effect("highlight")}if(t.deleted)for(a in t.deleted)(r=i.getNodeByID(a)).length&&i.jstree("delete_node",r);if(t.error)for(a in t.error)r=i.getNodeByID(a),e(r).addClass("failed")},dataType:"json"}),t.preventDefault(),!1}}),e(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var t=e(".cms-tree"),n=e("#Form_BatchActionsForm");this._super(),this.data("active")?(t.addClass("multiple"),t.removeClass("draggable"),n.serializeFromTree()):(t.removeClass("multiple"),t.addClass("draggable")),e("#Form_BatchActionsForm").refreshSelected()}}),e("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(t){e(t.target.form).find(":submit");const n=e(t.target).val();if(n){const t=n.split("/"),r=t[t.length-1];e("#Form_BatchActionsForm").refreshSelected();var a=e("#BatchActionParameters_"+r);a.length?(a.find(":input").each((function(){var t=e(this)[0];"SELECT"===t.tagName?(t.selectedIndex=-1,e(this).trigger("chosen:updated")):"checkbox"===t.type?t.checked=t.defaultChecked:t.value=t.defaultValue})),a.siblings().hide(),a.show(),e("#BatchActionParameters").slideDown()):e("#BatchActionParameters").slideUp()}this.trigger("chosen:updated"),this._super(t)}})}))},95075:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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.on("select_node.jstree",(function(n,a){var r=a.rslt.obj,i=t.find(":input[name=ID]").val(),s=a.args[2],o=e(".cms-container");if(!s)return!1;if(e(r).hasClass("disabled"))return!1;if(e(r).data("id")!=i){var l=e(r).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(r).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(/^\?/,""))),o.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");const e=parseInt(this.css("padding-top"),10),t=parseInt(this.css("padding-bottom"),10);this.height(this.innerHeight()-e-t)}})}))},49958:function(e,t,n){"use strict";var a=i(n(19755)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}const s=window.onbeforeunload;window.onbeforeunload=function(e){var t=(0,a.default)(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges")?r.default._t("Admin.CONFIRMUNSAVEDSHORT"):"function"==typeof s?s():void 0},a.default.entwine("ss",(function(e){e(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},getValidationErrorShown:function(){return Boolean(this.data("_validationErrorShown"))},setValidationErrorShown:function(e){this.data("_validationErrorShown",e)},onadd:function(){for(var e in this.attr("autocomplete","off"),this._setupChangeTracker(),{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._super()},"from .cms-tabset":{onafterredrawtabs:function(){const 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)"),a=ss.i18n._t("Admin.VALIDATION_ERRORS_ON_PAGE","There are validation errors on this page, please fix them before saving or publishing."),r=ss.i18n._t("Admin.VALIDATIONERROR","Validation Error"),i=e("#Form_EditForm_error");this.find(".tab-attention, .tab-validation-error-sr").remove();let s=!1;if(this.hasClass("validationerror")&&(s=!0),""!==i.html()&&(s=!0),this.find(".alert.error").length>0&&(s=!0),!s)return void i.hide();!this.getValidationErrorShown()&&this.hasClass("validationerror")&&(o(r),this.setValidationErrorShown(!0));const l=this.find(".tab-pane .alert-danger, .tab-pane .alert.error").closest(".tab-pane");if(!l.length)return;const d=l.closest(".tab-content").closest(".ss-tabset");d.length&&(l.each((a=>{const r=l.eq(a).attr("id"),i=d.find(`#tab-${r}`).closest("li"),s=e(` `),o=e(`${n} `);i.append(s),i.append(o)})),i.attr("class","alert alert-danger"),i.html(a),i.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(r.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:true}),true},"from .htmleditor":{oneditorinit:function(t){var n=this,a=e(t.target).closest(".field.htmleditor");a.find("textarea.htmleditor").getEditor().getInstance().onClick.add((function(e){n.saveFieldFocus(a.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"),a=[];if(a.push({id:n,selected:t}),a)try{window.sessionStorage.setItem(n,JSON.stringify(a))}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,a,r,i,s=this,o=void 0!==window.sessionStorage&&window.sessionStorage,l=o?window.sessionStorage.getItem(this.attr("id")):null,d=!!l&&JSON.parse(l),u=0!==this.find(".ss-tabset").length;if(o&&d.length>0){if(e.each(d,(function(n,a){s.is("#"+a.id)&&(t=e("#"+a.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"),a="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),u&&a!==n)return;(r=e(t).closest(".togglecomposite")).length>0&&r.accordion("option","active",r.find(".ui-accordion-header")),i=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),i=e(t).position().top),e(t).focus(),i>e(window).height()/2&&s.find(".cms-content-fields").scrollTop(i)}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=[r.default.inject(r.default._t("Admin.OWNED_WARNING_1","You are unpublishing content that is being used in {count} other published section(s)."),{count:t}),r.default._t("Admin.OWNED_WARNING_2","This could cause a published page to have missing components on the live site."),r.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(){this.is(":checked")&&this.toggleListDisplay(this.val(),!0)},onchange:function(e){this.toggleListDisplay(e.target.value)},toggleListDisplay:function(e,t){"OnlyTheseUsers"===e?(this.showGroupsList(t),this.hideMembersList(t)):this.hideGroupsList(t),"OnlyTheseMembers"===e?(this.showMembersList(t),this.hideGroupsList(t)):this.hideMembersList(t)},showList:function(e){this.showGroupsList(e),this.showMembersList(e)},hideList:function(e){this.hideGroupsList(e),this.hideMembersList(e)},showGroupsList:function(e){const t=this.closest(".field");this.showListElement(t,t.next().filter(".treemultiselect"),e)},hideGroupsList:function(e){const t=this.closest(".field");this.hideListElement(t,t.next().filter(".treemultiselect"),e)},showMembersList:function(e){const t=this.closest(".field");this.showListElement(t,t.next().next().filter(".listbox"),e)},hideMembersList:function(e){const t=this.closest(".field");this.hideListElement(t,t.next().next().filter(".listbox"),e)},showListElement:function(e,t,n){e.addClass("field--merge-below"),n?t.show().css("overflow","visible"):t.slideDown((()=>{t.css("overflow","visible")}))},hideListElement:function(e,t,n){t.css("overflow","hidden"),n?(t.hide().css("display","none"),e.removeClass("field--merge-below")):t.slideUp((()=>{e.removeClass("field--merge-below")}))}})}));var o=function(e){jQuery.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},73366:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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"),a=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(){a[e?"hide":"show"](),e=!e})),a.hide())}})}))},56970:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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")}})}))},60395:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a},i=n(80195);r.default.entwine("ss",(function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,a){e(".cms-menu__list").children("li").each((function(){t?e(this).children("ul").each((function(){e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))})):e(this).children("ul").each((function(){e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)}))})),this._super(t,n,a)},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&null!=(n=e.cookie("cms-menu-sticky"))&&(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(),a=this.siteTreePresent();return void 0===t?a:t!==a&&n?t:a},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(){"function"==typeof e(this).setRecordID&&e(this).setRecordID(n)}))}}),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 a=this.getMenuItem(),r=this.attr("href");n||(r=(0,i.joinUrlPaths)(e("base").attr("href"),r));var s=a.find("li");s.length?s.first().find("a").click():document.location.href=r,a.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(),a=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&!1===a&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(a),this.toggleCSS(a),this.toggleIndicator(a),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")}})}))},41221:function(e,t,n){"use strict";var a=o(n(19755)),r=o(n(26195)),i=n(11521),s=n(20745);function o(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss",(function(e){e(".js-react-boot").entwine({onmatch:function(){const t=e(".cms-mobile-menu-toggle-wrapper");if(t.length>0){(0,s.createRoot)(t[0]).render(React.createElement(r.default,{store:window.ss.store,controls:"cms-menu"}))}const n=window.ss.store,a=e(".cms-menu"),i=e(".cms-menu-mobile-overlay");n.subscribe((()=>{const e=n.getState().mobileMenu.isOpen;a.toggleClass("cms-menu--open",e).attr("aria-expanded",e),i.attr("aria-expanded",e)}))}}),e(".cms-menu-mobile-overlay").entwine({onclick:function(){window.ss.store.dispatch((0,i.closeMobileMenu)())}})}))},73843:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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()&&null!=(n=e.cookie("cms-panel-collapsed-"+this.attr("id")))&&(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 a;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),a=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(a),this.find(".cms-panel-content-collapsed").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)}})}))},88615:function(e,t,n){"use strict";var a=i(n(19755)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}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 a=this,r=this._getNavigatorStates();return!1!==n&&e.each(r,(function(e,n){a.saveState("state",t)})),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var a=e(".cms-container").entwine(".ss");if("split"==t)a.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)a.contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;a.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return!1!==n&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){this.getSizes();return 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.on("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");let e=!0;this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw();const a=this.find("iframe").attr("src");this.getPendingURL()||a&&"about:blank"!==a||(t="content",e=!1),t&&this.changeMode(t,e),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(),a=null;t&&(a=e.grep(t,(function(e,t){return n===e.name||!n&&e.active})));var r=null;if(a[0]?r=a[0].url:t.length?(this.setCurrentStateName(t[0].name),r=t[0].url):this.setCurrentStateName(null),r){let e=r.split("#");const t=e.shift().split(/[?&]/),n=t.shift();t.push("CMSPreview=1"),e=e.length?"#"+e.join("#"):"",r=n+"?"+t.join("&")+e}return this.is(".column-hidden")?(this.setPendingURL(r),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),r?(this._loadUrl(r),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"),a=e(t).find("meta[name=x-cms-edit-link]").attr("content"),r=e(".cms-content");n&&r.find(":input[name=ID]").val()!=n&&e(".cms-container").entwine(".ss").loadPanel(a)}}},_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"),a=0;a'):this.parent().append('
')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})}))},49266:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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")))return;var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));const n=function(t,r){let i=r.rslt.o,s=r.rslt.np,o=e(s).data("id")||0,l=e(i).data("id"),d=e.map(e(i).siblings().addBack(),(function(t){return e(t).data("id")}));a.getIsUpdatingTree()||(a.getCanMoveCheckCompleted()?(a.setCanMoveCheckCompleted(!1),e.ajax({url:e.path.addSearchParams(a.data("urlSavetreenode"),a.data("extraParams")),type:"POST",data:{ID:l,ParentID:o,SiblingIDs:d},success:function(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(o),a.updateNodesFromServer([l])},statusCode:{403:function(){e.jstree.rollback(r.rlbk)}}})):a.canMove(r).then((i=>{i?(a.setCanMoveCheckCompleted(!0),n(t,r)):e.jstree.rollback(r.rlbk)})))};var a=this;this.jstree(this.getTreeConfig()).on("loaded.jstree",(function(t,n){a.setIsLoaded(!0),n.inst._set_settings({html_data:{ajax:{url:a.data("urlTree"),data:function(t){var n=a.data("searchparams")||[];return(n=e.grep(n,(function(e,t){return"ID"!=e.name&&"value"!=e.name}))).push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),n.push({name:"ajax",value:1}),n}}}}),a.updateFromEditForm(),a.css("visibility","visible"),n.inst.hide_checkboxes()})).on("before.jstree",(function(t,n){if("start_drag"==n.func&&(!a.hasClass("draggable")||a.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(n.func,["check_node","uncheck_node"])){var r=e(n.args[0]).parents("li:first"),i=r.find("li:not(.disabled)");if(r.hasClass("disabled")&&0==i)return t.stopImmediatePropagation(),!1}})).on("move_node.jstree",n).on("select_node.jstree check_node.jstree uncheck_node.jstree",(function(t,n){t.namespace="",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){const n=e(".cms-edit-form :input[name=ID]").val(),a=this.find(`[data-id=${n}]`);let r=[+n];a.find("li").each((function(){r.push(e(this).data("id"))}));const i=[];for(;r.length;){const e=r.slice(0,50);i.push(e),r=r.slice(50)}i.map((e=>this.updateNodesFromServer(e,!1))).reduce(((e,t)=>e.then(t)),Promise.resolve())}},canMove:async function(e){return Promise.resolve(!0)},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 a=e(n.o),r=e(n.np),i=n.ot.get_container()[0]==n.np[0],s=a.getClassname(),o=r.getClassname(),l=t.getHints(),d=[],u=o||"Root",c=l&&void 0!==l[u]?l[u]:null;return c&&a.attr("class").match(/VirtualPage-([^\s]*)/)&&(s=RegExp.$1),c&&(d=void 0!==c.disallowedChildren?c.disallowedChildren:[]),!(0===a.data("id")||a.hasClass("status-archived")||i&&"inside"!=n.p||r.hasClass("nochildren")||d.length&&-1!=e.inArray(s,d))}}},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,a){var r=void 0!==n.ParentID&&this.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",r.length?r:-1,"last",s,(function(e){for(var t=e.attr("class"),n=0;n/g,"");var r=e(n),i=!!a.NextID&&this.getNodeByID(a.NextID),s=!!a.PrevID&&this.getNodeByID(a.PrevID),o=!!a.ParentID&&this.getNodeByID(a.ParentID),l=this.jstree("is_open",o);e.each(["id","style","class","data-pagetype"],(function(e,n){t.attr(n,r.attr(n))}));var d=t.children("ul").detach();t.html(r.html()).append(d),i&&i.length?this.jstree("move_node",t,i,"before"):s&&s.length?this.jstree("move_node",t,s,"after"):this.jstree("move_node",t,o.length?o:-1),l?this.jstree("open_node",o):this.jstree("close_node",o)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n)).length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n]):this.jstree("deselect_all")},updateNodesFromServer:function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.getIsLoaded()&&(!n||!this.getIsUpdatingTree())){var a=this;this.setIsUpdatingTree(!0),a.jstree("save_selected"),a.jstree("open_node",this.getNodeByID(0)),a.jstree("save_opened"),a.jstree("save_selected");var r=a.jstree("get_selected");return new Promise((n=>{e.ajax({url:e.path.addSearchParams(this.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(i,s){n(i),e.each(i,(function(e,n){var i=a.getNodeByID(e);n?i.length?a.updateNode(i,n.html,n):n.ParentID&&!a.find("li[data-id="+n.ParentID+"]").length?a.jstree("load_node",-1):a.createNode(n.html,n,(e=>{r.length||1!==t.length||(r=e)})):a.jstree("delete_node",i)})),r.length&&(a.jstree("deselect_all"),a.jstree("reopen"),a.jstree("select_node",r))},complete:function(){a.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")}})}))},81047:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).default.entwine("ss",(function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})}))},50628:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(19755)),_react=_interopRequireDefault(__webpack_require__(67294)),_client=__webpack_require__(20745),_IframeDialog=_interopRequireDefault(__webpack_require__(28788)),_Search=_interopRequireDefault(__webpack_require__(62266)),_Loading=_interopRequireDefault(__webpack_require__(34411)),_schemaFieldValues=__webpack_require__(48834),_Injector=__webpack_require__(54582),_lodash=_interopRequireDefault(__webpack_require__(91658));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t399?"error":"success";null===r||isSameUrl(a,r)&&isSameUrl(i,r)||window.ss.router.show(r,{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")?$(".cms-container").showLoginDialog():(0!==t.status&&s&&-1===$.inArray(s,["OK","success","load","HTTP/2.0 200"])&&statusMessage(decodeURIComponent(s),o),ajaxCompleteEvent(this))})),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).off("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 a in e)t[a]!==e[a]&&(t[a]=e[a],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"),a=this.find(".cms-preview");if(n.css({"min-width":0}),a.css({"min-width":0}),n.width()+a.width()>=e.minContentWidth+e.minPreviewWidth)n.css({"min-width":e.minContentWidth}),a.css({"min-width":e.minPreviewWidth}),a.trigger("enable");else if(a.trigger("disable"),"split"==t)return a.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)")),a=!0;return!n.length||(n.each((function(){$(this).confirmUnsavedChanges()||(a=!1)})),a)},loadPanel:function(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document.URL;this.checkCanNavigate(t.pjax?t.pjax.split(","):["Content"])&&(this.saveTabState(),t.__forceReferer=a,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,a){var r=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 i=e.validate(),s=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===i||i||(statusMessage("Validation failed.","bad"),s());var o=e.serializeArray();return o.push({name:$(t).attr("name"),value:"1"}),o.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs,ValidationResult"},url:e.attr("action"),data:o,type:"POST",complete:function(){s()},success:function(t,a,i){s(),e.removeClass("changed"),n&&n(t,a,i);var l=r.handleAjaxResponse(t,a,i);l&&l.filter("form").trigger("aftersubmitform",{status:a,xhr:i,formData:o})}},a)),!1},LastState:null,PauseState:!1,handleStateChange:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.history.state;if(this.getPauseState())return;this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var n=this,a=t.pjax||"Content",r={},i=a.split(","),s=this._findFragments(i);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate())return void this.reverseStateChange();if(s.length{0!==e.readyState&&"1"!==e.getResponseHeader("X-Reauthenticate")&&this.reverseStateChange()})).done(((e,a,r)=>{this.setLastState(t);var i=n.handleAjaxResponse(e,a,r,t);n.trigger("afterstatechange",{data:e,status:a,xhr:r,element:i,state:t})})).always((()=>{n.setStateChangeXHR(null),s.removeClass("loading")}));return this.setStateChangeXHR(o),o},reverseStateChange:function(){var e=this.getLastState();this.setPauseState(!0),this.setStateChangeCount(this.getStateChangeCount()-1),e&&e.path?(window.ss.router.show(e.path),this.setPauseState(!1)):(window.ss.router.back(),setTimeout((()=>{this.setPauseState(!1)})))},loadFragment:function(e,t){var n,a=this,r={},i=$("base").attr("href"),s=this.getFragmentXHR();return void 0!==s[t]&&null!==s[t]&&(s[t].abort(),s[t]=null),e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,i),r["X-Pjax"]=t,n=$.ajax({headers:r,url:e,success:function(e,t,n){var r=a.handleAjaxResponse(e,t,n,null);a.trigger("afterloadfragment",{data:e,status:t,xhr:n,elements:r})},error:function(e,t,n){a.trigger("loadfragmenterror",{xhr:e,status:t,error:n})},complete:function(){var e=a.getFragmentXHR();void 0!==e[t]&&null!==e[t]&&(e[t]=null)}}),s[t]=n,n},handleAjaxResponse:function(e,t,n,a){let r,i;if(n.getResponseHeader("X-Reload")&&n.getResponseHeader("X-ControllerURL")){const e=$("base").attr("href"),t=n.getResponseHeader("X-ControllerURL"),a=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,e);return void(document.location.href=a)}if(!e)return;var s=n.getResponseHeader("X-Title");s&&(document.title=decodeURIComponent(s.replace(/\+/g," ")));let o,l={};n.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?l=e:(i=$($.parseHTML(e,document,!1)),r="Content",i.is("form")&&!i.is("[data-pjax-fragment~=Content]")&&(r="CurrentForm"),l[r]=i),this.setRedrawSuppression(!0);try{$.each(l,(function(e,t){var n=$("[data-pjax-fragment]").filter((function(){return-1!=$.inArray(e,$(this).data("pjaxFragment").split(" "))})),a=$(t);if(o?o.add(a):o=a,a.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';var r=n.attr("style"),i=(n.parent(),["east","west","center","north","south","column-hidden"]),s=n.attr("class"),l=[];s&&(l=$.grep(s.split(" "),(function(e){return $.inArray(e,i)>=0}))),a.removeClass(i.join(" ")).addClass(l.join(" ")),r&&a.attr("style",r);var d=a.find("style").detach();d.length&&$(document).find("head").append(d),n.replaceWith(a)}));var d=o.filter("form");d.hasClass("cms-tabset")&&d.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(a&&void 0!==a.tabState?a.tabState:null),o},_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=window.ss.tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each((function(t,n){var a=$(n).attr("id");a&&$(n).data("uiTabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:a,selected:$(n).tabs("option","active")}))})),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){const t=this.find(".cms-tabset, .ss-tabset");t.length?t.each((function(){const t=$(this),n=t.attr("id"),a=e&&e[n]?e[n]:null;t.restoreState(a)})):$("#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(){this.close(),this.remove()},close(){this.renderModal(!1)},open(){this.renderModal(!0)},renderModal(e){const t=$("body").data("member-tempid"),n=$.path.addSearchParams("CMSSecurity/login",{tempid:t,BackURL:window.location.href});let a=this.getReactRoot();a||(a=(0,_client.createRoot)(this[0])),a.render(_react.default.createElement(_IframeDialog.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}))},reauthenticate(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({ReactRoot:null,onmatch:function(){this._super();const e=$('
');this.append(e);const t=(0,_client.createRoot)(e[0]);t.render(_react.default.createElement(_Loading.default,null)),this.setReactRoot(t)},onunmatch:function(){this._super();const e=this.find(".cms-loading-container");if(e&&e.length){const t=this.getReactRoot();t&&(t.unmount(),this.setReactRoot(null)),e.remove()}}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))e.stopPropagation();else{var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),a={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,a),e.preventDefault()}}}),$(".cms button.action.discard-confirmation").entwine({onclick:function(e){$(".cms-container").checkCanNavigate()||e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function(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(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{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").data();e.showcalendar?(e.showOn="button",e.locale&&$.datepicker.regional[e.locale]&&(e=$.extend(e,$.datepicker.regional[e.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(e),this._super()):this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){this.is(".no-chosen")||(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,a){e.html(t)}})):this.html(window._panelDeferredCache[t])}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("uiTabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();this.attr("id");var e=this.find("ul:first .ui-tabs-active");this.data("uiTabs")||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=$(".cms-content-filters").first(),t=this.data("collapsed");t?(this.addClass("active"),e.removeClass("cms-content-filters--hidden")):(this.removeClass("active"),e.addClass("cms-content-filters--hidden")),this.data("collapsed",!t)},onclick:function(){this.showHide()}}),$(".js-injector-boot .search-holder").entwine({Component:null,ReactRoot:null,onmatch(){this._super();const 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(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},onfocusin(){this.css("z-index","100")},onfocusout(){this.css("z-index","")},close(){$("#filters-button").showHide();if(this.data("schema").filters){const e=$(".cms-search-form").attr("action");this.closest(".cms-container").loadPanel(e,"",{},!0)}},search(e){this._super();let t=$(".cms-search-form").attr("action");if(t&&e){const n=[];for(const[t,a]of Object.entries(e))a&&(n[`q[${t}]`]=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(){const e=this.data("schema"),t=this.getComponent(),n="cms-content-tools-CMSMain"===this.closest(".cms-content-tools").attr("id");let a=this.getReactRoot();a||(a=(0,_client.createRoot)(this[0])),a.render(_react.default.createElement(t,_extends({id:"Search",identifier:"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:()=>this.close(),onSearch:e=>this.search(e),borders:{left:!n}},e))),this.setReactRoot(a)}})}));var statusMessage=function(e,t){e=jQuery("
").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},75350:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(50628),r.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)}})}))},46925:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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"))}))}})}))},15878:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(50628),n(46925);var i=function(e){var t=(0,r.default)((0,r.default)(this).contents()).find(".message");if(t&&t.html()){var n=(0,r.default)(window.parent.document).find("#Form_EditForm_Members").get(0);n&&n.refresh();var a=(0,r.default)(window.parent.document).find(".cms-tree").get(0);a&&a.reload()}};(0,r.default)("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function(){this._super(),(0,r.default)(this).on("load",i)}}),r.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"))}))}})}))},8298:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};(0,r.default)(document).ready((function(){(0,r.default)(document).on("click","ul.SelectionGroup input.selector, ul.selection-group input.selector",(function(){var e=(0,r.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,r.default)(this).focus()}))}))},42886:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(43466),n(79216),n(881),r.default.entwine("ss",(function(e){e(".ss-tabset, .cms-tabset").entwine({DeferRestoreState:!1,DefferredStateOverride:null,onmatch:function(){var e=window.location.hash;""!==e&&this.openTabFromURL(e),this._super()},onadd:function(){this.on("tabsactivate",function(e,t){let{newPanel:n}=t;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this.on("tabscreate",function(e,t){let{panel:n}=t;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this._super()},restoreState:function(t){const n=void 0!==window.sessionStorage&&window.sessionStorage?window.sessionStorage.getItem("tabs-"+window.ss.tabStateUrl()):null,a=!!n&&JSON.parse(n);let r,i;const s=this.attr("id"),o=this.children("ul").children("li.ss-tabs-force-active");if(!this.data("uiTabs"))return this.setDeferRestoreState(!0),void this.setDefferredStateOverride(t);this.tabs("refresh"),o.length?r=o.first().index():t?(i=this.find(t.tabSelector),i.length&&(r=i.index())):a&&e.each(a,(function(e,t){s==t.id&&(r=t.selected)})),null!=r&&(this.tabs("option","active",r),this.parents(".cms-container").trigger("tabstaterestored"))},triggerLazyLoad:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".lazy-loadable";t.find(n).each(((t,n)=>{var a=e(n),r=n.dataset.lazyEvent||"lazyload";a.closest(".ss-tabset, .cms-tabset").is(this)&&n.dispatchEvent(new Event(r))}))},lazyLoadGridFields:function(t){t.find(".grid-field--lazy-loadable").each(((t,n)=>{e(n).closest(".ss-tabset, .cms-tabset").is(this)&&e(n).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((()=>{n.click()}))},redrawTabs:function(){this._super(),this.getDeferRestoreState()&&(this.restoreState(this.getDefferredStateOverride()),this.setDeferRestoreState(!1),this.setDefferredStateOverride(null))}}),e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("uiTabs")&&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")}})}))},8162:function(e,t,n){"use strict";var a=d(n(19755)),r=d(n(67294)),i=n(20745),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(54582)),o=n(36158);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const u=(0,s.loadComponent)("ToastsContainer");a.default.entwine("ss",(e=>{e("body").entwine({onmatch(){const t=e('
');this.append(t);(0,i.createRoot)(t[0]).render(r.default.createElement(u,null))}})})),a.default.extend({noticeAdd(e){s.default.ready((()=>{const{dispatch:t}=s.default.reducer.store;t((0,o.display)(e))}))}})},44686:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(43466),r.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("uiAccordion")&&this.accordion("destroy"),this._super()},getTabSet:function(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function(){this.accordion("resize")}}})}))},49785:function(e,t,n){"use strict";var a=d(n(19755)),r=d(n(67294)),i=n(20745),s=n(48834),o=n(59888),l=n(54582);function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e(".js-injector-boot .TreeDropdownField").entwine({Value:null,Timer:null,Component:null,ReactRoot:null,onmatch(){this._super();const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,l.loadComponent)("TreeDropdownField",t);this.setComponent(n);const a=this.data("state")||{},r=this.data("schema")||{};r.data&&r.data.multiple?this.setValue(a.value&&a.value!==o.MULTI_EMPTY_VALUE?a.value.map((e=>Number(e))):[]):this.setValue(a.value?Number(a.value):""),this.refresh()},onunmatch(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},refresh(){const e=this.getAttributes(),t=this.getComponent();let n=this.getReactRoot();n||(n=(0,i.createRoot)(this[0])),n.render(r.default.createElement(t,u({},e,{onChange:e=>{this.setValue(e),this.refresh(),clearTimeout(this.getTimer());const t=setTimeout((()=>{this.find("input").trigger("change")}),0);this.setTimer(t)},value:this.getValue(),noHolder:!0}))),this.setReactRoot(n)},getAttributes(){const e=this.data("state"),t=this.data("schema");return(0,s.schemaMerge)(t,e)}})}))},13305:function(e,t,n){"use strict";var a=l(n(19755)),r=l(n(67294)),i=n(20745),s=n(48834),o=n(54582);function l(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss",(e=>{e(".js-injector-boot .used-on__polyfill-holder").entwine({Timer:null,Component:null,ReactRoot:null,onmatch(){this._super();const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,o.loadComponent)("UsedOnTable",t);this.setComponent(n),this.refresh()},onunmatch(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},refresh(){const e=this.getAttributes(),t=this.getComponent();let n=this.getReactRoot();n||(n=(0,i.createRoot)(this[0])),n.render(r.default.createElement(t,e)),this.setReactRoot(n)},getAttributes(){const e=this.data("state"),t=this.data("schema");return(0,s.schemaMerge)(t,e)}})}))},1913:function(e,t,n){"use strict";var a,r=(a=n(91296))&&a.__esModule?a:{default:a};!function(e){e.fn.changetracker=function(t){var n=this;if(this.length>1)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 a=e.extend({},this.defaults,t);if(this.initialize=function(){e.meta&&(a=e.extend({},a,this.data())),n.data("dirty",!1);var t=function(t){if(t.is(":radio")){var a=n.find(":input[name="+t.attr("name")+"]:checked");return a.length?a.val():0}if(t.is(":checkbox"))return t.is(":checked")?1:0;var r=t.val();if(t&&t.hasClass("htmleditor"))switch(t.data("editor")||"default"){case"tinyMCE":case"default":var i=e.extend({forced_root_block:"p"},t.data("config")),s=tinymce.html.Serializer(i),o=tinymce.html.DomParser(i);r=s.serialize(o.parse(r))}return r},i=function(){var a=[];return n.getFields().each((function(){var n=e(this).prop("name");n&&a.push({name:n,value:t(e(this))})})),JSON.stringify(a)},s=i(),o=(0,r.default)((function(t){if(!t||!e(t.target).is(a.ignoreFieldSelector)){var r,o=(r=i(),n.data("dirty")||s!==r);n.toggleClass(a.changedCssClass,o)}}),250,{leading:!0,trailing:!0}),l=(0,r.default)((function(r){var i=e(r.target),s=i.data("changetracker.origVal");if(!i.is(a.ignoreFieldSelector)){var l=t(i);null===s||l!==s?(i.addClass(a.changedCssClass),n.addClass(a.changedCssClass)):(i.removeClass(a.changedCssClass),i.is(":radio")&&n.find(":radio[name="+i.attr("name")+"]").removeClass(a.changedCssClass),o())}}),250,{leading:!0,trailing:!0});n.on("click.changetracker",a.fieldSelector,l),n.on("keyup.changetracker",a.fieldSelector,l),n.on("change.changetracker",a.fieldSelector,l),n.on("change.changetracker",o),this.getFields().each((function(){var n=t(e(this));e(this).data("changetracker.origVal",n)})),n.on("dirty.changetracker",(function(){n.data("dirty",!0),o()})),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(a.changedCssClass)},this.resetField=function(t){return e(t).removeData("changetracker.origVal").removeClass(a.changedCssClass)},this.getFields=function(){return this.find(a.fieldSelector).not(a.ignoreFieldSelector+", .search-box *")},"string"==typeof arguments[0]){var i=Array.prototype.slice.call(arguments);return i.splice(0,1),this[arguments[0]].apply(this,i)}n=this;return setTimeout((function(){n.initialize()}),0),this}}(jQuery)},88854:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};(0,r.default)(window),(0,r.default)("html"),(0,r.default)("head");var i={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===r.default.type(e))return e;var t=i.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||"";for(var n=(t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"")?t.split("/"):[],a=e.split("/"),r=0;r');t.on("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).on("resize.ssdialog",(function(){e._resizeIframe()}))},close:function(){r.default.ui.dialog.prototype.close.call(this),this.uiDialog.off("resize.ssdialog"),(0,r.default)(window).off("resize.ssdialog")},_resizeIframe:function(){var e,t,n={},a=this.element.children("iframe");this.options.widthRatio&&(e=(0,r.default)(window).width()*this.options.widthRatio,this.options.minWidth&ðis.options.maxWidth?n.width=this.options.maxWidth:n.width=e),this.options.heightRatio&&(t=(0,r.default)(window).height()*this.options.heightRatio,this.options.minHeight&&tthis.options.maxHeight?n.height=this.options.maxHeight:n.height=t),jQuery.isEmptyObject(n)||(this._setOptions(n),a.attr("width",n.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),a.attr("height",n.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 a=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var i=(0,r.default)(' ').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover((function(){i.addClass("ui-state-hover")}),(function(){i.removeClass("ui-state-hover")})).focus((function(){i.addClass("ui-state-focus")})).blur((function(){i.removeClass("ui-state-focus")})).mousedown((function(e){e.stopPropagation()})).appendTo(a);(this.uiDialogTitlebarCloseText=(0,r.default)(" ")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(i)}(0,r.default)(" ").addClass("ui-dialog-title").attr("id",n).html(t).prependTo(a);a.find("*").add(a).disableSelection()},destroy:function(){this.element.off(".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)}})},1591:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(94301)),r=o(n(82702)),i=o(n(27354)),s=o(n(21965));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){let t=null,n=null;if(!(e.status>=200&&e.status<300))throw n=new Error(e.statusText),n.response=e,n;return t=e,t}function d(e){let t=null;if(e instanceof FormData||"string"==typeof e)t=e;else{if(!e||"object"!=typeof e)throw new Error("Invalid body type");t=JSON.stringify(e)}return t}function u(e,t){switch(e){case"application/x-www-form-urlencoded":return i.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){return e.text().then((t=>function(e,t){switch(e){case"application/x-www-form-urlencoded":return i.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}`)}}(e.headers.get("Content-Type"),t)))}r.default.polyfill();const f=new class{constructor(){this.fetch=a.default}createEndpointFetcher(e){var t=this;const n=Object.assign({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),a={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach((e=>{a[n[e]]&&(n[e]=a[n[e]])})),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Object.assign({},a,{Accept:n.responseFormat,"Content-Type":n.payloadFormat}),i=s.default.recursive({},n.defaultData,e),o=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{setFromData:!1},r=t;return r=function(e,t){return""===t?e:e.match(/\?/)?`${e}&${t}`:`${e}?${t}`}(r,u("application/x-www-form-urlencoded",Object.keys(n).reduce(((t,r)=>{const i=e[r],s=!0===a.setFromData&&!(i&&!0===i.remove),o=i&&!0===i.querystring&&!0!==i.remove;return s||o?Object.assign(t,{[r]:n[r]}):t}),{}))),r=Object.keys(e).reduce(((t,a)=>{const r=e[a].urlReplacement;return r?t.replace(r,n[a]):t}),r),r}(n.payloadSchema,n.url,i,{setFromData:"get"===n.method.toLowerCase()}),l="get"!==n.method.toLowerCase()?u(n.payloadFormat,function(e,t){return Object.keys(t).reduce(((n,a)=>{const r=e[a];return!r||!0!==r.remove&&!0!==r.querystring?Object.assign(n,{[a]:t[a]}):n}),{})}(n.payloadSchema,i)):"",d="get"===n.method.toLowerCase()?[o,r]:[o,l,r];return t[n.method.toLowerCase()](...d).then(c)}}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(l)}post(e){let 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:"post",credentials:"same-origin",body:d(t),headers:Object.assign({},{"Content-Type":"application/x-www-form-urlencoded"},n)}).then(l)}put(e){let 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:d(t),headers:n}).then(l)}delete(e){let 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:d(t),headers:n}).then(l)}};var p=f;t.default=p},94974:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=class{static get(e){return window.ss.config[e]}static getAll(){return window.ss.config}static getSection(e){return window.ss.config.sections.find((t=>t.name===e))}static getCurrentSection(){}};t.default=n},95837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeQuery=function(e){return r.default.parse(e.replace(/^\?/,""))},t.fileSize=function(e){let t=null,n="";e<1024?(t=e,n="bytes"):e<10240?(t=Math.round(e/1024*10)/10,n="KB"):e<1048576?(t=Math.round(e/1024),n="KB"):e<10485760?(t=Math.round(e/1048576*10)/10,n="MB"):e<1073741824&&(t=Math.round(e/1048576),n="MB");(t||0===t)&&n||(t=Math.round(e/1073741824*10)/10,n="GB");if(isNaN(t))return a.default._t("Admin.NO_SIZE","N/A");return`${t} ${n}`},t.getFileExtension=function(e){return/[.]/.exec(e)?e.replace(/^.+[.]/,""):""};var a=i(n(4754)),r=i(n(27354));function i(e){return e&&e.__esModule?e:{default:e}}},54582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlTemplates=t.default=void 0,Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"injectGraphql",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"provideContext",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"provideInjector",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"withInjector",{enumerable:!0,get:function(){return i.default}});var a=c(n(73318)),r=c(n(17176)),i=c(n(40342)),s=c(n(34717)),o=c(n(92475)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(20057));t.graphqlTemplates=l;var d=c(n(92456));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}var f=c(n(32869)).default;t.default=f},80507:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new class{constructor(){this.reset()}reset(){this.childRoutes=[],this.rootRoute={path:"/",routes:()=>this.getChildRoutes()}}updateRootRoute(e){this.rootRoute=Object.assign({},this.rootRoute,e)}add(e){let t=arguments.length>1&&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));const n=this.findChildRoute(t),a=Object.assign({},{routes:[]},e);let r=a.routes[a.routes.length-1];r&&"**"===r.path||(r={path:"**"},a.routes.push(r));const i=n.findIndex((t=>t.path===e.path));i>=0?n[i]=a:n.unshift(a)}findChildRoute(e){let t=this.childRoutes;return e&&e.forEach((e=>{const n=t.find((t=>t.path===e));if(!n)throw new Error(`Parent path ${e} could not be found.`);t=n.routes})),t}getRootRoute(){return this.rootRoute}getChildRoutes(){return this.childRoutes}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=this.findChildRoute(t),a=n.findIndex((t=>t.path===e));return a<0?null:n.splice(a,1)[0]}};var n=window.ss.routeRegister;t.default=n},15586:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=o(n(50650)),i=o(n(8575)),s=o(n(91658));function o(e){return e&&e.__esModule?e:{default:e}}r.default.oldshow||(r.default.oldshow=r.default.show),r.default.setAbsoluteBase=function(e){r.default.absoluteBaseURL=e.replace(/\/?$/,"/");const t=document.createElement("a");t.href=e;let n=t.pathname;n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n=`/${n}`),r.default.base(n)}.bind(r.default),r.default.getAbsoluteBase=function(){return r.default.absoluteBaseURL}.bind(r.default),r.default.resolveURLToBase=function(e){const t=r.default.getAbsoluteBase(),n=i.default.resolve(t,e);if(0!==n.indexOf(t))return n;const a=new RegExp(`^${(0,s.default)(t)}/?`);return n.replace(a,"/")}.bind(r.default),r.default.show=(a=r.default.oldshow,(e,t,n,i)=>a(r.default.resolveURLToBase(e),t,n,i)),r.default.routeAppliesToCurrentLocation=function(e){return new r.default.Route(e).match(r.default.current,{})},window.ss=window.ss||{},window.ss.router=window.ss.router||r.default;var l=window.ss.router;t.default=l},56503:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitiseShortCodeProperties=t.default=t.createHTMLSanitiser=void 0;var a,r=(a=n(4754))&&a.__esModule?a:{default:a};const i=e=>e.toString().slice(1,-1),s=i(/((?:[,\s]+(?:[a-z0-9\-_]+)=(?:(?:[a-z0-9\-_]+)|(?:\d+\.\d+)|(?:'[^']*')|(?:"[^"]*")))*)/),o=/[,\s]+([a-z0-9\-_]+)=(?:([a-z0-9\-_]+)|(\d+\.\d+)|(?:'([^']*)')|(?:"([^"]*)"))/,l=i(/\[%s/),d=i(/\[\s*\/\s*%s\s*]/),u=i(/((?:.|\n|)*?)/),c=i(/\s*/),f={match(e,t,n){let a=`${r.default.sprintf(l,e)}${s}${c}\\]`;t&&(a=`${a}${u}${r.default.sprintf(d,e)}`);const i=new RegExp(a,"i").exec(n);if(!i)return null;return{name:e,wrapped:t,properties:this.parseProperties(i[1]),original:i[0],content:t?i[2]:null}},parseProperties(e){let t=e;const n={};let a=t.match(o);for(;a;){const e=a[1]||"",r=a[2]||a[3]||a[4]||a[5]||"";e&&(n[e]=r);const i=t.indexOf(a[0]);t=t.substr(i+a[0].length),a=t.match(o)}return n},serialise(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{sep:",",quote:"",replacer:/[^a-z0-9\-_.]/gi}:{sep:" ",quote:'"',replacer:/"/g},n=Object.entries(e.properties).map((e=>{let[n,a]=e;return a?`${t.sep}${n}=${t.quote}${`${a}`.replace(t.replacer,"")}${t.quote}`:null})).filter((e=>null!==e)).join("");return e.wrapped?`[${e.name}${n}]${e.content}[/${e.name}]`:`[${e.name}${n}]`}},p=()=>{const e=document.createElement("div");return t=>void 0===t?"":(e.textContent=t,e.innerHTML)};t.createHTMLSanitiser=p;t.sanitiseShortCodeProperties=e=>{const t=p();return Object.entries(e).reduce(((e,n)=>{let[a,r]=n;return{...e,[a]:t(r)}}),{})};var h=f;t.default=h},90111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(67294);class r extends a.Component{constructor(){super(),clearTimeout(null)}render(){return null}}r.propTypes={};var i=r;t.default=i},4430:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const n=(e,t)=>e?`${e}.${t}`:t;window.ss=window.ss||{},window.ss.tinymceactions=window.ss.tinymceactions||new class{constructor(){this.actions={},this.editorCommandsToUrlTestsMap={},this.defaultCommand="sslinkexternal"}addAction(e,t,a){const r=t.priority||50,i=n(a,e),s=this.getActions(e,a,!0);return t.type="menuitem",t.hasOwnProperty("onclick")&&(t.onAction=t.onclick,delete t.onclick),s.find((e=>t.text===e.text))||(this.actions[i]=[...this.getActions(e,a,!1),{...t,priority:r}]),this}getActions(e,t){let a=t&&!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])||!this.actions[e]?[]:this.actions[e];const r=n(t,e);return t&&this.actions[r]&&(a=[...a,...this.actions[r]]),a}getSortedActions(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.getActions(e,t,n).sort(((e,t)=>{const n=t.priority-e.priority;return n||(e.text.toLocaleLowerCase()>t.text.toLocaleLowerCase()?1:-1)}))}addCommandWithUrlTest(e,t){return this.editorCommandsToUrlTestsMap[e]=t,this}setDefaultCommand(e){return this.defaultCommand=e,this}getDefaultCommand(){return this.defaultCommand}getEditorCommandFromUrl(e){let t=this.getDefaultCommand();const n=Object.keys(this.editorCommandsToUrlTestsMap).find((t=>this.editorCommandsToUrlTestsMap[t]&&this.editorCommandsToUrlTestsMap[t].test(e)));return n&&(t=n),t}};var a=window.ss.tinymceactions;t.default=a},39062:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(48966)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}var s=class{constructor(e){this.setValues(e)}setValues(e){this.values=e}getFieldValue(e){let t=this.values[e];return"string"!=typeof t&&(t=null==t||!1===t?"":t.toString()),t}validateValue(e,t,n){if(""===e)return"required"!==t;switch(t){case"equals":{const t=this.getFieldValue(n.field);return a.default.equals(e,t)}case"numeric":return a.default.isNumeric(e);case"date":return a.default.isDate(e);case"alphanumeric":return a.default.isAlphanumeric(e);case"alpha":return a.default.isAlpha(e);case"regex":return a.default.matches(e,n.pattern);case"max":return e.length<=n.length;case"email":return a.default.isEmail(e);default:return console.warn(`Unknown validation rule used: '${t}'`),!1}}validateFieldSchema(e){return this.validateField(e.name,e.validation,null!==e.leftTitle?e.leftTitle:e.title,e.customValidationMessage)}getMessage(e,t){const n=t.title,a="string"==typeof t.message?t.message:r.default._t(`Admin.VALIDATOR_MESSAGE_${e.toUpperCase()}`,r.default._t("Admin.VALIDATOR_MESSAGE_DEFAULT","{name} is not a valid value."));return r.default.inject(a,{name:n})}validateField(e,t,n,a){const r={valid:!0,errors:[]};if(!t)return r;const i=this.getFieldValue(e);if(""===i&&t.required){const r=Object.assign({title:""!==n?n:e},t.required);return{valid:!1,errors:[a||this.getMessage("required",r)]}}return Object.entries(t).forEach((t=>{const[a,s]=t,o=Object.assign({title:e},{title:n},s);if("required"===a)return;if(!this.validateValue(i,a,o)){const e=this.getMessage(a,o);r.valid=!1,r.errors.push(e)}})),a&&!r.valid&&(r.errors=[a]),r}};t.default=s},10259:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&void 0!==t.react)return r.default.createElement(e,n,t.react);if(t&&void 0!==t.html){if(null!==t.html){const a={__html:t.html};return r.default.createElement(e,i({},n,{dangerouslySetInnerHTML:a}))}return null}let a=null;a=t&&void 0!==t.text?t.text:t;if(a&&"object"==typeof a)throw new Error(`Unsupported string value ${JSON.stringify(a)}`);if(null!=a)return r.default.createElement(e,n,a);return null},t.mapHighlight=function(e,t,n){let a=0,i=e;const s=[],o=t.toLocaleLowerCase();for(;-1!==a;)if(a=i.toLocaleLowerCase().indexOf(o),-1!==a){const e=a+t.length,o=i.substring(0,a),l=i.substring(a,e),d=i.substring(e);o.length&&s.push(o),s.push(n?r.default.createElement(n,{key:s.length/2},l):l),i=d}return s.push(i),s};var a,r=(a=n(67294))&&a.__esModule?a:{default:a};function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t={};return e&&e.split(" ").forEach((e=>{""!==e&&(t[e]=!0)})),t};t.default=n},48942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createErrorHtml=t.createErrorBlock=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};const i=e=>({type:"error",value:{react:e.map(((e,t)=>r.default.createElement("span",{key:t,className:"form__validation-message"},e)))}});t.createErrorHtml=i;const s=e=>Object.entries(e).reduce(((e,t)=>{const[n,a]=t;if(!a||!a.length)return e;const r=Array.isArray(a)?a:[a];return{...e,[n]:i(r)}}),{});t.createErrorBlock=s;var o=s;t.default=o},62819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(4311)),r=n(59768),i=s(n(25904));function s(e){return e&&e.__esModule?e:{default:e}}const o="__TEMPLATE_OVERRIDE__",l=["templateName","fields","params","fragments"],d=["options","props","variables","skip","update"],u={params:{},args:{},fields:[],fragments:[],pagination:!0,apolloConfig:{}};var c=class{constructor(e,t,n){const a={...u,...e};a.fields=[...a.fields];const{apolloConfig:r,...i}=a;this.config=i,this.apolloConfigInitValues=r,this.apolloConfigTransforms={},this.templates={...t}||{},this.fragments={...n}||{},this.reduceApolloConfig=this.reduceApolloConfig.bind(this)}setConfig(e,t){if(l.includes(e))throw new Error(`Tried to set protected config values: '${e}', which is discouraged.`);return this.config={...this.config,[e]:t},this}transformApolloConfig(e,t){const n=this.apolloConfigTransforms[e]||[];return this.apolloConfigTransforms={...this.apolloConfigTransforms,[e]:[...n,t]},this}addParam(e,t){if(!e||!t)throw new Error("addParam must be passed a name and type parameter");return this.addParams({[e]:t})}addParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.config.params;return this.config.params={...t,...e},this}addArg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.ROOT_FIELD;return this.addArgs({[e]:t},n)}addArgs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.ROOT_FIELD;const n=this.config.args[t]||{};return this.config.args[t]={...n,...e},this}addField(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.ROOT_FIELD;return this.addFields([e],t)}addFields(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.ROOT_FIELD,n=[];return t.split("/").forEach((e=>{if(e===r.ROOT_FIELD)n=this.config.fields;else{const a=n.indexOf(e),r=n[a+1];if(-1===a||!Array.isArray(r))throw new Error(`Invalid path to field: ${t}`);n=r}})),e.forEach((e=>n.push(e))),this}useFragment(e){return this.config.fragments=[...this.config.fragments,e],this}useTemplate(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}addTempFragment(e,t){return this.fragments={...this.fragments,[e]:t},this.useFragment(e)}setTemplate(e){this.config.templateName=o;for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{const a=n(e);return this.coallesceData(t,e,a)},a=this.apolloConfigInitValues[t],r=this.apolloConfigTransforms[t]||[];if(d.includes(t)){const i=function(){for(var e=arguments.length,i=new Array(e),s=0;se(...i)));return"update"===t?null:l.reduce(n,o)};return{...e,[t]:i}}if(null==a)return e;const i=r.reduce(n,a);return{...e,[t]:i}}getConfig(){return{...this.config,availableFragments:{...this.fragments}}}getApolloConfig(){return[...Object.keys(this.apolloConfigInitValues),...Object.keys(this.apolloConfigTransforms)].filter(((e,t,n)=>n.indexOf(e)===t)).reduce(this.reduceApolloConfig,{})}getGraphqlAST(){const e=this.getConfig(),t=this.getRawTemplate(e.templateName),n=t.expressions.map((t=>"function"!=typeof t?t:t(e)));return(0,a.default)(t.strings,...n)}getContainer(){return new i.default(this.getGraphqlAST(),this.getApolloConfig())}};t.default=c},25904:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(95344);var r=class{constructor(e,t){this.graphqlAST=e,this.apolloConfig=t}getApolloHOC(){return(0,a.graphql)(this.graphqlAST,this.apolloConfig)}getGraphqlAST(){return this.graphqlAST}getApolloConfig(){return this.apolloConfig}};t.default=r},32869:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(2337)),r=l(n(86046)),i=l(n(77192)),s=l(n(47289)),o=l(n(2661));function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,a.default)();d.register("component",(0,r.default)()),d.register("reducer",(0,i.default)()),d.register("form",(0,s.default)()),d.register("query",(0,o.default)());var u=d;t.default=u},15746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(94184)),r=l(n(59572)),i=n(11962),s=n(48834),o=l(n(72208));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>e;var u=class{constructor(e,t){const n=e.state||{},a=n.fields||[];this.schema={...e,state:{...n,fields:[...a]}},this.mockGlobalState=(0,r.default)({},e.name,t)}getFieldByName(e){const t={fields:[],actions:[],...this.schema.schema},n=[...t.fields,...t.actions],a=(0,s.findField)(n,e),r=this.schema.state.fields.find((t=>t.name===e));return(0,s.schemaMerge)(a,r)}mutateField(e,t){const n=this.schema.state.fields||[],a=n.findIndex((t=>t.name===e));if(a<0)return this;const r=[...n],i=this.getFieldByName(e);return r[a]=(0,s.schemaMerge)(i,t(i)),this.schema.state.fields=r,this}updateField(e,t){return this.mutateField(e,(e=>({...e,...t})))}updateFields(e){return Object.keys(e).forEach((t=>{this.updateField(t,e[t])})),this}setFieldComponent(e,t){return this.updateField(e,{component:t})}setFieldClass(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.mutateField(e,(e=>{const r=(0,o.default)(e.extraClass);return r[t]=n,{...e,extraClass:(0,a.default)(r)}}))}addFieldClass(e,t){return this.setFieldClass(e,t,!0)}removeFieldClass(e,t){return this.setFieldClass(e,t,!1)}getValues(){return(0,i.getFormValues)(this.schema.name,d)(this.mockGlobalState)||{}}getValue(e){return this.getValues()[e]}isDirty(){return(0,i.isDirty)(this.schema.name,d)(this.mockGlobalState)}isPristine(){return(0,i.isPristine)(this.schema.name,d)(this.mockGlobalState)}isValid(){return(0,i.isValid)(this.schema.name,d)(this.mockGlobalState)}isInvalid(){return(0,i.isInvalid)(this.schema.name,d)(this.mockGlobalState)}getState(){return this.schema}};t.default=u},86745:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=class{constructor(e){this.values=e,this.errorMap={}}addError(e,t){if(!this.fieldExists(e))throw new Error(`Tried to add error to non-existent field: ${e}`);return this.errorMap[e]||(this.errorMap[e]=[]),this.errorMap[e]=[...this.errorMap[e],t],this}addErrors(e){return Object.entries(e).forEach((e=>{const[t]=e;let[,n]=e;Array.isArray(n)||(n=[n]),n.forEach((e=>this.addError(t,e)))})),this}clearErrors(e){if(!this.fieldExists(e))throw new Error(`Tried to clear errors for non-existent field: ${e}`);return delete this.errorMap[e],this}hasError(e){return this.fieldExists(e)&&!!this.getErrors(e).length}fieldExists(e){return Object.keys(this.values).includes(e)}getErrors(e){if(!this.fieldExists(e))throw new Error(`Tried to get errors for non-existent field: ${e}`);return this.errorMap[e]||[]}reset(){this.errorMap={}}getState(){return this.errorMap}};t.default=n},61111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GLOBAL_CONTEXT=void 0;var a,r=(a=n(94633))&&a.__esModule?a:{default:a};const i="before",s="after",o="__HEAD__",l="__TAIL__",d=[i,s],u="__GLOBAL__";t.GLOBAL_CONTEXT=u;var c=class{constructor(){this._middlewares=[],this._contextCache={}}sort(){const e=[o,l],t=[e];let n=[];return this._middlewares.forEach((e=>{const{name:n}=e,a=(e=>{let t=null;return d.forEach((n=>{if(e[n].includes("*")){if(e[n].length>1)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})(e);a===s?t.push([l,n]):a===i?t.push([n,o]):(t.push([n,l]),t.push([o,n]),e[i].forEach((e=>{t.push([n,e])})),e[s].forEach((e=>{t.push([e,n])})))})),(0,r.default)(t).filter((t=>!e.includes(t))).forEach((e=>{n=n.concat(this._middlewares.filter((t=>t.name===e)))})),this._middlewares=n,this}add(e,t,n){(e=>{d.forEach((t=>{if(void 0!==e[t]&&"string"!=typeof e[t]&&!Array.isArray(e[t]))throw new Error(`Middleware key ${t} must be a string or array`)}))})(e),this._contextCache={};let a=n;a&&a.length?Array.isArray(a)||(a=[a]):a=[u];const r={...e,factory:t,context:a};return d.forEach((t=>{Array.isArray(e[t])?r[t]=e[t]:r[t]=e[t]?[e[t]]:[]})),d.every((e=>!r[e].length))&&(r[s]=[o],r[i]=[l]),this._middlewares.push(r),this}getMatchesForContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;if(!this._contextCache[e]){const t=e.split(".");this._contextCache[e]=this._middlewares.filter((e=>e.context[0]===u||e.context.every(((e,n)=>"*"===e||t[n]===e))))}return this._contextCache[e]}};t.default=c},32659:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(79298)),r=o(n(59572)),i=n(11962),s=o(n(54582));function o(e){return e&&e.__esModule?e:{default:e}}const l=[i.actionTypes.REGISTER_FIELD,i.actionTypes.DESTROY];var d=e=>()=>(t,n)=>{const i=e(t,n),o=n.meta&&n.meta.form;if(!o||l.includes(n.type))return i;const d=s.default.form.getSchema(o);if(!d)return i;const u=(0,a.default)(i.formState,o);if(!u)return i;let c={...i};const f=Object.entries(i.formSchemas).filter((e=>{let[,t]=e;return t.name===o}));return f.length?(f.forEach((e=>{let[t,n]=e;const a=d(n,u);if(!a.state||!Array.isArray(a.state.fields))throw new Error(`\n One more calls to alterSchema did not return a properly formed schema state\n object. Check your calls to Injector.transform() which could affect '${t}'.\n `);c=(0,r.default)(c,`formSchemas.${t}.state`,a.state)})),c):i};t.default=d},28439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(58963)),r=i(n(62819));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{...e,templates:{...t},fragments:{...n},scaffold(e,t,n){let{force:a}=n;throw new Error("This API endpoint is not available yet")},register(t,n){const{templateName:a}=n;if(!a||!this.templates[a])throw new Error(`\nTried to register a new query '${t}' without a defined template '${a}'. Please ensure the\ntemplateName config is defined and that you have registered the template before registering a query.\n `);for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s1&&void 0!==arguments[1]?arguments[1]:{};return e.isProtected.call(this),function(e){if(n.templates[t]&&!a)throw new Error(`\nTried to register template '${t}' more than once. This practice is discouraged. Consider\nusing Injector.update() to enhance the template rather than override it completely.\nOtherwise, invoke the registerTemplate() function with '{ force: true }' as the second argument.\n `);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:{};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={...this.fragments,[t]:n}},getTemplates(){return{...this.templates}},getFragments(){return{...this.fragments}},getProcessedManager(e,t){const n=t.map((e=>e.factory)).reverse(),a=this.services[e],i=new r.default(a,{...this.templates},{...this.fragments});return n.forEach((e=>{e(i)}),a),i},getFactory(e,t){return this.getProcessedManager(e,t).getContainer()}}};t.default=s},2661:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=p(n(58963)),r=p(n(28439)),i=p(n(35058)),s=p(n(98710)),o=p(n(25898)),l=p(n(86920)),d=p(n(50596)),u=p(n(39192)),c=n(20057),f=n(35633);function p(e){return e&&e.__esModule?e:{default:e}}const h={[c.CREATE]:(0,i.default)(f.captureTag),[c.READ]:(0,s.default)(f.captureTag),[c.READ_ONE]:(0,o.default)(f.captureTag),[c.UPDATE]:(0,l.default)(f.captureTag),[c.DELETE]:(0,d.default)(f.captureTag),[c.QUERY]:(0,u.default)(f.captureTag)};var m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)();return(0,r.default)(e,h)};t.default=m},58963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(14890),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=r?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(a,s,o):a[s]=e[s]}a.default=e,n&&n.set(e,a);return a}(n(61111));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}var s=()=>({middlewareRegistries:{},services:{},factories:{},factoryCache:{},initialised:!1,isProtected(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised")},get(e,t){if(!this.initialised)throw new Error("\n Injector.get(): Attempted to access DI layer before it was initialised.\n Did you forget to invoke Injector.load()?");const n=this.factories[e];if(!n)throw new Error(`Injector.get(): Component ${e} does not exist`);return n(t)},customise(e,t,n){this.isProtected();const[a,...i]=t.split(".");let s=this.middlewareRegistries[a];s||(s=new r.default,this.middlewareRegistries={...this.middlewareRegistries,[a]:s}),s.add(e,n,i)},load(){var e=this;this.isProtected(),this.factories=Object.keys(this.services).reduce(((t,n)=>{const a=this.middlewareRegistries[n];return a?(a.sort(),{...t,[n]:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.GLOBAL_CONTEXT;const i=`${n}__${t}`;if(!e.factoryCache[i]){const r=a.getMatchesForContext(t);e.factoryCache[i]=e.getFactory(n,r)}return e.factoryCache[i]}}):{...t,[n]:()=>this.getFactory(n,[])}}),{}),this.initialised=!0},register(e,t){let{force:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.isProtected(),this.services[e]&&!0!==n)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={...this.services,[e]:t}},registerMany(e){let{force:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isProtected();const n=Object.keys(e),a=Object.keys(this.services).filter((e=>n.includes(e)));if(a.length&&!0!==t){const e=a.join(", ");throw new Error(`\n Tried to register services (${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={...this.services,...e}},transform(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isProtected(),t(this.createTransformer(e,n))},createTransformer(e,t){return(n,a)=>{this.customise({name:e,...t},n,a)}},getFactory(e,t){const n=this.services[e],r=t.map((e=>e.factory));return(0,a.compose)(...r)(n)}});t.default=s},86046:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(58963))&&a.__esModule?a:{default:a};var i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.default)();return{...e,get(t,n){for(var a=arguments.length,r=new Array(a>2?a-2:0),i=2;i{this.customise({name:e,...t,displayName:r},n,a)}},getFactory(t,n){const a=e.getFactory.call(this,t,n),r=n.map((e=>e.displayName||e.name));var i,s;return a.displayName=(i=this.services[t],s=r,[i.displayName||i.name||"Component",...s].reduce(((e,t)=>`${t}(${e})`))),a}}};t.default=i},47289:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VALIDATION_MIDDLEWARE_SERVICE=t.SCHEMA_MIDDLEWARE_SERVICE=void 0;var a=s(n(58963)),r=s(n(15746)),i=s(n(86745));function s(e){return e&&e.__esModule?e:{default:e}}const o="FormSchemaMiddleware";t.SCHEMA_MIDDLEWARE_SERVICE=o;const l="FormValidationMiddleware";t.VALIDATION_MIDDLEWARE_SERVICE=l;var d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)();return{...e,services:{[o]:e=>e,[l]:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}},register(){throw new Error(`\n Attempted to register a service on Injector.form. This container accepts only two\n services by design (${o} and ${l}) \n for updating form schema and adding validation, respectively. Consider using a more\n generic container, e.g. Injector.reducer.\n `)},registerMany(){this.register()},getSchema(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r(r,i)=>e.customise.call(this,{name:t,...n},`${a}.${r}`,i);return{alterSchema:a(o),addValidation:a(l)}},getFactory(e,t){const n=t.map((e=>e.factory));if(e===o)return this.getSchemaReducer(n);if(e===l)return this.getValidationReducer(n);throw new Error(`Invalid service for form injector: ${e}`)},getSchemaReducer(e){return(t,n)=>e.reduce(((e,t)=>{const a=t(new r.default(e,n));return{...e,...a}}),t)},getValidationReducer(e){return(t,n)=>{const a=new i.default(t);return e.forEach((e=>e(t,a,n))),a.getState()}}}};t.default=d},2337:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=()=>({services:{},initialised:!1,callbacks:[],onInit:null,register(e,t){let{force: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");if(this.services[e]&&!0!==n)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 `);const a=["load","createTransformer","get","register"];if(!a.every((e=>"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: ${a.join(", ")}\n `);this.services[e]=t,this[e]=t},load(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");Object.values(this.services).forEach((e=>e.load())),this.initialised=!0,this.onInit&&this.onInit(),this.callbacks.forEach((e=>{e()})),this.callbacks=[]},transform(e,t){let 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(((t,a)=>{let[r,i]=a;return{...t,[r]:i.createTransformer(e,n)}}),{}))},ready(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");this.initialised?e():this.callbacks=[...this.callbacks,e]},init(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=n},77192:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(58963)),r=i(n(61111));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)(),store:null,setStore(e){this.store=e},customise(e,t,n){this.isProtected();let a=this.middlewareRegistries[t];a||(a=new r.default,this.middlewareRegistries={...this.middlewareRegistries,[t]:a});a.add(e,(e=>{const t=this.store&&this.store.getState;return n(e)(t)}))},getAll(){return this.initialised?Object.entries(this.factories).reduce(((e,t)=>{let[n,a]=t;return{...e,[n]:a()}}),{}):Object.entries(this.services).reduce(((e,t)=>{let[n,a]=t;return{...e,[n]:a}}),{})}}};t.default=s},39192:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(35633),r=n(59768);const i=e=>{let{operationName:t,queryName:n}=e;return t||`${n.charAt(0).toUpperCase()}${n.slice(1)}`},s=e=>{let{queryName:t}=e;return t},o=e=>{let{queryType:t}=e;return t};var l=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.defaultTag)`${o} ${i}${r.getVariables} {
+(self.webpackChunksilverstripe_admin=self.webpackChunksilverstripe_admin||[]).push([[296],{13978:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(19755)),r=_(n(67294)),i=n(86706),s=n(20745),o=n(79655),l=_(n(94974)),d=_(n(15586)),u=_(n(80507)),c=_(n(55766)),f=n(75378),p=_(n(4754)),h=n(11962),m=_(n(96869)),g=n(89250),v=n(80195),b=_(n(3730));function _(e){return e&&e.__esModule?e:{default:e}}var y=class{constructor(e,t){this.store=e,this.client=t;const n=l.default.get("absoluteBaseUrl");d.default.setAbsoluteBase(n),this.shouldConfirmBeforeUnload=this.shouldConfirmBeforeUnload.bind(this)}setStore(e){this.store=e}setClient(e){this.client=e}start(e){this.matchesReactRoute(e)?this.initReactRouter():this.initLegacyRouter();const t=window.onbeforeunload;window.onbeforeunload=()=>this.shouldConfirmBeforeUnload()?p.default._t("Admin.CONFIRMUNSAVEDSHORT","WARNING: Your changes have not been saved."):"function"==typeof t?t():void 0}matchesReactRoute(e){const t=l.default.get("sections"),n=d.default.resolveURLToBase(e).replace(/\/$/,"");return!!t.find((e=>{const t=d.default.resolveURLToBase(e.url).replace(/\/$/,"");return!!e.reactRouter&&n.match(t)}))}initReactRouter(){u.default.updateRootRoute({component:c.default});const e=u.default.getRootRoute(),t=(0,o.createBrowserRouter)((0,o.createRoutesFromElements)(r.default.createElement(g.Route,{path:e.path,element:r.default.createElement(e.component,null,r.default.createElement(b.default,{shouldBlockFn:this.shouldConfirmBeforeUnload,blockMessage:this.getUnsavedChangesMessage()}))},u.default.getChildRoutes().map((e=>r.default.createElement(g.Route,{key:e.path,path:e.path,element:r.default.createElement(e.component,null)}))))),{basename:(0,v.joinUrlPaths)(l.default.get("baseUrl"),l.default.get("adminUrl"))});(0,s.createRoot)(document.getElementsByClassName("cms-content")[0]).render(r.default.createElement(f.ApolloProvider,{client:this.client},r.default.createElement(i.Provider,{store:this.store},r.default.createElement(o.RouterProvider,{router:t}))))}initLegacyRouter(){const e=l.default.get("sections"),t=this.store;(0,d.default)("*",((e,n)=>{const a=this.getUnsavedChangesMessage();this.shouldConfirmBeforeUnload()&&!window.confirm(a)||(e.store=t,n())}));let n=null;e.forEach((e=>{let t=d.default.resolveURLToBase(e.url);t=t.replace(/\/$/,""),t=`${t}(/*?)?`,(0,d.default)(t,((e,t)=>{if("complete"!==document.readyState||e.init)return void t();n||(n=window.location.pathname);const r=e.state&&e.state.__forceReload;(e.path!==n||r)&&(n=e.path.replace(/#.*$/,""),(0,a.default)(".cms-container").entwine("ss").handleStateChange(null,e.state))}))}));(0,s.createRoot)(document.createElement("div")).render(r.default.createElement("a",{role:"none",onClick:()=>{}})),d.default.start()}shouldConfirmBeforeUnload(){const e=this.store.getState(),t=e.unsavedForms||[],n=e.form.formSchemas;return t.filter((t=>{const a=Object.values(n).find((e=>e.name===t.name));return!!(a&&a.state&&a.state.notifyUnsavedChanges)&&(0,h.isDirty)(t.name,m.default)(e)})).length>0}getUnsavedChangesMessage(){return p.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.")}};t.default=y},56029:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(71745),i=(a=n(2395))&&a.__esModule?a:{default:a};var s=e=>{const t={};return e&&e.__schema.types.forEach((e=>{e.possibleTypes&&(t[e.name]=e.possibleTypes.map((e=>e.name)))})),new r.InMemoryCache({possibleTypes:t,dataIdFromObject:i.default,addTypename:!0})};t.default=s},56062:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(75378),r=l(n(94974)),i=l(n(85478)),s=l(n(66783)),o=l(n(56029));function l(e){return e&&e.__esModule?e:{default:e}}var d=async e=>{const t=r.default.getSection("SilverStripe\\Admin\\LeftAndMain").graphql,n=t&&t.cachedTypenames;let l;try{l=await(0,i.default)(e,n)}catch(e){l=null}const d=(0,o.default)(l),u=(0,s.default)(e),c=(0,a.from)(u);return new a.ApolloClient({cache:d,link:c})};t.default=d},66783:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(75378),i=n(63200),s=(a=n(94974))&&a.__esModule?a:{default:a},o=n(80195);var l=e=>{const t=new r.HttpLink({uri:(0,o.joinUrlPaths)(e,"admin/graphql"),fetchOptions:{credentials:"same-origin",headers:{accept:"application/json"}}}),n=(0,i.onError)((e=>{let{networkError:t}=e;t&&console.log(`[Network error]: ${t}`)}));return[new r.ApolloLink(((e,t)=>(e.setContext({headers:{"X-CSRF-TOKEN":s.default.get("SecurityID")}}),t(e)))),n,t]};t.default=l},2395:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=e=>{const t=e.id||e.ID;return t&&t>=0&&e.__typename?`${e.__typename}:${t}`:null};t.default=n},85478:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(94301))&&a.__esModule?a:{default:a},i=n(80195);const s=e=>{const t=e.data;return t.__schema.types=t.__schema.types.filter((e=>null!==e.possibleTypes)),t},o=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};var l=async function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=!!document.body.getAttribute("data-graphql-legacy"),a=[(0,i.joinUrlPaths)(e,"_graphql/admin.types.graphql"),(0,i.joinUrlPaths)(e,"admin.types.graphql")],l=[(0,i.joinUrlPaths)(e,"admin/graphql/types"),(0,i.joinUrlPaths)(e,"assets/admin.types.graphql")];let d,u;n?(t&&l.reverse(),[d,u]=l):[d,u]=a;const c={method:"GET",headers:{"Content-Type":"application/json"},uri:e,credentials:"same-origin"},f=async e=>(0,r.default)(e,c).then(o).then((e=>e.json())).then(s);let p;try{p=await f(d)}catch(e){if(!u)return Promise.reject(e);try{p=await f(u)}catch(e){return Promise.reject(e)}}return Promise.resolve(p)};t.default=l},59467:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,n=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension;if("function"==typeof t)return t(e);if("function"==typeof n)return(0,a.compose)(e,n());return e};var a=n(14890)},10374:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(54582)),r=l(n(39062)),i=l(n(94184)),s=n(48834),o=l(n(98028));function l(e){return e&&e.__esModule?e:{default:e}}const d=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.extraClass?e.extraClass.split(" ").reduce(((e,t)=>({...e,[t]:!0})),{}):{};"string"==typeof e.data.pristineClass&&(n[e.data.pristineClass]=t),"string"==typeof e.data.dirtyClass&&(n[e.data.dirtyClass]=!t);const a=t?e.data.pristineTitle:e.data.dirtyTitle,r=t?e.data.pristineIcon:e.data.dirtyIcon;return{...e,title:a||e.title,icon:r||e.icon,extraClass:(0,i.default)(n)}};var u=()=>{a.default.transform("field-holders",(e=>{["FieldGroup"].forEach((t=>e.component("FieldGroup",o.default,`${t}Holder`)))})),a.default.transform("form-action-changed",(e=>{e.form.alterSchema("*",(e=>(e.mutateField("action_save",(t=>{const n=e.isPristine();return d(t,n)})),e.mutateField("action_publish",(t=>{const n=t.data.isPublished&&!t.data.isModified&&e.isPristine();return d(t,n)})),e.getState())))})),a.default.transform("schema-validation",(e=>{e.form.addValidation("*",((e,t,n)=>{const a=new r.default(e),i=Object.keys(e).reduce(((e,t)=>{const r=(0,s.findField)(n.fields,t);if(!r)return e;const{valid:i,errors:o}=a.validateFieldSchema(r);return i?e:{...e,[t]:o}}),{});return t.addErrors(i),t.getState()}))}))};t.default=u},27274:function(e,t,n){"use strict";var a=h(n(54582)),r=n(14890),i=h(n(53894)),s=h(n(94974)),o=h(n(56062)),l=n(32212),d=h(n(89521)),u=h(n(24180)),c=h(n(59467)),f=h(n(10374)),p=h(n(13978));function h(e){return e&&e.__esModule?e:{default:e}}window.ss=window.ss||{},window.onload=async function(){const e=s.default.get("absoluteBaseUrl"),t=await(0,o.default)(e);(0,d.default)(),(0,u.default)();const n=[i.default],h=s.default.get("debugging");let m=(0,r.applyMiddleware)(...n);h&&(m=(0,c.default)(m));const g=m(r.createStore);window.ss.apolloClient=t;const v=new p.default(null,t);(0,f.default)(),a.default.init((()=>{const e=(0,r.combineReducers)(a.default.reducer.getAll()),t=g(e,{});t.dispatch((0,l.setConfig)(s.default.getAll())),a.default.reducer.setStore(t),window.ss.store=t,v.setStore(t),v.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")})),window.setTimeout((()=>a.default.load()),0)}},89521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(11962),r=te(n(54582)),i=te(n(95393)),s=te(n(37294)),o=te(n(22602)),l=te(n(45332)),d=te(n(74898)),u=te(n(19423)),c=te(n(81463)),f=te(n(63182)),p=te(n(79629)),h=te(n(49954)),m=te(n(41370)),g=te(n(5110)),v=te(n(88940)),b=te(n(71375)),_=te(n(63980)),y=te(n(20693)),w=te(n(65732)),O=te(n(7162)),C=te(n(618)),E=te(n(21677)),T=te(n(82432)),S=te(n(75917)),P=te(n(61404)),M=te(n(40505)),j=te(n(59644)),D=te(n(52935)),k=te(n(59888)),R=te(n(48297)),I=te(n(55742)),x=te(n(65963)),A=te(n(23296)),N=te(n(3080)),F=te(n(36800)),L=te(n(80384)),$=te(n(34411)),U=te(n(18871)),B=te(n(57129)),V=te(n(98031)),W=te(n(72543)),H=te(n(85362)),q=te(n(97023)),z=te(n(97228)),G=te(n(20164)),K=te(n(62266)),Y=te(n(65693)),X=te(n(1922)),Q=te(n(92227)),J=te(n(71255)),Z=te(n(49331)),ee=te(n(6734));function te(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({ActionMenu:i.default,Badge:s.default,Button:o.default,BackButton:l.default,TextField:d.default,HiddenField:u.default,DateField:c.default,TimeField:f.default,DatetimeField:p.default,CheckboxField:h.default,CheckboxSetField:m.default,OptionsetField:g.default,GridField:v.default,GridFieldActions:b.default,FieldGroup:D.default,SingleSelectField:_.default,PopoverField:y.default,HeaderField:w.default,LiteralField:O.default,HtmlReadonlyField:C.default,LookupField:E.default,CompositeField:T.default,Tabs:P.default,TabItem:M.default,FormAction:j.default,LabelField:S.default,TreeDropdownField:k.default,Preview:N.default,ReduxForm:F.default,ReduxFormField:a.Field,Form:x.default,FormAlert:A.default,FormBuilderModal:R.default,NotFoundComponent:I.default,UsedOnTable:L.default,Loading:$.default,CircularLoading:U.default,VersionedBadge:B.default,ViewModeToggle:V.default,ResizeAware:W.default,Tag:H.default,TagList:q.default,CompactTagList:z.default,Tip:G.default,Search:K.default,SearchToggle:Y.default,HtmlEditorField:X.default,NumberField:Q.default,PopoverOptionSet:J.default,ToastsContainer:Z.default,ListboxField:ee.default})}},24180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=b(n(54582)),r=n(14890),i=n(11962),s=b(n(18373)),o=b(n(54191)),l=b(n(81951)),d=b(n(20430)),u=b(n(5452)),c=b(n(54558)),f=b(n(80573)),p=b(n(13346)),h=b(n(11146)),m=b(n(32659)),g=b(n(22793)),v=b(n(84231));function b(e){return e&&e.__esModule?e:{default:e}}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,r.combineReducers)({formState:i.reducer,formSchemas:o.default});a.default.reducer.registerMany({config:s.default,form:t,records:l.default,breadcrumbs:d.default,treeDropdownField:u.default,tabs:c.default,mobileMenu:f.default,unsavedForms:p.default,usedOn:h.default,viewMode:g.default,toasts:v.default,...e}),a.default.transform("admin",(e=>{e.reducer("form",m.default)}))}},61534:function(e,t,n){"use strict";n(28432),n(77300),n(12523),n(46844),n(58794),n(91044),n(94033),n(39432),n(10452),n(99324),n(66273),n(62746),n(86673),n(92173),n(65986),n(64482),n(4567),n(77511),n(64300),n(16741),n(31968),n(31643),n(63063),n(16089),n(14755),n(50194),n(37386),n(87577),n(43109),n(4193),n(40127),n(44368),n(40256),n(29094),n(60462),n(49841),n(99511),n(14536),n(96582),n(1488),n(69860),n(33281),n(79035),n(8592),n(46508),n(28170),n(53438),n(83361),n(94813),n(72472),n(55488),n(40829),n(47157),n(53877),n(71080),n(37904),n(97976),n(8145),n(87746),n(86317),n(87603),n(59628),n(70184),n(91673),n(60128),n(87872),n(60140),n(57006),n(19602),n(27729),n(54218),n(98441),n(96007),n(43893),n(1913),n(88854),n(47640),n(50628),n(62596),n(73843),n(49266),n(95075),n(49958),n(60395),n(41221),n(88615),n(82165),n(56970),n(73366),n(81047),n(87594),n(15878),n(75350),n(8162),n(76406),n(8298),n(40303),n(44686),n(49785),n(13305),n(57893),n(49414),n(42886),n(17106),n(27274)},34625:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>r.default.createElement("div",{className:"accordion",role:"tablist","aria-multiselectable":"true"},e.children);t.default=i},56448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>{const t=`${e.groupid}_Header`,n=`${e.groupid}_Items`,a=n.replace(/\\/g,"_"),i=t.replace(/\\/g,"_"),s={id:a,"aria-expanded":!0,className:"list-group list-group-flush collapse show",role:"tabpanel","aria-labelledby":t};return r.default.createElement("div",{className:"accordion__block"},r.default.createElement("a",{className:"accordion__title","data-toggle":"collapse",href:`#${a}`,"aria-expanded":"true","aria-controls":n,id:i,role:"tab"},e.title),r.default.createElement("div",s,e.children))};t.default=i},95393:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(45697)),i=n(53556),s=l(n(4754)),o=l(n(94184));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.setState({isOpen:!this.state.isOpen})),0)}render(){const{dropdownToggleProps:e,dropdownMenuProps:t,dropdownToggleClassNames:n,className:r,toggleCallback:l,...d}=this.props,c=(0,o.default)(n,e.className),f=(0,o.default)("action-menu__dropdown",t.className);return a.default.createElement(i.Dropdown,u({className:(0,o.default)("action-menu",r),isOpen:this.state.isOpen,toggle:this.toggle},d),a.default.createElement(i.DropdownToggle,u({className:c,"aria-label":s.default._t("Admin.ACTIONS","View actions")},e)),a.default.createElement(i.DropdownMenu,u({className:f},t),this.props.children))}}c.propTypes={toggleCallback:r.default.func,dropdownToggleClassNames:r.default.arrayOf(r.default.string)},c.defaultProps={className:"",dropdownToggleClassNames:["action-menu__toggle","btn","btn--no-text","btn--icon-xl","font-icon-dot-3"],dropdownToggleProps:{},dropdownMenuProps:{}};var f=c;t.default=f},37294:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statuses=t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(94184)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}const l=["default","info","success","warning","danger","primary","secondary"];t.statuses=l;class d extends a.PureComponent{render(){const{status:e,inverted:t,className:n,message:i}=this.props;if(!e)return null;const s=t?`badge-${e}--inverted`:"",o=(0,r.default)(n,"badge",`badge-${e}`,s);return a.default.createElement("span",{className:o},i)}}d.propTypes={message:i.default.node,status:i.default.oneOf(l),className:i.default.string,inverted:i.default.bool},d.defaultProps={status:"default",className:"badge-pill",inverted:!1};var u=d;t.default=u},71691:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(86706),i=d(n(94184)),s=d(n(45697)),o=d(n(67388)),l=d(n(5257));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.Component{getLastCrumb(){return this.props.crumbs&&this.props.crumbs[this.props.crumbs.length-1]}renderBreadcrumbs(){return this.props.crumbs?this.props.crumbs.slice(0,-1).map((e=>a.default.createElement("li",{key:e.text,className:"breadcrumb__item"},a.default.createElement(l.default,{className:"breadcrumb__item-title",href:e.href,onClick:e.onClick},e.text)))):null}renderLastCrumb(){const e=this.getLastCrumb();return e?a.default.createElement("div",{className:"breadcrumb__item breadcrumb__item--last"},a.default.createElement("h2",{className:"breadcrumb__item-title"},e.text,e.icon&&this.renderIcons([e.icon]),e.icons&&this.renderIcons(e.icons))):null}renderIcons(e){return e.map(((e,t)=>{const{nodeName:n,className:r,hasRestrictedAccess:s,...l}=e;let d={...l};const u=(0,i.default)(["breadcrumb__icon",r]);return d={tabIndex:"0",...d},d.hasOwnProperty("onClick")&&(d={role:"button",...d}),d.key=`breadcrumb-icon-${t}`,"FileStatusIcon"===n?(d.fileID=0,d.hasRestrictedAccess=s,d.extraClassName=u,a.default.createElement(o.default,d)):(d.className=u,a.default.createElement("span",d))}))}render(){return a.default.createElement("div",{className:"breadcrumb__container fill-height flexbox-area-grow"},this.props.crumbs&&this.props.crumbs.length>1&&a.default.createElement("div",{className:"breadcrumb__list-container"},a.default.createElement("ol",{className:"breadcrumb"},this.renderBreadcrumbs())),this.renderLastCrumb())}}t.Component=c,c.propTypes={crumbs:s.default.arrayOf(s.default.shape({onClick:s.default.func,text:s.default.string,icon:s.default.shape({nodeName:s.default.string,className:s.default.string,onClick:s.default.func,action:e=>{if(e.action)throw new Error("action: no longer used")}}),icons:s.default.arrayOf(s.default.shape({nodeName:s.default.string,className:s.default.string,onClick:s.default.func}))}))};var f=(0,r.connect)((function(e){return{crumbs:e.breadcrumbs}}))(c);t.default=f},45332:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=o(n(22602)),i=o(n(94184)),s=o(n(4754));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,...n}=e;return a.default.createElement(r.default,l({className:(0,i.default)(t,"back-button")},n))};d.propTypes=r.default.propTypes,d.defaultProps={...r.default.defaultProps,noText:!0,icon:"left-open-big",children:s.default._t("Admin.BACK","Back")};var u=d;t.default=u},22602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=n(53556),i=l(n(45697)),s=l(n(94184)),o=l(n(29258));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,noText:n,children:i,...o}=e;return a.default.createElement(r.Button,d({className:(0,s.default)(t,{"btn--no-text":n}),"aria-label":n?i:void 0},o),n?void 0:i)};u.propTypes={...r.Button.propTypes,noText:i.default.bool},u.defaultProps={...r.Button.defaultProps,noText:!1};var c=(0,o.default)(u);t.default=c},29258:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(94184));function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=t=>{let{icon:n,className:r,...s}=t;return a.default.createElement(e,o({className:(0,i.default)(r,n&&`font-icon-${n}`)},s))};return t.propTypes={...e.propTypes,icon:r.default.string},t.defaultProps=e.defaultProps,t.displayName=e.name,t};t.default=l},49954:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=s(n(67294)),r=s(n(98028)),i=s(n(31885));function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(i.default,o({},e,{type:"checkbox"}));t.Component=l;var d=e=>{const t=(0,r.default)(l);return a.default.createElement(t,o({},e,{hideLabels:!0}))};t.default=d},41370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(31885)),i=o(n(98028)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t`${e}`)):[]}getOptionProps(e,t){const n=this.getValues(),a=this.getItemKey(e,t);return{key:a,id:a,name:this.props.name,className:this.props.itemClass,disabled:e.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:n.indexOf(`${e.value}`)>-1,title:e.title,type:"checkbox"}}handleChange(e,t){if("function"==typeof this.props.onChange){const n=this.getValues(),a=this.props.source.filter(((e,a)=>this.getItemKey(e,a)===t.id?1===t.value:n.indexOf(`${e.value}`)>-1)).map((e=>`${e.value}`));this.props.onChange(e,{id:this.props.id,value:a})}}render(){return this.props.source?a.default.createElement("div",null,this.props.source.map(((e,t)=>a.default.createElement(r.default,d({},this.getOptionProps(e,t),{hideLabels:!0}))))):null}}t.Component=u,u.propTypes={className:s.default.string,extraClass:s.default.string,itemClass:s.default.string,id:s.default.string,name:s.default.string.isRequired,source:s.default.arrayOf(s.default.shape({value:s.default.oneOfType([s.default.string,s.default.number]),title:s.default.any,disabled:s.default.bool})),onChange:s.default.func,value:s.default.any,readOnly:s.default.bool,disabled:s.default.bool},u.defaultProps={extraClass:"",className:"",value:[]};var c=e=>{const t=(0,i.default)(u);return a.default.createElement(t,e)};t.default=c},82432:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(10259)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}class l extends a.Component{getLegend(){return"fieldset"===this.props.data.tag&&this.props.data.legend?(0,r.default)("legend",this.props.data.legend):null}getClassName(){return`${this.props.className} ${this.props.extraClass}`}render(){const e=this.getLegend(),t=this.props.data.tag||"div",n=this.getClassName();return a.default.createElement(t,{className:n},e,this.props.children)}}t.Component=l,l.propTypes={data:i.default.oneOfType([i.default.array,i.default.shape({tag:i.default.string,legend:i.default.string})]),extraClass:i.default.string},l.defaultProps={className:"",extraClass:""};var d=l;t.default=d},81463:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(98028)),r=d(n(30381)),i=d(n(68300)),s=d(n(4754)),o=d(n(45697)),l=n(74898);function d(e){return e&&e.__esModule?e:{default:e}}class u extends l.Component{render(){return super.render()}moment(){return r.default.locale(this.getLang()),(0,r.default)(...arguments)}getLang(){return(this.asHTML5()?this.props.isoLang:this.props.lang)||(0,r.default)().locale()}asHTML5(){return this.props.data.html5&&this.hasNativeSupport()}hasNativeSupport(){return this.props.modernizr.inputtypes.date}getInputProps(){const e=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:this.moment().endOf("month").format("L")}),t=this.asHTML5()?this.props.value:this.getLocalisedValue(),n=this.asHTML5()?"date":"text";return{...super.getInputProps(),type:n,value:t,placeholder:e}}getLocalisedValue(){return this.convertToLocalised(this.props.value)}isMultiline(){return!1}handleChange(e){const t=e.target.value;let n="";n=this.asHTML5()?t:this.convertToIso(t),"function"==typeof this.props.onChange&&this.triggerChange(e,n)}triggerChange(e,t){this.props.onChange(e,{id:this.props.id,value:t})}convertToIso(e){let t="";if(e){const n=this.moment(e,["L","YYYY-MM-DD"]);n.isValid()&&(t=n.format("YYYY-MM-DD"))}return t}convertToLocalised(e){let t="";if(e){const n=this.moment(e);n.isValid()&&(t=n.format("L"))}return t}}t.Component=u,u.propTypes={lang:o.default.string,isoLang:o.default.string,modernizr:o.default.object,data:o.default.shape({html5:o.default.bool})},u.defaultProps={modernizr:i.default,data:{}};var c=(0,a.default)(u);t.default=c},79629:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(98028)),r=o(n(30381)),i=o(n(4754)),s=n(81463);function o(e){return e&&e.__esModule?e:{default:e}}const l="L LT";class d extends s.Component{getInputProps(){const e=i.default.inject(i.default._t("Admin.FormatExample","Example: {format}"),{format:this.moment().endOf("month").format(l)}),t=this.asHTML5()?"datetime-local":"text";return{...super.getInputProps(),type:t,placeholder:e}}isMultiline(){return!1}hasNativeSupport(){return this.props.modernizr.inputtypes["datetime-local"]}triggerChange(e,t){/^\d{4}-\d\d-\d\dT\d\d:\d\d$/.test(t)?this.props.onChange(e,{id:this.props.id,value:`${t}:00`}):this.props.onChange(e,{id:this.props.id,value:t})}convertToLocalised(e){r.default.locale(this.props.lang);let t="";if(e){const n=this.moment(e);n.isValid()&&(t=n.format(l))}return t}convertToIso(e){r.default.locale(this.props.lang);let t="";if(e){const n=[l,"L",r.default.ISO_8601],a=this.moment(e,n);a.isValid()&&(t=a.format("YYYY-MM-DDTHH:mm:ss"))}return t}}t.Component=d,d.propTypes=s.Component.propTypes,d.defaultProps=s.Component.defaultProps;var u=(0,a.default)(d);t.default=u},52935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(82432)),r=s(n(45697)),i=s(n(94184));function s(e){return e&&e.__esModule?e:{default:e}}class o extends a.default{getClassName(){return(0,i.default)("field-group-component",{"field-group-component__small-holder":this.props.smallholder},super.getClassName())}}o.propTypes={...a.default.propTypes,smallholder:r.default.bool},o.defaultProps={...a.default.defaultProps,smallholder:!0};var l=o;t.default=l},98028:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=c(n(67294)),r=n(53556),i=d(n(10259)),s=d(n(94184)),o=d(n(45697)),l=c(n(20164));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}var f=function(e){class t extends a.Component{getMessage(){let e=null;this.props.message&&this.props.message.value&&(e=this.props.message);const t=this.props.meta;return t&&t.error&&t.touched&&(!e||t.dirty)&&(e=t.error),e}getHolderProps(){return{className:(0,s.default)({field:!0,[this.props.extraClass]:!0,readonly:this.props.readOnly}),id:this.props.holderId}}renderMessage(){const e=this.getMessage();if(!e)return null;const t=(0,s.default)(["form__field-message",`form__field-message--${e.type}`]),n=(0,i.default)("div",e.value);return a.default.createElement("div",{className:t},n)}renderLeftTitle(){const e=this.props.leftTitle?this.props.leftTitle:this.props.title;return!e||this.props.hideLabels?null:(0,i.default)(r.Label,e,{className:"form__field-label",for:this.props.id})}renderRightTitle(){return!this.props.rightTitle||this.props.hideLabels?null:(0,i.default)(r.Label,this.props.rightTitle,{className:"form__field-label",for:this.props.id})}renderField(){const t=Boolean(this.getMessage()),n={...this.props,extraClass:(0,s.default)(this.props.extraClass,{"is-invalid":t})},i=a.default.createElement(e,n),o=this.props.data&&this.props.data.prefix?this.props.data.prefix:"",l=this.props.data&&this.props.data.suffix?this.props.data.suffix:"";return o||l?a.default.createElement(r.InputGroup,null,o&&a.default.createElement(r.InputGroupAddon,{addonType:"prepend"},o),i,l&&a.default.createElement(r.InputGroupAddon,{addonType:"append"},l)):i}renderTitleTip(){return this.props.id&&this.props.titleTip&&this.props.titleTip.content?a.default.createElement(l.default,{id:`FieldHolder-${this.props.id}-titleTip`,content:this.props.titleTip.content,fieldTitle:this.props.title,type:l.TIP_TYPES.TITLE,icon:"menu-help"}):null}renderDescription(){return null===this.props.description?null:(0,i.default)("div",this.props.description,{className:"form__field-description"})}render(){return this.props.noHolder?this.renderField():a.default.createElement(r.FormGroup,this.getHolderProps(),this.renderLeftTitle(),this.renderTitleTip(),a.default.createElement("div",{className:"form__field-holder"},this.renderField(),this.renderMessage(),this.renderDescription()),this.renderRightTitle())}}return t.propTypes={leftTitle:o.default.any,rightTitle:o.default.any,title:o.default.any,extraClass:o.default.string,holderId:o.default.string,id:o.default.string,name:o.default.string,description:o.default.any,hideLabels:o.default.bool,message:o.default.shape({extraClass:o.default.string,value:o.default.any,type:o.default.string}),data:o.default.oneOfType([o.default.array,o.default.shape({prefix:o.default.string,suffix:o.default.string})]),titleTip:o.default.shape(l.tipShape)},t.defaultProps={className:"",extraClass:"",leftTitle:null,rightTitle:null,title:"",description:null,hideLabels:!1,noHolder:!1,message:null,data:{}},t};t.default=f},67388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(45697)),i=l(n(4754)),s=l(n(94184)),o=n(53556);function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.container=e}},this.props.children)}}o.propTypes={children:i.default.any,className:i.default.string,onClickOut:i.default.func.isRequired},o.defaultProps={className:""};var l=o;t.default=l},65963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(23296)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(e,l({key:n,className:n?"":"message-box--panel-top"},t)))):null}render(){const e=!1!==this.props.valid,t=this.props.mapFieldsToComponents(this.props.fields),n=this.props.mapActionsToComponents(this.props.actions),r=this.renderMessages(),i=this.props.formTag,s=["form"];!1===e&&s.push("form--invalid"),this.props.attributes&&this.props.attributes.className&&s.push(this.props.attributes.className);const o={...this.props.attributes,onSubmit:this.props.handleSubmit,className:s.join(" ")};return a.default.createElement(i,l({},o,{ref:e=>{this.form=e,this.props.setDOM(e)},role:"form"}),t&&a.default.createElement("fieldset",this.props.fieldHolder,r,this.props.afterMessages,t),n&&n.length?a.default.createElement("div",this.props.actionHolder,n):null)}}t.Component=d,d.propTypes={autoFocus:i.default.bool,setDOM:i.default.func,valid:i.default.bool,actions:i.default.array,fieldHolder:i.default.shape({className:i.default.string}),actionHolder:i.default.shape({className:i.default.string}),extraClass:i.default.string,afterMessages:i.default.node,attributes:i.default.shape({action:i.default.string.isRequired,className:i.default.string,encType:i.default.string,id:i.default.string,method:i.default.string.isRequired}),fields:i.default.array.isRequired,handleSubmit:i.default.func,mapActionsToComponents:i.default.func.isRequired,mapFieldsToComponents:i.default.func.isRequired,messages:i.default.arrayOf(i.default.shape({extraClass:i.default.string,value:i.default.any,type:i.default.string})),formTag:i.default.oneOfType([i.default.func,i.default.string]),FormAlertComponent:i.default.oneOfType([i.default.object,i.default.func])},d.defaultProps={setDOM:()=>null,formTag:"form",actionHolder:{className:"btn-toolbar"},FormAlertComponent:r.default};var u=d;t.default=u},430:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={CSRF_HEADER:"X-SecurityID"}},59644:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(10259)),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}getButtonProps(){const{attributes:e,id:t,name:n}=this.props;return{...void 0===e?{}:e,id:t,name:n,className:this.getButtonClasses(),disabled:this.isDisabled(),onClick:this.handleClick}}getButtonClasses(){const{title:e,loading:t,extraClass:n}=this.props,a={btn:!0,"btn--no-text":"string"!=typeof e,"btn--loading":t,disabled:this.isDisabled()},r=this.getButtonStyle();r&&(a[`btn-${r}`]=!0);const s=this.getIcon();return s&&(a[`font-icon-${s}`]=!0),"string"==typeof n&&(a[n]=!0),(0,i.default)(a)}getButtonStyle(){if(void 0!==this.props.data.buttonStyle)return this.props.data.buttonStyle;if(void 0!==this.props.buttonStyle)return this.props.buttonStyle;return this.props.extraClass.split(" ").find((e=>e.indexOf("btn-")>-1))?null:this.isPrimary()?"primary":"secondary"}getIcon(){return this.props.icon||this.props.data.icon||null}getLoadingIcon(){return this.props.loading?a.default.createElement("div",{className:"btn__loading-icon"},a.default.createElement("span",{className:"btn__circle btn__circle--1"}),a.default.createElement("span",{className:"btn__circle btn__circle--2"}),a.default.createElement("span",{className:"btn__circle btn__circle--3"})):null}isDisabled(){const{disabled:e,readOnly:t}=this.props;return e||t}isPrimary(){const{extraClass:e,name:t}=this.props,n=e?e.split(" "):[];return"action_save"===t||!!n.find((e=>"ss-ui-action-constructive"===e))}handleClick(e){"function"==typeof this.props.onClick&&this.props.onClick(e,this.props.name||this.props.id)}render(){const{title:e}=this.props;return a.default.createElement("button",this.getButtonProps(),this.getLoadingIcon(),(0,r.default)("span",e,{className:"btn__title"}))}}d.propTypes={id:s.default.string,name:s.default.string,onClick:s.default.func,title:s.default.string,type:s.default.string,loading:s.default.bool,icon:s.default.string,disabled:s.default.bool,readOnly:s.default.bool,data:s.default.oneOfType([s.default.array,s.default.shape({buttonStyle:s.default.string})]),extraClass:s.default.string,attributes:s.default.object},d.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1,readOnly:!1};var u=d;t.default=u},23296:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=l(n(10259)),s=l(n(94184)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class u extends a.Component{constructor(e){super(e),this.handleClosed=this.handleClosed.bind(this),this.state={visible:!0}}getMessageStyle(){switch(this.props.type){case"good":case"success":return"success";case"info":return"info";case"warn":case"warning":return"warning";default:return"danger"}}getMessageProps(){const e=this.props.type||"no-type";return{className:(0,s.default)(["message-box",`message-box--${e}`,this.props.className,this.props.extraClass]),color:this.getMessageStyle(),toggle:this.props.closeLabel?this.handleClosed:null,isOpen:!this.props.closeLabel||this.state.visible}}handleClosed(){"function"==typeof this.props.onClosed?this.props.onClosed():this.setState({visible:!1})}render(){if("boolean"!=typeof this.props.visible&&this.state.visible||this.props.visible){const e=(0,i.default)("div",this.props.value);if(e)return a.default.createElement(r.Alert,this.getMessageProps(),e)}return null}}u.propTypes={extraClass:o.default.string,value:o.default.any,type:o.default.string,onClosed:o.default.func,closeLabel:o.default.string,visible:o.default.bool},u.defaultProps={extraClass:"",className:""};var c=u;t.default=c},56334:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schemaPropType=t.default=t.basePropTypes=t.Component=void 0;var a=f(n(67294)),r=u(n(45697)),i=u(n(21965)),s=f(n(48834)),o=n(48942),l=u(n(1591)),d=n(54582);function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.context.injector.get(e,`${n}.${t}`);switch(e){case"Integer":case"Decimal":return a("NumberField");case"String":case"Text":return a("TextField");case"Date":return a("DateField");case"Time":return a("TimeField");case"Datetime":return a("DatetimeField");case"Hidden":return a("HiddenField");case"SingleSelect":return a("SingleSelectField");case"Custom":return a("GridField");case"Structural":return a("CompositeField");case"Boolean":return a("CheckboxField");case"MultiSelect":return a("CheckboxSetField");default:return null}}validateForm(e){if("function"==typeof this.props.validate)return this.props.validate(e);if(!(this.props.schema&&this.props.schema.schema))return{};const t=this.context.injector.validate(this.props.identifier);let n={};return t&&(n=t(e,this.props.schema.schema)||{}),(0,o.createErrorBlock)(n)}buildComponent(e){const t=e.input||{},n={...e,...e.input,onChange:t.onChange?(e,n)=>{t.onChange(n?n.value:e)}:null};delete n.input;const r=this.getComponent(n);if(null===r)return null;if(null!==n.schemaComponent&&void 0===r)throw Error(`Component not found in injector: ${n.schemaComponent}`);const i=this.props.createFn;return"function"==typeof i?i(r,n):a.default.createElement(r,p({key:n.id},n))}mapFieldsToComponents(e){const t=this.props.baseFieldComponent;return e.map((e=>{let n=e;return e.children&&(n=Object.assign({},e,{children:this.mapFieldsToComponents(e.children)})),n=Object.assign({onAutofill:this.props.onAutofill,formid:this.props.form},n),"Structural"===e.schemaType||!0===e.readOnly?this.buildComponent(n):a.default.createElement(t,p({key:n.id},n,{component:this.buildComponent}))}))}handleAction(e){"function"==typeof this.props.onAction&&this.props.onAction(e,this.props.values),e.isPropagationStopped()||this.setState({submittingAction:e.currentTarget.name})}handleSubmit(e){let t="";this.state.submittingAction?t=this.state.submittingAction:this.props.schema.schema.actions[0]&&(t=this.props.schema.schema.actions[0].name);const n=Object.assign({},e,t?{[t]:1}:{}),a={"X-Formschema-Request":this.props.responseRequestedSchema.join(),"X-Requested-With":"XMLHttpRequest"},r=e=>this.submitApi(e||n,a).then((e=>(this.setState({submittingAction:null}),e))).catch((e=>{throw this.setState({submittingAction:null}),e}));return"function"==typeof this.props.onSubmit?this.props.onSubmit(n,t,r):r()}mapActionsToComponents(e){return e.map((e=>{const t=Object.assign({},e);return e.children?t.children=this.mapActionsToComponents(e.children):(t.onClick=this.handleAction,this.props.submitting&&this.state.submittingAction===e.name&&(t.loading=!0)),this.buildComponent(t)}))}normalizeFields(e,t){return e.map((e=>{const n=t&&t.fields?t.fields.find((t=>t.id===e.id)):{},a=i.default.recursive(!0,(0,s.schemaMerge)(e,n),{schemaComponent:n&&n.component?n.component:e.component});return e.children&&(a.children=this.normalizeFields(e.children,t)),a}))}render(){const e=this.props.schema.schema,t=this.props.schema.state,n=this.props.baseFormComponent,r={...e.attributes,className:e.attributes.class,encType:e.attributes.enctype,noValidate:!0};delete r.class,delete r.enctype;const{asyncValidate:i,fieldHolder:o,actionHolder:l,onSubmitFail:d,onSubmitSuccess:u,shouldAsyncValidate:c,touchOnBlur:f,touchOnChange:p,persistentSubmitErrors:h,form:m,afterMessages:g,autoFocus:v,formTag:b}=this.props,_={form:m,afterMessages:g,fields:this.normalizeFields(e.fields,t),fieldHolder:o,actions:this.normalizeFields(e.actions,t),actionHolder:l,attributes:r,data:e.data,initialValues:(0,s.default)(e,t),onSubmit:this.handleSubmit,valid:t&&t.valid,messages:t&&Array.isArray(t.messages)?t.messages:[],mapActionsToComponents:this.mapActionsToComponents,mapFieldsToComponents:this.mapFieldsToComponents,asyncValidate:i,onSubmitFail:d,onSubmitSuccess:u,shouldAsyncValidate:c,touchOnBlur:f,touchOnChange:p,persistentSubmitErrors:h,validate:this.validateForm,autoFocus:v,setDOM:e=>{this.formDOM=e},formTag:b};return a.default.createElement(n,_)}}t.Component=h;const m=r.default.shape({id:r.default.string,schema:r.default.shape({attributes:r.default.shape({class:r.default.string,enctype:r.default.string}),fields:r.default.array.isRequired}),state:r.default.shape({fields:r.default.array}),loading:r.default.bool,stateOverride:r.default.shape({fields:r.default.array})});t.schemaPropType=m;const g={createFn:r.default.func,onSubmit:r.default.func,onAction:r.default.func,asyncValidate:r.default.func,onSubmitFail:r.default.func,onSubmitSuccess:r.default.func,shouldAsyncValidate:r.default.func,touchOnBlur:r.default.bool,touchOnChange:r.default.bool,persistentSubmitErrors:r.default.bool,validate:r.default.func,values:r.default.object,submitting:r.default.bool,baseFormComponent:r.default.elementType.isRequired,baseFieldComponent:r.default.elementType.isRequired,getCustomFields:r.default.func,responseRequestedSchema:r.default.arrayOf(r.default.oneOf(["schema","state","errors","auto"])),identifier(e,t,n){return/^[A-Za-z0-9_.]+$/.test(e[t])?null:new Error(`\n Invalid identifier supplied to ${n}. Must be a set of\n dot-separated alphanumeric strings.\n `)}};t.basePropTypes=g,h.propTypes=Object.assign({},g,{form:r.default.string.isRequired,schema:m.isRequired,autoFocus:r.default.bool}),h.defaultProps={responseRequestedSchema:["auto"],autoFocus:!1};var v=(0,d.withInjector)(h);t.default=v},48297:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=u(n(4754)),i=n(53556),s=u(n(16304)),o=u(n(10259)),l=u(n(94184)),d=u(n(45697));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}const f=()=>null;class p extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),this.handleHide=this.handleHide.bind(this),this.clearResponse=this.clearResponse.bind(this),this.handleLoadingError=this.handleLoadingError.bind(this)}getForm(){const{FormBuilderLoaderComponent:e}=this.props;return this.props.schemaUrl?a.default.createElement(e,{fieldHolder:{className:(0,l.default)("modal-body",this.props.bodyClassName)},actionHolder:{className:"modal-footer"},autoFocus:this.props.autoFocus,schemaUrl:this.props.schemaUrl,onSubmit:this.handleSubmit,onAction:this.props.onAction,onLoadingError:this.handleLoadingError,identifier:this.props.identifier}):null}getResponse(){if(!this.state||!this.state.response)return null;let e="";return e=this.state.error?this.props.responseClassBad:this.props.responseClassGood,a.default.createElement("div",{className:e},(0,o.default)("span",{html:this.state.response}))}clearResponse(){this.setState({response:null})}handleLoadingError(e){const t=this.props.onLoadingError!==f;if(this.props.showErrorMessage||!t){const t=e.errors&&e.errors[0];this.setState({response:t.value,error:!0})}t&&this.props.onLoadingError(e)}handleHide(){this.clearResponse(),"function"==typeof this.props.onClosed&&this.props.onClosed()}handleSubmit(e,t,n){this.clearResponse();let a=null;if(a="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,n):n(),!a)throw new Error("Promise was not returned for submitting");return a.then((e=>(e&&this.setState({response:e.message,error:!1}),e))).catch((e=>{e.then((e=>{this.setState({response:e,error:!0})}))})),a}renderHeader(){let{title:e}=this.props;const{ModalHeaderComponent:t}=this.props;if(!1!==e){if("object"==typeof e){e=(new DOMParser).parseFromString(e.html,"text/html").body.textContent||""}return a.default.createElement(t,{toggle:this.handleHide},e)}return!0===this.props.showCloseButton&&"function"==typeof this.props.onClosed?a.default.createElement("button",{type:"button",className:"close modal__close-button",onClick:this.handleHide,"aria-label":r.default._t("Admin.CLOSE","Close")}):null}render(){const e=this.getForm(),t=this.getResponse(),{ModalComponent:n}=this.props;return a.default.createElement(n,{isOpen:this.props.isOpen,toggle:this.handleHide,className:this.props.className,modalClassName:this.props.modalClassName,size:this.props.size},this.renderHeader(),t,e,this.props.children)}}p.propTypes={autoFocus:d.default.bool,isOpen:d.default.bool,title:d.default.oneOfType([d.default.string,d.default.bool,d.default.shape({html:d.default.string})]),className:d.default.string,bodyClassName:d.default.string,modalClassName:d.default.string,showCloseButton:d.default.bool,size:d.default.string,onClosed:d.default.func,schemaUrl:d.default.string,onSubmit:d.default.func,onAction:d.default.func,responseClassGood:d.default.string,responseClassBad:d.default.string,identifier:d.default.string,showErrorMessage:d.default.bool,onLoadingError:d.default.func,ModalComponent:d.default.oneOfType([d.default.object,d.default.func]),ModalHeaderComponent:d.default.oneOfType([d.default.object,d.default.func]),FormBuilderLoaderComponent:d.default.oneOfType([d.default.object,d.default.func])},p.defaultProps={showErrorMessage:!1,showCloseButton:!0,onLoadingError:f,isOpen:!1,title:null,modalClassName:"form-builder-modal",responseClassGood:"alert alert-success",responseClassBad:"alert alert-danger",ModalComponent:i.Modal,ModalHeaderComponent:i.ModalHeader,FormBuilderLoaderComponent:s.default};var h=p;t.default=h},88940:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(67294)),r=v(n(4754)),i=n(14890),s=n(86706),o=v(n(430)),l=_(n(30772)),d=v(n(10259)),u=v(n(45697)),c=v(n(59746)),f=v(n(73542)),p=v(n(84002)),h=v(n(58227)),m=v(n(18052)),g=v(n(13527));function v(e){return e&&e.__esModule?e:{default:e}}function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}const y=[];class w extends a.Component{constructor(e){super(e),this.deleteRecord=this.deleteRecord.bind(this),this.editRecord=this.editRecord.bind(this)}componentDidMount(){const e=this.props.data;this.props.actions.fetchRecords(e.recordType,e.collectionReadEndpoint.method,e.collectionReadEndpoint.url)}createRowActions(e){return a.default.createElement(m.default,{className:"grid-field__cell--actions",key:"Actions"},a.default.createElement(g.default,{icon:"cog",onClick:this.editRecord,record:e}),a.default.createElement(g.default,{icon:"cancel",onClick:this.deleteRecord,record:e}))}createCell(e,t){const n=this.props.data.onDrillDown,a={className:n?"grid-field__cell--drillable":"",onDrillDown:n?t=>n(t,e):null,key:`${t.name}`,width:t.width},r=t.field.split(".").reduce(((e,t)=>e[t]),e);return(0,d.default)(m.default,r,a)}createRow(e){const t={className:this.props.data.onDrillDown?"grid-field__row--drillable":"",key:`${e.ID}`},n=this.props.data.columns.map((t=>this.createCell(e,t))),r=this.createRowActions(e);return a.default.createElement(h.default,t,n,r)}deleteRecord(e,t){e.preventDefault();const n={};n[o.default.CSRF_HEADER]=this.props.config.SecurityID,confirm(r.default._t("CampaignAdmin.DELETECAMPAIGN","Are you sure you want to delete this record?"))&&this.props.actions.deleteRecord(this.props.data.recordType,t,this.props.data.itemDeleteEndpoint.method,this.props.data.itemDeleteEndpoint.url,n)}editRecord(e,t){e.preventDefault(),this.props.data&&"function"==typeof this.props.data.onEditRecord&&this.props.data.onEditRecord(e,t)}render(){if(this.props.records===y)return a.default.createElement("div",null,r.default._t("CampaignAdmin.LOADING","Loading..."));if(!this.props.records.length)return a.default.createElement("div",null,r.default._t("CampaignAdmin.NO_RECORDS","No campaigns created yet."));const e=a.default.createElement("th",{key:"holder",className:"grid-field__action-placeholder"}),t=this.props.data.columns.map((e=>a.default.createElement(p.default,{key:e.name},e.name))),n=a.default.createElement(f.default,null,t.concat(e)),i=this.props.records.map((e=>this.createRow(e)));return a.default.createElement(c.default,{header:n,rows:i})}}w.propTypes={data:u.default.shape({recordType:u.default.string.isRequired,headerColumns:u.default.array,collectionReadEndpoint:u.default.object,onDrillDown:u.default.func,onEditRecord:u.default.func})};var O=(0,s.connect)((function(e,t){const n=t.data&&t.data.recordType;return{config:e.config,records:n&&e.records[n]?e.records[n]:y}}),(function(e){return{actions:(0,i.bindActionCreators)(l,e)}}))(w);t.default=O},13527:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class o extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}handleClick(e){this.props.onClick(e,this.props.record.ID)}render(){return r.default.createElement("button",{className:`grid-field__icon-action font-icon-${this.props.icon} btn--icon-lg`,onClick:this.handleClick})}}o.propTypes={onClick:i.default.func.isRequired};var l=o;t.default=l},18052:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(94184)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(r.default,null,e.children);t.default=s},84002:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>r.default.createElement("th",null,e.children);t.default=i},58227:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};var i=e=>{const t=`grid-field__row ${e.className}`;return r.default.createElement("tr",{tabIndex:0,className:t},e.children)};t.default=i},59746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class o extends r.Component{generateHeader(){return void 0!==this.props.header?this.props.header:(this.props.data,null)}generateRows(){return void 0!==this.props.rows?this.props.rows:(this.props.data,null)}render(){return r.default.createElement("div",{className:"grid-field"},r.default.createElement("table",{className:"table table-hover grid-field__table"},r.default.createElement("thead",null,this.generateHeader()),r.default.createElement("tbody",null,this.generateRows())))}}o.propTypes={data:i.default.object,header:i.default.object,rows:i.default.array};var l=o;t.default=l},71375:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=d(n(94184)),s=d(n(45697)),o=d(n(86010)),l=d(n(95393));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.PureComponent{renderMultipleActions(e){const t=e.reduce(((e,t)=>{const n=e,a=t.group;if(!a)throw new Error(`Action: "${t.title}" has no group assigned`);return n[a]||(n[a]=[]),n[a].push(t),n}),[]);return a.default.createElement(l.default,{dropdownMenuProps:{right:!0},dropdownToggleClassNames:["action-menu__toggle","btn","btn--no-text","btn-sm","font-icon-dot-3"]},Object.keys(t).map(((e,n)=>[0!==n&&a.default.createElement(r.DropdownItem,{divider:!0,key:e}),t[e].map(((e,t)=>a.default.createElement(o.default,{data:e.data,title:e.title,type:e.type,url:e.url,key:t})))])))}renderSingleAction(e){const{type:t,title:n,data:s}=e;let o,{url:l}=e;"submit"===t&&(o="submit",l=void 0);const d=(0,i.default)("action",s.classNames);return a.default.createElement(r.Button,{className:d,type:o,href:l,"data-url":s["data-url"],"data-action-state":s["data-action-state"],name:s.name,color:"secondary"},n)}render(){const{schema:e}=this.props;return e.length>1?this.renderMultipleActions(e):1===e.length?this.renderSingleAction(e[0]):null}}const f=o.default.propTypes;f.group=s.default.string,c.propTypes=s.default.arrayOf(s.default.shape(f)).isRequired;var p=c;t.default=p},86010:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.PureComponent{render(){const{type:e,title:t,data:n}=this.props;let{url:s}=this.props;const o=(0,i.default)("action",n.classNames);let l=null;switch(e){case"submit":case"button":l="button",s=void 0;break;case"link":l="a";break;default:l=void 0}return a.default.createElement(r.DropdownItem,{className:o,href:s,tag:l,type:"button"===l?"button":void 0,"data-url":n["data-url"],"data-action-state":n["data-action-state"],name:n.name},t)}}d.propTypes={data:s.default.object,title:s.default.string.isRequired,type:s.default.oneOf(["submit","link"]),url:s.default.string};var u=d;t.default=u},65732:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(94184));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){let{className:t,extraClass:n,id:r,data:{headingLevel:s,title:o}}=e;const l=`h${s||3}`;return a.default.createElement("div",{className:"field"},a.default.createElement(l,{className:(0,i.default)(t,n),id:r},o))}o.propTypes={className:r.default.string,extraClass:r.default.string,id:r.default.string,data:r.default.oneOfType([r.default.array,r.default.shape({headingLevel:r.default.number,title:r.default.string})]).isRequired},o.defaultProps={className:"",extraClass:""};var l=o;t.default=l},19423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.Component{getInputProps(){return{className:(0,i.default)(this.props.className,this.props.extraClass),id:this.props.id,name:this.props.name,type:"hidden",value:this.props.value||""}}render(){return a.default.createElement(r.Input,this.getInputProps())}}d.propTypes={id:s.default.string,extraClass:s.default.string,name:s.default.string.isRequired,value:s.default.any},d.defaultProps={className:"",extraClass:"",value:""};var u=d;t.default=u},1922:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(67294)),r=o(n(69227)),i=n(74898),s=o(n(98028));function o(e){return e&&e.__esModule?e:{default:e}}n(51726);class l extends i.Component{constructor(e){super(e),this.state={isReady:!e.data.editorjs},this.inputRef=null,this.handleReady=this.handleReady.bind(this)}getInputProps(){return{...super.getInputProps(),...this.props.data.attributes,innerRef:e=>{this.inputRef=e}}}getEditorElement(){return document.getElementById(this.getInputProps().id)}getEditor(){return window.TinyMCE&&window.TinyMCE.get(this.getInputProps().id)}handleReady(){!window.TinyMCE&&window.tinymce&&(window.TinyMCE=window.tinymce),this.setState({isReady:!0})}registerChangeListener(){const e=this.getEditorElement();this.getEditor().on("change keyup setcontent",(()=>{super.handleChange({target:e})}))}renderDependencyScript(){return window.tinymce||window.TinyMCE?(setTimeout((()=>{this.handleReady()}),0),null):a.default.createElement(r.default,{url:this.props.data.editorjs,onLoad:this.handleReady})}render(){return this.state.isReady?super.render():this.renderDependencyScript()}componentDidUpdate(e,t){const{isReady:n}=this.state;if(!n)return;n!==t.isReady&&setTimeout((()=>{const{document:e,jQuery:t}=window,n=t?t.Event("EntwineElementsAdded"):new Event("noop"),a=this.getEditorElement();n.targets=[a],t&&t(e).triggerHandler(n),this.registerChangeListener()}),1);const{value:a}=this.props;if(a!==e.value){const e=new Event("change",{bubbles:!0});e.simulated=!0,e.value=a,this.inputRef.dispatchEvent(e)}}componentWillUnmount(){if(!this.state.isReady)return;const{document:e,jQuery:t}=window,n=t?t.Event("EntwineElementsRemoved"):new Event("noop"),a=this.getEditorElement(),r=this.getEditor();r&&r.save(),n.targets=[a],super.handleChange({target:a}),t&&t(e).triggerHandler(n)}}t.Component=l;var d=(0,s.default)(l);t.default=d},618:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(98028)),i=n(53556),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:t,className:n,title:r,extraClass:i,data:s}=e;const o=s&&s.target,l=`${n} ${i}`;return a.default.createElement("label",{id:t,className:l,htmlFor:o},r)};s.propTypes={id:r.default.number,className:r.default.string,extraClass:r.default.string,title:r.default.node,data:r.default.shape({target:r.default.string})},s.defaultProps={className:"",extraClass:""};var o=s;t.default=o},5257:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=n(79655);function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement("div",{className:"list-group"},e.items.map((e=>a.default.createElement(i.default,e))));o.propTypes={items:r.default.array};var l=o;t.default=l},12906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}class o extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this)}handleClick(e){this.props.onClick&&this.props.onClick(e,this.props.onClickArg)}render(){const e=`list-group-item ${this.props.className}`;return r.default.createElement("a",{role:"button",tabIndex:0,className:e,onClick:this.handleClick},this.props.children)}}o.propTypes={onClickArg:i.default.any,onClick:i.default.func};var l=o;t.default=l},6734:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=m(n(14504)),i=m(n(66244)),s=m(n(92332)),o=m(n(39301)),l=m(n(25114)),d=m(n(4754)),u=m(n(94301)),c=m(n(98028)),f=m(n(8575)),p=m(n(69496)),h=m(n(45697));function m(e){return e&&e.__esModule?e:{default:e}}function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;te.json())).then((e=>e.items.map((e=>({[n]:e.Title,[a]:e.Value,Selected:e.Selected})))))}isValidNewOption(e,t,n){const{valueKey:a}=this.props;if(!e)return!1;if(Array.isArray(t)){if(this.valueInOptions(e,t,a))return!1}else if(e===t[a])return!1;return!this.valueInOptions(e,n,a)}valueInOptions(e,t,n){for(const a of t)if(e===a[n])return!0;return!1}render(){const{lazyLoad:e,options:t,creatable:n,multi:r,disabled:i,labelKey:s,valueKey:o,SelectComponent:u,AsyncCreatableSelectComponent:c,AsyncSelectComponent:f,CreatableSelectComponent:p,...h}=this.props,m=e?{loadOptions:this.getOptions}:{options:t};let g=u;if(e&&n?g=c:e?g=f:n&&(g=p),this.isControlled()||(h.value=this.state.value),!r&&h.value&&Object.keys(h.value).length>0){const e=h.value[Object.keys(h.value)[0]];"object"==typeof e&&(h.value=e)}return a.default.createElement(l.default,null,a.default.createElement(g,v({},h,{isMulti:r,isDisabled:i,cacheOptions:!0,onChange:this.handleChange,onBlur:this.handleOnBlur},m,{getOptionLabel:e=>e[s],getOptionValue:e=>e[o],noOptionsMessage:e=>{let{inputValue:t}=e;return t?d.default._t("ListboxField.NO_OPTIONS","No options"):d.default._t("ListboxField.TYPE_TO_SEARCH","Type to search")},isValidNewOption:this.isValidNewOption,getNewOptionData:(e,t)=>({[s]:t,[o]:e}),classNamePrefix:"ss-listbox-field"})))}}t.Component=b,b.propTypes={name:h.default.string.isRequired,labelKey:h.default.string.isRequired,valueKey:h.default.string.isRequired,lazyLoad:h.default.bool,creatable:h.default.bool,multi:h.default.bool,disabled:h.default.bool,options:h.default.arrayOf(h.default.object),optionUrl:h.default.string,value:h.default.any,onChange:h.default.func,onBlur:h.default.func,SelectComponent:h.default.oneOfType([h.default.object,h.default.func]),AsyncCreatableSelectComponent:h.default.oneOfType([h.default.object,h.default.func]),AsyncSelectComponent:h.default.oneOfType([h.default.object,h.default.func]),CreatableSelectComponent:h.default.oneOfType([h.default.object,h.default.func])},b.defaultProps={labelKey:"Title",valueKey:"Value",disabled:!1,lazyLoad:!1,creatable:!1,multi:!1,SelectComponent:r.default,AsyncCreatableSelectComponent:s.default,AsyncSelectComponent:i.default,CreatableSelectComponent:o.default};var _=(0,c.default)(b);t.default=_},7162:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a};function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;tt.value===e));return t?t.title:""}return e&&e.length?e.map((e=>{const t=this.props.source.find((t=>t.value===e));return t&&t.title})).filter((e=>`${e}`.length)).join(", "):""}getFieldProps(){return{id:this.props.id,name:this.props.name,className:`${this.props.className} ${this.props.extraClass}`}}render(){if(!this.props.source)return null;const e=`('${s.default._t("Admin.NONE","None")}')`,t=this.getValueCSV()||e;return a.default.createElement(r.Input,u({plaintext:!0},this.getFieldProps(),{tag:"p"}),t)}}t.Component=c,c.propTypes={extraClass:o.default.string,id:o.default.string,name:o.default.string.isRequired,source:o.default.arrayOf(o.default.shape({value:o.default.oneOfType([o.default.string,o.default.number]),title:o.default.any,disabled:o.default.bool})),value:o.default.any},c.defaultProps={extraClass:"",className:"",value:[]};var f=(0,i.default)(c);t.default=f},86827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(94184)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}class l extends a.Component{constructor(){super(),this.handleClick=this.handleClick.bind(this)}handleClick(e){e.preventDefault(),"function"==typeof this.props.onClick&&this.props.onClick(e)}render(){const e=(0,r.default)({"cms-mobile-menu-toggle":!0,"cms-mobile-menu-toggle--open":this.props.isOpen});return a.default.createElement("button",{type:"button",className:e,href:"#toggle-mobile-menu",onClick:this.handleClick,"aria-controls":this.props.controls,"aria-expanded":Boolean(this.props.isOpen)},a.default.createElement("span",null),a.default.createElement("span",null),a.default.createElement("span",null),a.default.createElement("span",null))}}l.propTypes={isOpen:i.default.bool.isRequired,onClick:i.default.func.isRequired,controls:i.default.string},l.defaultProps={controls:""};var d=l;t.default=d},26195:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(11521),i=n(86706),s=(a=n(86827))&&a.__esModule?a:{default:a};var o=(0,i.connect)((e=>({isOpen:e.mobileMenu.isOpen})),(e=>({onClick(){e((0,r.toggleMobileMenu)())}})))(s.default);t.default=o},3730:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a,r=n(67294),i=(a=n(45697))&&a.__esModule?a:{default:a},s=n(79655);function o(e){let{shouldBlockFn:t,blockMessage:n}=e;const a=(0,s.unstable_useBlocker)(t);return(0,r.useEffect)((()=>{if("blocked"===a.state){confirm(n)?a.proceed():a.reset()}}),[a.state]),null}o.propTypes={shouldBlockFn:i.default.func.isRequired,blockMessage:i.default.string.isRequired}},55742:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=l(n(4754)),i=l(n(94184)),s=l(n(23296)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>{let{itemName:t,name:n,value:o}=e;return a.default.createElement("div",{className:(0,i.default)(t,"not-found-component")},a.default.createElement(s.default,{value:r.default.inject(r.default._t("Admin.NOT_FOUND_COMPONENT","The component here ({component}) failed to load, there is a chance that you may lose data when saving due to this."),{component:t})}),n&&"string"==typeof o?a.default.createElement("input",{type:"hidden",name:n,value:o}):null)};d.propTypes={itemName:o.default.string.isRequired,name:o.default.string,value:o.default.any};var u=d;t.default=u},92227:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(98028)),r=i(n(16725));function i(e){return e&&e.__esModule?e:{default:e}}class s extends r.default{getInputProps(){const e=super.getInputProps();return Object.assign(e,{type:"number"}),e}}t.Component=s;var o=(0,a.default)(s);t.default=o},31885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=l(n(94184)),s=l(n(10259)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class u extends a.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}getInputProps(){const e=(0,i.default)({[this.props.className]:!0,[this.props.extraClass]:!0,"form-check":!0,checked:this.props.value,disabled:this.props.readOnly,"option-field--disabled":this.props.readOnly||this.props.disabled});return{id:this.props.id,type:this.props.type,name:this.props.name,disabled:this.props.disabled||this.props.readOnly,readOnly:this.props.readOnly,className:e,onChange:this.handleChange,checked:!!this.props.value,value:1}}handleChange(e){if(this.props.readOnly||this.props.disabled)return void e.preventDefault();let t=null;"function"==typeof this.props.onChange?t=this.props.onChange:"function"==typeof this.props.onClick&&(t=this.props.onClick),t&&t(e,{id:this.props.id,value:e.target.checked?1:0})}render(){const e=null!==this.props.leftTitle?this.props.leftTitle:this.props.title,t=null!==this.props.rightTitle?`${e} ${this.props.rightTitle}`:e;return a.default.createElement(r.FormGroup,{check:!0},a.default.createElement(r.Label,{check:!0},a.default.createElement(r.Input,this.getInputProps()),(0,s.default)("span",t)))}}t.Component=u,u.propTypes={type:o.default.oneOf(["checkbox","radio"]),leftTitle:o.default.any,rightTitle:o.default.any,title:o.default.any,extraClass:o.default.string,id:o.default.string,name:o.default.string,onChange:o.default.func,value:o.default.oneOfType([o.default.string,o.default.number,o.default.bool]),readOnly:o.default.bool,disabled:o.default.bool},u.defaultProps={extraClass:"",className:"",type:"radio",leftTitle:null,rightTitle:null};var c=u;t.default=c},5110:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=o(n(31885)),i=o(n(98028)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.getItemKey(e,n)===t.id));this.props.onChange(e,{id:this.props.id,value:n.value})}}render(){return this.props.source?a.default.createElement("div",null,this.props.source.map(((e,t)=>a.default.createElement(r.default,d({},this.getOptionProps(e,t),{hideLabels:!0}))))):null}}t.Component=u,u.propTypes={extraClass:s.default.string,itemClass:s.default.string,id:s.default.string,name:s.default.string.isRequired,source:s.default.arrayOf(s.default.shape({value:s.default.oneOfType([s.default.string,s.default.number]),title:s.default.oneOfType([s.default.string,s.default.number]),disabled:s.default.bool})),onChange:s.default.func,value:s.default.oneOfType([s.default.string,s.default.number]),readOnly:s.default.bool,disabled:s.default.bool},u.defaultProps={extraClass:"",className:"",itemClass:""};var c=(0,i.default)(u);t.default=c},20693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}class d extends a.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={isOpen:!1}}getPlacement(){return this.props.data.placement||"bottom"}getContainer(){return this.props.container?this.props.container:this.wrapper}toggle(){const{toggleCallback:e}=this.props;window.setTimeout((()=>this.setState({isOpen:!this.state.isOpen},e)),0)}render(){const e=this.getPlacement(),t=(0,i.default)({btn:!0,"btn-secondary":!0,[this.props.className]:!0,[this.props.buttonClassName]:!0,"btn--no-focus":this.state.isOpen,"font-icon-dot-3 btn--no-text":!this.props.title,[`btn--icon-${this.props.buttonSize}`]:!this.props.title}),n={id:this.props.id,type:"button",className:t,onClick:this.toggle,title:this.props.data.buttonTooltip},s=(0,i.default)({[this.props.className]:!0,"popover-container":!0,"popover-field":!0});return a.default.createElement("div",{className:s,ref:e=>{this.wrapper=e}},a.default.createElement(r.Button,n,this.props.title),a.default.createElement(r.Popover,{id:`${this.props.id}_Popover`,placement:e,isOpen:this.state.isOpen,target:this.props.id,toggle:this.toggle,className:this.props.popoverClassName,container:this.getContainer()},a.default.createElement(r.PopoverHeader,null,this.props.data.popoverTitle),a.default.createElement(r.PopoverBody,null,this.props.children)))}}d.propTypes={id:s.default.string.isRequired,title:s.default.any,container:s.default.any,className:s.default.string,buttonClassName:s.default.string,popoverClassName:s.default.string,buttonSize:s.default.oneOf(["sm","md","large","xl"]),data:s.default.oneOfType([s.default.array,s.default.shape({popoverTitle:s.default.string,buttonTooltip:s.default.string,placement:s.default.oneOf(["top","bottom","left","right"])})]),toggleCallback:s.default.func},d.defaultProps={data:{},className:"",buttonClassName:"",popoverClassName:"",buttonSize:"xl",toggleCallback:()=>{}};var u=d;t.default=u},71255:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(45697)),i=n(53556),s=l(n(94184)),o=l(n(4754));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.default.createElement(l,u({},e.buttonProps,{className:(0,s.default)(e.className,i),key:e.key,onClick:e.onClick}),e.content))))}render(){const{container:e,className:t,isOpen:n,placement:r,target:i,PopoverComponent:o}=this.props;return a.default.createElement(o,{className:(0,s.default)(t),container:e,hideArrow:!0,isOpen:n,onKeyDown:this.handleKeyDown,placement:r,target:i,toggle:this.handleToggle,trigger:"legacy"},this.renderSearchBox(),this.renderOptionButtons())}}c.propTypes={buttons:r.default.arrayOf(r.default.shape({key:r.default.string.isRequired,content:r.default.node.isRequired,onClick:r.default.func.isRequired,className:r.default.oneOfType([r.default.string,r.default.object,r.default.arrayOf(r.default.string)]),buttonProps:r.default.object})).isRequired,onSearch:r.default.func,container:r.default.oneOfType([r.default.string,r.default.elementType]),isOpen:r.default.bool.isRequired,placement:r.default.string,target:r.default.oneOfType([r.default.string,r.default.elementType]).isRequired,toggle:r.default.func.isRequired,searchPlaceholder:r.default.string,disableSearch:r.default.bool,ButtonComponent:r.default.oneOfType([r.default.object,r.default.func]),PopoverComponent:r.default.oneOfType([r.default.object,r.default.func]),className:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),searchClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),searchInputClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),clearButtonClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),buttonContainerClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),emptyResultClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object]),buttonClassName:r.default.oneOfType([r.default.string,r.default.array,r.default.object])},c.defaultProps={searchPlaceholder:o.default._t("PopoverOptionSet.SEARCH_PLACEHOLDER","Search"),onSearch:(e,t)=>t.filter((t=>{let{content:n}=t;return n.toLowerCase().includes(e.toLowerCase())})),disableSearch:!1,ButtonComponent:i.Button,PopoverComponent:i.Popover,className:"popover-option-set",searchClassName:"popover-option-set__search",searchInputClassName:"popover-option-set__search-input",clearButtonClassName:"popover-option-set__search-clear btn btn-link",buttonContainerClassName:"popover-option-set__button-container",emptyResultClassName:"popover-option-set__no-results",buttonClassName:"popover-option-set__button"};var f=c;t.default=f},3080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(4754)),i=d(n(94184)),s=n(54582),o=d(n(45697)),l=d(n(95393));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.Component{constructor(e){super(e),this.state={frameLoaded:!1},this.handleBackClick=this.handleBackClick.bind(this),this.setFrameLoaded=this.setFrameLoaded.bind(this)}componentDidUpdate(e){this.state.frameLoaded&&e.previewUrl!==this.props.previewUrl&&this.setFrameLoaded(!1)}setFrameLoaded(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState({frameLoaded:e})}handleBackClick(e){"function"==typeof this.props.onBack&&(e.preventDefault(),this.props.onBack(e))}buildToolbarButtons(){const e=[];if(this.props.itemLinks&&this.props.itemLinks.edit){const t=this.props.itemLinks.edit.href;e.push(a.default.createElement("a",{key:"edit",href:t,className:"btn btn-outline-secondary font-icon-edit"},a.default.createElement("span",{className:"btn__title"},r.default._t("Admin.EDIT","Edit"))))}return e}renderMoreActions(){return this.props.moreActions&&0!==this.props.moreActions.length?a.default.createElement(l.default,null,this.props.moreActions):null}renderBody(){let 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/")?a.default.createElement("div",{className:"preview__file-container panel--scrollable"},a.default.createElement("img",{alt:e,className:"preview__file--fits-space",src:e})):a.default.createElement("iframe",{style:{visibility:this.state.frameLoaded?"visible":"hidden"},className:"flexbox-area-grow preview__iframe",src:e,onLoad:this.setFrameLoaded}):a.default.createElement("div",{className:"preview__overlay"},a.default.createElement("h3",{className:"preview__overlay-text"},r.default._t("Admin.NO_ITEM_PREVIEW","There is no preview available for this item."))):a.default.createElement("div",{className:"preview__overlay"},a.default.createElement("h3",{className:"preview__overlay-text"},r.default._t("Admin.NO_PREVIEW","No preview available.")))}render(){const{className:e,ViewModeComponent:t}=this.props,n=(0,i.default)("preview",e);return a.default.createElement("div",{className:n},this.renderBody(),a.default.createElement("div",{className:"toolbar toolbar--south"},a.default.createElement("div",{className:"btn-toolbar"},this.buildToolbarButtons(),a.default.createElement(t,{id:"view-mode-toggle-in-preview-nb",area:"preview"}),this.renderMoreActions())))}}t.Component=c,c.propTypes={className:o.default.string,itemLinks:o.default.object,itemId:o.default.number,onBack:o.default.func,moreActions:o.default.arrayOf(o.default.element),ViewModeComponent:o.default.elementType},c.defaultProps={className:"flexbox-area-grow fill-height"};var f=(0,s.inject)(["ViewModeToggle"],(e=>({ViewModeComponent:e})),(()=>"Admin.Preview"))(c);t.default=f},72543:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(67294),r=s(n(91033)),i=s(n(45697));function s(e){return e&&e.__esModule?e:{default:e}}class o extends a.Component{constructor(e){super(e),this.render=this.render.bind(this),this.handleResize=this.handleResize.bind(this),this.state={},this.observer=new r.default((e=>e.forEach((e=>{let{contentRect:t}=e;return this.handleResize(t)}))))}componentDidMount(){this.observer.observe(this.container);const e={width:this.container.offsetWidth,height:this.container.offsetHeight};this.handleResize(e)}componentWillUnmount(){this.observer.disconnect()}handleResize(e){const{width:t,height:n}=this.state;t===e.width&&n===e.height||this.setState(e),this.props.onResize&&this.props.onResize(e)}render(){const{children:e,onlyEvent:t,component:n,onResize:r,widthPropName:i,heightPropName:s,...o}=this.props,{width:l,height:d}=this.state,u="string"!=typeof n,c={[[i||"width"]]:l,[[s||"height"]]:d};return(0,a.createElement)(n,{[u?"getRef":"ref"]:e=>{this.container=e},...u&&c,...o},"function"==typeof e?e({width:l,height:d}):a.Children.map(e,(e=>(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t?null:c):e)))}}o.propTypes={component:i.default.oneOfType([i.default.string,i.default.elementType]),onResize:i.default.func},o.defaultProps={component:"div"};var l=o;t.default=l},62266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0,t.hasFilters=E;var a=y(n(4754)),r=_(n(67294)),i=n(86706),s=n(14890),o=_(n(39042)),l=n(11962),d=n(35237),u=y(n(79298)),c=y(n(96869)),f=y(n(45697)),p=y(n(90161)),h=y(n(31824)),m=y(n(97019)),g=y(n(65693)),v=y(n(18992));function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(b=function(e){return e?n:t})(e)}function _(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=b(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function y(e){return e&&e.__esModule?e:{default:e}}function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t0}class T extends r.Component{constructor(e){super(e),this.expand=this.expand.bind(this),this.handleChange=this.handleChange.bind(this),this.getData=this.getData.bind(this),this.doSearch=this.doSearch.bind(this),this.focusInput=this.focusInput.bind(this),this.focusFirstFormField=this.focusFirstFormField.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.toggle=this.toggle.bind(this),this.open=this.open.bind(this),this.searchTermIsDirty=this.searchTermIsDirty.bind(this),this.clearFilters=this.clearFilters.bind(this),this.clearSearchBox=this.clearSearchBox.bind(this),this.clearFormFilter=this.clearFormFilter.bind(this),this.focusFormFilter=this.focusFormFilter.bind(this),this.formatTagData=this.formatTagData.bind(this);const t=e.term||e.filters&&e.filters[`${e.filterPrefix}${e.name}`]||"";this.state={display:e.display,searchText:t,initialSearchText:t}}componentDidMount(){this.setOverrides(this.props)}componentWillUnmount(){this.setOverrides()}setOverrides(e){if(e&&(!E(e.filters)||this.props.formSchemaUrl!==e.formSchemaUrl)){const t=e&&e.formSchemaUrl||this.props.formSchemaUrl;t&&this.props.actions.schema.setSchemaStateOverrides(t,null)}if(e&&E(e.filters)&&e.formSchemaUrl){const t=e.filters||{},n={fields:Object.keys(t).map((e=>({name:e,value:t[e]})))};this.props.actions.schema.setSchemaStateOverrides(e.formSchemaUrl,n)}}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{name:t,filterPrefix:n,formData:a}=this.props,{searchText:r}=this.state,i={};return Object.keys(a).forEach((e=>{const t=a[e];t&&(i[e]=t)})),!e&&r&&void 0===a[`${n}${t}`]&&(i[`${n}${t}`]=r.trim()),i}handleChange(e){const t=e.target.value;this.state.searchText!==t&&this.setState({searchText:t});const{schemaName:n,name:a,filterPrefix:r,actions:i,formData:s}=this.props;void 0!==s[`${r}${a}`]&&i.reduxForm.change(n,`${r}${a}`,t)}focusInput(){if(this.state.display===O.NONE)return;const e=this.nodeRef.container;if(!e)return;const t=e.querySelector(".search-box__content-field");t!==document.activeElement&&(t.focus(),t.select&&t.select())}focusFirstFormField(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input:not([type=hidden]), textarea, select, button";if(this.state.display!==O.EXPANDED)return;const t=this.nodeRef.container;if(!t)return;const n=t.querySelector(".search-form");if(!n)return;const a=n.querySelector(e);a&&(a.focus(),a.select&&a.select())}clearFormData(e){""!==this.state.searchText&&this.setState({searchText:""});const t=e&&e.formSchemaUrl||this.props.formSchemaUrl;if(t){const n=e&&e.identifier||this.props.identifier;this.props.actions.schema.setSchemaStateOverrides(t,{fields:[]}),this.props.actions.reduxForm.reset(n)}}clearFormFilter(e){const t=this.props.tagData[e],n={[e]:void 0},{schemaName:a,filters:r}=this.props;this.props.actions.reduxForm.change(a,e,""),this.setOverrides({...this.props,filters:{...r,[e]:void 0}}),Array.isArray(t.linkedFields)&&t.linkedFields.forEach((e=>{n[e]=void 0})),this.doSearch(n)}focusFormFilter(e){const t=this.props.tagData[e].focusSelector||`[name=${e}]`;this.expand(),setTimeout((()=>this.focusFirstFormField(t)),50)}open(){this.show(),this.focusInput()}hide(){this.clearSearchBox(),this.props.onHide?this.props.onHide():this.state.display!==O.NONE&&this.setState({display:O.NONE})}show(){this.state.display!==O.VISIBLE&&this.setState({display:O.VISIBLE});const{schemaName:e,formData:t,name:n,actions:a}=this.props;void 0!==t[n]&&a.reduxForm.change(e,n,this.state.searchText)}expand(){this.state.display!==O.EXPANDED&&this.setState({display:O.EXPANDED})}toggle(){switch(this.state.display){case O.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case O.EXPANDED:this.show()}}searchTermIsDirty(){const{searchText:e,initialSearchText:t}=this.state;return e.trim()!==t.trim()}doSearch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{name:t,filterPrefix:n}=this.props,a={},r=this.getData();Object.entries(r).forEach((i=>{let[s,o]=i,l=s,d=o;e.hasOwnProperty(s)&&(d=e[s]),n.length>0&&s.startsWith(n)&&(l=s.substring(n.length)),(!n.length>0||s!==t||void 0===r[`${n}${t}`])&&(a[l]=d)}));const i=a[t]||"";this.state.display===O.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:O.VISIBLE,initialSearchText:i,searchText:i}),this.props.onSearch(a)}clearFilters(){this.clearFormData(),this.focusFirstFormField()}clearSearchBox(){this.clearFormData(),this.focusInput()}formatTagData(){const{tagData:e,name:t,filterPrefix:n}=this.props,a=Object.assign({},e),r=`${n}${t}`;return a&&a[r]&&delete a[r],a?Object.values(a).map((e=>{let{key:t,label:n,value:a}=e;return{key:t,label:n,value:a}})):[]}render(){const{formSchemaUrl:e,forceFilters:t,id:n,displayBehavior:a,identifier:i,formIsDirty:s,tagData:o,name:l,...d}=this.props;if(this.state.display===O.NONE)return a===C.TOGGLABLE?r.default.createElement(g.default,{onToggle:this.show}):r.default.createElement("div",null);const u=`${n}_ExtraFields`,c=this.state.searchText,f=this.state.display===O.EXPANDED,v=this.state.display===O.VISIBLE,b=[C.HIDEABLE,C.TOGGLABLE].includes(a),_=s||this.searchTermIsDirty(),y=this.getData(),E=Object.keys(y).length>0;return r.default.createElement(p.default,{onClickOut:this.show,className:"search",ref:e=>{this.nodeRef=e}},r.default.createElement(h.default,w({},d,{name:`SearchBox__${l}`,onChange:this.handleChange,onSearch:this.doSearch,onToggleFilter:this.toggle,onHideFilter:this.show,onHide:this.hide,onClear:this.clearSearchBox,searchText:c,hideable:b,expanded:f,id:`${n}_searchbox`,showFilters:Boolean(t||e),dirty:_,clearable:E,onTagDelete:this.clearFormFilter,onTagClick:this.focusFormFilter,tagData:this.formatTagData()}),r.default.createElement(m.default,{id:u,identifier:i,visible:v,expanded:f,formSchemaUrl:e,onSearch:this.doSearch,onClear:this.clearFilters,clearable:E})))}}t.Component=T,T.propTypes={onSearch:f.default.func,onHide:f.default.func,id:f.default.string.isRequired,display:f.default.oneOf(Object.values(O)),formSchemaUrl:f.default.string,filters:f.default.object,formData:f.default.object,placeholder:f.default.string,displayBehavior:f.default.oneOf(Object.values(C)),term:f.default.string,name:f.default.string,filterPrefix:f.default.string,forceFilters:f.default.bool,formIsDirty:f.default.bool,identifier:f.default.string,schemaName:f.default.string,tagHandlers:f.default.object,borders:f.default.shape({top:f.default.bool,right:f.default.bool,bottom:f.default.bool,left:f.default.bool})},T.defaultProps={placeholder:a.default._t("Admin.SEARCH","Search"),display:O.VISIBLE,displayBehavior:C.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"};var S=(0,i.connect)((function(e,t){const n=e.form.formSchemas[t.formSchemaUrl];if(!n||!n.name)return{formData:{}};const a=n.name,r=(0,u.default)((0,c.default)(e),a),i=r&&r.values||{},s=(0,v.default)(n,t.filters,t.tagHandlers||{});return{formData:i,formIsDirty:(0,d.isDirty)(a,c.default)(e),schemaName:a,tagData:s}}),(function(e){return{actions:{schema:(0,s.bindActionCreators)(o,e),reduxForm:(0,s.bindActionCreators)({reset:l.reset,initialize:l.initialize,change:l.change},e)}}}))(T);t.default=S},31824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=f(n(4754)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=n(53556),s=f(n(94184)),o=f(n(97228)),l=f(n(72543)),d=f(n(45697)),u=f(n(43117));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function f(e){return e&&e.__esModule?e:{default:e}}class p extends r.Component{constructor(e){super(e),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.renderInput=this.renderInput.bind(this),this.renderFilterButton=this.renderFilterButton.bind(this),this.renderEnterHint=this.renderEnterHint.bind(this),this.renderHideButton=this.renderHideButton.bind(this),this.componentDidUpdate=this.componentDidUpdate.bind(this),this.onResize=this.onResize.bind(this),this.setWidth=this.setWidth.bind(this),this.renderTags=this.renderTags.bind(this),this.getComponentWidth=this.getComponentWidth.bind(this),this.calculateSpaceForTags=this.calculateSpaceForTags.bind(this),this.calculateInputLeftPadding=this.calculateInputLeftPadding.bind(this),this.calculateInputRightPadding=this.calculateInputRightPadding.bind(this),this.onTagListResize=this.onTagListResize.bind(this),this.focusOnLastTag=this.focusOnLastTag.bind(this),this.focusOnInput=this.focusOnInput.bind(this),this.state={hasFocus:!1,width:window.innerWidth-180-55,tagWidth:0}}componentDidUpdate(){const e=this.getComponentWidth();this.setWidth(e)}onResize(e){this.setWidth(e.width)}onTagListResize(e){const t=e.width;this.state.tagWidth!==t&&this.setState({tagWidth:t})}setWidth(e){this.state.width!==e&&this.setState({width:e})}getComponentWidth(){const e=this.nodeRef;return e?e.getBoundingClientRect().width:0}calculateInputLeftPadding(){const e=this.state.width>576?55:20;return this.state.tagWidth+e}calculateInputRightPadding(){return this.state.width<576?121:264}calculateSpaceForTags(){let e=this.state.width;e-=150,e=e-55-52;const{hideable:t,showFilters:n}=this.props;return t&&(e-=52),n&&(e-=52),e=Math.max(e,0),e}handleKeyDown(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())}handleFocus(){this.state.hasFocus||this.setState({hasFocus:!0}),this.props.onHideFilter&&this.props.onHideFilter()}handleBlur(){this.state.hasFocus&&this.setState({hasFocus:!1})}focusOnLastTag(){const e=this.nodeRef;if(!e)return;const t=e.querySelector(".compact-tag-list__visible .tag:last-child");t&&t.focus()}focusOnInput(){const e=this.nodeRef;if(!e)return;const t=e.querySelector("input");t&&t.focus()}renderInput(){const{id:e,searchText:t,onChange:n,placeholder:a,name:i,borders:o}=this.props,l={paddingLeft:`${this.calculateInputLeftPadding()}px`,paddingRight:`${this.calculateInputRightPadding()}px`},d=Object.assign({},p.defaultProps.borders,o),u="search-box__content-field",c=(0,s.default)("form-control",u,{[`${u}--top-border`]:d.top,[`${u}--right-border`]:d.right,[`${u}--bottom-border`]:d.bottom,[`${u}--left-border`]:d.left});return r.default.createElement("input",{"aria-labelledby":`${e}_label`,type:"search",name:i,placeholder:a,className:c,onKeyDown:this.handleKeyDown,onChange:n,onFocus:this.handleFocus,onBlur:this.handleBlur,value:t,id:e,autoFocus:!0,style:l})}renderTags(){const{tagData:e,onTagDelete:t,onTagClick:n,onToggleFilter:a}=this.props;return r.default.createElement("div",{className:"search-box__tags"},r.default.createElement(l.default,{onResize:this.onTagListResize},r.default.createElement(o.default,{onTagDelete:t,onTagClick:n,onHolderFocus:this.focusOnInput,tags:e,onSummary:a,maxSize:this.calculateSpaceForTags(),deletable:!0})))}renderEnterHint(){return r.default.createElement("div",{role:"presentation",className:"search-box__enter",onClick:e=>{e.stopPropagation(),e.preventDefault(),this.props.onSearch()}},a.default._t("Admin.ENTER","Enter")," ↵")}renderFilterButton(){const{expanded:e,onToggleFilter:t,formId:n}=this.props,o=(0,s.default)("btn--icon","font-icon-caret-down-two","search-box__filter-trigger",this.state.width<576?"search-box--no-label":"",{collapsed:!e}),l=this.state.width<576?"sr-only":"";return r.default.createElement(i.Button,{"aria-expanded":e,"aria-controls":n,"aria-label":a.default._t("Admin.ADVANCED","Advanced"),onClick:t,className:o,title:a.default._t("Admin.ADVANCED","Advanced")},r.default.createElement("span",{className:l},"Search options"))}renderHideButton(){const{id:e,onHide:t}=this.props;return r.default.createElement(i.Button,{onClick:t,title:a.default._t("Admin.CLOSE","Close"),"aria-label":a.default._t("Admin.CLOSE","Close"),className:"font-icon-cancel btn--no-text btn--icon-lg search-box__cancel","aria-controls":e,"aria-expanded":"true"})}render(){const{children:e,id:t,hideable:n,expanded:o,showFilters:d,dirty:u,clearable:c}=this.props,f=(0,s.default)("search-box",{"search-box--hideable":n,"search-box--not-hideable":!n,"search-box--has-focus":this.state.hasFocus,"search-box--has-not-focus":!this.state.hasFocus,"search-box--has-filters":d,"search-box--has-not-filters":!d,"search-box--compact":this.state.width<576,"search-box--expanded":o}),p=(u||!c)&&this.state.hasFocus;return r.default.createElement("div",{className:f,ref:e=>{this.nodeRef=e}},r.default.createElement(l.default,{onResize:this.onResize},r.default.createElement("div",{className:"search-box__group"},r.default.createElement(i.Label,{for:t,id:`${t}_label`,hidden:!0},a.default._t("Admin.SEARCH","Search")),this.renderTags(),this.renderInput(),p&&this.renderEnterHint(),e,r.default.createElement("div",{className:"icon font-icon-search"}),d&&this.renderFilterButton(),n&&this.renderHideButton())))}}t.Component=p,p.propTypes={onSearch:d.default.func,onToggleFilter:d.default.func,onHideFilter:d.default.func,onChange:d.default.func,onHide:d.default.func,onTagDelete:d.default.func,onTagClick:d.default.func,placeholder:d.default.string,expanded:d.default.bool,formId:d.default.string,id:d.default.string,searchText:d.default.string,hideable:d.default.bool,showFilters:d.default.bool,name:d.default.string,dirty:d.default.bool,clearable:d.default.bool,tagData:d.default.arrayOf(u.default)},p.defaultProps={placeholder:a.default._t("Admin.SEARCH","Search"),tagData:[],filters:{},formData:{},term:"",borders:{top:!1,right:!1,bottom:!0,left:!0}};var h=p;t.default=h},97019:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=c,t.default=void 0;var a=l(n(4754)),r=l(n(67294)),i=l(n(16304)),s=n(53556),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=a.default._t("Admin.SEARCH","Search"),u=a.default._t("Admin.CLEAR","Clear");function c(e){let{visible:t,expanded:n,onSearch:a,onClear:o,formSchemaUrl:l,id:c,identifier:f,clearable:p}=e;const h=(m=a,e=>{"Enter"===e.key&&(e.preventDefault(),m())});var m;const g=t||n;return r.default.createElement(s.Collapse,{id:c,isOpen:n,className:"search-form"},r.default.createElement("div",{className:"search-form__wrapper",onKeyDown:h},g&&l&&r.default.createElement(i.default,{className:"no-change-track",formTag:"div",identifier:f,schemaUrl:l,onSubmit:()=>(a(),Promise.resolve())}),r.default.createElement(s.Button,{className:"search-form__submit",onClick:()=>a(),color:"primary",type:"button"},d),p&&r.default.createElement(s.Button,{className:"search-form__clear",onClick:()=>o()},u)))}c.propTypes={onSearch:o.default.func,onClear:o.default.func,visible:o.default.bool,expanded:o.default.bool,id:o.default.string.isRequired,formSchemaUrl:o.default.string,identifier:o.default.string,clearable:o.default.bool},c.defaultProps={formData:{}};var f=c;t.default=f},65693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=l(n(4754)),r=l(n(67294)),i=n(53556),s=l(n(94184)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=a.default._t("Admin.SHOW_SEARCH","Show search"),u=e=>(0,s.default)("btn--no-text","search-toggle","font-icon-search","btn--icon-lg",{"search-toggle__active":e}),c=e=>{let{onToggle:t,toggled:n}=e;return r.default.createElement(i.Button,{title:d,onClick:t,className:u(n)},r.default.createElement("span",{className:"sr-only"},d))};t.Component=c,c.propTypes={onToggle:o.default.func,toggled:o.default.bool};var f=c;t.default=f},47465:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(58592))&&a.__esModule?a:{default:a};const i=(e,t,n)=>{if(!Array.isArray(t)||0===t.length)return!1;const a=n.state.fields.find((t=>{let{name:n}=t;return n===e}));if(a&&a.source){return t.map((e=>{const t=a.source.find((t=>{let{value:n}=t;return n.toString()===e.toString()}));return t&&t.title?t.title:e})).join(", ")||!1}return!1};var s={Date:(0,r.default)("ll"),Time:(0,r.default)("LT"),Datetime:(0,r.default)("lll"),Hidden:()=>!1,SingleSelect:(e,t,n)=>{if(void 0===e.value)return!1;const a=i(e.key,[e.value],n);return!!a&&Object.assign({},e,{value:a})},Boolean:e=>{if(e.value){const{value:t,...n}=e;return n}return!1},MultiSelect:(e,t,n)=>{const a=i(e.key,e.value,n);return!!a&&Object.assign({},e,{value:a})},default:e=>!!e.value&&e};t.default=s},58592:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(30381))&&a.__esModule?a:{default:a};var i=e=>(t,n)=>{let{lang:a}=n;if(!t.value)return!1;if(t.value&&a){r.default.locale(a);const n=(0,r.default)(t.value);if(n.isValid())return Object.assign({},t,{value:n.format(e)})}return t};t.default=i},18992:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(47465))&&a.__esModule?a:{default:a};const i=(e,t)=>{let{key:n,value:a,label:r}=t;return`${e}${r.toLowerCase()||n} ${a||""} `};var s=function(e,t){let n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.metadata.loading)return{};const s=a=>{const r={key:a.name,label:a.title,value:t[a.name]};let i;return i="function"==typeof n[`#${r.key}`]?n[`#${r.key}`]:"function"==typeof n[a.schemaType]?n[a.schemaType]:n.default,i(r,a,e,t)};n=Object.assign({},r.default,{Structural:(e,t)=>{const{children:n}=t;if(!Array.isArray(n)||0===n.length)return!1;const a=n.map(s).filter((e=>!1!==e)).reduce(i,"").trim(),r=n.map((e=>e.name)),o=`[name=${n[0].name}]`;return!!a&&Object.assign({},e,{value:a,linkedFields:r,focusSelector:o})}},a);const o=e.schema.fields.map(s).filter((e=>!1!==e)),l={};return o.forEach((e=>{l[e.key]=e})),l};t.default=s},63980:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=l(n(98028)),i=l(n(4754)),s=n(53556),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;te.value===this.props.value));return e="string"==typeof e?e:this.props.value||"",a.default.createElement(s.Input,u({plaintext:!0},this.getInputProps(),{tag:"p"}),e)}getSelectField(){const e=this.props.source?this.props.source.slice():[];return this.props.data.hasEmptyDefault&&!e.find((e=>!e.value))&&e.unshift({value:"",title:this.props.data.emptyString,disabled:!1}),a.default.createElement(s.Input,u({type:"select"},this.getInputProps()),e.map(((e,t)=>{const n=`${this.props.name}-${e.value||`empty${t}`}`,r=e.description||null;return a.default.createElement("option",{key:n,value:e.value,disabled:e.disabled,title:r},e.title)})))}getInputProps(){const e={className:`${this.props.className} ${this.props.extraClass} no-chosen`,id:this.props.id,name:this.props.name,disabled:this.props.disabled};return this.props.readOnly||Object.assign(e,{onChange:this.handleChange,value:this.props.value||""}),e}handleChange(e){"function"==typeof this.props.onChange&&this.props.onChange(e,{id:this.props.id,value:e.target.value})}render(){let e=null;return e=this.props.readOnly?this.getReadonlyField():this.getSelectField(),e}}t.Component=c,c.propTypes={id:o.default.string,name:o.default.string.isRequired,onChange:o.default.func,value:o.default.oneOfType([o.default.string,o.default.number]),readOnly:o.default.bool,disabled:o.default.bool,source:o.default.arrayOf(o.default.shape({value:o.default.oneOfType([o.default.string,o.default.number]),title:o.default.oneOfType([o.default.string,o.default.number]),description:o.default.string,disabled:o.default.bool})),data:o.default.oneOfType([o.default.array,o.default.shape({hasEmptyDefault:o.default.bool,emptyString:o.default.oneOfType([o.default.string,o.default.number])})])},c.defaultProps={source:[],extraClass:"",className:"",data:{emptyString:i.default._t("Boolean.ANY","Any")}};var f=(0,r.default)(c);t.default=f},10202:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=n(53556),i=o(n(94184)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){let{title:t,disabled:n,active:s,tabClassName:o,onToggle:l}=e;if(!t)return null;const d=(0,i.default)(o,{active:s});return a.default.createElement(r.NavItem,null,a.default.createElement(r.NavLink,{onClick:l,disabled:n,className:d},t))}l.propTypes={title:s.default.string,disabled:s.default.bool,active:s.default.bool,tabClassName:s.default.string,onToggle:s.default.func.isRequired},l.defaultProps={disabled:!1,active:!1};var d=l;t.default=d},40505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=u(n(67294)),r=n(53556),i=l(n(45697)),s=u(n(93390)),o=l(n(94184));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function c(e){let{name:t,className:n,extraClass:i,disabled:l,children:d}=e;const{activeTab:u,isOnActiveTab:c}=(0,s.default)(),f=t,p=(0,a.useMemo)((()=>({activeTab:u,currentTab:f,isOnActiveTab:!1!==c&&u===t})),[u,f,c]);return a.default.createElement(s.TabContext.Provider,{value:p},a.default.createElement(r.TabPane,{tabId:t,className:(0,o.default)(n,i),disabled:l},a.default.createElement(r.Fade,{in:c},d)))}c.propTypes={name:i.default.string.isRequired,extraClass:i.default.string,className:i.default.string,disabled:i.default.bool};var f=c;t.default=f},96870:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=n(53556),i=o(n(45697)),s=o(n(10202));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{props:n}=e;return a.default.createElement(s.default,l({},n,{onToggle:()=>t!==n.name&&i(n.name),active:t===n.name}))}));return o&&o.length>1?a.default.createElement(r.Nav,{tabs:!0,role:"tablist"},o):null}d.propTypes={currentTab:i.default.string,onToggle:i.default.func.isRequired};var u=d;t.default=u},61404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=m,t.default=void 0;var a=h(n(67294)),r=n(53556),i=f(n(94184)),s=f(n(45697)),o=n(86706),l=h(n(53104)),d=h(n(93390)),u=f(n(96870)),c=f(n(56204));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function m(e){let{hideNav:t,children:n,activeTab:s,className:o,extraClass:l,id:f,activateTab:p,defaultActiveKey:h}=e;const m={className:(0,i.default)([o,l]),id:f},g=s||(0,c.default)(h,n),v=(0,d.default)(),b=v?v.isOnActiveTab:void 0,_=(0,a.useMemo)((()=>({activeTab:g,isOnActiveTab:b})),[s,b]);return a.default.createElement("div",m,a.default.createElement("div",{className:"wrapper"},!t&&a.default.createElement(u.default,{currentTab:g,onToggle:p},n),a.default.createElement(r.TabContent,{activeTab:g},a.default.createElement(d.TabContext.Provider,{value:_},n))))}m.propTypes={id:s.default.string.isRequired,defaultActiveKey:s.default.string,extraClass:s.default.string,hideNav:s.default.bool,activateTab:s.default.func,activeTab:s.default.string},m.defaultProps={className:"",extraClass:"",hideNav:!1};const g=e=>`${e.formid}__${e.id}`;var v=(0,o.connect)((function(e,t){const n=g(t);return{...e.tabs.fields[n]?e.tabs.fields[n]:{activeTab:null}}}),(function(e,t){const n=g(t);return{activateTab(t){e(l.activateTab(n,t))}}}))(m);t.default=v},56204:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const n=a.Children.toArray(t);if(!n||0===n.length)return"";let r;"string"==typeof e&&(r=n.find((t=>{let{props:{name:n}}=t;return n===e})));r||(r=n[0]);return r.props.name};var a=n(67294)},97228:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(97023)),i=d(n(72543)),s=d(n(94184)),o=d(n(45697)),l=d(n(53621));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t({showSummaryView:t})))}render(){const{maxSize:e,onSummary:t,...n}=this.props,o=this.state.showSummaryView,d=this.props.tags.length,u=(0,s.default)("compact-tag-list",{"compact-tag-list__show-summary-view":o});return a.default.createElement("div",{className:u,ref:e=>{this.nodeRef=e}},a.default.createElement(i.default,{onResize:this.onResize,className:"compact-tag-list__placeholder","aria-hidden":!0},a.default.createElement(r.default,c({},n,{focusable:!1}))),a.default.createElement("div",{className:"compact-tag-list__visible"},o?a.default.createElement(l.default,{count:d,onClick:t,onNext:n.onHolderFocus}):a.default.createElement(r.default,n)))}}f.propTypes=Object.assign({},r.default.propTypes,{maxSize:o.default.number,onSummary:o.default.func}),f.defaultProps={maxSize:0,onSummary:()=>{}};var p=f;t.default=p},53621:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(67294)),r=o(n(85362)),i=o(n(4754)),s=o(n(45697));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{label:t,count:n,...i}=e;return a.default.createElement(r.default,l({},i,{deletable:!1,title:`${n} ${t}`}),n," ",a.default.createElement("span",{className:"font-icon-sliders","aria-label":t}))};d.propTypes=Object.assign({},r.default.propTypes,{label:s.default.string,count:s.default.number}),d.defaultProps={label:i.default._t("Admin.SUMMARY_TAG_LABEL","filters")};var u=d;t.default=u},85362:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=n(53556),i=l(n(94184)),s=l(n(4754)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onClick:t,onDelete:n,onDeleteKey:s,onBackSpace:o,onPrevious:l,onNext:u,deletable:c,dataKey:p,label:h,value:m,children:g,focusable:v,...b}=e;const _=((e,t,n)=>(t||e)+(n?`: ${n}`:""))(p,h,m);return a.default.createElement(r.Button,d({},b,{role:"button",className:(0,i.default)("tag-component","btn-sm",{"tag-component--deletable":c}),onClick:e=>{e.preventDefault(),t(p)},tabIndex:v?0:void 0,onKeyDown:e=>{((e,t,n,a,r,i)=>{switch(e.key){case"Backspace":e.preventDefault(),a(t);break;case"Delete":e.preventDefault(),n(t);break;case"ArrowLeft":e.preventDefault(),r(t);break;case"ArrowRight":e.preventDefault(),i(t)}})(e,p,s,o,l,u)},title:_}),c&&a.default.createElement(f,{onDelete:n,dataKey:p}),g||_)},c=e=>{e.target.parentElement.focus()},f=e=>{let{dataKey:t,onDelete:n}=e;return a.default.createElement(r.Button,{onClick:e=>{e.stopPropagation(),e.preventDefault(),n(t)},"aria-label":s.default._t("Admin.REMOVE_TAG","Remove Tag"),title:s.default._t("Admin.REMOVE_TAG","Remove Tag"),onFocus:c,tabIndex:-1,className:"tag-component__delete font-icon-cancel btn--no-text btn--icon-sm"})};u.propTypes={onClick:o.default.func,onDelete:o.default.func,onDeleteKey:o.default.func,onBackSpace:o.default.func,onPrevious:o.default.func,onNext:o.default.func,deletable:o.default.bool,dataKey:o.default.string,label:o.default.string,value:o.default.string,focusable:o.default.bool},u.defaultProps={tag:"span",deletable:!1,onClick:()=>{},onDelete:()=>{},onDeleteKey:()=>{},onBackSpace:()=>{},onPrevious:()=>{},onNext:()=>{},focusable:!0};var p=u;t.default=p},97023:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(67294)),r=o(n(85362)),i=o(n(45697)),s=o(n(43117));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=document.activeElement[e?"nextElementSibling":"previousElementSibling"];return!!t&&(t.focus(),!0)},c=e=>{let{tags:t,deletable:n,focusable:i,onTagDelete:s,onTagClick:o,onHolderFocus:c}=e;const f=e=>{u(d)||c(),s(e)},p=e=>{u(false)||u(d)||c(),s(e)};return a.default.createElement("ul",{className:"tag-list"},t.map((e=>a.default.createElement(r.default,l({},e,{tag:"li",deletable:n,dataKey:e.key,focusable:i,onDelete:s,onDeleteKey:n&&s?f:void 0,onBackSpace:n&&s?p:void 0,onNext:()=>{u(d)||c()},onPrevious:()=>{u(false)},onClick:o})))))};t.Component=c,c.propTypes={onTagClick:i.default.func,onTagDelete:i.default.func,onHolderFocus:i.default.func,deletable:i.default.bool,tags:i.default.arrayOf(s.default),focusable:i.default.bool},c.defaultProps={deletable:!1,focusable:!0,onTagDelete:()=>{},onTagClick:()=>{},onHolderFocus:()=>{}};var f=c;t.default=f},43117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(45697))&&a.__esModule?a:{default:a};var i=r.default.shape({key:r.default.string.isRequired,label:r.default.string,value:r.default.string});t.default=i},74898:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(98028)),r=i(n(16725));function i(e){return e&&e.__esModule?e:{default:e}}class s extends r.default{getInputProps(){const e=super.getInputProps();return this.isMultiline()&&Object.assign(e,{type:"textarea",rows:this.props.data.rows,cols:this.props.data.columns}),e}isMultiline(){return this.props.data&&this.props.data.rows>1}}t.Component=s;var o=(0,a.default)(s);t.default=o},63182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(98028)),r=d(n(30381)),i=d(n(68300)),s=d(n(4754)),o=d(n(45697)),l=n(81463);function d(e){return e&&e.__esModule?e:{default:e}}const u="LT";class c extends l.Component{getInputProps(){const e=s.default.inject(s.default._t("Admin.FormatExample","Example: {format}"),{format:(0,r.default)().endOf("month").format(u)}),t=this.asHTML5()?"time":"text";return{...super.getInputProps(),type:t,placeholder:e}}isMultiline(){return!1}hasNativeSupport(){return this.props.modernizr.inputtypes.time}convertToLocalised(e){let t="";if(e){const n=(0,r.default)(e,"HH:mm:ss");n.isValid()&&(t=n.format(u))}return t}convertToIso(e){let t="";if(e){const n=(0,r.default)(e,u);n.isValid()&&(t=n.format("HH:mm:ss"))}return t}}t.Component=c,c.propTypes={lang:o.default.string,modernizr:o.default.object,data:o.default.shape({html5:o.default.bool})},c.defaultProps={modernizr:i.default,data:{}};var f=(0,a.default)(c);t.default=f},20164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tipShape=t.default=t.TIP_TYPES=t.TIP_IMPORTANCE_LEVELS=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(45697)),i=n(53556),s=d(n(4754)),o=d(n(94184)),l=d(n(22602));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}const c={TITLE:"title",INPUT_GROUP:"input-group"};t.TIP_TYPES=c;const f={NORMAL:"normal",HIGH:"high"};t.TIP_IMPORTANCE_LEVELS=f;const p={[f.NORMAL]:{iconColor:"muted",description:s.default._t("Admin.NORMAL_TIP","Tip")},[f.HIGH]:{iconColor:"danger",description:s.default._t("Admin.IMPORTANT_TIP","Important tip")}};function h(e){const{content:t,fieldTitle:n,icon:r,id:d,importance:u}=e,{iconColor:f,description:h}=p[u],m=s.default.inject(s.default._t("Admin.TIP_LABEL","{description} for {fieldTitle}"),{description:h,fieldTitle:n}),g=["tip",e.extraClass];e.type===c.TITLE?g.push("tip--title"):e.type===c.INPUT_GROUP&&g.push("tip--input-group","btn--last","btn-outline-secondary",`text-${f}`);const v=`${d}-tip`,b={id:v,onClick:()=>{},className:(0,o.default)(g),noText:!0,icon:r};return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.default,b,m),a.default.createElement(i.UncontrolledPopover,{trigger:"legacy",placement:"top-end",target:v},a.default.createElement(i.PopoverBody,null,t)))}const m={content:r.default.string.isRequired,importance:r.default.oneOf(Object.values(f)),type:r.default.oneOf(Object.values(c)),icon:r.default.string};t.tipShape=m,h.propTypes={...m,extraClass:r.default.string,fieldTitle:r.default.string.isRequired,id:r.default.string.isRequired},h.defaultProps={importance:f.NORMAL,icon:"lamp",type:c.INPUT_GROUP};var g=h;t.default=g},87890:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toastShape=t.default=void 0;var a=u(n(67294)),r=u(n(45697)),i=u(n(4754)),s=n(53556),o=u(n(94184)),l=u(n(22602)),d=n(46735);function u(e){return e&&e.__esModule?e:{default:e}}const c={text:r.default.string.isRequired,dismissed:r.default.bool.isRequired,type:r.default.string.isRequired,actions:r.default.arrayOf(r.default.shape(l.default.propTypes))};t.toastShape=c;const f=e=>{let{type:t,text:n,onDismiss:r,dismissed:u,actions:c}=e;const f=(0,o.default)("toast",`toast--${t}`,{"toast--dismissing":u});return a.default.createElement(s.Toast,{className:f,isOpen:!0},a.default.createElement(s.ToastBody,{className:"toast__body"},a.default.createElement(l.default,{className:"toast__close",icon:"cancel",noText:!0,onClick:e=>{e.preventDefault(),r()},color:"none"},i.default._t("Admin.DISMISS","Dismiss")),a.default.createElement("div",{className:"toast__content",role:"alert","aria-live":"assertive","aria-atomic":"true"},n)),c.length>0&&a.default.createElement(d.ToastActions,{actions:c,onDismiss:r,dismissed:u}))};f.propTypes={...c,onDismiss:r.default.func.isRequired},f.defaultProps={actions:[]};var p=f;t.default=p},46735:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ToastActions=t.ToastAction=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(22602));function s(e){return e&&e.__esModule?e:{default:e}}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{label:t,href:n,onClick:r,dismissed:s,onDismiss:l}=e;const d=n?{href:n,tag:"a"}:{onClick:e=>{e.preventDefault(),s||(r&&r(),l())}};return a.default.createElement(i.default,o({color:"link",className:"toast__action"},d),t)};t.ToastAction=l;const d=e=>{let{actions:t,dismissed:n,onDismiss:r}=e;return 0===t.length?null:a.default.createElement("div",{className:"toast__actions"},t.slice(0,2).map(((e,t)=>a.default.createElement(l,o({key:t},e,{onDismiss:r,dismissed:n})))))};t.ToastActions=d,d.propTypes={dismissed:r.default.bool.isRequired,actions:r.default.arrayOf(r.default.shape({label:r.default.string.isRequired,href:r.default.string,onClick:r.default.func})),onDismiss:r.default.func.isRequired},d.defaultProps={actions:[]};var u=d;t.default=u},60452:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=s(n(45697)),i=s(n(87890));function s(e){return e&&e.__esModule?e:{default:e}}function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{toasts:t,onDismiss:n,onPause:r,onResume:s}=e;const[o,d]=(0,a.useState)(void 0),u=e=>()=>{o&&clearTimeout(o),d(setTimeout(e,100))},c=u(r),f=u(s),p={onMouseEnter:c,onFocus:c,onMouseLeave:f,onBlur:f};return a.default.createElement("div",l({className:"toasts","aria-live":"polite","aria-atomic":"true"},p),a.default.createElement("div",{className:"toasts__wrapper"},t.map((e=>{let{id:t,...r}=e;return a.default.createElement(i.default,l({key:t},r,{onDismiss:()=>n(t)}))}))))};d.propTypes={toasts:r.default.arrayOf(r.default.shape(i.default.propTypes)).isRequired,onDismiss:r.default.func.isRequired,onPause:r.default.func.isRequired,onResume:r.default.func.isRequired},d.defaultProps={};var u=d;t.default=u},53330:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(45697)),i=s(n(45332));function s(e){return e&&e.__esModule?e:{default:e}}const o=e=>{let{showBackButton:t,children:n,onBackButtonClick:r}=e;return a.default.createElement("div",{className:"toolbar toolbar--north"},a.default.createElement("div",{className:"toolbar__navigation fill-width"},t&&a.default.createElement(i.default,{onClick:e=>{e.preventDefault(),"function"==typeof r&&r(e)},className:"toolbar__back-button"}),n))};o.propTypes={onBackButtonClick:r.default.func,showBackButton:r.default.bool},o.defaultProps={showBackButton:!1};var l=o;t.default=l},59888:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SINGLE_EMPTY_VALUE=t.MULTI_EMPTY_VALUE=t.ConnectedTreeDropdownField=t.Component=void 0,Object.defineProperty(t,"findTreeByID",{enumerable:!0,get:function(){return b.findTreeByID}}),Object.defineProperty(t,"findTreeByPath",{enumerable:!0,get:function(){return b.findTreeByPath}}),Object.defineProperty(t,"findTreePath",{enumerable:!0,get:function(){return b.findTreePath}});var a=w(n(67294)),r=_(n(45697)),i=n(86706),s=n(14890),o=_(n(10932)),l=_(n(25114)),d=_(n(4754)),u=_(n(98028)),c=_(n(94301)),f=w(n(14504)),p=w(n(25548)),h=_(n(98268)),m=_(n(8575)),g=n(53556),v=n(10259),b=n(11355);function _(e){return e&&e.__esModule?e:{default:e}}function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t}=e;return a.default.createElement("span",{className:"treedropdownfield__option-title--highlighted"},t)};class T extends a.Component{constructor(e){super(e),this.render=this.render.bind(this),this.renderInput=this.renderInput.bind(this),this.renderMenuList=this.renderMenuList.bind(this),this.renderOption=this.renderOption.bind(this),this.formatOptionLabel=this.formatOptionLabel.bind(this),this.getBreadcrumbs=this.getBreadcrumbs.bind(this),this.getDropdownOptions=this.getDropdownOptions.bind(this),this.getVisibleTree=this.getVisibleTree.bind(this),this.handleBack=this.handleBack.bind(this),this.handleChange=this.handleChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNavigate=this.handleNavigate.bind(this),this.handleSearchChange=this.handleSearchChange.bind(this),this.handleSearchReset=this.handleSearchReset.bind(this),this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.callFetch=this.callFetch.bind(this),this.lazyLoad=this.lazyLoad.bind(this),this.filterOption=this.filterOption.bind(this),this.noOptionsMessage=this.noOptionsMessage.bind(this),this.state={opened:!1},this.searchTimer=null}componentDidMount(){this.props.readOnly||this.props.disabled||this.initialise();const e=this.props.id,t=(this.props.data.multiple?this.props.data.valueObjects||[]:[this.props.data.valueObject]).filter((e=>e));t.length&&this.props.actions.treeDropdownField.addSelectedValues(e,t)}componentDidUpdate(e){if(this.props.readOnly||this.props.disabled)return;let t=!1,n=[];this.props.search!==e.search&&(t=!0,n=this.props.visible),e.data.urlTree!==this.props.data.urlTree&&(t=!0),e.data.cacheKey!==this.props.data.cacheKey&&(t=!0),t&&this.loadTree(n,this.props.search,this.props)}getVisibleTree(){return this.props.findTreeByPath(this.props.tree,this.props.visible)}getBreadcrumbs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.visible;const t=[];if(!e)return t;let n=this.props.tree;for(const a of e){if(!n.children)break;if(n=n.children.find((e=>e.id===a)),!n)break;t.push(n)}return t}getDropdownOptions(){const e=this.props.value,t=this.getVisibleTree();let n=t?[...t.children]:[];const a=this.props.selectedValues.filter((t=>t.id===e||Array.isArray(e)&&e.find((e=>e===t.id))));return!this.state.opened&&this.props.data.showSelectedPath?n=a.map((e=>({...e,title:e.titlePath||e.title}))):a.length&&(n=[...a.filter((e=>!n.find((t=>t.id===e.id)))),...n]),n.unshift({id:this.props.data.multiple?"":0,title:this.props.data.hasEmptyDefault?this.props.data.emptyString:null,disabled:!n.length||!this.props.data.hasEmptyDefault}),n}getPath(e){const t=this.props.findTreePath(this.props.tree,e,this.props.data.treeBaseId);return this.getBreadcrumbs(t).reduce(((e,t)=>`${e}${t.contextString||""}${t.title}/`),"")}initialise(){return this.loadTree([],this.props.search).then((e=>{let t=[];!this.props.data.multiple&&this.props.value&&(t=this.props.findTreePath(e,this.props.value,this.props.data.treeBaseId),t?t.pop():t=[]),this.props.actions.treeDropdownField.setVisible(this.props.id,t)}))}callFetch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props;const a=m.default.parse(n.data.urlTree,!0);n.data.showSearch&&t.length&&(a.query.search=t,a.query.flatList="1"),e.length?a.query.ID=e[e.length-1]:!n.data.multiple&&n.value&&(a.query.forceValue=n.value),a.query.format="json",a.search=null;const r=m.default.format(a);return this.props.fetch(r,{credentials:"same-origin"}).then((e=>e.json()))}lazyLoad(e){if(e.find((e=>this.props.loading.indexOf(e)>-1||this.props.failed.indexOf(e)>-1)))return Promise.resolve({});const t=this.props.findTreeByPath(this.props.tree,e);return t&&(0===t.count||t.children.length)?Promise.resolve({}):this.loadTree(e)}loadTree(e){let 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((t=>(n.actions.treeDropdownField.updateTree(n.id,e,t),t))).catch((t=>{if(n.actions.treeDropdownField.updateTreeFailed(n.id,e),"function"==typeof n.onLoadingError)return n.onLoadingError({errors:[{value:t.message,type:"error"}]});throw t}))}hasSearch(){return this.props.data.showSearch&&Boolean(this.props.search)}filterOption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=this.getVisibleTree();if((0===e.value||""===e.value)&&(!this.props.data.hasEmptyDefault||this.props.visible.length||this.hasSearch()))return!1;const a=e.label&&e.label.toLocaleLowerCase(),r=t.toLocaleLowerCase();return r?a&&a.includes(r):!n||!e.value||n.children.find((t=>t.id===e.value))}handleOpen(){this.setState({opened:!0}),this.handleSearchReset()}handleClose(){this.setState({opened:!1})}handleSearchReset(){clearTimeout(this.searchTimer),this.props.actions.treeDropdownField.setSearch(this.props.id,"")}handleSearchChange(e){clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.props.actions.treeDropdownField.setSearch(this.props.id,e)}),500)}handleChange(e){let t=null;if(this.handleSearchReset(),this.props.data.multiple){if(t=C,e&&e.length){const n=e&&e.filter(((t,n)=>e.findIndex((e=>e.id===t.id))===n));t=n.map((e=>e.id)),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,n)}}else{const n=e?e.id:null;let a=(this.getVisibleTree()||this.props.tree).children.find((e=>e.id===n));a&&(this.props.data.showSelectedPath&&(a={...a,titlePath:this.getPath(n)}),this.props.actions.treeDropdownField.addSelectedValues(this.props.id,[a])),t=n||0}"function"==typeof this.props.onChange&&this.props.onChange(t)}handleNavigate(e,t){if(this.hasSearch())return;e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),e.preventDefault();let 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)}handleKeyDown(e){if(this.hasSearch())return void(27===e.keyCode&&this.handleSearchReset(e));const t=this.selectField.state.focusedOption;if(t)switch(e.keyCode){case 37:this.handleBack(e);break;case 39:t.count&&this.handleNavigate(e,t.id)}}handleBack(e){if(this.hasSearch())return;e.stopPropagation(),e.preventDefault();let 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)}renderInput(e){let{children:t,...n}=e;return n.id=this.props.id,a.default.createElement(f.components.Input,n,t)}renderBreadcrumbs(e,t){let{cx:n,getStyles:r,getClassNames:i,...s}=t;if(0===e.length)return null;e=e.map((e=>e.title)).join(" / ");const l=this.hasSearch()?"font-icon-search":"font-icon-left-open-big",d=n({option:!0,breadcrumbs:!0},i("option",{})),u=o.default.div(r("option",s));return a.default.createElement(u,{className:d,onClick:this.handleBack,role:"button",tabIndex:0},a.default.createElement("button",{type:"button",className:"treedropdownfield__breadcrumbs-button"},a.default.createElement("span",{className:`icon ${l}`})),a.default.createElement("span",{className:"treedropdownfield__breadcrumbs-crumbs flexbox-area-grow"},e))}renderMenuList(e){let{children:t,...n}=e;const r=this.getBreadcrumbs();return a.default.createElement(f.components.MenuList,n,this.renderBreadcrumbs(r,n),t)}renderOption(e){let{children:t,...n}=e,r=null;const i=n.data;if(i.count&&!this.hasSearch()){const e=e=>this.handleNavigate(e,i.id);r=a.default.createElement("button",{type:"button",className:"treedropdownfield__option-button fill-width",onClick:e,onMouseDown:e,onTouchStart:e},a.default.createElement("span",{className:"treedropdownfield__option-count-icon font-icon-right-open-big"}))}let s=null;return this.hasSearch()&&(s=i.contextString,s||!this.props.data.hasEmptyDefault||this.props.visible.length||(s=this.props.data.emptyString)),a.default.createElement(f.components.Option,n,a.default.createElement("span",{className:"treedropdownfield__option-title-box flexbox-area-grow fill-height"},a.default.createElement("span",{className:"treedropdownfield__option-title"},t),s&&a.default.createElement("span",{className:"treedropdownfield__option-context"},s)),r)}renderReadOnly(){const e={id:this.props.id,readOnly:this.props.readOnly,disabled:this.props.disabled},t=this.props.extraClass?`treedropdownfield ${this.props.extraClass}`:"treedropdownfield";let n=this.props.data.hasEmptyDefault?this.props.data.emptyString:"";const r=this.props.selectedValues;if(this.props.data.multiple){n=this.props.value.map((e=>r.find((t=>t.id===e))||e)).map((e=>e.title)).join(", ")}else{const e=r.find((e=>e.id===this.props.value));n=this.props.value,e&&"string"==typeof e.title&&(n=e.title)}return a.default.createElement("div",{className:t},a.default.createElement("span",{className:"treedropdownfield__title"},n),a.default.createElement(g.Input,O({type:"hidden",name:this.props.name,value:this.props.value},e)))}formatOptionLabel(e){const{title:t}=e;return this.props.search.length?(0,v.mapHighlight)(t||"",this.props.search,E):t}noOptionsMessage(e){let{inputValue:t}=e;const n=this.getVisibleTree()||{};return this.props.failed.indexOf(n.id||0)>=0?d.default._t("Admin.TREEDROPDOWN_FAILED","Failed to load"):t||!n.id?d.default._t("Admin.TREEDROPDOWN_NO_OPTIONS","No options"):d.default._t("Admin.TREEDROPDOWN_NO_CHILDREN","No children")}render(){if(this.props.readOnly||this.props.disabled)return this.renderReadOnly();const e=this.props.extraClass?`treedropdownfield ${this.props.extraClass}`:"treedropdownfield",t=this.getDropdownOptions(),n=Array.isArray(this.props.value)?this.props.value:[this.props.value];let r=this.props.selectedValues.filter((e=>n.includes(e.id)));r.length||(r=t.filter((e=>n.includes(e.id)))),!r.length&&this.props.data.hasEmptyDefault&&(r=t[0]);const i=void 0!==this.props.data.showSearch&&this.props.data.showSearch,s={Input:this.renderInput,MenuList:this.renderMenuList,Option:this.renderOption},o=this.getVisibleTree()||{},u=this.props.loading.indexOf(o.id||0)>=0;return a.default.createElement(l.default,null,a.default.createElement(f.default,{isSearchable:i,isMulti:this.props.data.multiple,isClearable:!0,className:e,name:this.props.name,options:t,delimiter:",",components:s,formatOptionLabel:this.formatOptionLabel,filterOption:this.filterOption,onChange:this.handleChange,onMenuOpen:this.handleOpen,onMenuClose:this.handleClose,onKeyDown:this.handleKeyDown,onInputChange:this.handleSearchChange,isLoading:u,loadingMessage:()=>d.default._t("Admin.TREEDROPDOWN_LOADING","Loading..."),noOptionsMessage:this.noOptionsMessage,value:r,ref:e=>{this.selectField=e},placeholder:this.props.data.emptyString,getOptionLabel:e=>{let{title:t}=e;return t},getOptionValue:e=>{let{id:t}=e;return t},classNamePrefix:"treedropdownfield",classNames:{option:()=>"fill-width"}}))}}t.Component=T,T.propTypes={className:r.default.string,extraClass:r.default.string,id:r.default.string,name:r.default.string.isRequired,onChange:r.default.func,value:r.default.oneOfType([r.default.string,r.default.number,r.default.array]),readOnly:r.default.bool,disabled:r.default.bool,tree:r.default.shape(h.default.propTypes),findTreeByPath:r.default.func,findTreePath:r.default.func,visible:r.default.array,loading:r.default.array,failed:r.default.array,selectedValues:r.default.array,data:r.default.shape({cacheKey:r.default.string,urlTree:r.default.string.isRequired,emptyString:r.default.string,valueObject:r.default.shape(h.default.propTypes),valueObjects:r.default.arrayOf(r.default.shape(h.default.propTypes)),hasEmptyDefault:r.default.bool,showSearch:r.default.bool,multiple:r.default.bool,showSelectedPath:r.default.bool,treeBaseId:r.default.number}),onLoadingError:r.default.func,search:r.default.string,actions:r.default.shape({treeDropdownField:r.default.object}),fetch:r.default.func},T.defaultProps={value:"",extraClass:"",className:"",tree:{},visible:[],loading:[],failed:[],findTreeByPath:b.findTreeByPath,findTreePath:b.findTreePath,fetch:c.default};const S=(0,i.connect)((function(e,t){const n=t.id,a=e.treeDropdownField.fields[n]?e.treeDropdownField.fields[n]:{tree:{},visible:[],loading:[],failed:[],search:"",selectedValues:[]};let r=t.value;return t.data.multiple&&t.value===C&&(r=[]),t.data.multiple||t.value||(r=0),{...a,value:r}}),(function(e){return{actions:{treeDropdownField:(0,s.bindActionCreators)(p,e)}}}))(T);t.ConnectedTreeDropdownField=S;var P=(0,u.default)(S);t.default=P},98268:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(45697))&&a.__esModule?a:{default:a};const i=()=>null;i.propTypes={id:r.default.oneOfType([r.default.string,r.default.number]),title:r.default.string,titlePath:r.default.string,disabled:r.default.bool,parentid:r.default.number,count:r.default.number,depth:r.default.number,expanded:r.default.bool,limited:r.default.bool,marked:r.default.bool,opened:r.default.bool,children:r.default.array};var s=i;t.default=s},11355:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findTreePath=t.findTreeByPath=t.findTreeByID=void 0;const n=(e,t)=>{if(!e||0===Object.keys(e).length)return null;if(0===t.length)return e;const a=t.slice(0),r=a.shift(),i=e.children.find((e=>e.id===r));return i?n(i,a):null};t.findTreeByPath=n;const a=(e,t)=>{if(!t||!e||!e.children||0===Object.keys(e).length)return null;if(e.id===t)return e;for(const n of e.children){const e=a(n,t);if(null!==e)return e}return null};t.findTreeByID=a;const r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t)return[];if(!e||0===Object.keys(e).length)return null;if(e.id===t)return[e.id];if(!e.children)return null;for(const a of e.children){const i=r(a,t);if(null!==i)return e.id&&e.id!==n&&i.unshift(e.id),i}return null};t.findTreePath=r},80384:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(45697)),i=d(n(94184)),s=d(n(4754)),o=d(n(34411)),l=d(n(6732));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends a.PureComponent{renderHeader(){return a.default.createElement("thead",null,a.default.createElement("tr",null,a.default.createElement("th",{scope:"col",className:"used-on__col--index"},s.default._t("Admin.USED_ON_NUM","#")),a.default.createElement("th",{scope:"col",className:"used-on__col--title"},s.default._t("Admin.USED_ON","Used on"))))}renderBody(){const{usedOn:e,loading:t,error:n}=this.props;if(n||!e||!e.length){let e=null,r=null;n?(e=s.default.inject(s.default._t("Admin.LOADING_ERROR","As error occured when loading the data: {message}"),{message:n}),r="error"):t?(e=a.default.createElement(o.default,null),r="loading"):(e=s.default._t("Admin.NOT_USED","This file is currently not in use."),r="empty");const l=(0,i.default)(["used-on__message",`used-on__message--${r}`]);return a.default.createElement("tbody",{"aria-live":"polite"},a.default.createElement("tr",null,a.default.createElement("td",{className:l,colSpan:"3"},e)))}return a.default.createElement("tbody",{"aria-live":"polite"},e.map(this.renderRow))}renderRow(e,t){const{id:n,type:r}=e,s=e.ancestors?[e].concat(e.ancestors).reverse():[e].reverse();let o="#",l=!0;const d=s.map(((e,r)=>{let s=e.title;const d=e.link;s&&s.length>=25&&(s=`${s.substring(0,25).trim()}...`),d&&(o=d);const u=`${t}-${n}-${r}`,c=["used-on__title-item"];return l&&(c.push("used-on__title-item--first"),l=!1),a.default.createElement("li",{className:(0,i.default)(c),key:u},s)})),u=`${t}-${n}`;return a.default.createElement("tr",{key:u,className:"used-on__row"},a.default.createElement("td",{className:"used-on__col--index"},a.default.createElement("a",{href:o,className:"used-on__cell-link"},t+1)),a.default.createElement("td",{className:"used-on__col--title"},a.default.createElement("a",{href:o,className:"used-on__cell-link"},a.default.createElement("ul",{className:"used-on__title-items"},d),a.default.createElement("span",{className:"used-on__type"},r))))}render(){return a.default.createElement("table",{className:"table used-on__table"},this.renderHeader(),this.renderBody())}}t.Component=c,c.propTypes={loading:r.default.bool,usedOn:r.default.arrayOf(r.default.shape({id:r.default.oneOfType([r.default.string,r.default.number]),title:r.default.string,type:r.default.string,link:r.default.string,ancestors:r.default.arrayOf(r.default.shape({title:r.default.string,link:r.default.string})).isRequired})),error:r.default.string};var f=(0,l.default)(c);t.default=f},6732:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a},s=n(86706),o=n(36992),l=n(93390);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}var u=e=>{class t extends r.Component{componentDidMount(){this.haveFetchedData=!1,this.props.forceFetch&&this.fetchDataFromEndpoint()}componentDidUpdate(e){const t=this.props.tabContext;(e.identifier!==this.props.identifier||!t||t.isOnActiveTab)&&this.fetchDataFromEndpoint()}fetchDataFromEndpoint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;const{method:t,url:n}=e.data.readUsageEndpoint||{};this.haveFetchedData&&!this.props.forceFetch||e.loadUsedOn(e.identifier,t,n),this.haveFetchedData=!0}render(){return r.default.createElement(e,this.props)}}t.propTypes={identifier:i.default.string,loading:i.default.bool,data:i.default.oneOfType([i.default.array,i.default.shape({recordClass:i.default.string,recordId:i.default.oneOfType([i.default.string,i.default.number]),readUsageEndpoint:i.default.shape({url:i.default.string,method:i.default.string})})]),usedOn:i.default.array,forceFetch:i.default.bool};const n=(0,l.injectTabContext)(t),a=(0,s.connect)(((e,t)=>{const{recordClass:n,recordId:a}=t.data,r=n&&a?`${n}#${a}`:"",i=e.usedOn;return{identifier:r,loading:i.loading.includes(r),usedOn:i.usedOn[r]||null,error:i.errors[r]||null}}),{loadUsedOn:o.loadUsedOn})(n);return a.Component=n,a};t.default=u},57129:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statuses=t.default=void 0;var a=l(n(67294)),r=l(n(94184)),i=l(n(45697)),s=l(n(37294)),o=l(n(4754));function l(e){return e&&e.__esModule?e:{default:e}}const d=["draft","modified","live","archived"];t.statuses=d;const u=e=>{let{status:t,className:n}=e;const i={className:(0,r.default)(n,"versioned-badge",`versioned-badge--${t}`),message:o.default._t(`ADMIN.${t.toUpperCase()}`,(l=t,l.replace(/^\w/,(e=>e.toUpperCase())))),status:"default"};var l;return a.default.createElement(s.default,i)};u.propTypes={status:i.default.oneOf(d).isRequired,className:i.default.string};var c=u;t.default=c},98031:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=f(n(45697)),i=n(53556),s=f(n(4754)),o=n(86706),l=n(14890),d=n(56486),u=n(15005),c=f(n(94184));function f(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;tthis.setState((e=>({dropdownOpen:!e.dropdownOpen})))),0)}handleSplitSelect(){this.props.onSplitSelect()}handlePreviewSelect(){this.props.onPreviewSelect()}handleEditSelect(){this.props.onEditSelect()}renderSplitDropdownItem(){const{activeState:e,splitAvailable:t,splitIconClass:n}=this.props,r=(0,c.default)("btn","icon-view","first",n,{"viewmode-toggle__button":!0,"viewmode-toggle--selected":e===u.VIEW_MODE_STATES.SPLIT,disabled:!t});return a.default.createElement(i.DropdownItem,{type:"button",disabled:!t,className:r,value:u.VIEW_MODE_STATES.SPLIT,onClick:this.handleSplitSelect,id:"splitModeButton"},s.default._t("Admin.SPLIT_MODE","Split mode"))}renderEditDropDownItem(){const{activeState:e,editIconClass:t}=this.props,n=(0,c.default)("btn","icon-view","last","viewmode-toggle__button",t,{"viewmode-toggle--selected":e===u.VIEW_MODE_STATES.EDIT});return a.default.createElement(i.DropdownItem,{type:"button",className:n,value:"content",onClick:this.handleEditSelect},s.default._t("Admin.EDIT_MODE","Edit mode"))}renderPreviewDropDownItem(){const{activeState:e,previewIconClass:t}=this.props,n=(0,c.default)("btn","icon-view","viewmode-toggle__button",t,{"viewmode-toggle--selected":e===u.VIEW_MODE_STATES.PREVIEW});return a.default.createElement(i.DropdownItem,{type:"button",className:n,value:"preview",onClick:this.handlePreviewSelect},s.default._t("Admin.PREVIEW_MODE","Preview mode"))}render(){const{activeState:e,area:t,splitAvailable:n,dropdownToggleProps:r}=this.props;if(t===u.VIEW_MODE_STATES.EDIT&&e===u.VIEW_MODE_STATES.SPLIT)return null;const o=(0,c.default)(this.getIconClass(),"btn","viewmode-toggle__dropdown",r.classname);return a.default.createElement(i.Dropdown,{isOpen:this.state.dropdownOpen,toggle:this.toggle,className:"viewmode-toggle"},a.default.createElement(i.DropdownToggle,h({className:o,caret:!0},r),a.default.createElement("span",{className:"viewmode-toggle__chosen-view-title"},this.getTitle())),a.default.createElement(i.DropdownMenu,null,this.renderSplitDropdownItem(),this.renderEditDropDownItem(),this.renderPreviewDropDownItem(),!n&&a.default.createElement("div",{className:"disabled-tooltip"},a.default.createElement("span",{className:"disabled-tooltip-span"},s.default._t("Admin.SCREEN_TOO_SMALL","Screen size too small")))))}}t.Component=m,m.propTypes={activeState:r.default.oneOf(Object.values(u.VIEW_MODE_STATES)),area:r.default.string.isRequired,splitAvailable:r.default.bool,onPreviewSelect:r.default.func,onEditSelect:r.default.func,onSplitSelect:r.default.func,editIconClass:r.default.string,previewIconClass:r.default.string,splitIconClass:r.default.string},m.defaultProps={splitAvailable:!0,editIconClass:"font-icon-edit-write",previewIconClass:"font-icon-eye",splitIconClass:"font-icon-columns",dropdownToggleProps:{}};var g=(0,l.compose)((0,o.connect)((function(e){return{activeState:e.viewMode.activeState,splitAvailable:e.viewMode.splitAvailable}}),(function(e){return{onSplitSelect(){e((0,d.selectSplitMode)())},onEditSelect(){e((0,d.selectEditMode)())},onPreviewSelect(){e((0,d.selectPreviewMode)())}}})))(m);t.default=g},55766:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a},i=n(54582),s=n(89250);var o=(0,i.provideInjector)((e=>{let{children:t}=e;return r.default.createElement("div",{className:"app"},t,r.default.createElement(s.Outlet,null))}));t.default=o},25114:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(67294)),r=s(n(66751)),i=n(70917);function s(e){return e&&e.__esModule?e:{default:e}}var o=function(e){let{children:t}=e;return window.ssReactSelectCache||(window.ssReactSelectCache=(0,r.default)({key:"react-select",insertionPoint:document.querySelector("title")})),a.default.createElement(i.CacheProvider,{value:window.ssReactSelectCache},t)};t.default=o},36800:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(67294)),r=n(11962),i=n(54582),s=l(n(96869)),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>{const t=e.formComponent,n={...e};return delete n.formComponent,a.default.createElement(t,n)};d.propTypes={formComponent:o.default.elementType.isRequired};const u=(0,i.inject)(["Form"],(e=>({formComponent:e})))(d);var c=(0,r.reduxForm)({getFormState:s.default,destroyOnUnmount:!1})(u);t.default=c},16304:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0,t.createFormIdentifierFromProps=O,t.default=void 0;var a=w(n(4754)),r=y(n(67294)),i=w(n(45697)),s=n(86706),o=n(14890),l=w(n(94301)),d=w(n(16012)),u=n(11962),c=w(n(48834)),f=n(48942),p=y(n(39042)),h=w(n(21965)),m=y(n(56334)),g=w(n(79298)),v=n(54582),b=w(n(96869));function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function y(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function w(e){return e&&e.__esModule?e:{default:e}}function O(e){let{identifier:t,schema:n={}}=e;return[t,n.schema&&n.schema.name].filter((e=>e)).join(".")}class C extends r.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),this.reduceSchemaErrors=this.reduceSchemaErrors.bind(this),this.handleAutofill=this.handleAutofill.bind(this)}componentDidMount(){const{schema:e,refetchSchemaOnMount:t}=this.props;!t&&e||this.fetch()}componentDidUpdate(e){this.props.schemaUrl!==e.schemaUrl&&this.fetch()}getMessages(e){const t={};return e&&e.fields&&e.fields.forEach((e=>{e.message&&(t[e.name]=e.message)})),t}getIdentifier(){return O(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props)}handleSubmit(e,t,n){let a=null;const r=()=>n().then((e=>{let t=e;if(t){const e=void 0!==t.state;if(t=this.reduceSchemaErrors(t),this.props.actions.schema.setSchema(this.props.schemaUrl,t,this.getIdentifier()),e){const e=t.schema||this.props.schema.schema,n=(0,c.default)(e,t.state);this.props.actions.reduxForm.initialize(this.getIdentifier(),n)}}return t}));if(a="function"==typeof this.props.onSubmit?this.props.onSubmit(e,t,r):r(),!a)throw new Error("Promise was not returned for submitting");return a.then((e=>{if(!e||!e.state)return e;const t=this.getMessages(e.state);if(Object.keys(t).length)throw new u.SubmissionError(t);return e}))}reduceSchemaErrors(e){if(!e.errors)return e;let t={...e};return t.state||(t={...t,state:this.props.schema.state}),t={...t,state:{...t.state,fields:t.state.fields.map((t=>{let n=e.errors.find((e=>e.field===t.name));return n&&(n=(0,f.createErrorHtml)([n.value])),{...t,message:n}}))},messages:e.errors.filter((e=>!e.field))},delete t.errors,(0,d.default)(t)}overrideStateData(e){if(!this.props.stateOverrides||!e)return e;const t=this.props.stateOverrides.fields;let n=e.fields;return t&&n&&(n=n.map((e=>{const n=t.find((t=>t.name===e.name));return n?h.default.recursive(!0,e,n):e}))),Object.assign({},e,this.props.stateOverrides,{fields:n})}callFetch(e){return(0,l.default)(this.props.schemaUrl,{headers:{"X-FormSchema-Request":e.join(","),Accept:"application/json"},credentials:"same-origin"}).then((e=>e.status>=200&&e.status<300?e.json():new Promise(((t,n)=>e.json().then((t=>{n({status:e.status,statusText:e.statusText,json:t})})).catch((()=>{n({status:e.status,statusText:e.statusText,json:{}})}))))))}fetch(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.props.loading)return Promise.resolve({});const a=["auto",e&&"schema",t&&"state",n&&"errors"].filter((e=>e));return this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!0),"function"==typeof this.props.onFetchingSchema&&this.props.onFetchingSchema(),this.callFetch(a).then((e=>{if(this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!1),e.errors?"function"==typeof this.props.onLoadingError&&this.props.onLoadingError(e):"function"==typeof this.props.onLoadingSuccess&&this.props.onLoadingSuccess(),void 0!==e.id&&e.state){const t=Object.assign({},e,{state:this.overrideStateData(e.state)}),n=O({...this.props,schema:{...this.props.schema,...t}});this.props.actions.schema.setSchema(this.props.schemaUrl,t,n);const a=e.schema||this.props.schema.schema,r=(0,c.default)(a,t.state);return this.props.actions.reduxForm.initialize(n,r,!1,{keepSubmitSucceeded:!0}),"function"==typeof this.props.onReduxFormInit&&this.props.onReduxFormInit(),t}return e})).catch((e=>{if(this.setState({didError:!0}),this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!1),"function"==typeof this.props.onLoadingError)return this.props.onLoadingError(this.normaliseError(e));throw e}))}normaliseError(e){if(e.json&&e.json.errors)return e.json;if(e.status&&e.statusText)return{errors:[{code:e.status,value:e.statusText,type:"error"}]};return{errors:[{value:e.message||a.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred."),type:"error"}]}}handleAutofill(e,t){this.props.actions.reduxForm.autofill(this.getIdentifier(),e,t)}render(){if(this.state&&this.state.didError)return null;if(!this.props.schema||!this.props.schema.schema||this.props.loading){const e=this.props.loadingComponent;return r.default.createElement(e,{containerClass:"loading--form flexbox-area-grow"})}const e=Object.assign({},this.props,{form:this.getIdentifier(),onSubmitSuccess:this.props.onSubmitSuccess,onSubmit:this.handleSubmit,onAutofill:this.handleAutofill,autoFocus:this.props.autoFocus});return r.default.createElement(m.default,e)}}t.Component=C,C.propTypes=Object.assign({},m.basePropTypes,{actions:i.default.shape({schema:i.default.object,reduxFrom:i.default.object}),autoFocus:i.default.bool,identifier:i.default.string.isRequired,schemaUrl:i.default.string.isRequired,schema:m.schemaPropType,refetchSchemaOnMount:i.default.bool.isRequired,form:i.default.string,submitting:i.default.bool,onFetchingSchema:i.default.func,onReduxFormInit:i.default.func,loadingComponent:i.default.elementType.isRequired}),C.defaultProps={refetchSchemaOnMount:!0};var E=(0,o.compose)((0,v.inject)(["ReduxForm","ReduxFormField","Loading"],((e,t,n)=>({loadingComponent:n,baseFormComponent:e,baseFieldComponent:t})),(e=>{let{identifier:t}=e;return t})),(0,s.connect)((function(e,t){const n=e.form.formSchemas[t.schemaUrl],a=O({...t,schema:n}),r=(0,g.default)((0,b.default)(e),a);return{schema:n,submitting:r&&r.submitting,values:r&&r.values,stateOverrides:n&&n.stateOverride,loading:n&&n.metadata&&n.metadata.loading}}),(function(e){return{actions:{schema:(0,o.bindActionCreators)(p,e),reduxForm:(0,o.bindActionCreators)({autofill:u.autofill,initialize:u.initialize},e)}}})))(C);t.default=E},52583:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createInsertLinkModal=t.InsertLinkModal=void 0;var a=f(n(67294)),r=u(n(45697)),i=n(14890),s=n(86706),o=u(n(48297)),l=u(n(63596)),d=f(n(39042));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function f(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}class p extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this),e.isOpen||e.setOverrides(null)}componentDidUpdate(e){const t=this.props;(t.isOpen&&!e.isOpen||!t.isOpen&&e.isOpen)&&t.setOverrides(t.isOpen?t:null)}getModalProps(){const e=Object.assign({},this.props,{onSubmit:this.handleSubmit,onClosed:this.props.onClosed,autoFocus:!0,showErrorMessage:!0});return delete e.onInsert,delete e.sectionConfig,e}handleSubmit(e,t){if("action_cancel"===t)this.props.onClosed();else this.props.onInsert(e,t);return Promise.resolve()}render(){const e=this.getModalProps();return a.default.createElement(o.default,e)}}function h(e){return{actions:{schema:(0,i.bindActionCreators)(d,e)}}}t.InsertLinkModal=p,p.propTypes={isOpen:r.default.bool,schemaUrl:r.default.string,onInsert:r.default.func.isRequired,onClosed:r.default.func.isRequired,setOverrides:r.default.func.isRequired,actions:r.default.object,requireLinkText:r.default.bool,currentPageID:r.default.number},p.defaultProps={};t.createInsertLinkModal=(e,t)=>(0,i.compose)((0,s.connect)((function(n,a){const r=n.config.sections.find((t=>t.name===e)),i=a.requireLinkText?"?requireLinkText":"";return{sectionConfig:r,schemaUrl:`${r.form[t].schemaUrl}${i}`.replace(/:pageid/,a.currentPageID)}}),h),l.default)(p);var m=(0,i.compose)((0,s.connect)((()=>({})),h),l.default)(p);t.default=m},63596:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.FileSchemaHandler=t.ConnectedFileSchemaHandler=void 0;var a,r=u(n(67294)),i=(a=n(45697))&&a.__esModule?a:{default:a},s=n(14890),o=u(n(39042)),l=n(86706);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function u(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null;if(e){if(e.schemaUrl){const t=Object.assign({},e.fileAttributes);delete t.ID;const n={fields:Object.entries(t).map((e=>{const[t,n]=e;return{name:t,value:n}}))};this.props.actions.schema.setSchemaStateOverrides(e.schemaUrl,n)}}else{const e=this.props.schemaUrl;e&&this.props.actions.schema.setSchemaStateOverrides(e,null)}}render(){const{Component:e,...t}=this.props;return r.default.createElement(e,c({setOverrides:this.setOverrides},t))}}function p(e,t){return{actions:{...t&&t.actions||{},schema:(0,s.bindActionCreators)(o,e)}}}t.FileSchemaHandler=f,f.propTypes={fileAttributes:i.default.object,Component:i.default.elementType,schemaUrl:i.default.string,actions:i.default.object};const h=(0,l.connect)((()=>({})),p())(f);t.ConnectedFileSchemaHandler=h;var m=function(e){return(0,l.connect)((function(){return{Component:e}}),p)(f)};t.default=m},73276:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(67294)),r=d(n(45697)),i=n(53556),s=n(54582),o=d(n(94301)),l=d(n(94974));function d(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{class t extends a.Component{constructor(e){super(e),this.state={active:l.default.getSection(f).sudoModeActive||!1,showVerification:!1,loading:!1,errorMessage:null},this.handleConfirmNotice=this.handleConfirmNotice.bind(this),this.handleVerify=this.handleVerify.bind(this),this.handleVerifyInputKeyPress=this.handleVerifyInputKeyPress.bind(this),this.passwordInput=null,this.setPasswordInput=e=>{this.passwordInput=e}}handleConfirmNotice(){this.setState({showVerification:!0},(()=>this.passwordInput&&this.passwordInput.focus()))}handleVerify(){this.setState({loading:!0});const e=new FormData;e.append("SecurityID",l.default.get("SecurityID")),e.append("Password",this.passwordInput.value),(0,o.default)(l.default.getSection(f).endpoints.activate,{method:"POST",body:e}).then((e=>e.json().then((e=>e.result?this.setState({loading:!1,active:!0}):this.setState({loading:!1,errorMessage:e.message},(()=>this.passwordInput.focus()))))))}handleVerifyInputKeyPress(e){13===e.charCode&&(e.stopPropagation(),e.preventDefault(),this.handleVerify())}isSudoModeActive(){return!0===this.state.active}renderSudoModeNotice(){const{i18n:e}=window,{showVerification:t}=this.state,n=l.default.getSection(f).helpLink||null;return a.default.createElement("div",{className:"sudo-mode__notice sudo-mode__notice--required"},a.default.createElement("p",{className:"sudo-mode__notice-message"},e._t("Admin.VERIFY_ITS_YOU","Verify it's you first."),n&&a.default.createElement("a",{href:n,className:"sudo-mode__notice-help",target:"_blank",rel:"noopener noreferrer"},e._t("Admin.WHATS_THIS","What is this?"))),!t&&a.default.createElement(i.Button,{className:"sudo-mode__notice-button font-icon-lock",color:"info",onClick:this.handleConfirmNotice},e._t("Admin.VERIFY_TO_CONTINUE","Verify to continue")))}renderSudoModeVerification(){const{i18n:e}=window,{errorMessage:t}=this.state,n={type:"password",name:"sudoModePassword",id:"sudoModePassword",className:"no-change-track",onKeyPress:this.handleVerifyInputKeyPress,innerRef:this.setPasswordInput},r=t?{valid:!1,invalid:!0}:{};return a.default.createElement("div",{className:"sudo-mode__verify"},a.default.createElement(i.FormGroup,{className:"sudo-mode__verify-form-group"},a.default.createElement(i.Label,{for:"sudoModePassword"},e._t("Admin.ENTER_PASSWORD","Enter your password")),a.default.createElement(i.InputGroup,null,a.default.createElement(i.Input,c({},n,r)),a.default.createElement(i.InputGroupAddon,{addonType:"append"},a.default.createElement(i.Button,{className:"sudo-mode__verify-button",color:"info",onClick:this.handleVerify},e._t("Admin.VERIFY","Verify"))),a.default.createElement(i.FormFeedback,null,t))))}renderSudoMode(){const{showVerification:e,loading:t}=this.state,n=this.props.LoadingComponent||(0,s.loadComponent)("CircularLoading","SudoMode");return t?a.default.createElement("div",{className:"sudo-mode alert alert-info"},a.default.createElement(n,{block:!0})):a.default.createElement("div",{className:"sudo-mode alert alert-info"},this.renderSudoModeNotice(),e&&this.renderSudoModeVerification())}render(){return this.isSudoModeActive()?a.default.createElement(e,this.props):this.renderSudoMode()}}return t.propTypes={LoadingComponent:r.default.oneOfType([r.default.node,r.default.func])},t};t.default=p},49331:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=d(n(67294)),r=d(n(60452)),i=n(86706),s=n(14890),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(36158));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}var u=(0,i.connect)((e=>{let{toasts:{toasts:t}}=e;return{toasts:t}}),(e=>({actions:(0,s.bindActionCreators)(o,e)})))((e=>{let{toasts:t,actions:{dismiss:n,pause:i,resume:s}}=e;return a.default.createElement(r.default,{toasts:t,onDismiss:n,onPause:i,onResume:s})}));t.default=u},93390:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TabContext=void 0,t.injectTabContext=function(e){return t=>{const n=o();return a.default.createElement(e,i({},t,{tabContext:n}))}},t.useTabFirstShow=function(e){const t=o(),n=!t||t.isOnActiveTab,[r,i]=(0,a.useState)(!1);(0,a.useEffect)((()=>{n&&(i(!0),e(t))}),[r||n])};var a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var a={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(a,s,o):a[s]=e[s]}a.default=e,n&&n.set(e,a);return a}(n(67294));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?t-1:0),a=1;a{e(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick(){let t=e("#add-to-campaign__dialog-wrapper");return t.length||(t=e('
'),e("body").append(t)),t.open(),!1}}),e(".add-to-campaign-modal .add-to-campaign-modal__nav-link").entwine({onclick:t=>{t.preventDefault();const n=e(t.target);window.location=n.attr("href")}}),e("#add-to-campaign__dialog-wrapper").entwine({ReactRoot:null,onunmatch(){this._clearModal()},open(){this._renderModal(!0)},close(){this._renderModal(!1)},_renderModal(t){var n=this;const r=e("form.cms-edit-form :input[name=ID]").val(),o=`${window.ss.store.getState().config.sections.find((e=>"SilverStripe\\CMS\\Controllers\\CMSPageEditController"===e.name)).form.AddToCampaignForm.schemaUrl}/${r}`,d=a.default._t("Admin.ADD_TO_CAMPAIGN","Add to campaign");let u=this.getReactRoot();u||(u=(0,s.createRoot)(this[0])),u.render(i.default.createElement(l,{title:d,isOpen:t,onSubmit:function(){return n._handleSubmitModal(...arguments)},onClosed:()=>this.close(),schemaUrl:o,bodyClassName:"modal__dialog",className:"add-to-campaign-modal",responseClassBad:"modal__response modal__response--error",responseClassGood:"modal__response modal__response--good",identifier:"Admin.AddToCampaign"})),this.setReactRoot(u)},_clearModal(){const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},_handleSubmitModal(e,t,n){return n()}})}))},76406:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};(0,r.default)(document).on("click",".confirmedpassword .showOnClick a",(function(){var e=(0,r.default)(".showOnClickContainer",(0,r.default)(this).parent());return e.toggle("fast",(function(){e.toggleClass("d-none").find('input[type="hidden"]').val(e.hasClass("d-none")?0:1)})),!1}))},40303:function(e,t,n){"use strict";var a=o(n(19755)),r=o(n(4754)),i=o(n(30381)),s=o(n(68300));function o(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss",(e=>{e("input[type=date]").entwine({onadd(){if(s.default.inputtypes.date)return;if(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))return;const t=e(" ",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),i.default.locale(this.attr("lang"));const n=this.val();let a="";if(n){const e=(0,i.default)(n);e.isValid()&&(a=e.format("L"))}this.val(a);const o=r.default.inject(r.default._t("Admin.FormatExample","Example: {format}"),{format:(0,i.default)().endOf("month").format("L")});this.attr("placeholder",o),this.updateValue()},onchange(){this.updateValue()},updateValue(){const e=this.val();let t="";if(e)for(const n of["L","YYYY-MM-DD"]){const a=(0,i.default)(e,n);if(a.isValid()){t=a.format("YYYY-MM-DD");break}}this.parent().find("input[type=hidden]").val(t)}})}))},57893:function(e,t,n){"use strict";var a=o(n(19755)),r=o(n(4754)),i=o(n(30381)),s=o(n(68300));function o(e){return e&&e.__esModule?e:{default:e}}n(881),a.default.entwine("ss",(e=>{e("input[type=datetime-local]").entwine({onadd(){if(s.default.inputtypes["datetime-local"])return;if(this.prop("disabled")||this.prop("readonly")||this.hasClass("hasDatepicker"))return;const t=e(" ",{type:"hidden",name:this.attr("name"),value:this.val()});this.parent().append(t),this.removeAttr("name"),i.default.locale(this.attr("lang"));const n=this.val();let a="";if(n){const e=(0,i.default)(n);e.isValid()&&(a=e.format("L LT"))}this.val(a);const o=r.default.inject(r.default._t("Admin.FormatExample","Example: {format}"),{format:(0,i.default)().endOf("month").format("L LT")});this.attr("placeholder",o),this.updateValue()},onchange(){this.updateValue()},updateValue(){const e=this.val();let t="";if(e){const n=(0,i.default)(e,["L LT",i.default.ISO_8601]);n.isValid()&&(t=n.format("YYYY-MM-DDTHH:mm:ss"))}this.parent().find("input[type=hidden]").val(t)}})}))},17106:function(e,t,n){"use strict";var a=l(n(19755)),r=l(n(4754)),i=l(n(67294)),s=n(20745),o=(l(n(62266)),n(48834),n(54582));function l(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t ").addClass("ss-gridfield-item loading").attr("colspan",d);l.append(e(" ").append(u));e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(r){if(a.empty().append(e(r).children()),s&&a.find(':input[name="'+s+'"]').focus(),a.find(".grid-field__filter-header, .grid-field__search-holder").length){var i="show"===t.data[0].filter;a.needsColumnFix()&&a.fixColumns(),a.injectSearchButton(i)}n&&n.apply(this,arguments),a.trigger("reload",a),!1!==t.data[0].triggerChange&&a.trigger("change")},error:function(e){alert(r.default._t("Admin.ERRORINTRANSACTION"))},complete:function(e,t){a.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(){const e=this.find(':input[name="'+this.data("name")+'[GridState]"]').val();return e?JSON.parse(e):{}},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){const t=this.find(".grid-field__filter-header").length>0;let n;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(){const t=e(this).find(".gridfield-actionmenu__container").data("schema");t&&t.length>0&&t.filter((e=>{if("link"===e.type){const t=this.buildURLString(e.url),n=t?"?"+t.join("&"):"";window.ss.router.replace(window.location.pathname+n,void 0,void 0,!1)}}))},buildURLString:function(e){const t=[window.location.origin,e].join("/"),n=[window.location.search,new URL(t).searchParams.toString()].join("&").substring(1),a=[],r=[];return n.split("&").forEach((e=>{const t=e.split("=");a[t[0]]=t[1]?t[1]:""})),Object.keys(a).forEach((e=>{r.push([e,a[e]].join("="))})),r}}),e(".grid-field *").entwine({getGridField:function(){return this.closest(".grid-field")}}),e(".gridfield-actionmenu__container").entwine({Timer:null,Component:null,Actions:null,ReactRoot:null,onmatch(){this._super();let t=[];e(".action-menu--handled",this.parent()).each((function(){const n=e(this).detach();t.push(n)})),this.setActions(t);const n=this.closest(".cms-content").attr("id"),a=n?{context:n}:{},r=(0,o.loadComponent)("GridFieldActions",a);this.setComponent(r),this.refresh()},onunmatch(){this._super();const t=this.getReactRoot();t&&(t.unmount(),this.setReactRoot(null));const n=this.getActions(),a=this.parent();n&&e(n).each((function(){e(this).appendTo(a)}))},refresh(){const e=this.data("schema"),t=this.getComponent();let n=this.getReactRoot();n||(n=(0,s.createRoot)(this[0])),n.render(i.default.createElement(t,{schema:e})),this.setReactRoot(n)}}),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(){let t=e(this.data("target")),n=e(this.data("modal"));t.length<1?(t=n,t.appendTo(document.body)):t.innerHTML=n.innerHTML;let a=e(".modal-backdrop");function r(){a.removeClass("show"),t.removeClass("show"),setTimeout((function(){a.remove()}),150)}a.length<1&&(a=e('
'),a.appendTo(document.body)),t.find("[data-dismiss]").add(".modal-backdrop").on("click",(function(){r()})),e(document).on("keydown",(function(e){27===e.keyCode&&r()})),setTimeout((function(){a.addClass("show"),t.addClass("show")}),0)}}),e(".grid-field .action:button").entwine({onclick:function(t){var n="show";let a=!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"))&&(a=!1);var r=[{name:this.attr("name"),value:this.val(),filter:n,triggerChange:a}],i=this.data("action-state");i&&r.push({name:"ActionState",value:JSON.stringify(i)});const s=e(this).getGridField();s.reload({data:r},(function(t,n,a){s.keepStateInHistory();const r=a.getResponseHeader("X-Message-Text"),i=a.getResponseHeader("X-Message-Type");if(r&&i){var o=e("#Form_EditForm_error");o.addClass(i),o.html(r),o.show()}})),t.preventDefault()},actionurl:function(){var t=this.closest(":button"),n=this.getGridField(),a=this.closest("form"),r=a.find(":input.gridstate").serialize(),i=a.find('input[name="SecurityID"]').val();r+="&"+encodeURIComponent(t.attr("name"))+"="+encodeURIComponent(t.val()),i&&(r+="&SecurityID="+encodeURIComponent(i));var s=this.data("action-state");s&&(r+="&ActionState="+encodeURIComponent(JSON.stringify(s))),window.location.search&&(r=window.location.search.replace(/^\?/,"")+"&"+r);var o=-1==n.data("url").indexOf("?")?"?":"&";return e.path.makeUrlAbsolute(n.data("url")+o+r,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"]').val(),n=e.is(":disabled");(t&&n||!t&&!n)&&e.attr("disabled",!n)}}),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){const n=e(this).hasClass("action--archive")?r.default._t("Admin.ARCHIVECONFIRMMESSAGE","Are you sure you want to archive this record?"):r.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().on("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,ReactRoot:null,onmatch(){this._super(),this.prependTo(this.parent());const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,o.loadComponent)("Search",t);this.setComponent(n),this.refresh()},onunmatch(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},close(){const t=this.data("schema"),n=[{name:t.clearAction,value:"",filter:"hidden",triggerChange:!1}];t.clearActionState&&n.push({name:"ActionState",value:t.clearActionState});const a=e(this).getGridField();a.reload({data:n},(function(){a.keepStateInHistory()}))},search(t){const n=this.data("schema"),a=[{name:n.searchAction,value:"",filter:"show",triggerChange:!1}];n.searchActionState&&a.push({name:"ActionState",value:n.searchActionState});for(const[e,r]of Object.entries(t))if(r){const t=`filter[${n.gridfield}][${e}]`;a.push({name:t,value:r})}const r=e(this).getGridField();r.reload({data:a},(function(){r.keepStateInHistory()}))},refresh(){const e=this.data("schema"),t=this.getComponent();String(e.gridfield).replace(/\-/g,".");let n=this.getReactRoot();n||(n=(0,s.createRoot)(this[0])),n.render(i.default.createElement(t,d({id:`${e.gridfield}Search`,display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:()=>this.close(),onSearch:e=>this.search(e)},e))),this.setReactRoot(n)}}),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"),a=this.closest(".extra").find(".ss-gridfield-button-reset");if("13"==t.keyCode){var r=this.closest(".grid-field__filter-header").find(".ss-gridfield-button-filter"),i="show";!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(i="hidden");var s=[{name:r.attr("name"),value:r.val(),filter:i,triggerChange:!1}];r.data("action-state")&&s.push({name:"ActionState",value:JSON.stringify(r.data("action-state"))});const t=e(this).getGridField(),n=function(){t.keepStateInHistory()};return t.reload({data:s},n),!1}n.addClass("hover-alike"),a.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,n){var a=e(this.element);e(this.element).closest("form");e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(a).data("searchUrl"),data:encodeURIComponent(a.attr("name"))+"="+encodeURIComponent(a.val()),success:n,error:function(e){alert(r.default._t("Admin.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,n){var a=e(' ');a.val(n.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(a),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),a=e(this).getGridField();a.setState("GridFieldPaginator",{currentPage:n});const r=function(){a.keepStateInHistory()};return a.reload({},r),!1}}})}))},49414:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(19755));__webpack_require__(51726);var _lodash=_interopRequireDefault(__webpack_require__(91658));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}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,_jquery.default)(e).data("config"),n=this;return t.selector=e,t.setup=function(e){e.on("change",(function(){n.save()}))},t},save:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t=this.getInstance();t.save(),e.silent||((0,_jquery.default)(t.getElement()).trigger("change"),t.getElement().dispatchEvent(new Event("input",{bubbles:!0})))},create:function(){let e,t,n;function a(a){const r=a.target;!e||(new Date-e)/100>500?(n=$(r).scrollTop(),$(".mce-floatpanel").css("opacity","0")):window.clearTimeout(t),e=new Date,t=window.setTimeout((()=>function(t,n){const a=$(t).scrollTop();$(".mce-floatpanel").each(((e,t)=>{const r=parseFloat(t.style.top);$(t).css("top",r-(a-n)+"px")})),$(".mce-floatpanel").css("opacity","1"),e=void 0}(r,n)),500)}var r=this.getConfig();void 0!==r.baseURL&&(tinymce.EditorManager.baseURL=r.baseURL),r.skin=r.skin||"silverstripe",tinymce.init(r).then((e=>{if(e.length>0&&e[0].container){$(e[0].container).closest(".panel--scrollable").on("scroll",(e=>a(e)))}}))},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getSelection:function(){return this.getInstance().selection.getSel().toString()||""},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(">",">");const t=this.getInstance().dom.create("a",e,n);this.getInstance().selection.setNode(t)}else this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function(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("^"+(0,_lodash.default)(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,_jquery.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){let t=e("#insert-media-react__dialog-wrapper");return t.length||(t=e('
'),e("body").append(t)),t.setElement(this),void t.open()}if("embed"===t&&window.InsertEmbedModal){let t=e("#insert-embed-react__dialog-wrapper");return t.length||(t=e('
'),e("body").append(t)),t.setElement(this),void t.open()}throw new Error(`Dialog named ${t} is not available.`)}})}))},62596:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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 a,r=this,i=e(".cms-container").find("iframe");a=function(t){var n;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(r).length||n.length||(r.tabs("option","active",!1),e(".cms-container").find("iframe").each((function(t,n){e(n).contents().off("click.ss-ui-action-tabset",a)})),e(document).off("click.ss-ui-action-tabset",a))},e(document).on("click.ss-ui-action-tabset",a),i.length>0&&i.each((function(t,n){e(n).contents().on("click.ss-ui-action-tabset",a)}))},riseUp:function(t,n){var a,r,i,s,o,l,d,u;if(a=e(this).find(".ui-tabs-panel").outerHeight(),r=e(this).find(".ui-tabs-nav").outerHeight(),i=e(window).height()+e(document).scrollTop()-r,s=e(this).find(".ui-tabs-nav").offset().top,o=n.newPanel,l=n.newTab,s+a>=i&&s-a>0){if(this.addClass("rise-up"),null!==l.position()){if(d=-o.outerHeight(),u=o.parents(".toolbar--south")){const e=l.offset();d-=e?e.top-u.offset().top:0}e(o).css("top",d+"px")}}else this.removeClass("rise-up"),null!==l.position()&&e(o).css("bottom","100%");return!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")}})}))},82165:function(e,t,n){"use strict";var a=i(n(19755)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss.tree",(function(e){e("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return e(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},onmatch:function(){var e=this;e.getTree().on("load_node.jstree",(function(t,n){e.refreshSelected()}))},onunmatch:function(){this.getTree().off("load_node.jstree")},registerDefault:function(){this.register("publish",(function(e){return!!confirm(r.default.inject(r.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(r.default.inject(r.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(r.default.inject(r.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(r.default.inject(r.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(t){var n=this,a=this.getTree(),r=this.getIDs(),i=[],s=e(".cms-content-batchactions-button"),o=this.find(":input[name=Action]").val();for(var l in null==t&&(t=a),r)e(e(a).getNodeByID(l)).addClass("selected").attr("selected","selected");if(o&&-1!=o&&s.hasClass("active")){e(t).find("li").each((function(){i.push(e(this).data("id")),e(this).addClass("treeloading").setEnabled(!1)}));var d=e.path.parseUrl(o),u=d.hrefNoSearch+"/applicablepages/";u=e.path.addSearchParams(u,d.search),u=e.path.addSearchParams(u,{csvIDs:i.join(",")}),jQuery.getJSON(u,(function(a){jQuery(t).find("li").each((function(){e(this).removeClass("treeloading");var t=e(this).data("id");0==t||e.inArray(t,a)>=0?e(this).setEnabled(!0):(e(this).removeClass("selected").setEnabled(!1),e(this).prop("selected",!1))})),n.serializeFromTree()}))}else e(t).find("li").each((function(){e(this).setEnabled(!0)}))},serializeFromTree:function(){var e=this.getTree().getSelectedIDs();return this.setIDs(e),!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(t){var n=this,a=this.getIDs(),i=this.getTree(),s=this.getActions();if(!a||!a.length)return alert(r.default._t("Admin.SELECTONEPAGE","Please select at least one page")),t.preventDefault(),!1;var o=this.find(":input[name=Action]").val();if(!o)return t.preventDefault(),!1;var l=o.split("/").filter((e=>!!e)).pop();if(s[l]&&(a=s[l].apply(this,[a])),!a||!a.length)return t.preventDefault(),!1;this.setIDs(a),i.find("li").removeClass("failed");var d=this.find(":submit:first");return d.addClass("loading"),jQuery.ajax({url:o,type:"POST",data:this.serializeArray(),complete:function(e,t){d.removeClass("loading"),i.jstree("refresh",-1),n.setIDs([]),n.find(":input[name=Action]").val("").change();var a=e.getResponseHeader("X-Status");a&&statusMessage(decodeURIComponent(a),"success"===t?"success":"error")},success:function(t,n){var a,r;if(t.modified){var s=[];for(a in t.modified)r=i.getNodeByID(a),i.jstree("set_text",r,t.modified[a].TreeTitle),s.push(r);e(s).effect("highlight")}if(t.deleted)for(a in t.deleted)(r=i.getNodeByID(a)).length&&i.jstree("delete_node",r);if(t.error)for(a in t.error)r=i.getNodeByID(a),e(r).addClass("failed")},dataType:"json"}),t.preventDefault(),!1}}),e(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var t=e(".cms-tree"),n=e("#Form_BatchActionsForm");this._super(),this.data("active")?(t.addClass("multiple"),t.removeClass("draggable"),n.serializeFromTree()):(t.removeClass("multiple"),t.addClass("draggable")),e("#Form_BatchActionsForm").refreshSelected()}}),e("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(t){e(t.target.form).find(":submit");const n=e(t.target).val();if(n){const t=n.split("/"),r=t[t.length-1];e("#Form_BatchActionsForm").refreshSelected();var a=e("#BatchActionParameters_"+r);a.length?(a.find(":input").each((function(){var t=e(this)[0];"SELECT"===t.tagName?(t.selectedIndex=-1,e(this).trigger("chosen:updated")):"checkbox"===t.type?t.checked=t.defaultChecked:t.value=t.defaultValue})),a.siblings().hide(),a.show(),e("#BatchActionParameters").slideDown()):e("#BatchActionParameters").slideUp()}this.trigger("chosen:updated"),this._super(t)}})}))},95075:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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.on("select_node.jstree",(function(n,a){var r=a.rslt.obj,i=t.find(":input[name=ID]").val(),s=a.args[2],o=e(".cms-container");if(!s)return!1;if(e(r).hasClass("disabled"))return!1;if(e(r).data("id")!=i){var l=e(r).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(r).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(/^\?/,""))),o.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");const e=parseInt(this.css("padding-top"),10),t=parseInt(this.css("padding-bottom"),10);this.height(this.innerHeight()-e-t)}})}))},49958:function(e,t,n){"use strict";var a=i(n(19755)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}const s=window.onbeforeunload;window.onbeforeunload=function(e){var t=(0,a.default)(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")&&!t.is(".discardchanges")?r.default._t("Admin.CONFIRMUNSAVEDSHORT"):"function"==typeof s?s():void 0},a.default.entwine("ss",(function(e){e(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},getValidationErrorShown:function(){return Boolean(this.data("_validationErrorShown"))},setValidationErrorShown:function(e){this.data("_validationErrorShown",e)},onadd:function(){for(var e in this.attr("autocomplete","off"),this._setupChangeTracker(),{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._super()},"from .cms-tabset":{onafterredrawtabs:function(){const 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)"),a=ss.i18n._t("Admin.VALIDATION_ERRORS_ON_PAGE","There are validation errors on this page, please fix them before saving or publishing."),r=ss.i18n._t("Admin.VALIDATIONERROR","Validation Error"),i=e("#Form_EditForm_error");this.find(".tab-attention, .tab-validation-error-sr").remove();let s=!1;if(this.hasClass("validationerror")&&(s=!0),""!==i.html()&&(s=!0),this.find(".alert.error").length>0&&(s=!0),!s)return void i.hide();!this.getValidationErrorShown()&&this.hasClass("validationerror")&&(o(r),this.setValidationErrorShown(!0));const l=this.find(".tab-pane .alert-danger, .tab-pane .alert.error").closest(".tab-pane");if(!l.length)return;const d=l.closest(".tab-content").closest(".ss-tabset");d.length&&(l.each((a=>{const r=l.eq(a).attr("id"),i=d.find(`#tab-${r}`).closest("li"),s=e(` `),o=e(`${n} `);i.append(s),i.append(o)})),i.attr("class","alert alert-danger"),i.html(a),i.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(r.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:true}),true},"from .htmleditor":{oneditorinit:function(t){var n=this,a=e(t.target).closest(".field.htmleditor");a.find("textarea.htmleditor").getEditor().getInstance().onClick.add((function(e){n.saveFieldFocus(a.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"),a=[];if(a.push({id:n,selected:t}),a)try{window.sessionStorage.setItem(n,JSON.stringify(a))}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,a,r,i,s=this,o=void 0!==window.sessionStorage&&window.sessionStorage,l=o?window.sessionStorage.getItem(this.attr("id")):null,d=!!l&&JSON.parse(l),u=0!==this.find(".ss-tabset").length;if(o&&d.length>0){if(e.each(d,(function(n,a){s.is("#"+a.id)&&(t=e("#"+a.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"),a="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),u&&a!==n)return;(r=e(t).closest(".togglecomposite")).length>0&&r.accordion("option","active",r.find(".ui-accordion-header")),i=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),i=e(t).position().top),e(t).focus(),i>e(window).height()/2&&s.find(".cms-content-fields").scrollTop(i)}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=[r.default.inject(r.default._t("Admin.OWNED_WARNING_1","You are unpublishing content that is being used in {count} other published section(s)."),{count:t}),r.default._t("Admin.OWNED_WARNING_2","This could cause a published page to have missing components on the live site."),r.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(){this.is(":checked")&&this.toggleListDisplay(this.val(),!0)},onchange:function(e){this.toggleListDisplay(e.target.value)},toggleListDisplay:function(e,t){"OnlyTheseUsers"===e?(this.showGroupsList(t),this.hideMembersList(t)):this.hideGroupsList(t),"OnlyTheseMembers"===e?(this.showMembersList(t),this.hideGroupsList(t)):this.hideMembersList(t)},showList:function(e){this.showGroupsList(e),this.showMembersList(e)},hideList:function(e){this.hideGroupsList(e),this.hideMembersList(e)},showGroupsList:function(e){const t=this.closest(".field");this.showListElement(t,t.next().filter(".treemultiselect"),e)},hideGroupsList:function(e){const t=this.closest(".field");this.hideListElement(t,t.next().filter(".treemultiselect"),e)},showMembersList:function(e){const t=this.closest(".field");this.showListElement(t,t.next().next().filter(".listbox"),e)},hideMembersList:function(e){const t=this.closest(".field");this.hideListElement(t,t.next().next().filter(".listbox"),e)},showListElement:function(e,t,n){e.addClass("field--merge-below"),n?t.show().css("overflow","visible"):t.slideDown((()=>{t.css("overflow","visible")}))},hideListElement:function(e,t,n){t.css("overflow","hidden"),n?(t.hide().css("display","none"),e.removeClass("field--merge-below")):t.slideUp((()=>{e.removeClass("field--merge-below")}))}})}));var o=function(e){jQuery.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},73366:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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"),a=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(){a[e?"hide":"show"](),e=!e})),a.hide())}})}))},56970:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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")}})}))},60395:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a},i=n(80195);r.default.entwine("ss",(function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,a){e(".cms-menu__list").children("li").each((function(){t?e(this).children("ul").each((function(){e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))})):e(this).children("ul").each((function(){e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)}))})),this._super(t,n,a)},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&null!=(n=e.cookie("cms-menu-sticky"))&&(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(),a=this.siteTreePresent();return void 0===t?a:t!==a&&n?t:a},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(){"function"==typeof e(this).setRecordID&&e(this).setRecordID(n)}))}}),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 a=this.getMenuItem(),r=this.attr("href");n||(r=(0,i.joinUrlPaths)(e("base").attr("href"),r));var s=a.find("li");s.length?s.first().find("a").click():document.location.href=r,a.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(),a=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&!1===a&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(a),this.toggleCSS(a),this.toggleIndicator(a),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")}})}))},41221:function(e,t,n){"use strict";var a=o(n(19755)),r=o(n(26195)),i=n(11521),s=n(20745);function o(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss",(function(e){e(".js-react-boot").entwine({onmatch:function(){const t=e(".cms-mobile-menu-toggle-wrapper");if(t.length>0){(0,s.createRoot)(t[0]).render(React.createElement(r.default,{store:window.ss.store,controls:"cms-menu"}))}const n=window.ss.store,a=e(".cms-menu"),i=e(".cms-menu-mobile-overlay");n.subscribe((()=>{const e=n.getState().mobileMenu.isOpen;a.toggleClass("cms-menu--open",e).attr("aria-expanded",e),i.attr("aria-expanded",e)}))}}),e(".cms-menu-mobile-overlay").entwine({onclick:function(){window.ss.store.dispatch((0,i.closeMobileMenu)())}})}))},73843:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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()&&null!=(n=e.cookie("cms-panel-collapsed-"+this.attr("id")))&&(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 a;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),a=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(a),this.find(".cms-panel-content-collapsed").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)}})}))},88615:function(e,t,n){"use strict";var a=i(n(19755)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}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 a=this,r=this._getNavigatorStates();return!1!==n&&e.each(r,(function(e,n){a.saveState("state",t)})),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var a=e(".cms-container").entwine(".ss");if("split"==t)a.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)a.contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;a.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return!1!==n&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){this.getSizes();return 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.on("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");let e=!0;this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw();const a=this.find("iframe").attr("src");this.getPendingURL()||a&&"about:blank"!==a||(t="content",e=!1),t&&this.changeMode(t,e),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(),a=null;t&&(a=e.grep(t,(function(e,t){return n===e.name||!n&&e.active})));var r=null;if(a[0]?r=a[0].url:t.length?(this.setCurrentStateName(t[0].name),r=t[0].url):this.setCurrentStateName(null),r){let e=r.split("#");const t=e.shift().split(/[?&]/),n=t.shift();t.push("CMSPreview=1"),e=e.length?"#"+e.join("#"):"",r=n+"?"+t.join("&")+e}return this.is(".column-hidden")?(this.setPendingURL(r),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),r?(this._loadUrl(r),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"),a=e(t).find("meta[name=x-cms-edit-link]").attr("content"),r=e(".cms-content");n&&r.find(":input[name=ID]").val()!=n&&e(".cms-container").entwine(".ss").loadPanel(a)}}},_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"),a=0;a'):this.parent().append('
')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})}))},49266:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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")))return;var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));const n=function(t,r){let i=r.rslt.o,s=r.rslt.np,o=e(s).data("id")||0,l=e(i).data("id"),d=e.map(e(i).siblings().addBack(),(function(t){return e(t).data("id")}));a.getIsUpdatingTree()||(a.getCanMoveCheckCompleted()?(a.setCanMoveCheckCompleted(!1),e.ajax({url:e.path.addSearchParams(a.data("urlSavetreenode"),a.data("extraParams")),type:"POST",data:{ID:l,ParentID:o,SiblingIDs:d},success:function(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(o),a.updateNodesFromServer([l])},statusCode:{403:function(){e.jstree.rollback(r.rlbk)}}})):a.canMove(r).then((i=>{i?(a.setCanMoveCheckCompleted(!0),n(t,r)):e.jstree.rollback(r.rlbk)})))};var a=this;this.jstree(this.getTreeConfig()).on("loaded.jstree",(function(t,n){a.setIsLoaded(!0),n.inst._set_settings({html_data:{ajax:{url:a.data("urlTree"),data:function(t){var n=a.data("searchparams")||[];return(n=e.grep(n,(function(e,t){return"ID"!=e.name&&"value"!=e.name}))).push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),n.push({name:"ajax",value:1}),n}}}}),a.updateFromEditForm(),a.css("visibility","visible"),n.inst.hide_checkboxes()})).on("before.jstree",(function(t,n){if("start_drag"==n.func&&(!a.hasClass("draggable")||a.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(n.func,["check_node","uncheck_node"])){var r=e(n.args[0]).parents("li:first"),i=r.find("li:not(.disabled)");if(r.hasClass("disabled")&&0==i)return t.stopImmediatePropagation(),!1}})).on("move_node.jstree",n).on("select_node.jstree check_node.jstree uncheck_node.jstree",(function(t,n){t.namespace="",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){const n=e(".cms-edit-form :input[name=ID]").val(),a=this.find(`[data-id=${n}]`);let r=[+n];a.find("li").each((function(){r.push(e(this).data("id"))}));const i=[];for(;r.length;){const e=r.slice(0,50);i.push(e),r=r.slice(50)}i.map((e=>this.updateNodesFromServer(e,!1))).reduce(((e,t)=>e.then(t)),Promise.resolve())}},canMove:async function(e){return Promise.resolve(!0)},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 a=e(n.o),r=e(n.np),i=n.ot.get_container()[0]==n.np[0],s=a.getClassname(),o=r.getClassname(),l=t.getHints(),d=[],u=o||"Root",c=l&&void 0!==l[u]?l[u]:null;return c&&a.attr("class").match(/VirtualPage-([^\s]*)/)&&(s=RegExp.$1),c&&(d=void 0!==c.disallowedChildren?c.disallowedChildren:[]),!(0===a.data("id")||a.hasClass("status-archived")||i&&"inside"!=n.p||r.hasClass("nochildren")||d.length&&-1!=e.inArray(s,d))}}},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,a){var r=void 0!==n.ParentID&&this.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",r.length?r:-1,"last",s,(function(e){for(var t=e.attr("class"),n=0;n/g,"");var r=e(n),i=!!a.NextID&&this.getNodeByID(a.NextID),s=!!a.PrevID&&this.getNodeByID(a.PrevID),o=!!a.ParentID&&this.getNodeByID(a.ParentID),l=this.jstree("is_open",o);e.each(["id","style","class","data-pagetype"],(function(e,n){t.attr(n,r.attr(n))}));var d=t.children("ul").detach();t.html(r.html()).append(d),i&&i.length?this.jstree("move_node",t,i,"before"):s&&s.length?this.jstree("move_node",t,s,"after"):this.jstree("move_node",t,o.length?o:-1),l?this.jstree("open_node",o):this.jstree("close_node",o)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n)).length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n]):this.jstree("deselect_all")},updateNodesFromServer:function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.getIsLoaded()&&(!n||!this.getIsUpdatingTree())){var a=this;this.setIsUpdatingTree(!0),a.jstree("save_selected"),a.jstree("open_node",this.getNodeByID(0)),a.jstree("save_opened"),a.jstree("save_selected");var r=a.jstree("get_selected");return new Promise((n=>{e.ajax({url:e.path.addSearchParams(this.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(i,s){n(i),e.each(i,(function(e,n){var i=a.getNodeByID(e);n?i.length?a.updateNode(i,n.html,n):n.ParentID&&!a.find("li[data-id="+n.ParentID+"]").length?a.jstree("load_node",-1):a.createNode(n.html,n,(e=>{r.length||1!==t.length||(r=e)})):a.jstree("delete_node",i)})),r.length&&(a.jstree("deselect_all"),a.jstree("reopen"),a.jstree("select_node",r))},complete:function(){a.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")}})}))},81047:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).default.entwine("ss",(function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})}))},50628:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(19755)),_react=_interopRequireDefault(__webpack_require__(67294)),_client=__webpack_require__(20745),_IframeDialog=_interopRequireDefault(__webpack_require__(28788)),_Search=_interopRequireDefault(__webpack_require__(62266)),_Loading=_interopRequireDefault(__webpack_require__(34411)),_schemaFieldValues=__webpack_require__(48834),_Injector=__webpack_require__(54582),_lodash=_interopRequireDefault(__webpack_require__(91658));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t399?"error":"success";null===r||isSameUrl(a,r)&&isSameUrl(i,r)||window.ss.router.show(r,{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")?$(".cms-container").showLoginDialog():(0!==t.status&&s&&-1===$.inArray(s,["OK","success","load","HTTP/2.0 200"])&&statusMessage(decodeURIComponent(s),o),ajaxCompleteEvent(this))})),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).off("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 a in e)t[a]!==e[a]&&(t[a]=e[a],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"),a=this.find(".cms-preview");if(n.css({"min-width":0}),a.css({"min-width":0}),n.width()+a.width()>=e.minContentWidth+e.minPreviewWidth)n.css({"min-width":e.minContentWidth}),a.css({"min-width":e.minPreviewWidth}),a.trigger("enable");else if(a.trigger("disable"),"split"==t)return a.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)")),a=!0;return!n.length||(n.each((function(){$(this).confirmUnsavedChanges()||(a=!1)})),a)},loadPanel:function(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document.URL;this.checkCanNavigate(t.pjax?t.pjax.split(","):["Content"])&&(this.saveTabState(),t.__forceReferer=a,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,a){var r=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 i=e.validate(),s=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===i||i||(statusMessage("Validation failed.","bad"),s());var o=e.serializeArray();return o.push({name:$(t).attr("name"),value:"1"}),o.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs,ValidationResult"},url:e.attr("action"),data:o,type:"POST",complete:function(){s()},success:function(t,a,i){s(),e.removeClass("changed"),n&&n(t,a,i);var l=r.handleAjaxResponse(t,a,i);l&&l.filter("form").trigger("aftersubmitform",{status:a,xhr:i,formData:o})}},a)),!1},LastState:null,PauseState:!1,handleStateChange:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.history.state;if(this.getPauseState())return;this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var n=this,a=t.pjax||"Content",r={},i=a.split(","),s=this._findFragments(i);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate())return void this.reverseStateChange();if(s.length{0!==e.readyState&&"1"!==e.getResponseHeader("X-Reauthenticate")&&this.reverseStateChange()})).done(((e,a,r)=>{this.setLastState(t);var i=n.handleAjaxResponse(e,a,r,t);n.trigger("afterstatechange",{data:e,status:a,xhr:r,element:i,state:t})})).always((()=>{n.setStateChangeXHR(null),s.removeClass("loading")}));return this.setStateChangeXHR(o),o},reverseStateChange:function(){var e=this.getLastState();this.setPauseState(!0),this.setStateChangeCount(this.getStateChangeCount()-1),e&&e.path?(window.ss.router.show(e.path),this.setPauseState(!1)):(window.ss.router.back(),setTimeout((()=>{this.setPauseState(!1)})))},loadFragment:function(e,t){var n,a=this,r={},i=$("base").attr("href"),s=this.getFragmentXHR();return void 0!==s[t]&&null!==s[t]&&(s[t].abort(),s[t]=null),e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,i),r["X-Pjax"]=t,n=$.ajax({headers:r,url:e,success:function(e,t,n){var r=a.handleAjaxResponse(e,t,n,null);a.trigger("afterloadfragment",{data:e,status:t,xhr:n,elements:r})},error:function(e,t,n){a.trigger("loadfragmenterror",{xhr:e,status:t,error:n})},complete:function(){var e=a.getFragmentXHR();void 0!==e[t]&&null!==e[t]&&(e[t]=null)}}),s[t]=n,n},handleAjaxResponse:function(e,t,n,a){let r,i;if(n.getResponseHeader("X-Reload")&&n.getResponseHeader("X-ControllerURL")){const e=$("base").attr("href"),t=n.getResponseHeader("X-ControllerURL"),a=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,e);return void(document.location.href=a)}if(!e)return;var s=n.getResponseHeader("X-Title");s&&(document.title=decodeURIComponent(s.replace(/\+/g," ")));let o,l={};n.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?l=e:(i=$($.parseHTML(e,document,!1)),r="Content",i.is("form")&&!i.is("[data-pjax-fragment~=Content]")&&(r="CurrentForm"),l[r]=i),this.setRedrawSuppression(!0);try{$.each(l,(function(e,t){var n=$("[data-pjax-fragment]").filter((function(){return-1!=$.inArray(e,$(this).data("pjaxFragment").split(" "))})),a=$(t);if(o?o.add(a):o=a,a.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';var r=n.attr("style"),i=(n.parent(),["east","west","center","north","south","column-hidden"]),s=n.attr("class"),l=[];s&&(l=$.grep(s.split(" "),(function(e){return $.inArray(e,i)>=0}))),a.removeClass(i.join(" ")).addClass(l.join(" ")),r&&a.attr("style",r);var d=a.find("style").detach();d.length&&$(document).find("head").append(d),n.replaceWith(a)}));var d=o.filter("form");d.hasClass("cms-tabset")&&d.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(a&&void 0!==a.tabState?a.tabState:null),o},_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=window.ss.tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each((function(t,n){var a=$(n).attr("id");a&&$(n).data("uiTabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:a,selected:$(n).tabs("option","active")}))})),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){const t=this.find(".cms-tabset, .ss-tabset");t.length?t.each((function(){const t=$(this),n=t.attr("id"),a=e&&e[n]?e[n]:null;t.restoreState(a)})):$("#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(){this.close(),this.remove()},close(){this.renderModal(!1)},open(){this.renderModal(!0)},renderModal(e){const t=$("body").data("member-tempid"),n=$.path.addSearchParams("CMSSecurity/login",{tempid:t,BackURL:window.location.href});let a=this.getReactRoot();a||(a=(0,_client.createRoot)(this[0])),a.render(_react.default.createElement(_IframeDialog.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}))},reauthenticate(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({ReactRoot:null,onmatch:function(){this._super();const e=$('
');this.append(e);const t=(0,_client.createRoot)(e[0]);t.render(_react.default.createElement(_Loading.default,null)),this.setReactRoot(t)},onunmatch:function(){this._super();const e=this.find(".cms-loading-container");if(e&&e.length){const t=this.getReactRoot();t&&(t.unmount(),this.setReactRoot(null)),e.remove()}}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))e.stopPropagation();else{var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),a={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,a),e.preventDefault()}}}),$(".cms button.action.discard-confirmation").entwine({onclick:function(e){$(".cms-container").checkCanNavigate()||e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function(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(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{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").data();e.showcalendar?(e.showOn="button",e.locale&&$.datepicker.regional[e.locale]&&(e=$.extend(e,$.datepicker.regional[e.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(e),this._super()):this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){this.is(".no-chosen")||(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,a){e.html(t)}})):this.html(window._panelDeferredCache[t])}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("uiTabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();this.attr("id");var e=this.find("ul:first .ui-tabs-active");this.data("uiTabs")||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=$(".cms-content-filters").first(),t=this.data("collapsed");t?(this.addClass("active"),e.removeClass("cms-content-filters--hidden")):(this.removeClass("active"),e.addClass("cms-content-filters--hidden")),this.data("collapsed",!t)},onclick:function(){this.showHide()}}),$(".js-injector-boot .search-holder").entwine({Component:null,ReactRoot:null,onmatch(){this._super();const 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(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},onfocusin(){this.css("z-index","100")},onfocusout(){this.css("z-index","")},close(){$("#filters-button").showHide();if(this.data("schema").filters){const e=$(".cms-search-form").attr("action");this.closest(".cms-container").loadPanel(e,"",{},!0)}},search(e){this._super();let t=$(".cms-search-form").attr("action");if(t&&e){const n=[];for(const[t,a]of Object.entries(e))a&&(n[`q[${t}]`]=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(){const e=this.data("schema"),t=this.getComponent(),n="cms-content-tools-CMSMain"===this.closest(".cms-content-tools").attr("id");let a=this.getReactRoot();a||(a=(0,_client.createRoot)(this[0])),a.render(_react.default.createElement(t,_extends({id:"Search",identifier:"Search",display:"VISIBLE",displayBehavior:"HIDEABLE",filterPrefix:"Search__",onHide:()=>this.close(),onSearch:e=>this.search(e),borders:{left:!n}},e))),this.setReactRoot(a)}})}));var statusMessage=function(e,t){e=jQuery("
").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},75350:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(50628),r.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)}})}))},46925:function(e,t,n){"use strict";var a;((a=n(19755))&&a.__esModule?a:{default:a}).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"))}))}})}))},15878:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(50628),n(46925);var i=function(e){var t=(0,r.default)((0,r.default)(this).contents()).find(".message");if(t&&t.html()){var n=(0,r.default)(window.parent.document).find("#Form_EditForm_Members").get(0);n&&n.refresh();var a=(0,r.default)(window.parent.document).find(".cms-tree").get(0);a&&a.reload()}};(0,r.default)("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function(){this._super(),(0,r.default)(this).on("load",i)}}),r.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"))}))}})}))},8298:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};(0,r.default)(document).ready((function(){(0,r.default)(document).on("click","ul.SelectionGroup input.selector, ul.selection-group input.selector",(function(){var e=(0,r.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,r.default)(this).focus()}))}))},42886:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(43466),n(79216),n(881),r.default.entwine("ss",(function(e){e(".ss-tabset, .cms-tabset").entwine({DeferRestoreState:!1,DefferredStateOverride:null,onmatch:function(){var e=window.location.hash;""!==e&&this.openTabFromURL(e),this._super()},onadd:function(){this.on("tabsactivate",function(e,t){let{newPanel:n}=t;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this.on("tabscreate",function(e,t){let{panel:n}=t;this.lazyLoadGridFields(n),this.triggerLazyLoad(n)}.bind(this)),this._super()},restoreState:function(t){const n=void 0!==window.sessionStorage&&window.sessionStorage?window.sessionStorage.getItem("tabs-"+window.ss.tabStateUrl()):null,a=!!n&&JSON.parse(n);let r,i;const s=this.attr("id"),o=this.children("ul").children("li.ss-tabs-force-active");if(!this.data("uiTabs"))return this.setDeferRestoreState(!0),void this.setDefferredStateOverride(t);this.tabs("refresh"),o.length?r=o.first().index():t?(i=this.find(t.tabSelector),i.length&&(r=i.index())):a&&e.each(a,(function(e,t){s==t.id&&(r=t.selected)})),null!=r&&(this.tabs("option","active",r),this.parents(".cms-container").trigger("tabstaterestored"))},triggerLazyLoad:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".lazy-loadable";t.find(n).each(((t,n)=>{var a=e(n),r=n.dataset.lazyEvent||"lazyload";a.closest(".ss-tabset, .cms-tabset").is(this)&&n.dispatchEvent(new Event(r))}))},lazyLoadGridFields:function(t){t.find(".grid-field--lazy-loadable").each(((t,n)=>{e(n).closest(".ss-tabset, .cms-tabset").is(this)&&e(n).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((()=>{n.click()}))},redrawTabs:function(){this._super(),this.getDeferRestoreState()&&(this.restoreState(this.getDefferredStateOverride()),this.setDeferRestoreState(!1),this.setDefferredStateOverride(null))}}),e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("uiTabs")&&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")}})}))},8162:function(e,t,n){"use strict";var a=d(n(19755)),r=d(n(67294)),i=n(20745),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(54582)),o=n(36158);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function d(e){return e&&e.__esModule?e:{default:e}}const u=(0,s.loadComponent)("ToastsContainer");a.default.entwine("ss",(e=>{e("body").entwine({onmatch(){const t=e('
');this.append(t);(0,i.createRoot)(t[0]).render(r.default.createElement(u,null))}})})),a.default.extend({noticeAdd(e){s.default.ready((()=>{const{dispatch:t}=s.default.reducer.store;t((0,o.display)(e))}))}})},44686:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};n(43466),r.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("uiAccordion")&&this.accordion("destroy"),this._super()},getTabSet:function(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function(){this.accordion("resize")}}})}))},49785:function(e,t,n){"use strict";var a=d(n(19755)),r=d(n(67294)),i=n(20745),s=n(48834),o=n(59888),l=n(54582);function d(e){return e&&e.__esModule?e:{default:e}}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e(".js-injector-boot .TreeDropdownField").entwine({Value:null,Timer:null,Component:null,ReactRoot:null,onmatch(){this._super();const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,l.loadComponent)("TreeDropdownField",t);this.setComponent(n);const a=this.data("state")||{},r=this.data("schema")||{};r.data&&r.data.multiple?this.setValue(a.value&&a.value!==o.MULTI_EMPTY_VALUE?a.value.map((e=>Number(e))):[]):this.setValue(a.value?Number(a.value):""),this.refresh()},onunmatch(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},refresh(){const e=this.getAttributes(),t=this.getComponent();let n=this.getReactRoot();n||(n=(0,i.createRoot)(this[0])),n.render(r.default.createElement(t,u({},e,{onChange:e=>{this.setValue(e),this.refresh(),clearTimeout(this.getTimer());const t=setTimeout((()=>{this.find("input").trigger("change")}),0);this.setTimer(t)},value:this.getValue(),noHolder:!0}))),this.setReactRoot(n)},getAttributes(){const e=this.data("state"),t=this.data("schema");return(0,s.schemaMerge)(t,e)}})}))},13305:function(e,t,n){"use strict";var a=l(n(19755)),r=l(n(67294)),i=n(20745),s=n(48834),o=n(54582);function l(e){return e&&e.__esModule?e:{default:e}}a.default.entwine("ss",(e=>{e(".js-injector-boot .used-on__polyfill-holder").entwine({Timer:null,Component:null,ReactRoot:null,onmatch(){this._super();const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,o.loadComponent)("UsedOnTable",t);this.setComponent(n),this.refresh()},onunmatch(){this._super();const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))},refresh(){const e=this.getAttributes(),t=this.getComponent();let n=this.getReactRoot();n||(n=(0,i.createRoot)(this[0])),n.render(r.default.createElement(t,e)),this.setReactRoot(n)},getAttributes(){const e=this.data("state"),t=this.data("schema");return(0,s.schemaMerge)(t,e)}})}))},1913:function(e,t,n){"use strict";var a,r=(a=n(91296))&&a.__esModule?a:{default:a};!function(e){e.fn.changetracker=function(t){var n=this;if(this.length>1)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 a=e.extend({},this.defaults,t);if(this.initialize=function(){e.meta&&(a=e.extend({},a,this.data())),n.data("dirty",!1);var t=function(t){if(t.is(":radio")){var a=n.find(":input[name="+t.attr("name")+"]:checked");return a.length?a.val():0}if(t.is(":checkbox"))return t.is(":checked")?1:0;var r=t.val();if(t&&t.hasClass("htmleditor"))switch(t.data("editor")||"default"){case"tinyMCE":case"default":var i=e.extend({forced_root_block:"p"},t.data("config")),s=tinymce.html.Serializer(i),o=tinymce.html.DomParser(i);r=s.serialize(o.parse(r))}return r},i=function(){var a=[];return n.getFields().each((function(){var n=e(this).prop("name");n&&a.push({name:n,value:t(e(this))})})),JSON.stringify(a)},s=i(),o=(0,r.default)((function(t){if(!t||!e(t.target).is(a.ignoreFieldSelector)){var r,o=(r=i(),n.data("dirty")||s!==r);n.toggleClass(a.changedCssClass,o)}}),250,{leading:!0,trailing:!0}),l=(0,r.default)((function(r){var i=e(r.target),s=i.data("changetracker.origVal");if(!i.is(a.ignoreFieldSelector)){var l=t(i);null===s||l!==s?(i.addClass(a.changedCssClass),n.addClass(a.changedCssClass)):(i.removeClass(a.changedCssClass),i.is(":radio")&&n.find(":radio[name="+i.attr("name")+"]").removeClass(a.changedCssClass),o())}}),250,{leading:!0,trailing:!0});n.on("click.changetracker",a.fieldSelector,l),n.on("keyup.changetracker",a.fieldSelector,l),n.on("change.changetracker",a.fieldSelector,l),n.on("change.changetracker",o),this.getFields().each((function(){var n=t(e(this));e(this).data("changetracker.origVal",n)})),n.on("dirty.changetracker",(function(){n.data("dirty",!0),o()})),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(a.changedCssClass)},this.resetField=function(t){return e(t).removeData("changetracker.origVal").removeClass(a.changedCssClass)},this.getFields=function(){return this.find(a.fieldSelector).not(a.ignoreFieldSelector+", .search-box *")},"string"==typeof arguments[0]){var i=Array.prototype.slice.call(arguments);return i.splice(0,1),this[arguments[0]].apply(this,i)}n=this;return setTimeout((function(){n.initialize()}),0),this}}(jQuery)},88854:function(e,t,n){"use strict";var a,r=(a=n(19755))&&a.__esModule?a:{default:a};(0,r.default)(window),(0,r.default)("html"),(0,r.default)("head");var i={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===r.default.type(e))return e;var t=i.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||"";for(var n=(t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"")?t.split("/"):[],a=e.split("/"),r=0;r');t.on("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).on("resize.ssdialog",(function(){e._resizeIframe()}))},close:function(){r.default.ui.dialog.prototype.close.call(this),this.uiDialog.off("resize.ssdialog"),(0,r.default)(window).off("resize.ssdialog")},_resizeIframe:function(){var e,t,n={},a=this.element.children("iframe");this.options.widthRatio&&(e=(0,r.default)(window).width()*this.options.widthRatio,this.options.minWidth&ðis.options.maxWidth?n.width=this.options.maxWidth:n.width=e),this.options.heightRatio&&(t=(0,r.default)(window).height()*this.options.heightRatio,this.options.minHeight&&tthis.options.maxHeight?n.height=this.options.maxHeight:n.height=t),jQuery.isEmptyObject(n)||(this._setOptions(n),a.attr("width",n.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),a.attr("height",n.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 a=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var i=(0,r.default)(' ').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover((function(){i.addClass("ui-state-hover")}),(function(){i.removeClass("ui-state-hover")})).focus((function(){i.addClass("ui-state-focus")})).blur((function(){i.removeClass("ui-state-focus")})).mousedown((function(e){e.stopPropagation()})).appendTo(a);(this.uiDialogTitlebarCloseText=(0,r.default)(" ")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(i)}(0,r.default)(" ").addClass("ui-dialog-title").attr("id",n).html(t).prependTo(a);a.find("*").add(a).disableSelection()},destroy:function(){this.element.off(".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)}})},1591:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(94301)),r=o(n(82702)),i=o(n(27354)),s=o(n(21965));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){let t=null,n=null;if(!(e.status>=200&&e.status<300))throw n=new Error(e.statusText),n.response=e,n;return t=e,t}function d(e){let t=null;if(e instanceof FormData||"string"==typeof e)t=e;else{if(!e||"object"!=typeof e)throw new Error("Invalid body type");t=JSON.stringify(e)}return t}function u(e,t){switch(e){case"application/x-www-form-urlencoded":return i.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){return e.text().then((t=>function(e,t){switch(e){case"application/x-www-form-urlencoded":return i.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}`)}}(e.headers.get("Content-Type"),t)))}r.default.polyfill();const f=new class{constructor(){this.fetch=a.default}createEndpointFetcher(e){var t=this;const n=Object.assign({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),a={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach((e=>{a[n[e]]&&(n[e]=a[n[e]])})),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Object.assign({},a,{Accept:n.responseFormat,"Content-Type":n.payloadFormat}),i=s.default.recursive({},n.defaultData,e),o=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{setFromData:!1},r=t;return r=function(e,t){return""===t?e:e.match(/\?/)?`${e}&${t}`:`${e}?${t}`}(r,u("application/x-www-form-urlencoded",Object.keys(n).reduce(((t,r)=>{const i=e[r],s=!0===a.setFromData&&!(i&&!0===i.remove),o=i&&!0===i.querystring&&!0!==i.remove;return s||o?Object.assign(t,{[r]:n[r]}):t}),{}))),r=Object.keys(e).reduce(((t,a)=>{const r=e[a].urlReplacement;return r?t.replace(r,n[a]):t}),r),r}(n.payloadSchema,n.url,i,{setFromData:"get"===n.method.toLowerCase()}),l="get"!==n.method.toLowerCase()?u(n.payloadFormat,function(e,t){return Object.keys(t).reduce(((n,a)=>{const r=e[a];return!r||!0!==r.remove&&!0!==r.querystring?Object.assign(n,{[a]:t[a]}):n}),{})}(n.payloadSchema,i)):"",d="get"===n.method.toLowerCase()?[o,r]:[o,l,r];return t[n.method.toLowerCase()](...d).then(c)}}get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(l)}post(e){let 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:"post",credentials:"same-origin",body:d(t),headers:Object.assign({},{"Content-Type":"application/x-www-form-urlencoded"},n)}).then(l)}put(e){let 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:d(t),headers:n}).then(l)}delete(e){let 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:d(t),headers:n}).then(l)}};var p=f;t.default=p},94974:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=class{static get(e){return window.ss.config[e]}static getAll(){return window.ss.config}static getSection(e){return window.ss.config.sections.find((t=>t.name===e))}static getCurrentSection(){}};t.default=n},95837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeQuery=function(e){return r.default.parse(e.replace(/^\?/,""))},t.fileSize=function(e){let t=null,n="";e<1024?(t=e,n="bytes"):e<10240?(t=Math.round(e/1024*10)/10,n="KB"):e<1048576?(t=Math.round(e/1024),n="KB"):e<10485760?(t=Math.round(e/1048576*10)/10,n="MB"):e<1073741824&&(t=Math.round(e/1048576),n="MB");(t||0===t)&&n||(t=Math.round(e/1073741824*10)/10,n="GB");if(isNaN(t))return a.default._t("Admin.NO_SIZE","N/A");return`${t} ${n}`},t.getFileExtension=function(e){return/[.]/.exec(e)?e.replace(/^.+[.]/,""):""};var a=i(n(4754)),r=i(n(27354));function i(e){return e&&e.__esModule?e:{default:e}}},54582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlTemplates=t.default=void 0,Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"injectGraphql",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"provideContext",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"provideInjector",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"withInjector",{enumerable:!0,get:function(){return i.default}});var a=c(n(73318)),r=c(n(17176)),i=c(n(40342)),s=c(n(34717)),o=c(n(92475)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(a,i,s):a[i]=e[i]}a.default=e,n&&n.set(e,a);return a}(n(20057));t.graphqlTemplates=l;var d=c(n(92456));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}var f=c(n(32869)).default;t.default=f},80507:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new class{constructor(){this.reset()}reset(){this.childRoutes=[],this.rootRoute={path:"/",routes:()=>this.getChildRoutes()}}updateRootRoute(e){this.rootRoute=Object.assign({},this.rootRoute,e)}add(e){let t=arguments.length>1&&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));const n=this.findChildRoute(t),a=Object.assign({},{routes:[]},e);let r=a.routes[a.routes.length-1];r&&"**"===r.path||(r={path:"**"},a.routes.push(r));const i=n.findIndex((t=>t.path===e.path));i>=0?n[i]=a:n.unshift(a)}findChildRoute(e){let t=this.childRoutes;return e&&e.forEach((e=>{const n=t.find((t=>t.path===e));if(!n)throw new Error(`Parent path ${e} could not be found.`);t=n.routes})),t}getRootRoute(){return this.rootRoute}getChildRoutes(){return this.childRoutes}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=this.findChildRoute(t),a=n.findIndex((t=>t.path===e));return a<0?null:n.splice(a,1)[0]}};var n=window.ss.routeRegister;t.default=n},15586:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=o(n(50650)),i=o(n(8575)),s=o(n(91658));function o(e){return e&&e.__esModule?e:{default:e}}r.default.oldshow||(r.default.oldshow=r.default.show),r.default.setAbsoluteBase=function(e){r.default.absoluteBaseURL=e.replace(/\/?$/,"/");const t=document.createElement("a");t.href=e;let n=t.pathname;n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n=`/${n}`),r.default.base(n)}.bind(r.default),r.default.getAbsoluteBase=function(){return r.default.absoluteBaseURL}.bind(r.default),r.default.resolveURLToBase=function(e){const t=r.default.getAbsoluteBase(),n=i.default.resolve(t,e);if(0!==n.indexOf(t))return n;const a=new RegExp(`^${(0,s.default)(t)}/?`);return n.replace(a,"/")}.bind(r.default),r.default.show=(a=r.default.oldshow,(e,t,n,i)=>a(r.default.resolveURLToBase(e),t,n,i)),r.default.routeAppliesToCurrentLocation=function(e){return new r.default.Route(e).match(r.default.current,{})},window.ss=window.ss||{},window.ss.router=window.ss.router||r.default;var l=window.ss.router;t.default=l},56503:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitiseShortCodeProperties=t.default=t.createHTMLSanitiser=void 0;var a,r=(a=n(4754))&&a.__esModule?a:{default:a};const i=e=>e.toString().slice(1,-1),s=i(/((?:[,\s]+(?:[a-z0-9\-_]+)=(?:(?:[a-z0-9\-_]+)|(?:\d+\.\d+)|(?:'[^']*')|(?:"[^"]*")))*)/),o=/[,\s]+([a-z0-9\-_]+)=(?:([a-z0-9\-_]+)|(\d+\.\d+)|(?:'([^']*)')|(?:"([^"]*)"))/,l=i(/\[%s/),d=i(/\[\s*\/\s*%s\s*]/),u=i(/((?:.|\n|)*?)/),c=i(/\s*/),f={match(e,t,n){let a=`${r.default.sprintf(l,e)}${s}${c}\\]`;t&&(a=`${a}${u}${r.default.sprintf(d,e)}`);const i=new RegExp(a,"i").exec(n);if(!i)return null;return{name:e,wrapped:t,properties:this.parseProperties(i[1]),original:i[0],content:t?i[2]:null}},parseProperties(e){let t=e;const n={};let a=t.match(o);for(;a;){const e=a[1]||"",r=a[2]||a[3]||a[4]||a[5]||"";e&&(n[e]=r);const i=t.indexOf(a[0]);t=t.substr(i+a[0].length),a=t.match(o)}return n},serialise(e){const t=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{sep:",",quote:"",replacer:/[^a-z0-9\-_.]/gi}:{sep:" ",quote:'"',replacer:/"/g},n=Object.entries(e.properties).map((e=>{let[n,a]=e;return a?`${t.sep}${n}=${t.quote}${`${a}`.replace(t.replacer,"")}${t.quote}`:null})).filter((e=>null!==e)).join("");return e.wrapped?`[${e.name}${n}]${e.content}[/${e.name}]`:`[${e.name}${n}]`}},p=()=>{const e=document.createElement("div");return t=>void 0===t?"":(e.textContent=t,e.innerHTML)};t.createHTMLSanitiser=p;t.sanitiseShortCodeProperties=e=>{const t=p();return Object.entries(e).reduce(((e,n)=>{let[a,r]=n;return{...e,[a]:t(r)}}),{})};var h=f;t.default=h},90111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(67294);class r extends a.Component{constructor(){super(),clearTimeout(null)}render(){return null}}r.propTypes={};var i=r;t.default=i},4430:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const n=(e,t)=>e?`${e}.${t}`:t;window.ss=window.ss||{},window.ss.tinymceactions=window.ss.tinymceactions||new class{constructor(){this.actions={},this.editorCommandsToUrlTestsMap={},this.defaultCommand="sslinkexternal"}addAction(e,t,a){const r=t.priority||50,i=n(a,e),s=this.getActions(e,a,!0);return t.type="menuitem",t.hasOwnProperty("onclick")&&(t.onAction=t.onclick,delete t.onclick),s.find((e=>t.text===e.text))||(this.actions[i]=[...this.getActions(e,a,!1),{...t,priority:r}]),this}getActions(e,t){let a=t&&!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])||!this.actions[e]?[]:this.actions[e];const r=n(t,e);return t&&this.actions[r]&&(a=[...a,...this.actions[r]]),a}getSortedActions(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.getActions(e,t,n).sort(((e,t)=>{const n=t.priority-e.priority;return n||(e.text.toLocaleLowerCase()>t.text.toLocaleLowerCase()?1:-1)}))}addCommandWithUrlTest(e,t){return this.editorCommandsToUrlTestsMap[e]=t,this}setDefaultCommand(e){return this.defaultCommand=e,this}getDefaultCommand(){return this.defaultCommand}getEditorCommandFromUrl(e){let t=this.getDefaultCommand();const n=Object.keys(this.editorCommandsToUrlTestsMap).find((t=>this.editorCommandsToUrlTestsMap[t]&&this.editorCommandsToUrlTestsMap[t].test(e)));return n&&(t=n),t}};var a=window.ss.tinymceactions;t.default=a},39062:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(48966)),r=i(n(4754));function i(e){return e&&e.__esModule?e:{default:e}}var s=class{constructor(e){this.setValues(e)}setValues(e){this.values=e}getFieldValue(e){let t=this.values[e];return"string"!=typeof t&&(t=null==t||!1===t?"":t.toString()),t}validateValue(e,t,n){if(""===e)return"required"!==t;switch(t){case"equals":{const t=this.getFieldValue(n.field);return a.default.equals(e,t)}case"numeric":return a.default.isNumeric(e);case"date":return a.default.isDate(e);case"alphanumeric":return a.default.isAlphanumeric(e);case"alpha":return a.default.isAlpha(e);case"regex":return a.default.matches(e,n.pattern);case"max":return e.length<=n.length;case"email":return a.default.isEmail(e);default:return console.warn(`Unknown validation rule used: '${t}'`),!1}}validateFieldSchema(e){return this.validateField(e.name,e.validation,null!==e.leftTitle?e.leftTitle:e.title,e.customValidationMessage)}getMessage(e,t){const n=t.title,a="string"==typeof t.message?t.message:r.default._t(`Admin.VALIDATOR_MESSAGE_${e.toUpperCase()}`,r.default._t("Admin.VALIDATOR_MESSAGE_DEFAULT","{name} is not a valid value."));return r.default.inject(a,{name:n})}validateField(e,t,n,a){const r={valid:!0,errors:[]};if(!t)return r;const i=this.getFieldValue(e);if(""===i&&t.required){const r=Object.assign({title:""!==n?n:e},t.required);return{valid:!1,errors:[a||this.getMessage("required",r)]}}return Object.entries(t).forEach((t=>{const[a,s]=t,o=Object.assign({title:e},{title:n},s);if("required"===a)return;if(!this.validateValue(i,a,o)){const e=this.getMessage(a,o);r.valid=!1,r.errors.push(e)}})),a&&!r.valid&&(r.errors=[a]),r}};t.default=s},10259:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&void 0!==t.react)return r.default.createElement(e,n,t.react);if(t&&void 0!==t.html){if(null!==t.html){const a={__html:t.html};return r.default.createElement(e,i({},n,{dangerouslySetInnerHTML:a}))}return null}let a=null;a=t&&void 0!==t.text?t.text:t;if(a&&"object"==typeof a)throw new Error(`Unsupported string value ${JSON.stringify(a)}`);if(null!=a)return r.default.createElement(e,n,a);return null},t.mapHighlight=function(e,t,n){let a=0,i=e;const s=[],o=t.toLocaleLowerCase();for(;-1!==a;)if(a=i.toLocaleLowerCase().indexOf(o),-1!==a){const e=a+t.length,o=i.substring(0,a),l=i.substring(a,e),d=i.substring(e);o.length&&s.push(o),s.push(n?r.default.createElement(n,{key:s.length/2},l):l),i=d}return s.push(i),s};var a,r=(a=n(67294))&&a.__esModule?a:{default:a};function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t={};return e&&e.split(" ").forEach((e=>{""!==e&&(t[e]=!0)})),t};t.default=n},48942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createErrorHtml=t.createErrorBlock=void 0;var a,r=(a=n(67294))&&a.__esModule?a:{default:a};const i=e=>({type:"error",value:{react:e.map(((e,t)=>r.default.createElement("span",{key:t,className:"form__validation-message"},e)))}});t.createErrorHtml=i;const s=e=>Object.entries(e).reduce(((e,t)=>{const[n,a]=t;if(!a||!a.length)return e;const r=Array.isArray(a)?a:[a];return{...e,[n]:i(r)}}),{});t.createErrorBlock=s;var o=s;t.default=o},62819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(4311)),r=n(59768),i=s(n(25904));function s(e){return e&&e.__esModule?e:{default:e}}const o="__TEMPLATE_OVERRIDE__",l=["templateName","fields","params","fragments"],d=["options","props","variables","skip","update"],u={params:{},args:{},fields:[],fragments:[],pagination:!0,apolloConfig:{}};var c=class{constructor(e,t,n){const a={...u,...e};a.fields=[...a.fields];const{apolloConfig:r,...i}=a;this.config=i,this.apolloConfigInitValues=r,this.apolloConfigTransforms={},this.templates={...t}||{},this.fragments={...n}||{},this.reduceApolloConfig=this.reduceApolloConfig.bind(this)}setConfig(e,t){if(l.includes(e))throw new Error(`Tried to set protected config values: '${e}', which is discouraged.`);return this.config={...this.config,[e]:t},this}transformApolloConfig(e,t){const n=this.apolloConfigTransforms[e]||[];return this.apolloConfigTransforms={...this.apolloConfigTransforms,[e]:[...n,t]},this}addParam(e,t){if(!e||!t)throw new Error("addParam must be passed a name and type parameter");return this.addParams({[e]:t})}addParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.config.params;return this.config.params={...t,...e},this}addArg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.ROOT_FIELD;return this.addArgs({[e]:t},n)}addArgs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.ROOT_FIELD;const n=this.config.args[t]||{};return this.config.args[t]={...n,...e},this}addField(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.ROOT_FIELD;return this.addFields([e],t)}addFields(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.ROOT_FIELD,n=[];return t.split("/").forEach((e=>{if(e===r.ROOT_FIELD)n=this.config.fields;else{const a=n.indexOf(e),r=n[a+1];if(-1===a||!Array.isArray(r))throw new Error(`Invalid path to field: ${t}`);n=r}})),e.forEach((e=>n.push(e))),this}useFragment(e){return this.config.fragments=[...this.config.fragments,e],this}useTemplate(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}addTempFragment(e,t){return this.fragments={...this.fragments,[e]:t},this.useFragment(e)}setTemplate(e){this.config.templateName=o;for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a{const a=n(e);return this.coallesceData(t,e,a)},a=this.apolloConfigInitValues[t],r=this.apolloConfigTransforms[t]||[];if(d.includes(t)){const i=function(){for(var e=arguments.length,i=new Array(e),s=0;se(...i)));return"update"===t?null:l.reduce(n,o)};return{...e,[t]:i}}if(null==a)return e;const i=r.reduce(n,a);return{...e,[t]:i}}getConfig(){return{...this.config,availableFragments:{...this.fragments}}}getApolloConfig(){return[...Object.keys(this.apolloConfigInitValues),...Object.keys(this.apolloConfigTransforms)].filter(((e,t,n)=>n.indexOf(e)===t)).reduce(this.reduceApolloConfig,{})}getGraphqlAST(){const e=this.getConfig(),t=this.getRawTemplate(e.templateName),n=t.expressions.map((t=>"function"!=typeof t?t:t(e)));return(0,a.default)(t.strings,...n)}getContainer(){return new i.default(this.getGraphqlAST(),this.getApolloConfig())}};t.default=c},25904:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(95344);var r=class{constructor(e,t){this.graphqlAST=e,this.apolloConfig=t}getApolloHOC(){return(0,a.graphql)(this.graphqlAST,this.apolloConfig)}getGraphqlAST(){return this.graphqlAST}getApolloConfig(){return this.apolloConfig}};t.default=r},32869:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(2337)),r=l(n(86046)),i=l(n(77192)),s=l(n(47289)),o=l(n(2661));function l(e){return e&&e.__esModule?e:{default:e}}const d=(0,a.default)();d.register("component",(0,r.default)()),d.register("reducer",(0,i.default)()),d.register("form",(0,s.default)()),d.register("query",(0,o.default)());var u=d;t.default=u},15746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(94184)),r=l(n(59572)),i=n(11962),s=n(48834),o=l(n(72208));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>e;var u=class{constructor(e,t){const n=e.state||{},a=n.fields||[];this.schema={...e,state:{...n,fields:[...a]}},this.mockGlobalState=(0,r.default)({},e.name,t)}getFieldByName(e){const t={fields:[],actions:[],...this.schema.schema},n=[...t.fields,...t.actions],a=(0,s.findField)(n,e),r=this.schema.state.fields.find((t=>t.name===e));return(0,s.schemaMerge)(a,r)}mutateField(e,t){const n=this.schema.state.fields||[],a=n.findIndex((t=>t.name===e));if(a<0)return this;const r=[...n],i=this.getFieldByName(e);return r[a]=(0,s.schemaMerge)(i,t(i)),this.schema.state.fields=r,this}updateField(e,t){return this.mutateField(e,(e=>({...e,...t})))}updateFields(e){return Object.keys(e).forEach((t=>{this.updateField(t,e[t])})),this}setFieldComponent(e,t){return this.updateField(e,{component:t})}setFieldClass(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.mutateField(e,(e=>{const r=(0,o.default)(e.extraClass);return r[t]=n,{...e,extraClass:(0,a.default)(r)}}))}addFieldClass(e,t){return this.setFieldClass(e,t,!0)}removeFieldClass(e,t){return this.setFieldClass(e,t,!1)}getValues(){return(0,i.getFormValues)(this.schema.name,d)(this.mockGlobalState)||{}}getValue(e){return this.getValues()[e]}isDirty(){return(0,i.isDirty)(this.schema.name,d)(this.mockGlobalState)}isPristine(){return(0,i.isPristine)(this.schema.name,d)(this.mockGlobalState)}isValid(){return(0,i.isValid)(this.schema.name,d)(this.mockGlobalState)}isInvalid(){return(0,i.isInvalid)(this.schema.name,d)(this.mockGlobalState)}getState(){return this.schema}};t.default=u},86745:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=class{constructor(e){this.values=e,this.errorMap={}}addError(e,t){if(!this.fieldExists(e))throw new Error(`Tried to add error to non-existent field: ${e}`);return this.errorMap[e]||(this.errorMap[e]=[]),this.errorMap[e]=[...this.errorMap[e],t],this}addErrors(e){return Object.entries(e).forEach((e=>{const[t]=e;let[,n]=e;Array.isArray(n)||(n=[n]),n.forEach((e=>this.addError(t,e)))})),this}clearErrors(e){if(!this.fieldExists(e))throw new Error(`Tried to clear errors for non-existent field: ${e}`);return delete this.errorMap[e],this}hasError(e){return this.fieldExists(e)&&!!this.getErrors(e).length}fieldExists(e){return Object.keys(this.values).includes(e)}getErrors(e){if(!this.fieldExists(e))throw new Error(`Tried to get errors for non-existent field: ${e}`);return this.errorMap[e]||[]}reset(){this.errorMap={}}getState(){return this.errorMap}};t.default=n},61111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GLOBAL_CONTEXT=void 0;var a,r=(a=n(94633))&&a.__esModule?a:{default:a};const i="before",s="after",o="__HEAD__",l="__TAIL__",d=[i,s],u="__GLOBAL__";t.GLOBAL_CONTEXT=u;var c=class{constructor(){this._middlewares=[],this._contextCache={}}sort(){const e=[o,l],t=[e];let n=[];return this._middlewares.forEach((e=>{const{name:n}=e,a=(e=>{let t=null;return d.forEach((n=>{if(e[n].includes("*")){if(e[n].length>1)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})(e);a===s?t.push([l,n]):a===i?t.push([n,o]):(t.push([n,l]),t.push([o,n]),e[i].forEach((e=>{t.push([n,e])})),e[s].forEach((e=>{t.push([e,n])})))})),(0,r.default)(t).filter((t=>!e.includes(t))).forEach((e=>{n=n.concat(this._middlewares.filter((t=>t.name===e)))})),this._middlewares=n,this}add(e,t,n){(e=>{d.forEach((t=>{if(void 0!==e[t]&&"string"!=typeof e[t]&&!Array.isArray(e[t]))throw new Error(`Middleware key ${t} must be a string or array`)}))})(e),this._contextCache={};let a=n;a&&a.length?Array.isArray(a)||(a=[a]):a=[u];const r={...e,factory:t,context:a};return d.forEach((t=>{Array.isArray(e[t])?r[t]=e[t]:r[t]=e[t]?[e[t]]:[]})),d.every((e=>!r[e].length))&&(r[s]=[o],r[i]=[l]),this._middlewares.push(r),this}getMatchesForContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u;if(!this._contextCache[e]){const t=e.split(".");this._contextCache[e]=this._middlewares.filter((e=>e.context[0]===u||e.context.every(((e,n)=>"*"===e||t[n]===e))))}return this._contextCache[e]}};t.default=c},32659:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(79298)),r=o(n(59572)),i=n(11962),s=o(n(54582));function o(e){return e&&e.__esModule?e:{default:e}}const l=[i.actionTypes.REGISTER_FIELD,i.actionTypes.DESTROY];var d=e=>()=>(t,n)=>{const i=e(t,n),o=n.meta&&n.meta.form;if(!o||l.includes(n.type))return i;const d=s.default.form.getSchema(o);if(!d)return i;const u=(0,a.default)(i.formState,o);if(!u)return i;let c={...i};const f=Object.entries(i.formSchemas).filter((e=>{let[,t]=e;return t.name===o}));return f.length?(f.forEach((e=>{let[t,n]=e;const a=d(n,u);if(!a.state||!Array.isArray(a.state.fields))throw new Error(`\n One more calls to alterSchema did not return a properly formed schema state\n object. Check your calls to Injector.transform() which could affect '${t}'.\n `);c=(0,r.default)(c,`formSchemas.${t}.state`,a.state)})),c):i};t.default=d},28439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(58963)),r=i(n(62819));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return{...e,templates:{...t},fragments:{...n},scaffold(e,t,n){let{force:a}=n;throw new Error("This API endpoint is not available yet")},register(t,n){const{templateName:a}=n;if(!a||!this.templates[a])throw new Error(`\nTried to register a new query '${t}' without a defined template '${a}'. Please ensure the\ntemplateName config is defined and that you have registered the template before registering a query.\n `);for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s1&&void 0!==arguments[1]?arguments[1]:{};return e.isProtected.call(this),function(e){if(n.templates[t]&&!a)throw new Error(`\nTried to register template '${t}' more than once. This practice is discouraged. Consider\nusing Injector.update() to enhance the template rather than override it completely.\nOtherwise, invoke the registerTemplate() function with '{ force: true }' as the second argument.\n `);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:{};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={...this.fragments,[t]:n}},getTemplates(){return{...this.templates}},getFragments(){return{...this.fragments}},getProcessedManager(e,t){const n=t.map((e=>e.factory)).reverse(),a=this.services[e],i=new r.default(a,{...this.templates},{...this.fragments});return n.forEach((e=>{e(i)}),a),i},getFactory(e,t){return this.getProcessedManager(e,t).getContainer()}}};t.default=s},2661:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=p(n(58963)),r=p(n(28439)),i=p(n(35058)),s=p(n(98710)),o=p(n(25898)),l=p(n(86920)),d=p(n(50596)),u=p(n(39192)),c=n(20057),f=n(35633);function p(e){return e&&e.__esModule?e:{default:e}}const h={[c.CREATE]:(0,i.default)(f.captureTag),[c.READ]:(0,s.default)(f.captureTag),[c.READ_ONE]:(0,o.default)(f.captureTag),[c.UPDATE]:(0,l.default)(f.captureTag),[c.DELETE]:(0,d.default)(f.captureTag),[c.QUERY]:(0,u.default)(f.captureTag)};var m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)();return(0,r.default)(e,h)};t.default=m},58963:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(14890),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=r?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(a,s,o):a[s]=e[s]}a.default=e,n&&n.set(e,a);return a}(n(61111));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}var s=()=>({middlewareRegistries:{},services:{},factories:{},factoryCache:{},initialised:!1,isProtected(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised")},get(e,t){if(!this.initialised)throw new Error("\n Injector.get(): Attempted to access DI layer before it was initialised.\n Did you forget to invoke Injector.load()?");const n=this.factories[e];if(!n)throw new Error(`Injector.get(): Component ${e} does not exist`);return n(t)},customise(e,t,n){this.isProtected();const[a,...i]=t.split(".");let s=this.middlewareRegistries[a];s||(s=new r.default,this.middlewareRegistries={...this.middlewareRegistries,[a]:s}),s.add(e,n,i)},load(){var e=this;this.isProtected(),this.factories=Object.keys(this.services).reduce(((t,n)=>{const a=this.middlewareRegistries[n];return a?(a.sort(),{...t,[n]:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.GLOBAL_CONTEXT;const i=`${n}__${t}`;if(!e.factoryCache[i]){const r=a.getMatchesForContext(t);e.factoryCache[i]=e.getFactory(n,r)}return e.factoryCache[i]}}):{...t,[n]:()=>this.getFactory(n,[])}}),{}),this.initialised=!0},register(e,t){let{force:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.isProtected(),this.services[e]&&!0!==n)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={...this.services,[e]:t}},registerMany(e){let{force:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.isProtected();const n=Object.keys(e),a=Object.keys(this.services).filter((e=>n.includes(e)));if(a.length&&!0!==t){const e=a.join(", ");throw new Error(`\n Tried to register services (${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={...this.services,...e}},transform(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isProtected(),t(this.createTransformer(e,n))},createTransformer(e,t){return(n,a)=>{this.customise({name:e,...t},n,a)}},getFactory(e,t){const n=this.services[e],r=t.map((e=>e.factory));return(0,a.compose)(...r)(n)}});t.default=s},86046:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(58963))&&a.__esModule?a:{default:a};var i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.default)();return{...e,get(t,n){for(var a=arguments.length,r=new Array(a>2?a-2:0),i=2;i{this.customise({name:e,...t,displayName:r},n,a)}},getFactory(t,n){const a=e.getFactory.call(this,t,n),r=n.map((e=>e.displayName||e.name));var i,s;return a.displayName=(i=this.services[t],s=r,[i.displayName||i.name||"Component",...s].reduce(((e,t)=>`${t}(${e})`))),a}}};t.default=i},47289:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.VALIDATION_MIDDLEWARE_SERVICE=t.SCHEMA_MIDDLEWARE_SERVICE=void 0;var a=s(n(58963)),r=s(n(15746)),i=s(n(86745));function s(e){return e&&e.__esModule?e:{default:e}}const o="FormSchemaMiddleware";t.SCHEMA_MIDDLEWARE_SERVICE=o;const l="FormValidationMiddleware";t.VALIDATION_MIDDLEWARE_SERVICE=l;var d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)();return{...e,services:{[o]:e=>e,[l]:function(e){return arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}}},register(){throw new Error(`\n Attempted to register a service on Injector.form. This container accepts only two\n services by design (${o} and ${l}) \n for updating form schema and adding validation, respectively. Consider using a more\n generic container, e.g. Injector.reducer.\n `)},registerMany(){this.register()},getSchema(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r(r,i)=>e.customise.call(this,{name:t,...n},`${a}.${r}`,i);return{alterSchema:a(o),addValidation:a(l)}},getFactory(e,t){const n=t.map((e=>e.factory));if(e===o)return this.getSchemaReducer(n);if(e===l)return this.getValidationReducer(n);throw new Error(`Invalid service for form injector: ${e}`)},getSchemaReducer(e){return(t,n)=>e.reduce(((e,t)=>{const a=t(new r.default(e,n));return{...e,...a}}),t)},getValidationReducer(e){return(t,n)=>{const a=new i.default(t);return e.forEach((e=>e(t,a,n))),a.getState()}}}};t.default=d},2337:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=()=>({services:{},initialised:!1,callbacks:[],onInit:null,register(e,t){let{force: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");if(this.services[e]&&!0!==n)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 `);const a=["load","createTransformer","get","register"];if(!a.every((e=>"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: ${a.join(", ")}\n `);this.services[e]=t,this[e]=t},load(){if(this.initialised)throw new Error("Cannot mutate DI container after it has been initialised");Object.values(this.services).forEach((e=>e.load())),this.initialised=!0,this.onInit&&this.onInit(),this.callbacks.forEach((e=>{e()})),this.callbacks=[]},transform(e,t){let 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(((t,a)=>{let[r,i]=a;return{...t,[r]:i.createTransformer(e,n)}}),{}))},ready(e){if("function"!=typeof e)throw new Error("Callback provided is not a function");this.initialised?e():this.callbacks=[...this.callbacks,e]},init(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=n},77192:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(58963)),r=i(n(61111));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,a.default)(),store:null,setStore(e){this.store=e},customise(e,t,n){this.isProtected();let a=this.middlewareRegistries[t];a||(a=new r.default,this.middlewareRegistries={...this.middlewareRegistries,[t]:a});a.add(e,(e=>{const t=this.store&&this.store.getState;return n(e)(t)}))},getAll(){return this.initialised?Object.entries(this.factories).reduce(((e,t)=>{let[n,a]=t;return{...e,[n]:a()}}),{}):Object.entries(this.services).reduce(((e,t)=>{let[n,a]=t;return{...e,[n]:a}}),{})}}};t.default=s},39192:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(35633),r=n(59768);const i=e=>{let{operationName:t,queryName:n}=e;return t||`${n.charAt(0).toUpperCase()}${n.slice(1)}`},s=e=>{let{queryName:t}=e;return t},o=e=>{let{queryType:t}=e;return t};var l=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.defaultTag)`${o} ${i}${r.getVariables} {
${s}(${r.getParams}) {
${r.getFields}
}
diff --git a/client/src/containers/FormBuilderLoader/FormBuilderLoader.js b/client/src/containers/FormBuilderLoader/FormBuilderLoader.js
index aa800a121..11ad0bc26 100644
--- a/client/src/containers/FormBuilderLoader/FormBuilderLoader.js
+++ b/client/src/containers/FormBuilderLoader/FormBuilderLoader.js
@@ -350,6 +350,7 @@ class FormBuilderLoader extends Component {
return formSchema;
})
.catch((error) => {
+ this.setState({ didError: true });
this.props.actions.schema.setSchemaLoading(this.props.schemaUrl, false);
if (typeof this.props.onLoadingError === 'function') {
return this.props.onLoadingError(this.normaliseError(error));
@@ -411,10 +412,13 @@ class FormBuilderLoader extends Component {
}
render() {
- const Loading = this.props.loadingComponent;
+ if (this.state && this.state.didError) {
+ return null;
+ }
// If the response from fetching the initial data
// hasn't come back yet, don't render anything.
if (!this.props.schema || !this.props.schema.schema || this.props.loading) {
+ const Loading = this.props.loadingComponent;
return ;
}
diff --git a/client/src/legacy/TinyMCE_sslink-email.js b/client/src/legacy/TinyMCE_sslink-email.js
index b33b30036..698845d82 100644
--- a/client/src/legacy/TinyMCE_sslink-email.js
+++ b/client/src/legacy/TinyMCE_sslink-email.js
@@ -61,11 +61,7 @@ jQuery.entwine('ss', ($) => {
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
- 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() === '';
+ const requireLinkText = this.getRequireLinkText();
// create/update the react component
let root = this.getReactRoot();
diff --git a/client/src/legacy/TinyMCE_sslink-external.js b/client/src/legacy/TinyMCE_sslink-external.js
index b75ada4ee..7814600f3 100644
--- a/client/src/legacy/TinyMCE_sslink-external.js
+++ b/client/src/legacy/TinyMCE_sslink-external.js
@@ -56,11 +56,7 @@ jQuery.entwine('ss', ($) => {
const handleHide = () => this.close();
const handleInsert = (...args) => this.handleInsert(...args);
const attrs = this.getOriginalAttributes();
- 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() === '';
+ const requireLinkText = this.getRequireLinkText();
// create/update the react component
let root = this.getReactRoot();
diff --git a/client/src/legacy/TinyMCE_sslink.js b/client/src/legacy/TinyMCE_sslink.js
index e0e1e0305..c20eb8b44 100644
--- a/client/src/legacy/TinyMCE_sslink.js
+++ b/client/src/legacy/TinyMCE_sslink.js
@@ -134,6 +134,68 @@ jQuery.entwine('ss', ($) => {
/* noop */
},
+ /**
+ * Check if one node is the same as another node (or is the same as that other node's child)
+ */
+ checkNodeMatches(node, matchWith) {
+ if (node === matchWith) {
+ return true;
+ }
+ if (matchWith.children.length === 1) {
+ // In chrome, selecting an image actually results in selecting the paragraph.
+ // If there's exactly one child, treat that child as the selection to account for this scenario.
+ return node === matchWith.children[0];
+ }
+ return false;
+ },
+
+ /**
+ * @param selection The current tinyMCE selection for this WYSIWYG
+ * @return {Boolean}
+ */
+ linkCanWrapSelection(editor, selection) {
+ const selectionContent = editor.getSelection() || '';
+ const node = selection.getNode();
+
+ // If there is direct selected content other than whitespace, we can wrap it.
+ if (selectionContent) {
+ return selectionContent.trim() !== '';
+ }
+
+ // If the selected node type can contain text, and we didn't find selected text above,
+ // then you haven't got a selection we can wrap in a link.
+ const x = document.createElement(node.nodeName);
+ x.textContent = 'Check the outer HTML';
+ if (x.outerHTML.includes('Check the outer HTML')) {
+ return false;
+ }
+
+ // Check if there is a single selected node which can be wrapped in a link.
+ if (this.checkNodeMatches(node, selection.getSel().focusNode) && this.checkNodeMatches(node, selection.getSel().anchorNode)) {
+ const parsed = tinymce.activeEditor.dom.createFragment(`${node.outerHTML} `);
+ if (parsed.childNodes.length === 1) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ /**
+ * Determine whether to show the link text field
+ *
+ * @return {Boolean}
+ */
+ getRequireLinkText() {
+ const editor = this.getElement().getEditor();
+ const selection = editor.getInstance().selection;
+ const isValidSelection = this.linkCanWrapSelection(editor, selection);
+ const tagName = selection.getNode().tagName;
+ const requireLinkText = tagName !== 'A' && !isValidSelection;
+
+ return requireLinkText;
+ },
+
/**
* Default behaviour, recommended to overload this and sanitise where needed
*
diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php
index 6b38c9d40..1c3f5b1b3 100644
--- a/code/LeftAndMain.php
+++ b/code/LeftAndMain.php
@@ -1814,6 +1814,8 @@ public function SiteConfig()
/**
* The urls used for the links in the Help dropdown in the backend
*
+ * Set this to `false` via yml config if you do not want to show any help links
+ *
* @config
* @var array
*/
@@ -1833,13 +1835,16 @@ public function getHelpLinks()
$helpLinks = $this->config()->get('help_links');
$formattedLinks = [];
- foreach ($helpLinks as $key => $value) {
- $translationKey = str_replace(' ', '', $key ?? '');
+ // Setting the `help_links` config to `false` means no help links will show
+ if (is_array($helpLinks)) {
+ foreach ($helpLinks as $key => $value) {
+ $translationKey = str_replace(' ', '', $key ?? '');
- $formattedLinks[] = [
- 'Title' => _t(__CLASS__ . '.' . $translationKey, $key),
- 'URL' => $value
- ];
+ $formattedLinks[] = [
+ 'Title' => _t(__CLASS__ . '.' . $translationKey, $key),
+ 'URL' => $value
+ ];
+ }
}
return ArrayList::create($formattedLinks);
diff --git a/tests/php/LeftAndMainTest.php b/tests/php/LeftAndMainTest.php
index 7f3f78ab4..cc1d4a3de 100644
--- a/tests/php/LeftAndMainTest.php
+++ b/tests/php/LeftAndMainTest.php
@@ -210,6 +210,13 @@ public function testGetHelpLinks()
$this->assertEquals('www.silverstripe.org', $silverstripeLink['URL']);
}
+ public function testDisableHelpLinks()
+ {
+ Config::modify()->set(LeftAndMain::class, 'help_links', false);
+ $helpLinks = LeftAndMain::singleton()->getHelpLinks();
+ $this->assertCount(0, $helpLinks);
+ }
+
/**
* @dataProvider provideTestCMSVersionNumber
*/