webpackJsonp([3],[function(e,t,n){"use strict" n(2),n(3),n(6),n(16),n(18),n(24),n(26),n(28),n(29),n(31),n(34),n(104),n(112),n(116),n(126),n(127),n(128),n(129),n(130),n(131),n(133),n(136),n(138),n(140),n(143),n(146),n(148),n(150),n(152),n(154),n(156), n(157),n(166),n(167),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(185),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(190),n(196),n(198),n(200),n(201) },,function(e,t){"use strict" function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}) var r=function(){function e(e,t){for(var n=0;n1?n-1:0),i=1;i=200&&e.status<300))throw n=new Error(e.statusText),n.response=e,n return t=e}function s(e){var t=null if(e instanceof FormData||"string"==typeof e)t=e else{if(!e||"object"!==("undefined"==typeof e?"undefined":g(e)))throw new Error("Invalid body type") t=JSON.stringify(e)}return t}function l(e,t){switch(e){case"application/x-www-form-urlencoded":return C.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 u(e,t){switch(e){case"application/x-www-form-urlencoded":return C.default.parse(t) case"application/json":case"application/x-json":case"application/x-javascript":case"text/javascript":case"text/x-javascript":case"text/x-json":return JSON.parse(t) default:throw new Error("Can't decode format: "+e)}}function c(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function d(e){return e.text().then(function(t){return u(e.headers.get("Content-Type"),t) })}function f(e,t){return Object.keys(t).reduce(function(n,r){var i=e[r] return!i||i.remove!==!0&&i.querystring!==!0?m(n,o({},r,t[r])):n},{})}function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{setFromData:!1},i=t,a=Object.keys(n).reduce(function(t,i){ var a=e[i],s=r.setFromData===!0&&!(a&&a.remove===!0),l=a&&a.querystring===!0&&a.remove!==!0 return s||l?m(t,o({},i,n[i])):t},{}),s=l("application/x-www-form-urlencoded",a) return i=c(i,s),i=Object.keys(e).reduce(function(t,r){var i=e[r].urlReplacement return i?t.replace(i,n[r]):t},i)}Object.defineProperty(t,"__esModule",{value:!0}) var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=m({},t,{ Accept:r.responseFormat,"Content-Type":r.payloadFormat}),o=P.default.recursive({},r.defaultData,e),a=p(r.payloadSchema,r.url,o,{setFromData:"get"===r.method.toLowerCase()}),s="get"!==r.method.toLowerCase()?l(r.payloadFormat,f(r.payloadSchema,o)):"",u="get"===r.method.toLowerCase()?[a,i]:[a,s,i] return n[r.method.toLowerCase()].apply(n,u).then(d)}}},{key:"get",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} return this.fetch(t,{method:"get",credentials:"same-origin",headers:n}).then(a)}},{key:"post",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={ "Content-Type":"application/x-www-form-urlencoded"} return this.fetch(t,{method:"post",credentials:"same-origin",body:s(n),headers:m({},i,r)}).then(a)}},{key:"put",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{} return this.fetch(t,{method:"put",credentials:"same-origin",body:s(n),headers:r}).then(a)}},{key:"delete",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{} return this.fetch(t,{method:"delete",credentials:"same-origin",body:s(n),headers:r}).then(a)}}]),e}(),k=new E t.default=k},function(e,t,n){n(9),e.exports=self.fetch.bind(self)},,function(e,t,n){var r;(function(t,i){!function(t,n){e.exports=n()}(this,function(){"use strict" function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function a(e){K=e}function s(e){J=e}function l(){return function(){return t.nextTick(p)}} function u(){return function(){Q(p)}}function c(){var e=0,t=new ee(p),n=document.createTextNode("") return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function d(){var e=new MessageChannel return e.port1.onmessage=p,function(){return e.port2.postMessage(0)}}function f(){var e=setTimeout return function(){return e(p,1)}}function p(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{} if(t&&"undefined"!=typeof t.react)return l.default.createElement(e,n,t.react) if(t&&"undefined"!=typeof t.html){if(null!==t.html){var r={__html:t.html} return l.default.createElement(e,a({},n,{dangerouslySetInnerHTML:r}))}return null}var i=null if(i=t&&"undefined"!=typeof t.text?t.text:t,i&&"object"===("undefined"==typeof i?"undefined":o(i)))throw new Error("Unsupported string value "+JSON.stringify(i)) return null!==i&&"undefined"!=typeof i?l.default.createElement(e,n,i):null}Object.defineProperty(t,"__esModule",{value:!0}) var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e },a=Object.assign||function(e){for(var t=1;t-1})?null:"action_save"===this.props.name||t.find(function(e){return"ss-ui-action-constructive"===e})?"primary":"secondary"}},{key:"getIcon",value:function e(){ return this.props.icon||this.props.data.icon||null}},{key:"getLoadingIcon",value:function e(){return this.props.loading?c.default.createElement("div",{className:"btn__loading-icon"},c.default.createElement("span",{ className:"btn__circle btn__circle--1"}),c.default.createElement("span",{className:"btn__circle btn__circle--2"}),c.default.createElement("span",{className:"btn__circle btn__circle--3"})):null}},{key:"handleClick", value:function e(t){"function"==typeof this.props.handleClick&&this.props.handleClick(t,this.props.name||this.props.id)}}]),t}(f.default) p.propTypes={id:c.default.PropTypes.string,name:c.default.PropTypes.string,handleClick:c.default.PropTypes.func,title:c.default.PropTypes.string,type:c.default.PropTypes.string,loading:c.default.PropTypes.bool, icon:c.default.PropTypes.string,disabled:c.default.PropTypes.bool,data:c.default.PropTypes.oneOfType([c.default.PropTypes.array,c.default.PropTypes.shape({buttonStyle:c.default.PropTypes.string})]),extraClass:c.default.PropTypes.string, attributes:c.default.PropTypes.object},p.defaultProps={title:"",icon:"",extraClass:"",attributes:{},data:{},disabled:!1},t.default=p},function(e,t,n){(function(t){e.exports=t.SchemaActions=n(32)}).call(t,function(){ return this}())},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return{type:u.default.SET_SCHEMA,payload:s({id:e},t)}}function o(e,t){return{type:u.default.SET_SCHEMA_STATE_OVERRIDES,payload:{id:e,stateOverride:t }}}function a(e,t){return{type:u.default.SET_SCHEMA_LOADING,payload:{id:e,loading:t}}}Object.defineProperty(t,"__esModule",{value:!0}) var s=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=[] return n&&i.push("schema"),r&&i.push("state"),this.props.loading?Promise.resolve({}):(this.props.actions.schema.setSchemaLoading(this.props.schemaUrl,!0),this.callFetch(i).then(function(e){if(t.props.actions.schema.setSchemaLoading(t.props.schemaUrl,!1), "undefined"!=typeof e.id){var n=c({},e,{state:t.overrideStateData(e.state)}) return t.props.actions.schema.setSchema(t.props.schemaUrl,n),n}return e}))}},{key:"handleAutofill",value:function e(t,n){this.props.actions.reduxForm.autofill(this.props.schemaUrl,t,n)}},{key:"render", value:function e(){if(!this.props.schema||!this.props.schema.schema||this.props.loading)return null var t=c({},this.props,{form:this.props.schemaUrl,onSubmitSuccess:this.props.onSubmitSuccess,handleSubmit:this.handleSubmit,onAutofill:this.handleAutofill}) return p.default.createElement(S.default,t)}}]),t}(f.Component) j.propTypes=c({},O.basePropTypes,{actions:f.PropTypes.shape({schema:f.PropTypes.object,reduxFrom:f.PropTypes.object}),schemaUrl:f.PropTypes.string.isRequired,schema:O.schemaPropType,form:f.PropTypes.string, submitting:f.PropTypes.bool}),j.defaultProps={baseFormComponent:(0,_.reduxForm)()(k.default),baseFieldComponent:_.Field},t.default=(0,h.connect)(l,u)(j)},,,function(e,t){e.exports=DeepFreezeStrict},function(e,t){ e.exports=ReduxForm},function(e,t){e.exports=SchemaActions},function(e,t){e.exports=FormBuilder},function(e,t,n){(function(t){e.exports=t.FormBuilderModal=n(113)}).call(t,function(){return this}())},function(e,t,n){ "use strict" function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t) e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{ value:!0}) var s=function(){function e(e,t){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:{},a={recordType:e,id:t},s=n.toLowerCase(),l="get"===s?[i(r,a),o]:[i(r,a),{},o] return function(n){return n({type:u.default.DELETE_RECORD_REQUEST,payload:a}),d.default[s].apply(d.default,l).then(function(){n({type:u.default.DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})}).catch(function(r){ throw n({type:u.default.DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}}),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetchRecords=o,t.fetchRecord=a,t.deleteRecord=s var l=n(125),u=r(l),c=n(7),d=r(c)},function(e,t){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default={CREATE_RECORD:"CREATE_RECORD",UPDATE_RECORD:"UPDATE_RECORD",DELETE_RECORD:"DELETE_RECORD",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"}},function(e,t,n){(function(t){e.exports=t.GridFieldCell=n(122)}).call(t,function(){return this}())},function(e,t,n){ (function(t){e.exports=t.GridFieldHeader=n(119)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.GridFieldHeaderCell=n(121)}).call(t,function(){return this}())},function(e,t,n){ (function(t){e.exports=t.GridFieldRow=n(120)}).call(t,function(){return this}())},function(e,t,n){(function(t){e.exports=t.GridFieldTable=n(118)}).call(t,function(){return this}())},function(e,t,n){(function(t){ e.exports=t.HiddenField=n(132)}).call(t,function(){return this}())},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t) e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{ value:!0}) var s=function(){function e(e,t){for(var n=0;n1}},{key:"handleChange",value:function e(t){"function"==typeof this.props.onChange&&this.props.onChange(t,{ id:this.props.id,value:t.target.value})}}]),t}(f.default) g.propTypes={extraClass:c.default.PropTypes.string,id:c.default.PropTypes.string,name:c.default.PropTypes.string.isRequired,onChange:c.default.PropTypes.func,value:c.default.PropTypes.oneOfType([c.default.PropTypes.string,c.default.PropTypes.number]), readOnly:c.default.PropTypes.bool,disabled:c.default.PropTypes.bool,placeholder:c.default.PropTypes.string,type:c.default.PropTypes.string},g.defaultProps={value:"",extraClass:"",className:"",type:"text" },t.TextField=g,t.default=(0,h.default)(g)},function(e,t){e.exports=FieldHolder},function(e,t,n){(function(t){e.exports=t.LiteralField=n(137)}).call(t,function(){return this}())},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t) e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{ value:!0}) var s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],i=this.findChildRoute(n),o=r({},{childRoutes:[]},t),a=o.childRoutes[o.childRoutes.length-1] a&&"**"===a.path||(a={path:"**"},o.childRoutes.push(a)) var s=i.findIndex(function(e){return e.path===t.path}) s>=0?i[s]=o:i.unshift(o)}},{key:"findChildRoute",value:function e(t){var n=this.childRoutes return t&&t.forEach(function(e){var t=n.find(function(t){return t.path===e}) if(!t)throw new Error("Parent path "+e+" could not be found.") n=t.childRoutes}),n}},{key:"getRootRoute",value:function e(){return this.rootRoute}},{key:"getChildRoutes",value:function e(){return this.childRoutes}},{key:"remove",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.findChildRoute(n),i=r.findIndex(function(e){ return e.path===t}) return i<0?null:r.splice(i,1)[0]}}]),e}() window.ss=window.ss||{},window.ss.routeRegister=window.ss.routeRegister||new o,t.default=window.ss.routeRegister},function(e,t,n){(function(t){e.exports=t.Injector=n(103)}).call(t,function(){return this }())},function(e,t,n){(function(t){e.exports=t.Router=n(158)}).call(t,function(){return this}())},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=c.default.getAbsoluteBase(),n=f.default.resolve(t,e) return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function o(e){return function(t,n,r,i){return e(c.default.resolveURLToBase(t),n,r,i)}}function a(e){var t=new c.default.Route(e) return t.match(c.default.current,{})}function s(){return c.default.absoluteBaseURL}function l(e){c.default.absoluteBaseURL=e var t=document.createElement("a") t.href=e var n=t.pathname n=n.replace(/\/$/,""),n.match(/^[^\/]/)&&(n="/"+n),c.default.base(n)}Object.defineProperty(t,"__esModule",{value:!0}) var u=n(159),c=r(u),d=n(160),f=r(d) c.default.oldshow||(c.default.oldshow=c.default.show),c.default.setAbsoluteBase=l.bind(c.default),c.default.getAbsoluteBase=s.bind(c.default),c.default.resolveURLToBase=i.bind(c.default),c.default.show=o(c.default.oldshow), c.default.routeAppliesToCurrentLocation=a,window.ss=window.ss||{},window.ss.router=window.ss.router||c.default,t.default=window.ss.router},function(e,t){e.exports=Page},function(e,t,n){"use strict" function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null }function i(e,t,n){if(e&&u.isObject(e)&&e instanceof r)return e var i=new r return i.parse(e,t,n),i}function o(e){return u.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t }var l=n(161),u=n(162) t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r var c=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,p=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(p),m=["'"].concat(h),g=["%","/","?",";","#"].concat(m),y=["/","?","#"],v=255,b=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={ javascript:!0,"javascript:":!0},C={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=n(163) r.prototype.parse=function(e,t,n){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e) var r=e.indexOf("?"),i=r!==-1&&r127?"x":D[F] if(!M.match(b)){var L=I.slice(0,O),U=I.slice(O+1),B=D.match(_) B&&(L.push(B[1]),U.unshift(B[2])),U.length&&(s="/"+U.join(".")+s),this.hostname=L.join(".") break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname)) var H=this.port?":"+this.port:"",$=this.hostname||"" this.host=$+H,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[h])for(var O=0,A=m.length;O0)&&n.host.split("@") E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=e.search,n.query=e.query,u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(), n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n for(var k=w.slice(-1)[0],O=(n.host||e.host||w.length>1)&&("."===k||".."===k)||""===k,S=0,j=w.length;j>=0;j--)k=w[j],"."===k?w.splice(j,1):".."===k?(w.splice(j,1),S++):S&&(w.splice(j,1),S--) if(!b&&!_)for(;S--;S)w.unshift("..") !b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),O&&"/"!==w.join("/").substr(-1)&&w.push("") var x=""===w[0]||w[0]&&"/"===w[0].charAt(0) if(P){n.hostname=n.host=x?"":w.length?w.shift():"" var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@") E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return b=b||n.host&&w.length,b&&!x&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")), n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=d.exec(e) t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(o){function a(e){throw RangeError(D[e])}function s(e,t){ for(var n=e.length,r=[];n--;)r[n]=t(e[n]) return r}function l(e,t){var n=e.split("@"),r="" n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(A,".") var i=e.split("."),o=s(i,t).join(".") return r+o}function u(e){for(var t=[],n=0,r=e.length,i,o;n=55296&&i<=56319&&n65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function d(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:T}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,n){ var r=0 for(e=n?F(e/O):e>>1,e+=F(e/t);e>M*E>>1;r+=T)e=F(e/M) return F(r+(M+1)*e/(e+k))}function h(e){var t=[],n=e.length,r,i=0,o=j,s=S,l,u,f,h,m,g,y,v,b for(l=e.lastIndexOf(x),l<0&&(l=0),u=0;u=128&&a("not-basic"),t.push(e.charCodeAt(u)) for(f=l>0?l+1:0;f=n&&a("invalid-input"),y=d(e.charCodeAt(f++)),(y>=T||y>F((C-i)/m))&&a("overflow"),i+=y*m,v=g<=s?P:g>=s+E?E:g-s,!(yF(C/b)&&a("overflow"),m*=b r=t.length+1,s=p(i-h,r,0==h),F(i/r)>C-o&&a("overflow"),o+=F(i/r),i%=r,t.splice(i++,0,o)}return c(t)}function m(e){var t,n,r,i,o,s,l,c,d,h,m,g=[],y,v,b,_ for(e=u(e),y=e.length,t=j,n=0,o=S,s=0;s=t&&mF((C-n)/v)&&a("overflow"),n+=(l-t)*v,t=l,s=0;sC&&a("overflow"),m==t){for(c=n,d=T;h=d<=o?P:d>=o+E?E:d-o,!(c= 0x80 (not a basic code point)", "invalid-input":"Invalid input"},M=T-P,F=Math.floor,N=String.fromCharCode,L w={version:"1.3.2",ucs2:{decode:u,encode:c},decode:h,encode:m,toASCII:y,toUnicode:g},r=function(){return w}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(15)(e),function(){return this}()) },function(e,t){"use strict" e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){ "use strict" t.decode=t.parse=n(164),t.encode=t.stringify=n(165)},function(e,t){"use strict" function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=" var o={} if("string"!=typeof e||0===e.length)return o var a=/\+/g e=e.split(t) var s=1e3 i&&"number"==typeof i.maxKeys&&(s=i.maxKeys) var l=e.length s>0&&l>s&&(l=s) for(var u=0;u=0?(f=c.substr(0,d),p=c.substr(d+1)):(f=c,p=""),h=decodeURIComponent(f),m=decodeURIComponent(p),n(o,h)?Array.isArray(o[h])?o[h].push(m):o[h]=[o[h],m]:o[h]=m}return o}},function(e,t){"use strict" var n=function(e){switch(typeof e){case"string":return e case"boolean":return e?"true":"false" case"number":return isFinite(e)?e:"" default:return""}} e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){ "use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i),a=(0,o.default)(window),s=(0,o.default)("html"),l=(0,o.default)("head"),u={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/, parseUrl:function e(t){if("object"===o.default.type(t))return t var n=u.urlParseRE.exec(t||"")||[] return{href:n[0]||"",hrefNoHash:n[1]||"",hrefNoSearch:n[2]||"",domain:n[3]||"",protocol:n[4]||"",doubleSlash:n[5]||"",authority:n[6]||"",username:n[8]||"",password:n[9]||"",host:n[10]||"",hostname:n[11]||"", port:n[12]||"",pathname:n[13]||"",directory:n[14]||"",filename:n[15]||"",search:n[16]||"",hash:n[17]||""}},makePathAbsolute:function e(t,n){if(t&&"/"===t.charAt(0))return t t=t||"",n=n?n.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"" for(var r=n?n.split("/"):[],i=t.split("/"),o=0;o') n.bind("load",function(e){"about:blank"!=(0,i.default)(this).attr("src")&&(n.addClass("loaded").show(),t._resizeIframe(),t.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass), this.element.append(n),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function e(){i.default.ui.dialog.prototype.open.call(this) var t=this,n=this.element.children("iframe") !this.options.iframeUrl||n.hasClass("loaded")&&!this.options.reloadOnOpen||(n.hide(),n.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,i.default)(window).bind("resize.ssdialog",function(){ t._resizeIframe()})},close:function e(){i.default.ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,i.default)(window).unbind("resize.ssdialog")},_resizeIframe:function t(){ var n={},r,o,a=this.element.children("iframe") this.options.widthRatio&&(r=(0,i.default)(window).width()*this.options.widthRatio,this.options.minWidth&&rthis.options.maxWidth?n.width=this.options.maxWidth:n.width=r), this.options.heightRatio&&(o=(0,i.default)(window).height()*this.options.heightRatio,this.options.minHeight&&othis.options.maxHeight?n.height=this.options.maxHeight:n.height=o), e.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))}}),i.default.widget("ssui.titlebar",{_create:function e(){this.originalTitle=this.element.attr("title") var t=this,n=this.options,r=n.title||this.originalTitle||" ",o=i.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(n.closeButton)var s=(0,i.default)('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){s.addClass("ui-state-hover")},function(){s.removeClass("ui-state-hover") }).focus(function(){s.addClass("ui-state-focus")}).blur(function(){s.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(a),l=(this.uiDialogTitlebarCloseText=(0,i.default)("")).addClass("ui-icon ui-icon-closethick").text(n.closeText).appendTo(s) var u=(0,i.default)("").addClass("ui-dialog-title").attr("id",o).html(r).prependTo(a) a.find("*").add(a).disableSelection()},destroy:function e(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle) }}),i.default.extend(i.default.ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function e(t){return"ui-dialog-title-"+(t.attr("id")||++this.uuid)}}) }).call(t,n(168))},,,function(module,exports,__webpack_require__){(function(jQuery){"use strict" function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e },_jQuery=__webpack_require__(1),_jQuery2=_interopRequireDefault(_jQuery) __webpack_require__(167) var windowWidth,windowHeight _jQuery2.default.noConflict(),window.ss=window.ss||{},window.ss.debounce=function(e,t,n){var r,i,o,a=function t(){r=null,n||e.apply(i,o)} return function(){var s=n&&!r i=this,o=arguments,clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}},(0,_jQuery2.default)(window).bind("resize.leftandmain",function(e){(0,_jQuery2.default)(".cms-container").trigger("windowresize")}), _jQuery2.default.entwine.warningLevel=_jQuery2.default.entwine.WARN_LEVEL_BESTPRACTISE,_jQuery2.default.entwine("ss",function($){$(window).on("message",function(e){var t,n=e.originalEvent,r="object"===_typeof(n.data)?n.data:JSON.parse(n.data) if($.path.parseUrl(window.location.href).domain===$.path.parseUrl(n.origin).domain)switch(t=$("undefined"==typeof r.target?window:r.target),r.type){case"event":t.trigger(r.event,r.data) break case"callback":t[r.callback].call(t,r.data)}}) var positionLoadingSpinner=function e(){var t=120,n=$(".ss-loading-screen .loading-animation"),r=($(window).height()-n.height())/2 n.css("top",r+t),n.show()},applyChosen=function e(t){t.is(":visible")?t.addClass("has-chosen").chosen({allow_single_deselect:!0,disable_search_threshold:20,display_disabled_options:!0,width:"100%"}):setTimeout(function(){ t.show(),e(t)},500)},isSameUrl=function e(t,n){var r=$("base").attr("href") t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,r),n=$.path.isAbsoluteUrl(n)?n:$.path.makeUrlAbsolute(n,r) var i=$.path.parseUrl(t),o=$.path.parseUrl(n) return i.pathname.replace(/\/*$/,"")==o.pathname.replace(/\/*$/,"")&&i.search==o.search},ajaxCompleteEvent=window.ss.debounce(function(){$(window).trigger("ajaxComplete")},1e3,!0) $(window).bind("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete(function(e,t,n){var r=document.URL,i=t.getResponseHeader("X-ControllerURL"),o=n.url,a=null!==t.getResponseHeader("X-Status")?t.getResponseHeader("X-Status"):t.statusText,s=t.status<200||t.status>399?"bad":"good",l=["OK","success","HTTP/2.0 200"] return null===i||isSameUrl(r,i)&&isSameUrl(o,i)||window.ss.router.show(i,{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")?void $(".cms-container").showLoginDialog():(0!==t.status&&a&&$.inArray(a,l)===-1&&statusMessage(decodeURIComponent(a),s),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({ StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function e(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('

Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.

').css("z-index",$(".ss-loading-screen").css("z-index")+1), $(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(), void this._super())},onwindowresize:function e(){this.redraw()},"from .cms-panel":{ontoggle:function e(){this.redraw()}},"from .cms-container":{onaftersubmitform:function e(){this.redraw()}},updateLayoutOptions:function e(t){ var n=this.getLayoutOptions(),r=!1 for(var i in t)n[i]!==t[i]&&(n[i]=t[i],r=!0) r&&this.redraw()},clearViewMode:function e(){this.removeClass("cms-container--split-mode"),this.removeClass("cms-container--preview-mode"),this.removeClass("cms-container--content-mode")},splitViewMode:function e(){ this.updateLayoutOptions({mode:"split"})},contentViewMode:function e(){this.updateLayoutOptions({mode:"content"})},previewMode:function e(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1, redraw:function e(){if(!this.getRedrawSuppression()){window.debug&&console.log("redraw",this.attr("class"),this.get(0)) var t=this.setProperMode() t||(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 e(){var t=this.getLayoutOptions(),n=t.mode this.clearViewMode() var r=this.find(".cms-content"),i=this.find(".cms-preview") if(r.css({"min-width":0}),i.css({"min-width":0}),r.width()+i.width()>=t.minContentWidth+t.minPreviewWidth)r.css({"min-width":t.minContentWidth}),i.css({"min-width":t.minPreviewWidth}),i.trigger("enable") else if(i.trigger("disable"),"split"==n)return i.trigger("forcecontent"),!0 return this.addClass("cms-container--"+n+"-mode"),!1},checkCanNavigate:function e(t){var n=this._findFragments(t||["Content"]),r=n.find(":data(changetracker)").add(n.filter(":data(changetracker)")),i=!0 return!r.length||(r.each(function(){$(this).confirmUnsavedChanges()||(i=!1)}),i)},loadPanel:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document.URL this.checkCanNavigate(r.pjax?r.pjax.split(","):["Content"])&&(this.saveTabState(),r.__forceReferer=o,i&&(r.__forceReload=1+Math.random()),window.ss.router.show(t,r))},reloadCurrentPanel:function e(){this.loadPanel(document.URL,null,null,!0) },submitForm:function e(t,n,r,i){var o=this n||(n=this.find(".btn-toolbar :submit[name=action_save]")),n||(n=this.find(".btn-toolbar :submit:first")),t.trigger("beforesubmitform"),this.trigger("submitform",{form:t,button:n}),$(n).addClass("btn--loading loading"), $(n).is("button")&&($(n).data("original-text",$(n).text()),$(n).text(""),$(n).append($('
')), $(n).css($(n).outerWidth()+"px")) var a=t.validate(),s=function e(){$(n).removeClass("btn--loading loading"),$(n).find(".btn__loading-icon").remove(),$(n).css("width","auto"),$(n).text($(n).data("original-text"))} "undefined"==typeof a||a||(statusMessage("Validation failed.","bad"),s()) var l=t.serializeArray() return l.push({name:$(n).attr("name"),value:"1"}),l.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs" },url:t.attr("action"),data:l,type:"POST",complete:function e(){s()},success:function e(n,i,a){s(),t.removeClass("changed"),r&&r(n,i,a) var u=o.handleAjaxResponse(n,i,a) u&&u.filter("form").trigger("aftersubmitform",{status:i,xhr:a,formData:l})}},i)),!1},LastState:null,PauseState:!1,handleStateChange:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.history.state if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort() var r=this,i=n.pjax||"Content",o={},a=i.split(","),s=this._findFragments(a) if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){var l=this.getLastState() return this.setPauseState(!0),l&&l.path?window.ss.router.show(l.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(n),s.length=0})),r.removeClass(a.join(" ")).addClass(l.join(" ")),i&&r.attr("style",i) var u=r.find("style").detach() u.length&&$(document).find("head").append(u),n.replaceWith(r)}) var g=m.filter("form") g.hasClass("cms-tabset")&&g.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(i&&"undefined"!=typeof i.tabState?i.tabState:null), m}},_findFragments:function e(t){return $("[data-pjax-fragment]").filter(function(){var e,n=$(this).data("pjaxFragment").split(" ") for(e in t)if($.inArray(t[e],n)!=-1)return!0 return!1})},refresh:function e(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function e(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var t=[],n=this._tabStateUrl() if(this.find(".cms-tabset,.ss-tabset").each(function(e,n){var r=$(n).attr("id") r&&$(n).data("tabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||t.push({id:r,selected:$(n).tabs("option","selected")}))}),t){var r="tabs-"+n try{window.sessionStorage.setItem(r,JSON.stringify(t))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return throw e}}}},restoreTabState:function e(t){var n=this,r=this._tabStateUrl(),i="undefined"!=typeof window.sessionStorage&&window.sessionStorage,o=i?window.sessionStorage.getItem("tabs-"+r):null,a=!!o&&JSON.parse(o) this.find(".cms-tabset, .ss-tabset").each(function(){var e,r,i=$(this),o=i.attr("id"),s=i.children("ul").children("li.ss-tabs-force-active") i.data("tabs")&&(i.tabs("refresh"),s.length?e=s.first().index():t&&t[o]?(r=i.find(t[o].tabSelector),r.length&&(e=r.index())):a&&$.each(a,function(t,n){o==n.id&&(e=n.selected)}),null!==e&&(i.tabs("option","active",e), n.trigger("tabstaterestored")))})},clearTabState:function e(t){if("undefined"!=typeof window.sessionStorage){var n=window.sessionStorage if(t)n.removeItem("tabs-"+t) else for(var r=0;r'),n.attr("id",(new Date).getTime()),n.data("url",r),$("body").append(n) }}),$(".leftandmain-logindialog").entwine({onmatch:function e(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500, minHeight:370,maxHeight:400,closeOnEscape:!1,open:function e(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function e(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay") }})},onunmatch:function e(){this._super()},open:function e(){this.ssdialog("open")},close:function e(){this.ssdialog("close")},toggle:function e(t){this.is(":visible")?this.close():this.open()},reauthenticate:function e(t){ "undefined"!=typeof t.SecurityID&&$(":input[name=SecurityID]").val(t.SecurityID),"undefined"!=typeof t.TempID&&$("body").data("member-tempid",t.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({ onmatch:function e(){this.append('
'),this._super()},onunmatch:function e(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(), this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function e(t){if($(this).hasClass("external-link"))return void t.stopPropagation() var n=this.attr("href"),r=n&&!n.match(/^#/)?n:this.data("href"),i={pjax:this.data("pjaxTarget")} $(".cms-container").loadPanel(r,null,i),t.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons") var loading=$(this).find(".ss-ui-loading-icon") loading.length<1&&(loading=$("").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show() var href=this.attr("href"),url=href?href:this.data("href") jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only") },dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function e(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function e(){this._super()},onclick:function e(){ this._super() var t=this,n="ss-ui-dialog-"+this.getUUID(),r=$("#"+n) r.length||(r=$('
'),$("body").append(r)) var i=this.data("popupclass")?this.data("popupclass"):"" return r.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:i}),!1}}),$(".cms .field.date input.text").entwine({onmatch:function e(){var t=$(this).parents(".field.date:first"),n=t.data() return n.showcalendar?(n.showOn="button",n.locale&&$.datepicker.regional[n.locale]&&(n=$.extend(n,$.datepicker.regional[n.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(n), void this._super()):void this._super()},onunmatch:function e(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function e(){ return this.is(".no-chosen")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this), void this._super())},onunmatch:function e(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function e(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .grid-field").entwine({ showDetailView:function e(t){var n=window.location.search.replace(/^\?/,"") n&&(t=$.path.addSearchParams(t,n)),$(".cms-container").loadPanel(t)}}),$(".cms-search-form").entwine({onsubmit:function e(t){var n,r n=this.find(":input:not(:submit)").filter(function(){var e=$.grep($(this).fieldValue(),function(e){return e}) return e.length}),r=this.attr("action"),n.length&&(r=$.path.addSearchParams(r,n.serialize().replace("+","%20"))) var i=this.closest(".cms-container") return i.find(".cms-edit-form").tabs("select",0),i.loadPanel(r,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function e(t){t.preventDefault() var n=$(this).parents("form") n.clearForm(),n.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),n.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function e(){this._super(), this.redraw()},onremove:function e(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function e(){ window.debug&&console.log("redraw",this.attr("class"),this.get(0)) var t=this,n=this.data("url") if(!n)throw'Elements of class .cms-panel-deferred need a "data-url" attribute' this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[n]?(this.addClass("loading"),$.ajax({url:n,complete:function e(){t.removeClass("loading") },success:function e(n,r,i){t.html(n)}})):this.html(window._panelDeferredCache[n]))}}),$(".cms-tabset").entwine({onadd:function e(){this.redrawTabs(),this._super()},onremove:function e(){this.data("tabs")&&this.tabs("destroy"), this._super()},redrawTabs:function e(){this.rewriteHashlinks() var t=this.attr("id"),n=this.find("ul:first .ui-tabs-active") this.data("tabs")||this.tabs({active:n.index()!=-1?n.index():0,beforeLoad:function e(t,n){return!1},beforeActivate:function e(t,n){var r=n.oldTab.find(".cms-panel-link") if(r&&1===r.length)return!1},activate:function e(t,n){var r=$(this).closest("form").find(".btn-toolbar") $(n.newTab).closest("li").hasClass("readonly")?r.fadeOut():r.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function e(){$(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 e(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function e(){ this._super()},showHide:function e(){var t=this,n=$(".cms-content-filters").first(),r=this.data("collapsed") r?(this.addClass("active"),n.css("display","block")):(this.removeClass("active"),n.css("display","")),t.data("collapsed",!r)},onclick:function e(){this.showHide()}})}) var statusMessage=function e(t,n){t=jQuery("
").text(t).html(),jQuery.noticeAdd({text:t,type:n,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(exports,__webpack_require__(168))},function(e,t,n){ "use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function e(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function t(){var n=e(".cms-container").find("iframe") n.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,n){this.riseUp(t,n)},onclick:function e(t,n){this.attachCloseHandler(t,n)},attachCloseHandler:function t(n,r){var i=this,o=e(".cms-container").find("iframe"),a a=function t(n){var r,o r=e(n.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(n.target).closest(i).length||r.length||(i.tabs("option","active",!1),o=e(".cms-container").find("iframe"),o.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),o.length>0&&o.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",a)})},riseUp:function t(n,r){ var i,o,a,s,l,u,c,d,f return i=e(this).find(".ui-tabs-panel").outerHeight(),o=e(this).find(".ui-tabs-nav").outerHeight(),a=e(window).height()+e(document).scrollTop()-o,s=e(this).find(".ui-tabs-nav").offset().top,l=r.newPanel, u=r.newTab,s+i>=a&&s-i>0?(this.addClass("rise-up"),null!==u.position()&&(c=-l.outerHeight(),d=l.parents(".toolbar--south"),d&&(f=u.offset().top-d.offset().top,c-=f),e(l).css("top",c+"px"))):(this.removeClass("rise-up"), null!==u.position()&&e(l).css("bottom","100%")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function t(n,r){this._super(n,r),e(r.newPanel).length>0&&e(r.newPanel).css("left",r.newTab.position().left+"px") }}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function t(n,r){this._super(n,r),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,r){this._super(n,r),e(r.newPanel).length>0&&(e(r.newTab).hasClass("last")?(e(r.newPanel).css({left:"auto", right:"0px"}),e(r.newPanel).parent().addClass("tabset-open-last")):(e(r.newPanel).css("left",r.newTab.position().left+"px"),e(r.newTab).hasClass("first")&&(e(r.newPanel).css("left","0px"),e(r.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(n){e(n.target).parent().find("li .active").removeClass("active"),e(n.target).find("a").addClass("active") }},ontabsbeforeactivate:function t(n,r){this._super(n,r),e(r.newPanel).css({left:"auto",right:"auto"}),e(r.newPanel).length>0&&e(r.newPanel).parent().addClass("tabset-open")}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function t(){return void 0!==e.cookie&&void 0!==this.attr("id") },getPersistedCollapsedState:function t(){var n,r return this.canSetCookie()&&(r=e.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==r&&null!==r&&(n="true"===r)),n},setPersistedCollapsedState:function t(n){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),n,{ path:"/",expires:31})},clearPersistedCollapsedState:function t(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function e(){var t=this.getPersistedCollapsedState() return void 0===t&&(t=this.hasClass("collapsed")),t},onadd:function t(){var n,r if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found') this.find(".cms-panel-toggle").length||(r=e("
").append('
»').append('«'), this.append(r)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),n=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(n.length?n.innerWidth():this.find(".toggle-expand").innerWidth()), this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function e(t,n,r){var i,o n||(this.trigger("beforetoggle.sspanel",t),this.trigger(t?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!t),i=t?this.getWidthExpanded():this.getWidthCollapsed(),this.width(i),o=this.find(".cms-panel-content-collapsed"), o.length&&(this.find(".cms-panel-content")[t?"show":"hide"](),this.find(".cms-panel-content-collapsed")[t?"hide":"show"]()),r!==!1&&this.setPersistedCollapsedState(!t),this.trigger("toggle",t),this.trigger(t?"expand":"collapse") },expandPanel:function e(t){(t||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function e(t){!t&&this.hasClass("collapsed")||this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({ onclick:function e(t){this.expandPanel(),t.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function e(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function e(t){ t.preventDefault(),t.stopPropagation(),this.getPanel().expandPanel(),this._super(t)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function e(t){t.preventDefault(),t.stopPropagation(),this.getPanel().collapsePanel(), this._super(t)}}),e(".cms-content-tools.collapsed").entwine({onclick:function e(t){this.expandPanel(),this._super(t)}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function t(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var n=this.attr("data-hints") n&&this.setHints(e.parseJSON(n)) var r=this this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,n){r.setIsLoaded(!0),n.inst._set_settings({html_data:{ajax:{url:r.data("urlTree"),data:function t(n){var i=r.data("searchparams")||[] return i=e.grep(i,function(e,t){return"ID"!=e.name&&"value"!=e.name}),i.push({name:"ID",value:e(n).data("id")?e(n).data("id"):0}),i.push({name:"ajax",value:1}),i}}}}),r.updateFromEditForm(),r.css("visibility","visible"), n.inst.hide_checkboxes()}).bind("before.jstree",function(t,n){if("start_drag"==n.func&&(!r.hasClass("draggable")||r.hasClass("multiselect")))return t.stopImmediatePropagation(),!1 if(e.inArray(n.func,["check_node","uncheck_node"])){var i=e(n.args[0]).parents("li:first"),o=i.find("li:not(.disabled)") if(i.hasClass("disabled")&&0==o)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(t,n){if(!r.getIsUpdatingTree()){var i=n.rslt.o,o=n.rslt.np,a=n.inst._get_parent(i),s=e(o).data("id")||0,l=e(i).data("id"),u=e.map(e(i).siblings().andSelf(),function(t){ return e(t).data("id")}) e.ajax({url:e.path.addSearchParams(r.data("urlSavetreenode"),r.data("extraParams")),type:"POST",data:{ID:l,ParentID:s,SiblingIDs:u},success:function t(){e(".cms-edit-form :input[name=ID]").val()==l&&e(".cms-edit-form :input[name=ParentID]").val(s), r.updateNodesFromServer([l])},statusCode:{403:function t(){e.jstree.rollback(n.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n) })}},onremove:function e(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function e(t){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function t(n){ var r=e(".cms-edit-form :input[name=ID]").val() this.updateNodesFromServer([r])}},getTreeConfig:function t(){var n=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 t(r){var i=e(r.o),o=e(r.np),a=r.ot.get_container()[0]==r.np[0],s=i.getClassname(),l=o.getClassname(),u=n.getHints(),c=[],d=l?l:"Root",f=u&&"undefined"!=typeof u[d]?u[d]:null f&&i.attr("class").match(/VirtualPage-([^\s]*)/)&&(s=RegExp.$1),f&&(c="undefined"!=typeof f.disallowedChildren?f.disallowedChildren:[]) var p=!(0===i.data("id")||i.hasClass("status-archived")||a&&"inside"!=r.p||o.hasClass("nochildren")||c.length&&e.inArray(s,c)!=-1) return p}}},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,n){t?this.data("searchparams",t):this.removeData("searchparams"),this.jstree("refresh",-1,n)},getNodeByID:function e(t){return this.find("*[data-id="+t+"]")},createNode:function t(n,r,i){ var o=this,a=void 0!==r.ParentID&&o.getNodeByID(r.ParentID),s=e(n),l={data:""} s.hasClass("jstree-open")?l.state="open":s.hasClass("jstree-closed")&&(l.state="closed"),this.jstree("create_node",a.length?a:-1,"last",l,function(e){for(var t=e.attr("class"),n=0;n0)return!0 var t=confirm(a.default._t("LeftAndMain.CONFIRMUNSAVED")) return t&&this.addClass("discardchanges"),t},onsubmit:function e(t,n){if("_blank"!=this.prop("target"))return n&&this.closest(".cms-container").submitForm(this,n),!1},validate:function e(){var t=!0 return this.trigger("validate",{isValid:t}),t},"from .htmleditor":{oneditorinit:function t(n){var r=this,i=e(n.target).closest(".field.htmleditor"),o=i.find("textarea.htmleditor").getEditor().getInstance() o.onClick.add(function(e){r.saveFieldFocus(i.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function t(n){this.saveFieldFocus(e(n.target).attr("id"))},onfocus:function t(n){this.saveFieldFocus(e(n.target).attr("id")) }},"from .cms-edit-form .treedropdown *":{onfocusin:function t(n){var r=e(n.target).closest(".field.treedropdown") this.saveFieldFocus(r.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function t(n){var r=e(n.target).closest(".field.dropdown") this.saveFieldFocus(r.attr("id"))}},"from .cms-container":{ontabstaterestored:function e(t){this.restoreFieldFocus()}},saveFieldFocus:function t(n){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){ var r=e(this).attr("id"),i=[] if(i.push({id:r,selected:n}),i)try{window.sessionStorage.setItem(r,JSON.stringify(i))}catch(e){if(e.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return throw e}}},restoreFieldFocus:function t(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var n=this,r="undefined"!=typeof window.sessionStorage&&window.sessionStorage,i=r?window.sessionStorage.getItem(this.attr("id")):null,o=!!i&&JSON.parse(i),a,s=0!==this.find(".ss-tabset").length,l,u,c,d if(r&&o.length>0){if(e.each(o,function(t,r){n.is("#"+r.id)&&(a=e("#"+r.selected))}),e(a).length<1)return void this.focusFirstInput() if(l=e(a).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),u="tab-"+e(a).closest(".ss-tabset .ui-tabs-panel").attr("id"),s&&u!==l)return c=e(a).closest(".togglecomposite"),c.length>0&&c.accordion("activate",c.find(".ui-accordion-header")),d=e(a).position().top,e(a).is(":visible")||(a="#"+e(a).closest(".field").attr("id"),d=e(a).position().top), e(a).focus(),d>e(window).height()/2&&n.find(".cms-content-fields").scrollTop(d)}else this.focusFirstInput()}},focusFirstInput:function e(){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(t){return this.is(":disabled")?(t.preventDefault(),!1):this._super(t)===!1||t.defaultPrevented||t.isDefaultPrevented()?void 0:(this.parents("form").trigger("submit",[this]), t.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(t){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]), t.preventDefault()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function e(){if(!this.hasClass("ss-ui-action-tabset")){var t=this.find("> ul:first") 1==t.children("li").length&&t.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function e(){this._super()}})}) var s=function t(n){e.noticeAdd({text:n,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}}).call(t,n(168))},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function t(n,r,i){e(".cms-menu-list").children("li").each(function(){n?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"), e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"), e(this).data("collapse",!0)})}),this.toggleFlyoutState(n),this._super(n,r,i)},toggleFlyoutState:function t(n){if(n)e(".collapsed").find("li").show(),e(".cms-menu-list").find(".child-flyout-indicator").hide() else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()}) var r=e(".cms-menu-list ul.collapsed-flyout").parent() 0===r.children(".child-flyout-indicator").length&&r.append('').fadeIn(),r.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function t(){return e("#cms-content-tools-CMSMain").length>0 },getPersistedStickyState:function t(){var n,r return void 0!==e.cookie&&(r=e.cookie("cms-menu-sticky"),void 0!==r&&null!==r&&(n="true"===r)),n},setPersistedStickyState:function t(n){void 0!==e.cookie&&e.cookie("cms-menu-sticky",n,{path:"/",expires:31 })},getEvaluatedCollapsedState:function t(){var n,r=this.getPersistedCollapsedState(),i=e(".cms-menu").getPersistedStickyState(),o=this.siteTreePresent() return n=void 0===r?o:r!==o&&i?r:o},onadd:function t(){var n=this setTimeout(function(){n.togglePanel(!n.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){n.togglePanel(!n.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super() }}),e(".cms-menu-list").entwine({onmatch:function e(){var t=this this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function e(){this._super()},updateMenuFromResponse:function e(t){var n=t.getResponseHeader("X-Controller") if(n){var r=this.find("li#Menu-"+n.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,"")) r.hasClass("current")||r.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function e(t,n){this.updateMenuFromResponse(n.xhr)},onaftersubmitform:function e(t,n){this.updateMenuFromResponse(n.xhr) }},"from .cms-edit-form":{onrelodeditform:function e(t,n){this.updateMenuFromResponse(n.xmlhttp)}},getContainingPanel:function e(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function t(n){ this.toggleClass("collapsed",e(n.target).hasClass("collapsed")),e(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||e(".toggle-children.opened").closest("li").addClass("opened") }},updateItems:function t(){var n=this.find("#Menu-CMSMain") n[n.is(".current")?"show":"hide"]() var r=e(".cms-content input[name=ID]").val() r&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(r)})}}),e(".cms-menu-list li").entwine({toggleFlyout:function t(n){var r=e(this) if(r.children("ul").first().hasClass("collapsed-flyout"))if(n){if(!r.children("ul").first().children("li").first().hasClass("clone")){var i=r.clone() i.addClass("clone").css({}),i.children("ul").first().remove(),i.find("span").not(".text").remove(),i.find("a").first().unbind("click"),r.children("ul").prepend(i)}e(".collapsed-flyout").show(),r.addClass("opened"), r.children("ul").find("li").fadeIn("fast")}else i&&i.remove(),e(".collapsed-flyout").hide(),r.removeClass("opened"),r.find("toggle-children").removeClass("opened"),r.children("ul").find("li").hide()}}), e(".cms-menu-list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu-list .toggle").entwine({onclick:function t(n){n.preventDefault(),e(this).toogleFlyout(!0) }}),e(".cms-menu-list li").entwine({onmatch:function e(){this.find("ul").length&&this.find("a:first").append(''),this._super() },onunmatch:function e(){this._super()},toggle:function e(){this[this.hasClass("opened")?"close":"open"]()},open:function e(){var t=this.getMenuItem() t&&t.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function e(){this.removeClass("opened").find("ul").hide(), this.find(".toggle-children").removeClass("opened")},select:function e(){var t=this.getMenuItem() if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),t){var n=t.siblings() t.addClass("current"),n.removeClass("current").close(),n.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu-list *").entwine({getMenu:function e(){ return this.parents(".cms-menu-list:first")}}),e(".cms-menu-list li *").entwine({getMenuItem:function e(){return this.parents("li:first")}}),e(".cms-menu-list li a").entwine({onclick:function t(n){var r=e.path.isExternal(this.attr("href")) if(!(n.which>1||r)&&"_blank"!=this.attr("target")){n.preventDefault() var i=this.getMenuItem(),o=this.attr("href") r||(o=e("base").attr("href")+o) var a=i.find("li") a.length?a.first().find("a").click():document.location.href=o,i.select()}}}),e(".cms-menu-list li .toggle-children").entwine({onclick:function e(t){var n=this.closest("li") return n.toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function t(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu-list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle").entwine({ onadd:function t(){var n=!!e(".cms-menu").getPersistedStickyState() this.toggleCSS(n),this.toggleIndicator(n),this._super()},toggleCSS:function e(t){this[t?"addClass":"removeClass"]("active")},toggleIndicator:function e(t){this.next(".sticky-status-indicator").text(t?"fixed":"auto") },onclick:function e(){var t=this.closest(".cms-menu"),n=t.getPersistedCollapsedState(),r=t.getPersistedStickyState(),i=void 0===r?!this.hasClass("active"):!r void 0===n?t.setPersistedCollapsedState(t.hasClass("collapsed")):void 0!==n&&i===!1&&t.clearPersistedCollapsedState(),t.setPersistedStickyState(i),this.toggleCSS(i),this.toggleIndicator(i),this._super() }})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i),a=n(114),s=r(a) o.default.entwine("ss.preview",function(e){e(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","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,r){var i=this,o=this._getNavigatorStates() return r!==!1&&e.each(o,function(e,t){i.saveState("state",n)}),this.setCurrentStateName(n),this._loadCurrentState(),this.redraw(),this},changeMode:function t(n,r){var i=e(".cms-container").entwine(".ss") if("split"==n)i.splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState() else if("content"==n)i.contentViewMode(),this.setIsPreviewEnabled(!1) else{if("preview"!=n)throw"Invalid mode: "+n i.previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return r!==!1&&this.saveState("mode",n),this.redraw(),this},changeSize:function e(t){var n=this.getSizes() return this.setCurrentSizeName(t),this.removeClass("auto desktop tablet mobile").addClass(t),this.saveState("size",t),this.redraw(),this},redraw:function t(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)) var n=this.getCurrentStateName() n&&this.find(".cms-preview-states").changeVisibleState(n) var r=e(".cms-container").entwine(".ss").getLayoutOptions() r&&e(".preview-mode-selector").changeVisibleMode(r.mode) var i=this.getCurrentSizeName() return i&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function e(t,n){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+t,n) },loadState:function e(t){if(this._supportsLocalStorage())return window.localStorage.getItem("cms-preview-state-"+t)},disablePreview:function e(){return this.setPendingURL(null),this._loadUrl("about:blank"), this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function t(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)), this},getOrAppendFontFixStyleElement:function t(){var n=e("#FontFixStyleElement") return n.length||(n=e('').appendTo("head")),n},onadd:function t(){var n=this,r=this.find("iframe") r.addClass("center"),r.bind("load",function(){n._adjustIframeForPreview(),n._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&r.bind("readystatechange",function(e){ "interactive"==r[0].readyState&&(n.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){n.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this._unblock(),this.disablePreview(), this._super()},_supportsLocalStorage:function e(){var t=new Date,n,r try{return(n=window.localStorage).setItem(t,t),r=n.getItem(t)==t,n.removeItem(t),r&&n}catch(e){console.warn("localStorge is not available due to current browser / system settings.")}},onforcecontent:function e(){ this.changeMode("content",!1)},onenable:function t(){var n=e(".preview-mode-selector") n.removeClass("split-disabled"),n.find(".disabled-tooltip").hide()},ondisable:function t(){var n=e(".preview-mode-selector") n.addClass("split-disabled"),n.find(".disabled-tooltip").show()},_block:function e(){return this.find(".preview-note").show(),this.find(".cms-preview-overlay").show(),this},_unblock:function e(){return this.find(".preview-note").hide(), this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function t(){var n,r return e(".cms-previewable").length?(n=this.loadState("mode"),r=this.loadState("size"),this._moveNavigator(),n&&"content"==n||(this.enablePreview(),this._loadCurrentState()),this.redraw(),n&&this.changeMode(n), r&&this.changeSize(r)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function e(t,n){n.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null, oncolumnvisibilitychanged:function e(){var t=this.getPendingURL() t&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(t),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function e(){this._initialiseFromContent()}},_loadUrl:function e(t){ return this.find("iframe").addClass("loading").attr("src",t),this},_getNavigatorStates:function t(){var n=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}) return n},_loadCurrentState:function t(){if(!this.getIsPreviewEnabled())return this var n=this._getNavigatorStates(),r=this.getCurrentStateName(),i=null n&&(i=e.grep(n,function(e,t){return r===e.name||!r&&e.active})) var o=null return i[0]?o=i[0].url:n.length?(this.setCurrentStateName(n[0].name),o=n[0].url):this.setCurrentStateName(null),o&&(o+=(o.indexOf("?")===-1?"?":"&")+"CMSPreview=1"),this.is(".column-hidden")?(this.setPendingURL(o), this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),o?(this._loadUrl(o),this._unblock()):this._block()),this},_moveNavigator:function t(){var n=e(".cms-preview .cms-preview-controls"),r=e(".cms-edit-form .cms-navigator") r.length&&n.length?n.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function t(){if(this.getIsPreviewEnabled()){var n,r=e(".cms-container") try{n=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(n){var i=e(n).find("meta[name=x-page-id]").attr("content"),o=e(n).find("meta[name=x-cms-edit-link]").attr("content"),a=e(".cms-content") i&&a.find(":input[name=ID]").val()!=i&&e(".cms-container").entwine(".ss").loadPanel(o)}}},_adjustIframeForPreview:function e(){var t=this.find("iframe")[0],n if(t){try{n=t.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(n){for(var r=n.getElementsByTagName("A"),i=0;i
'):this.parent().append('') }}),e(".preview-device-outer").entwine({onclick:function e(){this.parent(".preview__device").toggleClass("rotate")}})})},function(e,t,n){(function(e){"use strict" function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),i=t(r),o=n(114),a=t(o) i.default.entwine("ss.tree",function(t){t("#Form_BatchActionsForm").entwine({Actions:[],getTree:function e(){return t(".cms-tree")},fromTree:{oncheck_node:function e(t,n){this.serializeFromTree()},onuncheck_node:function e(t,n){ this.serializeFromTree()}},onmatch:function e(){var t=this t.getTree().bind("load_node.jstree",function(e,n){t.refreshSelected()})},onunmatch:function e(){var t=this t.getTree().unbind("load_node.jstree")},registerDefault:function e(){this.register("publish",function(e){var t=confirm(a.default.inject(a.default._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{ num:e.length})) return!!t&&e}),this.register("unpublish",function(e){var t=confirm(a.default.inject(a.default._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{ num:e.length})) return!!t&&e}),this.register("delete",function(e){var t=confirm(a.default.inject(a.default._t("CMSMAIN.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})) return!!t&&e}),this.register("restore",function(e){var t=confirm(a.default.inject(a.default._t("CMSMAIN.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})) return!!t&&e})},onadd:function e(){this.registerDefault(),this._super()},register:function e(t,n){this.trigger("register",{type:t,callback:n}) var r=this.getActions() r[t]=n,this.setActions(r)},unregister:function e(t){this.trigger("unregister",{type:t}) var n=this.getActions() n[t]&&delete n[t],this.setActions(n)},refreshSelected:function n(r){var i=this,o=this.getTree(),a=this.getIDs(),s=[],l=t(".cms-content-batchactions-button"),u=this.find(":input[name=Action]").val() null==r&&(r=o) for(var c in a)t(t(o).getNodeByID(c)).addClass("selected").attr("selected","selected") if(!u||u==-1||!l.hasClass("active"))return void t(r).find("li").each(function(){t(this).setEnabled(!0)}) t(r).find("li").each(function(){s.push(t(this).data("id")),t(this).addClass("treeloading").setEnabled(!1)}) var d=t.path.parseUrl(u),f=d.hrefNoSearch+"/applicablepages/" f=t.path.addSearchParams(f,d.search),f=t.path.addSearchParams(f,{csvIDs:s.join(",")}),e.getJSON(f,function(n){e(r).find("li").each(function(){t(this).removeClass("treeloading") var e=t(this).data("id") 0==e||t.inArray(e,n)>=0?t(this).setEnabled(!0):(t(this).removeClass("selected").setEnabled(!1),t(this).prop("selected",!1))}),i.serializeFromTree()})},serializeFromTree:function e(){var t=this.getTree(),n=t.getSelectedIDs() return this.setIDs(n),!0},setIDs:function e(t){this.find(":input[name=csvIDs]").val(t?t.join(","):null)},getIDs:function e(){var t=this.find(":input[name=csvIDs]").val() return t?t.split(","):[]},onsubmit:function n(r){var i=this,o=this.getIDs(),s=this.getTree(),l=this.getActions() if(!o||!o.length)return alert(a.default._t("CMSMAIN.SELECTONEPAGE","Please select at least one page")),r.preventDefault(),!1 var u=this.find(":input[name=Action]").val() if(!u)return r.preventDefault(),!1 var c=u.split("/").filter(function(e){return!!e}).pop() if(l[c]&&(o=l[c].apply(this,[o])),!o||!o.length)return r.preventDefault(),!1 this.setIDs(o),s.find("li").removeClass("failed") var d=this.find(":submit:first") return d.addClass("loading"),e.ajax({url:u,type:"POST",data:this.serializeArray(),complete:function e(t,n){d.removeClass("loading"),s.jstree("refresh",-1),i.setIDs([]),i.find(":input[name=Action]").val("").change() var r=t.getResponseHeader("X-Status") r&&statusMessage(decodeURIComponent(r),"success"==n?"good":"bad")},success:function e(n,r){var i,o if(n.modified){var a=[] for(i in n.modified)o=s.getNodeByID(i),s.jstree("set_text",o,n.modified[i].TreeTitle),a.push(o) t(a).effect("highlight")}if(n.deleted)for(i in n.deleted)o=s.getNodeByID(i),o.length&&s.jstree("delete_node",o) if(n.error)for(i in n.error)o=s.getNodeByID(i),t(o).addClass("failed")},dataType:"json"}),r.preventDefault(),!1}}),t(".cms-content-batchactions-button").entwine({onmatch:function e(){this._super(),this.updateTree() },onunmatch:function e(){this._super()},onclick:function e(t){this.updateTree()},updateTree:function e(){var n=t(".cms-tree"),r=t("#Form_BatchActionsForm") this._super(),this.data("active")?(n.addClass("multiple"),n.removeClass("draggable"),r.serializeFromTree()):(n.removeClass("multiple"),n.addClass("draggable")),t("#Form_BatchActionsForm").refreshSelected() }}),t("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function e(n){var r=t(n.target.form),i=r.find(":submit"),o=t(n.target).val() t("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(n)}})})}).call(t,n(168))},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function e(){this._super() var t=this.find(".description"),n,r t.length&&(this.attr("title",t.text()).tooltip({content:t.html()}),t.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function e(t){this.closest(".field").tooltip("open") },onfocusout:function e(t){this.closest(".field").tooltip("close")}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function e(){var t=!1,n=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),r=this.find(".cms-description-trigger"),i=this.find(".description") this.hasClass("description-toggle-enabled")||(0===r.length&&(r=this.find(".middleColumn").first().after('').next()), this.addClass("description-toggle-enabled"),r.on("click",function(){i[t?"hide":"show"](),t=!t}),i.hide())}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function e(t){this.find(".tree-holder").empty(),this._super()}}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i),a=n(5),s=r(a),l=n(183),u=r(l),c=n(106),d=n(184),f=r(d) o.default.entwine("ss",function(e){e(".cms-content-actions .add-to-campaign-action,#add-to-campaign__action").entwine({onclick:function t(){var n=e("#add-to-campaign__dialog-wrapper") return n.length||(n=e('
'),e("body").append(n)),n.open(),!1}}),e("#add-to-campaign__dialog-wrapper").entwine({onunmatch:function e(){this._clearModal()},open:function e(){ this._renderModal(!0)},close:function e(){this._renderModal(!1)},_renderModal:function t(n){var r=this,i=function e(){return r.close()},o=function e(){return r._handleSubmitModal.apply(r,arguments)},a=e("form.cms-edit-form :input[name=ID]").val(),l=window.ss.store,d="SilverStripe\\CMS\\Controllers\\CMSPageEditController",p=l.getState().config.sections[d],h=p.form.AddToCampaignForm.schemaUrl+"/"+a u.default.render(s.default.createElement(c.Provider,{store:l},s.default.createElement(f.default,{show:n,handleSubmit:o,handleHide:i,schemaUrl:h,bodyClassName:"modal__dialog",responseClassBad:"modal__response modal__response--error", responseClassGood:"modal__response modal__response--good"})),this[0])},_clearModal:function e(){u.default.unmountComponentAtNode(this[0])},_handleSubmitModal:function e(t,n,r){return r()}})})},,function(e,t){ e.exports=FormBuilderModal},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) n(170),n(186) var a=function e(t){var n=(0,o.default)((0,o.default)(this).contents()).find(".message") if(n&&n.html()){var r=(0,o.default)(window.parent.document).find("#Form_EditForm_Members").get(0) r&&r.refresh() var i=(0,o.default)(window.parent.document).find(".cms-tree").get(0) i&&i.reload()}};(0,o.default)("#MemberImportFormIframe, #GroupImportFormIframe").entwine({onadd:function e(){this._super(),(0,o.default)(this).bind("load",a)}}),o.default.entwine("ss",function(e){e(".permissioncheckboxset .checkbox[value=ADMIN]").entwine({ onmatch:function e(){this.toggleCheckboxes(),this._super()},onunmatch:function e(){this._super()},onclick:function e(t){this.toggleCheckboxes()},toggleCheckboxes:function t(){var n=this,r=this.parents(".field:eq(0)").find(".checkbox").not(this) this.is(":checked")?r.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) }):r.each(function(){e(this).prop("checked",e(this).data("SecurityAdmin.oldChecked")),e(this).prop("disabled",e(this).data("SecurityAdmin.oldDisabled"))})}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".permissioncheckboxset .valADMIN input").entwine({onmatch:function e(){this._super()},onunmatch:function e(){this._super()},onclick:function e(t){this.toggleCheckboxes() },toggleCheckboxes:function t(){var n=e(this).parents(".field:eq(0)").find(".checkbox").not(this) e(this).is(":checked")?n.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")}):n.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 t(){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)},onmatch:function e(){this.toggleCheckboxes(),this._super()},onunmatch:function e(){this._super()},onclick:function e(t){this.toggleCheckboxes() },toggleCheckboxes:function t(){var n=this.getCheckboxesExceptThisOne() e(this).is(":checked")?n.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")}):n.each(function(){e(this).prop("checked",e(this).data("PermissionCheckboxSetField.oldChecked")),e(this).prop("disabled",e(this).data("PermissionCheckboxSetField.oldDisabled")) })}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) n(170),o.default.entwine("ss",function(e){e(".cms-content-tools #Form_SearchForm").entwine({onsubmit:function e(t){this.trigger("beforeSubmit")}}),e(".importSpec").entwine({onmatch:function t(){this.find("div.details").hide(), this.find("a.detailsLink").click(function(){return e("#"+e(this).attr("href").replace(/.*#/,"")).slideToggle(),!1}),this._super()},onunmatch:function e(){this._super()}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i);(0,o.default)(document).on("click",".confirmedpassword .showOnClick a",function(){var e=(0,o.default)(".showOnClickContainer",(0,o.default)(this).parent()) return e.toggle("fast",function(){e.find('input[type="hidden"]').val(e.is(":visible")?1:0)}),!1})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i);(0,o.default)(document).ready(function(){(0,o.default)("ul.SelectionGroup input.selector, ul.selection-group input.selector").live("click",function(){ var e=(0,o.default)(this).closest("li") e.addClass("selected") var t=e.prevAll("li.selected") t.length&&t.removeClass("selected") var n=e.nextAll("li.selected") n.length&&n.removeClass("selected"),(0,o.default)(this).focus()})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) n(169),o.default.fn.extend({ssDatepicker:function e(t){return(0,o.default)(this).each(function(){if(!((0,o.default)(this).prop("disabled")||(0,o.default)(this).prop("readonly")||(0,o.default)(this).hasClass("hasDatepicker"))){ (0,o.default)(this).siblings("button").addClass("ui-icon ui-icon-calendar") var e=o.default.extend({},t||{},(0,o.default)(this).data(),(0,o.default)(this).data("jqueryuiconfig")) e.showcalendar&&(e.locale&&o.default.datepicker.regional[e.locale]&&(e=o.default.extend({},o.default.datepicker.regional[e.locale],e)),(0,o.default)(this).datepicker(e))}})}}),(0,o.default)(document).on("click",".field.date input.text,input.text.date",function(){ (0,o.default)(this).ssDatepicker(),(0,o.default)(this).data("datepicker")&&(0,o.default)(this).datepicker("show")})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) n(169),o.default.entwine("ss",function(e){e(".ss-toggle").entwine({onadd:function e(){this._super(),this.accordion({heightStyle:"content",collapsible:!0,active:!this.hasClass("ss-toggle-start-closed")&&0 })},onremove:function e(){this.data("accordion")&&this.accordion("destroy"),this._super()},getTabSet:function e(){return this.closest(".ss-tabset")},fromTabSet:{ontabsshow:function e(){this.accordion("resize") }}})})},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) o.default.entwine("ss",function(e){e(".memberdatetimeoptionset").entwine({onmatch:function e(){this.find(".toggle-content").hide(),this._super()}}),e(".memberdatetimeoptionset .toggle").entwine({onclick:function t(n){ n.preventDefault() var r=e(this).closest(".form__field-description").parent().find(".toggle-content") r.is(":visible")?r.hide():r.show()}})})},function(e,t,n){(function(e){"use strict" function t(e){return e&&e.__esModule?e:{default:e}}var r=n(1),i=t(r),o=n(114),a=t(o) n(194),n(195),i.default.entwine("ss",function(t){var n,r t(window).bind("resize.treedropdownfield",function(){var e=function e(){t(".TreeDropdownField").closePanel()} if(t.browser.msie&&parseInt(t.browser.version,10)<9){var i=t(window).width(),o=t(window).height() i==n&&o==r||(n=i,r=o,e())}else e()}) var i={openlink:a.default._t("TreeDropdownField.OpenLink"),fieldTitle:"("+a.default._t("TreeDropdownField.FieldTitle")+")",searchFieldTitle:"("+a.default._t("TreeDropdownField.SearchFieldTitle")+")"},o=function e(n){ t(n.target).parents(".TreeDropdownField").length||t(".TreeDropdownField").closePanel()} t(".TreeDropdownField").entwine({CurrentXhr:null,onadd:function e(){this.append('
') var t=i.openLink t&&this.find("treedropdownfield-toggle-panel-link a").attr("title",t),this.data("title")&&this.setTitle(this.data("title")),this.getPanel().hide(),this._super()},getPanel:function e(){return this.find(".treedropdownfield-panel") },openPanel:function e(){t(".TreeDropdownField").closePanel(),t("body").bind("click",o) var n=this.getPanel(),r=this.find(".tree-holder") n.css("width",this.width()),n.show() var i=this.find(".treedropdownfield-toggle-panel-link") i.addClass("treedropdownfield-open-tree"),this.addClass("treedropdownfield-open-tree"),i.find("a").removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-n"),r.is(":empty")&&!n.hasClass("loading")?this.loadTree(null,this._riseUp):this._riseUp(), this.trigger("panelshow")},_riseUp:function e(){var n=this,r=this.getPanel(),i=this.find(".treedropdownfield-toggle-panel-link"),o=i.innerHeight(),a,s,l i.length>0&&(l=t(window).height()+t(document).scrollTop()-i.innerHeight(),s=i.offset().top,a=r.innerHeight(),s+a>l&&s-a>0?(n.addClass("treedropdownfield-with-rise"),o=-r.outerHeight()):n.removeClass("treedropdownfield-with-rise")), r.css({top:o+"px"})},closePanel:function t(){e("body").unbind("click",o) var n=this.find(".treedropdownfield-toggle-panel-link") n.removeClass("treedropdownfield-open-tree"),this.removeClass("treedropdownfield-open-tree treedropdownfield-with-rise"),n.find("a").removeClass("ui-icon-triangle-1-n").addClass("ui-icon-triangle-1-s"), this.getPanel().hide(),this.trigger("panelhide")},togglePanel:function e(){this[this.getPanel().is(":visible")?"closePanel":"openPanel"]()},setTitle:function e(t){t=t||this.data("title")||i.fieldTitle, this.find(".treedropdownfield-title").html(t),this.data("title",t)},getTitle:function e(){return this.find(".treedropdownfield-title").text()},updateTitle:function e(){var t=this,n=t.find(".tree-holder"),r=this.getValue(),i=function e(){ var r=t.getValue() if(r){var i=n.find('*[data-id="'+r+'"]'),o=i.children("a").find("span.jstree_pageicon")?i.children("a").find("span.item").html():null o||(o=i.length>0?n.jstree("get_text",i[0]):null),o&&(t.setTitle(o),t.data("title",o)),i&&n.jstree("select_node",i)}else t.setTitle(t.data("empty-title")),t.removeData("title")} n.is(":empty")&&r?this.loadTree({forceValue:r},i):i()},setValue:function e(n){this.data("metadata",t.extend(this.data("metadata"),{id:n})),this.find(":input:hidden").val(n).trigger("valueupdated").trigger("change") },getValue:function e(){return this.find(":input:hidden").val()},loadTree:function e(n,r){var i=this,o=this.getPanel(),a=t(o).find(".tree-holder"),n=n?t.extend({},this.getRequestParams(),n):this.getRequestParams(),s this.getCurrentXhr()&&this.getCurrentXhr().abort(),o.addClass("loading"),s=t.ajax({url:this.data("urlTree"),data:n,complete:function e(t,n){o.removeClass("loading")},success:function e(n,o,s){a.html(n) var l=!0 a.jstree("destroy").bind("loaded.jstree",function(e,t){var n=i.getValue(),o=a.find('*[data-id="'+n+'"]'),s=t.inst.get_selected() n&&o!=s&&t.inst.select_node(o),l=!1,r&&r.apply(i)}).jstree(i.getTreeConfig()).bind("select_node.jstree",function(e,n){var r=n.rslt.obj,o=t(r).data("id") l||i.getValue()!=o?(i.data("metadata",t.extend({id:o},t(r).getMetaData())),i.setTitle(n.inst.get_text(r)),i.setValue(o)):(i.data("metadata",null),i.setTitle(null),i.setValue(null),n.inst.deselect_node(r)), l||i.closePanel(),l=!1}),i.setCurrentXhr(null)}}),this.setCurrentXhr(s)},getTreeConfig:function e(){var n=this return{core:{html_titles:!0,animation:0},html_data:{data:this.getPanel().find(".tree-holder").html(),ajax:{url:function e(r){var e=t.path.parseUrl(n.data("urlTree")).hrefNoSearch return e+"/"+(t(r).data("id")?t(r).data("id"):0)},data:function e(r){var i=t.query.load(n.data("urlTree")).keys,o=n.getRequestParams() return o=t.extend({},i,o,{ajax:1})}}},ui:{select_limit:1,initially_select:[this.getPanel().find(".current").attr("id")]},themes:{theme:"apple"},types:{types:{default:{check_node:function e(t){return!t.hasClass("disabled") },uncheck_node:function e(t){return!t.hasClass("disabled")},select_node:function e(t){return!t.hasClass("disabled")},deselect_node:function e(t){return!t.hasClass("disabled")}}}},plugins:["html_data","ui","themes","types"] }},getRequestParams:function e(){return{}}}),t(".TreeDropdownField .tree-holder li").entwine({getMetaData:function e(){var t=this.attr("class").match(/class-([^\s]*)/i),n=t?t[1]:"" return{ClassName:n}}}),t(".TreeDropdownField *").entwine({getField:function e(){return this.parents(".TreeDropdownField:first")}}),t(".TreeDropdownField").entwine({onclick:function e(t){return this.togglePanel(), !1}}),t(".TreeDropdownField .treedropdownfield-panel").entwine({onclick:function e(t){return!1}}),t(".TreeDropdownField.searchable").entwine({onadd:function e(){this._super() var n=a.default._t("TreeDropdownField.ENTERTOSEARCH") this.find(".treedropdownfield-panel").prepend(t(''))},search:function e(t,n){this.openPanel(), this.loadTree({search:t},n)},cancelSearch:function e(){this.closePanel(),this.loadTree()}}),t(".TreeDropdownField.searchable input.search").entwine({onkeydown:function e(t){var n=this.getField() return 13==t.keyCode?(n.search(this.val()),!1):void(27==t.keyCode&&n.cancelSearch())}}),t(".TreeDropdownField.multiple").entwine({getTreeConfig:function e(){var t=this._super() return t.checkbox={override_ui:!0,two_state:!0},t.plugins.push("checkbox"),t.ui.select_limit=-1,t},loadTree:function e(n,r){var i=this,o=this.getPanel(),a=t(o).find(".tree-holder"),n=n?t.extend({},this.getRequestParams(),n):this.getRequestParams(),s this.getCurrentXhr()&&this.getCurrentXhr().abort(),o.addClass("loading"),s=t.ajax({url:this.data("urlTree"),data:n,complete:function e(t,n){o.removeClass("loading")},success:function e(n,o,s){a.html(n) var l=!0 i.setCurrentXhr(null),a.jstree("destroy").bind("loaded.jstree",function(e,n){t.each(i.getValue(),function(e,t){n.inst.check_node(a.find("*[data-id="+t+"]"))}),l=!1,r&&r.apply(i)}).jstree(i.getTreeConfig()).bind("uncheck_node.jstree check_node.jstree",function(e,n){ var r=n.inst.get_checked(null,!0) i.setValue(t.map(r,function(e,n){return t(e).data("id")})),i.setTitle(t.map(r,function(e,t){return n.inst.get_text(e)})),i.data("metadata",t.map(r,function(e,n){return{id:t(e).data("id"),metadata:t(e).getMetaData() }}))})}}),this.setCurrentXhr(s)},getValue:function e(){var t=this._super() return t.split(/ *, */)},setValue:function e(n){this._super(t.isArray(n)?n.join(","):n)},setTitle:function e(n){this._super(t.isArray(n)?n.join(", "):n)},updateTitle:function e(){}}),t(".TreeDropdownField input[type=hidden]").entwine({ onadd:function e(){this._super(),this.bind("change.TreeDropdownField",function(){t(this).getField().updateTitle()})},onremove:function e(){this._super(),this.unbind(".TreeDropdownField")}})})}).call(t,n(168)) },,,function(module,exports,__webpack_require__){"use strict" function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _extends=Object.assign||function(e){for(var t=1;t'),e("body").append(r)),r.setElement(this),void r.open()}var i=function e(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase() },o=this,a=e("#cms-editor-dialogs").data("url"+i(n)+"form"),s=e(".htmleditorfield-"+n+"dialog") if(!a){if("media"===n)throw new Error("Install silverstripe/asset-admin to use media dialog") throw new Error("Dialog named "+n+" is not available.")}s.length?(s.getForm().setElement(this),s.html(""),s.addClass("loading"),s.open()):(s=e('
'), e("body").append(s)),e.ajax({url:a,complete:function e(){s.removeClass("loading")},success:function e(t){s.html(t),s.getForm().setElement(o),s.trigger("ssdialogopen")}})}}),e(".htmleditorfield-dialog").entwine({ onadd:function t(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,buttons:{insert:{text:_i18n2.default._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept",class:"btn action btn-primary media-insert", click:function t(){e(this).find("form").submit()}}}}),this._super()},getForm:function e(){return this.find("form")},open:function e(){this.ssdialog("open")},close:function e(){this.ssdialog("close")},toggle:function e(t){ this.is(":visible")?this.close():this.open()},onscroll:function e(){this.animate({scrollTop:this.find("form").height()},500)}}),e("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null, setSelection:function t(n){return this._super(e(n))},onadd:function e(){var t=this.find(":header:first") this.getDialog().attr("title",t.text()),this._super()},onremove:function e(){this.setSelection(null),this.setBookmark(null),this.setElement(null),this._super()},getDialog:function e(){return this.closest(".htmleditorfield-dialog") },fromDialog:{onssdialogopen:function e(){var t=this.getEditor() this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(), this.updateFromEditor()},onssdialogclose:function e(){var t=this.getEditor() t.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function e(){return this.getElement().getEditor()},modifySelection:function e(t){var n=this.getEditor() n.moveToBookmark(this.getBookmark()),t.call(this,n),this.setSelection(n.getSelectedNode()),this.setBookmark(n.createBookmark()),n.blur()},updateFromEditor:function e(){},redraw:function e(){},resetFields:function e(){ this.find(".tree-holder").empty()}}),e("form.htmleditorfield-linkform").entwine({onsubmit:function e(t){return this.insertLink(),this.getDialog().close(),!1},resetFields:function e(){this._super(),this[0].reset() },redraw:function e(){this._super() var t=this.find(":input[name=LinkType]:checked").val() this.addAnchorSelector(),this.resetFileField(),this.find(".step2").nextAll(".field").not('.field[id$="'+t+'_Holder"]').hide(),this.find('.field[id$="LinkType_Holder"]').attr("style","display: -webkit-flex; display: flex"), this.find('.field[id$="'+t+'_Holder"]').attr("style","display: -webkit-flex; display: flex"),"internal"!=t&&"anchor"!=t||this.find('.field[id$="Anchor_Holder"]').attr("style","display: -webkit-flex; display: flex"), "email"==t?this.find('.field[id$="Subject_Holder"]').attr("style","display: -webkit-flex; display: flex"):this.find('.field[id$="TargetBlank_Holder"]').attr("style","display: -webkit-flex; display: flex"), "anchor"==t&&this.find('.field[id$="AnchorSelector_Holder"]').attr("style","display: -webkit-flex; display: flex"),this.find('.field[id$="Description_Holder"]').attr("style","display: -webkit-flex; display: flex") },getLinkAttributes:function e(){var t,n=null,r=this.find(":input[name=Subject]").val(),i=this.find(":input[name=Anchor]").val() switch(this.find(":input[name=TargetBlank]").is(":checked")&&(n="_blank"),this.find(":input[name=LinkType]:checked").val()){case"internal":t="[sitetree_link,id="+this.find(":input[name=internal]").val()+"]", i&&(t+="#"+i) break case"anchor":t="#"+i break case"file":var o=this.find(":input[name=file]").val() t=o?"[file_link,id="+o+"]":"" break case"email":t="mailto:"+this.find(":input[name=email]").val(),r&&(t+="?subject="+encodeURIComponent(r)),n=null break default:t=this.find(":input[name=external]").val(),t.indexOf("://")==-1&&(t="http://"+t)}return{href:t,target:n,title:this.find(":input[name=Description]").val()}},insertLink:function e(){this.modifySelection(function(e){ e.insertLink(this.getLinkAttributes())})},removeLink:function e(){this.modifySelection(function(e){e.removeLink()}),this.resetFileField(),this.close()},resetFileField:function e(){var t=this.find('.ss-uploadfield[id$="file_Holder"]'),n=t.data("fileupload"),r=t.find(".ss-uploadfield-item[data-fileid]") r.length&&(n._trigger("destroy",null,{context:r}),t.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function t(){if(!this.find(":input[name=AnchorSelector]").length){var n=this,r=e('') this.find(":input[name=Anchor]").parent().append(r),this.updateAnchorSelector(),r.change(function(t){n.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function t(){var n=this.find(":input[name=LinkType]:checked").val(),r=e.Deferred() switch(n){case"anchor":var i=[],o=this.getEditor() if(o){var a=o.getContent().match(/\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim) if(a&&a.length)for(var s=0;s'+_i18n2.default._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"")),i.done(function(t){if(r.empty(),r.append(e('")), t)for(var n=0;n'+t[n]+""))}).fail(function(t){r.empty(),r.append(e('"))}),e.browser.msie&&r.hide().show() },updateFromEditor:function e(){var t=/<\S[^><]*>/g,n,r=this.getCurrentLink() if(r)for(n in r){var i=this.find(":input[name="+n+"]"),o=r[n] "string"==typeof o&&(o=o.replace(t,"")),i.is(":checkbox")?i.prop("checked",o).change():i.is(":radio")?i.val([o]).change():i.val(o).change()}},getCurrentLink:function e(){var t=this.getSelection(),n="",r="",i="",o="insert",a="",s=null return t.length&&(s=t.is("a")?t:t=t.parents("a:first")),s&&s.length&&this.modifySelection(function(e){e.selectNode(s[0])}),s.attr("href")||(s=null),s&&(n=s.attr("href"),r=s.attr("target"),i=s.attr("title"), a=s.attr("class"),n=this.getEditor().cleanLink(n,s),o="update"),n.match(/^mailto:(.*)$/)?{LinkType:"email",email:RegExp.$1,Description:i}:n.match(/^(assets\/.*)$/)||n.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)?{ LinkType:"file",file:RegExp.$1,Description:i,TargetBlank:!!r}:n.match(/^#(.*)$/)?{LinkType:"anchor",Anchor:RegExp.$1,Description:i,TargetBlank:!!r}:n.match(/^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i)?{ LinkType:"internal",internal:RegExp.$1,Anchor:RegExp.$2?RegExp.$2.substr(1):"",Description:i,TargetBlank:!!r}:n?{LinkType:"external",external:n,Description:i,TargetBlank:!!r}:null}}),e("form.htmleditorfield-linkform input[name=LinkType]").entwine({ onclick:function e(t){this.parents("form:first").redraw(),this._super()},onchange:function e(){this.parents("form:first").redraw() var t=this.parent().find(":checked").val() "anchor"!==t&&"internal"!==t||this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform input[name=internal]").entwine({onvalueupdated:function e(){ this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform :submit[name=action_remove]").entwine({onclick:function e(t){return this.parents("form:first").removeLink(), this._super(),!1}}),e(".insert-media-react__dialog-wrapper .nav-link").entwine({onclick:function e(t){return t.preventDefault()}}),e("#insert-media-react__dialog-wrapper").entwine({Element:null,Data:{}, onunmatch:function e(){this._clearModal()},_clearModal:function e(){_reactDom2.default.unmountComponentAtNode(this[0])},open:function e(){this._renderModal(!0)},close:function e(){this._renderModal(!1) },_renderModal:function e(t){var n=this,r=function e(){return n.close()},i=function e(){return n._handleInsert.apply(n,arguments)},o=window.ss.store,a=window.ss.apolloClient,s=this.getOriginalAttributes(),l=window.InsertMediaModal.default if(!l)throw new Error("Invalid Insert media modal component found") delete s.url,_reactDom2.default.render(_react2.default.createElement(_reactApollo.ApolloProvider,{store:o,client:a},_react2.default.createElement(l,{title:!1,show:t,onInsert:i,onHide:r,bodyClassName:"modal__dialog", className:"insert-media-react__dialog-wrapper",fileAttributes:s})),this[0])},_handleInsert:function e(t,n){var r=!1 this.setData(_extends({},t,n)) try{switch(n.category){case"image":r=this.insertImage() break default:r=this.insertFile()}}catch(e){this.statusMessage(e,"bad")}return r&&this.close(),Promise.resolve()},getOriginalAttributes:function t(){var n=this.getElement() if(!n)return{} var r=n.getEditor().getSelectedNode() if(!r)return{} var i=e(r),o=i.parent(".captionImage").find(".caption"),a={url:i.attr("src"),AltText:i.attr("alt"),InsertWidth:i.attr("width"),InsertHeight:i.attr("height"),TitleTooltip:i.attr("title"),Alignment:i.attr("class"), Caption:o.text(),ID:i.attr("data-id")} return["InsertWidth","InsertHeight","ID"].forEach(function(e){a[e]="string"==typeof a[e]?parseInt(a[e],10):null}),a},getAttributes:function e(){var t=this.getData() return{src:t.url,alt:t.AltText,width:t.InsertWidth,height:t.InsertHeight,title:t.TitleTooltip,class:t.Alignment,"data-id":t.ID}},getExtraData:function e(){var t=this.getData() return{CaptionText:t&&t.Caption}},insertFile:function e(){return this.statusMessage(_i18n2.default._t("HTMLEditorField_Toolbar.ERROR_OEMBED_REMOTE","Embed is only compatible with remote files"),"bad"), !1},insertImage:function t(){var n=this.getElement() if(!n)return!1 var r=n.getEditor() if(!r)return!1 var i=e(r.getSelectedNode()),o=this.getAttributes(),a=this.getExtraData(),s=i&&i.is("img")?i:null s&&s.parent().is(".captionImage")&&(s=s.parent()) var l=i&&i.is("img")?i:e("") l.attr(o) var u=l.parent(".captionImage"),c=u.find(".caption") a.CaptionText?(u.length||(u=e("
")),u.attr("class","captionImage "+o.class).css("width",o.width),c.length||(c=e('

').appendTo(u)),c.attr("class","caption "+o.class).text(a.CaptionText)):u=c=null var d=u||l return s&&s.not(d).length&&s.replaceWith(d),u&&u.prepend(l),s||(r.repaint(),r.insertContent(e("
").append(d).html(),{skip_undo:1})),r.addUndo(),r.repaint(),!0},statusMessage:function t(n,r){var i=e("
").text(n).html() e.noticeAdd({text:i,type:r,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}})})},function(e,t){e.exports=ReactApollo},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i) n(169),n(199),n(194),o.default.entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function e(){var t=window.location.hash this.redrawTabs(),""!==t&&this.openTabFromURL(t),this._super()},onremove:function e(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function e(){this.rewriteHashlinks(),this.tabs()}, openTabFromURL:function t(n){var r e.each(this.find(".ui-tabs-anchor"),function(){if(this.href.indexOf(n)!==-1&&1===e(n).length)return r=e(this),!1}),void 0!==r&&e(document).ready("ajaxComplete",function(){r.click()})},rewriteHashlinks:function t(){ 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 e(){this.addClass("nav-link active")},onunmatch:function e(){this.removeClass("active") }})})},,function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i),a=n(114),s=r(a) n(169),n(194),o.default.entwine("ss",function(e){e(".grid-field").entwine({reload:function t(n,r){var i=this,o=this.closest("form"),a=this.find(":input:focus").attr("name"),l=o.find(":input").serializeArray() n||(n={}),n.data||(n.data=[]),n.data=n.data.concat(l),window.location.search&&(n.data=window.location.search.replace(/^\?/,"")+"&"+e.param(n.data)),o.addClass("loading"),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField" },type:"POST",url:this.data("url"),dataType:"html",success:function t(s){if(i.empty().append(e(s).children()),a&&i.find(':input[name="'+a+'"]').focus(),i.find(".filter-header").length){var l "show"==n.data[0].filter?(l='',i.addClass("show-filter").find(".filter-header").show()):(l='', i.removeClass("show-filter").find(".filter-header").hide()),i.find(".sortable-header th:last").html(l)}o.removeClass("loading"),r&&r.apply(this,arguments),i.trigger("reload",i)},error:function e(t){alert(s.default._t("GRIDFIELD.ERRORINTRANSACTION")), o.removeClass("loading")}},n))},showDetailView:function e(t){window.location.href=t},getItems:function e(){return this.find(".ss-gridfield-item")},setState:function e(t,n){var r=this.getState() r[t]=n,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(r))},getState:function e(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}), e(".grid-field *").entwine({getGridField:function e(){return this.closest(".grid-field")}}),e(".grid-field :button[name=showFilter]").entwine({onclick:function e(t){this.closest(".grid-field__table").find(".filter-header").show().find(":input:first").focus(), this.closest(".grid-field").addClass("show-filter"),this.parent().html(''),t.preventDefault()}}),e(".grid-field .ss-gridfield-item").entwine({onclick:function t(n){if(e(n.target).closest(".action").length)return this._super(n), !1 var r=this.find(".edit-link") r.length&&this.getGridField().showDetailView(r.prop("href"))},onmouseover:function e(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function e(){this.css("cursor","default") }}),e(".grid-field .action.action_import:button").entwine({onclick:function e(t){t.preventDefault(),this.openmodal()},onmatch:function e(){this._super(),"open"===this.data("state")&&this.openmodal()},onunmatch:function e(){ this._super()},openmodal:function t(){var n=e(this.data("target")),r=e(this.data("modal")) n.length<1?(n=r,n.appendTo(document.body)):n.innerHTML=r.innerHTML var i=e(".modal-backdrop") i.length<1&&(i=e(''),i.appendTo(document.body)),n.find("[data-dismiss]").on("click",function(){i.removeClass("in"),n.removeClass("in"),setTimeout(function(){i.remove() },.2)}),setTimeout(function(){i.addClass("in"),n.addClass("in")},0)}}),e(".grid-field .action:button").entwine({onclick:function e(t){var n="show" return this.is(":disabled")?void t.preventDefault():(!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(n="hidden"),this.getGridField().reload({data:[{name:this.attr("name"), value:this.val(),filter:n}]}),void t.preventDefault())},actionurl:function t(){var n=this.closest(":button"),r=this.getGridField(),i=this.closest("form"),o=i.find(":input.gridstate").serialize(),a=i.find('input[name="SecurityID"]').val() o+="&"+encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val()),a&&(o+="&SecurityID="+encodeURIComponent(a)),window.location.search&&(o=window.location.search.replace(/^\?/,"")+"&"+o) var s=r.data("url").indexOf("?")==-1?"?":"&" return e.path.makeUrlAbsolute(r.data("url")+s+o,e("base").attr("href"))}}),e(".grid-field .add-existing-autocompleter").entwine({onbuttoncreate:function e(){var t=this this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){t.toggleDisabled()})},onunmatch:function e(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function e(){var t=this.find(".ss-ui-button"),n=this.find('input[type="text"]'),r=""!==n.val(),i=t.is(":disabled") ;(r&&i||!r&&!i)&&t.attr("disabled",!i)}}),e(".grid-field .grid-field__col-compact .action.gridfield-button-delete, .cms-edit-form .btn-toolbar button.action.action-delete").entwine({onclick:function e(t){ return confirm(s.default._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(t):(t.preventDefault(),!1)}}),e(".grid-field .action.gridfield-button-print").entwine({UUID:null,onmatch:function e(){this._super(), this.setUUID((new Date).getTime())},onunmatch:function e(){this._super()},onclick:function e(t){var n=this.actionurl() return window.open(n),t.preventDefault(),!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function e(){this._super(),this.hide().bind("load",function(){this.focus() var e=this.contentWindow||this e.print()})},onunmatch:function e(){this._super()}}),e(".grid-field .action.no-ajax").entwine({onclick:function e(t){return window.location.href=this.actionurl(),t.preventDefault(),!1}}),e(".grid-field .action-detail").entwine({ onclick:function t(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".grid-field[data-selectable]").entwine({getSelectedItems:function e(){return this.find(".ss-gridfield-item.ui-selected") },getSelectedIDs:function t(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".grid-field[data-selectable] .ss-gridfield-items").entwine({onadd:function e(){this._super(), this.selectable()},onremove:function e(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".grid-field .filter-header :input").entwine({onmatch:function e(){var t=this.closest(".extra").find(".ss-gridfield-button-filter"),n=this.closest(".extra").find(".ss-gridfield-button-reset") this.val()&&(t.addClass("filtered"),n.addClass("filtered")),this._super()},onunmatch:function e(){this._super()},onkeydown:function e(t){if(!this.closest(".ss-gridfield-button-reset").length){var n=this.closest(".extra").find(".ss-gridfield-button-filter"),r=this.closest(".extra").find(".ss-gridfield-button-reset") if("13"==t.keyCode){var i=this.closest(".filter-header").find(".ss-gridfield-button-filter"),o="show" return!this.hasClass("ss-gridfield-button-close")&&this.closest(".grid-field").hasClass("show-filter")||(o="hidden"),this.getGridField().reload({data:[{name:i.attr("name"),value:i.val(),filter:o}]}),!1 }n.addClass("hover-alike"),r.addClass("hover-alike")}}}),e(".grid-field .relation-search").entwine({onfocusin:function t(n){this.autocomplete({source:function t(n,r){var i=e(this.element),o=e(this.element).closest("form") e.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:e(i).data("searchUrl"),data:encodeURIComponent(i.attr("name"))+"="+encodeURIComponent(i.val()),success:r,error:function e(t){alert(s.default._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later.")) }})},select:function t(n,r){var i=e('') i.val(r.item.id),e(this).closest(".grid-field").find(".action_gridfield_relationfind").replaceWith(i) var o=e(this).closest(".grid-field").find(".action_gridfield_relationadd") o.removeAttr("disabled")}})}}),e(".grid-field .pagination-page-number input").entwine({onkeydown:function t(n){if(13==n.keyCode){var r=parseInt(e(this).val(),10),i=e(this).getGridField() return i.setState("GridFieldPaginator",{currentPage:r}),i.reload(),!1}}})})},function(e,t,n){"use strict" function r(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]) return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(){var e=m.default.get("absoluteBaseUrl"),t=(0,I.createNetworkInterface)({uri:e+"graphql/",opts:{credentials:"same-origin" }}),n=new A.default({shouldBatch:!0,addTypename:!0,dataIdFromObject:function e(t){return t.id>=0&&t.__typename?t.__typename+":"+t.id:null},networkInterface:t}) t.use([{applyMiddleware:function e(t,n){var r=(0,D.printRequest)(t.request) t.options.headers=a({},t.options.headers,{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}),t.options.body=F.default.stringify(a({},r,{variables:JSON.stringify(r.variables)})),n()}}]), y.default.add("config",w.default),y.default.add("form",f.reducer),y.default.add("schemas",T.default),y.default.add("records",E.default),y.default.add("campaign",O.default),y.default.add("breadcrumbs",j.default), y.default.add("routing",p.routerReducer),y.default.add("apollo",n.reducer()),R.default.start() var r={},i=(0,u.combineReducers)(y.default.getAll()),o=[d.default,n.middleware()],s=m.default.get("environment"),c=m.default.get("debugging"),h=u.applyMiddleware.apply(void 0,o),g=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,v=window.__REDUX_DEVTOOLS_EXTENSION__||window.devToolsExtension "dev"===s&&c&&("function"==typeof g?h=g(u.applyMiddleware.apply(void 0,o)):"function"==typeof v&&(h=(0,u.compose)(u.applyMiddleware.apply(void 0,o),v()))) var _=h(u.createStore),C=_(i,r) C.dispatch(b.setConfig(m.default.getAll())),window.ss=window.ss||{},window.ss.store=C,window.ss=window.ss||{},window.ss.apolloClient=n var P=new l.default(C,n) P.start(window.location.pathname),window.jQuery&&window.jQuery("body").addClass("js-react-boot")}var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1] switch(t.type){case u.default.SET_CONFIG:return(0,s.default)(o({},e,t.payload.config)) default:return e}}Object.defineProperty(t,"__esModule",{value:!0}) var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null switch(t.type){case c.default.SET_SCHEMA:return(0,l.default)(a({},e,i({},t.payload.id,a({},e[t.payload.id],t.payload)))) case c.default.SET_SCHEMA_STATE_OVERRIDES:return(0,l.default)(a({},e,i({},t.payload.id,a({},e[t.payload.id],{stateOverride:t.payload.stateOverride})))) case c.default.SET_SCHEMA_LOADING:return(0,l.default)(a({},e,i({},t.payload.id,a({},e[t.payload.id],{metadata:a({},e[t.payload.id]&&e[t.payload.id].metadata,{loading:t.payload.loading})})))) default:return e}}Object.defineProperty(t,"__esModule",{value:!0}) var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments[1],n=null,r=null,o=null switch(t.type){case c.default.CREATE_RECORD:return(0,l.default)(a({},e,{})) case c.default.UPDATE_RECORD:return(0,l.default)(a({},e,{})) case c.default.DELETE_RECORD:return(0,l.default)(a({},e,{})) case c.default.FETCH_RECORDS_REQUEST:return e case c.default.FETCH_RECORDS_FAILURE:return e case c.default.FETCH_RECORDS_SUCCESS:if(r=t.payload.recordType,!r)throw new Error("Undefined record type") return n=t.payload.data._embedded[r]||{},n=n.reduce(function(e,t){return a({},e,i({},t.ID,t))},{}),(0,l.default)(a({},e,i({},r,n))) case c.default.FETCH_RECORD_REQUEST:return e case c.default.FETCH_RECORD_FAILURE:return e case c.default.FETCH_RECORD_SUCCESS:if(r=t.payload.recordType,o=t.payload.data,!r)throw new Error("Undefined record type") return(0,l.default)(a({},e,i({},r,a({},e[r],i({},o.ID,o))))) case c.default.DELETE_RECORD_REQUEST:return e case c.default.DELETE_RECORD_FAILURE:return e case c.default.DELETE_RECORD_SUCCESS:return r=t.payload.recordType,n=e[r],n=Object.keys(n).reduce(function(e,r){return parseInt(r,10)!==parseInt(t.payload.id,10)?a({},e,i({},r,n[r])):e},{}),(0,l.default)(a({},e,i({},r,n))) default:return e}}Object.defineProperty(t,"__esModule",{value:!0}) var a=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1] switch(t.type){case u.default.SET_CAMPAIGN_SELECTED_CHANGESETITEM:return(0,s.default)(o({},e,{changeSetItemId:t.payload.changeSetItemId})) case u.default.SET_CAMPAIGN_ACTIVE_CHANGESET:return(0,s.default)(o({},e,{campaignId:t.payload.campaignId,view:t.payload.view,changeSetItemId:null})) case u.default.PUBLISH_CAMPAIGN_REQUEST:return(0,s.default)(o({},e,{isPublishing:!0})) case u.default.PUBLISH_CAMPAIGN_SUCCESS:case u.default.PUBLISH_CAMPAIGN_FAILURE:return(0,s.default)(o({},e,{isPublishing:!1})) default:return e}}Object.defineProperty(t,"__esModule",{value:!0}) var o=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:c,t=arguments[1] switch(t.type){case u.default.SET_BREADCRUMBS:return(0,s.default)(o([],t.payload.breadcrumbs)) default:return e}}Object.defineProperty(t,"__esModule",{value:!0}) var o=Object.assign||function(e){for(var t=1;t-1}).map(function(e){return""+e.value }) this.props.onChange(o)}}},{key:"getOptionProps",value:function e(t,n){var r=this.getValues(),i=this.getItemKey(t,n) return{key:i,id:i,name:this.props.name,className:this.props.itemClass,disabled:t.disabled||this.props.disabled,readOnly:this.props.readOnly,onChange:this.handleChange,value:r.indexOf(""+t.value)>-1,title:t.title, type:"checkbox"}}},{key:"render",value:function e(){var t=this return this.props.source?u.default.createElement("div",null,this.props.source.map(function(e,n){return u.default.createElement(p.default,t.getOptionProps(e,n))})):null}}]),t}(d.default) g.propTypes={className:u.default.PropTypes.string,extraClass:u.default.PropTypes.string,itemClass:u.default.PropTypes.string,id:u.default.PropTypes.string,name:u.default.PropTypes.string.isRequired,source:u.default.PropTypes.arrayOf(u.default.PropTypes.shape({ value:u.default.PropTypes.oneOfType([u.default.PropTypes.string,u.default.PropTypes.number]),title:u.default.PropTypes.any,disabled:u.default.PropTypes.bool})),onChange:u.default.PropTypes.func,value:u.default.PropTypes.any, readOnly:u.default.PropTypes.bool,disabled:u.default.PropTypes.bool},g.defaultProps={extraClass:"",className:"",value:[]},t.CheckboxSetField=g,t.default=(0,m.default)(g)},function(e,t,n){"use strict" function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t) e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{ value:!0}),t.OptionsetField=void 0 var s=function(){function e(e,t){for(var n=0;n1){var n=this.props.breadcrumbs[this.props.breadcrumbs.length-2] n&&n.href&&(t.preventDefault(),this.props.router.push(n.href))}}},{key:"render",value:function e(){var t=null switch(this.props.params.view){case"show":t=this.renderItemListView() break case"edit":t=this.renderDetailEditView() break case"create":t=this.renderCreateView() break default:t=this.renderIndexView()}return t}},{key:"renderIndexView",value:function e(){var t=this.props.sectionConfig.form.EditForm.schemaUrl,n={title:S.default._t("Campaigns.ADDCAMPAIGN"),icon:"plus",handleClick:this.addCampaign.bind(this) },r={createFn:this.campaignListCreateFn.bind(this),schemaUrl:t} return p.default.createElement("div",{className:"fill-height","aria-expanded":"true"},p.default.createElement(x.default,null,p.default.createElement(C.default,{multiline:!0})),p.default.createElement("div",{ className:"panel panel--padded panel--scrollable flexbox-area-grow"},p.default.createElement("div",{className:"toolbar toolbar--content"},p.default.createElement("div",{className:"btn-toolbar"},p.default.createElement(k.default,n))),p.default.createElement(I.default,r))) }},{key:"renderItemListView",value:function e(){var t={sectionConfig:this.props.sectionConfig,campaignId:this.props.params.id,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi, handleBackButtonClick:this.handleBackButtonClick.bind(this)} return p.default.createElement(D.default,t)}},{key:"renderDetailEditView",value:function e(){var t=this.props.sectionConfig.form.DetailEditForm.schemaUrl,n=t this.props.params.id>0&&(n=t+"/"+this.props.params.id) var r={createFn:this.campaignEditCreateFn.bind(this),schemaUrl:n} return p.default.createElement("div",{className:"fill-height"},p.default.createElement(x.default,{showBackButton:!0,handleBackButtonClick:this.handleBackButtonClick},p.default.createElement(C.default,{ multiline:!0})),p.default.createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p.default.createElement(I.default,r)))}},{key:"renderCreateView",value:function e(){ var t=this.props.sectionConfig.form.DetailEditForm.schemaUrl,n=t this.props.params.id>0&&(n=t+"/"+this.props.params.id) var r={createFn:this.campaignAddCreateFn.bind(this),schemaUrl:n} return p.default.createElement("div",{className:"fill-height"},p.default.createElement(x.default,{showBackButton:!0,handleBackButtonClick:this.handleBackButtonClick},p.default.createElement(C.default,{ multiline:!0})),p.default.createElement("div",{className:"panel panel--padded panel--scrollable flexbox-area-grow form--inline"},p.default.createElement(I.default,r)))}},{key:"campaignEditCreateFn",value:function e(t,n){ var r=this,i=this.props.sectionConfig.url if("action_cancel"===n.name){var o=c({},n,{handleClick:function e(t){t.preventDefault(),r.props.router.push(i)}}) return p.default.createElement(t,c({key:n.id},o))}return p.default.createElement(t,c({key:n.id},n))}},{key:"campaignAddCreateFn",value:function e(t,n){var r=this,i=this.props.sectionConfig.url if("action_cancel"===n.name){var o=c({},n,{handleClick:function e(t){t.preventDefault(),r.props.router.push(i)}}) return p.default.createElement(t,c({key:n.name},o))}return p.default.createElement(t,c({key:n.name},n))}},{key:"campaignListCreateFn",value:function e(t,n){var r=this,i=this.props.sectionConfig.url,o="set" if("GridField"===n.schemaComponent){var a=c({},n,{data:c({},n.data,{handleDrillDown:function e(t,n){r.props.router.push(i+"/"+o+"/"+n.ID+"/show")},handleEditRecord:function e(t,n){r.props.router.push(i+"/"+o+"/"+n+"/edit") }})}) return p.default.createElement(t,c({key:a.name},a))}return p.default.createElement(t,c({key:n.name},n))}},{key:"addCampaign",value:function e(){var t=this.getActionRoute(0,"create") this.props.router.push(t)}},{key:"getActionRoute",value:function e(t,n){return this.props.sectionConfig.url+"/set/"+t+"/"+n}}]),t}(P.default) M.propTypes={breadcrumbsActions:p.default.PropTypes.object.isRequired,campaignId:p.default.PropTypes.string,sectionConfig:p.default.PropTypes.object.isRequired,securityId:p.default.PropTypes.string.isRequired, view:p.default.PropTypes.string},t.default=(0,g.withRouter)((0,h.connect)(l,u)(M))},function(e,t){e.exports=BreadcrumbsActions},function(e,t){e.exports=Breadcrumb},function(e,t){e.exports=Toolbar},function(e,t,n){ "use strict" function r(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]) return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t) e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n=null,r=t.sectionConfig.treeClass return e.records&&e.records[r]&&t.campaignId&&(n=e.records[r][parseInt(t.campaignId,10)]),{config:e.config,record:n||{},campaign:e.campaign,treeClass:r}}function u(e){return{breadcrumbsActions:(0,m.bindActionCreators)(v,e), recordActions:(0,m.bindActionCreators)(_,e),campaignActions:(0,m.bindActionCreators)(C,e)}}Object.defineProperty(t,"__esModule",{value:!0}) var c=Object.assign||function(e){for(var t=1;t