diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 8a66ecd65..91ee15939 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -(self.webpackChunksilverstripe_admin=self.webpackChunksilverstripe_admin||[]).push([[23],{35962:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(74692)),r=_(n(96540)),i=n(69733),s=n(5338),o=n(84976),l=_(n(80391)),d=_(n(75564)),u=_(n(3600)),c=_(n(28221)),f=_(n(95815)),p=n(76806),h=_(n(15042)),m=n(47767),g=n(13547),v=_(n(26285));function _(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e){this.store=e;const t=l.default.get("absoluteBaseUrl");d.default.setAbsoluteBase(t),this.shouldConfirmBeforeUnload=this.shouldConfirmBeforeUnload.bind(this)}setStore(e){this.store=e}start(e){this.matchesReactRoute(e)?this.initReactRouter():this.initLegacyRouter();const t=window.onbeforeunload;window.onbeforeunload=()=>this.shouldConfirmBeforeUnload()?f.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(m.Route,{path:e.path,element:r.default.createElement(e.component,null,r.default.createElement(v.default,{shouldBlockFn:this.shouldConfirmBeforeUnload,blockMessage:this.getUnsavedChangesMessage()}))},u.default.getChildRoutes().map((e=>r.default.createElement(m.Route,{key:e.path,path:e.path,element:r.default.createElement(e.component,null)}))))),{basename:(0,g.joinUrlPaths)(l.default.get("baseUrl"),l.default.get("adminUrl"))});(0,s.createRoot)(document.getElementsByClassName("cms-content")[0]).render(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,p.isDirty)(t.name,h.default)(e)})).length>0}getUnsavedChangesMessage(){return f.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.")}}},99136: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(82960)},7803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(14269)),r=l(n(78443)),i=l(n(46942)),s=n(60906),o=l(n(23977));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)}};t.default=()=>{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)=>{if(0===n.name.indexOf("ElementForm_"))return t.getState();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()}))}))}},62038:function(e,t,n){"use strict";var a=p(n(14269)),r=n(82960),i=p(n(1265)),s=p(n(80391)),o=n(91667),l=p(n(34121)),d=p(n(90420)),u=p(n(99136)),c=p(n(7803)),f=p(n(35962));function p(e){return e&&e.__esModule?e:{default:e}}window.ss=window.ss||{},window.onload=async function(){(0,l.default)(),(0,d.default)();const e=[i.default],t=s.default.get("debugging");let n=(0,r.applyMiddleware)(...e);t&&(n=(0,u.default)(n));const p=n(r.createStore),h=new f.default(null);(0,c.default)(),a.default.init((()=>{const e=(0,r.combineReducers)(a.default.reducer.getAll()),t=p(e,{});t.dispatch((0,o.setConfig)(s.default.getAll())),a.default.reducer.setStore(t),window.ss.store=t,h.setStore(t),h.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")})),window.setTimeout((()=>a.default.load()),0)}},34121:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(76806),r=ne(n(14269)),i=ne(n(35421)),s=ne(n(1541)),o=ne(n(73323)),l=ne(n(61080)),d=ne(n(2481)),u=ne(n(85281)),c=ne(n(45193)),f=ne(n(85085)),p=ne(n(81885)),h=ne(n(50237)),m=ne(n(32493)),g=ne(n(23637)),v=ne(n(21757)),_=ne(n(70077)),b=ne(n(31217)),y=ne(n(82405)),w=ne(n(77773)),C=ne(n(29981)),E=ne(n(91621)),O=ne(n(56425)),S=ne(n(60093)),T=ne(n(74491)),P=ne(n(54475)),M=ne(n(47735)),j=ne(n(23443)),D=ne(n(84265)),k=ne(n(90277)),R=ne(n(56091)),x=ne(n(46381)),I=ne(n(11463)),A=ne(n(21077)),N=ne(n(99417)),F=ne(n(25479)),L=ne(n(48749)),U=ne(n(86713)),$=ne(n(74)),B=ne(n(87523)),V=ne(n(36087)),W=ne(n(96937)),H=ne(n(5417)),q=ne(n(28557)),z=ne(n(39054)),G=ne(n(99197)),K=ne(n(89091)),X=ne(n(54663)),Y=ne(n(72973)),Q=ne(n(92797)),J=ne(n(42171)),Z=ne(n(92077)),ee=ne(n(72041)),te=ne(n(50693));function ne(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:_.default,FieldGroup:D.default,SingleSelectField:b.default,PopoverField:y.default,HeaderField:w.default,LiteralField:C.default,HtmlReadonlyField:E.default,LookupField:O.default,CompositeField:S.default,Tabs:P.default,TabItem:M.default,FormAction:j.default,LabelField:T.default,TreeDropdownField:k.default,Preview:N.default,ReduxForm:F.default,ReduxFormField:a.Field,Form:I.default,FormAlert:A.default,FormBuilderModal:R.default,NotFoundComponent:x.default,UsedOnTable:L.default,Loading:U.default,CircularLoading:$.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:X.default,HtmlEditorField:Y.default,NumberField:Q.default,PopoverOptionSet:J.default,ToastsContainer:Z.default,ListboxField:ee.default,SearchableDropdownField:te.default})}},90420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(14269)),r=n(82960),i=n(76806),s=_(n(21500)),o=_(n(76958)),l=_(n(47646)),d=_(n(76606)),u=_(n(88790)),c=_(n(71916)),f=_(n(64038)),p=_(n(29950)),h=_(n(88140)),m=_(n(26105)),g=_(n(98360)),v=_(n(53896));function _(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)}))}},33119:function(e,t,n){"use strict";n(46353),n(10098),n(10431),n(25506),n(72298),n(14992),n(83952),n(38536),n(17174),n(99855),n(47928),n(27092),n(17558),n(60022),n(7176),n(1359),n(56173),n(39636),n(75252),n(21735),n(90584),n(93772),n(55064),n(20088),n(64145),n(82414),n(67694),n(19514),n(39078),n(36726),n(90990),n(85152),n(26430),n(72250),n(39734),n(56086),n(86473),n(7057),n(15550),n(48486),n(4163),n(98461),n(33105),n(64477),n(55180),n(56779),n(73226),n(77986),n(32152),n(94571),n(59338),n(54758),n(33993),n(78769),n(58749),n(83713),n(74626),n(50121),n(60246),n(80125),n(56726),n(61455),n(80753),n(28076),n(76361),n(30521),n(82660),n(18320),n(93476),n(91484),n(97256),n(58760),n(29574),n(9360),n(98120),n(65484),n(33929),n(89513),n(36208),n(65060),n(62930),n(19081),n(52358),n(99694),n(29837),n(13776),n(46333),n(34811),n(77964),n(25897),n(74291),n(49492),n(24843),n(66711),n(95988),n(79797),n(72806),n(80597),n(2400),n(48449),n(28620),n(224),n(65376),n(84374),n(68413),n(42496),n(71285),n(76768),n(62038)},86821:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=e=>r.default.createElement("div",{className:"accordion",role:"tablist","aria-multiselectable":"true"},e.children)},97260:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=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))}},35421: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(5556)),i=n(4914),s=l(n(95815)),o=l(n(46942));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.PureComponent{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={isOpen:!1}}toggle(e){const{toggleCallback:t}=this.props;t&&t(e),window.setTimeout((()=>this.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:{}};t.default=c},1541: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(46942)),i=s(n(5556));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=t.statuses=["default","info","success","warning","danger","primary","secondary"];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};t.default=d},15357: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(69733),i=d(n(46942)),s=d(n(5556)),o=d(n(32541)),l=d(n(16939));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}))}))};t.default=(0,r.connect)((function(e){return{crumbs:e.breadcrumbs}}))(c)},61080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=o(n(73323)),i=o(n(46942)),s=o(n(95815));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=e=>{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")};t.default=d},73323:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=n(4914),i=l(n(5556)),s=l(n(46942)),o=l(n(62886));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}const u=e=>{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};t.default=(0,o.default)(u)},62886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(46942));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}t.default=e=>{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}},50237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=s(n(96540)),r=s(n(23977)),i=s(n(81173));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}const l=e=>a.default.createElement(i.default,o({},e,{type:"checkbox"}));t.Component=l;t.default=e=>{const t=(0,r.default)(l);return a.default.createElement(t,o({},e,{hideLabels:!0}))}},32493: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(81173)),i=o(n(23977)),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}class u extends a.Component{constructor(e){super(e),this.getItemKey=this.getItemKey.bind(this),this.getOptionProps=this.getOptionProps.bind(this),this.handleChange=this.handleChange.bind(this),this.getValues=this.getValues.bind(this)}getItemKey(e,t){return`${this.props.id}-${e.value||`empty${t}`}`}getValues(){let e=this.props.value;return Array.isArray(e)||("string"==typeof e&&(e=e.length?[e]:[]),"number"==typeof e&&(e=[e])),e?e.map((e=>`${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:[]};t.default=e=>{const t=(0,i.default)(u);return a.default.createElement(t,e)}},60093: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(80328)),i=s(n(5556));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:""};t.default=l},45193:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(23977)),r=d(n(95093)),i=d(n(48779)),s=d(n(95815)),o=d(n(5556)),l=n(2481);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:{}};t.default=(0,a.default)(u)},81885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(23977)),r=o(n(95093)),i=o(n(95815)),s=n(45193);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;t.default=(0,a.default)(d)},84265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(60093)),r=s(n(5556)),i=s(n(46942));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};t.default=o},23977:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=c(n(96540)),r=n(4914),i=d(n(80328)),s=d(n(46942)),o=d(n(5556)),l=c(n(99197));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}t.default=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}},32541: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(5556)),i=l(n(95815)),s=l(n(46942)),o=n(4914);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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}const c="file-status-icon";class f extends a.PureComponent{buildTrackedFormUpload(e){const t=e?"font-icon-address-card":"font-icon-address-card-warning";return{className:(0,s.default)("icon",`${c}__icon`,t),"data-title":e?i.default._t("SilverStripe\\Admin\\FileStatusIcon.TRACKED_FORM_UPLOAD_RESTRICTED","Form submission"):i.default._t("SilverStripe\\Admin\\FileStatusIcon.TRACKED_FORM_UPLOAD_UNRESTRICTED","Form submission, unrestricted access")}}buildRestrictedFileAttrs(){return{className:(0,s.default)("icon",`${c}__icon`,"font-icon-user-lock"),"data-title":i.default._t("SilverStripe\\Admin\\FileStatusIcon.ACCESS_RESTRICTED","Restricted access")}}renderTooltip(e,t,n){return a.default.createElement(o.UncontrolledTooltip,{placement:e,target:t,delay:{show:300,hide:0}},n)}render(){const{fileID:e,hasRestrictedAccess:t,isTrackedFormUpload:n,placement:r,extraClassName:i,disableTooltip:o,includeBackground:l}=this.props;if(!n&&!t)return"";const d=l?"file-status-icon--background":"",f=(0,s.default)([c,d,i]),p=n?this.buildTrackedFormUpload(t):this.buildRestrictedFileAttrs(),h=`FileStatusIcon-${n?"tracked-form-upload":"restricted"}-${e}`,m=o?"":this.renderTooltip(r,h,p["data-title"]);return a.default.createElement("div",{className:f},a.default.createElement("span",u({id:h},p)),m)}}f.propTypes={fileID:r.default.number,hasRestrictedAccess:r.default.bool,isTrackedFormUpload:r.default.bool,placement:r.default.string,disableTooltip:r.default.bool,extraClassName:r.default.string,includeBackground:r.default.bool},f.defaultProps={placement:"auto",disableTooltip:!1};t.default=f},47549: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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.wasClicked=!1,this.handleElementClick=this.handleElementClick.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this)}componentDidMount(){this.container.addEventListener("click",this.handleElementClick),document.addEventListener("click",this.handleDocumentClick)}componentWillUnmount(){this.container.removeEventListener("click",this.handleElementClick),document.removeEventListener("click",this.handleDocumentClick)}handleElementClick(){this.wasClicked=!0}handleDocumentClick(){this.wasClicked||this.props.onClickOut(),this.wasClicked=!1}render(){return r.default.createElement("div",{className:this.props.className,ref:e=>{this.container=e}},this.props.children)}}o.propTypes={children:i.default.any,className:i.default.string,onClickOut:i.default.func.isRequired},o.defaultProps={className:""};t.default=o},11463: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(21077)),i=s(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}class d extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this)}componentDidMount(){if(this.props.autoFocus&&this.form){const e=this.form.querySelector("input:not([type=hidden]), select, textarea");e&&(e.focus(),e.select&&e.select())}}renderMessages(){const{FormAlertComponent:e}=this.props;return Array.isArray(this.props.messages)?this.props.messages.map(((t,n)=>a.default.createElement(e,l({key:n,className:n?"":"message-box--panel-top"},t)))):null}handleSubmit(e){e.stopPropagation();for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];this.props.handleSubmit(e,...n)}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.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};t.default=d},82734:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={CSRF_HEADER:"X-SecurityID"}},23443: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(80328)),i=o(n(46942)),s=o(n(5556));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};t.default=d},21077: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=l(n(80328)),s=l(n(46942)),o=l(n(5556));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:""};t.default=u},96865: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(96540)),r=u(n(5556)),i=u(n(84010)),s=f(n(60906)),o=n(18574),l=u(n(32613)),d=n(14269);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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(null,arguments)}class h extends a.Component{constructor(e){super(e);const t=e.schema.schema;this.state={submittingAction:null},this.submitApi=l.default.createEndpointFetcher({url:t.attributes.action,method:t.attributes.method}),this.mapActionsToComponents=this.mapActionsToComponents.bind(this),this.mapFieldsToComponents=this.mapFieldsToComponents.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleAction=this.handleAction.bind(this),this.buildComponent=this.buildComponent.bind(this),this.validateForm=this.validateForm.bind(this)}getComponent(e){let{name:t,schemaComponent:n,schemaType:a}=e;const{identifier:r,getCustomFields:i}=this.props;if(i){const e=i(a,`${r}.${t}`);if(e)return e}return null!==n?this.context.injector.get(n,`${r}.${t}`):this.getComponentForDataType(a,t)}getComponentForDataType(e,t){const{identifier:n}=this.props,a=e=>this.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:_}=this.props,b={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:_};return a.default.createElement(n,b)}}t.Component=h;const m=t.schemaPropType=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})}),g=t.basePropTypes={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 `)}};h.propTypes=Object.assign({},g,{form:r.default.string.isRequired,schema:m.isRequired,autoFocus:r.default.bool}),h.defaultProps={responseRequestedSchema:["auto"],autoFocus:!1};t.default=(0,d.withInjector)(h)},56091: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(23077)),i=d(n(80328)),s=d(n(46942)),o=d(n(5556)),l=d(n(32185));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=()=>null,f=e=>{let{children:t,FormBuilderLoaderComponent:n,onLoadingError:r,onSubmit:o,responseClassBad:d,responseClassGood:u,showErrorMessage:f,autoFocus:p,bodyClassName:h,identifier:m,onAction:g,schemaUrl:v,className:_,isOpen:b,modalClassName:y,ModalComponent:w,ModalHeaderComponent:C,onClosed:E,showCloseButton:O,size:S,title:T}=e;const[P,M]=(0,a.useState)(null),[j,D]=(0,a.useState)(null),k={className:_,isOpen:b,modalClassName:y,ModalComponent:w,ModalHeaderComponent:C,onClosed:()=>{M(null),D(!1),"function"==typeof E&&E()},showCloseButton:O,size:S,title:T},R={actionHolder:{className:"modal-footer"},autoFocus:p,bodyClassName:h,fieldHolder:{className:(0,s.default)("modal-body",h)},identifier:m,onAction:g,onLoadingError:e=>{const t=r!==c;if(f||!t){const t=e.errors&&e.errors[0];M(t.value),D(!0)}t&&r(e)},onSubmit:(e,t,n)=>{M(null),D(!1);let a=null;if(a="function"==typeof o?o(e,t,n):n(),!a)throw new Error("Promise was not returned for submitting");return a.then((e=>(e&&(M(e.message),D(!1)),e))).catch((e=>{e.then((e=>{M(e),D(!0)}))})),a},schemaUrl:v};return a.default.createElement(l.default,k,P&&a.default.createElement("div",{className:j?d:u},(0,i.default)("span",{html:P})),v&&a.default.createElement(n,R),t)};f.propTypes={autoFocus:o.default.bool,bodyClassName:o.default.string,schemaUrl:o.default.string,onSubmit:o.default.func,onAction:o.default.func,responseClassGood:o.default.string,responseClassBad:o.default.string,identifier:o.default.string,showErrorMessage:o.default.bool,onLoadingError:o.default.func,FormBuilderLoaderComponent:o.default.oneOfType([o.default.object,o.default.func]),...l.default.propTypes},f.defaultProps={showErrorMessage:!1,onLoadingError:c,modalClassName:"form-builder-modal",responseClassGood:"alert alert-success",responseClassBad:"alert alert-danger",FormBuilderLoaderComponent:r.default};t.default=f},21757:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=b(n(96540)),r=v(n(95815)),i=n(82960),s=n(69733),o=v(n(82734)),l=b(n(63249)),d=v(n(80328)),u=v(n(5556)),c=v(n(20777)),f=v(n(57840)),p=v(n(75308)),h=v(n(86313)),m=v(n(97525)),g=v(n(66463));function v(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function b(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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})};t.default=(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)},66463: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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};t.default=o},97525: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(46942)),i=s(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}class d extends a.Component{constructor(e){super(e),this.handleDrillDown=this.handleDrillDown.bind(this)}handleDrillDown(e){"function"==typeof this.props.onDrillDown&&this.props.onDrillDown(e)}render(){const e=["grid-field__cell",this.props.className],{onDrillDown:t,...n}=this.props;return a.default.createElement("td",l({},n,{className:(0,r.default)(e),onClick:this.handleDrillDown}))}}d.propTypes={className:i.default.string,onDrillDown:i.default.func};t.default=d},57840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(96540)),r=i(n(86313));function i(e){return e&&e.__esModule?e:{default:e}}t.default=e=>a.default.createElement(r.default,null,e.children)},75308:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=e=>r.default.createElement("th",null,e.children)},86313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=e=>{const t=`grid-field__row ${e.className}`;return r.default.createElement("tr",{tabIndex:0,className:t},e.children)}},20777: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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:null}generateRows(){return void 0!==this.props.rows?this.props.rows: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={header:i.default.object,rows:i.default.array};t.default=o},70077: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=d(n(46942)),s=d(n(5556)),o=d(n(81179)),l=d(n(35421));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;t.default=c},81179: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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};t.default=d},77773:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(46942));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:""};t.default=o},85281: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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:""};t.default=d},72973:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(96540)),r=o(n(29921)),i=n(2481),s=o(n(23977));function o(e){return e&&e.__esModule?e:{default:e}}n(64484);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",(()=>{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;t.default=(0,s.default)(l)},91621: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(23977)),i=n(4914),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}class u extends a.Component{getInputProps(){return{className:`${this.props.className} ${this.props.extraClass}`,id:this.props.id,name:this.props.name}}render(){return a.default.createElement(i.Input,d({plaintext:!0,tag:"p",dangerouslySetInnerHTML:{__html:this.props.value}},this.getInputProps()))}}t.Component=u,u.propTypes={id:s.default.string,name:s.default.string.isRequired,extraClass:s.default.string,value:s.default.string},u.defaultProps={extraClass:"",className:""};t.default=(0,r.default)(u)},78335: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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.handleClosed=this.handleClosed.bind(this)}handleClosed(){"function"==typeof this.props.onClosed&&this.props.onClosed()}renderHeader(){const e=this.props.title;return e?a.default.createElement(r.ModalHeader,{toggle:this.handleClosed},e):null}render(){return a.default.createElement(r.Modal,{isOpen:this.props.isOpen,onClosed:this.handleClosed,className:(0,i.default)("iframe-dialog",this.props.className),modalClassName:this.props.modalClassName},this.renderHeader(),a.default.createElement(r.ModalBody,{className:this.props.bodyClassName},a.default.createElement("iframe",{id:this.props.iframeId,className:(0,i.default)("iframe-dialog__iframe",this.props.iframeClassName),src:this.props.url,frameBorder:0})))}}d.propTypes={url:s.default.string.isRequired,onClosed:s.default.func,isOpen:s.default.bool,title:s.default.oneOfType([s.default.string,s.default.bool]),modalClassName:s.default.string,iframeId:s.default.string,iframeClassName:s.default.string,className:s.default.string,bodyClassName:s.default.string},d.defaultProps={isOpen:!1,title:null};t.default=d},55239:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a,r=d(n(96540)),i=n(4914),s=(a=n(5556))&&a.__esModule?a:{default:a},o=d(n(99197));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,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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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 u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends r.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}getInputProps(){const e={className:`${this.props.className} ${this.props.extraClass}`,id:this.props.id,name:this.props.name,disabled:this.props.disabled,readOnly:this.props.readOnly,value:this.props.value||"",placeholder:this.props.placeholder,autoFocus:this.props.autoFocus,maxLength:this.props.data&&this.props.data.maxlength,type:this.props.type?this.props.type:null,onBlur:this.props.onBlur,onFocus:this.props.onFocus};return this.props.attributes&&!Array.isArray(this.props.attributes)&&Object.assign(e,this.props.attributes),this.props.readOnly||Object.assign(e,{onChange:this.handleChange}),e}handleChange(e){if("function"==typeof this.props.onChange){if(!e.target)return;this.props.onChange(e,{id:this.props.id,value:e.target.value})}}renderFieldWithTip(){const{id:e,title:t,tip:n}=this.props;return r.default.createElement(i.InputGroup,null,r.default.createElement(i.Input,this.getInputProps()),r.default.createElement(i.InputGroupAddon,{addonType:"append"},r.default.createElement(o.default,u({},n,{fieldTitle:t,id:`${e}-tip`}))))}render(){return this.props.tip?this.renderFieldWithTip():r.default.createElement(i.Input,this.getInputProps())}}t.Component=c,c.propTypes={extraClass:s.default.string,id:s.default.string,name:s.default.string.isRequired,onChange:s.default.func,onBlur:s.default.func,onFocus:s.default.func,value:s.default.oneOfType([s.default.string,s.default.number]),readOnly:s.default.bool,disabled:s.default.bool,placeholder:s.default.string,type:s.default.string,autoFocus:s.default.bool,attributes:s.default.oneOfType([s.default.object,s.default.array]),tip:s.default.shape(o.tipShape)},c.defaultProps={value:"",extraClass:"",className:"",type:"text",attributes:{}};t.default=c},74491:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(96540)),r=i(n(5556));function i(e){return e&&e.__esModule?e:{default:e}}const s=e=>{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:""};t.default=s},16939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=n(84976);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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}function l(e){let{children:t,href:n,...r}=e;const s=(0,i.useInRouterContext)(),l=s?i.Link:"a";return a.default.createElement(l,o({},r,{to:s?n:void 0,href:s?void 0:n}),t)}l.propTypes={children:r.default.node.isRequired,href:r.default.string.isRequired};t.default=l},81637:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(47546));function s(e){return e&&e.__esModule?e:{default:e}}const o=e=>a.default.createElement("div",{className:"list-group"},e.items.map((e=>a.default.createElement(i.default,e))));o.propTypes={items:r.default.array};t.default=o},47546: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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};t.default=o},72041: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=m(n(46005)),i=m(n(8539)),s=m(n(93943)),o=m(n(66963)),l=m(n(28181)),d=m(n(95815)),u=m(n(60328)),c=m(n(23977)),f=m(n(88835)),p=m(n(76459)),h=m(n(5556));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},v.apply(null,arguments)}class _ extends a.Component{constructor(e){super(e),this.isControlled()||(this.state={value:e.value}),this.handleChange=this.handleChange.bind(this),this.handleOnBlur=this.handleOnBlur.bind(this),this.isValidNewOption=this.isValidNewOption.bind(this),this.getOptions=this.getOptions.bind(this),this.fetchOptions=(0,p.default)(this.fetchOptions,500)}getOptions(e){const{lazyLoad:t,options:n}=this.props;return t?e?this.fetchOptions(e):Promise.resolve([]):Promise.resolve(n)}handleChange(e){this.isControlled()?this.props.onChange(e):this.setState({value:e})}isControlled(){return"function"==typeof this.props.onChange}handleOnBlur(){}fetchOptions(e){const{optionUrl:t,labelKey:n,valueKey:a}=this.props,r=f.default.parse(t,!0);return r.query.term=e,(0,u.default)(f.default.format(r),{credentials:"same-origin"}).then((e=>e.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=_,_.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])},_.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};t.default=(0,c.default)(_)},29981: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}class l extends r.Component{getContent(){return{__html:this.props.value}}getInputProps(){return{className:`${this.props.className} ${this.props.extraClass}`,id:this.props.id,name:this.props.name}}render(){return r.default.createElement("div",o({},this.getInputProps(),{dangerouslySetInnerHTML:this.getContent()}))}}l.propTypes={id:i.default.string,name:i.default.string.isRequired,extraClass:i.default.string,value:i.default.string},l.defaultProps={extraClass:"",className:""};t.default=l},74: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(5556)),i=s(n(46942));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.PureComponent{render(){const{className:e,size:t,block:n}=this.props,r=(0,i.default)("ss-circular-loading-indicator",e,{"ss-circular-loading-indicator--block":n});return a.default.createElement("div",{style:{height:t,width:t},className:r})}}l.propTypes={className:r.default.string,block:r.default.bool,size:r.default.string},l.defaultProps={block:!1,size:"6em"};t.default=l},86713:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=n(22831);function s(e){return e&&e.__esModule?e:{default:e}}function o(e){let{containerClass:t}=e;const n=(0,i.v4)();return a.default.createElement("div",{className:t},a.default.createElement("div",{key:"overlay",className:"cms-content-loading-overlay ui-widget-overlay-light"}),a.default.createElement("div",{key:"spinner",className:"cms-content-loading-spinner"},a.default.createElement("div",{className:"spinner"},a.default.createElement("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"512",height:"297",viewBox:"0 0 512 297",className:"spinner__animation"},a.default.createElement("defs",null,a.default.createElement("path",{id:`spinner__animation__outline_right_${n}`,d:"M253 29L145 105C130 115 126 136 137 150C147 165 168 169 183 159L291 83C335 52 397 63 428 107C459 152 448 214 404 245L370 268C398 316 461 296 490 245C520 191 519 123 482 70C430 -4 327 -22 253 29Z"}),a.default.createElement("path",{id:`spinner__animation__outline_left_${n}`,d:"M258 266L366 191C381 180 385 160 374 145C364 130 343 127 328 137L220 212C176 244 114 233 83 188C52 144 63 82 107 51L141 27C113 -20 50 -0 21 51C-8 104 -7 172 29 226C81 300 184 318 258 266V266Z"}),a.default.createElement("clipPath",{id:`spinner__animation__mask_right_${n}`},a.default.createElement("use",{href:`#spinner__animation__outline_right_${n}`})),a.default.createElement("clipPath",{id:`spinner__animation__mask_left_${n}`},a.default.createElement("use",{href:`#spinner__animation__outline_left_${n}`}))),a.default.createElement("use",{className:"spinner__animation__empty",href:`#spinner__animation__outline_left_${n}`}),a.default.createElement("use",{className:"spinner__animation__empty",href:`#spinner__animation__outline_right_${n}`}),a.default.createElement("path",{d:"M 379,145 236,242 C 179,282 102,273 62,216 22,159 19,77 76,37 L 135,7",className:"spinner__animation__fill-left",clipPath:`url(#spinner__animation__mask_left_${n})`}),a.default.createElement("path",{d:"M 138,148 281,50 c 57,-39 129,-30 169,26 39,56 41,136 -14,178 l -47,40",className:"spinner__animation__fill-right",clipPath:`url(#spinner__animation__mask_right_${n})`}),a.default.createElement("path",{d:"M253 29L145 105C130 115 126 136 137 150C147 165 168 169 183 159L291 83C335 52 397 63 428 107C459 152 448 214 404 245L370 268C398 316 461 296 490 245C520 191 519 123 482 70C430 -4 327 -22 253 29Z"})))))}o.propTypes={containerClass:r.default.string},o.defaultProps={containerClass:"flexbox-area-grow"};t.default=o},56425: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=l(n(23977)),s=l(n(95815)),o=l(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.Component{constructor(e){super(e),this.getValueCSV=this.getValueCSV.bind(this)}getValueCSV(){const e=this.props.value;if(!Array.isArray(e)&&(e||"string"==typeof e||"number"==typeof e)){const t=this.props.source.find((t=>t.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:[]};t.default=(0,i.default)(c)},13541: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(46942)),i=s(n(5556));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:""};t.default=l},1066:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(97097),i=n(69733),s=(a=n(13541))&&a.__esModule?a:{default:a};t.default=(0,i.connect)((e=>({isOpen:e.mobileMenu.isOpen})),(e=>({onClick(){e((0,r.toggleMobileMenu)())}})))(s.default)},32185:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=n(4914),i=o(n(95815)),s=o(n(5556));function o(e){return e&&e.__esModule?e:{default:e}}const l=e=>{let{children:t,className:n,isOpen:r,modalClassName:s,ModalComponent:o,ModalHeaderComponent:l,onClosed:d,showCloseButton:u,size:c,title:f}=e;return a.default.createElement(o,{isOpen:r,toggle:d,className:n,modalClassName:s,size:c},!1!==f&&a.default.createElement(l,{toggle:d,title:f},function(e){if("object"==typeof e)return(new DOMParser).parseFromString(e.html,"text/html").body.textContent||"";return e}(f)),!1===f&&!0===u&&"function"==typeof d&&a.default.createElement("button",{type:"button",className:"close modal__close-button",onClick:d,"aria-label":i.default._t("Admin.CLOSE","Close")}),t)};l.propTypes={className:s.default.string,isOpen:s.default.bool,modalClassName:s.default.string,ModalComponent:s.default.oneOfType([s.default.object,s.default.func]),ModalHeaderComponent:s.default.oneOfType([s.default.object,s.default.func]),onClosed:s.default.func,size:s.default.oneOf(["","sm","lg","xl"]),showCloseButton:s.default.bool,title:s.default.oneOfType([s.default.string,s.default.bool,s.default.shape({html:s.default.string})])},l.defaultProps={isOpen:!1,ModalComponent:r.Modal,ModalHeaderComponent:r.ModalHeader,title:null};t.default=l},26285:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a,r=n(96540),i=(a=n(5556))&&a.__esModule?a:{default:a},s=n(84976);function o(e){let{shouldBlockFn:t,blockMessage:n}=e;const a=(0,s.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}},46381:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=l(n(95815)),i=l(n(46942)),s=l(n(21077)),o=l(n(5556));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};t.default=d},92797:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(23977)),r=i(n(55239));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;t.default=(0,a.default)(s)},81173: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=l(n(46942)),s=l(n(80328)),o=l(n(5556));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};t.default=u},23637: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(81173)),i=o(n(23977)),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}class u extends a.Component{constructor(e){super(e),this.getItemKey=this.getItemKey.bind(this),this.getOptionProps=this.getOptionProps.bind(this),this.handleChange=this.handleChange.bind(this)}getItemKey(e,t){const n=e.value||`empty${t}`;return`${this.props.id}-${n}`}getOptionProps(e,t){const n=this.getItemKey(e,t);return{key:n,id:n,name:this.props.name,className:`${this.props.itemClass} option-val--${e.value}`,disabled:e.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:`${this.props.value}`==`${e.value}`,title:e.title,type:"radio"}}handleChange(e,t){if("function"==typeof this.props.onChange&&1===t.value){const n=this.props.source.find(((e,n)=>this.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:""};t.default=(0,i.default)(u)},82405: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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:()=>{}};t.default=d},42171: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(5556)),i=n(4914),s=l(n(46942)),o=l(n(95815));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.Component{constructor(e){super(e),this.handleToggle=this.handleToggle.bind(this),this.handleSearchValueClear=this.handleSearchValueClear.bind(this),this.handleSearchValueChange=this.handleSearchValueChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.doToggle=this.doToggle.bind(this),this.focusOnTarget=this.focusOnTarget.bind(this),this.state={searchValue:""}}handleToggle(){this.doToggle(!1)}doToggle(e){const{toggle:t}=this.props;t(),this.handleSearchValueClear(),e&&this.focusOnTarget()}focusOnTarget(){const{target:e}=this.props;if(e){const t=i.Util.getTarget(e);t&&t.focus()}}handleSearchValueClear(){this.setState({searchValue:""})}handleSearchValueChange(e){this.setState({searchValue:e.target.value})}handleKeyDown(e){"Escape"===e.key&&this.doToggle(!0)}renderSearchValueClearLink(){const{clearButtonClassName:e}=this.props,{searchValue:t}=this.state;return 0===t.length?null:a.default.createElement(i.InputGroupAddon,{addonType:"append"},a.default.createElement("button",{className:(0,s.default)(e),onClick:this.handleSearchValueClear},o.default._t("PopoverOptionSet.CLEAR","Clear")))}renderSearchBox(){const{searchPlaceholder:e,disableSearch:t,searchClassName:n,searchInputClassName:r}=this.props,{searchValue:o}=this.state;return t?null:a.default.createElement(i.InputGroup,{className:(0,s.default)(n)},a.default.createElement(i.Input,{autoFocus:!0,className:(0,s.default)(r),onChange:this.handleSearchValueChange,placeholder:e,type:"text",value:o}),this.renderSearchValueClearLink())}renderOptionButtons(){const{buttons:e,onSearch:t,buttonContainerClassName:n,emptyResultClassName:r,buttonClassName:i,ButtonComponent:l}=this.props,{searchValue:d}=this.state;let c=e;return 0!==d.length&&(c=t(d,c)),0===c.length?a.default.createElement("div",{className:(0,s.default)(n)},a.default.createElement("div",{className:(0,s.default)(r)},o.default._t("PopoverOptionSet.NO_RESULTS","No results found"))):a.default.createElement("div",{className:(0,s.default)(n)},c.map((e=>a.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"};t.default=c},99417: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(95815)),i=d(n(46942)),s=n(14269),o=d(n(5556)),l=d(n(35421));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"};t.default=(0,s.inject)(["ViewModeToggle"],(e=>({ViewModeComponent:e})),(()=>"Admin.Preview"))(c)},96937:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(96540),r=s(n(43591)),i=s(n(5556));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"],f=[s||"height"],p={[c]:l,[f]:d};return(0,a.createElement)(n,{[u?"getRef":"ref"]:e=>{this.container=e},...u&&p,...o},"function"==typeof e?e({width:l,height:d}):a.Children.map(e,(e=>(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t?null:p):e)))}}o.propTypes={component:i.default.oneOfType([i.default.string,i.default.elementType]),onResize:i.default.func},o.defaultProps={component:"div"};t.default=o},89091:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0,t.hasFilters=O;var a=y(n(95815)),r=b(n(96540)),i=n(69733),s=n(82960),o=b(n(82513)),l=n(76806),d=n(97854),u=y(n(66104)),c=y(n(15042)),f=y(n(5556)),p=y(n(47549)),h=y(n(84326)),m=y(n(13765)),g=y(n(54663)),v=y(n(91699));function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function b(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},w.apply(null,arguments)}const C={NONE:"NONE",VISIBLE:"VISIBLE",EXPANDED:"EXPANDED"},E={NONE:"NONE",HIDEABLE:"HIDEABLE",TOGGLABLE:"TOGGLABLE"};function O(e){return e&&Object.keys(e).length>0}class S 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&&(!O(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&&O(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,"ID"===e.substring(e.length-2)&&"object"==typeof t&&t.hasOwnProperty("value")&&(i[e]=t.value))})),!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===C.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!==C.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!==C.NONE&&this.setState({display:C.NONE})}show(){this.state.display!==C.VISIBLE&&this.setState({display:C.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!==C.EXPANDED&&this.setState({display:C.EXPANDED})}toggle(){switch(this.state.display){case C.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case C.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===C.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:C.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===C.NONE)return a===E.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===C.EXPANDED,v=this.state.display===C.VISIBLE,_=[E.HIDEABLE,E.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),y=this.getData(),O=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:_,expanded:f,id:`${n}_searchbox`,showFilters:Boolean(t||e),dirty:b,clearable:O,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:O})))}}t.Component=S,S.propTypes={onSearch:f.default.func,onHide:f.default.func,id:f.default.string.isRequired,display:f.default.oneOf(Object.values(C)),formSchemaUrl:f.default.string,filters:f.default.object,formData:f.default.object,placeholder:f.default.string,displayBehavior:f.default.oneOf(Object.values(E)),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})},S.defaultProps={placeholder:a.default._t("Admin.SEARCH","Search"),display:C.VISIBLE,displayBehavior:E.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"};t.default=(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)}}}))(S)},84326:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=f(n(95815)),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),i=n(4914),s=f(n(46942)),o=f(n(39054)),l=f(n(96937)),d=f(n(5556)),u=f(n(13164));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},a.default._t("Admin.SEARCH_OPTIONS","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}};t.default=p},13765:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=c,t.default=void 0;var a=l(n(95815)),r=l(n(96540)),i=l(n(23077)),s=n(4914),o=l(n(5556));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:{}};t.default=c},54663:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=l(n(95815)),r=l(n(96540)),i=n(4914),s=l(n(46942)),o=l(n(5556));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};t.default=c},41048:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(12973))&&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},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},12973:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(95093))&&a.__esModule?a:{default:a};t.default=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}},91699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(41048))&&a.__esModule?a:{default:a};const i=(e,t)=>{let{key:n,value:a,label:r}=t;return`${e}${r.toLowerCase()||n} ${a||""} `};t.default=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}},50693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=v(n(8539)),r=v(n(32613)),i=v(n(46942)),s=v(n(80391)),o=v(n(76459)),l=v(n(28181)),d=v(n(95815)),u=v(n(23977)),c=v(n(5556)),f=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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),p=v(n(46005)),h=v(n(88835)),m=v(n(82734));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(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_.apply(null,arguments)}const b=e=>{let{clearable:t,disabled:n,lazyLoad:a,multi:u,passRef:c,placeholder:p,options:g,optionUrl:v,onChange:b,searchable:y,value:w,SelectComponent:C,AsyncSelectComponent:E,...O}=e;const[S,T]=(0,f.useState)(!1),[P,M]=(0,f.useState)(!1),[j,D]=(0,f.useState)({}),k=(0,f.createRef)();(0,f.useEffect)((()=>{if(!P)return;const e=k.current.inputRef,t=new Event("change",{bubbles:!0});e.dispatchEvent(t),M(!1)}));const R=(0,i.default)({"no-change-track":!S,"ss-searchable-dropdown-field--lazy-load":a}),x=a?{loadOptions:e=>a?e?(e=>{if(j.hasOwnProperty(e))return Promise.resolve(j[e]);let t=()=>{const t=h.default.parse(v,!0);t.search&&delete t.search,t.query.term=e;const n=h.default.format(t),a={};return a[m.default.CSRF_HEADER]=s.default.get("SecurityID"),r.default.get(n,a).then((e=>e.json())).then((t=>(j[e]=t,D(j),t)))};return t=(0,o.default)(t,500),t()})(e):Promise.resolve([]):Promise.resolve(g)}:{options:g},I=c?{ref:k}:{};let A=w;if(!u&&A){const e=Object.keys(A);if(e.length>0){const t=A[e[0]];"object"==typeof t&&(A=t)}}const N=`${O.id}__input`,F=a?E:C;return f.default.createElement(l.default,null,f.default.createElement(F,_({},O,{classNamePrefix:"ss-searchable-dropdown-field",className:R,isClearable:t,isDisabled:n,isMulti:u,isSearchable:y,placeholder:p,onChange:e=>{T(!1),JSON.stringify(w)!==JSON.stringify(e)&&(T(!0),M(!0)),b(e)},onBlur:()=>{}},x,{noOptionsMessage:e=>e?d.default._t("Admin.NO_MATCHING_OPTIONS","No matching options"):d.default._t("Admin.TYPE_TO_SEARCH","Type to search")},I,{value:A,inputId:N})))};t.Component=b,b.propTypes={clearable:c.default.bool.isRequired,disabled:c.default.bool.isRequired,lazyLoad:c.default.bool.isRequired,multi:c.default.bool.isRequired,name:c.default.string.isRequired,placeholder:c.default.string.isRequired,onChange:c.default.func,options:c.default.arrayOf(c.default.object),optionUrl:c.default.string,passRef:c.default.bool.isRequired,searchable:c.default.bool.isRequired,value:c.default.any,SelectComponent:c.default.oneOfType([c.default.object,c.default.func]).isRequired,AsyncSelectComponent:c.default.oneOfType([c.default.object,c.default.func]).isRequired},b.defaultProps={disabled:!1,lazyLoad:!1,clearable:!0,searchable:!0,multi:!1,passRef:!0,placeholder:"",onChange:()=>{},value:"",SelectComponent:p.default,AsyncSelectComponent:a.default};t.default=(0,u.default)(b)},31217: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(23977)),i=l(n(95815)),s=n(4914),o=l(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}getReadonlyField(){let e=this.props.source&&this.props.source.find((e=>e.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")}};t.default=(0,r.default)(c)},18116:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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};t.default=l},47735:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=u(n(96540)),r=n(4914),i=l(n(5556)),s=u(n(27807)),o=l(n(46942));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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};t.default=c},63855:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=n(4914),i=o(n(5556)),s=o(n(18116));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}function d(e){let{currentTab:t,children:n,onToggle:i}=e;const o=a.default.Children.map(n,(e=>{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};t.default=d},54475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=m,t.default=void 0;var a=h(n(96540)),r=n(4914),i=f(n(46942)),s=f(n(5556)),o=n(69733),l=h(n(25827)),d=h(n(27807)),u=f(n(63855)),c=f(n(29909));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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)(),_=v?v.isOnActiveTab:void 0,b=(0,a.useMemo)((()=>({activeTab:g,isOnActiveTab:_})),[s,_]);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:b},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}`;t.default=(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)},29909: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(96540)},39054: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(28557)),i=d(n(96937)),s=d(n(46942)),o=d(n(5556)),l=d(n(325));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(null,arguments)}class f extends a.Component{constructor(e){super(e),this.render=this.render.bind(this),this.onResize=this.onResize.bind(this),this.refreshShowSummaryView=this.refreshShowSummaryView.bind(this),this.getPlaceholderSize=this.getPlaceholderSize.bind(this),this.state={showSummaryView:!1}}componentDidUpdate(){const e=this.getPlaceholderSize();this.refreshShowSummaryView(e)}onResize(e){this.refreshShowSummaryView(e.width)}getPlaceholderSize(){const e=this.nodeRef;if(!e)return 0;const t=e.querySelector(".compact-tag-list__placeholder");return t?t.getBoundingClientRect().width:0}refreshShowSummaryView(e){const t=this.props.maxSize<e;this.state.showSummaryView!==t&&this.setState((()=>({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:()=>{}};t.default=f},325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=o(n(5417)),i=o(n(95815)),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=e=>{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")};t.default=d},5417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=n(4914),i=l(n(46942)),s=l(n(95815)),o=l(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}const u=e=>{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,..._}=e;const b=((e,t,n)=>(t||e)+(n?`: ${n}`:""))(p,h,m);return a.default.createElement(r.Button,d({},_,{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:b}),c&&a.default.createElement(f,{onDelete:n,dataKey:p}),g||b)},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};t.default=u},28557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(96540)),r=o(n(5417)),i=o(n(5556)),s=o(n(13164));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=!0,u=!1,c=e=>{const t=document.activeElement[e?"nextElementSibling":"previousElementSibling"];return!!t&&(t.focus(),!0)},f=e=>{let{tags:t,deletable:n,focusable:i,onTagDelete:s,onTagClick:o,onHolderFocus:f}=e;const p=e=>{c(d)||f(),s(e)},h=e=>{c(u)||c(d)||f(),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?p:void 0,onBackSpace:n&&s?h:void 0,onNext:()=>{c(d)||f()},onPrevious:()=>{c(u)},onClick:o})))))};t.Component=f,f.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},f.defaultProps={deletable:!1,focusable:!0,onTagDelete:()=>{},onTagClick:()=>{},onHolderFocus:()=>{}};t.default=f},13164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5556))&&a.__esModule?a:{default:a};const i=r.default.shape({key:r.default.string.isRequired,label:r.default.string,value:r.default.string});t.default=i},2481:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(23977)),r=i(n(55239));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;t.default=(0,a.default)(s)},85085:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(23977)),r=d(n(95093)),i=d(n(48779)),s=d(n(95815)),o=d(n(5556)),l=n(45193);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:{}};t.default=(0,a.default)(c)},99197: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(5556)),i=n(4914),s=d(n(95815)),o=d(n(46942)),l=d(n(73323));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=t.TIP_TYPES={TITLE:"title",INPUT_GROUP:"input-group"},f=t.TIP_IMPORTANCE_LEVELS={NORMAL:"normal",HIGH:"high"},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`,_={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,_,m),a.default.createElement(i.UncontrolledPopover,{trigger:"legacy",placement:"top-end",target:v},a.default.createElement(i.PopoverBody,null,t)))}const m=t.tipShape={content:r.default.string.isRequired,importance:r.default.oneOf(Object.values(f)),type:r.default.oneOf(Object.values(c)),icon:r.default.string};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};t.default=h},82548:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toastShape=t.default=void 0;var a=u(n(96540)),r=u(n(5556)),i=u(n(95815)),s=n(4914),o=u(n(46942)),l=u(n(73323)),d=n(19405);function u(e){return e&&e.__esModule?e:{default:e}}const c=t.toastShape={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))},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},f.defaultProps={actions:[],onDismiss:()=>{}};t.default=f},19405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ToastActions=t.ToastAction=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(73323));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}const l=e=>{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:[]};t.default=d},88507: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(5556)),i=s(n(82548));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=e=>{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={};t.default=d},32189:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(61080));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};t.default=o},90277: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 _.findTreeByID}}),Object.defineProperty(t,"findTreeByPath",{enumerable:!0,get:function(){return _.findTreeByPath}}),Object.defineProperty(t,"findTreePath",{enumerable:!0,get:function(){return _.findTreePath}});var a=w(n(96540)),r=b(n(5556)),i=n(69733),s=n(82960),o=b(n(71479)),l=b(n(28181)),d=b(n(95815)),u=b(n(23977)),c=b(n(60328)),f=w(n(46005)),p=w(n(47193)),h=b(n(69161)),m=b(n(88835)),g=n(4914),v=n(80328),_=n(54583);function b(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C.apply(null,arguments)}const E=t.MULTI_EMPTY_VALUE="unchanged",O=t.SINGLE_EMPTY_VALUE=0,S=e=>{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?"":O,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((e.value===O||""===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=E,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||O}"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,onKeyDown:e=>this.handleKeyDown(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,C({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,S):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"},isOptionDisabled:e=>e.disabled}))}}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:_.findTreeByPath,findTreePath:_.findTreePath,fetch:c.default};const P=t.ConnectedTreeDropdownField=(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===E&&(r=[]),t.data.multiple||t.value||(r=O),{...a,value:r}}),(function(e){return{actions:{treeDropdownField:(0,s.bindActionCreators)(p,e)}}}))(T);t.default=(0,u.default)(P)},69161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5556))&&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};t.default=i},54583: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},48749: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(5556)),i=d(n(46942)),s=d(n(95815)),o=d(n(86713)),l=d(n(85068));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};t.default=(0,l.default)(c)},85068: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),i=(a=n(5556))&&a.__esModule?a:{default:a},s=n(69733),o=n(98307),l=n(27807);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)}t.default=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}},87523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statuses=t.default=void 0;var a=l(n(96540)),r=l(n(46942)),i=l(n(5556)),s=l(n(1541)),o=l(n(95815));function l(e){return e&&e.__esModule?e:{default:e}}const d=t.statuses=["draft","modified","live","archived"],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};t.default=u},36087: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=f(n(5556)),i=n(4914),s=f(n(95815)),o=n(69733),l=n(82960),d=n(6679),u=n(44072),c=f(n(46942));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},h.apply(null,arguments)}class m extends a.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={dropdownOpen:!1},this.handleSplitSelect=this.handleSplitSelect.bind(this),this.handlePreviewSelect=this.handlePreviewSelect.bind(this),this.handleEditSelect=this.handleEditSelect.bind(this)}getIconClass(){const{activeState:e,editIconClass:t,previewIconClass:n,splitIconClass:a}=this.props;switch(e){case u.VIEW_MODE_STATES.EDIT:return t;case u.VIEW_MODE_STATES.PREVIEW:return n;default:return a}}getTitle(){const{activeState:e}=this.props;switch(e){case u.VIEW_MODE_STATES.EDIT:return s.default._t("Admin.EDIT_MODE","Edit mode");case u.VIEW_MODE_STATES.PREVIEW:return s.default._t("Admin.PREVIEW_MODE","Preview mode");default:return s.default._t("Admin.SPLIT_MODE","Split mode")}}toggle(){window.setTimeout((()=>this.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:{}};t.default=(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)},28221:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a},i=n(14269),s=n(47767);t.default=(0,i.provideInjector)((e=>{let{children:t}=e;return r.default.createElement("div",{className:"app"},t,r.default.createElement(s.Outlet,null))}))},28181:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(55655)),i=n(17437);function s(e){return e&&e.__esModule?e:{default:e}}t.default=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)}},25479:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=n(76806),i=n(14269),s=l(n(15042)),o=l(n(5556));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);t.default=(0,r.reduxForm)({getFormState:s.default,destroyOnUnmount:!1})(u)},23077:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0,t.createFormIdentifierFromProps=C,t.default=void 0;var a=w(n(95815)),r=y(n(96540)),i=w(n(5556)),s=n(69733),o=n(82960),l=w(n(60328)),d=w(n(82229)),u=n(76806),c=w(n(60906)),f=n(18574),p=y(n(82513)),h=w(n(84010)),m=y(n(96865)),g=w(n(66104)),v=n(14269),_=w(n(15042));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 y(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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 C(e){let{identifier:t,schema:n={}}=e;return[t,n.schema&&n.schema.name].filter((e=>e)).join(".")}class E 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.props.refetchSchemaCriteria===e.refetchSchemaCriteria||this.fetch()}getMessages(e){const t={};return e&&e.fields&&e.fields.forEach((e=>{e.message&&(t[e.name]=e.message)})),t}getIdentifier(){return C(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=C({...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=E,E.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,refetchSchemaCriteria:i.default.string,form:i.default.string,submitting:i.default.bool,onFetchingSchema:i.default.func,onReduxFormInit:i.default.func,loadingComponent:i.default.elementType.isRequired}),E.defaultProps={refetchSchemaOnMount:!0};t.default=(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=C({...t,schema:n}),r=(0,g.default)((0,_.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)}}})))(E)},5549:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createInsertLinkModal=t.InsertLinkModal=void 0;var a=f(n(96540)),r=u(n(5556)),i=n(82960),s=n(69733),o=u(n(56091)),l=u(n(99237)),d=f(n(82513));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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);t.default=(0,i.compose)((0,s.connect)((()=>({})),h),l.default)(p)},99237: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(96540)),i=(a=n(5556))&&a.__esModule?a:{default:a},s=n(82960),o=u(n(82513)),l=n(69733);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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(null,arguments)}class f extends r.Component{constructor(e){super(e),this.setOverrides=this.setOverrides.bind(this)}componentDidMount(){this.setOverrides(this.props)}componentWillUnmount(){this.setOverrides()}setOverrides(){let e=arguments.length>0&&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};t.ConnectedFileSchemaHandler=(0,l.connect)((()=>({})),p())(f);t.default=function(e){return(0,l.connect)((function(){return{Component:e}}),p)(f)}},36171: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(5556)),i=n(4914),s=n(14269),o=d(n(60328)),l=d(n(80391));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(null,arguments)}const f="SilverStripe\\Admin\\SudoModeController";t.default=e=>{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}},92077:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=d(n(96540)),r=d(n(88507)),i=n(69733),s=n(82960),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(16679));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}}t.default=(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})}))},27807: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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(null,arguments)}const s=t.TabContext=a.default.createContext(!1);function o(){return(0,a.useContext)(s)}t.default=o},46353:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;let n=new class{constructor(){this.defaultLocale="en_US",this.currentLocale=null,this.autoDetectLocale=!0,this.lang={}}setLocale(e){this.currentLocale=e,this.autoDetectLocale=!1}getLocale(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale}_t(e,t,n,a){const r=t||"";if(!this.lang)return r;const i=this.getLocale(),s=[i,i.replace(/_[\w]+/i,""),this.defaultLocale,this.defaultLocale.replace(/_[\w]+/i,"")];for(let t=0;t<s.length;t++){const n=s[t];if(this.lang[n]&&this.lang[n][e])return this.lang[n][e]}return r}addDictionary(e,t){void 0===this.lang[e]&&(this.lang[e]={});for(let n in t)this.lang[e][n]=t[n];this.autoDetectLocale&&(this.currentLocale=this.detectLocale())}getDictionary(e){return this.lang[e]}stripStr(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}stripStrML(e){const t=e.split("\n");for(let e=0;e<t.length;e+=1)t[e]=stripStr(t[e]);return stripStr(t.join(" "))}sprintf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(0===n.length)return e;const r=new RegExp("(.?)(%s)","g");let i=0;return e.replace(r,(function(e,t,a,r,s){return"%"===t?e:t+n[i++]}))}inject(e,t){const n=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(n,(function(e,n,a,r){return t[n]?t[n]:e}))}detectLocale(){let e=document.documentElement.getAttribute("lang");if(e||(e=document.body.getAttribute("lang")),!e){const t=document.getElementsByTagName("meta");for(let n=0;n<t.length;n++)t[n].attributes["http-equiv"]&&"content-language"===t[n].attributes["http-equiv"].nodeValue.toLowerCase()&&(e=t[n].attributes.content.nodeValue)}if(e||(e=this.defaultLocale),2===e.length)for(let t in this.lang)if(t.substr(0,2).toLowerCase()===e.toLowerCase())return t;const t=e.match(/([^-|_]*)[-|_](.*)/);return t?t[1].toLowerCase()+"_"+t[2].toUpperCase():null}addEvent(e,t,n,a){return e.addEventListener?(e.addEventListener(t,n,a),!0):e.attachEvent?e.attachEvent("on"+t,n):void console.log("Handler could not be attached")}};window.ss=void 0!==window.ss?window.ss:{},window.ss.i18n=window.i18n=n;t.default=n},66711:function(e,t,n){"use strict";var a=o(n(95815)),r=o(n(74692)),i=o(n(96540)),s=n(5338);function o(e){return e&&e.__esModule?e:{default:e}}const l=(0,n(14269).loadComponent)("FormBuilderModal");r.default.entwine("ss",(e=>{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('<div id="add-to-campaign__dialog-wrapper" />'),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()}})}))},80597:function(e,t,n){"use strict";var a,r=(a=n(74692))&&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}))},48449:function(e,t,n){"use strict";var a=o(n(74692)),r=o(n(95815)),i=o(n(95093)),s=o(n(48779));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("<input/>",{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)}})}))},84374:function(e,t,n){"use strict";var a=o(n(74692)),r=o(n(95815)),i=o(n(95093)),s=o(n(48779));function o(e){return e&&e.__esModule?e:{default:e}}n(38344),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("<input/>",{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)}})}))},71285:function(e,t,n){"use strict";var a=l(n(74692)),r=l(n(95815)),i=l(n(96540)),s=n(5338),o=(l(n(89091)),n(60906),n(14269));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}n(62727),n(38344),a.default.entwine("ss",(function(e){e(".grid-field").entwine({onmatch:function(){this.needsColumnFix()&&(this.fixColumns(),this.injectSearchButton(!1)),this.hasFilters()&&this.injectSearchButton(!0),!this.is(".grid-field--lazy-loadable")||0!==this.closest(".ss-tabset, .cms-tabset").length&&"force"!==this.data("gridfield-lazy-load-state")||(this.data("gridfield-lazy-load-state","ready"),this.lazyload()),this.data("gridfield-lazy-load-state","ready")},lazyload:function(){"ready"!==this.data("gridfield-lazy-load-state")?this.data("gridfield-lazy-load-state","force"):(this.removeClass("grid-field--lazy-loadable").addClass("grid-field--lazy-loaded"),this.reload())},reload:function(t,n){var a=this,i=this.closest("form"),s=this.find(":input:focus").attr("name"),o=i.find(":input:not(.grid-field__search-holder :input, .relation-search)").serializeArray(),l=this.find("tbody"),d=this.find(".grid-field__title-row th").attr("colspan");if(t||(t={}),t.data||(t.data=[]),t.data=t.data.concat(o),window.location.search){let e=window.location.search.replace(/^\?/,"").split("&");for(let n=0;n<e.length;n++){let a=e[n].split("=");2==a.length&&t.data.push({name:decodeURIComponent(a[0]),value:decodeURIComponent(a[1])})}}l.find("tr").remove();var u=e("<td />").addClass("ss-gridfield-item loading").attr("colspan",d);l.append(e("<tr />").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,t){this.openUrl(t,e,(()=>window.location.href=e))},openUrl:function(e,t,n){if(e&&(e.metaKey||e.ctrlKey||e.shiftKey)){window.open(t,"_blank").focus()}else n()},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('<th class="main col-Actions" />'),this.find("tbody tr").each((function(){e(this).find("td:last").attr("colspan",2)}));var n=e('<th class="extra" />');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='<span class="non-sortable"></span>',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='<button type="button" title="Open search and filter" name="showFilter" class="btn btn-secondary font-icon-search btn--no-text btn--icon-lg grid-field__filter-open"></button>',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"),n=e(this).data("name");t&&t.length>0&&t.filter((e=>{if("link"===e.type){const t=this.buildUrlQueryString(e.url,n),a=window.location.pathname+t;window.ss.router.replace(a,void 0,void 0,!1)}}))},buildUrlQueryString:function(e,t){const n={};for(const e of window.location.search.replace(/^\?/,"").split("&")){const[a,r]=e.split("=");a.match(new RegExp(`^gridState\\-${t}\\-[0-9]$`))||(n[a]=r)}const a={},r=[window.location.origin,e].join("/"),i=new URL(r).searchParams;for(const[e,t]of i.entries())a[e]=t;const s=Object.assign(n,a),o=[];for(const e in s){if(""===e)continue;const t=encodeURIComponent(s[e]);o.push([e,t].join("="))}return 0===o.length?"":"?"+o.join("&")}}),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('<span class="non-sortable"></span>'),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"),t)},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('<div class="modal-backdrop fade"></div>'),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, .grid-field__col-compact .gridfield-button-unlink").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);const a=e(this).hasClass("action--archive")?ss.i18n._t("Admin.ARCHIVE_CONFIRM_MESSAGE","Archived"):ss.i18n._t("Admin.DELETE_CONFIRM_MESSAGE","Deleted");e(this).hasClass("dropdown-item")&&jQuery.noticeAdd({text:a,type:"success",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}),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){const t=this.actionurl();return this.getGridField().openUrl(e,t,(()=>window.location.href=t)),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({onclick:function(t){return this.getGridField().showDetailView(e(this).prop("href"),t),!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('<input type="hidden" name="relationID" class="action_gridfield_relationfind no-change-track" />');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}}})}))},68413:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(74692));__webpack_require__(64484);var _lodash=_interopRequireDefault(__webpack_require__(10912));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(){},setHeight:function(e,t){if(void 0!==t&&e.target&&e.target.iframeElement){e.target.iframeElement.height=""!==t?"auto":t;const n=e.target.iframeElement.closest(".tox-sidebar-wrap");n&&(n.style.height=t)}},getConfig:function(){var e="#"+editorID,t=(0,_jquery.default)(e).data("config"),n=t.row_height?t.row_height:void 0,a=this;return t.selector=e,t.setup=function(e){e.on("change",(function(){a.save()})),e.on("init",(e=>{a.setHeight(e,n)})),e.on("ResizeEditor",(e=>{a.setHeight(e,"")}))},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('<div id="insert-media-react__dialog-wrapper" class="insert-link__dialog-wrapper" />'),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('<div id="insert-embed-react__dialog-wrapper" />'),e("body").append(t)),t.setElement(this),void t.open()}throw new Error(`Dialog named ${t} is not available.`)}})}))},19081:function(e,t,n){"use strict";var a;((a=n(74692))&&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")}})}))},25897:function(e,t,n){"use strict";var a=i(n(74692)),r=i(n(95815));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)}})}))},29837:function(e,t,n){"use strict";var a;((a=n(74692))&&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)}})}))},13776:function(e,t,n){"use strict";var a=i(n(74692)),r=i(n(95815));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=e("#Form_EditForm_error, #Form_ItemEditForm_error");this.find(".tab-attention, .tab-validation-error-sr").remove();let i=!1;if(this.hasClass("validationerror")&&(i=!0),""!==r.html()&&(i=!0),this.find(".alert.error").length>0&&(i=!0),!i)return void r.hide();const s=this.find(".tab-pane .alert-danger, .tab-pane .alert.error").closest(".tab-pane");if(!s.length)return;const o=this.find('.cms-content-header-tabs.cms-tabset-nav-primary li[role="tab"]'),l=s.closest(".tab-content").closest(".ss-tabset");let d=null;o.length>1?d=e=>o.filter(`[aria-controls="${e}"]`):l.length&&(d=e=>l.find(`#tab-${e}`).closest("li")),null!==d&&(s.each((a=>{const r=s.eq(a).attr("id"),i=d(r),o=e(`<i class="font-icon-attention-1 tab-attention" title="${t}" aria-hidden="true"></i>`),l=e(`<span class="tab-validation-error-sr sr-only">${n}</span>`);i.append(o),i.append(l)})),r.attr("class","alert alert-danger"),r.html(a),r.show()),this.addClass("validationerror")}},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){if(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),!this.getValidationErrorShown()&&this.hasClass("validationerror")){const e=ss.i18n._t("Admin.VALIDATIONERROR","Validation Error");o(e),this.setValidationErrorShown(!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(t,n){return!!e(t.target.activeElement).closest(".bypass-entwine-submission").length||("_blank"!=this.prop("target")?(n&&this.closest(".cms-container").submitForm(this,n),!1):void 0)},validate:function(){var e=!0;return this.trigger("validate",{isValid:e}),e},"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,window.matchMedia("(prefers-reduced-motion: reduce)").matches)},checkIfHoldsField(e,t){let n="";switch(this.attr("name")){case"CanViewType":n=`Viewer${t}`;break;case"CanEditType":n=`Editor${t}`;break;case"CanCreateTopLevelType":n=`CreateTopLevel${t}`}const a=jQuery(e);return a.find(`[name="${n}"],[name="${n}[]"]`).length>0&&a.attr("id").endsWith("_Holder")},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.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Groups"))),e)},hideGroupsList:function(e){const t=this.closest(".field");this.hideListElement(t,t.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Groups"))),e)},showMembersList:function(e){const t=this.closest(".field");this.showListElement(t,t.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Members"))),e)},hideMembersList:function(e){const t=this.closest(".field");this.hideListElement(t,t.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Members"))),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"}})}},49492:function(e,t,n){"use strict";var a;((a=n(74692))&&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('<label class="right" for="'+t+'"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next()),this.addClass("description-toggle-enabled"),n.on("click",(function(){a[e?"hide":"show"](),e=!e})),a.hide())}})}))},74291:function(e,t,n){"use strict";var a;((a=n(74692))&&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")}})}))},46333:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a},i=n(13547);r.default.entwine("ss",(function(e){e(".cms-panel.cms-menu").entwine({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")}},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 *").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)),document.location.href=r,a.select()}}}),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")}})}))},34811:function(e,t,n){"use strict";var a=o(n(74692)),r=o(n(1066)),i=n(97097),s=n(5338);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)())}})}))},52358:function(e,t,n){"use strict";var a;((a=n(74692))&&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("<div class='toolbar toolbar--south cms-panel-toggle'></div>").append('<a class="toggle-expand" href="#" data-toggle="tooltip" title="'+i18n._t("Admin.EXPANDPANEL","Expand Panel")+'"><span>»</span></a>').append('<a class="toggle-collapse" href="#" data-toggle="tooltip" title="'+i18n._t("Admin.COLLAPSEPANEL","Collapse Panel")+'"><span>«</span></a>'),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)}})}))},77964:function(e,t,n){"use strict";var a=r(n(95815));function r(e){return e&&e.__esModule?e:{default:e}}r(n(74692)).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").find(":input[name=ID]").val();n&&void 0!==r&&r!=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<n.length;a++){var r=n[a].getAttribute("href");r&&(r.match(/^http:\/\//)&&n[a].setAttribute("target","_blank"))}var i=e.getElementById("SilverStripeNavigator");i&&(i.style.display="none");var s=e.getElementById("SilverStripeNavigatorMessage");s&&(s.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[e])}}}}),e(".cms-edit-form").entwine({onadd:function(){this._super(),e(".cms-preview").setAlreadyInitialised(!1),e(".cms-preview")._initialiseFromContent()}}),e(".cms-preview-states").entwine({changeVisibleState:function(e){this.find('[data-name="'+e+'"]').addClass("active").siblings().removeClass("active")}}),e(".cms-preview-states .state-name").entwine({onclick:function(t){if(1==t.which){var n=e(this).attr("data-name");this.addClass("active").siblings().removeClass("active"),e(".cms-preview").changeState(n),t.preventDefault()}}}),e(".preview-mode-selector").entwine({changeVisibleMode:function(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-mode-selector select").entwine({onchange:function(t){this._super(t),t.preventDefault();var n=e(this).val();e(".cms-preview").changeMode(n)}}),e(".cms-container--content-mode").entwine({onmatch:function(){e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(a.default._t("Admin.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function(t){t.preventDefault();var n=e(this).val();e(".cms-preview").changeSize(n)}}),e(".preview-selector select.preview-dropdown").entwine({"onchosen:ready":function(){this._super(),this._addIcon()},_addIcon:function(){var e=this.find(":selected").attr("data-icon"),t=this.parent().find(".chosen-container a.chosen-single"),n=t.attr("data-icon");return void 0!==n&&t.removeClass(n),t.addClass(e),t.attr("data-icon",e),this}}),e(".preview-mode-selector .chosen-drop li:last-child").entwine({onmatch:function(){e(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})}))},99694:function(e,t,n){"use strict";var a;((a=n(74692))&&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<i[0].attributes.length;n++){var r=i[0].attributes[n];e.attr(r.name,r.value)}e.addClass(t).html(i.html()),a&&a(e)}))},updateNode:function(t,n,a){n=n.replace(/<!--[\s\S]*?-->/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")}})}))},24843:function(e,t,n){"use strict";var a;((a=n(74692))&&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()}}})}))},62930:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(74692)),_react=_interopRequireDefault(__webpack_require__(96540)),_client=__webpack_require__(5338),_IframeDialog=_interopRequireDefault(__webpack_require__(78335)),_Search=_interopRequireDefault(__webpack_require__(89091)),_Loading=_interopRequireDefault(__webpack_require__(86713)),_schemaFieldValues=__webpack_require__(60906),_Injector=__webpack_require__(14269),_lodash=_interopRequireDefault(__webpack_require__(10912));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_extends.apply(null,arguments)}function decodeEntities(e){const t=document.createElement("textarea");return t.innerHTML=e,t.innerText}__webpack_require__(65060),_jquery.default.noConflict(),window.ss=window.ss||{},window.ss.debounce=function(e,t,n){var a,r,i,s=function(){a=null,n||e.apply(r,i)};return function(){var o=n&&!a;r=this,i=arguments,clearTimeout(a),a=setTimeout(s,t),o&&e.apply(r,i)}},window.ss.tabStateUrl=function(){return window.ss.formatTabStateUrl(window.location.href)},window.ss.formatTabStateUrl=function(e){return e.replace(/\?.*/,"").replace(/#.*/,"").replace(new RegExp(`^${(0,_lodash.default)((0,_jquery.default)("base").attr("href"))}/?`),"")},(0,_jquery.default)(window).on("resize.leftandmain",(function(e){(0,_jquery.default)(".cms-container").trigger("windowresize")})),_jquery.default.entwine.warningLevel=_jquery.default.entwine.WARN_LEVEL_BESTPRACTISE,_jquery.default.entwine("ss",(function($){$(window).on("message",(function(e){var t,n=e.originalEvent,a=null;try{a="object"==typeof n.data?n.data:JSON.parse(n.data)}catch(e){}if(a&&$.path.parseUrl(window.location.href).domain===$.path.parseUrl(n.origin).domain)switch(t=void 0===a.target?$(window):$(a.target),a.type){case"event":let e=a.event,n=a.data;e||(e=a.message.type),n||(n=a.message.payload),t.trigger(e,n);break;case"callback":t[a.callback].call(t,a.data)}}));var positionLoadingSpinner=function(){var e=$(".ss-loading-screen .loading-animation"),t=($(window).height()-e.height())/2;e.css("top",t+120),e.show()},applyChosen=function(e){e.is(":visible")?e.addClass("has-chosen").chosen({allow_single_deselect:!0,disable_search_threshold:20,display_disabled_options:!0,width:"100%"}):setTimeout((function(){e.show(),applyChosen(e)}),500)},isSameUrl=function(e,t){var n=$("base").attr("href");e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,n),t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,n);var a=$.path.parseUrl(e),r=$.path.parseUrl(t);return a.pathname.replace(/\/*$/,"")==r.pathname.replace(/\/*$/,"")&&a.search==r.search},ajaxCompleteEvent=window.ss.debounce((function(){$(window).trigger("ajaxComplete")}),1e3,!0);$(window).on("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete((function(e,t,n){var a=document.URL,r=t.getResponseHeader("X-ControllerURL"),i=n.url,s=null!==t.getResponseHeader("X-Status")?t.getResponseHeader("X-Status"):t.statusText,o=t.status<200||t.status>399?"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.clearTabState(window.ss.tabStateUrl()),this.saveTabState(window.ss.formatTabStateUrl(e),!0),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"));var i={promises:[],onAjaxSuccessCallbacks:[]};return e.trigger("beforesubmitform",i),Promise.all(i.promises).then((function(s){let o=!0;const l=[];for(const e of s)!1===e.success&&(o=!1,l.push(e.reason));if(!o){let e=!1;for(const t of l)if("invalid"===t){e=!0;break}return e&&jQuery.noticeAdd({text:window.ss.i18n._t("Admin.VALIDATIONERROR","Validation Error"),type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}}),!1}r.trigger("submitform",{form:e,button:t}),$(t).addClass("btn--loading loading"),$(t).prop("disabled",!0),$(t).is("button")&&($(t).append($('<div class="btn__loading-icon"><span class="btn__circle btn__circle--1"></span><span class="btn__circle btn__circle--2"></span><span class="btn__circle btn__circle--3"></span></div>')),$(t).css($(t).outerWidth()+"px"));var d=e.validate(),u=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===d||d||(statusMessage("Validation failed.","bad"),u());var c=e.serializeArray();c.push({name:$(t).attr("name"),value:"1"}),c.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),r.saveTabState(window.ss.tabStateUrl(),!1),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs,ValidationResult"},url:e.attr("action"),data:c,type:"POST",complete:function(){u()},success:function(t,a,s){i.onAjaxSuccessCallbacks.forEach((e=>e())),u(),e.removeClass("changed"),n&&n(t,a,s);var o=r.handleAjaxResponse(t,a,s);o&&o.filter("form").trigger("aftersubmitform",{status:a,xhr:s,formData:c})}},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<i.length&&(a="Content",i=["Content"],s=this._findFragments(i)),this.trigger("beforestatechange",{state:t,element:s}),r["X-Pjax"]=a,void 0!==t.__forceReferer){let e=t.__forceReferer;try{e=decodeURI(e)}catch(e){}finally{r["X-Backurl"]=encodeURI(e)}}s.addClass("loading");let o=$.ajax({headers:r,url:t.path||document.URL}).fail(((e,t,n)=>{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(e,t){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){if(void 0===e){window.ss.tabStateUrl()}var n=[];if(this.find(".cms-tabset,.ss-tabset").each((function(e,a){var r=$(a).attr("id");r&&$(a).data("uiTabs")&&($(a).data("ignoreTabState")||$(a).getIgnoreTabState()||n.push({id:r,selected:t?0:$(a).tabs("option","active")}))})),n){var a="tabs-"+e;try{window.sessionStorage.setItem(a,JSON.stringify(n))}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<t.length;n++)t.key(n).match(/^tabs-/)&&t.removeItem(t.key(n))}},clearCurrentTabState:function(){this.clearTabState(window.ss.tabStateUrl())},showLoginDialog:function(){let e=$(".leftandmain__login-dialog");e.length&&e.destroy(),e=$('<div class="leftandmain__login-dialog" />'),$("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=$('<div class="cms-loading-container"/>');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=$("<span></span>").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=$('<div class="ss-ui-dialog" id="'+e+'" />'),$("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,t){this.openUrl(t,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=decodeEntities(e),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},79797:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62930),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)}})}))},54951:function(e,t,n){"use strict";var a;((a=n(74692))&&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"))}))}})}))},76768:function(e,t,n){"use strict";var a,r=(a=n(96540))&&a.__esModule?a:{default:a},i=n(5338),s=n(14269);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}window.jQuery.entwine("ss",(e=>{e(".js-injector-boot .ss-searchable-dropdown-field").entwine({Root:null,Component:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=this.data("schema");if(n){this.data("entwine-value",n.value);const e=(0,i.createRoot)(this[0]),a=(0,s.loadComponent)(n.component,t);this.setRoot(e),this.setComponent(a),this._super(),this.refresh()}},onunmatch(){const e=this.getRoot();e&&e.unmount()},getProps(){return{...this.data("schema"),value:this.data("entwine-value")||"",onChange:this.handleChange.bind(this)}},refresh(){const e=this.getRoot(),t=this.getComponent(),n=this.getProps();e.render(r.default.createElement(t,o({},n,{noHolder:!0})))},handleChange(e){this.data("entwine-value",e),this.refresh()}}),e(".cms-edit-form").entwine({getChangeTrackerOptions(){const t=void 0===this.entwineData("ChangeTrackerOptions");let n=this._super();return t&&(n=e.extend({},n),n.ignoreFieldSelector+=", .ss-searchable-dropdown-field .no-change-track :input",this.setChangeTrackerOptions(n)),n}})}))},95988:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62930),n(54951);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"))}))}})}))},2400:function(e,t,n){"use strict";var a,r=(a=n(74692))&&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()}))}))},42496:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62727),n(66530),n(38344),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")}})}))},72806:function(e,t,n){"use strict";var a=d(n(74692)),r=d(n(96540)),i=n(5338),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(14269)),o=n(16679);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("toastcontainernamespace",(e=>{e("body").entwine({onmatch(){const t=e('<div class="toasts-container"></div>');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))}))}})},28620:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62727),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")}}})}))},224:function(e,t,n){"use strict";var a=d(n(74692)),r=d(n(96540)),i=n(5338),s=n(60906),o=n(90277),l=n(14269);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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}a.default.entwine("ss",(e=>{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)}})}))},65376:function(e,t,n){"use strict";var a=l(n(74692)),r=l(n(96540)),i=n(5338),s=n(60906),o=n(14269);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)}})}))},89513:function(e,t,n){"use strict";var a,r=(a=n(20181))&&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)},36208:function(e,t,n){"use strict";var a,r=(a=n(74692))&&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<a.length;r++){var i=a[r];switch(i){case".":break;case"..":n.length&&n.pop();break;default:n.push(i)}}return"/"+n.join("/")},isSameDomain:function(e,t){return i.parseUrl(e).domain===i.parseUrl(t).domain},isRelativeUrl:function(e){return""===i.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==i.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!i.isRelativeUrl(e))return e;var n=i.parseUrl(e),a=i.parseUrl(t),r=n.protocol||a.protocol,s=n.protocol?n.doubleSlash:n.doubleSlash||a.doubleSlash,o=n.authority||a.authority,l=""!==n.pathname;return r+s+o+i.makePathAbsolute(n.pathname||a.filename,a.pathname)+(n.search||!l&&a.search||"")+n.hash},addSearchParams:function(e,t){var n=i.parseUrl(e),a=(t="string"==typeof t?i.convertSearchToArray(t):t,r.default.extend(i.convertSearchToArray(n.search),t)),s=i.convertObjectToSearch(a);return n.hrefNoSearch+"?"+s+(n.hash||"")},getSearchParams:function(e){var t=i.parseUrl(e);return i.convertSearchToArray(t.search)},convertSearchToArray:function(e){var t,n,a,r={};for(t=(e=e.replace(/^\?/,""))?e.split("&"):[],n=0;n<t.length;n++)a=t[n].split("="),r[decodeURIComponent(a[0])]=decodeURIComponent(a[1]);return r},convertObjectToSearch(e){let t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},convertUrlToDataUrl:function(e){var t=i.parseUrl(e);return i.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):i.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function(e){return void 0===e&&(e=location.hash),i.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(e){var t="&"+r.default.mobile.subPageUrlKey;return e&&e.split(t)[0].split(dialogHashKey)[0]},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(document.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},cleanHash:function(e){return i.stripHash(e.replace(/\?.*$/,"").replace(dialogHashKey,""))},isExternal:function(e){var t=i.parseUrl(e);return!(!t.protocol||t.domain===document.domain)},hasProtocol:function(e){return/^(:?\w+:)/.test(e)}};r.default.path=i},65060:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62727),r.default.widget("ssui.ssdialog",r.default.ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){r.default.ui.dialog.prototype._create.call(this);var e=this,t=(0,r.default)('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');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&&e<this.options.minWidth?n.width=this.options.minWidth:this.options.maxWidth&&e>this.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&&t<this.options.minHeight?n.height=this.options.minHeight:this.options.maxHeight&&t>this.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)('<a href="#"/>').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)("<span/>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(i)}(0,r.default)("<span/>").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)}})},32613:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(60328)),r=o(n(64583)),i=o(n(55373)),s=o(n(84010));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)}};t.default=f},80391:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=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(){}}},78318: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(95815)),r=i(n(55373));function i(e){return e&&e.__esModule?e:{default:e}}},14269:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return o.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=d(n(92030)),r=d(n(52415)),i=d(n(28699)),s=d(n(39558)),o=d(n(8868)),l=d(n(94408));function d(e){return e&&e.__esModule?e:{default:e}}t.default=l.default},3600: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]}};t.default=window.ss.routeRegister},75564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=o(n(74827)),i=o(n(88835)),s=o(n(10912));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;t.default=window.ss.router},66373: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(95815))&&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)}}),{})};t.default=f},14274:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(96540);class r extends a.Component{constructor(){super(),clearTimeout(null)}render(){return null}}r.propTypes={};t.default=r},97671: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}};t.default=window.ss.tinymceactions},78443:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(57761)),r=i(n(95815));function i(e){return e&&e.__esModule?e:{default:e}}t.default=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,r){if(t.includes(e))return"required"!==n;switch(n){case"equals":{const t=this.getFieldValue(r.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,r.pattern);case"max":return e.length<=r.length;case"email":return a.default.isEmail(e);default:return console.warn(`Unknown validation rule used: '${n}'`),!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);let s=[""];if(t.required&&"object"==typeof t.required&&t.required.hasOwnProperty("extraEmptyValues")&&(s=s.concat(t.required.extraEmptyValues)),t.required&&s.includes(i)){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,o]=t,l=Object.assign({title:e},{title:n},o);if("required"===a)return;if(!this.validateValue(i,s,a,l)){const e=this.getMessage(a,l);r.valid=!1,r.errors.push(e)}})),a&&!r.valid&&(r.errors=[a]),r}}},80328: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(96540))&&a.__esModule?a:{default:a};function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(null,arguments)}},46172:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SPLITMODE_BREAKPOINT=void 0;t.SPLITMODE_BREAKPOINT=800},59523:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=e=>{const t={};return e&&e.split(" ").forEach((e=>{""!==e&&(t[e]=!0)})),t}},18574: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(96540))&&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;t.default=s},94408:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(10712)),r=o(n(42081)),i=o(n(24596)),s=o(n(50010));function o(e){return e&&e.__esModule?e:{default:e}}const l=(0,a.default)();l.register("component",(0,r.default)()),l.register("reducer",(0,i.default)()),l.register("form",(0,s.default)());t.default=l},85841:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(46942)),r=l(n(69012)),i=n(76806),s=n(60906),o=l(n(59523));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>e;t.default=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}}},10135:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=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}}},4136:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GLOBAL_CONTEXT=void 0;var a,r=(a=n(92981))&&a.__esModule?a:{default:a};const i="before",s="after",o="__HEAD__",l="__TAIL__",d=[i,s],u=t.GLOBAL_CONTEXT="__GLOBAL__";t.default=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]}}},26105:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(66104)),r=o(n(69012)),i=n(76806),s=o(n(14269));function o(e){return e&&e.__esModule?e:{default:e}}const l=[i.actionTypes.REGISTER_FIELD,i.actionTypes.DESTROY];t.default=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}},5147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(82960),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(4136));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)}t.default=()=>({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)}})},42081:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5147))&&a.__esModule?a:{default:a};t.default=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<a;i++)r[i-2]=arguments[i];const s=e.get.call(this,t,n,...r);if(s.displayName&&s.displayName.match(/\]$/))return s;const o=s.displayName||s.name||"Component",l=n?`[${n}]`:"";return s.displayName=`${o}${l}`,s},createTransformer(e,t){return(n,a,r)=>{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}}}},50010: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(5147)),r=s(n(85841)),i=s(n(10135));function s(e){return e&&e.__esModule?e:{default:e}}const o=t.SCHEMA_MIDDLEWARE_SERVICE="FormSchemaMiddleware",l=t.VALIDATION_MIDDLEWARE_SERVICE="FormValidationMiddleware";t.default=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;r<n;r++)a[r-1]=arguments[r];return e.get.call(this,o,t,...a)},getValidation(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return e.get.call(this,l,t,...a)},createTransformer(t,n){const a=a=>(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()}}}}},10712:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=()=>({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}})},24596:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(5147)),r=i(n(4136));function i(e){return e&&e.__esModule?e:{default:e}}t.default=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}}),{})}}}},39558: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(53692))&&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)}const o=(e,t)=>t;t.default=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return a=>{if(e&&!Array.isArray(e))throw new Error(`\n withInjector() passed an argument for dependencies that is ${typeof deps}.\n Must be an array of named dependencies.\n `);if(t&&"function"!=typeof t)throw new Error("\n Second parameter of inject() [mapDependenciesToProps] must be a function, taking the resolved\n dependencies as enumerated arguments, and returning a map of prop names to dependencies.\n ");if("function"!=typeof n)throw new Error("\n Third parameter of inject() [getContext] must be a function, taking the component's props\n and current inject context as parameters, and returning a string representing the Injector\n context to use throughout the component.\n ");class s extends r.Component{constructor(e,t){super(e,t),this.state={context:n(e,t.injector.context)}}getChildContext(){return{injector:{...this.context.injector,context:this.state.context}}}static getDerivedStateFromProps(e,t){const a=n(e,t.context);return a!==t.context?{context:a}:null}render(){let n={};if(e){const{get:a}=this.context.injector,r=e.map((e=>a(e,this.state.context)));if(t?n=t(...r):e.forEach(((e,t)=>{n[e]=r[t]})),!n||"object"!=typeof n)throw new Error("\n mapDepedenciesToProps parameter passed to inject()\n should return an object that maps prop names to dependencies\n ")}const i={...n,...this.props};return r.default.createElement(a,i)}}return s.contextTypes=i.default,s.childContextTypes=i.default,s}}},53692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5556))&&a.__esModule?a:{default:a};t.default={injector:r.default.shape({get:r.default.func,context:r.default.string,validate:r.default.func})}},8868: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(69733),i=u(n(46381)),s=u(n(92030)),o=u(n(28699)),l=u(n(94408)),d=u(n(53692));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(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(null,arguments)}t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;class u extends a.Component{constructor(e){super(e),this.state={target:null,error:!1}}getChildContext(){const e=t&&t.context;return e?{injector:{...this.context.injector,context:e}}:this.context}componentDidMount(){l.default.ready((()=>{if("string"!=typeof e)this.setState({target:e});else{let n=!0,a=null;try{a=this.context.injector.get(e,t&&t.context),n=!1}catch(e){throw this.setState({target:a,error:n}),e}this.setState({target:a,error:n})}}))}render(){const n=this.state.target;if(this.state.error){let t=i.default;try{t=this.context.injector.get("NotFoundComponent")}catch(e){}return a.default.createElement(t,f({},this.props,{itemName:e}))}if(n){if(t){const e={...window.ss,...t},{store:i}=e;return a.default.createElement(r.Provider,{store:i},a.default.createElement(n,this.props))}return a.default.createElement(n,this.props)}return null}}u.childContextTypes=d.default;return(n||s.default)((0,o.default)(u))}},52415: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(53692))&&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)}t.default=e=>t=>{class n extends r.Component{getChildContext(){return{injector:{...this.context.injector,context:e}}}render(){return r.default.createElement(t,this.props)}}return n.contextTypes=i.default,n.childContextTypes=i.default,n}},92030: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(94408)),i=s(n(53692));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)}t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default;class n extends a.Component{getChildContext(){const{component:e,form:n}=t;return{injector:{get:e.get.bind(e),validate:n.getValidation.bind(n)}}}render(){return a.default.createElement(e,this.props)}}return n.childContextTypes=i.default,n}},28699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(53692))&&a.__esModule?a:{default:a};t.default=e=>(e.contextTypes={...e.contextTypes||{},...r.default},e.displayName=`withInjector(\n ${e.displayName||e.name||"Component"}\n )`,e)},66802:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=Number(e);if(null!==e&&t>=0&&t<10)return[r.default._t("Admin.WRITTEN_NUMBER_ZERO","zero"),r.default._t("Admin.WRITTEN_NUMBER_ONE","one"),r.default._t("Admin.WRITTEN_NUMBER_TWO","two"),r.default._t("Admin.WRITTEN_NUMBER_THREE","three"),r.default._t("Admin.WRITTEN_NUMBER_FOUR","four"),r.default._t("Admin.WRITTEN_NUMBER_FIVE","five"),r.default._t("Admin.WRITTEN_NUMBER_SIX","six"),r.default._t("Admin.WRITTEN_NUMBER_SEVEN","seven"),r.default._t("Admin.WRITTEN_NUMBER_EIGHT","eight"),r.default._t("Admin.WRITTEN_NUMBER_NINE","nine")][t];if(t)return String(t);return null};var a,r=(a=n(95815))&&a.__esModule?a:{default:a}},15042:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.form&&e.form.formState||{}}},51266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(95815))&&a.__esModule?a:{default:a};t.default=async e=>{let t=null;try{t=(await e.response.json()).errors[0].value}catch(e){}return t||(t=r.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred.")),t}},89919: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]:{};return a=>{if(!t.payload.fieldId)throw new Error("Invalid fieldId");const i=e.fields||{},s=i[t.payload.fieldId]?e.fields[t.payload.fieldId]:n;return(0,r.default)(Object.assign({},e,{fields:Object.assign({},i,{[t.payload.fieldId]:Object.assign({},s,a(s))})}))}};var a,r=(a=n(82229))&&a.__esModule?a:{default:a}},60906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!t)return{};return t.fields.reduce(((t,n)=>{const a=i(e.fields,n.name);return a?"Structural"===a.type||!0===a.readOnly?t:Object.assign({},t,{[n.name]:n.value}):t}),{})},t.findField=i,t.schemaMerge=function(e,t){if(void 0===t)return e;return r.default.recursive(!0,e,t)};var a,r=(a=n(84010))&&a.__esModule?a:{default:a};function i(e,t){return e?e.reduce(((e,n)=>e||i(n.children,t)),e.find((e=>e.name===t||e.name===`${t}[]`))):null}},13547:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinUrlPaths=void 0;t.joinUrlPaths=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return"";let a=t.shift();for(const e of t)a=`${a.replace(/\/$/,"")}/${e.replace(/^\//,"")}`;return a}},76535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(17987),i=(a=n(35259))&&a.__esModule?a:{default:a};t.default=(0,r.DragDropContext)(i.default)},78848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){const n=(0,r.useLocation)(),i=(0,r.useNavigate)(),s=(0,r.useParams)();return a.default.createElement(e,o({},t,{router:{location:n,navigate:i,params:s}}))}},t.routerPropTypes=void 0;var a=s(n(96540)),r=n(84976),i=s(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}t.routerPropTypes=i.default.shape({location:i.default.shape({pathname:i.default.string,query:i.default.object,search:i.default.string}),navigate:i.default.func,params:i.default.object})},90473:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_BREADCRUMBS:"SET_BREADCRUMBS"}},62129:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBreadcrumbs=function(e){return{type:r.default.SET_BREADCRUMBS,payload:{breadcrumbs:e}}};var a,r=(a=n(90473))&&a.__esModule?a:{default:a}},76606:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(90473));function i(e){return e&&e.__esModule?e:{default:e}}const s=(0,a.default)([]);t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;return t.type===r.default.SET_BREADCRUMBS?(0,a.default)(Object.assign([],t.payload.breadcrumbs)):e}},78155:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_CONFIG:"SET_CONFIG"}},91667:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=function(e){return{type:r.default.SET_CONFIG,payload:{config:e}}};var a,r=(a=n(78155))&&a.__esModule?a:{default:a}},21500:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(78155));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.default.SET_CONFIG?(0,a.default)(Object.assign({},e,t.payload.config)):e}},80593:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={TOGGLE_MENU:"TOGGLE_MENU",OPEN_MENU:"OPEN_MENU",CLOSE_MENU:"CLOSE_MENU"}},97097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeMobileMenu=function(){return{type:r.default.CLOSE_MENU,payload:null}},t.openMobileMenu=function(){return{type:r.default.OPEN_MENU,payload:null}},t.toggleMobileMenu=function(){return{type:r.default.TOGGLE_MENU,payload:null}};var a,r=(a=n(80593))&&a.__esModule?a:{default:a}},64038:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(80593));function i(e){return e&&e.__esModule?e:{default:e}}const s={isOpen:!1};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;switch((arguments.length>1?arguments[1]:void 0).type){case r.default.TOGGLE_MENU:return(0,a.default)({...e,isOpen:!e.isOpen});case r.default.OPEN_MENU:return(0,a.default)({...e,isOpen:!0});case r.default.CLOSE_MENU:return(0,a.default)({...e,isOpen:!1});default:return e}}},61481:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},63249:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteRecord=function(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const l={recordType:e,id:t},d=n.toLowerCase(),u="get"===d?[s(i,l),o]:[s(i,l),{},o];return n=>(n({type:r.default.DELETE_RECORD_REQUEST,payload:l}),a.default[d](...u).then((()=>{n({type:r.default.DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})).catch((a=>{throw n({type:r.default.DELETE_RECORD_FAILURE,payload:{error:a,recordType:e,id:t}}),a})))},t.fetchRecord=function(e,t,n){const i={recordType:e},o={Accept:"application/json"},l=t.toLowerCase();return t=>{t({type:r.default.FETCH_RECORD_REQUEST,payload:i});const d="get"===l?[s(n,i),o]:[s(n,i),{},o];return a.default[l](...d).then((e=>e.json())).then((n=>{t({type:r.default.FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})})).catch((n=>{throw t({type:r.default.FETCH_RECORD_FAILURE,payload:{error:n,recordType:e}}),n}))}},t.fetchRecords=function(e,t,n){const i={recordType:e},o={Accept:"application/json"},l=t.toLowerCase();return t=>{t({type:r.default.FETCH_RECORDS_REQUEST,payload:i});const d="get"===l?[s(n,i),o]:[s(n,i),{},o];return a.default[l](...d).then((e=>e.json())).then((n=>{t({type:r.default.FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})})).catch((n=>{throw t({type:r.default.FETCH_RECORDS_FAILURE,payload:{error:n,recordType:e}}),n}))}};var a=i(n(32613)),r=i(n(61481));function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return Object.keys(t).reduce(((e,n)=>e.replace(`:${n}`,t[n])),e)}},47646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(61481));function i(e){return e&&e.__esModule?e:{default:e}}const s={};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.default.FETCH_RECORDS_SUCCESS:{const n=t.payload.recordType;if(!n)throw new Error("Undefined record type");const r=t.payload.data._embedded[n]||[];return(0,a.default)({...e,[n]:r})}case r.default.FETCH_RECORD_SUCCESS:{const n=t.payload.recordType,r=t.payload.data;if(!n)throw new Error("Undefined record type");if(!r)throw new Error("Undefined record data given");const i=e[n]||[];return i.find((e=>e.ID===r.ID))?(0,a.default)({...e,[n]:i.map((e=>e.ID===r.ID?r:e))}):(0,a.default)({...e,[n]:[...i,r]})}case r.default.DELETE_RECORD_SUCCESS:{const n=t.payload.recordType;if(!n)throw new Error("Undefined record type");const r=e[n].filter((e=>e.ID!==t.payload.id));return(0,a.default)({...e,[n]:r})}default:return e}}},55337:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_SCHEMA:"SET_SCHEMA",SET_SCHEMA_STATE_OVERRIDES:"SET_SCHEMA_STATE_OVERRIDES",SET_SCHEMA_LOADING:"SET_SCHEMA_LOADING"}},82513:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSchema=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return{type:r.default.SET_SCHEMA,payload:{...t,id:e,name:n}}},t.setSchemaLoading=function(e,t){return{type:r.default.SET_SCHEMA_LOADING,payload:{id:e,loading:t}}},t.setSchemaStateOverrides=function(e,t){return{type:r.default.SET_SCHEMA_STATE_OVERRIDES,payload:{id:e,stateOverride:t}}};var a,r=(a=n(55337))&&a.__esModule?a:{default:a}},76958:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(t.type){case r.default.SET_SCHEMA:{const n=e[t.payload.id]||{};return(0,a.default)({...e,[t.payload.id]:{...n,...t.payload}})}case r.default.SET_SCHEMA_STATE_OVERRIDES:{const n=e[t.payload.id]||{},r=t.payload.stateOverride;return r&&r.fields?(0,a.default)({...e,[t.payload.id]:{...n,stateOverride:r}}):e}case r.default.SET_SCHEMA_LOADING:{const n=e[t.payload.id]||{},r=n.metadata||{};return(0,a.default)({...e,[t.payload.id]:{...n,metadata:{...r,loading:t.payload.loading}}})}default:return e}};var a=i(n(82229)),r=i(n(55337));function i(e){return e&&e.__esModule?e:{default:e}}const s=(0,a.default)({})},87835:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={TABS_ACTIVATE_TAB:"TABS_ACTIVATE_TAB"}},25827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateTab=function(e,t){return{type:r.default.TABS_ACTIVATE_TAB,payload:{fieldId:e,tab:t}}};var a,r=(a=n(87835))&&a.__esModule?a:{default:a}},71916:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,r.default)(e,t,l);if(t.type===i.default.TABS_ACTIVATE_TAB)return n((()=>({activeTab:t.payload.tab})));return e};var a=s(n(82229)),r=s(n(89919)),i=s(n(87835));function s(e){return e&&e.__esModule?e:{default:e}}const o=(0,a.default)({fields:{}}),l=(0,a.default)({activeTab:null})},34526:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STAY_TIME=t.FADEOUT_TIME=void 0;t.STAY_TIME=6e3,t.FADEOUT_TIME=1200},49023:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={DISPLAY:"DISPLAY_TOAST",DISMISS:"DISMISS_TOAST",REMOVE:"REMOVE_TOAST",PAUSE:"PAUSE_TOAST",RESUME:"RESUME_TOAST"}},16679:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dismiss=l,t.display=d,t.error=function(e){return d({text:e,type:"error",stay:!0})},t.info=function(e){return d({text:e})},t.pause=function(){return{type:i.default.PAUSE}},t.resume=function(){return{type:i.default.RESUME}},t.success=function(e){return d({text:e,type:"success"})},t.warning=function(e){return d({text:e,type:"warning",stay:!0})};var a,r=n(22831),i=(a=n(49023))&&a.__esModule?a:{default:a},s=n(34526);const o={text:"",stay:!1,type:"notice"};function l(e){return t=>{t({type:i.default.DISMISS,payload:{id:e}}),setTimeout((()=>t({type:i.default.REMOVE,payload:{id:e}})),s.FADEOUT_TIME)}}function d(e){const t=`toast-${(0,r.v4)()}`;return n=>{const a={id:t,dismissCallback:()=>l(t)(n),...o,...e};n({type:i.default.DISPLAY,payload:a})}}},53896:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(49023))&&a.__esModule?a:{default:a},i=n(34526);const s={paused:!1,toasts:[]},o=e=>{let{stay:t,dismissCallback:n}=e;return t?void 0:setTimeout(n,i.STAY_TIME)},l=(e,t)=>({...e,toasts:t});t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,payload:n}=arguments.length>1?arguments[1]:void 0;switch(t){case r.default.DISPLAY:return((e,t)=>l(e,[...e.toasts,{...t,timeout:e.paused?void 0:o(t),dismissed:!1}]))(e,n);case r.default.DISMISS:return((e,t)=>l(e,e.toasts.map((e=>e.id===t?{...e,dismissed:!0}:e))))(e,n.id);case r.default.REMOVE:return((e,t)=>l(e,e.toasts.filter((e=>e.id!==t))))(e,n.id);case r.default.PAUSE:return(e=>({paused:!0,toasts:e.toasts.map((e=>{let{timeout:t,...n}=e;return t&&clearTimeout(t),n}))}))(e);case r.default.RESUME:return(e=>({paused:!1,toasts:e.toasts.map((e=>({timeout:o(e),...e})))}))(e);default:return e}}},82126:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={TREEFIELD_SET_VISIBLE:"TREEDROPDOWNFIELD_SET_VISIBLE",TREEFIELD_UPDATED_TREE:"TREEDROPDOWNFIELD_UPDATED_TREE",TREEFIELD_UPDATING_TREE:"TREEDROPDOWNFIELD_UPDATING_TREE",TREEFIELD_UPDATE_FAILED:"TREEFIELD_UPDATE_FAILED",TREEFIELD_SET_SEARCH:"TREEFIELD_SET_SEARCH",TREEFIELD_ADD_SELECTED_VALUES:"TREEFIELD_ADD_SELECTED_VALUES"}},47193:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSelectedValues=function(e,t){return{type:r.default.TREEFIELD_ADD_SELECTED_VALUES,payload:{fieldId:e,values:t}}},t.beginTreeUpdating=function(e,t){return{type:r.default.TREEFIELD_UPDATING_TREE,payload:{fieldId:e,path:t}}},t.setSearch=function(e,t){return{type:r.default.TREEFIELD_SET_SEARCH,payload:{fieldId:e,search:t}}},t.setVisible=function(e,t){return{type:r.default.TREEFIELD_SET_VISIBLE,payload:{fieldId:e,path:t}}},t.updateTree=function(e,t,n){return{type:r.default.TREEFIELD_UPDATED_TREE,payload:{fieldId:e,path:t,tree:n}}},t.updateTreeFailed=function(e,t){return{type:r.default.TREEFIELD_UPDATE_FAILED,payload:{fieldId:e,path:t}}};var a,r=(a=n(82126))&&a.__esModule?a:{default:a}},88790:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,r.default)(e,t,l),a=(e,t)=>e.filter((e=>e!==t)),s=(e,t)=>{if(e.find((e=>e===t)))return e;return[...e,t].sort()};switch(t.type){case i.default.TREEFIELD_SET_VISIBLE:return n((()=>({visible:t.payload.path})));case i.default.TREEFIELD_UPDATING_TREE:return n((e=>({loading:s(e.loading,u(t.payload.path)),failed:a(e.failed,u(t.payload.path))})));case i.default.TREEFIELD_UPDATED_TREE:return n((e=>({tree:d(e.tree,t.payload.path,t.payload.tree),loading:a(e.loading,u(t.payload.path)),failed:a(e.failed,u(t.payload.path))})));case i.default.TREEFIELD_UPDATE_FAILED:return n((e=>({loading:a(e.loading,u(t.payload.path)),failed:s(e.failed,u(t.payload.path))})));case i.default.TREEFIELD_SET_SEARCH:return n((e=>({...e,search:t.payload.search})));case i.default.TREEFIELD_ADD_SELECTED_VALUES:{const e=t.payload.values||[];return n((t=>({...t,selectedValues:[...t.selectedValues.filter((t=>!e.find((e=>e.id===t.id)))),...e].sort(((e,t)=>e.id-t.id))})))}default:return e}};var a=s(n(82229)),r=s(n(89919)),i=s(n(82126));function s(e){return e&&e.__esModule?e:{default:e}}const o=(0,a.default)({fields:{}}),l=(0,a.default)({visible:[],tree:{},loading:[],failed:[],search:"",selectedValues:[]});function d(e,t,n){if(0===t.length)return n;const[r,...i]=t;return e.children?(0,a.default)({...e,children:e.children.map((e=>e.id===r?d(e,i,n):e))}):e}function u(e){return e.length?e[e.length-1]:0}},27798:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={ADD_FORM_CHANGED:"ADD_FORM_CHANGED",REMOVE_FORM_CHANGED:"REMOVE_FORM_CHANGED"}},35505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addFormChanged=function(e){return{type:r.default.ADD_FORM_CHANGED,meta:{form:e}}},t.removeFormChanged=function(e){return{type:r.default.REMOVE_FORM_CHANGED,meta:{form:e}}};var a,r=(a=n(27798))&&a.__esModule?a:{default:a}},29950:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(82229)),r=n(76806),i=s(n(27798));function s(e){return e&&e.__esModule?e:{default:e}}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const n=t.meta&&t.meta.form;switch(t.type){case i.default.ADD_FORM_CHANGED:case r.actionTypes.CHANGE:return(0,a.default)([...e.filter((e=>e.name!==n)),{name:n}]);case i.default.REMOVE_FORM_CHANGED:case r.actionTypes.STOP_SUBMIT:return(0,a.default)([...e.filter((e=>e.name!==n))]);case r.actionTypes.DESTROY:return(0,a.default)([...e.filter((e=>!n.includes(e.name)))]);default:return e}}},98307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadUsedOn=function(e,t,n){const s={method:t,headers:{Accept:"application/json"},credentials:"same-origin"};return d=>{if(!e||!t||!n){const t=a.default._t("Admin.NOT_AVAILABLE_USED_DATA","The usage data is currently unavailable.");return Promise.resolve(d(l(e,t)))}return d({type:i.default.LOAD_USED_ON,payload:{identifier:e}}),(0,r.default)(n,s).then((e=>e.json())).then((t=>{d(o(e,t))})).catch((t=>{d(l(e,t))}))}},t.loadUsedOnFailed=l,t.saveUsedOn=o;var a=s(n(95815)),r=s(n(60328)),i=s(n(73581));function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return{type:i.default.SAVE_USED_ON,payload:{identifier:e,usedOn:t}}}function l(e,t){return{type:i.default.LOAD_USED_ON_FAILED,payload:{identifier:e,error:t.message}}}},88140:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(73581))&&a.__esModule?a:{default:a};const i={loading:[],usedOn:{},errors:{}};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;const n=t&&t.payload&&t.payload.identifier;if(!n)return e;switch(t.type){case r.default.SAVE_USED_ON:{const a=t.payload.usedOn;return{...e,loading:e.loading.filter((e=>e!==n)),usedOn:{...e.usedOn,[n]:a.usage}}}case r.default.LOAD_USED_ON:return e.loading.includes(n)?e:{...e,loading:[...e.loading,n],errors:Object.entries(e.errors).reduce(((e,t)=>{let[a,r]=t;return a===n?e:{...e,[a]:r}}),{})};case r.default.LOAD_USED_ON_FAILED:{const a=t.payload.error;return{...e,loading:e.loading.filter((e=>e!==n)),errors:{...e.errors,[n]:a}}}default:return e}}},73581:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={LOAD_USED_ON:"LOAD_USED_ON",SAVE_USED_ON:"SAVE_USED_ON",LOAD_USED_ON_FAILED:"LOAD_USED_ON_FAILED"}},17359:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SELECT_EDIT:"SELECT_EDIT",SELECT_PREVIEW:"SELECT_PREVIEW",SELECT_SPLIT:"SELECT_SPLIT",SPLIT_AVAILABLE:"SPLIT_AVAILABLE"}},6679:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableOrDisableSplitMode=function(e){return{type:r.default.SPLIT_AVAILABLE,payload:{panelWidth:e}}},t.selectEditMode=function(){return{type:r.default.SELECT_EDIT}},t.selectPreviewMode=function(){return{type:r.default.SELECT_PREVIEW}},t.selectSplitMode=function(){return{type:r.default.SELECT_SPLIT}};var a,r=(a=n(17359))&&a.__esModule?a:{default:a}},98360:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(17359))&&a.__esModule?a:{default:a},i=n(46172),s=n(44072);const o={activeState:s.VIEW_MODE_STATES.SPLIT,splitAvailable:!0,lockState:!1};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.default.SELECT_EDIT:return{...e,activeState:s.VIEW_MODE_STATES.EDIT,lockState:!0};case r.default.SELECT_PREVIEW:return{...e,activeState:s.VIEW_MODE_STATES.PREVIEW,lockState:!0};case r.default.SELECT_SPLIT:return{...e,activeState:s.VIEW_MODE_STATES.SPLIT,lockState:!1};case r.default.SPLIT_AVAILABLE:{const n=t.payload.panelWidth>i.SPLITMODE_BREAKPOINT;let a=e.activeState;return e.lockState||a!==s.VIEW_MODE_STATES.SPLIT||n?!e.lockState&&a===s.VIEW_MODE_STATES.EDIT&&n&&(a=s.VIEW_MODE_STATES.SPLIT):a=s.VIEW_MODE_STATES.EDIT,{...e,splitAvailable:n,activeState:a}}default:return e}}},44072:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_MODE_STATES=void 0;t.VIEW_MODE_STATES={EDIT:"edit",PREVIEW:"preview",SPLIT:"split"}},85152:function(e,t,n){var a=n(86821),r=n(34160);void 0===r.Accordion&&(r.Accordion=a),e.exports=a},26430:function(e,t,n){var a=n(97260),r=n(34160);void 0===r.AccordionBlock&&(r.AccordionBlock=a),e.exports=a},39734:function(e,t,n){var a=n(61080),r=n(34160);void 0===r.BackButton&&(r.BackButton=a),e.exports=a},10431:function(e,t,n){var a=n(32613),r=n(34160);void 0===r.Backend&&(r.Backend=a),e.exports=a},50121:function(e,t,n){var a=n(1541),r=n(34160);void 0===r.Badge&&(r.Badge=a),e.exports=a},64477:function(e,t,n){var a=n(15357),r=n(34160);void 0===r.Breadcrumb&&(r.Breadcrumb=a),e.exports=a},58749:function(e,t,n){var a=n(62129),r=n(34160);void 0===r.BreadcrumbsActions&&(r.BreadcrumbsActions=a),e.exports=a},72250:function(e,t,n){var a=n(73323),r=n(34160);void 0===r.Button&&(r.Button=a),e.exports=a},80125:function(e,t,n){var a=n(32493),r=n(34160);void 0===r.CheckboxSetField&&(r.CheckboxSetField=a),e.exports=a},48486:function(e,t,n){var a=n(74),r=n(34160);void 0===r.CircularLoading&&(r.CircularLoading=a),e.exports=a},32152:function(e,t,n){var a=n(39054),r=n(34160);void 0===r.CompactTagList&&(r.CompactTagList=a),e.exports=a},82660:function(e,t,n){var a=n(80391),r=n(34160);void 0===r.Config&&(r.Config=a),e.exports=a},18320:function(e,t,n){var a=n(78318),r=n(34160);void 0===r.DataFormat&&(r.DataFormat=a),e.exports=a},30521:function(e,t,n){var a=n(28181),r=n(34160);void 0===r.EmotionCssCacheProvider&&(r.EmotionCssCacheProvider=a),e.exports=a},47928:function(e,t,n){var a=n(23977),r=n(34160);void 0===r.FieldHolder&&(r.FieldHolder=a),e.exports=a},93772:function(e,t,n){var a=n(99237),r=n(34160);void 0===r.FileSchemaModalHandler&&(r.FileSchemaModalHandler=a),e.exports=a},56173:function(e,t,n){var a=n(32541),r=n(34160);void 0===r.FileStatusIcon&&(r.FileStatusIcon=a),e.exports=a},76361:function(e,t,n){var a=n(47549),r=n(34160);void 0===r.Focusedzone&&(r.Focusedzone=a),e.exports=a},27092:function(e,t,n){var a=n(11463),r=n(34160);void 0===r.Form&&(r.Form=a),e.exports=a},60022:function(e,t,n){var a=n(23443),r=n(34160);void 0===r.FormAction&&(r.FormAction=a),e.exports=a},72298:function(e,t,n){var a=n(21077),r=n(34160);void 0===r.FormAlert&&(r.FormAlert=a),e.exports=a},39636:function(e,t,n){var a=n(96865),r=n(34160);void 0===r.FormBuilder&&(r.FormBuilder=a),e.exports=a},75252:function(e,t,n){var a=n(23077),r=n(34160);void 0===r.FormBuilderLoader&&(r.FormBuilderLoader=a),e.exports=a},90584:function(e,t,n){var a=n(56091),r=n(34160);void 0===r.FormBuilderModal&&(r.FormBuilderModal=a),e.exports=a},17558:function(e,t,n){var a=n(82734),r=n(34160);void 0===r.FormConstants&&(r.FormConstants=a),e.exports=a},82414:function(e,t,n){var a=n(21757),r=n(34160);void 0===r.GridField&&(r.GridField=a),e.exports=a},67694:function(e,t,n){var a=n(97525),r=n(34160);void 0===r.GridFieldCell&&(r.GridFieldCell=a),e.exports=a},19514:function(e,t,n){var a=n(57840),r=n(34160);void 0===r.GridFieldHeader&&(r.GridFieldHeader=a),e.exports=a},39078:function(e,t,n){var a=n(75308),r=n(34160);void 0===r.GridFieldHeaderCell&&(r.GridFieldHeaderCell=a),e.exports=a},36726:function(e,t,n){var a=n(86313),r=n(34160);void 0===r.GridFieldRow&&(r.GridFieldRow=a),e.exports=a},90990:function(e,t,n){var a=n(20777),r=n(34160);void 0===r.GridFieldTable&&(r.GridFieldTable=a),e.exports=a},56086:function(e,t,n){var a=n(85281),r=n(34160);void 0===r.HiddenField&&(r.HiddenField=a),e.exports=a},14992:function(e,t,n){var a=n(14269),r=n(34160);void 0===r.Injector&&(r.Injector=a),e.exports=a},55064:function(e,t,n){var a=n(5549),r=n(34160);void 0===r.InsertLinkModal&&(r.InsertLinkModal=a),e.exports=a},86473:function(e,t,n){var a=n(81637),r=n(34160);void 0===r.ListGroup&&(r.ListGroup=a),e.exports=a},7057:function(e,t,n){var a=n(47546),r=n(34160);void 0===r.ListGroupItem&&(r.ListGroupItem=a),e.exports=a},98461:function(e,t,n){var a=n(29981),r=n(34160);void 0===r.LiteralField&&(r.LiteralField=a),e.exports=a},15550:function(e,t,n){var a=n(86713),r=n(34160);void 0===r.Loading&&(r.Loading=a),e.exports=a},21735:function(e,t,n){var a=n(32185),r=n(34160);void 0===r.Modal&&(r.Modal=a),e.exports=a},99855:function(e,t,n){var a=n(82405),r=n(34160);void 0===r.PopoverField&&(r.PopoverField=a),e.exports=a},56726:function(e,t,n){var a=n(99417),r=n(34160);void 0===r.Preview&&(r.Preview=a),e.exports=a},93476:function(e,t,n){var a=n(3600),r=n(34160);void 0===r.ReactRouteRegister&&(r.ReactRouteRegister=a),e.exports=a},83713:function(e,t,n){var a=n(61481),r=n(34160);void 0===r.RecordsActionTypes&&(r.RecordsActionTypes=a),e.exports=a},64145:function(e,t,n){var a=n(63249),r=n(34160);void 0===r.RecordsActions&&(r.RecordsActions=a),e.exports=a},55180:function(e,t,n){var a=n(96937),r=n(34160);void 0===r.ResizeAware&&(r.ResizeAware=a),e.exports=a},91484:function(e,t,n){var a=n(75564),r=n(34160);void 0===r.Router&&(r.Router=a),e.exports=a},7176:function(e,t,n){var a=n(82513),r=n(34160);void 0===r.SchemaActions&&(r.SchemaActions=a),e.exports=a},59338:function(e,t,n){var a=n(89091),r=n(34160);void 0===r.Search&&(r.Search=a),e.exports=a},54758:function(e,t,n){var a=n(54663),r=n(34160);void 0===r.SearchToggle&&(r.SearchToggle=a),e.exports=a},33929:function(e,t,n){var a=n(50693),r=n(34160);void 0===r.SearchableDropdownField&&(r.SearchableDropdownField=a),e.exports=a},58760:function(e,t,n){var a=n(66373),r=n(34160);void 0===r.ShortcodeSerialiser&&(r.ShortcodeSerialiser=a),e.exports=a},10098:function(e,t,n){var a=n(14274),r=n(34160);void 0===r.SilverStripeComponent&&(r.SilverStripeComponent=a),e.exports=a},20088:function(e,t,n){var a=n(36171),r=n(34160);void 0===r.SudoMode&&(r.SudoMode=a),e.exports=a},56779:function(e,t,n){var a=n(25827),r=n(34160);void 0===r.TabsActions&&(r.TabsActions=a),e.exports=a},73226:function(e,t,n){var a=n(5417),r=n(34160);void 0===r.Tag&&(r.Tag=a),e.exports=a},77986:function(e,t,n){var a=n(28557),r=n(34160);void 0===r.TagList&&(r.TagList=a),e.exports=a},4163:function(e,t,n){var a=n(2481),r=n(34160);void 0===r.TextField&&(r.TextField=a),e.exports=a},97256:function(e,t,n){var a=n(97671),r=n(34160);void 0===r.TinyMCEActionRegistrar&&(r.TinyMCEActionRegistrar=a),e.exports=a},94571:function(e,t,n){var a=n(99197),r=n(34160);void 0===r.Tip&&(r.Tip=a),e.exports=a},1359:function(e,t,n){var a=n(16679),r=n(34160);void 0===r.ToastsActions&&(r.ToastsActions=a),e.exports=a},33105:function(e,t,n){var a=n(32189),r=n(34160);void 0===r.Toolbar&&(r.Toolbar=a),e.exports=a},78769:function(e,t,n){var a=n(90277),r=n(34160);void 0===r.TreeDropdownField&&(r.TreeDropdownField=a),e.exports=a},33993:function(e,t,n){var a=n(69161),r=n(34160);void 0===r.TreeDropdownFieldNode&&(r.TreeDropdownFieldNode=a),e.exports=a},74626:function(e,t,n){var a=n(35505),r=n(34160);void 0===r.UnsavedFormsActions&&(r.UnsavedFormsActions=a),e.exports=a},60246:function(e,t,n){var a=n(87523),r=n(34160);void 0===r.VersionedBadge&&(r.VersionedBadge=a),e.exports=a},80753:function(e,t,n){var a=n(6679),r=n(34160);void 0===r.ViewModeActions&&(r.ViewModeActions=a),e.exports=a},61455:function(e,t,n){var a=n(44072),r=n(34160);void 0===r.ViewModeStates&&(r.ViewModeStates=a),e.exports=a},28076:function(e,t,n){var a=n(36087),r=n(34160);void 0===r.ViewModeToggle&&(r.ViewModeToggle=a),e.exports=a},29574:function(e,t,n){var a=n(66802),r=n(34160);void 0===r.formatWrittenNumber&&(r.formatWrittenNumber=a),e.exports=a},38536:function(e,t,n){var a=n(15042),r=n(34160);void 0===r.getFormState&&(r.getFormState=a),e.exports=a},17174:function(e,t,n){var a=n(51266),r=n(34160);void 0===r.getJsonErrorMessage&&(r.getJsonErrorMessage=a),e.exports=a},83952:function(e,t,n){var a=n(89919),r=n(34160);void 0===r.reduxFieldReducer&&(r.reduxFieldReducer=a),e.exports=a},25506:function(e,t,n){var a=n(60906),r=n(34160);void 0===r.schemaFieldValues&&(r.schemaFieldValues=a),e.exports=a},65484:function(e,t,n){var a=n(13547),r=n(34160);void 0===r.ssUrlLib&&(r.ssUrlLib=a),e.exports=a},9360:function(e,t,n){var a=n(76535),r=n(34160);void 0===r.withDragDropContext&&(r.withDragDropContext=a),e.exports=a},98120:function(e,t,n){var a=n(78848),r=n(34160);void 0===r.withRouter&&(r.withRouter=a),e.exports=a},95815:function(e){"use strict";e.exports=i18n}},function(e){var t;t=33119,e(e.s=t)}]); \ No newline at end of file +(self.webpackChunksilverstripe_admin=self.webpackChunksilverstripe_admin||[]).push([[23],{35962:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(74692)),r=_(n(96540)),i=n(69733),s=n(5338),o=n(84976),l=_(n(80391)),d=_(n(75564)),u=_(n(3600)),c=_(n(28221)),f=_(n(95815)),p=n(76806),h=_(n(15042)),m=n(47767),g=n(13547),v=_(n(26285));function _(e){return e&&e.__esModule?e:{default:e}}t.default=class{constructor(e){this.store=e;const t=l.default.get("absoluteBaseUrl");d.default.setAbsoluteBase(t),this.shouldConfirmBeforeUnload=this.shouldConfirmBeforeUnload.bind(this)}setStore(e){this.store=e}start(e){this.matchesReactRoute(e)?this.initReactRouter():this.initLegacyRouter();const t=window.onbeforeunload;window.onbeforeunload=()=>this.shouldConfirmBeforeUnload()?f.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(m.Route,{path:e.path,element:r.default.createElement(e.component,null,r.default.createElement(v.default,{shouldBlockFn:this.shouldConfirmBeforeUnload,blockMessage:this.getUnsavedChangesMessage()}))},u.default.getChildRoutes().map((e=>r.default.createElement(m.Route,{key:e.path,path:e.path,element:r.default.createElement(e.component,null)}))))),{basename:(0,g.joinUrlPaths)(l.default.get("baseUrl"),l.default.get("adminUrl"))});(0,s.createRoot)(document.getElementsByClassName("cms-content")[0]).render(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,p.isDirty)(t.name,h.default)(e)})).length>0}getUnsavedChangesMessage(){return f.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.")}}},99136: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(82960)},7803:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(14269)),r=l(n(78443)),i=l(n(46942)),s=n(60906),o=l(n(23977));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)}};t.default=()=>{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)=>{if(0===n.name.indexOf("ElementForm_"))return t.getState();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()}))}))}},62038:function(e,t,n){"use strict";var a=p(n(14269)),r=n(82960),i=p(n(1265)),s=p(n(80391)),o=n(91667),l=p(n(34121)),d=p(n(90420)),u=p(n(99136)),c=p(n(7803)),f=p(n(35962));function p(e){return e&&e.__esModule?e:{default:e}}window.ss=window.ss||{},window.onload=async function(){(0,l.default)(),(0,d.default)();const e=[i.default],t=s.default.get("debugging");let n=(0,r.applyMiddleware)(...e);t&&(n=(0,u.default)(n));const p=n(r.createStore),h=new f.default(null);(0,c.default)(),a.default.init((()=>{const e=(0,r.combineReducers)(a.default.reducer.getAll()),t=p(e,{});t.dispatch((0,o.setConfig)(s.default.getAll())),a.default.reducer.setStore(t),window.ss.store=t,h.setStore(t),h.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot").addClass("js-injector-boot")})),window.setTimeout((()=>a.default.load()),0)}},34121:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(76806),r=ne(n(14269)),i=ne(n(35421)),s=ne(n(1541)),o=ne(n(73323)),l=ne(n(61080)),d=ne(n(2481)),u=ne(n(85281)),c=ne(n(45193)),f=ne(n(85085)),p=ne(n(81885)),h=ne(n(50237)),m=ne(n(32493)),g=ne(n(23637)),v=ne(n(21757)),_=ne(n(70077)),b=ne(n(31217)),y=ne(n(82405)),w=ne(n(77773)),C=ne(n(29981)),E=ne(n(91621)),O=ne(n(56425)),S=ne(n(60093)),T=ne(n(74491)),P=ne(n(54475)),M=ne(n(47735)),j=ne(n(23443)),D=ne(n(84265)),k=ne(n(90277)),R=ne(n(56091)),x=ne(n(46381)),I=ne(n(11463)),A=ne(n(21077)),N=ne(n(99417)),F=ne(n(25479)),L=ne(n(48749)),U=ne(n(86713)),$=ne(n(74)),B=ne(n(87523)),V=ne(n(36087)),W=ne(n(96937)),H=ne(n(5417)),q=ne(n(28557)),z=ne(n(39054)),G=ne(n(99197)),K=ne(n(89091)),X=ne(n(54663)),Y=ne(n(72973)),Q=ne(n(92797)),J=ne(n(42171)),Z=ne(n(92077)),ee=ne(n(72041)),te=ne(n(50693));function ne(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:_.default,FieldGroup:D.default,SingleSelectField:b.default,PopoverField:y.default,HeaderField:w.default,LiteralField:C.default,HtmlReadonlyField:E.default,LookupField:O.default,CompositeField:S.default,Tabs:P.default,TabItem:M.default,FormAction:j.default,LabelField:T.default,TreeDropdownField:k.default,Preview:N.default,ReduxForm:F.default,ReduxFormField:a.Field,Form:I.default,FormAlert:A.default,FormBuilderModal:R.default,NotFoundComponent:x.default,UsedOnTable:L.default,Loading:U.default,CircularLoading:$.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:X.default,HtmlEditorField:Y.default,NumberField:Q.default,PopoverOptionSet:J.default,ToastsContainer:Z.default,ListboxField:ee.default,SearchableDropdownField:te.default})}},90420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=_(n(14269)),r=n(82960),i=n(76806),s=_(n(21500)),o=_(n(76958)),l=_(n(47646)),d=_(n(76606)),u=_(n(88790)),c=_(n(71916)),f=_(n(64038)),p=_(n(29950)),h=_(n(88140)),m=_(n(26105)),g=_(n(98360)),v=_(n(53896));function _(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)}))}},33119:function(e,t,n){"use strict";n(46353),n(10098),n(10431),n(25506),n(72298),n(14992),n(83952),n(38536),n(17174),n(99855),n(47928),n(27092),n(17558),n(60022),n(7176),n(1359),n(56173),n(39636),n(75252),n(21735),n(90584),n(93772),n(55064),n(20088),n(64145),n(82414),n(67694),n(19514),n(39078),n(36726),n(90990),n(85152),n(26430),n(72250),n(39734),n(56086),n(86473),n(7057),n(15550),n(48486),n(4163),n(98461),n(33105),n(64477),n(55180),n(56779),n(73226),n(77986),n(32152),n(94571),n(59338),n(54758),n(33993),n(78769),n(58749),n(83713),n(74626),n(50121),n(60246),n(80125),n(56726),n(61455),n(80753),n(28076),n(76361),n(30521),n(82660),n(18320),n(93476),n(91484),n(97256),n(58760),n(29574),n(9360),n(98120),n(65484),n(33929),n(89513),n(36208),n(65060),n(62930),n(19081),n(52358),n(99694),n(29837),n(13776),n(46333),n(34811),n(77964),n(25897),n(74291),n(49492),n(24843),n(66711),n(95988),n(79797),n(72806),n(80597),n(2400),n(48449),n(28620),n(224),n(65376),n(84374),n(68413),n(42496),n(71285),n(76768),n(62038)},86821:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=e=>r.default.createElement("div",{className:"accordion",role:"tablist","aria-multiselectable":"true"},e.children)},97260:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=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))}},35421: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(5556)),i=n(4914),s=l(n(95815)),o=l(n(46942));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.PureComponent{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={isOpen:!1}}toggle(e){const{toggleCallback:t}=this.props;t&&t(e),window.setTimeout((()=>this.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:{}};t.default=c},1541: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(46942)),i=s(n(5556));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=t.statuses=["default","info","success","warning","danger","primary","secondary"];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};t.default=d},15357: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(69733),i=d(n(46942)),s=d(n(5556)),o=d(n(32541)),l=d(n(16939));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}))}))};t.default=(0,r.connect)((function(e){return{crumbs:e.breadcrumbs}}))(c)},61080:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=o(n(73323)),i=o(n(46942)),s=o(n(95815));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=e=>{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")};t.default=d},73323:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=n(4914),i=l(n(5556)),s=l(n(46942)),o=l(n(62886));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}const u=e=>{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};t.default=(0,o.default)(u)},62886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(46942));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}t.default=e=>{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}},50237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=s(n(96540)),r=s(n(23977)),i=s(n(81173));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}const l=e=>a.default.createElement(i.default,o({},e,{type:"checkbox"}));t.Component=l;t.default=e=>{const t=(0,r.default)(l);return a.default.createElement(t,o({},e,{hideLabels:!0}))}},32493: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(81173)),i=o(n(23977)),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}class u extends a.Component{constructor(e){super(e),this.getItemKey=this.getItemKey.bind(this),this.getOptionProps=this.getOptionProps.bind(this),this.handleChange=this.handleChange.bind(this),this.getValues=this.getValues.bind(this)}getItemKey(e,t){return`${this.props.id}-${e.value||`empty${t}`}`}getValues(){let e=this.props.value;return Array.isArray(e)||("string"==typeof e&&(e=e.length?[e]:[]),"number"==typeof e&&(e=[e])),e?e.map((e=>`${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:[]};t.default=e=>{const t=(0,i.default)(u);return a.default.createElement(t,e)}},60093: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(80328)),i=s(n(5556));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:""};t.default=l},45193:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(23977)),r=d(n(95093)),i=d(n(48779)),s=d(n(95815)),o=d(n(5556)),l=n(2481);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:{}};t.default=(0,a.default)(u)},81885:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(23977)),r=o(n(95093)),i=o(n(95815)),s=n(45193);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;t.default=(0,a.default)(d)},84265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(60093)),r=s(n(5556)),i=s(n(46942));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};t.default=o},23977:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=c(n(96540)),r=n(4914),i=d(n(80328)),s=d(n(46942)),o=d(n(5556)),l=c(n(99197));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}t.default=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}},32541: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(5556)),i=l(n(95815)),s=l(n(46942)),o=n(4914);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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}const c="file-status-icon";class f extends a.PureComponent{buildTrackedFormUpload(e){const t=e?"font-icon-address-card":"font-icon-address-card-warning";return{className:(0,s.default)("icon",`${c}__icon`,t),"data-title":e?i.default._t("SilverStripe\\Admin\\FileStatusIcon.TRACKED_FORM_UPLOAD_RESTRICTED","Form submission"):i.default._t("SilverStripe\\Admin\\FileStatusIcon.TRACKED_FORM_UPLOAD_UNRESTRICTED","Form submission, unrestricted access")}}buildRestrictedFileAttrs(){return{className:(0,s.default)("icon",`${c}__icon`,"font-icon-user-lock"),"data-title":i.default._t("SilverStripe\\Admin\\FileStatusIcon.ACCESS_RESTRICTED","Restricted access")}}renderTooltip(e,t,n){return a.default.createElement(o.UncontrolledTooltip,{placement:e,target:t,delay:{show:300,hide:0}},n)}render(){const{fileID:e,hasRestrictedAccess:t,isTrackedFormUpload:n,placement:r,extraClassName:i,disableTooltip:o,includeBackground:l}=this.props;if(!n&&!t)return"";const d=l?"file-status-icon--background":"",f=(0,s.default)([c,d,i]),p=n?this.buildTrackedFormUpload(t):this.buildRestrictedFileAttrs(),h=`FileStatusIcon-${n?"tracked-form-upload":"restricted"}-${e}`,m=o?"":this.renderTooltip(r,h,p["data-title"]);return a.default.createElement("div",{className:f},a.default.createElement("span",u({id:h},p)),m)}}f.propTypes={fileID:r.default.number,hasRestrictedAccess:r.default.bool,isTrackedFormUpload:r.default.bool,placement:r.default.string,disableTooltip:r.default.bool,extraClassName:r.default.string,includeBackground:r.default.bool},f.defaultProps={placement:"auto",disableTooltip:!1};t.default=f},47549: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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.wasClicked=!1,this.handleElementClick=this.handleElementClick.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this)}componentDidMount(){this.container.addEventListener("click",this.handleElementClick),document.addEventListener("click",this.handleDocumentClick)}componentWillUnmount(){this.container.removeEventListener("click",this.handleElementClick),document.removeEventListener("click",this.handleDocumentClick)}handleElementClick(){this.wasClicked=!0}handleDocumentClick(){this.wasClicked||this.props.onClickOut(),this.wasClicked=!1}render(){return r.default.createElement("div",{className:this.props.className,ref:e=>{this.container=e}},this.props.children)}}o.propTypes={children:i.default.any,className:i.default.string,onClickOut:i.default.func.isRequired},o.defaultProps={className:""};t.default=o},11463: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(21077)),i=s(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}class d extends a.Component{constructor(e){super(e),this.handleSubmit=this.handleSubmit.bind(this)}componentDidMount(){if(this.props.autoFocus&&this.form){const e=this.form.querySelector("input:not([type=hidden]), select, textarea");e&&(e.focus(),e.select&&e.select())}}renderMessages(){const{FormAlertComponent:e}=this.props;return Array.isArray(this.props.messages)?this.props.messages.map(((t,n)=>a.default.createElement(e,l({key:n,className:n?"":"message-box--panel-top"},t)))):null}handleSubmit(e){e.stopPropagation();for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];this.props.handleSubmit(e,...n)}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.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};t.default=d},82734:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={CSRF_HEADER:"X-SecurityID"}},23443: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(80328)),i=o(n(46942)),s=o(n(5556));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};t.default=d},21077: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=l(n(80328)),s=l(n(46942)),o=l(n(5556));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:""};t.default=u},96865: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(96540)),r=u(n(5556)),i=u(n(84010)),s=f(n(60906)),o=n(18574),l=u(n(32613)),d=n(14269);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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},p.apply(null,arguments)}class h extends a.Component{constructor(e){super(e);const t=e.schema.schema;this.state={submittingAction:null},this.submitApi=l.default.createEndpointFetcher({url:t.attributes.action,method:t.attributes.method}),this.mapActionsToComponents=this.mapActionsToComponents.bind(this),this.mapFieldsToComponents=this.mapFieldsToComponents.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.handleAction=this.handleAction.bind(this),this.buildComponent=this.buildComponent.bind(this),this.validateForm=this.validateForm.bind(this)}getComponent(e){let{name:t,schemaComponent:n,schemaType:a}=e;const{identifier:r,getCustomFields:i}=this.props;if(i){const e=i(a,`${r}.${t}`);if(e)return e}return null!==n?this.context.injector.get(n,`${r}.${t}`):this.getComponentForDataType(a,t)}getComponentForDataType(e,t){const{identifier:n}=this.props,a=e=>this.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:_}=this.props,b={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:_};return a.default.createElement(n,b)}}t.Component=h;const m=t.schemaPropType=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})}),g=t.basePropTypes={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 `)}};h.propTypes=Object.assign({},g,{form:r.default.string.isRequired,schema:m.isRequired,autoFocus:r.default.bool}),h.defaultProps={responseRequestedSchema:["auto"],autoFocus:!1};t.default=(0,d.withInjector)(h)},56091: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(23077)),i=d(n(80328)),s=d(n(46942)),o=d(n(5556)),l=d(n(32185));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=()=>null,f=e=>{let{children:t,FormBuilderLoaderComponent:n,onLoadingError:r,onSubmit:o,responseClassBad:d,responseClassGood:u,showErrorMessage:f,autoFocus:p,bodyClassName:h,identifier:m,onAction:g,schemaUrl:v,className:_,isOpen:b,modalClassName:y,ModalComponent:w,ModalHeaderComponent:C,onClosed:E,showCloseButton:O,size:S,title:T}=e;const[P,M]=(0,a.useState)(null),[j,D]=(0,a.useState)(null),k={className:_,isOpen:b,modalClassName:y,ModalComponent:w,ModalHeaderComponent:C,onClosed:()=>{M(null),D(!1),"function"==typeof E&&E()},showCloseButton:O,size:S,title:T},R={actionHolder:{className:"modal-footer"},autoFocus:p,bodyClassName:h,fieldHolder:{className:(0,s.default)("modal-body",h)},identifier:m,onAction:g,onLoadingError:e=>{const t=r!==c;if(f||!t){const t=e.errors&&e.errors[0];M(t.value),D(!0)}t&&r(e)},onSubmit:(e,t,n)=>{M(null),D(!1);let a=null;if(a="function"==typeof o?o(e,t,n):n(),!a)throw new Error("Promise was not returned for submitting");return a.then((e=>(e&&(M(e.message),D(!1)),e))).catch((e=>{e.then((e=>{M(e),D(!0)}))})),a},schemaUrl:v};return a.default.createElement(l.default,k,P&&a.default.createElement("div",{className:j?d:u},(0,i.default)("span",{html:P})),v&&a.default.createElement(n,R),t)};f.propTypes={autoFocus:o.default.bool,bodyClassName:o.default.string,schemaUrl:o.default.string,onSubmit:o.default.func,onAction:o.default.func,responseClassGood:o.default.string,responseClassBad:o.default.string,identifier:o.default.string,showErrorMessage:o.default.bool,onLoadingError:o.default.func,FormBuilderLoaderComponent:o.default.oneOfType([o.default.object,o.default.func]),...l.default.propTypes},f.defaultProps={showErrorMessage:!1,onLoadingError:c,modalClassName:"form-builder-modal",responseClassGood:"alert alert-success",responseClassBad:"alert alert-danger",FormBuilderLoaderComponent:r.default};t.default=f},21757:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=b(n(96540)),r=v(n(95815)),i=n(82960),s=n(69733),o=v(n(82734)),l=b(n(63249)),d=v(n(80328)),u=v(n(5556)),c=v(n(20777)),f=v(n(57840)),p=v(n(75308)),h=v(n(86313)),m=v(n(97525)),g=v(n(66463));function v(e){return e&&e.__esModule?e:{default:e}}function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function b(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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})};t.default=(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)},66463: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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};t.default=o},97525: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(46942)),i=s(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}class d extends a.Component{constructor(e){super(e),this.handleDrillDown=this.handleDrillDown.bind(this)}handleDrillDown(e){"function"==typeof this.props.onDrillDown&&this.props.onDrillDown(e)}render(){const e=["grid-field__cell",this.props.className],{onDrillDown:t,...n}=this.props;return a.default.createElement("td",l({},n,{className:(0,r.default)(e),onClick:this.handleDrillDown}))}}d.propTypes={className:i.default.string,onDrillDown:i.default.func};t.default=d},57840:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(96540)),r=i(n(86313));function i(e){return e&&e.__esModule?e:{default:e}}t.default=e=>a.default.createElement(r.default,null,e.children)},75308:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=e=>r.default.createElement("th",null,e.children)},86313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a};t.default=e=>{const t=`grid-field__row ${e.className}`;return r.default.createElement("tr",{tabIndex:0,className:t},e.children)}},20777: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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:null}generateRows(){return void 0!==this.props.rows?this.props.rows: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={header:i.default.object,rows:i.default.array};t.default=o},70077: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=d(n(46942)),s=d(n(5556)),o=d(n(81179)),l=d(n(35421));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;t.default=c},81179: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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};t.default=d},77773:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(46942));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:""};t.default=o},85281: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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:""};t.default=d},72973:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(96540)),r=o(n(29921)),i=n(2481),s=o(n(23977));function o(e){return e&&e.__esModule?e:{default:e}}n(64484);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",(()=>{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;t.default=(0,s.default)(l)},91621: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(23977)),i=n(4914),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}class u extends a.Component{getInputProps(){return{className:`${this.props.className} ${this.props.extraClass}`,id:this.props.id,name:this.props.name}}render(){return a.default.createElement(i.Input,d({plaintext:!0,tag:"p",dangerouslySetInnerHTML:{__html:this.props.value}},this.getInputProps()))}}t.Component=u,u.propTypes={id:s.default.string,name:s.default.string.isRequired,extraClass:s.default.string,value:s.default.string},u.defaultProps={extraClass:"",className:""};t.default=(0,r.default)(u)},78335: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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.handleClosed=this.handleClosed.bind(this)}handleClosed(){"function"==typeof this.props.onClosed&&this.props.onClosed()}renderHeader(){const e=this.props.title;return e?a.default.createElement(r.ModalHeader,{toggle:this.handleClosed},e):null}render(){return a.default.createElement(r.Modal,{isOpen:this.props.isOpen,onClosed:this.handleClosed,className:(0,i.default)("iframe-dialog",this.props.className),modalClassName:this.props.modalClassName},this.renderHeader(),a.default.createElement(r.ModalBody,{className:this.props.bodyClassName},a.default.createElement("iframe",{id:this.props.iframeId,className:(0,i.default)("iframe-dialog__iframe",this.props.iframeClassName),src:this.props.url,frameBorder:0})))}}d.propTypes={url:s.default.string.isRequired,onClosed:s.default.func,isOpen:s.default.bool,title:s.default.oneOfType([s.default.string,s.default.bool]),modalClassName:s.default.string,iframeId:s.default.string,iframeClassName:s.default.string,className:s.default.string,bodyClassName:s.default.string},d.defaultProps={isOpen:!1,title:null};t.default=d},55239:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a,r=d(n(96540)),i=n(4914),s=(a=n(5556))&&a.__esModule?a:{default:a},o=d(n(99197));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,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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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 u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends r.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}getInputProps(){const e={className:`${this.props.className} ${this.props.extraClass}`,id:this.props.id,name:this.props.name,disabled:this.props.disabled,readOnly:this.props.readOnly,value:this.props.value||"",placeholder:this.props.placeholder,autoFocus:this.props.autoFocus,maxLength:this.props.data&&this.props.data.maxlength,type:this.props.type?this.props.type:null,onBlur:this.props.onBlur,onFocus:this.props.onFocus};return this.props.attributes&&!Array.isArray(this.props.attributes)&&Object.assign(e,this.props.attributes),this.props.readOnly||Object.assign(e,{onChange:this.handleChange}),e}handleChange(e){if("function"==typeof this.props.onChange){if(!e.target)return;this.props.onChange(e,{id:this.props.id,value:e.target.value})}}renderFieldWithTip(){const{id:e,title:t,tip:n}=this.props;return r.default.createElement(i.InputGroup,null,r.default.createElement(i.Input,this.getInputProps()),r.default.createElement(i.InputGroupAddon,{addonType:"append"},r.default.createElement(o.default,u({},n,{fieldTitle:t,id:`${e}-tip`}))))}render(){return this.props.tip?this.renderFieldWithTip():r.default.createElement(i.Input,this.getInputProps())}}t.Component=c,c.propTypes={extraClass:s.default.string,id:s.default.string,name:s.default.string.isRequired,onChange:s.default.func,onBlur:s.default.func,onFocus:s.default.func,value:s.default.oneOfType([s.default.string,s.default.number]),readOnly:s.default.bool,disabled:s.default.bool,placeholder:s.default.string,type:s.default.string,autoFocus:s.default.bool,attributes:s.default.oneOfType([s.default.object,s.default.array]),tip:s.default.shape(o.tipShape)},c.defaultProps={value:"",extraClass:"",className:"",type:"text",attributes:{}};t.default=c},74491:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(96540)),r=i(n(5556));function i(e){return e&&e.__esModule?e:{default:e}}const s=e=>{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:""};t.default=s},16939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=n(84976);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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}function l(e){let{children:t,href:n,...r}=e;const s=(0,i.useInRouterContext)(),l=s?i.Link:"a";return a.default.createElement(l,o({},r,{to:s?n:void 0,href:s?void 0:n}),t)}l.propTypes={children:r.default.node.isRequired,href:r.default.string.isRequired};t.default=l},81637:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(47546));function s(e){return e&&e.__esModule?e:{default:e}}const o=e=>a.default.createElement("div",{className:"list-group"},e.items.map((e=>a.default.createElement(i.default,e))));o.propTypes={items:r.default.array};t.default=o},47546: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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};t.default=o},72041: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=m(n(46005)),i=m(n(8539)),s=m(n(93943)),o=m(n(66963)),l=m(n(28181)),d=m(n(95815)),u=m(n(60328)),c=m(n(23977)),f=m(n(88835)),p=m(n(76459)),h=m(n(5556));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},v.apply(null,arguments)}class _ extends a.Component{constructor(e){super(e),this.isControlled()||(this.state={value:e.value}),this.handleChange=this.handleChange.bind(this),this.handleOnBlur=this.handleOnBlur.bind(this),this.isValidNewOption=this.isValidNewOption.bind(this),this.getOptions=this.getOptions.bind(this),this.fetchOptions=(0,p.default)(this.fetchOptions,500)}getOptions(e){const{lazyLoad:t,options:n}=this.props;return t?e?this.fetchOptions(e):Promise.resolve([]):Promise.resolve(n)}handleChange(e){this.isControlled()?this.props.onChange(e):this.setState({value:e})}isControlled(){return"function"==typeof this.props.onChange}handleOnBlur(){}fetchOptions(e){const{optionUrl:t,labelKey:n,valueKey:a}=this.props,r=f.default.parse(t,!0);return r.query.term=e,(0,u.default)(f.default.format(r),{credentials:"same-origin"}).then((e=>e.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=_,_.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])},_.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};t.default=(0,c.default)(_)},29981: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(5556))&&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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}class l extends r.Component{getContent(){return{__html:this.props.value}}getInputProps(){return{className:`${this.props.className} ${this.props.extraClass}`,id:this.props.id,name:this.props.name}}render(){return r.default.createElement("div",o({},this.getInputProps(),{dangerouslySetInnerHTML:this.getContent()}))}}l.propTypes={id:i.default.string,name:i.default.string.isRequired,extraClass:i.default.string,value:i.default.string},l.defaultProps={extraClass:"",className:""};t.default=l},74: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(5556)),i=s(n(46942));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.PureComponent{render(){const{className:e,size:t,block:n}=this.props,r=(0,i.default)("ss-circular-loading-indicator",e,{"ss-circular-loading-indicator--block":n});return a.default.createElement("div",{style:{height:t,width:t},className:r})}}l.propTypes={className:r.default.string,block:r.default.bool,size:r.default.string},l.defaultProps={block:!1,size:"6em"};t.default=l},86713:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=n(22831);function s(e){return e&&e.__esModule?e:{default:e}}function o(e){let{containerClass:t}=e;const n=(0,i.v4)();return a.default.createElement("div",{className:t},a.default.createElement("div",{key:"overlay",className:"cms-content-loading-overlay ui-widget-overlay-light"}),a.default.createElement("div",{key:"spinner",className:"cms-content-loading-spinner"},a.default.createElement("div",{className:"spinner"},a.default.createElement("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"512",height:"297",viewBox:"0 0 512 297",className:"spinner__animation"},a.default.createElement("defs",null,a.default.createElement("path",{id:`spinner__animation__outline_right_${n}`,d:"M253 29L145 105C130 115 126 136 137 150C147 165 168 169 183 159L291 83C335 52 397 63 428 107C459 152 448 214 404 245L370 268C398 316 461 296 490 245C520 191 519 123 482 70C430 -4 327 -22 253 29Z"}),a.default.createElement("path",{id:`spinner__animation__outline_left_${n}`,d:"M258 266L366 191C381 180 385 160 374 145C364 130 343 127 328 137L220 212C176 244 114 233 83 188C52 144 63 82 107 51L141 27C113 -20 50 -0 21 51C-8 104 -7 172 29 226C81 300 184 318 258 266V266Z"}),a.default.createElement("clipPath",{id:`spinner__animation__mask_right_${n}`},a.default.createElement("use",{href:`#spinner__animation__outline_right_${n}`})),a.default.createElement("clipPath",{id:`spinner__animation__mask_left_${n}`},a.default.createElement("use",{href:`#spinner__animation__outline_left_${n}`}))),a.default.createElement("use",{className:"spinner__animation__empty",href:`#spinner__animation__outline_left_${n}`}),a.default.createElement("use",{className:"spinner__animation__empty",href:`#spinner__animation__outline_right_${n}`}),a.default.createElement("path",{d:"M 379,145 236,242 C 179,282 102,273 62,216 22,159 19,77 76,37 L 135,7",className:"spinner__animation__fill-left",clipPath:`url(#spinner__animation__mask_left_${n})`}),a.default.createElement("path",{d:"M 138,148 281,50 c 57,-39 129,-30 169,26 39,56 41,136 -14,178 l -47,40",className:"spinner__animation__fill-right",clipPath:`url(#spinner__animation__mask_right_${n})`}),a.default.createElement("path",{d:"M253 29L145 105C130 115 126 136 137 150C147 165 168 169 183 159L291 83C335 52 397 63 428 107C459 152 448 214 404 245L370 268C398 316 461 296 490 245C520 191 519 123 482 70C430 -4 327 -22 253 29Z"})))))}o.propTypes={containerClass:r.default.string},o.defaultProps={containerClass:"flexbox-area-grow"};t.default=o},56425: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=l(n(23977)),s=l(n(95815)),o=l(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.Component{constructor(e){super(e),this.getValueCSV=this.getValueCSV.bind(this)}getValueCSV(){const e=this.props.value;if(!Array.isArray(e)&&(e||"string"==typeof e||"number"==typeof e)){const t=this.props.source.find((t=>t.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:[]};t.default=(0,i.default)(c)},13541: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(46942)),i=s(n(5556));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:""};t.default=l},1066:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(97097),i=n(69733),s=(a=n(13541))&&a.__esModule?a:{default:a};t.default=(0,i.connect)((e=>({isOpen:e.mobileMenu.isOpen})),(e=>({onClick(){e((0,r.toggleMobileMenu)())}})))(s.default)},32185:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=n(4914),i=o(n(95815)),s=o(n(5556));function o(e){return e&&e.__esModule?e:{default:e}}const l=e=>{let{children:t,className:n,isOpen:r,modalClassName:s,ModalComponent:o,ModalHeaderComponent:l,onClosed:d,showCloseButton:u,size:c,title:f}=e;return a.default.createElement(o,{isOpen:r,toggle:d,className:n,modalClassName:s,size:c},!1!==f&&a.default.createElement(l,{toggle:d,title:f},function(e){if("object"==typeof e)return(new DOMParser).parseFromString(e.html,"text/html").body.textContent||"";return e}(f)),!1===f&&!0===u&&"function"==typeof d&&a.default.createElement("button",{type:"button",className:"close modal__close-button",onClick:d,"aria-label":i.default._t("Admin.CLOSE","Close")}),t)};l.propTypes={className:s.default.string,isOpen:s.default.bool,modalClassName:s.default.string,ModalComponent:s.default.oneOfType([s.default.object,s.default.func]),ModalHeaderComponent:s.default.oneOfType([s.default.object,s.default.func]),onClosed:s.default.func,size:s.default.oneOf(["","sm","lg","xl"]),showCloseButton:s.default.bool,title:s.default.oneOfType([s.default.string,s.default.bool,s.default.shape({html:s.default.string})])},l.defaultProps={isOpen:!1,ModalComponent:r.Modal,ModalHeaderComponent:r.ModalHeader,title:null};t.default=l},26285:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a,r=n(96540),i=(a=n(5556))&&a.__esModule?a:{default:a},s=n(84976);function o(e){let{shouldBlockFn:t,blockMessage:n}=e;const a=(0,s.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}},46381:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=l(n(95815)),i=l(n(46942)),s=l(n(21077)),o=l(n(5556));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};t.default=d},92797:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(23977)),r=i(n(55239));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;t.default=(0,a.default)(s)},81173: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=l(n(46942)),s=l(n(80328)),o=l(n(5556));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};t.default=u},23637: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=o(n(81173)),i=o(n(23977)),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}class u extends a.Component{constructor(e){super(e),this.getItemKey=this.getItemKey.bind(this),this.getOptionProps=this.getOptionProps.bind(this),this.handleChange=this.handleChange.bind(this)}getItemKey(e,t){const n=e.value||`empty${t}`;return`${this.props.id}-${n}`}getOptionProps(e,t){const n=this.getItemKey(e,t);return{key:n,id:n,name:this.props.name,className:`${this.props.itemClass} option-val--${e.value}`,disabled:e.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:`${this.props.value}`==`${e.value}`,title:e.title,type:"radio"}}handleChange(e,t){if("function"==typeof this.props.onChange&&1===t.value){const n=this.props.source.find(((e,n)=>this.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:""};t.default=(0,i.default)(u)},82405: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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:()=>{}};t.default=d},42171: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(5556)),i=n(4914),s=l(n(46942)),o=l(n(95815));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.Component{constructor(e){super(e),this.handleToggle=this.handleToggle.bind(this),this.handleSearchValueClear=this.handleSearchValueClear.bind(this),this.handleSearchValueChange=this.handleSearchValueChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.doToggle=this.doToggle.bind(this),this.focusOnTarget=this.focusOnTarget.bind(this),this.state={searchValue:""}}handleToggle(){this.doToggle(!1)}doToggle(e){const{toggle:t}=this.props;t(),this.handleSearchValueClear(),e&&this.focusOnTarget()}focusOnTarget(){const{target:e}=this.props;if(e){const t=i.Util.getTarget(e);t&&t.focus()}}handleSearchValueClear(){this.setState({searchValue:""})}handleSearchValueChange(e){this.setState({searchValue:e.target.value})}handleKeyDown(e){"Escape"===e.key&&this.doToggle(!0)}renderSearchValueClearLink(){const{clearButtonClassName:e}=this.props,{searchValue:t}=this.state;return 0===t.length?null:a.default.createElement(i.InputGroupAddon,{addonType:"append"},a.default.createElement("button",{className:(0,s.default)(e),onClick:this.handleSearchValueClear},o.default._t("PopoverOptionSet.CLEAR","Clear")))}renderSearchBox(){const{searchPlaceholder:e,disableSearch:t,searchClassName:n,searchInputClassName:r}=this.props,{searchValue:o}=this.state;return t?null:a.default.createElement(i.InputGroup,{className:(0,s.default)(n)},a.default.createElement(i.Input,{autoFocus:!0,className:(0,s.default)(r),onChange:this.handleSearchValueChange,placeholder:e,type:"text",value:o}),this.renderSearchValueClearLink())}renderOptionButtons(){const{buttons:e,onSearch:t,buttonContainerClassName:n,emptyResultClassName:r,buttonClassName:i,ButtonComponent:l}=this.props,{searchValue:d}=this.state;let c=e;return 0!==d.length&&(c=t(d,c)),0===c.length?a.default.createElement("div",{className:(0,s.default)(n)},a.default.createElement("div",{className:(0,s.default)(r)},o.default._t("PopoverOptionSet.NO_RESULTS","No results found"))):a.default.createElement("div",{className:(0,s.default)(n)},c.map((e=>a.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"};t.default=c},99417: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(95815)),i=d(n(46942)),s=n(14269),o=d(n(5556)),l=d(n(35421));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"};t.default=(0,s.inject)(["ViewModeToggle"],(e=>({ViewModeComponent:e})),(()=>"Admin.Preview"))(c)},96937:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(96540),r=s(n(43591)),i=s(n(5556));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"],f=[s||"height"],p={[c]:l,[f]:d};return(0,a.createElement)(n,{[u?"getRef":"ref"]:e=>{this.container=e},...u&&p,...o},"function"==typeof e?e({width:l,height:d}):a.Children.map(e,(e=>(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t?null:p):e)))}}o.propTypes={component:i.default.oneOfType([i.default.string,i.default.elementType]),onResize:i.default.func},o.defaultProps={component:"div"};t.default=o},89091:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0,t.hasFilters=O;var a=y(n(95815)),r=b(n(96540)),i=n(69733),s=n(82960),o=b(n(82513)),l=n(76806),d=n(97854),u=y(n(66104)),c=y(n(15042)),f=y(n(5556)),p=y(n(47549)),h=y(n(84326)),m=y(n(13765)),g=y(n(54663)),v=y(n(91699));function _(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_=function(e){return e?n:t})(e)}function b(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},w.apply(null,arguments)}const C={NONE:"NONE",VISIBLE:"VISIBLE",EXPANDED:"EXPANDED"},E={NONE:"NONE",HIDEABLE:"HIDEABLE",TOGGLABLE:"TOGGLABLE"};function O(e){return e&&Object.keys(e).length>0}class S 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&&(!O(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&&O(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,"ID"===e.substring(e.length-2)&&"object"==typeof t&&t.hasOwnProperty("value")&&(i[e]=t.value))})),!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===C.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!==C.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!==C.NONE&&this.setState({display:C.NONE})}show(){this.state.display!==C.VISIBLE&&this.setState({display:C.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!==C.EXPANDED&&this.setState({display:C.EXPANDED})}toggle(){switch(this.state.display){case C.VISIBLE:this.expand(),setTimeout(this.focusFirstFormField,50);break;case C.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===C.VISIBLE&&this.state.initialSearchText===i&&this.state.searchText===i||this.setState({display:C.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===C.NONE)return a===E.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===C.EXPANDED,v=this.state.display===C.VISIBLE,_=[E.HIDEABLE,E.TOGGLABLE].includes(a),b=s||this.searchTermIsDirty(),y=this.getData(),O=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:_,expanded:f,id:`${n}_searchbox`,showFilters:Boolean(t||e),dirty:b,clearable:O,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:O})))}}t.Component=S,S.propTypes={onSearch:f.default.func,onHide:f.default.func,id:f.default.string.isRequired,display:f.default.oneOf(Object.values(C)),formSchemaUrl:f.default.string,filters:f.default.object,formData:f.default.object,placeholder:f.default.string,displayBehavior:f.default.oneOf(Object.values(E)),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})},S.defaultProps={placeholder:a.default._t("Admin.SEARCH","Search"),display:C.VISIBLE,displayBehavior:E.NONE,filters:{},formData:{},term:"",filterPrefix:"",forceFilters:!1,name:"searchTerm",identifier:"Admin.SearchForm"};t.default=(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)}}}))(S)},84326:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=f(n(95815)),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),i=n(4914),s=f(n(46942)),o=f(n(39054)),l=f(n(96937)),d=f(n(5556)),u=f(n(13164));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},a.default._t("Admin.SEARCH_OPTIONS","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}};t.default=p},13765:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=c,t.default=void 0;var a=l(n(95815)),r=l(n(96540)),i=l(n(23077)),s=n(4914),o=l(n(5556));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:{}};t.default=c},54663:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=l(n(95815)),r=l(n(96540)),i=n(4914),s=l(n(46942)),o=l(n(5556));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};t.default=c},41048:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(12973))&&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},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},12973:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(95093))&&a.__esModule?a:{default:a};t.default=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}},91699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(41048))&&a.__esModule?a:{default:a};const i=(e,t)=>{let{key:n,value:a,label:r}=t;return`${e}${r.toLowerCase()||n} ${a||""} `};t.default=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}},50693:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=v(n(8539)),r=v(n(32613)),i=v(n(46942)),s=v(n(80391)),o=v(n(76459)),l=v(n(28181)),d=v(n(95815)),u=v(n(23977)),c=v(n(5556)),f=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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),p=v(n(46005)),h=v(n(88835)),m=v(n(82734));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(e){return e&&e.__esModule?e:{default:e}}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_.apply(null,arguments)}const b=e=>{let{clearable:t,disabled:n,lazyLoad:a,multi:u,passRef:c,placeholder:p,options:g,optionUrl:v,onChange:b,searchable:y,value:w,SelectComponent:C,AsyncSelectComponent:E,...O}=e;const[S,T]=(0,f.useState)(!1),[P,M]=(0,f.useState)(!1),[j,D]=(0,f.useState)({}),k=(0,f.createRef)();(0,f.useEffect)((()=>{if(!P)return;const e=k.current.inputRef,t=new Event("change",{bubbles:!0});e.dispatchEvent(t),M(!1)}));const R=(0,i.default)({"no-change-track":!S,"ss-searchable-dropdown-field--lazy-load":a}),x=a?{loadOptions:e=>a?e?(e=>{if(j.hasOwnProperty(e))return Promise.resolve(j[e]);let t=()=>{const t=h.default.parse(v,!0);t.search&&delete t.search,t.query.term=e;const n=h.default.format(t),a={};return a[m.default.CSRF_HEADER]=s.default.get("SecurityID"),r.default.get(n,a).then((e=>e.json())).then((t=>(j[e]=t,D(j),t)))};return t=(0,o.default)(t,500),t()})(e):Promise.resolve([]):Promise.resolve(g)}:{options:g},I=c?{ref:k}:{};let A=w;if(!u&&A){const e=Object.keys(A);if(e.length>0){const t=A[e[0]];"object"==typeof t&&(A=t)}}const N=`${O.id}__input`,F=a?E:C;return f.default.createElement(l.default,null,f.default.createElement(F,_({},O,{classNamePrefix:"ss-searchable-dropdown-field",className:R,isClearable:t,isDisabled:n,isMulti:u,isSearchable:y,placeholder:p,onChange:e=>{T(!1),JSON.stringify(w)!==JSON.stringify(e)&&(T(!0),M(!0)),b(e)},onBlur:()=>{}},x,{noOptionsMessage:e=>e?d.default._t("Admin.NO_MATCHING_OPTIONS","No matching options"):d.default._t("Admin.TYPE_TO_SEARCH","Type to search")},I,{value:A,inputId:N})))};t.Component=b,b.propTypes={clearable:c.default.bool.isRequired,disabled:c.default.bool.isRequired,lazyLoad:c.default.bool.isRequired,multi:c.default.bool.isRequired,name:c.default.string.isRequired,placeholder:c.default.string.isRequired,onChange:c.default.func,options:c.default.arrayOf(c.default.object),optionUrl:c.default.string,passRef:c.default.bool.isRequired,searchable:c.default.bool.isRequired,value:c.default.any,SelectComponent:c.default.oneOfType([c.default.object,c.default.func]).isRequired,AsyncSelectComponent:c.default.oneOfType([c.default.object,c.default.func]).isRequired},b.defaultProps={disabled:!1,lazyLoad:!1,clearable:!0,searchable:!0,multi:!1,passRef:!0,placeholder:"",onChange:()=>{},value:"",SelectComponent:p.default,AsyncSelectComponent:a.default};t.default=(0,u.default)(b)},31217: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=l(n(23977)),i=l(n(95815)),s=n(4914),o=l(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}class c extends a.Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}getReadonlyField(){let e=this.props.source&&this.props.source.find((e=>e.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")}};t.default=(0,r.default)(c)},18116:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=n(4914),i=o(n(46942)),s=o(n(5556));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};t.default=l},47735:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=u(n(96540)),r=n(4914),i=l(n(5556)),s=u(n(27807)),o=l(n(46942));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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};t.default=c},63855:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=n(4914),i=o(n(5556)),s=o(n(18116));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}function d(e){let{currentTab:t,children:n,onToggle:i}=e;const o=a.default.Children.map(n,(e=>{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};t.default=d},54475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=m,t.default=void 0;var a=h(n(96540)),r=n(4914),i=f(n(46942)),s=f(n(5556)),o=n(69733),l=h(n(25827)),d=h(n(27807)),u=f(n(63855)),c=f(n(29909));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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)(),_=v?v.isOnActiveTab:void 0,b=(0,a.useMemo)((()=>({activeTab:g,isOnActiveTab:_})),[s,_]);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:b},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}`;t.default=(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)},29909: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(96540)},39054: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(28557)),i=d(n(96937)),s=d(n(46942)),o=d(n(5556)),l=d(n(325));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(null,arguments)}class f extends a.Component{constructor(e){super(e),this.render=this.render.bind(this),this.onResize=this.onResize.bind(this),this.refreshShowSummaryView=this.refreshShowSummaryView.bind(this),this.getPlaceholderSize=this.getPlaceholderSize.bind(this),this.state={showSummaryView:!1}}componentDidUpdate(){const e=this.getPlaceholderSize();this.refreshShowSummaryView(e)}onResize(e){this.refreshShowSummaryView(e.width)}getPlaceholderSize(){const e=this.nodeRef;if(!e)return 0;const t=e.querySelector(".compact-tag-list__placeholder");return t?t.getBoundingClientRect().width:0}refreshShowSummaryView(e){const t=this.props.maxSize<e;this.state.showSummaryView!==t&&this.setState((()=>({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:()=>{}};t.default=f},325:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(96540)),r=o(n(5417)),i=o(n(95815)),s=o(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=e=>{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")};t.default=d},5417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=n(4914),i=l(n(46942)),s=l(n(95815)),o=l(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}const u=e=>{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,..._}=e;const b=((e,t,n)=>(t||e)+(n?`: ${n}`:""))(p,h,m);return a.default.createElement(r.Button,d({},_,{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:b}),c&&a.default.createElement(f,{onDelete:n,dataKey:p}),g||b)},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};t.default=u},28557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=o(n(96540)),r=o(n(5417)),i=o(n(5556)),s=o(n(13164));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=!0,u=!1,c=e=>{const t=document.activeElement[e?"nextElementSibling":"previousElementSibling"];return!!t&&(t.focus(),!0)},f=e=>{let{tags:t,deletable:n,focusable:i,onTagDelete:s,onTagClick:o,onHolderFocus:f}=e;const p=e=>{c(d)||f(),s(e)},h=e=>{c(u)||c(d)||f(),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?p:void 0,onBackSpace:n&&s?h:void 0,onNext:()=>{c(d)||f()},onPrevious:()=>{c(u)},onClick:o})))))};t.Component=f,f.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},f.defaultProps={deletable:!1,focusable:!0,onTagDelete:()=>{},onTagClick:()=>{},onHolderFocus:()=>{}};t.default=f},13164:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5556))&&a.__esModule?a:{default:a};const i=r.default.shape({key:r.default.string.isRequired,label:r.default.string,value:r.default.string});t.default=i},2481:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=i(n(23977)),r=i(n(55239));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;t.default=(0,a.default)(s)},85085:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var a=d(n(23977)),r=d(n(95093)),i=d(n(48779)),s=d(n(95815)),o=d(n(5556)),l=n(45193);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:{}};t.default=(0,a.default)(c)},99197: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(5556)),i=n(4914),s=d(n(95815)),o=d(n(46942)),l=d(n(73323));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=t.TIP_TYPES={TITLE:"title",INPUT_GROUP:"input-group"},f=t.TIP_IMPORTANCE_LEVELS={NORMAL:"normal",HIGH:"high"},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`,_={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,_,m),a.default.createElement(i.UncontrolledPopover,{trigger:"legacy",placement:"top-end",target:v},a.default.createElement(i.PopoverBody,null,t)))}const m=t.tipShape={content:r.default.string.isRequired,importance:r.default.oneOf(Object.values(f)),type:r.default.oneOf(Object.values(c)),icon:r.default.string};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};t.default=h},82548:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toastShape=t.default=void 0;var a=u(n(96540)),r=u(n(5556)),i=u(n(95815)),s=n(4914),o=u(n(46942)),l=u(n(73323)),d=n(19405);function u(e){return e&&e.__esModule?e:{default:e}}const c=t.toastShape={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))},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},f.defaultProps={actions:[],onDismiss:()=>{}};t.default=f},19405:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ToastActions=t.ToastAction=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(73323));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}const l=e=>{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:[]};t.default=d},88507: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(5556)),i=s(n(82548));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(null,arguments)}const d=e=>{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={};t.default=d},32189:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(5556)),i=s(n(61080));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};t.default=o},90277: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 _.findTreeByID}}),Object.defineProperty(t,"findTreeByPath",{enumerable:!0,get:function(){return _.findTreeByPath}}),Object.defineProperty(t,"findTreePath",{enumerable:!0,get:function(){return _.findTreePath}});var a=w(n(96540)),r=b(n(5556)),i=n(69733),s=n(82960),o=b(n(71479)),l=b(n(28181)),d=b(n(95815)),u=b(n(23977)),c=b(n(60328)),f=w(n(46005)),p=w(n(47193)),h=b(n(69161)),m=b(n(88835)),g=n(4914),v=n(80328),_=n(54583);function b(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C.apply(null,arguments)}const E=t.MULTI_EMPTY_VALUE="unchanged",O=t.SINGLE_EMPTY_VALUE=0,S=e=>{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?"":O,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((e.value===O||""===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=E,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||O}"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,onKeyDown:e=>this.handleKeyDown(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,C({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,S):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"},isOptionDisabled:e=>e.disabled}))}}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:_.findTreeByPath,findTreePath:_.findTreePath,fetch:c.default};const P=t.ConnectedTreeDropdownField=(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===E&&(r=[]),t.data.multiple||t.value||(r=O),{...a,value:r}}),(function(e){return{actions:{treeDropdownField:(0,s.bindActionCreators)(p,e)}}}))(T);t.default=(0,u.default)(P)},69161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5556))&&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};t.default=i},54583: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},48749: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(5556)),i=d(n(46942)),s=d(n(95815)),o=d(n(86713)),l=d(n(85068));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};t.default=(0,l.default)(c)},85068: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),i=(a=n(5556))&&a.__esModule?a:{default:a},s=n(69733),o=n(98307),l=n(27807);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)}t.default=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}},87523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.statuses=t.default=void 0;var a=l(n(96540)),r=l(n(46942)),i=l(n(5556)),s=l(n(1541)),o=l(n(95815));function l(e){return e&&e.__esModule?e:{default:e}}const d=t.statuses=["draft","modified","live","archived"],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};t.default=u},36087: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=f(n(5556)),i=n(4914),s=f(n(95815)),o=n(69733),l=n(82960),d=n(6679),u=n(44072),c=f(n(46942));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},h.apply(null,arguments)}class m extends a.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.state={dropdownOpen:!1},this.handleSplitSelect=this.handleSplitSelect.bind(this),this.handlePreviewSelect=this.handlePreviewSelect.bind(this),this.handleEditSelect=this.handleEditSelect.bind(this)}getIconClass(){const{activeState:e,editIconClass:t,previewIconClass:n,splitIconClass:a}=this.props;switch(e){case u.VIEW_MODE_STATES.EDIT:return t;case u.VIEW_MODE_STATES.PREVIEW:return n;default:return a}}getTitle(){const{activeState:e}=this.props;switch(e){case u.VIEW_MODE_STATES.EDIT:return s.default._t("Admin.EDIT_MODE","Edit mode");case u.VIEW_MODE_STATES.PREVIEW:return s.default._t("Admin.PREVIEW_MODE","Preview mode");default:return s.default._t("Admin.SPLIT_MODE","Split mode")}}toggle(){window.setTimeout((()=>this.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:{}};t.default=(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)},28221:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(96540))&&a.__esModule?a:{default:a},i=n(14269),s=n(47767);t.default=(0,i.provideInjector)((e=>{let{children:t}=e;return r.default.createElement("div",{className:"app"},t,r.default.createElement(s.Outlet,null))}))},28181:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(96540)),r=s(n(55655)),i=n(17437);function s(e){return e&&e.__esModule?e:{default:e}}t.default=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)}},25479:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(96540)),r=n(76806),i=n(14269),s=l(n(15042)),o=l(n(5556));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);t.default=(0,r.reduxForm)({getFormState:s.default,destroyOnUnmount:!1})(u)},23077:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0,t.createFormIdentifierFromProps=C,t.default=void 0;var a=w(n(95815)),r=y(n(96540)),i=w(n(5556)),s=n(69733),o=n(82960),l=w(n(60328)),d=w(n(82229)),u=n(76806),c=w(n(60906)),f=n(18574),p=y(n(82513)),h=w(n(84010)),m=y(n(96865)),g=w(n(66104)),v=n(14269),_=w(n(15042));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 y(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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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 C(e){let{identifier:t,schema:n={}}=e;return[t,n.schema&&n.schema.name].filter((e=>e)).join(".")}class E 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.props.refetchSchemaCriteria===e.refetchSchemaCriteria||this.fetch()}getMessages(e){const t={};return e&&e.fields&&e.fields.forEach((e=>{e.message&&(t[e.name]=e.message)})),t}getIdentifier(){return C(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=C({...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=E,E.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,refetchSchemaCriteria:i.default.string,form:i.default.string,submitting:i.default.bool,onFetchingSchema:i.default.func,onReduxFormInit:i.default.func,loadingComponent:i.default.elementType.isRequired}),E.defaultProps={refetchSchemaOnMount:!0};t.default=(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=C({...t,schema:n}),r=(0,g.default)((0,_.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)}}})))(E)},5549:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.createInsertLinkModal=t.InsertLinkModal=void 0;var a=f(n(96540)),r=u(n(5556)),i=n(82960),s=n(69733),o=u(n(56091)),l=u(n(99237)),d=f(n(82513));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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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||0)}}),h),l.default)(p);t.default=(0,i.compose)((0,s.connect)((()=>({})),h),l.default)(p)},99237: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(96540)),i=(a=n(5556))&&a.__esModule?a:{default:a},s=n(82960),o=u(n(82513)),l=n(69733);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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(null,arguments)}class f extends r.Component{constructor(e){super(e),this.setOverrides=this.setOverrides.bind(this)}componentDidMount(){this.setOverrides(this.props)}componentWillUnmount(){this.setOverrides()}setOverrides(){let e=arguments.length>0&&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};t.ConnectedFileSchemaHandler=(0,l.connect)((()=>({})),p())(f);t.default=function(e){return(0,l.connect)((function(){return{Component:e}}),p)(f)}},36171: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=d(n(5556)),i=n(4914),s=n(14269),o=d(n(60328)),l=d(n(80391));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},c.apply(null,arguments)}const f="SilverStripe\\Admin\\SudoModeController";t.default=e=>{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}},92077:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=d(n(96540)),r=d(n(88507)),i=n(69733),s=n(82960),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(16679));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}}t.default=(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})}))},27807: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={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(null,arguments)}const s=t.TabContext=a.default.createContext(!1);function o(){return(0,a.useContext)(s)}t.default=o},46353:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;let n=new class{constructor(){this.defaultLocale="en_US",this.currentLocale=null,this.autoDetectLocale=!0,this.lang={}}setLocale(e){this.currentLocale=e,this.autoDetectLocale=!1}getLocale(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale}_t(e,t,n,a){const r=t||"";if(!this.lang)return r;const i=this.getLocale(),s=[i,i.replace(/_[\w]+/i,""),this.defaultLocale,this.defaultLocale.replace(/_[\w]+/i,"")];for(let t=0;t<s.length;t++){const n=s[t];if(this.lang[n]&&this.lang[n][e])return this.lang[n][e]}return r}addDictionary(e,t){void 0===this.lang[e]&&(this.lang[e]={});for(let n in t)this.lang[e][n]=t[n];this.autoDetectLocale&&(this.currentLocale=this.detectLocale())}getDictionary(e){return this.lang[e]}stripStr(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}stripStrML(e){const t=e.split("\n");for(let e=0;e<t.length;e+=1)t[e]=stripStr(t[e]);return stripStr(t.join(" "))}sprintf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(0===n.length)return e;const r=new RegExp("(.?)(%s)","g");let i=0;return e.replace(r,(function(e,t,a,r,s){return"%"===t?e:t+n[i++]}))}inject(e,t){const n=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(n,(function(e,n,a,r){return t[n]?t[n]:e}))}detectLocale(){let e=document.documentElement.getAttribute("lang");if(e||(e=document.body.getAttribute("lang")),!e){const t=document.getElementsByTagName("meta");for(let n=0;n<t.length;n++)t[n].attributes["http-equiv"]&&"content-language"===t[n].attributes["http-equiv"].nodeValue.toLowerCase()&&(e=t[n].attributes.content.nodeValue)}if(e||(e=this.defaultLocale),2===e.length)for(let t in this.lang)if(t.substr(0,2).toLowerCase()===e.toLowerCase())return t;const t=e.match(/([^-|_]*)[-|_](.*)/);return t?t[1].toLowerCase()+"_"+t[2].toUpperCase():null}addEvent(e,t,n,a){return e.addEventListener?(e.addEventListener(t,n,a),!0):e.attachEvent?e.attachEvent("on"+t,n):void console.log("Handler could not be attached")}};window.ss=void 0!==window.ss?window.ss:{},window.ss.i18n=window.i18n=n;t.default=n},66711:function(e,t,n){"use strict";var a=o(n(95815)),r=o(n(74692)),i=o(n(96540)),s=n(5338);function o(e){return e&&e.__esModule?e:{default:e}}const l=(0,n(14269).loadComponent)("FormBuilderModal");r.default.entwine("ss",(e=>{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('<div id="add-to-campaign__dialog-wrapper" />'),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()}})}))},80597:function(e,t,n){"use strict";var a,r=(a=n(74692))&&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}))},48449:function(e,t,n){"use strict";var a=o(n(74692)),r=o(n(95815)),i=o(n(95093)),s=o(n(48779));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("<input/>",{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)}})}))},84374:function(e,t,n){"use strict";var a=o(n(74692)),r=o(n(95815)),i=o(n(95093)),s=o(n(48779));function o(e){return e&&e.__esModule?e:{default:e}}n(38344),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("<input/>",{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)}})}))},71285:function(e,t,n){"use strict";var a=l(n(74692)),r=l(n(95815)),i=l(n(96540)),s=n(5338),o=(l(n(89091)),n(60906),n(14269));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},d.apply(null,arguments)}n(62727),n(38344),a.default.entwine("ss",(function(e){e(".grid-field").entwine({onmatch:function(){this.needsColumnFix()&&(this.fixColumns(),this.injectSearchButton(!1)),this.hasFilters()&&this.injectSearchButton(!0),!this.is(".grid-field--lazy-loadable")||0!==this.closest(".ss-tabset, .cms-tabset").length&&"force"!==this.data("gridfield-lazy-load-state")||(this.data("gridfield-lazy-load-state","ready"),this.lazyload()),this.data("gridfield-lazy-load-state","ready")},lazyload:function(){"ready"!==this.data("gridfield-lazy-load-state")?this.data("gridfield-lazy-load-state","force"):(this.removeClass("grid-field--lazy-loadable").addClass("grid-field--lazy-loaded"),this.reload())},reload:function(t,n){var a=this,i=this.closest("form"),s=this.find(":input:focus").attr("name"),o=i.find(":input:not(.grid-field__search-holder :input, .relation-search)").serializeArray(),l=this.find("tbody"),d=this.find(".grid-field__title-row th").attr("colspan");if(t||(t={}),t.data||(t.data=[]),t.data=t.data.concat(o),window.location.search){let e=window.location.search.replace(/^\?/,"").split("&");for(let n=0;n<e.length;n++){let a=e[n].split("=");2==a.length&&t.data.push({name:decodeURIComponent(a[0]),value:decodeURIComponent(a[1])})}}l.find("tr").remove();var u=e("<td />").addClass("ss-gridfield-item loading").attr("colspan",d);l.append(e("<tr />").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,t){this.openUrl(t,e,(()=>window.location.href=e))},openUrl:function(e,t,n){if(e&&(e.metaKey||e.ctrlKey||e.shiftKey)){window.open(t,"_blank").focus()}else n()},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('<th class="main col-Actions" />'),this.find("tbody tr").each((function(){e(this).find("td:last").attr("colspan",2)}));var n=e('<th class="extra" />');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='<span class="non-sortable"></span>',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='<button type="button" title="Open search and filter" name="showFilter" class="btn btn-secondary font-icon-search btn--no-text btn--icon-lg grid-field__filter-open"></button>',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"),n=e(this).data("name");t&&t.length>0&&t.filter((e=>{if("link"===e.type){const t=this.buildUrlQueryString(e.url,n),a=window.location.pathname+t;window.ss.router.replace(a,void 0,void 0,!1)}}))},buildUrlQueryString:function(e,t){const n={};for(const e of window.location.search.replace(/^\?/,"").split("&")){const[a,r]=e.split("=");a.match(new RegExp(`^gridState\\-${t}\\-[0-9]$`))||(n[a]=r)}const a={},r=[window.location.origin,e].join("/"),i=new URL(r).searchParams;for(const[e,t]of i.entries())a[e]=t;const s=Object.assign(n,a),o=[];for(const e in s){if(""===e)continue;const t=encodeURIComponent(s[e]);o.push([e,t].join("="))}return 0===o.length?"":"?"+o.join("&")}}),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('<span class="non-sortable"></span>'),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"),t)},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('<div class="modal-backdrop fade"></div>'),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, .grid-field__col-compact .gridfield-button-unlink").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);const a=e(this).hasClass("action--archive")?ss.i18n._t("Admin.ARCHIVE_CONFIRM_MESSAGE","Archived"):ss.i18n._t("Admin.DELETE_CONFIRM_MESSAGE","Deleted");e(this).hasClass("dropdown-item")&&jQuery.noticeAdd({text:a,type:"success",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}),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){const t=this.actionurl();return this.getGridField().openUrl(e,t,(()=>window.location.href=t)),e.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({onclick:function(t){return this.getGridField().showDetailView(e(this).prop("href"),t),!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('<input type="hidden" name="relationID" class="action_gridfield_relationfind no-change-track" />');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}}})}))},68413:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(74692));__webpack_require__(64484);var _lodash=_interopRequireDefault(__webpack_require__(10912));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(){},setHeight:function(e,t){if(void 0!==t&&e.target&&e.target.iframeElement){e.target.iframeElement.height=""!==t?"auto":t;const n=e.target.iframeElement.closest(".tox-sidebar-wrap");n&&(n.style.height=t)}},getConfig:function(){var e="#"+editorID,t=(0,_jquery.default)(e).data("config"),n=t.row_height?t.row_height:void 0,a=this;return t.selector=e,t.setup=function(e){e.on("change",(function(){a.save()})),e.on("init",(e=>{a.setHeight(e,n)})),e.on("ResizeEditor",(e=>{a.setHeight(e,"")}))},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('<div id="insert-media-react__dialog-wrapper" class="insert-link__dialog-wrapper" />'),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('<div id="insert-embed-react__dialog-wrapper" />'),e("body").append(t)),t.setElement(this),void t.open()}throw new Error(`Dialog named ${t} is not available.`)}})}))},19081:function(e,t,n){"use strict";var a;((a=n(74692))&&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")}})}))},25897:function(e,t,n){"use strict";var a=i(n(74692)),r=i(n(95815));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)}})}))},29837:function(e,t,n){"use strict";var a;((a=n(74692))&&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)}})}))},13776:function(e,t,n){"use strict";var a=i(n(74692)),r=i(n(95815));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=e("#Form_EditForm_error, #Form_ItemEditForm_error");this.find(".tab-attention, .tab-validation-error-sr").remove();let i=!1;if(this.hasClass("validationerror")&&(i=!0),""!==r.html()&&(i=!0),this.find(".alert.error").length>0&&(i=!0),!i)return void r.hide();const s=this.find(".tab-pane .alert-danger, .tab-pane .alert.error").closest(".tab-pane");if(!s.length)return;const o=this.find('.cms-content-header-tabs.cms-tabset-nav-primary li[role="tab"]'),l=s.closest(".tab-content").closest(".ss-tabset");let d=null;o.length>1?d=e=>o.filter(`[aria-controls="${e}"]`):l.length&&(d=e=>l.find(`#tab-${e}`).closest("li")),null!==d&&(s.each((a=>{const r=s.eq(a).attr("id"),i=d(r),o=e(`<i class="font-icon-attention-1 tab-attention" title="${t}" aria-hidden="true"></i>`),l=e(`<span class="tab-validation-error-sr sr-only">${n}</span>`);i.append(o),i.append(l)})),r.attr("class","alert alert-danger"),r.html(a),r.show()),this.addClass("validationerror")}},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){if(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),!this.getValidationErrorShown()&&this.hasClass("validationerror")){const e=ss.i18n._t("Admin.VALIDATIONERROR","Validation Error");o(e),this.setValidationErrorShown(!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(t,n){return!!e(t.target.activeElement).closest(".bypass-entwine-submission").length||("_blank"!=this.prop("target")?(n&&this.closest(".cms-container").submitForm(this,n),!1):void 0)},validate:function(){var e=!0;return this.trigger("validate",{isValid:e}),e},"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,window.matchMedia("(prefers-reduced-motion: reduce)").matches)},checkIfHoldsField(e,t){let n="";switch(this.attr("name")){case"CanViewType":n=`Viewer${t}`;break;case"CanEditType":n=`Editor${t}`;break;case"CanCreateTopLevelType":n=`CreateTopLevel${t}`}const a=jQuery(e);return a.find(`[name="${n}"],[name="${n}[]"]`).length>0&&a.attr("id").endsWith("_Holder")},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.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Groups"))),e)},hideGroupsList:function(e){const t=this.closest(".field");this.hideListElement(t,t.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Groups"))),e)},showMembersList:function(e){const t=this.closest(".field");this.showListElement(t,t.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Members"))),e)},hideMembersList:function(e){const t=this.closest(".field");this.hideListElement(t,t.parent().find(".form-group, .field").filter(((e,t)=>this.checkIfHoldsField(t,"Members"))),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"}})}},49492:function(e,t,n){"use strict";var a;((a=n(74692))&&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('<label class="right" for="'+t+'"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next()),this.addClass("description-toggle-enabled"),n.on("click",(function(){a[e?"hide":"show"](),e=!e})),a.hide())}})}))},74291:function(e,t,n){"use strict";var a;((a=n(74692))&&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")}})}))},46333:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a},i=n(13547);r.default.entwine("ss",(function(e){e(".cms-panel.cms-menu").entwine({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")}},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 *").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)),document.location.href=r,a.select()}}}),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")}})}))},34811:function(e,t,n){"use strict";var a=o(n(74692)),r=o(n(1066)),i=n(97097),s=n(5338);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)())}})}))},52358:function(e,t,n){"use strict";var a;((a=n(74692))&&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("<div class='toolbar toolbar--south cms-panel-toggle'></div>").append('<a class="toggle-expand" href="#" data-toggle="tooltip" title="'+i18n._t("Admin.EXPANDPANEL","Expand Panel")+'"><span>»</span></a>').append('<a class="toggle-collapse" href="#" data-toggle="tooltip" title="'+i18n._t("Admin.COLLAPSEPANEL","Collapse Panel")+'"><span>«</span></a>'),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)}})}))},77964:function(e,t,n){"use strict";var a=r(n(95815));function r(e){return e&&e.__esModule?e:{default:e}}r(n(74692)).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").find(":input[name=ID]").val();n&&void 0!==r&&r!=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<n.length;a++){var r=n[a].getAttribute("href");r&&(r.match(/^http:\/\//)&&n[a].setAttribute("target","_blank"))}var i=e.getElementById("SilverStripeNavigator");i&&(i.style.display="none");var s=e.getElementById("SilverStripeNavigatorMessage");s&&(s.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[e])}}}}),e(".cms-edit-form").entwine({onadd:function(){this._super(),e(".cms-preview").setAlreadyInitialised(!1),e(".cms-preview")._initialiseFromContent()}}),e(".cms-preview-states").entwine({changeVisibleState:function(e){this.find('[data-name="'+e+'"]').addClass("active").siblings().removeClass("active")}}),e(".cms-preview-states .state-name").entwine({onclick:function(t){if(1==t.which){var n=e(this).attr("data-name");this.addClass("active").siblings().removeClass("active"),e(".cms-preview").changeState(n),t.preventDefault()}}}),e(".preview-mode-selector").entwine({changeVisibleMode:function(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-mode-selector select").entwine({onchange:function(t){this._super(t),t.preventDefault();var n=e(this).val();e(".cms-preview").changeMode(n)}}),e(".cms-container--content-mode").entwine({onmatch:function(){e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(a.default._t("Admin.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function(e){this.find("select").val(e).trigger("chosen:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function(t){t.preventDefault();var n=e(this).val();e(".cms-preview").changeSize(n)}}),e(".preview-selector select.preview-dropdown").entwine({"onchosen:ready":function(){this._super(),this._addIcon()},_addIcon:function(){var e=this.find(":selected").attr("data-icon"),t=this.parent().find(".chosen-container a.chosen-single"),n=t.attr("data-icon");return void 0!==n&&t.removeClass(n),t.addClass(e),t.attr("data-icon",e),this}}),e(".preview-mode-selector .chosen-drop li:last-child").entwine({onmatch:function(){e(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')}}),e(".preview-device-outer").entwine({onclick:function(){this.parent(".preview__device").toggleClass("rotate")}})}))},99694:function(e,t,n){"use strict";var a;((a=n(74692))&&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<i[0].attributes.length;n++){var r=i[0].attributes[n];e.attr(r.name,r.value)}e.addClass(t).html(i.html()),a&&a(e)}))},updateNode:function(t,n,a){n=n.replace(/<!--[\s\S]*?-->/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")}})}))},24843:function(e,t,n){"use strict";var a;((a=n(74692))&&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()}}})}))},62930:function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){"use strict";var _jquery=_interopRequireDefault(__webpack_require__(74692)),_react=_interopRequireDefault(__webpack_require__(96540)),_client=__webpack_require__(5338),_IframeDialog=_interopRequireDefault(__webpack_require__(78335)),_Search=_interopRequireDefault(__webpack_require__(89091)),_Loading=_interopRequireDefault(__webpack_require__(86713)),_schemaFieldValues=__webpack_require__(60906),_Injector=__webpack_require__(14269),_lodash=_interopRequireDefault(__webpack_require__(10912));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;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},_extends.apply(null,arguments)}function decodeEntities(e){const t=document.createElement("textarea");return t.innerHTML=e,t.innerText}__webpack_require__(65060),_jquery.default.noConflict(),window.ss=window.ss||{},window.ss.debounce=function(e,t,n){var a,r,i,s=function(){a=null,n||e.apply(r,i)};return function(){var o=n&&!a;r=this,i=arguments,clearTimeout(a),a=setTimeout(s,t),o&&e.apply(r,i)}},window.ss.tabStateUrl=function(){return window.ss.formatTabStateUrl(window.location.href)},window.ss.formatTabStateUrl=function(e){return e.replace(/\?.*/,"").replace(/#.*/,"").replace(new RegExp(`^${(0,_lodash.default)((0,_jquery.default)("base").attr("href"))}/?`),"")},(0,_jquery.default)(window).on("resize.leftandmain",(function(e){(0,_jquery.default)(".cms-container").trigger("windowresize")})),_jquery.default.entwine.warningLevel=_jquery.default.entwine.WARN_LEVEL_BESTPRACTISE,_jquery.default.entwine("ss",(function($){$(window).on("message",(function(e){var t,n=e.originalEvent,a=null;try{a="object"==typeof n.data?n.data:JSON.parse(n.data)}catch(e){}if(a&&$.path.parseUrl(window.location.href).domain===$.path.parseUrl(n.origin).domain)switch(t=void 0===a.target?$(window):$(a.target),a.type){case"event":let e=a.event,n=a.data;e||(e=a.message.type),n||(n=a.message.payload),t.trigger(e,n);break;case"callback":t[a.callback].call(t,a.data)}}));var positionLoadingSpinner=function(){var e=$(".ss-loading-screen .loading-animation"),t=($(window).height()-e.height())/2;e.css("top",t+120),e.show()},applyChosen=function(e){e.is(":visible")?e.addClass("has-chosen").chosen({allow_single_deselect:!0,disable_search_threshold:20,display_disabled_options:!0,width:"100%"}):setTimeout((function(){e.show(),applyChosen(e)}),500)},isSameUrl=function(e,t){var n=$("base").attr("href");e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,n),t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,n);var a=$.path.parseUrl(e),r=$.path.parseUrl(t);return a.pathname.replace(/\/*$/,"")==r.pathname.replace(/\/*$/,"")&&a.search==r.search},ajaxCompleteEvent=window.ss.debounce((function(){$(window).trigger("ajaxComplete")}),1e3,!0);$(window).on("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete((function(e,t,n){var a=document.URL,r=t.getResponseHeader("X-ControllerURL"),i=n.url,s=null!==t.getResponseHeader("X-Status")?t.getResponseHeader("X-Status"):t.statusText,o=t.status<200||t.status>399?"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.clearTabState(window.ss.tabStateUrl()),this.saveTabState(window.ss.formatTabStateUrl(e),!0),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"));var i={promises:[],onAjaxSuccessCallbacks:[]};return e.trigger("beforesubmitform",i),Promise.all(i.promises).then((function(s){let o=!0;const l=[];for(const e of s)!1===e.success&&(o=!1,l.push(e.reason));if(!o){let e=!1;for(const t of l)if("invalid"===t){e=!0;break}return e&&jQuery.noticeAdd({text:window.ss.i18n._t("Admin.VALIDATIONERROR","Validation Error"),type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}}),!1}r.trigger("submitform",{form:e,button:t}),$(t).addClass("btn--loading loading"),$(t).prop("disabled",!0),$(t).is("button")&&($(t).append($('<div class="btn__loading-icon"><span class="btn__circle btn__circle--1"></span><span class="btn__circle btn__circle--2"></span><span class="btn__circle btn__circle--3"></span></div>')),$(t).css($(t).outerWidth()+"px"));var d=e.validate(),u=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===d||d||(statusMessage("Validation failed.","bad"),u());var c=e.serializeArray();c.push({name:$(t).attr("name"),value:"1"}),c.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),r.saveTabState(window.ss.tabStateUrl(),!1),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs,ValidationResult"},url:e.attr("action"),data:c,type:"POST",complete:function(){u()},success:function(t,a,s){i.onAjaxSuccessCallbacks.forEach((e=>e())),u(),e.removeClass("changed"),n&&n(t,a,s);var o=r.handleAjaxResponse(t,a,s);o&&o.filter("form").trigger("aftersubmitform",{status:a,xhr:s,formData:c})}},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<i.length&&(a="Content",i=["Content"],s=this._findFragments(i)),this.trigger("beforestatechange",{state:t,element:s}),r["X-Pjax"]=a,void 0!==t.__forceReferer){let e=t.__forceReferer;try{e=decodeURI(e)}catch(e){}finally{r["X-Backurl"]=encodeURI(e)}}s.addClass("loading");let o=$.ajax({headers:r,url:t.path||document.URL}).fail(((e,t,n)=>{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(e,t){if(void 0!==window.sessionStorage&&null!==window.sessionStorage){if(void 0===e){window.ss.tabStateUrl()}var n=[];if(this.find(".cms-tabset,.ss-tabset").each((function(e,a){var r=$(a).attr("id");r&&$(a).data("uiTabs")&&($(a).data("ignoreTabState")||$(a).getIgnoreTabState()||n.push({id:r,selected:t?0:$(a).tabs("option","active")}))})),n){var a="tabs-"+e;try{window.sessionStorage.setItem(a,JSON.stringify(n))}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<t.length;n++)t.key(n).match(/^tabs-/)&&t.removeItem(t.key(n))}},clearCurrentTabState:function(){this.clearTabState(window.ss.tabStateUrl())},showLoginDialog:function(){let e=$(".leftandmain__login-dialog");e.length&&e.destroy(),e=$('<div class="leftandmain__login-dialog" />'),$("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=$('<div class="cms-loading-container"/>');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=$("<span></span>").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=$('<div class="ss-ui-dialog" id="'+e+'" />'),$("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,t){this.openUrl(t,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=decodeEntities(e),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},79797:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62930),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)}})}))},54951:function(e,t,n){"use strict";var a;((a=n(74692))&&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"))}))}})}))},76768:function(e,t,n){"use strict";var a,r=(a=n(96540))&&a.__esModule?a:{default:a},i=n(5338),s=n(14269);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}window.jQuery.entwine("ss",(e=>{e(".js-injector-boot .ss-searchable-dropdown-field").entwine({Root:null,Component:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=this.data("schema");if(n){this.data("entwine-value",n.value);const e=(0,i.createRoot)(this[0]),a=(0,s.loadComponent)(n.component,t);this.setRoot(e),this.setComponent(a),this._super(),this.refresh()}},onunmatch(){const e=this.getRoot();e&&e.unmount()},getProps(){return{...this.data("schema"),value:this.data("entwine-value")||"",onChange:this.handleChange.bind(this)}},refresh(){const e=this.getRoot(),t=this.getComponent(),n=this.getProps();e.render(r.default.createElement(t,o({},n,{noHolder:!0})))},handleChange(e){this.data("entwine-value",e),this.refresh()}}),e(".cms-edit-form").entwine({getChangeTrackerOptions(){const t=void 0===this.entwineData("ChangeTrackerOptions");let n=this._super();return t&&(n=e.extend({},n),n.ignoreFieldSelector+=", .ss-searchable-dropdown-field .no-change-track :input",this.setChangeTrackerOptions(n)),n}})}))},95988:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62930),n(54951);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"))}))}})}))},2400:function(e,t,n){"use strict";var a,r=(a=n(74692))&&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()}))}))},42496:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62727),n(66530),n(38344),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")}})}))},72806:function(e,t,n){"use strict";var a=d(n(74692)),r=d(n(96540)),i=n(5338),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(14269)),o=n(16679);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("toastcontainernamespace",(e=>{e("body").entwine({onmatch(){const t=e('<div class="toasts-container"></div>');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))}))}})},28620:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62727),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")}}})}))},224:function(e,t,n){"use strict";var a=d(n(74692)),r=d(n(96540)),i=n(5338),s=n(60906),o=n(90277),l=n(14269);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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(null,arguments)}a.default.entwine("ss",(e=>{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)}})}))},65376:function(e,t,n){"use strict";var a=l(n(74692)),r=l(n(96540)),i=n(5338),s=n(60906),o=n(14269);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)}})}))},89513:function(e,t,n){"use strict";var a,r=(a=n(20181))&&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)},36208:function(e,t,n){"use strict";var a,r=(a=n(74692))&&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<a.length;r++){var i=a[r];switch(i){case".":break;case"..":n.length&&n.pop();break;default:n.push(i)}}return"/"+n.join("/")},isSameDomain:function(e,t){return i.parseUrl(e).domain===i.parseUrl(t).domain},isRelativeUrl:function(e){return""===i.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==i.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!i.isRelativeUrl(e))return e;var n=i.parseUrl(e),a=i.parseUrl(t),r=n.protocol||a.protocol,s=n.protocol?n.doubleSlash:n.doubleSlash||a.doubleSlash,o=n.authority||a.authority,l=""!==n.pathname;return r+s+o+i.makePathAbsolute(n.pathname||a.filename,a.pathname)+(n.search||!l&&a.search||"")+n.hash},addSearchParams:function(e,t){var n=i.parseUrl(e),a=(t="string"==typeof t?i.convertSearchToArray(t):t,r.default.extend(i.convertSearchToArray(n.search),t)),s=i.convertObjectToSearch(a);return n.hrefNoSearch+"?"+s+(n.hash||"")},getSearchParams:function(e){var t=i.parseUrl(e);return i.convertSearchToArray(t.search)},convertSearchToArray:function(e){var t,n,a,r={};for(t=(e=e.replace(/^\?/,""))?e.split("&"):[],n=0;n<t.length;n++)a=t[n].split("="),r[decodeURIComponent(a[0])]=decodeURIComponent(a[1]);return r},convertObjectToSearch(e){let t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")},convertUrlToDataUrl:function(e){var t=i.parseUrl(e);return i.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):i.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function(e){return void 0===e&&(e=location.hash),i.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(e){var t="&"+r.default.mobile.subPageUrlKey;return e&&e.split(t)[0].split(dialogHashKey)[0]},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(document.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},cleanHash:function(e){return i.stripHash(e.replace(/\?.*$/,"").replace(dialogHashKey,""))},isExternal:function(e){var t=i.parseUrl(e);return!(!t.protocol||t.domain===document.domain)},hasProtocol:function(e){return/^(:?\w+:)/.test(e)}};r.default.path=i},65060:function(e,t,n){"use strict";var a,r=(a=n(74692))&&a.__esModule?a:{default:a};n(62727),r.default.widget("ssui.ssdialog",r.default.ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){r.default.ui.dialog.prototype._create.call(this);var e=this,t=(0,r.default)('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');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&&e<this.options.minWidth?n.width=this.options.minWidth:this.options.maxWidth&&e>this.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&&t<this.options.minHeight?n.height=this.options.minHeight:this.options.maxHeight&&t>this.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)('<a href="#"/>').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)("<span/>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(i)}(0,r.default)("<span/>").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)}})},32613:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(60328)),r=o(n(64583)),i=o(n(55373)),s=o(n(84010));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)}};t.default=f},80391:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=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(){}}},78318: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(95815)),r=i(n(55373));function i(e){return e&&e.__esModule?e:{default:e}}},14269:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return o.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=d(n(92030)),r=d(n(52415)),i=d(n(28699)),s=d(n(39558)),o=d(n(8868)),l=d(n(94408));function d(e){return e&&e.__esModule?e:{default:e}}t.default=l.default},3600: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]}};t.default=window.ss.routeRegister},75564:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=o(n(74827)),i=o(n(88835)),s=o(n(10912));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;t.default=window.ss.router},66373: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(95815))&&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)}}),{})};t.default=f},14274:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(96540);class r extends a.Component{constructor(){super(),clearTimeout(null)}render(){return null}}r.propTypes={};t.default=r},97671: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}};t.default=window.ss.tinymceactions},78443:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(57761)),r=i(n(95815));function i(e){return e&&e.__esModule?e:{default:e}}t.default=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,r){if(t.includes(e))return"required"!==n;switch(n){case"equals":{const t=this.getFieldValue(r.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,r.pattern);case"max":return e.length<=r.length;case"email":return a.default.isEmail(e);default:return console.warn(`Unknown validation rule used: '${n}'`),!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);let s=[""];if(t.required&&"object"==typeof t.required&&t.required.hasOwnProperty("extraEmptyValues")&&(s=s.concat(t.required.extraEmptyValues)),t.required&&s.includes(i)){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,o]=t,l=Object.assign({title:e},{title:n},o);if("required"===a)return;if(!this.validateValue(i,s,a,l)){const e=this.getMessage(a,l);r.valid=!1,r.errors.push(e)}})),a&&!r.valid&&(r.errors=[a]),r}}},80328: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(96540))&&a.__esModule?a:{default:a};function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(null,arguments)}},46172:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SPLITMODE_BREAKPOINT=void 0;t.SPLITMODE_BREAKPOINT=800},59523:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=e=>{const t={};return e&&e.split(" ").forEach((e=>{""!==e&&(t[e]=!0)})),t}},18574: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(96540))&&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;t.default=s},94408:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(10712)),r=o(n(42081)),i=o(n(24596)),s=o(n(50010));function o(e){return e&&e.__esModule?e:{default:e}}const l=(0,a.default)();l.register("component",(0,r.default)()),l.register("reducer",(0,i.default)()),l.register("form",(0,s.default)());t.default=l},85841:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=l(n(46942)),r=l(n(69012)),i=n(76806),s=n(60906),o=l(n(59523));function l(e){return e&&e.__esModule?e:{default:e}}const d=e=>e;t.default=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}}},10135:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=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}}},4136:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.GLOBAL_CONTEXT=void 0;var a,r=(a=n(92981))&&a.__esModule?a:{default:a};const i="before",s="after",o="__HEAD__",l="__TAIL__",d=[i,s],u=t.GLOBAL_CONTEXT="__GLOBAL__";t.default=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]}}},26105:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(66104)),r=o(n(69012)),i=n(76806),s=o(n(14269));function o(e){return e&&e.__esModule?e:{default:e}}const l=[i.actionTypes.REGISTER_FIELD,i.actionTypes.DESTROY];t.default=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}},5147:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(82960),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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(4136));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)}t.default=()=>({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)}})},42081:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5147))&&a.__esModule?a:{default:a};t.default=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<a;i++)r[i-2]=arguments[i];const s=e.get.call(this,t,n,...r);if(s.displayName&&s.displayName.match(/\]$/))return s;const o=s.displayName||s.name||"Component",l=n?`[${n}]`:"";return s.displayName=`${o}${l}`,s},createTransformer(e,t){return(n,a,r)=>{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}}}},50010: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(5147)),r=s(n(85841)),i=s(n(10135));function s(e){return e&&e.__esModule?e:{default:e}}const o=t.SCHEMA_MIDDLEWARE_SERVICE="FormSchemaMiddleware",l=t.VALIDATION_MIDDLEWARE_SERVICE="FormValidationMiddleware";t.default=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;r<n;r++)a[r-1]=arguments[r];return e.get.call(this,o,t,...a)},getValidation(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return e.get.call(this,l,t,...a)},createTransformer(t,n){const a=a=>(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()}}}}},10712:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=()=>({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}})},24596:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(5147)),r=i(n(4136));function i(e){return e&&e.__esModule?e:{default:e}}t.default=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}}),{})}}}},39558: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(53692))&&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)}const o=(e,t)=>t;t.default=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;return a=>{if(e&&!Array.isArray(e))throw new Error(`\n withInjector() passed an argument for dependencies that is ${typeof deps}.\n Must be an array of named dependencies.\n `);if(t&&"function"!=typeof t)throw new Error("\n Second parameter of inject() [mapDependenciesToProps] must be a function, taking the resolved\n dependencies as enumerated arguments, and returning a map of prop names to dependencies.\n ");if("function"!=typeof n)throw new Error("\n Third parameter of inject() [getContext] must be a function, taking the component's props\n and current inject context as parameters, and returning a string representing the Injector\n context to use throughout the component.\n ");class s extends r.Component{constructor(e,t){super(e,t),this.state={context:n(e,t.injector.context)}}getChildContext(){return{injector:{...this.context.injector,context:this.state.context}}}static getDerivedStateFromProps(e,t){const a=n(e,t.context);return a!==t.context?{context:a}:null}render(){let n={};if(e){const{get:a}=this.context.injector,r=e.map((e=>a(e,this.state.context)));if(t?n=t(...r):e.forEach(((e,t)=>{n[e]=r[t]})),!n||"object"!=typeof n)throw new Error("\n mapDepedenciesToProps parameter passed to inject()\n should return an object that maps prop names to dependencies\n ")}const i={...n,...this.props};return r.default.createElement(a,i)}}return s.contextTypes=i.default,s.childContextTypes=i.default,s}}},53692:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(5556))&&a.__esModule?a:{default:a};t.default={injector:r.default.shape({get:r.default.func,context:r.default.string,validate:r.default.func})}},8868: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=n(69733),i=u(n(46381)),s=u(n(92030)),o=u(n(28699)),l=u(n(94408)),d=u(n(53692));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(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f.apply(null,arguments)}t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;class u extends a.Component{constructor(e){super(e),this.state={target:null,error:!1}}getChildContext(){const e=t&&t.context;return e?{injector:{...this.context.injector,context:e}}:this.context}componentDidMount(){l.default.ready((()=>{if("string"!=typeof e)this.setState({target:e});else{let n=!0,a=null;try{a=this.context.injector.get(e,t&&t.context),n=!1}catch(e){throw this.setState({target:a,error:n}),e}this.setState({target:a,error:n})}}))}render(){const n=this.state.target;if(this.state.error){let t=i.default;try{t=this.context.injector.get("NotFoundComponent")}catch(e){}return a.default.createElement(t,f({},this.props,{itemName:e}))}if(n){if(t){const e={...window.ss,...t},{store:i}=e;return a.default.createElement(r.Provider,{store:i},a.default.createElement(n,this.props))}return a.default.createElement(n,this.props)}return null}}u.childContextTypes=d.default;return(n||s.default)((0,o.default)(u))}},52415: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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]}return a.default=e,n&&n.set(e,a),a}(n(96540)),i=(a=n(53692))&&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)}t.default=e=>t=>{class n extends r.Component{getChildContext(){return{injector:{...this.context.injector,context:e}}}render(){return r.default.createElement(t,this.props)}}return n.contextTypes=i.default,n.childContextTypes=i.default,n}},92030: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={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.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}(n(96540)),r=s(n(94408)),i=s(n(53692));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)}t.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.default;class n extends a.Component{getChildContext(){const{component:e,form:n}=t;return{injector:{get:e.get.bind(e),validate:n.getValidation.bind(n)}}}render(){return a.default.createElement(e,this.props)}}return n.childContextTypes=i.default,n}},28699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(53692))&&a.__esModule?a:{default:a};t.default=e=>(e.contextTypes={...e.contextTypes||{},...r.default},e.displayName=`withInjector(\n ${e.displayName||e.name||"Component"}\n )`,e)},66802:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=Number(e);if(null!==e&&t>=0&&t<10)return[r.default._t("Admin.WRITTEN_NUMBER_ZERO","zero"),r.default._t("Admin.WRITTEN_NUMBER_ONE","one"),r.default._t("Admin.WRITTEN_NUMBER_TWO","two"),r.default._t("Admin.WRITTEN_NUMBER_THREE","three"),r.default._t("Admin.WRITTEN_NUMBER_FOUR","four"),r.default._t("Admin.WRITTEN_NUMBER_FIVE","five"),r.default._t("Admin.WRITTEN_NUMBER_SIX","six"),r.default._t("Admin.WRITTEN_NUMBER_SEVEN","seven"),r.default._t("Admin.WRITTEN_NUMBER_EIGHT","eight"),r.default._t("Admin.WRITTEN_NUMBER_NINE","nine")][t];if(t)return String(t);return null};var a,r=(a=n(95815))&&a.__esModule?a:{default:a}},15042:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.form&&e.form.formState||{}}},51266:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(95815))&&a.__esModule?a:{default:a};t.default=async e=>{let t=null;try{t=(await e.response.json()).errors[0].value}catch(e){}return t||(t=r.default._t("Admin.UNKNOWN_ERROR","An unknown error has occurred.")),t}},89919: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]:{};return a=>{if(!t.payload.fieldId)throw new Error("Invalid fieldId");const i=e.fields||{},s=i[t.payload.fieldId]?e.fields[t.payload.fieldId]:n;return(0,r.default)(Object.assign({},e,{fields:Object.assign({},i,{[t.payload.fieldId]:Object.assign({},s,a(s))})}))}};var a,r=(a=n(82229))&&a.__esModule?a:{default:a}},60906:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!t)return{};return t.fields.reduce(((t,n)=>{const a=i(e.fields,n.name);return a?"Structural"===a.type||!0===a.readOnly?t:Object.assign({},t,{[n.name]:n.value}):t}),{})},t.findField=i,t.schemaMerge=function(e,t){if(void 0===t)return e;return r.default.recursive(!0,e,t)};var a,r=(a=n(84010))&&a.__esModule?a:{default:a};function i(e,t){return e?e.reduce(((e,n)=>e||i(n.children,t)),e.find((e=>e.name===t||e.name===`${t}[]`))):null}},13547:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinUrlPaths=void 0;t.joinUrlPaths=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return"";let a=t.shift();for(const e of t)a=`${a.replace(/\/$/,"")}/${e.replace(/^\//,"")}`;return a}},76535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=n(17987),i=(a=n(35259))&&a.__esModule?a:{default:a};t.default=(0,r.DragDropContext)(i.default)},78848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){const n=(0,r.useLocation)(),i=(0,r.useNavigate)(),s=(0,r.useParams)();return a.default.createElement(e,o({},t,{router:{location:n,navigate:i,params:s}}))}},t.routerPropTypes=void 0;var a=s(n(96540)),r=n(84976),i=s(n(5556));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<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},o.apply(null,arguments)}t.routerPropTypes=i.default.shape({location:i.default.shape({pathname:i.default.string,query:i.default.object,search:i.default.string}),navigate:i.default.func,params:i.default.object})},90473:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_BREADCRUMBS:"SET_BREADCRUMBS"}},62129:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setBreadcrumbs=function(e){return{type:r.default.SET_BREADCRUMBS,payload:{breadcrumbs:e}}};var a,r=(a=n(90473))&&a.__esModule?a:{default:a}},76606:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(90473));function i(e){return e&&e.__esModule?e:{default:e}}const s=(0,a.default)([]);t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;return t.type===r.default.SET_BREADCRUMBS?(0,a.default)(Object.assign([],t.payload.breadcrumbs)):e}},78155:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_CONFIG:"SET_CONFIG"}},91667:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setConfig=function(e){return{type:r.default.SET_CONFIG,payload:{config:e}}};var a,r=(a=n(78155))&&a.__esModule?a:{default:a}},21500:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(78155));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===r.default.SET_CONFIG?(0,a.default)(Object.assign({},e,t.payload.config)):e}},80593:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={TOGGLE_MENU:"TOGGLE_MENU",OPEN_MENU:"OPEN_MENU",CLOSE_MENU:"CLOSE_MENU"}},97097:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeMobileMenu=function(){return{type:r.default.CLOSE_MENU,payload:null}},t.openMobileMenu=function(){return{type:r.default.OPEN_MENU,payload:null}},t.toggleMobileMenu=function(){return{type:r.default.TOGGLE_MENU,payload:null}};var a,r=(a=n(80593))&&a.__esModule?a:{default:a}},64038:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(80593));function i(e){return e&&e.__esModule?e:{default:e}}const s={isOpen:!1};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;switch((arguments.length>1?arguments[1]:void 0).type){case r.default.TOGGLE_MENU:return(0,a.default)({...e,isOpen:!e.isOpen});case r.default.OPEN_MENU:return(0,a.default)({...e,isOpen:!0});case r.default.CLOSE_MENU:return(0,a.default)({...e,isOpen:!1});default:return e}}},61481:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={FETCH_RECORDS_REQUEST:"FETCH_RECORDS_REQUEST",FETCH_RECORDS_FAILURE:"FETCH_RECORDS_FAILURE",FETCH_RECORDS_SUCCESS:"FETCH_RECORDS_SUCCESS",FETCH_RECORD_REQUEST:"FETCH_RECORD_REQUEST",FETCH_RECORD_FAILURE:"FETCH_RECORD_FAILURE",FETCH_RECORD_SUCCESS:"FETCH_RECORD_SUCCESS",DELETE_RECORD_REQUEST:"DELETE_RECORD_REQUEST",DELETE_RECORD_FAILURE:"DELETE_RECORD_FAILURE",DELETE_RECORD_SUCCESS:"DELETE_RECORD_SUCCESS"}},63249:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteRecord=function(e,t,n,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const l={recordType:e,id:t},d=n.toLowerCase(),u="get"===d?[s(i,l),o]:[s(i,l),{},o];return n=>(n({type:r.default.DELETE_RECORD_REQUEST,payload:l}),a.default[d](...u).then((()=>{n({type:r.default.DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})).catch((a=>{throw n({type:r.default.DELETE_RECORD_FAILURE,payload:{error:a,recordType:e,id:t}}),a})))},t.fetchRecord=function(e,t,n){const i={recordType:e},o={Accept:"application/json"},l=t.toLowerCase();return t=>{t({type:r.default.FETCH_RECORD_REQUEST,payload:i});const d="get"===l?[s(n,i),o]:[s(n,i),{},o];return a.default[l](...d).then((e=>e.json())).then((n=>{t({type:r.default.FETCH_RECORD_SUCCESS,payload:{recordType:e,data:n}})})).catch((n=>{throw t({type:r.default.FETCH_RECORD_FAILURE,payload:{error:n,recordType:e}}),n}))}},t.fetchRecords=function(e,t,n){const i={recordType:e},o={Accept:"application/json"},l=t.toLowerCase();return t=>{t({type:r.default.FETCH_RECORDS_REQUEST,payload:i});const d="get"===l?[s(n,i),o]:[s(n,i),{},o];return a.default[l](...d).then((e=>e.json())).then((n=>{t({type:r.default.FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:n}})})).catch((n=>{throw t({type:r.default.FETCH_RECORDS_FAILURE,payload:{error:n,recordType:e}}),n}))}};var a=i(n(32613)),r=i(n(61481));function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return Object.keys(t).reduce(((e,n)=>e.replace(`:${n}`,t[n])),e)}},47646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(82229)),r=i(n(61481));function i(e){return e&&e.__esModule?e:{default:e}}const s={};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.default.FETCH_RECORDS_SUCCESS:{const n=t.payload.recordType;if(!n)throw new Error("Undefined record type");const r=t.payload.data._embedded[n]||[];return(0,a.default)({...e,[n]:r})}case r.default.FETCH_RECORD_SUCCESS:{const n=t.payload.recordType,r=t.payload.data;if(!n)throw new Error("Undefined record type");if(!r)throw new Error("Undefined record data given");const i=e[n]||[];return i.find((e=>e.ID===r.ID))?(0,a.default)({...e,[n]:i.map((e=>e.ID===r.ID?r:e))}):(0,a.default)({...e,[n]:[...i,r]})}case r.default.DELETE_RECORD_SUCCESS:{const n=t.payload.recordType;if(!n)throw new Error("Undefined record type");const r=e[n].filter((e=>e.ID!==t.payload.id));return(0,a.default)({...e,[n]:r})}default:return e}}},55337:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SET_SCHEMA:"SET_SCHEMA",SET_SCHEMA_STATE_OVERRIDES:"SET_SCHEMA_STATE_OVERRIDES",SET_SCHEMA_LOADING:"SET_SCHEMA_LOADING"}},82513:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setSchema=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return{type:r.default.SET_SCHEMA,payload:{...t,id:e,name:n}}},t.setSchemaLoading=function(e,t){return{type:r.default.SET_SCHEMA_LOADING,payload:{id:e,loading:t}}},t.setSchemaStateOverrides=function(e,t){return{type:r.default.SET_SCHEMA_STATE_OVERRIDES,payload:{id:e,stateOverride:t}}};var a,r=(a=n(55337))&&a.__esModule?a:{default:a}},76958:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(t.type){case r.default.SET_SCHEMA:{const n=e[t.payload.id]||{};return(0,a.default)({...e,[t.payload.id]:{...n,...t.payload}})}case r.default.SET_SCHEMA_STATE_OVERRIDES:{const n=e[t.payload.id]||{},r=t.payload.stateOverride;return r&&r.fields?(0,a.default)({...e,[t.payload.id]:{...n,stateOverride:r}}):e}case r.default.SET_SCHEMA_LOADING:{const n=e[t.payload.id]||{},r=n.metadata||{};return(0,a.default)({...e,[t.payload.id]:{...n,metadata:{...r,loading:t.payload.loading}}})}default:return e}};var a=i(n(82229)),r=i(n(55337));function i(e){return e&&e.__esModule?e:{default:e}}const s=(0,a.default)({})},87835:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={TABS_ACTIVATE_TAB:"TABS_ACTIVATE_TAB"}},25827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.activateTab=function(e,t){return{type:r.default.TABS_ACTIVATE_TAB,payload:{fieldId:e,tab:t}}};var a,r=(a=n(87835))&&a.__esModule?a:{default:a}},71916:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,r.default)(e,t,l);if(t.type===i.default.TABS_ACTIVATE_TAB)return n((()=>({activeTab:t.payload.tab})));return e};var a=s(n(82229)),r=s(n(89919)),i=s(n(87835));function s(e){return e&&e.__esModule?e:{default:e}}const o=(0,a.default)({fields:{}}),l=(0,a.default)({activeTab:null})},34526:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.STAY_TIME=t.FADEOUT_TIME=void 0;t.STAY_TIME=6e3,t.FADEOUT_TIME=1200},49023:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={DISPLAY:"DISPLAY_TOAST",DISMISS:"DISMISS_TOAST",REMOVE:"REMOVE_TOAST",PAUSE:"PAUSE_TOAST",RESUME:"RESUME_TOAST"}},16679:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dismiss=l,t.display=d,t.error=function(e){return d({text:e,type:"error",stay:!0})},t.info=function(e){return d({text:e})},t.pause=function(){return{type:i.default.PAUSE}},t.resume=function(){return{type:i.default.RESUME}},t.success=function(e){return d({text:e,type:"success"})},t.warning=function(e){return d({text:e,type:"warning",stay:!0})};var a,r=n(22831),i=(a=n(49023))&&a.__esModule?a:{default:a},s=n(34526);const o={text:"",stay:!1,type:"notice"};function l(e){return t=>{t({type:i.default.DISMISS,payload:{id:e}}),setTimeout((()=>t({type:i.default.REMOVE,payload:{id:e}})),s.FADEOUT_TIME)}}function d(e){const t=`toast-${(0,r.v4)()}`;return n=>{const a={id:t,dismissCallback:()=>l(t)(n),...o,...e};n({type:i.default.DISPLAY,payload:a})}}},53896:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(49023))&&a.__esModule?a:{default:a},i=n(34526);const s={paused:!1,toasts:[]},o=e=>{let{stay:t,dismissCallback:n}=e;return t?void 0:setTimeout(n,i.STAY_TIME)},l=(e,t)=>({...e,toasts:t});t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,payload:n}=arguments.length>1?arguments[1]:void 0;switch(t){case r.default.DISPLAY:return((e,t)=>l(e,[...e.toasts,{...t,timeout:e.paused?void 0:o(t),dismissed:!1}]))(e,n);case r.default.DISMISS:return((e,t)=>l(e,e.toasts.map((e=>e.id===t?{...e,dismissed:!0}:e))))(e,n.id);case r.default.REMOVE:return((e,t)=>l(e,e.toasts.filter((e=>e.id!==t))))(e,n.id);case r.default.PAUSE:return(e=>({paused:!0,toasts:e.toasts.map((e=>{let{timeout:t,...n}=e;return t&&clearTimeout(t),n}))}))(e);case r.default.RESUME:return(e=>({paused:!1,toasts:e.toasts.map((e=>({timeout:o(e),...e})))}))(e);default:return e}}},82126:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={TREEFIELD_SET_VISIBLE:"TREEDROPDOWNFIELD_SET_VISIBLE",TREEFIELD_UPDATED_TREE:"TREEDROPDOWNFIELD_UPDATED_TREE",TREEFIELD_UPDATING_TREE:"TREEDROPDOWNFIELD_UPDATING_TREE",TREEFIELD_UPDATE_FAILED:"TREEFIELD_UPDATE_FAILED",TREEFIELD_SET_SEARCH:"TREEFIELD_SET_SEARCH",TREEFIELD_ADD_SELECTED_VALUES:"TREEFIELD_ADD_SELECTED_VALUES"}},47193:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addSelectedValues=function(e,t){return{type:r.default.TREEFIELD_ADD_SELECTED_VALUES,payload:{fieldId:e,values:t}}},t.beginTreeUpdating=function(e,t){return{type:r.default.TREEFIELD_UPDATING_TREE,payload:{fieldId:e,path:t}}},t.setSearch=function(e,t){return{type:r.default.TREEFIELD_SET_SEARCH,payload:{fieldId:e,search:t}}},t.setVisible=function(e,t){return{type:r.default.TREEFIELD_SET_VISIBLE,payload:{fieldId:e,path:t}}},t.updateTree=function(e,t,n){return{type:r.default.TREEFIELD_UPDATED_TREE,payload:{fieldId:e,path:t,tree:n}}},t.updateTreeFailed=function(e,t){return{type:r.default.TREEFIELD_UPDATE_FAILED,payload:{fieldId:e,path:t}}};var a,r=(a=n(82126))&&a.__esModule?a:{default:a}},88790:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=(0,r.default)(e,t,l),a=(e,t)=>e.filter((e=>e!==t)),s=(e,t)=>{if(e.find((e=>e===t)))return e;return[...e,t].sort()};switch(t.type){case i.default.TREEFIELD_SET_VISIBLE:return n((()=>({visible:t.payload.path})));case i.default.TREEFIELD_UPDATING_TREE:return n((e=>({loading:s(e.loading,u(t.payload.path)),failed:a(e.failed,u(t.payload.path))})));case i.default.TREEFIELD_UPDATED_TREE:return n((e=>({tree:d(e.tree,t.payload.path,t.payload.tree),loading:a(e.loading,u(t.payload.path)),failed:a(e.failed,u(t.payload.path))})));case i.default.TREEFIELD_UPDATE_FAILED:return n((e=>({loading:a(e.loading,u(t.payload.path)),failed:s(e.failed,u(t.payload.path))})));case i.default.TREEFIELD_SET_SEARCH:return n((e=>({...e,search:t.payload.search})));case i.default.TREEFIELD_ADD_SELECTED_VALUES:{const e=t.payload.values||[];return n((t=>({...t,selectedValues:[...t.selectedValues.filter((t=>!e.find((e=>e.id===t.id)))),...e].sort(((e,t)=>e.id-t.id))})))}default:return e}};var a=s(n(82229)),r=s(n(89919)),i=s(n(82126));function s(e){return e&&e.__esModule?e:{default:e}}const o=(0,a.default)({fields:{}}),l=(0,a.default)({visible:[],tree:{},loading:[],failed:[],search:"",selectedValues:[]});function d(e,t,n){if(0===t.length)return n;const[r,...i]=t;return e.children?(0,a.default)({...e,children:e.children.map((e=>e.id===r?d(e,i,n):e))}):e}function u(e){return e.length?e[e.length-1]:0}},27798:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={ADD_FORM_CHANGED:"ADD_FORM_CHANGED",REMOVE_FORM_CHANGED:"REMOVE_FORM_CHANGED"}},35505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addFormChanged=function(e){return{type:r.default.ADD_FORM_CHANGED,meta:{form:e}}},t.removeFormChanged=function(e){return{type:r.default.REMOVE_FORM_CHANGED,meta:{form:e}}};var a,r=(a=n(27798))&&a.__esModule?a:{default:a}},29950:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(n(82229)),r=n(76806),i=s(n(27798));function s(e){return e&&e.__esModule?e:{default:e}}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const n=t.meta&&t.meta.form;switch(t.type){case i.default.ADD_FORM_CHANGED:case r.actionTypes.CHANGE:return(0,a.default)([...e.filter((e=>e.name!==n)),{name:n}]);case i.default.REMOVE_FORM_CHANGED:case r.actionTypes.STOP_SUBMIT:return(0,a.default)([...e.filter((e=>e.name!==n))]);case r.actionTypes.DESTROY:return(0,a.default)([...e.filter((e=>!n.includes(e.name)))]);default:return e}}},98307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadUsedOn=function(e,t,n){const s={method:t,headers:{Accept:"application/json"},credentials:"same-origin"};return d=>{if(!e||!t||!n){const t=a.default._t("Admin.NOT_AVAILABLE_USED_DATA","The usage data is currently unavailable.");return Promise.resolve(d(l(e,t)))}return d({type:i.default.LOAD_USED_ON,payload:{identifier:e}}),(0,r.default)(n,s).then((e=>e.json())).then((t=>{d(o(e,t))})).catch((t=>{d(l(e,t))}))}},t.loadUsedOnFailed=l,t.saveUsedOn=o;var a=s(n(95815)),r=s(n(60328)),i=s(n(73581));function s(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return{type:i.default.SAVE_USED_ON,payload:{identifier:e,usedOn:t}}}function l(e,t){return{type:i.default.LOAD_USED_ON_FAILED,payload:{identifier:e,error:t.message}}}},88140:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(73581))&&a.__esModule?a:{default:a};const i={loading:[],usedOn:{},errors:{}};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1?arguments[1]:void 0;const n=t&&t.payload&&t.payload.identifier;if(!n)return e;switch(t.type){case r.default.SAVE_USED_ON:{const a=t.payload.usedOn;return{...e,loading:e.loading.filter((e=>e!==n)),usedOn:{...e.usedOn,[n]:a.usage}}}case r.default.LOAD_USED_ON:return e.loading.includes(n)?e:{...e,loading:[...e.loading,n],errors:Object.entries(e.errors).reduce(((e,t)=>{let[a,r]=t;return a===n?e:{...e,[a]:r}}),{})};case r.default.LOAD_USED_ON_FAILED:{const a=t.payload.error;return{...e,loading:e.loading.filter((e=>e!==n)),errors:{...e.errors,[n]:a}}}default:return e}}},73581:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={LOAD_USED_ON:"LOAD_USED_ON",SAVE_USED_ON:"SAVE_USED_ON",LOAD_USED_ON_FAILED:"LOAD_USED_ON_FAILED"}},17359:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={SELECT_EDIT:"SELECT_EDIT",SELECT_PREVIEW:"SELECT_PREVIEW",SELECT_SPLIT:"SELECT_SPLIT",SPLIT_AVAILABLE:"SPLIT_AVAILABLE"}},6679:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableOrDisableSplitMode=function(e){return{type:r.default.SPLIT_AVAILABLE,payload:{panelWidth:e}}},t.selectEditMode=function(){return{type:r.default.SELECT_EDIT}},t.selectPreviewMode=function(){return{type:r.default.SELECT_PREVIEW}},t.selectSplitMode=function(){return{type:r.default.SELECT_SPLIT}};var a,r=(a=n(17359))&&a.__esModule?a:{default:a}},98360:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,r=(a=n(17359))&&a.__esModule?a:{default:a},i=n(46172),s=n(44072);const o={activeState:s.VIEW_MODE_STATES.SPLIT,splitAvailable:!0,lockState:!1};t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case r.default.SELECT_EDIT:return{...e,activeState:s.VIEW_MODE_STATES.EDIT,lockState:!0};case r.default.SELECT_PREVIEW:return{...e,activeState:s.VIEW_MODE_STATES.PREVIEW,lockState:!0};case r.default.SELECT_SPLIT:return{...e,activeState:s.VIEW_MODE_STATES.SPLIT,lockState:!1};case r.default.SPLIT_AVAILABLE:{const n=t.payload.panelWidth>i.SPLITMODE_BREAKPOINT;let a=e.activeState;return e.lockState||a!==s.VIEW_MODE_STATES.SPLIT||n?!e.lockState&&a===s.VIEW_MODE_STATES.EDIT&&n&&(a=s.VIEW_MODE_STATES.SPLIT):a=s.VIEW_MODE_STATES.EDIT,{...e,splitAvailable:n,activeState:a}}default:return e}}},44072:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIEW_MODE_STATES=void 0;t.VIEW_MODE_STATES={EDIT:"edit",PREVIEW:"preview",SPLIT:"split"}},85152:function(e,t,n){var a=n(86821),r=n(34160);void 0===r.Accordion&&(r.Accordion=a),e.exports=a},26430:function(e,t,n){var a=n(97260),r=n(34160);void 0===r.AccordionBlock&&(r.AccordionBlock=a),e.exports=a},39734:function(e,t,n){var a=n(61080),r=n(34160);void 0===r.BackButton&&(r.BackButton=a),e.exports=a},10431:function(e,t,n){var a=n(32613),r=n(34160);void 0===r.Backend&&(r.Backend=a),e.exports=a},50121:function(e,t,n){var a=n(1541),r=n(34160);void 0===r.Badge&&(r.Badge=a),e.exports=a},64477:function(e,t,n){var a=n(15357),r=n(34160);void 0===r.Breadcrumb&&(r.Breadcrumb=a),e.exports=a},58749:function(e,t,n){var a=n(62129),r=n(34160);void 0===r.BreadcrumbsActions&&(r.BreadcrumbsActions=a),e.exports=a},72250:function(e,t,n){var a=n(73323),r=n(34160);void 0===r.Button&&(r.Button=a),e.exports=a},80125:function(e,t,n){var a=n(32493),r=n(34160);void 0===r.CheckboxSetField&&(r.CheckboxSetField=a),e.exports=a},48486:function(e,t,n){var a=n(74),r=n(34160);void 0===r.CircularLoading&&(r.CircularLoading=a),e.exports=a},32152:function(e,t,n){var a=n(39054),r=n(34160);void 0===r.CompactTagList&&(r.CompactTagList=a),e.exports=a},82660:function(e,t,n){var a=n(80391),r=n(34160);void 0===r.Config&&(r.Config=a),e.exports=a},18320:function(e,t,n){var a=n(78318),r=n(34160);void 0===r.DataFormat&&(r.DataFormat=a),e.exports=a},30521:function(e,t,n){var a=n(28181),r=n(34160);void 0===r.EmotionCssCacheProvider&&(r.EmotionCssCacheProvider=a),e.exports=a},47928:function(e,t,n){var a=n(23977),r=n(34160);void 0===r.FieldHolder&&(r.FieldHolder=a),e.exports=a},93772:function(e,t,n){var a=n(99237),r=n(34160);void 0===r.FileSchemaModalHandler&&(r.FileSchemaModalHandler=a),e.exports=a},56173:function(e,t,n){var a=n(32541),r=n(34160);void 0===r.FileStatusIcon&&(r.FileStatusIcon=a),e.exports=a},76361:function(e,t,n){var a=n(47549),r=n(34160);void 0===r.Focusedzone&&(r.Focusedzone=a),e.exports=a},27092:function(e,t,n){var a=n(11463),r=n(34160);void 0===r.Form&&(r.Form=a),e.exports=a},60022:function(e,t,n){var a=n(23443),r=n(34160);void 0===r.FormAction&&(r.FormAction=a),e.exports=a},72298:function(e,t,n){var a=n(21077),r=n(34160);void 0===r.FormAlert&&(r.FormAlert=a),e.exports=a},39636:function(e,t,n){var a=n(96865),r=n(34160);void 0===r.FormBuilder&&(r.FormBuilder=a),e.exports=a},75252:function(e,t,n){var a=n(23077),r=n(34160);void 0===r.FormBuilderLoader&&(r.FormBuilderLoader=a),e.exports=a},90584:function(e,t,n){var a=n(56091),r=n(34160);void 0===r.FormBuilderModal&&(r.FormBuilderModal=a),e.exports=a},17558:function(e,t,n){var a=n(82734),r=n(34160);void 0===r.FormConstants&&(r.FormConstants=a),e.exports=a},82414:function(e,t,n){var a=n(21757),r=n(34160);void 0===r.GridField&&(r.GridField=a),e.exports=a},67694:function(e,t,n){var a=n(97525),r=n(34160);void 0===r.GridFieldCell&&(r.GridFieldCell=a),e.exports=a},19514:function(e,t,n){var a=n(57840),r=n(34160);void 0===r.GridFieldHeader&&(r.GridFieldHeader=a),e.exports=a},39078:function(e,t,n){var a=n(75308),r=n(34160);void 0===r.GridFieldHeaderCell&&(r.GridFieldHeaderCell=a),e.exports=a},36726:function(e,t,n){var a=n(86313),r=n(34160);void 0===r.GridFieldRow&&(r.GridFieldRow=a),e.exports=a},90990:function(e,t,n){var a=n(20777),r=n(34160);void 0===r.GridFieldTable&&(r.GridFieldTable=a),e.exports=a},56086:function(e,t,n){var a=n(85281),r=n(34160);void 0===r.HiddenField&&(r.HiddenField=a),e.exports=a},14992:function(e,t,n){var a=n(14269),r=n(34160);void 0===r.Injector&&(r.Injector=a),e.exports=a},55064:function(e,t,n){var a=n(5549),r=n(34160);void 0===r.InsertLinkModal&&(r.InsertLinkModal=a),e.exports=a},86473:function(e,t,n){var a=n(81637),r=n(34160);void 0===r.ListGroup&&(r.ListGroup=a),e.exports=a},7057:function(e,t,n){var a=n(47546),r=n(34160);void 0===r.ListGroupItem&&(r.ListGroupItem=a),e.exports=a},98461:function(e,t,n){var a=n(29981),r=n(34160);void 0===r.LiteralField&&(r.LiteralField=a),e.exports=a},15550:function(e,t,n){var a=n(86713),r=n(34160);void 0===r.Loading&&(r.Loading=a),e.exports=a},21735:function(e,t,n){var a=n(32185),r=n(34160);void 0===r.Modal&&(r.Modal=a),e.exports=a},99855:function(e,t,n){var a=n(82405),r=n(34160);void 0===r.PopoverField&&(r.PopoverField=a),e.exports=a},56726:function(e,t,n){var a=n(99417),r=n(34160);void 0===r.Preview&&(r.Preview=a),e.exports=a},93476:function(e,t,n){var a=n(3600),r=n(34160);void 0===r.ReactRouteRegister&&(r.ReactRouteRegister=a),e.exports=a},83713:function(e,t,n){var a=n(61481),r=n(34160);void 0===r.RecordsActionTypes&&(r.RecordsActionTypes=a),e.exports=a},64145:function(e,t,n){var a=n(63249),r=n(34160);void 0===r.RecordsActions&&(r.RecordsActions=a),e.exports=a},55180:function(e,t,n){var a=n(96937),r=n(34160);void 0===r.ResizeAware&&(r.ResizeAware=a),e.exports=a},91484:function(e,t,n){var a=n(75564),r=n(34160);void 0===r.Router&&(r.Router=a),e.exports=a},7176:function(e,t,n){var a=n(82513),r=n(34160);void 0===r.SchemaActions&&(r.SchemaActions=a),e.exports=a},59338:function(e,t,n){var a=n(89091),r=n(34160);void 0===r.Search&&(r.Search=a),e.exports=a},54758:function(e,t,n){var a=n(54663),r=n(34160);void 0===r.SearchToggle&&(r.SearchToggle=a),e.exports=a},33929:function(e,t,n){var a=n(50693),r=n(34160);void 0===r.SearchableDropdownField&&(r.SearchableDropdownField=a),e.exports=a},58760:function(e,t,n){var a=n(66373),r=n(34160);void 0===r.ShortcodeSerialiser&&(r.ShortcodeSerialiser=a),e.exports=a},10098:function(e,t,n){var a=n(14274),r=n(34160);void 0===r.SilverStripeComponent&&(r.SilverStripeComponent=a),e.exports=a},20088:function(e,t,n){var a=n(36171),r=n(34160);void 0===r.SudoMode&&(r.SudoMode=a),e.exports=a},56779:function(e,t,n){var a=n(25827),r=n(34160);void 0===r.TabsActions&&(r.TabsActions=a),e.exports=a},73226:function(e,t,n){var a=n(5417),r=n(34160);void 0===r.Tag&&(r.Tag=a),e.exports=a},77986:function(e,t,n){var a=n(28557),r=n(34160);void 0===r.TagList&&(r.TagList=a),e.exports=a},4163:function(e,t,n){var a=n(2481),r=n(34160);void 0===r.TextField&&(r.TextField=a),e.exports=a},97256:function(e,t,n){var a=n(97671),r=n(34160);void 0===r.TinyMCEActionRegistrar&&(r.TinyMCEActionRegistrar=a),e.exports=a},94571:function(e,t,n){var a=n(99197),r=n(34160);void 0===r.Tip&&(r.Tip=a),e.exports=a},1359:function(e,t,n){var a=n(16679),r=n(34160);void 0===r.ToastsActions&&(r.ToastsActions=a),e.exports=a},33105:function(e,t,n){var a=n(32189),r=n(34160);void 0===r.Toolbar&&(r.Toolbar=a),e.exports=a},78769:function(e,t,n){var a=n(90277),r=n(34160);void 0===r.TreeDropdownField&&(r.TreeDropdownField=a),e.exports=a},33993:function(e,t,n){var a=n(69161),r=n(34160);void 0===r.TreeDropdownFieldNode&&(r.TreeDropdownFieldNode=a),e.exports=a},74626:function(e,t,n){var a=n(35505),r=n(34160);void 0===r.UnsavedFormsActions&&(r.UnsavedFormsActions=a),e.exports=a},60246:function(e,t,n){var a=n(87523),r=n(34160);void 0===r.VersionedBadge&&(r.VersionedBadge=a),e.exports=a},80753:function(e,t,n){var a=n(6679),r=n(34160);void 0===r.ViewModeActions&&(r.ViewModeActions=a),e.exports=a},61455:function(e,t,n){var a=n(44072),r=n(34160);void 0===r.ViewModeStates&&(r.ViewModeStates=a),e.exports=a},28076:function(e,t,n){var a=n(36087),r=n(34160);void 0===r.ViewModeToggle&&(r.ViewModeToggle=a),e.exports=a},29574:function(e,t,n){var a=n(66802),r=n(34160);void 0===r.formatWrittenNumber&&(r.formatWrittenNumber=a),e.exports=a},38536:function(e,t,n){var a=n(15042),r=n(34160);void 0===r.getFormState&&(r.getFormState=a),e.exports=a},17174:function(e,t,n){var a=n(51266),r=n(34160);void 0===r.getJsonErrorMessage&&(r.getJsonErrorMessage=a),e.exports=a},83952:function(e,t,n){var a=n(89919),r=n(34160);void 0===r.reduxFieldReducer&&(r.reduxFieldReducer=a),e.exports=a},25506:function(e,t,n){var a=n(60906),r=n(34160);void 0===r.schemaFieldValues&&(r.schemaFieldValues=a),e.exports=a},65484:function(e,t,n){var a=n(13547),r=n(34160);void 0===r.ssUrlLib&&(r.ssUrlLib=a),e.exports=a},9360:function(e,t,n){var a=n(76535),r=n(34160);void 0===r.withDragDropContext&&(r.withDragDropContext=a),e.exports=a},98120:function(e,t,n){var a=n(78848),r=n(34160);void 0===r.withRouter&&(r.withRouter=a),e.exports=a},95815:function(e){"use strict";e.exports=i18n}},function(e){var t;t=33119,e(e.s=t)}]); \ No newline at end of file diff --git a/client/src/containers/InsertLinkModal/InsertLinkModal.js b/client/src/containers/InsertLinkModal/InsertLinkModal.js index 9a4f1285a..518085f24 100644 --- a/client/src/containers/InsertLinkModal/InsertLinkModal.js +++ b/client/src/containers/InsertLinkModal/InsertLinkModal.js @@ -93,7 +93,7 @@ const createInsertLinkModal = (sectionConfigKey, formName) => { // get the schemaUrl to use as a key for overrides const schemaUrl = `${sectionConfig.form[formName].schemaUrl}${requireTextFieldUrl}` - .replace(/:pageid/, ownProps.currentPageID); + .replace(/:pageid/, ownProps.currentPageID || 0); return { sectionConfig, diff --git a/code/FormSchemaController.php b/code/FormSchemaController.php index 4458a28ba..e5e120934 100644 --- a/code/FormSchemaController.php +++ b/code/FormSchemaController.php @@ -67,7 +67,7 @@ public function setFormSchema(FormSchema $schema): static } /** - * Gets a JSON schema representing the current edit form. + * Gets a JSON schema representing a form. */ public function schema(HTTPRequest $request): HTTPResponse { @@ -103,16 +103,6 @@ public function schema(HTTPRequest $request): HTTPResponse return $this->getSchemaResponse($schemaID, $form); } - /** - * Check if the current request has a X-Formschema-Request header set. - * Used by conditional logic that responds to validation results - */ - protected function getSchemaRequested(): bool - { - $parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER); - return !empty($parts); - } - /** * Generate schema for the given form based on the X-Formschema-Request header value * @@ -121,7 +111,7 @@ protected function getSchemaRequested(): bool * @param ValidationResult $errors Required for 'error' response * @param array $extraData Any extra data to be merged with the schema response */ - protected function getSchemaResponse(string $schemaID, ?Form $form = null, ValidationResult $errors = null, array $extraData = []): HTTPResponse + public function getSchemaResponse(string $schemaID, ?Form $form = null, ValidationResult $errors = null, array $extraData = []): HTTPResponse { $parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER); $data = $this @@ -137,6 +127,16 @@ protected function getSchemaResponse(string $schemaID, ?Form $form = null, Valid return $response; } + /** + * Check if the current request has a X-Formschema-Request header set. + * Used by conditional logic that responds to validation results + */ + protected function getSchemaRequested(): bool + { + $parts = $this->getRequest()->getHeader(static::SCHEMA_HEADER); + return !empty($parts); + } + private function prepareTinyMce(): void { // Set the members html editor config diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 0b21d5183..1e6f29b65 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -310,14 +310,9 @@ public function getClientConfig(): array // Add WYSIWYG link form schema before extensions are applied $this->beforeExtending('updateClientConfig', function (array &$clientConfig): void { $modalController = ModalController::singleton(); - $clientConfig['form'] = [ - 'EditorExternalLink' => [ - 'schemaUrl' => $modalController->Link('schema/EditorExternalLink'), - ], - 'EditorEmailLink' => [ - 'schemaUrl' => $modalController->Link('schema/EditorEmailLink'), - ], - ]; + foreach (array_keys(ModalController::config()->get('link_modal_form_factories')) as $name) { + $clientConfig['form'][$name]['schemaUrl'] = $modalController->Link('linkModalFormSchema/' . $name . '/:pageid'); + } }); return parent::getClientConfig(); } diff --git a/code/ModalController.php b/code/ModalController.php index 34e85e3a3..c42632070 100644 --- a/code/ModalController.php +++ b/code/ModalController.php @@ -2,8 +2,13 @@ namespace SilverStripe\Admin; +use LogicException; use SilverStripe\Admin\Forms\EditorEmailLinkFormFactory; use SilverStripe\Admin\Forms\EditorExternalLinkFormFactory; +use SilverStripe\Admin\Forms\LinkFormFactory; +use SilverStripe\Control\HTTPRequest; +use SilverStripe\Control\HTTPResponse; +use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\Form; /** @@ -13,40 +18,77 @@ class ModalController extends FormSchemaController { private static ?string $url_segment = 'modals'; - private static $allowed_actions = [ - 'EditorExternalLink', - 'EditorEmailLink', + private static string $required_permission_codes = 'CMS_ACCESS'; + + private static array $allowed_actions = [ + 'linkModalForm', + 'linkModalFormSchema', ]; - private static string $required_permission_codes = 'CMS_ACCESS'; + private static array $url_handlers = [ + 'linkModalForm/$ModalName/$ItemID' => 'linkModalForm', + 'GET linkModalFormSchema/$ModalName/$ItemID' => 'linkModalFormSchema', + ]; + + /** + * Associative array of modal form names to form factory classes. + * Used primarily to register modal form factories for use in the WYSIWYG link plugin. + * Form factories must subclass LinkFormFactory + */ + private static array $link_modal_form_factories = [ + 'EditorExternalLink' => EditorExternalLinkFormFactory::class, + 'EditorEmailLink' => EditorEmailLinkFormFactory::class, + ]; /** - * Builds and returns the external link form + * Get a link modal form built from a factory. + * Intended to be used in conjunction with linkModalFormSchema() */ - public function EditorExternalLink(): Form + public function linkModalForm(HTTPRequest $request): Form { + $modalName = $request->param('ModalName'); + $itemID = $request->param('ItemID'); + if ($modalName === null || $itemID === null) { + $this->jsonError(400, 'Missing request params'); + } + $modalForms = static::config()->get('link_modal_form_factories'); + if (!array_key_exists($modalName, $modalForms)) { + $this->httpError(400); + } // Show link text field if requested $showLinkText = $this->getRequest()->getVar('requireLinkText'); - $factory = EditorExternalLinkFormFactory::singleton(); - return $factory->getForm( + $class = $modalForms[$modalName]; + if (!is_a($class, LinkFormFactory::class, true)) { + throw new LogicException("Factory for '$modalName' must be a subclass of " . LinkFormFactory::class); + } + + // Build the form + /** @var LinkFormFactory $factory */ + $factory = Injector::inst()->get($class); + $form = $factory->getForm( $this, - __FUNCTION__, - [ 'RequireLinkText' => isset($showLinkText) ] + 'linkModalForm/'.$modalName, + [ + 'RequireLinkText' => isset($showLinkText), + 'ItemID' => $itemID, + ] ); + // Set url handler that handles ItemID param correctly + $form->setRequestHandler( + LeftAndMainFormRequestHandler::create($form, [$itemID]) + ); + return $form; } /** - * Builds and returns the external link form + * Gets a JSON schema representing a link modal form. + * Links to this must include the ID of the current record or 0 + * e.g ModalController::singleton()->Link('linkModalFormSchema/myModalForm/:pageid') */ - public function EditorEmailLink(): Form + public function linkModalFormSchema(HTTPRequest $request): HTTPResponse { - // Show link text field if requested - $showLinkText = $this->getRequest()->getVar('requireLinkText'); - $factory = EditorEmailLinkFormFactory::singleton(); - return $factory->getForm( - $this, - __FUNCTION__, - [ 'RequireLinkText' => isset($showLinkText) ] - ); + $form = $this->linkModalForm($request); + $schemaID = $request->getURL(); + return $this->getSchemaResponse($schemaID, $form); } }