mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix for IE, added ability to adjust panel height based on the amount of toolbars
This commit is contained in:
parent
35a2e13085
commit
95e4415288
4
admin/client/dist/js/bundle-framework.js
vendored
4
admin/client/dist/js/bundle-framework.js
vendored
@ -1,3 +1,3 @@
|
||||
!function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(){h["default"].add("config",v["default"]),h["default"].add("schemas",E["default"]),h["default"].add("records",w["default"]),h["default"].add("campaign",C["default"]);var e={},t=(0,c.combineReducers)(h["default"].getAll()),r=(0,c.applyMiddleware)(l["default"],(0,p["default"])())(c.createStore);window.store=r(t,e),window.store.dispatch(y.setConfig(window.ss.config))}var a=e("jQuery"),s=o(a),c=e("redux"),u=e("redux-thunk"),l=o(u),f=e("redux-logger"),p=o(f),d=e("reducer-register"),h=o(d),m=e("state/config/actions"),y=n(m),b=e("state/config/reducer"),v=o(b),g=e("state/schema/reducer"),E=o(g),_=e("state/records/reducer"),w=o(_),O=e("state/campaign/reducer"),C=o(O),T=e("sections/campaign-admin/index");o(T);(0,s["default"])("body").entwine({onadd:function(){return i()}})},{jQuery:"jQuery","reducer-register":"reducer-register",redux:"redux","redux-logger":31,"redux-thunk":"redux-thunk","sections/campaign-admin/index":8,"state/campaign/reducer":14,"state/config/actions":16,"state/config/reducer":17,"state/records/reducer":20,"state/schema/reducer":22}],2:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l);e("bootstrap-collapse");var p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",r="#"+t,n={id:t,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e};return u["default"].createElement("div",{className:"accordion-group"},u["default"].createElement("h6",{className:"accordion-group__title",role:"tab",id:e},u["default"].createElement("a",{"data-toggle":"collapse",href:r,"aria-expanded":"true","aria-controls":t},this.props.title)),u["default"].createElement("div",n,this.props.children))},t}(f["default"]);r["default"]=p},{"bootstrap-collapse":"bootstrap-collapse",react:"react","silverstripe-component":"silverstripe-component"}],3:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{role:"tablist","aria-multiselectable":"true"},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],4:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e="list-group-item "+this.props.className;return u["default"].createElement("a",{tabIndex:"0",className:e},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item"},u["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},u["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last text-truncate",key:t},e.text))]}))},t}(f["default"]);p.propTypes={crumbs:u["default"].PropTypes.array},r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],6:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{className:"cms-content__right preview"},u["default"].createElement("iframe",{className:"preview__iframe",src:this.props.previewUrl}),u["default"].createElement("div",{className:"preview__overlay"},u["default"].createElement("h3",{className:"preview__overlay-text"},"There is no preview available for this item.")),u["default"].createElement("div",{className:"preview__file-container panel-scrollable"},u["default"].createElement("img",{className:"preview__file",src:"http://placehold.it/250x150"})),u["default"].createElement("div",{className:"toolbar--south"},u["default"].createElement("div",{className:"btn-toolbar"},u["default"].createElement("button",{className:"btn btn-secondary btn-secondary",type:"button"},u["default"].createElement("i",{className:"font-icon-edit"})," Edit"),u["default"].createElement("button",{type:"button","data-container":"body",className:"btn btn-link btn--options","data-toggle":"popover",title:"Page actions","data-placement":"top","data-content":"<a href=''>Add to campaign</a><a href=''>Remove from campaign</a>"},u["default"].createElement("i",{className:"font-icon-dot-3"})))))},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],7:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(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):i(e,t))}function u(e,t){return{config:e.config,sectionConfig:e.config.sections[t.sectionConfigKey],campaignId:e.campaign.campaignId,view:e.campaign.view}}function l(e){return{actions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),m=e("react-redux"),y=e("silverstripe-backend"),b=o(y),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/form-action/index"),O=o(w),C=e("i18n"),T=o(C),j=e("components/north-header/index"),S=o(j),R=e("components/form-builder/index"),P=o(R),A=e("./list"),x=o(A),D=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.addCampaign=n.addCampaign.bind(n),n.createFn=n.createFn.bind(n),n.publishApi=b["default"].createEndpointFetcher({url:n.props.sectionConfig.publishEndpoint.url,method:n.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:n.props.config.SecurityID},payloadSchema:{id:{urlReplacement:":id",remove:!0}}}),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var r=!0,n=window.ss.router.resolveURLToBase(this.props.sectionConfig.campaignViewRoute);window.ss.router(n,function(e,n){r?t.props.actions.showCampaignView(e.params.id,e.params.view):n()}),window.ss.router.exit(n,function(e,t){var o=window.ss.router.routeAppliesToCurrentLocation(n);o||(r=!1),t()})},t.prototype.render=function(){var e=null;switch(this.props.view){case"show":e=this.renderItemListView();break;case"edit":e=this.renderDetailEditView();break;default:e=this.renderIndexView()}return e},t.prototype.renderIndexView=function(){var e=this.props.sectionConfig.forms.editForm.schemaUrl;return d["default"].createElement("div",{className:"cms-content__inner no-preview"},d["default"].createElement("div",{className:"cms-content__left cms-campaigns collapse in","aria-expanded":"true"},d["default"].createElement(S["default"],null,d["default"].createElement("div",{className:"breadcrumb breadcrumb--current-only"},d["default"].createElement("h2",{className:"text-truncate breadcrumb__item-title breadcrumb__item-title--last"},"Campaigns"))),d["default"].createElement("div",{className:"panel-scrollable"},d["default"].createElement("div",{className:"toolbar--content"},d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(O["default"],{label:T["default"]._t("Campaigns.ADDCAMPAIGN"),icon:"plus",handleClick:this.addCampaign}))),d["default"].createElement(P["default"],{schemaUrl:e,createFn:this.createFn}))))},t.prototype.renderItemListView=function(){var e={campaignId:this.props.campaignId,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi,breadcrumbs:this.getBreadcrumbs()};return d["default"].createElement(x["default"],e)},t.prototype.renderDetailEditView=function(){return d["default"].createElement("p",null,"Edit")},t.prototype.createFn=function(e,t){var r=this.props.sectionConfig.campaignViewRoute;if("GridField"===t.component){var n=f({},t,{data:f({},t.data,{handleDrillDown:function(e,t){var n=r.replace(/:type\?/,"set").replace(/:id\?/,t.ID).replace(/:view\?/,"show");window.ss.router.show(n)}})});return d["default"].createElement(e,f({key:n.name},n))}return d["default"].createElement(e,f({key:t.name},t))},t.prototype.getBreadcrumbs=function(){return[{text:"Campaigns",href:"admin/campaigns"},{text:"March release",href:"admin/campaigns/show/1"}]},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.addCampaign=function(){},t}(_["default"]);D.propTypes={sectionConfig:d["default"].PropTypes.shape({forms:d["default"].PropTypes.shape({editForm:d["default"].PropTypes.shape({schemaUrl:d["default"].PropTypes.string})})}),config:d["default"].PropTypes.shape({SecurityID:d["default"].PropTypes.string}),sectionConfigKey:d["default"].PropTypes.string.isRequired},r["default"]=(0,m.connect)(u,l)(D)},{"./list":10,"components/form-action/index":"components/form-action/index","components/form-builder/index":"components/form-builder/index","components/north-header/index":"components/north-header/index",i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-backend":"silverstripe-backend","silverstripe-component":"silverstripe-component","state/campaign/actions":13}],8:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("jQuery"),i=n(o),a=e("react"),s=n(a),c=e("react-dom"),u=n(c),l=e("react-redux"),f=e("./controller"),p=n(f);i["default"].entwine("ss",function(e){e(".cms-content.CampaignAdmin").entwine({onadd:function(){u["default"].render(s["default"].createElement(l.Provider,{store:window.store},s["default"].createElement(p["default"],{sectionConfigKey:"CampaignAdmin"})),this[0])},onremove:function(){u["default"].unmountComponentAtNode(this[0])}})})},{"./controller":7,jQuery:"jQuery",react:"react","react-dom":"react-dom","react-redux":"react-redux"}],9:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=e("i18n"),d=n(p),h=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=null,t={},r=this.props.item,n=this.props.campaign;if("open"===n.State)switch(r.ChangeType){case"created":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.DRAFT","Draft");break;case"modified":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.MODIFIED","Modified");break;case"deleted":t.className="label label-error list-group-item__status",t.Title=d["default"]._t("CampaignItem.REMOVED","Removed");break;case"none":default:t.className="label label-success list-group-item__status",t.Title=d["default"]._t("CampaignItem.NO_CHANGES","No changes")}var o=u["default"].createElement("span",{className:"list-group-item--has-links"},u["default"].createElement("i",{className:"font-icon-link"}),"3 linked items");return r.Thumbnail&&(e=u["default"].createElement("span",{className:"list-group-item__thumbnail"},u["default"].createElement("img",{src:r.Thumbnail}))),u["default"].createElement("div",null,e,u["default"].createElement("h4",{className:"list-group-item__heading"},r.Title),u["default"].createElement("span",{className:"list-group-item--is-linked"},u["default"].createElement("i",{className:"font-icon-link"})),o,t.className&&t.Title&&u["default"].createElement("span",{className:t.className},t.Title))},t}(f["default"]);h.propTypes={campaign:u["default"].PropTypes.object.isRequired,item:u["default"].PropTypes.object.isRequired},r["default"]=h},{i18n:"i18n",react:"react","silverstripe-component":"silverstripe-component"}],10:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(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):i(e,t))}function u(e,t){var r=null;return e.records&&e.records.ChangeSet&&t.campaignId&&(r=e.records.ChangeSet[parseInt(t.campaignId,10)]),{record:r||{},campaign:e.campaign}}function l(e){return{recordActions:(0,h.bindActionCreators)(b,e),campaignActions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),m=e("react-redux"),y=e("state/records/actions"),b=n(y),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/accordion/index"),O=o(w),C=e("components/accordion/group"),T=o(C),j=e("components/accordion/item"),S=o(j),R=e("components/north-header/index"),P=o(R),A=e("components/form-action/index"),x=o(A),D=e("./item"),N=o(D),I=e("components/breadcrumb/index"),F=o(I),U=e("components/preview/index"),L=o(U),M=e("i18n"),H=o(M),k=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.handlePublish=n.handlePublish.bind(n),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this.props.itemListViewEndpoint.replace(/:id/,this.props.campaignId);e.prototype.componentDidMount.call(this),this.props.recordActions.fetchRecord("ChangeSet","get",t)},t.prototype.render=function(){var e=this,t=1,r=this.props.campaignId,n=this.props.record,o=this.previewURLForItem(t),i=this.groupItemsForSet(),a=o?"cms-content__split cms-content__split--left-sm":"cms-content__split cms-content__split--none",s=[];return Object.keys(i).forEach(function(t){var o=i[t],a=o.items.length,c=[],u=a+" "+(1===a?o.singular:o.plural),l="Set_"+r+"_Group_"+t;o.items.forEach(function(t){var r="";"none"!==t.ChangeType&&"published"!==n.State||(r="list-group-item--published"),c.push(d["default"].createElement(S["default"],{key:t.ID,className:r},d["default"].createElement(N["default"],{item:t,campaign:e.props.record})))}),s.push(d["default"].createElement(T["default"],{key:l,groupid:l,title:u},c))}),d["default"].createElement("div",{className:a},d["default"].createElement("div",{className:"cms-content__left collapse in","aria-expanded":"true"},d["default"].createElement(P["default"],null,d["default"].createElement(F["default"],{crumbs:this.props.breadcrumbs,multiline:!0})),d["default"].createElement("div",{className:"container-fluid campaign-items panel-scrollable"},d["default"].createElement(O["default"],null,s)),d["default"].createElement("div",{className:"toolbar--south"},this.renderButtonToolbar())),o&&d["default"].createElement(L["default"],{previewUrl:o}))},t.prototype.renderButtonToolbar=function(){var e=this.getItems();if(!e)return d["default"].createElement("div",{className:"btn-toolbar"});var t={};return"open"===this.props.record.State?t=f(t,{label:H["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"success",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"}):"published"===this.props.record.State&&(t=f(t,{label:H["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(x["default"],t))},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.getItems=function(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.ChangeSetItems:null},t.prototype.groupItemsForSet=function(){var e={},t=this.getItems();return t?(t.forEach(function(t){var r=t.BaseClass;e[r]||(e[r]={singular:t.Singular,plural:t.Plural,items:[]}),e[r].items.push(t)}),e):e},t.prototype.handlePublish=function(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.campaignId)},t}(_["default"]);k.propTypes={campaign:d["default"].PropTypes.shape({isPublishing:d["default"].PropTypes.bool.isRequired}),campaignActions:d["default"].PropTypes.object.isRequired,publishApi:d["default"].PropTypes.func.isRequired,record:d["default"].PropTypes.object.isRequired,recordActions:d["default"].PropTypes.object.isRequired},r["default"]=(0,m.connect)(u,l)(k)},{"./item":9,"components/accordion/group":2,"components/accordion/index":3,"components/accordion/item":4,"components/breadcrumb/index":5,"components/form-action/index":"components/form-action/index","components/north-header/index":"components/north-header/index","components/preview/index":6,i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/campaign/actions":13,"state/records/actions":19}],11:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=void 0,r=void 0;if(!(e.status>=200&&e.status<300))throw r=new Error(e.statusText),r.response=e,r;return t=e}Object.defineProperty(r,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=e("isomorphic-fetch"),u=n(c),l=e("es6-promise"),f=n(l),p=e("qs"),d=n(p),h=e("merge"),m=n(h);f["default"].polyfill();var y=function(){function e(){i(this,e),this.fetch=u["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return d["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 r(e,t){switch(e){case"application/x-www-form-urlencoded":return d["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 n(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function i(e){return e.text().then(function(t){return r(e.headers.get("Content-Type"),t)})}function a(e,t){return Object.keys(t).reduce(function(r,n){var i=e[n];return!i||i.remove!==!0&&i.querystring!==!0?s(r,o({},n,t[n])):r},{})}function c(e,r,i){var a=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],c=r,u=Object.keys(i).reduce(function(t,r){var n=e[r],c=a.setFromData===!0&&!(n&&n.remove===!0),u=n&&n.querystring===!0&&n.remove!==!0;return c||u?s(t,o({},r,i[r])):t},{});return c=n(c,t("application/x-www-form-urlencoded",u)),c=Object.keys(e).reduce(function(t,r){var n=e[r].urlReplacement;return n?t.replace(n,i[r]):t},c)}var u=this,l=s({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),f={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){f[l[e]]&&(l[e]=f[l[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r={Accept:l.responseFormat,"Content-Type":l.payloadFormat},n=m["default"].recursive({},l.defaultData,e),o=c(l.payloadSchema,l.url,n,{setFromData:"get"===l.method.toLowerCase()}),s=t(l.payloadFormat,a(l.payloadSchema,n)),f="get"===l.method.toLowerCase()?[o,r]:[o,s,r];return u[l.method].apply(u,f).then(i)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(a)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:s({},n,r),credentials:"same-origin",body:t}).then(a)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:r}).then(a)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:r}).then(a)},e}(),b=new y;r["default"]=b},{"es6-promise":24,"isomorphic-fetch":25,merge:26,qs:27}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CAMPAIGN_ACTIVE_CHANGESET:"SET_CAMPAIGN_ACTIVE_CHANGESET",PUBLISH_CAMPAIGN_REQUEST:"PUBLISH_CAMPAIGN_REQUEST",PUBLISH_CAMPAIGN_SUCCESS:"PUBLISH_CAMPAIGN_SUCCESS",PUBLISH_CAMPAIGN_FAILURE:"PUBLISH_CAMPAIGN_FAILURE"}},{}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return{type:s["default"].SET_CAMPAIGN_ACTIVE_CHANGESET,payload:{campaignId:e,view:t}}}function i(e,t){return function(r){r({type:s["default"].PUBLISH_CAMPAIGN_REQUEST,payload:{campaignId:t}}),e({id:t}).then(function(e){r({type:s["default"].PUBLISH_CAMPAIGN_SUCCESS,payload:{campaignId:t}}),r({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:"ChangeSet",data:e}})})["catch"](function(e){r({type:s["default"].PUBLISH_CAMPAIGN_FAILURE,payload:{error:e}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.showCampaignView=o,r.publishCampaign=i;var a=e("./action-types"),s=n(a),c=e("state/records/action-types"),u=n(c)},{"./action-types":12,"state/records/action-types":18}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?l:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CAMPAIGN_ACTIVE_CHANGESET:return(0,s["default"])(i({},e,{campaignId:t.payload.campaignId,view:t.payload.view}));case u["default"].PUBLISH_CAMPAIGN_REQUEST:return(0,s["default"])(i({},e,{isPublishing:!0}));case u["default"].PUBLISH_CAMPAIGN_SUCCESS:case u["default"].PUBLISH_CAMPAIGN_FAILURE:return(0,s["default"])(i({},e,{isPublishing:!1}));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c),l={campaignId:null,isPublishing:!1,view:null};r["default"]=o},{"./action-types":12,"deep-freeze":"deep-freeze"}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CONFIG:"SET_CONFIG"}},{}],16:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:a["default"].SET_CONFIG,payload:{config:e}}}Object.defineProperty(r,"__esModule",{value:!0}),r.setConfig=o;var i=e("./action-types"),a=n(i)},{"./action-types":15}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CONFIG:return(0,s["default"])(i({},e,t.payload.config));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c);r["default"]=o},{"./action-types":15,"deep-freeze":"deep-freeze"}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["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"}},{}],19:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r=["id"];return r.reduce(function(e,r){return e.replace(":"+r,t[r])},e)}function i(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORDS_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORDS_FAILURE,payload:{error:r,recordType:e}})})}}function a(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORD_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORD_FAILURE,payload:{error:r,recordType:e}})})}}function s(e,t,r,n){var i={recordType:e,id:t};return function(a){return a({type:u["default"].DELETE_RECORD_REQUEST,payload:i}),f["default"][r.toLowerCase()](o(n,i)).then(function(){a({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})["catch"](function(r){a({type:u["default"].DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchRecords=i,r.fetchRecord=a,r.deleteRecord=s;var c=e("./action-types"),u=n(c),l=e("silverstripe-backend.js"),f=n(l)},{"./action-types":18,"silverstripe-backend.js":11}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments[1],r=void 0,n=void 0,i=void 0;switch(t.type){case l["default"].CREATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].UPDATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].DELETE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].FETCH_RECORDS_REQUEST:return e;case l["default"].FETCH_RECORDS_FAILURE:return e;case l["default"].FETCH_RECORDS_SUCCESS:return n=t.payload.recordType,r=t.payload.data._embedded[n+"s"]||{},r=r.reduce(function(e,t){return a({},e,o({},t.id,t))},{}),(0,c["default"])(a({},e,o({},n,r)));case l["default"].FETCH_RECORD_REQUEST:return e;case l["default"].FETCH_RECORD_FAILURE:return e;case l["default"].FETCH_RECORD_SUCCESS:return n=t.payload.recordType,i=t.payload.data,(0,c["default"])(a({},e,o({},n,a({},e[n],o({},i.ID,i)))));case l["default"].DELETE_RECORD_REQUEST:return e;case l["default"].DELETE_RECORD_FAILURE:return e;case l["default"].DELETE_RECORD_SUCCESS:return n=t.payload.recordType,r=e[n],r=Object.keys(r).reduce(function(e,n){return parseInt(n,10)!==parseInt(t.payload.id,10)?a({},e,o({},n,r[n])):e},{}),(0,c["default"])(a({},e,o({},n,r)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f={};r["default"]=i},{"./action-types":18,"deep-freeze":"deep-freeze"}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={SET_SCHEMA:"SET_SCHEMA"};r["default"]=n},{}],22:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];switch(t.type){case l["default"].SET_SCHEMA:var r=t.payload.schema.schema_url;return(0,c["default"])(a({},e,o({},r,t.payload)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};r["default"]=i;var s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f=(0,c["default"])({})},{"./action-types":21,"deep-freeze":"deep-freeze"}],23:[function(e,t,r){function n(){l=!1,s.length?u=s.concat(u):f=-1,u.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,c=t.exports={},u=[],l=!1,f=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new i(e,t)),1!==u.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],24:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function a(e){V=e}function s(e){X=e}function c(){return function(){r.nextTick(d)}}function u(){return function(){Q(d)}}function l(){var e=0,t=new W(d),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function f(){var e=new MessageChannel;return e.port1.onmessage=d,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(d,1)}}function d(){for(var e=0;J>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}J=0}function h(){try{var t=e,r=t("vertx");return Q=r.runOnLoop||r.runOnContext,u()}catch(n){return p()}}function m(e,t){var r=this,n=r._state;if(n===ie&&!e||n===ae&&!t)return this;var o=new this.constructor(b),i=r._result;if(n){var a=arguments[n-1];X(function(){N(n,o,a,i)})}else P(r,o,e,t);return o}function y(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(b);return T(r,e),r}function b(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function E(e){try{return e.then}catch(t){return se.error=t,se}}function _(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function w(e,t,r){X(function(e){var n=!1,o=_(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,R(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,R(e,o))},e)}function O(e,t){t._state===ie?S(e,t._result):t._state===ae?R(e,t._result):P(t,void 0,function(t){T(e,t)},function(t){R(e,t)})}function C(e,t,r){t.constructor===e.constructor&&r===re&&constructor.resolve===ne?O(e,t):r===se?R(e,se.error):void 0===r?S(e,t):i(r)?w(e,t,r):S(e,t)}function T(e,t){e===t?R(e,v()):o(t)?C(e,t,E(t)):S(e,t)}function j(e){e._onerror&&e._onerror(e._result),A(e)}function S(e,t){e._state===oe&&(e._result=t,e._state=ie,0!==e._subscribers.length&&X(A,e))}function R(e,t){e._state===oe&&(e._state=ae,e._result=t,X(j,e))}function P(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ie]=r,o[i+ae]=n,0===i&&e._state&&X(A,e)}function A(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?N(r,n,o,i):o(i);e._subscribers.length=0}}function x(){this.error=null}function D(e,t){try{return e(t)}catch(r){return ce.error=r,ce}}function N(e,t,r,n){var o,a,s,c,u=i(r);if(u){if(o=D(r,n),o===ce?(c=!0,a=o.error,o=null):s=!0,t===o)return void R(t,g())}else o=n,s=!0;t._state!==oe||(u&&s?T(t,o):c?R(t,a):e===ie?S(t,o):e===ae&&R(t,o))}function I(e,t){try{t(function(t){T(e,t)},function(t){R(e,t)})}catch(r){R(e,r)}}function F(e){return new he(this,e).promise}function U(e){function t(e){T(o,e)}function r(e){R(o,e)}var n=this,o=new n(b);if(!K(e))return R(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,a=0;o._state===oe&&i>a;a++)P(n.resolve(e[a]),void 0,t,r);return o}function L(e){var t=this,r=new t(b);return R(r,e),r}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function k(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&M(),this instanceof k?I(this,e):H())}function B(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):R(this.promise,this._validationError())}function G(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(e.Promise=de)}var q;q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,V,z,K=q,J=0,X=function(e,t){te[J]=e,te[J+1]=t,J+=2,2===J&&(V?V(d):z())},Y="undefined"!=typeof window?window:void 0,$=Y||{},W=$.MutationObserver||$.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);z=Z?c():W?l():ee?f():void 0===Y&&"function"==typeof e?h():p();var re=m,ne=y,oe=void 0,ie=1,ae=2,se=new x,ce=new x,ue=F,le=U,fe=L,pe=0,de=k;k.all=ue,k.race=le,k.resolve=ne,k.reject=fe,k._setScheduler=a,k._setAsap=s,k._asap=X,k.prototype={constructor:k,then:re,"catch":function(e){return this.then(null,e)}};var he=B;B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===oe&&e>r;r++)this._eachEntry(t[r],r)},B.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===ne){var o=E(e);if(o===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===de){var i=new r(b);C(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r(function(t){t(e)}),t)}else this._willSettleAt(n(e),t)},B.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===oe&&(this._remaining--,e===ae?R(n,r):this._result[t]=r),0===this._remaining&&S(n,this._result)},B.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,function(e){r._settledAt(ie,t,e)},function(e){r._settledAt(ae,t,e)})};var me=G,ye={Promise:de,polyfill:me};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),me()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:23}],25:[function(e,t,r){e("whatwg-fetch"),t.exports=self.fetch.bind(self)},{"whatwg-fetch":32}],26:[function(e,t,r){!function(e){function r(e,t){if("object"!==o(e))return t;for(var n in t)"object"===o(e[n])&&"object"===o(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function n(e,t,n){var a=n[0],s=n.length;(e||"object"!==o(a))&&(a={});for(var c=0;s>c;++c){var u=n[c],l=o(u);if("object"===l)for(var f in u){var p=e?i.clone(u[f]):u[f];t?a[f]=r(a[f],p):a[f]=p}}return a}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var i=function(e){return n(e===!0,!1,arguments)},a="merge";i.recursive=function(e){return n(e===!0,!0,arguments)},i.clone=function(e){var t,r,n=e,a=o(e);if("array"===a)for(n=[],r=e.length,t=0;r>t;++t)n[t]=i.clone(e[t]);else if("object"===a){n={};for(t in e)n[t]=i.clone(e[t])}return n},e?t.exports=i:window[a]=i}("object"==typeof t&&t&&"object"==typeof t.exports&&t.exports)},{}],27:[function(e,t,r){"use strict";var n=e("./stringify"),o=e("./parse");t.exports={stringify:n,parse:o}},{"./parse":28,"./stringify":29}],28:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};o.parseValues=function(e,t){for(var r={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<o.length;++i){var a=o[i],s=-1===a.indexOf("]=")?a.indexOf("="):a.indexOf("]=")+1;if(-1===s)r[n.decode(a)]="",t.strictNullHandling&&(r[n.decode(a)]=null);else{var c=n.decode(a.slice(0,s)),u=n.decode(a.slice(s+1));Object.prototype.hasOwnProperty.call(r,c)?r[c]=[].concat(r[c]).concat(u):r[c]=u}}return r},o.parseObject=function(e,t,r){if(!e.length)return t;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(o.parseObject(e,t,r));else{n=r.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,s=parseInt(a,10);!isNaN(s)&&i!==a&&String(s)===a&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(n=[],n[s]=o.parseObject(e,t,r)):n[a]=o.parseObject(e,t,r)}return n},o.parseKeys=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,s=i.exec(n),c=[];if(s[1]){if(!r.plainObjects&&Object.prototype.hasOwnProperty(s[1])&&!r.allowPrototypes)return;c.push(s[1])}for(var u=0;null!==(s=a.exec(n))&&u<r.depth;)u+=1,(r.plainObjects||!Object.prototype.hasOwnProperty(s[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&c.push(s[1]);return s&&c.push("["+n.slice(s.index)+"]"),o.parseObject(c,t,r)}},t.exports=function(e,t){var r=t||{};if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?o.parseValues(e,r):e,a=r.plainObjects?Object.create(null):{},s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=o.parseKeys(u,i[u],r);a=n.merge(a,l,r)}return n.compact(a)}},{"./utils":30}],29:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},strictNullHandling:!1,skipNulls:!1,encode:!0};o.stringify=function(e,t,r,i,a,s,c,u,l){var f=e;if("function"==typeof c)f=c(t,f);else if(n.isBuffer(f))f=String(f);else if(f instanceof Date)f=f.toISOString();else if(null===f){if(i)return s?n.encode(t):t;f=""}if("string"==typeof f||"number"==typeof f||"boolean"==typeof f)return s?[n.encode(t)+"="+n.encode(f)]:[t+"="+f];var p=[];if("undefined"==typeof f)return p;var d;if(Array.isArray(c))d=c;else{var h=Object.keys(f);d=u?h.sort(u):h}for(var m=0;m<d.length;++m){var y=d[m];a&&null===f[y]||(p=Array.isArray(f)?p.concat(o.stringify(f[y],r(t,y),r,i,a,s,c,u,l)):p.concat(o.stringify(f[y],t+(l?"."+y:"["+y+"]"),r,i,a,s,c,u,l)))}return p},t.exports=function(e,t){var r,n,i=e,a=t||{},s="undefined"==typeof a.delimiter?o.delimiter:a.delimiter,c="boolean"==typeof a.strictNullHandling?a.strictNullHandling:o.strictNullHandling,u="boolean"==typeof a.skipNulls?a.skipNulls:o.skipNulls,l="boolean"==typeof a.encode?a.encode:o.encode,f="function"==typeof a.sort?a.sort:null,p="undefined"==typeof a.allowDots?!1:a.allowDots;"function"==typeof a.filter?(n=a.filter,i=n("",i)):Array.isArray(a.filter)&&(r=n=a.filter);var d=[];if("object"!=typeof i||null===i)return"";var h;h=a.arrayFormat in o.arrayPrefixGenerators?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var m=o.arrayPrefixGenerators[h];r||(r=Object.keys(i)),f&&r.sort(f);for(var y=0;y<r.length;++y){var b=r[y];u&&null===i[b]||(d=d.concat(o.stringify(i[b],b,m,c,u,l,n,f,p)))}return d.join(s)}},{"./utils":30}],30:[function(e,t,r){"use strict";var n=function(){for(var e=new Array(256),t=0;256>t;++t)e[t]="%"+((16>t?"0":"")+t.toString(16)).toUpperCase();return e}();r.arrayToObject=function(e,t){for(var r=t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},r.merge=function(e,t,n){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var o=e;return Array.isArray(e)&&!Array.isArray(t)&&(o=r.arrayToObject(e,n)),Object.keys(t).reduce(function(e,o){var i=t[o];return Object.prototype.hasOwnProperty.call(e,o)?e[o]=r.merge(e[o],i,n):e[o]=i,e},o)},r.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},r.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&57>=i||i>=65&&90>=i||i>=97&&122>=i?r+=t.charAt(o):128>i?r+=n[i]:2048>i?r+=n[192|i>>6]+n[128|63&i]:55296>i||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],o=n.indexOf(e);if(-1!==o)return n[o];if(n.push(e),Array.isArray(e)){for(var i=[],a=0;a<e.length;++a)"undefined"!=typeof e[a]&&i.push(e[a]);return i}for(var s=Object.keys(e),c=0;c<s.length;++c){var u=s[c];e[u]=r.compact(e[u],n)}return e},r.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},r.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}],31:[function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t,r,i){switch("undefined"==typeof e?"undefined":o(e)){case"object":return"function"==typeof e[i]?e[i].apply(e,n(r)):e[i];case"function":return e(t);default:return e}}function a(){function e(){j.forEach(function(e,t){var r=e.started,o=e.startedTime,s=e.action,c=e.prevState,l=e.error,p=e.took,d=e.nextState,m=j[t+1];m&&(d=m.prevState,p=m.started-r);var b=_(s),v="function"==typeof f?f(function(){return d},s):f,g=u(o),E=T.title?"color: "+T.title(b)+";":null,w="action "+(y?g:"")+" "+b.type+" "+(h?"(in "+p.toFixed(2)+" ms)":"");try{v?T.title?a.groupCollapsed("%c "+w,E):a.groupCollapsed(w):T.title?a.group("%c "+w,E):a.group(w)}catch(O){a.log(w)}var C=i(n,b,[c],"prevState"),S=i(n,b,[b],"action"),R=i(n,b,[l,c],"error"),P=i(n,b,[d],"nextState");C&&(T.prevState?a[C]("%c prev state","color: "+T.prevState(c)+"; font-weight: bold",c):a[C]("prev state",c)),S&&(T.action?a[S]("%c action","color: "+T.action(b)+"; font-weight: bold",b):a[S]("action",b)),l&&R&&(T.error?a[R]("%c error","color: "+T.error(l,c)+"; font-weight: bold",l):a[R]("error",l)),P&&(T.nextState?a[P]("%c next state","color: "+T.nextState(d)+"; font-weight: bold",d):a[P]("next state",d));try{a.groupEnd()}catch(O){a.log("—— log end ——")}}),j.length=0}var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.level,n=void 0===r?"log":r,o=t.logger,a=void 0===o?console:o,s=t.logErrors,c=void 0===s?!0:s,f=t.collapsed,p=t.predicate,d=t.duration,h=void 0===d?!1:d,m=t.timestamp,y=void 0===m?!0:m,b=t.transformer,v=t.stateTransformer,g=void 0===v?function(e){return e}:v,E=t.actionTransformer,_=void 0===E?function(e){return e}:E,w=t.errorTransformer,O=void 0===w?function(e){return e}:w,C=t.colors,T=void 0===C?{title:function(){return"#000000"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}}:C;if("undefined"==typeof a)return function(){return function(e){return function(t){return e(t)}}};b&&console.error("Option 'transformer' is deprecated, use stateTransformer instead");var j=[];return function(t){var r=t.getState;return function(t){return function(n){if("function"==typeof p&&!p(r,n))return t(n);var o={};j.push(o),o.started=l.now(),o.startedTime=new Date,o.prevState=g(r()),o.action=n;var i=void 0;if(c)try{i=t(n)}catch(a){o.error=O(a)}else i=t(n);if(o.took=l.now()-o.started,o.nextState=g(r()),e(),o.error)throw o.error;return i}}}}var s=function(e,t){return new Array(t+1).join(e)},c=function(e,t){return s("0",t-e.toString().length)+e},u=function(e){return"@ "+c(e.getHours(),2)+":"+c(e.getMinutes(),2)+":"+c(e.getSeconds(),2)+"."+c(e.getMilliseconds(),3)},l="undefined"!=typeof performance&&"function"==typeof performance.now?performance:Date;t.exports=a},{}],32:[function(e,t,r){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){this.map={},e instanceof n?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function i(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),i(t)}function s(e){var t=new FileReader;return t.readAsText(e),i(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},h.blob?(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this);return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function p(e){var t=new n,r=e.getAllResponseHeaders().trim().split("\n");return r.forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}function d(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof n?t.headers:new n(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){n.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(n)},n.prototype["delete"]=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,n){this.map[t(e)]=[r(n)]},n.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},c.call(l.prototype),c.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var y=[301,302,303,307,308];d.redirect=function(e,t){if(-1===y.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=l,e.Response=d,e.fetch=function(e,t){return new Promise(function(r,n){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void n(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:p(a),url:o()},i="response"in a?a.response:a.responseText;r(new d(i,t))},a.onerror=function(){n(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}]},{},[1]);
|
||||
!function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(){h["default"].add("config",v["default"]),h["default"].add("schemas",E["default"]),h["default"].add("records",w["default"]),h["default"].add("campaign",C["default"]);var e={},t=(0,c.combineReducers)(h["default"].getAll()),r=(0,c.applyMiddleware)(l["default"],(0,p["default"])())(c.createStore);window.store=r(t,e),window.store.dispatch(y.setConfig(window.ss.config))}var a=e("jQuery"),s=o(a),c=e("redux"),u=e("redux-thunk"),l=o(u),f=e("redux-logger"),p=o(f),d=e("reducer-register"),h=o(d),m=e("state/config/actions"),y=n(m),b=e("state/config/reducer"),v=o(b),g=e("state/schema/reducer"),E=o(g),_=e("state/records/reducer"),w=o(_),O=e("state/campaign/reducer"),C=o(O),T=e("sections/campaign-admin/index");o(T);(0,s["default"])("body").entwine({onadd:function(){return i()}})},{jQuery:"jQuery","reducer-register":"reducer-register",redux:"redux","redux-logger":31,"redux-thunk":"redux-thunk","sections/campaign-admin/index":8,"state/campaign/reducer":14,"state/config/actions":16,"state/config/reducer":17,"state/records/reducer":20,"state/schema/reducer":22}],2:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l);e("bootstrap-collapse");var p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=this.props.groupid+"_Header",t=this.props.groupid+"_Items",r="#"+t,n={id:t,"aria-expanded":!0,className:"list-group list-group-flush collapse in",role:"tabpanel","aria-labelledby":e};return u["default"].createElement("div",{className:"accordion-group"},u["default"].createElement("h6",{className:"accordion-group__title",role:"tab",id:e},u["default"].createElement("a",{"data-toggle":"collapse",href:r,"aria-expanded":"true","aria-controls":t},this.props.title)),u["default"].createElement("div",n,this.props.children))},t}(f["default"]);r["default"]=p},{"bootstrap-collapse":"bootstrap-collapse",react:"react","silverstripe-component":"silverstripe-component"}],3:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{role:"tablist","aria-multiselectable":"true"},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],4:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e="list-group-item "+this.props.className;return u["default"].createElement("a",{tabIndex:"0",className:e},this.props.children)},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],5:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item"},u["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[u["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},u["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:t},e.text))]}))},t}(f["default"]);p.propTypes={crumbs:u["default"].PropTypes.array},r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],6:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){return u["default"].createElement("div",{className:"cms-content__right preview"},u["default"].createElement("iframe",{className:"preview__iframe",src:this.props.previewUrl}),u["default"].createElement("div",{className:"preview__overlay"},u["default"].createElement("h3",{className:"preview__overlay-text"},"There is no preview available for this item.")),u["default"].createElement("div",{className:"preview__file-container panel-scrollable"},u["default"].createElement("img",{className:"preview__file--fits-space",src:"http://placehold.it/250x150"})),u["default"].createElement("div",{className:"toolbar--south"},u["default"].createElement("div",{className:"btn-toolbar"},u["default"].createElement("button",{className:"btn btn-secondary btn-secondary",type:"button"},u["default"].createElement("i",{className:"font-icon-edit"})," Edit"),u["default"].createElement("button",{type:"button","data-container":"body",className:"btn btn-link btn--options","data-toggle":"popover",title:"Page actions","data-placement":"top","data-content":"<a href=''>Add to campaign</a><a href=''>Remove from campaign</a>"},u["default"].createElement("i",{className:"font-icon-dot-3"})))))},t}(f["default"]);r["default"]=p},{react:"react","silverstripe-component":"silverstripe-component"}],7:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(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):i(e,t))}function u(e,t){return{config:e.config,sectionConfig:e.config.sections[t.sectionConfigKey],campaignId:e.campaign.campaignId,view:e.campaign.view}}function l(e){return{actions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),m=e("react-redux"),y=e("silverstripe-backend"),b=o(y),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/form-action/index"),O=o(w),C=e("i18n"),T=o(C),j=e("components/north-header/index"),S=o(j),R=e("components/form-builder/index"),P=o(R),A=e("./list"),x=o(A),D=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.addCampaign=n.addCampaign.bind(n),n.createFn=n.createFn.bind(n),n.publishApi=b["default"].createEndpointFetcher({url:n.props.sectionConfig.publishEndpoint.url,method:n.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:n.props.config.SecurityID},payloadSchema:{id:{urlReplacement:":id",remove:!0}}}),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this);var r=!0,n=window.ss.router.resolveURLToBase(this.props.sectionConfig.campaignViewRoute);window.ss.router(n,function(e,n){r?t.props.actions.showCampaignView(e.params.id,e.params.view):n()}),window.ss.router.exit(n,function(e,t){var o=window.ss.router.routeAppliesToCurrentLocation(n);o||(r=!1),t()})},t.prototype.render=function(){var e=null;switch(this.props.view){case"show":e=this.renderItemListView();break;case"edit":e=this.renderDetailEditView();break;default:e=this.renderIndexView()}return e},t.prototype.renderIndexView=function(){var e=this.props.sectionConfig.forms.editForm.schemaUrl;return d["default"].createElement("div",{className:"cms-content__inner no-preview"},d["default"].createElement("div",{className:"cms-content__left cms-campaigns collapse in","aria-expanded":"true"},d["default"].createElement(S["default"],null,d["default"].createElement("div",{className:"breadcrumb breadcrumb--current-only"},d["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last"},"Campaigns"))),d["default"].createElement("div",{className:"panel-scrollable--single-toolbar"},d["default"].createElement("div",{className:"toolbar--content"},d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(O["default"],{label:T["default"]._t("Campaigns.ADDCAMPAIGN"),icon:"plus",handleClick:this.addCampaign}))),d["default"].createElement(P["default"],{schemaUrl:e,createFn:this.createFn}))))},t.prototype.renderItemListView=function(){var e={campaignId:this.props.campaignId,itemListViewEndpoint:this.props.sectionConfig.itemListViewEndpoint,publishApi:this.publishApi,breadcrumbs:this.getBreadcrumbs()};return d["default"].createElement(x["default"],e)},t.prototype.renderDetailEditView=function(){return d["default"].createElement("p",null,"Edit")},t.prototype.createFn=function(e,t){var r=this.props.sectionConfig.campaignViewRoute;if("GridField"===t.component){var n=f({},t,{data:f({},t.data,{handleDrillDown:function(e,t){var n=r.replace(/:type\?/,"set").replace(/:id\?/,t.ID).replace(/:view\?/,"show");window.ss.router.show(n)}})});return d["default"].createElement(e,f({key:n.name},n))}return d["default"].createElement(e,f({key:t.name},t))},t.prototype.getBreadcrumbs=function(){return[{text:"Campaigns",href:"admin/campaigns"},{text:"March release",href:"admin/campaigns/show/1"}]},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.addCampaign=function(){},t}(_["default"]);D.propTypes={sectionConfig:d["default"].PropTypes.shape({forms:d["default"].PropTypes.shape({editForm:d["default"].PropTypes.shape({schemaUrl:d["default"].PropTypes.string})})}),config:d["default"].PropTypes.shape({SecurityID:d["default"].PropTypes.string}),sectionConfigKey:d["default"].PropTypes.string.isRequired},r["default"]=(0,m.connect)(u,l)(D)},{"./list":10,"components/form-action/index":"components/form-action/index","components/form-builder/index":"components/form-builder/index","components/north-header/index":"components/north-header/index",i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-backend":"silverstripe-backend","silverstripe-component":"silverstripe-component","state/campaign/actions":13}],8:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("jQuery"),i=n(o),a=e("react"),s=n(a),c=e("react-dom"),u=n(c),l=e("react-redux"),f=e("./controller"),p=n(f);i["default"].entwine("ss",function(e){e(".cms-content.CampaignAdmin").entwine({onadd:function(){u["default"].render(s["default"].createElement(l.Provider,{store:window.store},s["default"].createElement(p["default"],{sectionConfigKey:"CampaignAdmin"})),this[0])},onremove:function(){u["default"].unmountComponentAtNode(this[0])}})})},{"./controller":7,jQuery:"jQuery",react:"react","react-dom":"react-dom","react-redux":"react-redux"}],9:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function i(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):o(e,t))}Object.defineProperty(r,"__esModule",{value:!0});var c=e("react"),u=n(c),l=e("silverstripe-component"),f=n(l),p=e("i18n"),d=n(p),h=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=null,t={},r=this.props.item,n=this.props.campaign;if("open"===n.State)switch(r.ChangeType){case"created":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.DRAFT","Draft");break;case"modified":t.className="label label-warning list-group-item__status",t.Title=d["default"]._t("CampaignItem.MODIFIED","Modified");break;case"deleted":t.className="label label-error list-group-item__status",t.Title=d["default"]._t("CampaignItem.REMOVED","Removed");break;case"none":default:t.className="label label-success list-group-item__status",t.Title=d["default"]._t("CampaignItem.NO_CHANGES","No changes")}var o=u["default"].createElement("span",{className:"list-group-item--has-links"},u["default"].createElement("i",{className:"font-icon-link"}),"3 linked items");return r.Thumbnail&&(e=u["default"].createElement("span",{className:"list-group-item__thumbnail"},u["default"].createElement("img",{src:r.Thumbnail}))),u["default"].createElement("div",null,e,u["default"].createElement("h4",{className:"list-group-item__heading"},r.Title),u["default"].createElement("span",{className:"list-group-item--is-linked"},u["default"].createElement("i",{className:"font-icon-link"})),o,t.className&&t.Title&&u["default"].createElement("span",{className:t.className},t.Title))},t}(f["default"]);h.propTypes={campaign:u["default"].PropTypes.object.isRequired,item:u["default"].PropTypes.object.isRequired},r["default"]=h},{i18n:"i18n",react:"react","silverstripe-component":"silverstripe-component"}],10:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var o=r[n],i=Object.getOwnPropertyDescriptor(t,o);i&&i.configurable&&void 0===e[o]&&Object.defineProperty(e,o,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(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):i(e,t))}function u(e,t){var r=null;return e.records&&e.records.ChangeSet&&t.campaignId&&(r=e.records.ChangeSet[parseInt(t.campaignId,10)]),{record:r||{},campaign:e.campaign}}function l(e){return{recordActions:(0,h.bindActionCreators)(b,e),campaignActions:(0,h.bindActionCreators)(g,e)}}Object.defineProperty(r,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=e("react"),d=o(p),h=e("redux"),m=e("react-redux"),y=e("state/records/actions"),b=n(y),v=e("state/campaign/actions"),g=n(v),E=e("silverstripe-component"),_=o(E),w=e("components/accordion/index"),O=o(w),C=e("components/accordion/group"),T=o(C),j=e("components/accordion/item"),S=o(j),R=e("components/north-header/index"),P=o(R),A=e("components/form-action/index"),x=o(A),D=e("./item"),N=o(D),I=e("components/breadcrumb/index"),F=o(I),U=e("components/preview/index"),L=o(U),M=e("i18n"),H=o(M),k=function(e){function t(r){a(this,t);var n=s(this,e.call(this,r));return n.handlePublish=n.handlePublish.bind(n),n}return c(t,e),t.prototype.componentDidMount=function(){var t=this.props.itemListViewEndpoint.replace(/:id/,this.props.campaignId);e.prototype.componentDidMount.call(this),this.props.recordActions.fetchRecord("ChangeSet","get",t)},t.prototype.render=function(){var e=this,t=1,r=this.props.campaignId,n=this.props.record,o=this.previewURLForItem(t),i=this.groupItemsForSet(),a=o?"cms-content__split cms-content__split--left-sm":"cms-content__split cms-content__split--none",s=[];return Object.keys(i).forEach(function(t){var o=i[t],a=o.items.length,c=[],u=a+" "+(1===a?o.singular:o.plural),l="Set_"+r+"_Group_"+t;o.items.forEach(function(t){var r="";"none"!==t.ChangeType&&"published"!==n.State||(r="list-group-item--published"),c.push(d["default"].createElement(S["default"],{key:t.ID,className:r},d["default"].createElement(N["default"],{item:t,campaign:e.props.record})))}),s.push(d["default"].createElement(T["default"],{key:l,groupid:l,title:u},c))}),d["default"].createElement("div",{className:a},d["default"].createElement("div",{className:"cms-content__left collapse in","aria-expanded":"true"},d["default"].createElement(P["default"],null,d["default"].createElement(F["default"],{crumbs:this.props.breadcrumbs,multiline:!0})),d["default"].createElement("div",{className:"container-fluid campaign-items panel-scrollable--double-toolbar"},d["default"].createElement(O["default"],null,s)),d["default"].createElement("div",{className:"toolbar--south"},this.renderButtonToolbar())),o&&d["default"].createElement(L["default"],{previewUrl:o}))},t.prototype.renderButtonToolbar=function(){var e=this.getItems();if(!e)return d["default"].createElement("div",{className:"btn-toolbar"});var t={};return"open"===this.props.record.State?t=f(t,{label:H["default"]._t("Campaigns.PUBLISHCAMPAIGN"),bootstrapButtonStyle:"success",loading:this.props.campaign.isPublishing,handleClick:this.handlePublish,icon:"rocket"}):"published"===this.props.record.State&&(t=f(t,{label:H["default"]._t("Campaigns.REVERTCAMPAIGN"),bootstrapButtonStyle:"default",icon:"back-in-time",disabled:!0})),d["default"].createElement("div",{className:"btn-toolbar"},d["default"].createElement(x["default"],t))},t.prototype.previewURLForItem=function(e){return e?document.getElementsByTagName("base")[0].href:""},t.prototype.getItems=function(){return this.props.record&&this.props.record._embedded?this.props.record._embedded.ChangeSetItems:null},t.prototype.groupItemsForSet=function(){var e={},t=this.getItems();return t?(t.forEach(function(t){var r=t.BaseClass;e[r]||(e[r]={singular:t.Singular,plural:t.Plural,items:[]}),e[r].items.push(t)}),e):e},t.prototype.handlePublish=function(e){e.preventDefault(),this.props.campaignActions.publishCampaign(this.props.publishApi,this.props.campaignId)},t}(_["default"]);k.propTypes={campaign:d["default"].PropTypes.shape({isPublishing:d["default"].PropTypes.bool.isRequired}),campaignActions:d["default"].PropTypes.object.isRequired,publishApi:d["default"].PropTypes.func.isRequired,record:d["default"].PropTypes.object.isRequired,recordActions:d["default"].PropTypes.object.isRequired},r["default"]=(0,m.connect)(u,l)(k)},{"./item":9,"components/accordion/group":2,"components/accordion/index":3,"components/accordion/item":4,"components/breadcrumb/index":5,"components/form-action/index":"components/form-action/index","components/north-header/index":"components/north-header/index","components/preview/index":6,i18n:"i18n",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/campaign/actions":13,"state/records/actions":19}],11:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=void 0,r=void 0;if(!(e.status>=200&&e.status<300))throw r=new Error(e.statusText),r.response=e,r;return t=e}Object.defineProperty(r,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=e("isomorphic-fetch"),u=n(c),l=e("es6-promise"),f=n(l),p=e("qs"),d=n(p),h=e("merge"),m=n(h);f["default"].polyfill();var y=function(){function e(){i(this,e),this.fetch=u["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return d["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 r(e,t){switch(e){case"application/x-www-form-urlencoded":return d["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 n(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function i(e){return e.text().then(function(t){return r(e.headers.get("Content-Type"),t)})}function a(e,t){return Object.keys(t).reduce(function(r,n){var i=e[n];return!i||i.remove!==!0&&i.querystring!==!0?s(r,o({},n,t[n])):r},{})}function c(e,r,i){var a=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],c=r,u=Object.keys(i).reduce(function(t,r){var n=e[r],c=a.setFromData===!0&&!(n&&n.remove===!0),u=n&&n.querystring===!0&&n.remove!==!0;return c||u?s(t,o({},r,i[r])):t},{});return c=n(c,t("application/x-www-form-urlencoded",u)),c=Object.keys(e).reduce(function(t,r){var n=e[r].urlReplacement;return n?t.replace(n,i[r]):t},c)}var u=this,l=s({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),f={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){f[l[e]]&&(l[e]=f[l[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r={Accept:l.responseFormat,"Content-Type":l.payloadFormat},n=m["default"].recursive({},l.defaultData,e),o=c(l.payloadSchema,l.url,n,{setFromData:"get"===l.method.toLowerCase()}),s=t(l.payloadFormat,a(l.payloadSchema,n)),f="get"===l.method.toLowerCase()?[o,r]:[o,s,r];return u[l.method].apply(u,f).then(i)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(a)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:s({},n,r),credentials:"same-origin",body:t}).then(a)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:r}).then(a)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:r}).then(a)},e}(),b=new y;r["default"]=b},{"es6-promise":24,"isomorphic-fetch":25,merge:26,qs:27}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CAMPAIGN_ACTIVE_CHANGESET:"SET_CAMPAIGN_ACTIVE_CHANGESET",PUBLISH_CAMPAIGN_REQUEST:"PUBLISH_CAMPAIGN_REQUEST",PUBLISH_CAMPAIGN_SUCCESS:"PUBLISH_CAMPAIGN_SUCCESS",PUBLISH_CAMPAIGN_FAILURE:"PUBLISH_CAMPAIGN_FAILURE"}},{}],13:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return{type:s["default"].SET_CAMPAIGN_ACTIVE_CHANGESET,payload:{campaignId:e,view:t}}}function i(e,t){return function(r){r({type:s["default"].PUBLISH_CAMPAIGN_REQUEST,payload:{campaignId:t}}),e({id:t}).then(function(e){r({type:s["default"].PUBLISH_CAMPAIGN_SUCCESS,payload:{campaignId:t}}),r({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:"ChangeSet",data:e}})})["catch"](function(e){r({type:s["default"].PUBLISH_CAMPAIGN_FAILURE,payload:{error:e}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.showCampaignView=o,r.publishCampaign=i;var a=e("./action-types"),s=n(a),c=e("state/records/action-types"),u=n(c)},{"./action-types":12,"state/records/action-types":18}],14:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?l:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CAMPAIGN_ACTIVE_CHANGESET:return(0,s["default"])(i({},e,{campaignId:t.payload.campaignId,view:t.payload.view}));case u["default"].PUBLISH_CAMPAIGN_REQUEST:return(0,s["default"])(i({},e,{isPublishing:!0}));case u["default"].PUBLISH_CAMPAIGN_SUCCESS:case u["default"].PUBLISH_CAMPAIGN_FAILURE:return(0,s["default"])(i({},e,{isPublishing:!1}));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c),l={campaignId:null,isPublishing:!1,view:null};r["default"]=o},{"./action-types":12,"deep-freeze":"deep-freeze"}],15:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["default"]={SET_CONFIG:"SET_CONFIG"}},{}],16:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:a["default"].SET_CONFIG,payload:{config:e}}}Object.defineProperty(r,"__esModule",{value:!0}),r.setConfig=o;var i=e("./action-types"),a=n(i)},{"./action-types":15}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];switch(t.type){case u["default"].SET_CONFIG:return(0,s["default"])(i({},e,t.payload.config));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=e("deep-freeze"),s=n(a),c=e("./action-types"),u=n(c);r["default"]=o},{"./action-types":15,"deep-freeze":"deep-freeze"}],18:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r["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"}},{}],19:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r=["id"];return r.reduce(function(e,r){return e.replace(":"+r,t[r])},e)}function i(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORDS_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORDS_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORDS_FAILURE,payload:{error:r,recordType:e}})})}}function a(e,t,r){var n={recordType:e},i={Accept:"text/json"},a=t.toLowerCase();return function(t){t({type:u["default"].FETCH_RECORD_REQUEST,payload:n});var s="get"===a?[o(r,n),i]:[o(r,n),{},i];return f["default"][a].apply(f["default"],s).then(function(e){return e.json()}).then(function(r){t({type:u["default"].FETCH_RECORD_SUCCESS,payload:{recordType:e,data:r}})})["catch"](function(r){t({type:u["default"].FETCH_RECORD_FAILURE,payload:{error:r,recordType:e}})})}}function s(e,t,r,n){var i={recordType:e,id:t};return function(a){return a({type:u["default"].DELETE_RECORD_REQUEST,payload:i}),f["default"][r.toLowerCase()](o(n,i)).then(function(){a({type:u["default"].DELETE_RECORD_SUCCESS,payload:{recordType:e,id:t}})})["catch"](function(r){a({type:u["default"].DELETE_RECORD_FAILURE,payload:{error:r,recordType:e,id:t}})})}}Object.defineProperty(r,"__esModule",{value:!0}),r.fetchRecords=i,r.fetchRecord=a,r.deleteRecord=s;var c=e("./action-types"),u=n(c),l=e("silverstripe-backend.js"),f=n(l)},{"./action-types":18,"silverstripe-backend.js":11}],20:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments[1],r=void 0,n=void 0,i=void 0;switch(t.type){case l["default"].CREATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].UPDATE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].DELETE_RECORD:return(0,c["default"])(a({},e,{}));case l["default"].FETCH_RECORDS_REQUEST:return e;case l["default"].FETCH_RECORDS_FAILURE:return e;case l["default"].FETCH_RECORDS_SUCCESS:return n=t.payload.recordType,r=t.payload.data._embedded[n+"s"]||{},r=r.reduce(function(e,t){return a({},e,o({},t.id,t))},{}),(0,c["default"])(a({},e,o({},n,r)));case l["default"].FETCH_RECORD_REQUEST:return e;case l["default"].FETCH_RECORD_FAILURE:return e;case l["default"].FETCH_RECORD_SUCCESS:return n=t.payload.recordType,i=t.payload.data,(0,c["default"])(a({},e,o({},n,a({},e[n],o({},i.ID,i)))));case l["default"].DELETE_RECORD_REQUEST:return e;case l["default"].DELETE_RECORD_FAILURE:return e;case l["default"].DELETE_RECORD_SUCCESS:return n=t.payload.recordType,r=e[n],r=Object.keys(r).reduce(function(e,n){return parseInt(n,10)!==parseInt(t.payload.id,10)?a({},e,o({},n,r[n])):e},{}),(0,c["default"])(a({},e,o({},n,r)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f={};r["default"]=i},{"./action-types":18,"deep-freeze":"deep-freeze"}],21:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={SET_SCHEMA:"SET_SCHEMA"};r["default"]=n},{}],22:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){var e=arguments.length<=0||void 0===arguments[0]?f:arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];switch(t.type){case l["default"].SET_SCHEMA:var r=t.payload.schema.schema_url;return(0,c["default"])(a({},e,o({},r,t.payload)));default:return e}}Object.defineProperty(r,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};r["default"]=i;var s=e("deep-freeze"),c=n(s),u=e("./action-types"),l=n(u),f=(0,c["default"])({})},{"./action-types":21,"deep-freeze":"deep-freeze"}],23:[function(e,t,r){function n(){l=!1,s.length?u=s.concat(u):f=-1,u.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(s=u,u=[];++f<t;)s&&s[f].run();f=-1,t=u.length}s=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,c=t.exports={},u=[],l=!1,f=-1;c.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new i(e,t)),1!==u.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=a,c.addListener=a,c.once=a,c.off=a,c.removeListener=a,c.removeAllListeners=a,c.emit=a,c.binding=function(e){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(e){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},{}],24:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function a(e){V=e}function s(e){X=e}function c(){return function(){r.nextTick(d)}}function u(){return function(){Q(d)}}function l(){var e=0,t=new W(d),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function f(){var e=new MessageChannel;return e.port1.onmessage=d,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(d,1)}}function d(){for(var e=0;J>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}J=0}function h(){try{var t=e,r=t("vertx");return Q=r.runOnLoop||r.runOnContext,u()}catch(n){return p()}}function m(e,t){var r=this,n=r._state;if(n===ie&&!e||n===ae&&!t)return this;var o=new this.constructor(b),i=r._result;if(n){var a=arguments[n-1];X(function(){N(n,o,a,i)})}else P(r,o,e,t);return o}function y(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(b);return T(r,e),r}function b(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function E(e){try{return e.then}catch(t){return se.error=t,se}}function _(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function w(e,t,r){X(function(e){var n=!1,o=_(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,R(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,R(e,o))},e)}function O(e,t){t._state===ie?S(e,t._result):t._state===ae?R(e,t._result):P(t,void 0,function(t){T(e,t)},function(t){R(e,t)})}function C(e,t,r){t.constructor===e.constructor&&r===re&&constructor.resolve===ne?O(e,t):r===se?R(e,se.error):void 0===r?S(e,t):i(r)?w(e,t,r):S(e,t)}function T(e,t){e===t?R(e,v()):o(t)?C(e,t,E(t)):S(e,t)}function j(e){e._onerror&&e._onerror(e._result),A(e)}function S(e,t){e._state===oe&&(e._result=t,e._state=ie,0!==e._subscribers.length&&X(A,e))}function R(e,t){e._state===oe&&(e._state=ae,e._result=t,X(j,e))}function P(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ie]=r,o[i+ae]=n,0===i&&e._state&&X(A,e)}function A(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?N(r,n,o,i):o(i);e._subscribers.length=0}}function x(){this.error=null}function D(e,t){try{return e(t)}catch(r){return ce.error=r,ce}}function N(e,t,r,n){var o,a,s,c,u=i(r);if(u){if(o=D(r,n),o===ce?(c=!0,a=o.error,o=null):s=!0,t===o)return void R(t,g())}else o=n,s=!0;t._state!==oe||(u&&s?T(t,o):c?R(t,a):e===ie?S(t,o):e===ae&&R(t,o))}function I(e,t){try{t(function(t){T(e,t)},function(t){R(e,t)})}catch(r){R(e,r)}}function F(e){return new he(this,e).promise}function U(e){function t(e){T(o,e)}function r(e){R(o,e)}var n=this,o=new n(b);if(!K(e))return R(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,a=0;o._state===oe&&i>a;a++)P(n.resolve(e[a]),void 0,t,r);return o}function L(e){var t=this,r=new t(b);return R(r,e),r}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function k(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],b!==e&&("function"!=typeof e&&M(),this instanceof k?I(this,e):H())}function B(e,t){this._instanceConstructor=e,this.promise=new e(b),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):R(this.promise,this._validationError())}function G(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(e.Promise=de)}var q;q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,V,z,K=q,J=0,X=function(e,t){te[J]=e,te[J+1]=t,J+=2,2===J&&(V?V(d):z())},Y="undefined"!=typeof window?window:void 0,$=Y||{},W=$.MutationObserver||$.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);z=Z?c():W?l():ee?f():void 0===Y&&"function"==typeof e?h():p();var re=m,ne=y,oe=void 0,ie=1,ae=2,se=new x,ce=new x,ue=F,le=U,fe=L,pe=0,de=k;k.all=ue,k.race=le,k.resolve=ne,k.reject=fe,k._setScheduler=a,k._setAsap=s,k._asap=X,k.prototype={constructor:k,then:re,"catch":function(e){return this.then(null,e)}};var he=B;B.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},B.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===oe&&e>r;r++)this._eachEntry(t[r],r)},B.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===ne){var o=E(e);if(o===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===de){var i=new r(b);C(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r(function(t){t(e)}),t)}else this._willSettleAt(n(e),t)},B.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===oe&&(this._remaining--,e===ae?R(n,r):this._result[t]=r),0===this._remaining&&S(n,this._result)},B.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,function(e){r._settledAt(ie,t,e)},function(e){r._settledAt(ae,t,e)})};var me=G,ye={Promise:de,polyfill:me};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),me()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:23}],25:[function(e,t,r){e("whatwg-fetch"),t.exports=self.fetch.bind(self)},{"whatwg-fetch":32}],26:[function(e,t,r){!function(e){function r(e,t){if("object"!==o(e))return t;for(var n in t)"object"===o(e[n])&&"object"===o(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function n(e,t,n){var a=n[0],s=n.length;(e||"object"!==o(a))&&(a={});for(var c=0;s>c;++c){var u=n[c],l=o(u);if("object"===l)for(var f in u){var p=e?i.clone(u[f]):u[f];t?a[f]=r(a[f],p):a[f]=p}}return a}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}var i=function(e){return n(e===!0,!1,arguments)},a="merge";i.recursive=function(e){return n(e===!0,!0,arguments)},i.clone=function(e){var t,r,n=e,a=o(e);if("array"===a)for(n=[],r=e.length,t=0;r>t;++t)n[t]=i.clone(e[t]);else if("object"===a){n={};for(t in e)n[t]=i.clone(e[t])}return n},e?t.exports=i:window[a]=i}("object"==typeof t&&t&&"object"==typeof t.exports&&t.exports)},{}],27:[function(e,t,r){"use strict";var n=e("./stringify"),o=e("./parse");t.exports={stringify:n,parse:o}},{"./parse":28,"./stringify":29}],28:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};o.parseValues=function(e,t){for(var r={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),i=0;i<o.length;++i){var a=o[i],s=-1===a.indexOf("]=")?a.indexOf("="):a.indexOf("]=")+1;if(-1===s)r[n.decode(a)]="",t.strictNullHandling&&(r[n.decode(a)]=null);else{var c=n.decode(a.slice(0,s)),u=n.decode(a.slice(s+1));Object.prototype.hasOwnProperty.call(r,c)?r[c]=[].concat(r[c]).concat(u):r[c]=u}}return r},o.parseObject=function(e,t,r){if(!e.length)return t;var n,i=e.shift();if("[]"===i)n=[],n=n.concat(o.parseObject(e,t,r));else{n=r.plainObjects?Object.create(null):{};var a="["===i[0]&&"]"===i[i.length-1]?i.slice(1,i.length-1):i,s=parseInt(a,10);!isNaN(s)&&i!==a&&String(s)===a&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(n=[],n[s]=o.parseObject(e,t,r)):n[a]=o.parseObject(e,t,r)}return n},o.parseKeys=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^\.\[]+)/g,"[$1]"):e,i=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,s=i.exec(n),c=[];if(s[1]){if(!r.plainObjects&&Object.prototype.hasOwnProperty(s[1])&&!r.allowPrototypes)return;c.push(s[1])}for(var u=0;null!==(s=a.exec(n))&&u<r.depth;)u+=1,(r.plainObjects||!Object.prototype.hasOwnProperty(s[1].replace(/\[|\]/g,""))||r.allowPrototypes)&&c.push(s[1]);return s&&c.push("["+n.slice(s.index)+"]"),o.parseObject(c,t,r)}},t.exports=function(e,t){var r=t||{};if(r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=r.parseArrays!==!1,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?o.parseValues(e,r):e,a=r.plainObjects?Object.create(null):{},s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=o.parseKeys(u,i[u],r);a=n.merge(a,l,r)}return n.compact(a)}},{"./utils":30}],29:[function(e,t,r){"use strict";var n=e("./utils"),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},strictNullHandling:!1,skipNulls:!1,encode:!0};o.stringify=function(e,t,r,i,a,s,c,u,l){var f=e;if("function"==typeof c)f=c(t,f);else if(n.isBuffer(f))f=String(f);else if(f instanceof Date)f=f.toISOString();else if(null===f){if(i)return s?n.encode(t):t;f=""}if("string"==typeof f||"number"==typeof f||"boolean"==typeof f)return s?[n.encode(t)+"="+n.encode(f)]:[t+"="+f];var p=[];if("undefined"==typeof f)return p;var d;if(Array.isArray(c))d=c;else{var h=Object.keys(f);d=u?h.sort(u):h}for(var m=0;m<d.length;++m){var y=d[m];a&&null===f[y]||(p=Array.isArray(f)?p.concat(o.stringify(f[y],r(t,y),r,i,a,s,c,u,l)):p.concat(o.stringify(f[y],t+(l?"."+y:"["+y+"]"),r,i,a,s,c,u,l)))}return p},t.exports=function(e,t){var r,n,i=e,a=t||{},s="undefined"==typeof a.delimiter?o.delimiter:a.delimiter,c="boolean"==typeof a.strictNullHandling?a.strictNullHandling:o.strictNullHandling,u="boolean"==typeof a.skipNulls?a.skipNulls:o.skipNulls,l="boolean"==typeof a.encode?a.encode:o.encode,f="function"==typeof a.sort?a.sort:null,p="undefined"==typeof a.allowDots?!1:a.allowDots;"function"==typeof a.filter?(n=a.filter,i=n("",i)):Array.isArray(a.filter)&&(r=n=a.filter);var d=[];if("object"!=typeof i||null===i)return"";var h;h=a.arrayFormat in o.arrayPrefixGenerators?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var m=o.arrayPrefixGenerators[h];r||(r=Object.keys(i)),f&&r.sort(f);for(var y=0;y<r.length;++y){var b=r[y];u&&null===i[b]||(d=d.concat(o.stringify(i[b],b,m,c,u,l,n,f,p)))}return d.join(s)}},{"./utils":30}],30:[function(e,t,r){"use strict";var n=function(){for(var e=new Array(256),t=0;256>t;++t)e[t]="%"+((16>t?"0":"")+t.toString(16)).toUpperCase();return e}();r.arrayToObject=function(e,t){for(var r=t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!=typeof e[n]&&(r[n]=e[n]);return r},r.merge=function(e,t,n){if(!t)return e;if("object"!=typeof t){if(Array.isArray(e))e.push(t);else{if("object"!=typeof e)return[e,t];e[t]=!0}return e}if("object"!=typeof e)return[e].concat(t);var o=e;return Array.isArray(e)&&!Array.isArray(t)&&(o=r.arrayToObject(e,n)),Object.keys(t).reduce(function(e,o){var i=t[o];return Object.prototype.hasOwnProperty.call(e,o)?e[o]=r.merge(e[o],i,n):e[o]=i,e},o)},r.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},r.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",o=0;o<t.length;++o){var i=t.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&57>=i||i>=65&&90>=i||i>=97&&122>=i?r+=t.charAt(o):128>i?r+=n[i]:2048>i?r+=n[192|i>>6]+n[128|63&i]:55296>i||i>=57344?r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(o)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],o=n.indexOf(e);if(-1!==o)return n[o];if(n.push(e),Array.isArray(e)){for(var i=[],a=0;a<e.length;++a)"undefined"!=typeof e[a]&&i.push(e[a]);return i}for(var s=Object.keys(e),c=0;c<s.length;++c){var u=s[c];e[u]=r.compact(e[u],n)}return e},r.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},r.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}],31:[function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function i(e,t,r,i){switch("undefined"==typeof e?"undefined":o(e)){case"object":return"function"==typeof e[i]?e[i].apply(e,n(r)):e[i];case"function":return e(t);default:return e}}function a(){function e(){j.forEach(function(e,t){var r=e.started,o=e.startedTime,s=e.action,c=e.prevState,l=e.error,p=e.took,d=e.nextState,m=j[t+1];m&&(d=m.prevState,p=m.started-r);var b=_(s),v="function"==typeof f?f(function(){return d},s):f,g=u(o),E=T.title?"color: "+T.title(b)+";":null,w="action "+(y?g:"")+" "+b.type+" "+(h?"(in "+p.toFixed(2)+" ms)":"");try{v?T.title?a.groupCollapsed("%c "+w,E):a.groupCollapsed(w):T.title?a.group("%c "+w,E):a.group(w)}catch(O){a.log(w)}var C=i(n,b,[c],"prevState"),S=i(n,b,[b],"action"),R=i(n,b,[l,c],"error"),P=i(n,b,[d],"nextState");C&&(T.prevState?a[C]("%c prev state","color: "+T.prevState(c)+"; font-weight: bold",c):a[C]("prev state",c)),S&&(T.action?a[S]("%c action","color: "+T.action(b)+"; font-weight: bold",b):a[S]("action",b)),l&&R&&(T.error?a[R]("%c error","color: "+T.error(l,c)+"; font-weight: bold",l):a[R]("error",l)),P&&(T.nextState?a[P]("%c next state","color: "+T.nextState(d)+"; font-weight: bold",d):a[P]("next state",d));try{a.groupEnd()}catch(O){a.log("—— log end ——")}}),j.length=0}var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=t.level,n=void 0===r?"log":r,o=t.logger,a=void 0===o?console:o,s=t.logErrors,c=void 0===s?!0:s,f=t.collapsed,p=t.predicate,d=t.duration,h=void 0===d?!1:d,m=t.timestamp,y=void 0===m?!0:m,b=t.transformer,v=t.stateTransformer,g=void 0===v?function(e){return e}:v,E=t.actionTransformer,_=void 0===E?function(e){return e}:E,w=t.errorTransformer,O=void 0===w?function(e){return e}:w,C=t.colors,T=void 0===C?{title:function(){return"#000000"},prevState:function(){return"#9E9E9E"},action:function(){return"#03A9F4"},nextState:function(){return"#4CAF50"},error:function(){return"#F20404"}}:C;if("undefined"==typeof a)return function(){return function(e){return function(t){return e(t)}}};b&&console.error("Option 'transformer' is deprecated, use stateTransformer instead");var j=[];return function(t){var r=t.getState;return function(t){return function(n){if("function"==typeof p&&!p(r,n))return t(n);var o={};j.push(o),o.started=l.now(),o.startedTime=new Date,o.prevState=g(r()),o.action=n;var i=void 0;if(c)try{i=t(n)}catch(a){o.error=O(a)}else i=t(n);if(o.took=l.now()-o.started,o.nextState=g(r()),e(),o.error)throw o.error;return i}}}}var s=function(e,t){return new Array(t+1).join(e)},c=function(e,t){return s("0",t-e.toString().length)+e},u=function(e){return"@ "+c(e.getHours(),2)+":"+c(e.getMinutes(),2)+":"+c(e.getSeconds(),2)+"."+c(e.getMilliseconds(),3)},l="undefined"!=typeof performance&&"function"==typeof performance.now?performance:Date;t.exports=a},{}],32:[function(e,t,r){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function r(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){this.map={},e instanceof n?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function o(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function i(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),i(t)}function s(e){var t=new FileReader;return t.readAsText(e),i(t)}function c(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},h.blob?(this.blob=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=o(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=o(this);return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function u(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var r=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function p(e){var t=new n,r=e.getAllResponseHeaders().trim().split("\n");return r.forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}function d(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof n?t.headers:new n(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){n.prototype.append=function(e,n){e=t(e),n=r(n);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(n)},n.prototype["delete"]=function(e){delete this.map[t(e)]},n.prototype.get=function(e){var r=this.map[t(e)];return r?r[0]:null},n.prototype.getAll=function(e){return this.map[t(e)]||[]},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,n){this.map[t(e)]=[r(n)]},n.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},c.call(l.prototype),c.call(d.prototype),d.prototype.clone=function(){return new d(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},d.error=function(){var e=new d(null,{status:0,statusText:""});return e.type="error",e};var y=[301,302,303,307,308];d.redirect=function(e,t){if(-1===y.indexOf(t))throw new RangeError("Invalid status code");return new d(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=l,e.Response=d,e.fetch=function(e,t){return new Promise(function(r,n){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var i;i=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void n(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:p(a),url:o()},i="response"in a?a.response:a.responseText;r(new d(i,t))},a.onerror=function(){n(new TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},{}]},{},[1]);
|
||||
//# sourceMappingURL=bundle-framework.js.map
|
||||
|
2
admin/client/dist/js/bundle-lib.js
vendored
2
admin/client/dist/js/bundle-lib.js
vendored
@ -26,7 +26,7 @@ this.length=1,this;if("body"===e&&!n&&M.body)return this.context=M,this[0]=M.bod
|
||||
}),this.__callback(e.data.core.to_open)},save_loaded:function(){},reload_nodes:function(e){var t=this,n=!0,r=[],o=[];e||(this.data.core.reopen=!1,this.data.core.refreshing=!0,this.data.core.to_open=i.map(i.makeArray(this.data.core.to_open),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.data.core.to_load=i.map(i.makeArray(this.data.core.to_load),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.data.core.to_open.length&&(this.data.core.to_load=this.data.core.to_load.concat(this.data.core.to_open))),this.data.core.to_load.length&&(i.each(this.data.core.to_load,function(e,t){return"#"==t?!0:void(i(t).length?r.push(t):o.push(t))}),r.length&&(this.data.core.to_load=o,i.each(r,function(e,i){t._is_loaded(i)||(t.load_node(i,function(){t.reload_nodes(!0)},function(){t.reload_nodes(!0)}),n=!1)}))),this.data.core.to_open.length&&i.each(this.data.core.to_open,function(e,n){t.open_node(n,!1,!0)}),n&&(this.data.core.reopen&&clearTimeout(this.data.core.reopen),this.data.core.reopen=setTimeout(function(){t.__callback({},t)},50),this.data.core.refreshing=!1,this.reopen())},reopen:function(){var e=this;this.data.core.to_open.length&&i.each(this.data.core.to_open,function(t,n){e.open_node(n,!1,!0)}),this.__callback({})},refresh:function(e,t,n){var i=this;this.save_opened(),e||(e=-1),e=this._get_node(e),e||(e=-1),-1!==e?e.children("UL").remove():this.get_container_ul().empty(),this.load_node(e,function(){i.__callback({obj:e}),i.reload_nodes(),t&&t.call(this)},n)},loaded:function(){this.__callback()},set_focus:function(){if(!this.is_focused()){var e=i.jstree._focused();e&&e.unset_focus(),this.get_container().addClass("jstree-focused"),o=this.get_index(),this.__callback()}},is_focused:function(){return o==this.get_index()},unset_focus:function(){this.is_focused()&&(this.get_container().removeClass("jstree-focused"),o=-1),this.__callback()},_get_node:function(e){var t=i(e,this.get_container());return t.is(".jstree")||-1==e?-1:(t=t.closest("li",this.get_container()),t.length?t:!1)},_get_next:function(e,t){return e=this._get_node(e),-1===e?this.get_container().find("> ul > li:first-child"):e.length?t?e.nextAll("li").size()>0?e.nextAll("li:eq(0)"):!1:e.hasClass("jstree-open")?e.find("li:eq(0)"):e.nextAll("li").size()>0?e.nextAll("li:eq(0)"):e.parentsUntil(".jstree","li").next("li").eq(0):!1},_get_prev:function(e,t){if(e=this._get_node(e),-1===e)return this.get_container().find("> ul > li:last-child");if(!e.length)return!1;if(t)return e.prevAll("li").length>0?e.prevAll("li:eq(0)"):!1;if(e.prev("li").length){for(e=e.prev("li").eq(0);e.hasClass("jstree-open");)e=e.children("ul:eq(0)").children("li:last");return e}var n=e.parentsUntil(".jstree","li:eq(0)");return n.length?n:!1},_get_parent:function(e){if(e=this._get_node(e),-1==e||!e.length)return!1;var t=e.parentsUntil(".jstree","li:eq(0)");return t.length?t:-1},_get_children:function(e){return e=this._get_node(e),-1===e?this.get_container().children("ul:eq(0)").children("li"):e.length?e.children("ul:eq(0)").children("li"):!1},get_path:function(e,t){var n=[],i=this;return e=this._get_node(e),-1!==e&&e&&e.length?(e.parentsUntil(".jstree","li").each(function(){n.push(t?this.id:i.get_text(this))}),n.reverse(),n.push(t?e.attr("id"):this.get_text(e)),n):!1},_get_string:function(e){return this._get_settings().core.strings[e]||e},is_open:function(e){return e=this._get_node(e),e&&-1!==e&&e.hasClass("jstree-open")},is_closed:function(e){return e=this._get_node(e),e&&-1!==e&&e.hasClass("jstree-closed")},is_leaf:function(e){return e=this._get_node(e),e&&-1!==e&&e.hasClass("jstree-leaf")},correct_state:function(e){return e=this._get_node(e),e&&-1!==e?(e.removeClass("jstree-closed jstree-open").addClass("jstree-leaf").children("ul").remove(),void this.__callback({obj:e})):!1},open_node:function(t,n,i){if(t=this._get_node(t),!t.length)return!1;if(!t.hasClass("jstree-closed"))return n&&n.call(),!1;var r=i||e?0:this._get_settings().core.animation,o=this;this._is_loaded(t)?(this._get_settings().core.open_parents&&t.parentsUntil(".jstree",".jstree-closed").each(function(){o.open_node(this,!1,!0)}),r&&t.children("ul").css("display","none"),t.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading"),r?t.children("ul").stop(!0,!0).slideDown(r,function(){this.style.display="",o.after_open(t)}):o.after_open(t),this.__callback({obj:t}),n&&n.call()):(t.children("a").addClass("jstree-loading"),this.load_node(t,function(){o.open_node(t,n,i)},n))},after_open:function(e){this.__callback({obj:e})},close_node:function(t,n){t=this._get_node(t);var i=n||e?0:this._get_settings().core.animation,r=this;return t.length&&t.hasClass("jstree-open")?(i&&t.children("ul").attr("style","display:block !important"),t.removeClass("jstree-open").addClass("jstree-closed"),i?t.children("ul").stop(!0,!0).slideUp(i,function(){this.style.display="",r.after_close(t)}):r.after_close(t),void this.__callback({obj:t})):!1},after_close:function(e){this.__callback({obj:e})},toggle_node:function(e){return e=this._get_node(e),e.hasClass("jstree-closed")?this.open_node(e):e.hasClass("jstree-open")?this.close_node(e):void 0},open_all:function(e,t,n){e=e?this._get_node(e):-1,e&&-1!==e||(e=this.get_container_ul()),n?e=e.find("li.jstree-closed"):(n=e,e=e.is(".jstree-closed")?e.find("li.jstree-closed").andSelf():e.find("li.jstree-closed"));var i=this;e.each(function(){var e=this;i._is_loaded(this)?i.open_node(this,!1,!t):i.open_node(this,function(){i.open_all(e,t,n)},!t)}),0===n.find("li.jstree-closed").length&&this.__callback({obj:n})},close_all:function(e,t){var n=this;e=e?this._get_node(e):this.get_container(),e&&-1!==e||(e=this.get_container_ul()),e.find("li.jstree-open").andSelf().each(function(){n.close_node(this,!t)}),this.__callback({obj:e})},clean_node:function(e){e=e&&-1!=e?i(e):this.get_container_ul(),e=e.is("li")?e.find("li").andSelf():e.find("li"),e.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed"),e.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove(),this.__callback({obj:e})},get_rollback:function(){return this.__callback(),{i:this.get_index(),h:this.get_container().children("ul").clone(!0),d:this.data}},set_rollback:function(e,t){this.get_container().empty().append(e),this.data=t,this.__callback()},load_node:function(e,t,n){this.__callback({obj:e})},_is_loaded:function(e){return!0},create_node:function(e,t,n,r,o){e=this._get_node(e),t="undefined"==typeof t?"last":t;var s,a=i("<li />"),l=this._get_settings().core;if(-1!==e&&!e.length)return!1;if(!o&&!this._is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,n,r,!0)}),!1;switch(this.__rollback(),"string"==typeof n&&(n={data:n}),n||(n={}),n.attr&&a.attr(n.attr),n.metadata&&a.data(n.metadata),n.state&&a.addClass("jstree-"+n.state),n.data||(n.data=this._get_string("new_node")),i.isArray(n.data)||(s=n.data,n.data=[],n.data.push(s)),i.each(n.data,function(e,t){s=i("<a />"),i.isFunction(t)&&(t=t.call(this,n)),"string"==typeof t?s.attr("href","#")[l.html_titles?"html":"text"](t):(t.attr||(t.attr={}),t.attr.href||(t.attr.href="#"),s.attr(t.attr)[l.html_titles?"html":"text"](t.title),t.language&&s.addClass(t.language)),s.prepend("<ins class='jstree-icon'> </ins>"),!t.icon&&n.icon&&(t.icon=n.icon),t.icon&&(-1===t.icon.indexOf("/")?s.children("ins").addClass(t.icon):s.children("ins").css("background","url('"+t.icon+"') center center no-repeat")),a.append(s)}),a.prepend("<ins class='jstree-icon'> </ins>"),-1===e&&(e=this.get_container(),"before"===t&&(t="first"),"after"===t&&(t="last")),t){case"before":e.before(a),s=this._get_parent(e);break;case"after":e.after(a),s=this._get_parent(e);break;case"inside":case"first":e.children("ul").length||e.append("<ul />"),e.children("ul").prepend(a),s=e;break;case"last":e.children("ul").length||e.append("<ul />"),e.children("ul").append(a),s=e;break;default:e.children("ul").length||e.append("<ul />"),t||(t=0),s=e.children("ul").children("li").eq(t),s.length?s.before(a):e.children("ul").append(a),s=e}return-1!==s&&s.get(0)!==this.get_container().get(0)||(s=-1),this.clean_node(s),this.__callback({obj:a,parent:s}),r&&r.call(this,a),a},get_text:function(e){if(e=this._get_node(e),!e.length)return!1;var t=this._get_settings().core.html_titles;return e=e.children("a:eq(0)"),t?(e=e.clone(),e.children("INS").remove(),e.html()):(e=e.contents().filter(function(){return 3==this.nodeType})[0],e?e.nodeValue:"")},set_text:function(e,t){if(e=this._get_node(e),!e.length)return!1;if(e=e.children("a:eq(0)"),this._get_settings().core.html_titles){var n=e.children("INS").clone();return e.html(t).prepend(n),this.__callback({obj:e,name:t}),!0}return e=e.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:e,name:t}),e.nodeValue=t},rename_node:function(e,t){e=this._get_node(e),this.__rollback(),e&&e.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))&&this.__callback({obj:e,name:t})},delete_node:function(e){if(e=this._get_node(e),!e.length)return!1;this.__rollback();var t=this._get_parent(e),n=i([]),r=this;return e.each(function(){n=n.add(r._get_prev(this))}),e=e.detach(),-1!==t&&0===t.find("> ul > li").length&&t.removeClass("jstree-open jstree-closed").addClass("jstree-leaf"),this.clean_node(t),this.__callback({obj:e,prev:n,parent:t}),e},prepare_move:function(e,t,n,r,o){var s={};if(s.ot=i.jstree._reference(e)||this,s.o=s.ot._get_node(e),s.r=-1===t?-1:this._get_node(t),s.p="undefined"==typeof n||n===!1?"last":n,!o&&a.o&&a.o[0]===s.o[0]&&a.r[0]===s.r[0]&&a.p===s.p)return this.__callback(a),void(r&&r.call(this,a));if(s.ot=i.jstree._reference(s.o)||this,s.rt=i.jstree._reference(s.r)||this,-1!==s.r&&s.r){if(!/^(before|after)$/.test(s.p)&&!this._is_loaded(s.r))return this.load_node(s.r,function(){this.prepare_move(e,t,n,r,!0)});switch(s.p){case"before":s.cp=s.r.index(),s.cr=s.rt._get_parent(s.r);break;case"after":s.cp=s.r.index()+1,s.cr=s.rt._get_parent(s.r);break;case"inside":case"first":s.cp=0,s.cr=s.r;break;case"last":s.cp=s.r.find(" > ul > li").length,s.cr=s.r;break;default:s.cp=s.p,s.cr=s.r}}else switch(s.cr=-1,s.p){case"first":case"before":case"inside":s.cp=0;break;case"after":case"last":s.cp=s.rt.get_container().find(" > ul > li").length;break;default:s.cp=s.p}s.np=-1==s.cr?s.rt.get_container():s.cr,s.op=s.ot._get_parent(s.o),s.cop=s.o.index(),-1===s.op&&(s.op=s.ot?s.ot.get_container():this.get_container()),!/^(before|after)$/.test(s.p)&&s.op&&s.np&&s.op[0]===s.np[0]&&s.o.index()<s.cp&&s.cp++,s.or=s.np.find(" > ul > li:nth-child("+(s.cp+1)+")"),a=s,this.__callback(a),r&&r.call(this,a)},check_move:function(){var e=a,t=!0,n=-1===e.r?this.get_container():e.r;if(!e||!e.o||e.or[0]===e.o[0])return!1;if(!e.cy){if(e.op&&e.np&&e.op[0]===e.np[0]&&e.cp-1===e.o.index())return!1;e.o.each(function(){return-1!==n.parentsUntil(".jstree","li").andSelf().index(this)?(t=!1,!1):void 0})}return t},move_node:function(e,t,n,r,o,s){if(!o)return this.prepare_move(e,t,n,function(e){this.move_node(e,!1,!1,r,!0,s)});if(r&&(a.cy=!0),!s&&!this.check_move())return!1;this.__rollback();var l=!1;r?(l=e.o.clone(!0),l.find("*[id]").andSelf().each(function(){this.id&&(this.id="copy_"+this.id)})):l=e.o,e.or.length?e.or.before(l):(e.np.children("ul").length||i("<ul />").appendTo(e.np),e.np.children("ul:eq(0)").append(l));try{e.ot.clean_node(e.op),e.rt.clean_node(e.np),e.op.find("> ul > li").length||e.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove()}catch(c){}return r&&(a.cy=!0,a.oc=l),this.__callback(a),a},_get_move:function(){return a}}})}(jQuery),function(e){var t,n,i;e(function(){/msie/.test(navigator.userAgent.toLowerCase())?(n=e('<textarea cols="10" rows="2"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),i=e('<textarea cols="10" rows="2" style="overflow: hidden;"></textarea>').css({position:"absolute",top:-1e3,left:0}).appendTo("body"),t=n.width()-i.width(),n.add(i).remove()):(n=e("<div />").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1e3,left:0}).prependTo("body").append("<div />").find("div").css({width:"100%",height:200}),t=100-n.width(),n.parent().remove())}),e.jstree.plugin("ui",{__init:function(){this.data.ui.selected=e(),this.data.ui.last_selected=!1,this.data.ui.hovered=null,this.data.ui.to_select=this.get_settings().ui.initially_select,this.get_container().delegate("a","click.jstree",e.proxy(function(t){t.preventDefault(),t.currentTarget.blur(),e(t.currentTarget).hasClass("jstree-loading")||this.select_node(t.currentTarget,!0,t)},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.hover_node(t.target)},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){e(t.currentTarget).hasClass("jstree-loading")||this.dehover_node(t.target)},this)).bind("reopen.jstree",e.proxy(function(){this.reselect()},this)).bind("get_rollback.jstree",e.proxy(function(){this.dehover_node(),this.save_selected()},this)).bind("set_rollback.jstree",e.proxy(function(){this.reselect()},this)).bind("close_node.jstree",e.proxy(function(t,n){var i=this._get_settings().ui,r=this._get_node(n.rslt.obj),o=r&&r.length?r.children("ul").find("a.jstree-clicked"):e(),s=this;i.selected_parent_close!==!1&&o.length&&o.each(function(){s.deselect_node(this),"select_parent"===i.selected_parent_close&&s.select_node(r)})},this)).bind("delete_node.jstree",e.proxy(function(e,t){var n=this._get_settings().ui.select_prev_on_delete,i=this._get_node(t.rslt.obj),r=i&&i.length?i.find("a.jstree-clicked"):[],o=this;r.each(function(){o.deselect_node(this)}),n&&r.length&&t.rslt.prev.each(function(){return this.parentNode?(o.select_node(this),!1):void 0})},this)).bind("move_node.jstree",e.proxy(function(e,t){t.rslt.cy&&t.rslt.oc.find("a.jstree-clicked").removeClass("jstree-clicked")},this))},defaults:{select_limit:-1,select_multiple_modifier:"ctrl",select_range_modifier:"shift",selected_parent_close:"select_parent",selected_parent_open:!0,select_prev_on_delete:!0,disable_selecting_children:!1,initially_select:[]},_fn:{_get_node:function(t,n){if("undefined"==typeof t||null===t)return n?this.data.ui.selected:this.data.ui.last_selected;var i=e(t,this.get_container());return i.is(".jstree")||-1==t?-1:(i=i.closest("li",this.get_container()),i.length?i:!1)},_ui_notify:function(e,t){t.selected&&this.select_node(e,!1)},save_selected:function(){var e=this;this.data.ui.to_select=[],this.data.ui.selected.each(function(){this.id&&e.data.ui.to_select.push("#"+this.id.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:"))}),this.__callback(this.data.ui.to_select)},reselect:function(){var t=this,n=this.data.ui.to_select;n=e.map(e.makeArray(n),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),e.each(n,function(e,n){n&&"#"!==n&&t.select_node(n)}),this.data.ui.selected=this.data.ui.selected.filter(function(){return this.parentNode}),this.__callback()},refresh:function(e){return this.save_selected(),this.__call_old()},hover_node:function(e){return e=this._get_node(e),e.length?(e.hasClass("jstree-hovered")||this.dehover_node(),this.data.ui.hovered=e.children("a").addClass("jstree-hovered").parent(),this._fix_scroll(e),void this.__callback({obj:e})):!1},dehover_node:function(){var e,t=this.data.ui.hovered;return t&&t.length?(e=t.children("a").removeClass("jstree-hovered").parent(),this.data.ui.hovered[0]===e[0]&&(this.data.ui.hovered=null),void this.__callback({obj:t})):!1},select_node:function(e,t,n){if(e=this._get_node(e),-1==e||!e||!e.length)return!1;var i=this._get_settings().ui,r="on"==i.select_multiple_modifier||i.select_multiple_modifier!==!1&&n&&n[i.select_multiple_modifier+"Key"],o=i.select_range_modifier!==!1&&n&&n[i.select_range_modifier+"Key"]&&this.data.ui.last_selected&&this.data.ui.last_selected[0]!==e[0]&&this.data.ui.last_selected.parent()[0]===e.parent()[0],s=this.is_selected(e),a=!0,l=this;if(t){if(i.disable_selecting_children&&r&&(e.parentsUntil(".jstree","li").children("a.jstree-clicked").length||e.children("ul").find("a.jstree-clicked:eq(0)").length))return!1;switch(a=!1,!0){case o:this.data.ui.last_selected.addClass("jstree-last-selected"),e=e[e.index()<this.data.ui.last_selected.index()?"nextUntil":"prevUntil"](".jstree-last-selected").andSelf(),-1==i.select_limit||e.length<i.select_limit?(this.data.ui.last_selected.removeClass("jstree-last-selected"),this.data.ui.selected.each(function(){this!==l.data.ui.last_selected[0]&&l.deselect_node(this)}),s=!1,a=!0):a=!1;break;case s&&!r:this.deselect_all(),s=!1,a=!0;break;case!s&&!r:(-1==i.select_limit||i.select_limit>0)&&(this.deselect_all(),a=!0);break;case s&&r:this.deselect_node(e);break;case!s&&r:(-1==i.select_limit||this.data.ui.selected.length+1<=i.select_limit)&&(a=!0)}}a&&!s&&(o||(this.data.ui.last_selected=e),e.children("a").addClass("jstree-clicked"),i.selected_parent_open&&e.parents(".jstree-closed").each(function(){l.open_node(this,!1,!0)}),this.data.ui.selected=this.data.ui.selected.add(e),this._fix_scroll(e.eq(0)),this.__callback({obj:e,e:n}))},_fix_scroll:function(e){var n,i=this.get_container()[0];if(i.scrollHeight>i.offsetHeight){if(e=this._get_node(e),!e||-1===e||!e.length||!e.is(":visible"))return;n=e.offset().top-this.get_container().offset().top,0>n&&(i.scrollTop=i.scrollTop+n-1),n+this.data.core.li_height+(i.scrollWidth>i.offsetWidth?t:0)>i.offsetHeight&&(i.scrollTop=i.scrollTop+(n-i.offsetHeight+this.data.core.li_height+1+(i.scrollWidth>i.offsetWidth?t:0)))}},deselect_node:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)&&(e.children("a").removeClass("jstree-clicked"),this.data.ui.selected=this.data.ui.selected.not(e),this.data.ui.last_selected.get(0)===e.get(0)&&(this.data.ui.last_selected=this.data.ui.selected.eq(0)),this.__callback({obj:e}))):!1},toggle_select:function(e){return e=this._get_node(e),e.length?void(this.is_selected(e)?this.deselect_node(e):this.select_node(e)):!1},is_selected:function(e){return this.data.ui.selected.index(this._get_node(e))>=0},get_selected:function(t){return t?e(t).find("a.jstree-clicked").parent():this.data.ui.selected},deselect_all:function(t){var n=t?e(t).find("a.jstree-clicked").parent():this.get_container().find("a.jstree-clicked").parent();n.children("a.jstree-clicked").removeClass("jstree-clicked"),this.data.ui.selected=e([]),this.data.ui.last_selected=!1,this.__callback({obj:n})}}}),e.jstree.defaults.plugins.push("ui")}(jQuery),function(e){e.jstree.plugin("crrm",{__init:function(){this.get_container().bind("move_node.jstree",e.proxy(function(e,t){if(this._get_settings().crrm.move.open_onmove){var n=this;t.rslt.np.parentsUntil(".jstree").andSelf().filter(".jstree-closed").each(function(){n.open_node(this,!1,!0)})}},this))},defaults:{input_width_limit:200,move:{always_copy:!1,open_onmove:!0,default_position:"last",check_move:function(e){return!0}}},_fn:{_show_input:function(t,n){t=this._get_node(t);var i=this._get_settings().core.rtl,r=this._get_settings().crrm.input_width_limit,o=t.children("ins").width(),s=t.find("> a:visible > ins").width()*t.find("> a:visible > ins").length,a=this.get_text(t),l=e("<div />",{css:{position:"absolute",top:"-200px",left:i?"0px":"-1000px",visibility:"hidden"}}).appendTo("body"),c=t.css("position","relative").append(e("<input />",{value:a,"class":"jstree-rename-input",css:{padding:"0",border:"1px solid silver",position:"absolute",left:i?"auto":o+s+4+"px",right:i?o+s+4+"px":"auto",top:"0px",height:this.data.core.li_height-2+"px",lineHeight:this.data.core.li_height-2+"px",width:"150px"},blur:e.proxy(function(){var e=t.children(".jstree-rename-input"),i=e.val();""===i&&(i=a),l.remove(),e.remove(),this.set_text(t,a),this.rename_node(t,i),n.call(this,t,i,a),t.css("position","")},this),keyup:function(e){var t=e.keyCode||e.which;return 27==t?(this.value=a,void this.blur()):13==t?void this.blur():void c.width(Math.min(l.text("pW"+this.value).width(),r))},keypress:function(e){var t=e.keyCode||e.which;return 13==t?!1:void 0}})).children(".jstree-rename-input");this.set_text(t,""),l.css({fontFamily:c.css("fontFamily")||"",fontSize:c.css("fontSize")||"",fontWeight:c.css("fontWeight")||"",fontStyle:c.css("fontStyle")||"",fontStretch:c.css("fontStretch")||"",fontVariant:c.css("fontVariant")||"",letterSpacing:c.css("letterSpacing")||"",wordSpacing:c.css("wordSpacing")||""}),c.width(Math.min(l.text("pW"+c[0].value).width(),r))[0].select()},rename:function(e){e=this._get_node(e),this.__rollback();var t=this.__callback;this._show_input(e,function(e,n,i){t.call(this,{obj:e,new_name:n,old_name:i})})},create:function(t,n,i,r,o){var s,a=this;return t=this._get_node(t),t||(t=-1),this.__rollback(),s=this.create_node(t,n,i,function(t){var n=this._get_parent(t),i=e(t).index();r&&r.call(this,t),n.length&&n.hasClass("jstree-closed")&&this.open_node(n,!1,!0),o?a.__callback({obj:t,name:this.get_text(t),parent:n,position:i}):this._show_input(t,function(e,t,r){a.__callback({obj:e,name:t,parent:n,position:i})})})},remove:function(e){e=this._get_node(e,!0);var t=this._get_parent(e),n=this._get_prev(e);this.__rollback(),e=this.delete_node(e),e!==!1&&this.__callback({obj:e,prev:n,parent:t})},check_move:function(){if(!this.__call_old())return!1;var e=this._get_settings().crrm.move;return!!e.check_move.call(this,this._get_move())},move_node:function(e,t,n,i,r,o){var s=this._get_settings().crrm.move;return r?((s.always_copy===!0||"multitree"===s.always_copy&&e.rt.get_index()!==e.ot.get_index())&&(i=!0),void this.__call_old(!0,e,t,n,i,!0,o)):("undefined"==typeof n&&(n=s.default_position),"inside"!==n||s.default_position.match(/^(before|after)$/)||(n=s.default_position),this.__call_old(!0,e,t,n,i,!1,o))},cut:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.cp_nodes=!1,this.data.crrm.ct_nodes=e,void this.__callback({obj:e})):!1},copy:function(e){return e=this._get_node(e,!0),e&&e.length?(this.data.crrm.ct_nodes=!1,this.data.crrm.cp_nodes=e,void this.__callback({obj:e})):!1},paste:function(e){if(e=this._get_node(e),!e||!e.length)return!1;var t=this.data.crrm.ct_nodes?this.data.crrm.ct_nodes:this.data.crrm.cp_nodes;return this.data.crrm.ct_nodes||this.data.crrm.cp_nodes?(this.data.crrm.ct_nodes&&(this.move_node(this.data.crrm.ct_nodes,e),this.data.crrm.ct_nodes=!1),this.data.crrm.cp_nodes&&this.move_node(this.data.crrm.cp_nodes,e,!1,!0),void this.__callback({obj:e,nodes:t})):!1}}})}(jQuery),function(e){var t=[];e.jstree._themes=!1,e.jstree.plugin("themes",{__init:function(){this.get_container().bind("init.jstree",e.proxy(function(){var e=this._get_settings().themes;this.data.themes.dots=e.dots,this.data.themes.icons=e.icons,this.set_theme(e.theme,e.url)},this)).bind("loaded.jstree",e.proxy(function(){this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons()},this))},defaults:{theme:"default",url:!1,dots:!0,icons:!0},_fn:{set_theme:function(n,i){return n?(i||(i=e.jstree._themes+n+"/style.css"),-1==e.inArray(i,t)&&(e.vakata.css.add_sheet({url:i}),t.push(i)),this.data.themes.theme!=n&&(this.get_container().removeClass("jstree-"+this.data.themes.theme),this.data.themes.theme=n),this.get_container().addClass("jstree-"+n),this.data.themes.dots?this.show_dots():this.hide_dots(),this.data.themes.icons?this.show_icons():this.hide_icons(),void this.__callback()):!1},get_theme:function(){return this.data.themes.theme},show_dots:function(){this.data.themes.dots=!0,this.get_container().children("ul").removeClass("jstree-no-dots")},hide_dots:function(){this.data.themes.dots=!1,this.get_container().children("ul").addClass("jstree-no-dots")},toggle_dots:function(){this.data.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this.data.themes.icons=!0,this.get_container().children("ul").removeClass("jstree-no-icons")},hide_icons:function(){this.data.themes.icons=!1,this.get_container().children("ul").addClass("jstree-no-icons")},toggle_icons:function(){this.data.themes.icons?this.hide_icons():this.show_icons()}}}),e(function(){e.jstree._themes===!1&&e("script").each(function(){return this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)?(e.jstree._themes=this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/,"")+"themes/",!1):void 0}),e.jstree._themes===!1&&(e.jstree._themes="themes/")}),e.jstree.defaults.plugins.push("themes")}(jQuery),function(e){function t(t,n){var i,r=e.jstree._focused();return r&&r.data&&r.data.hotkeys&&r.data.hotkeys.enabled&&(i=r._get_settings().hotkeys[t])?i.call(r,n):void 0}var n=[];e.jstree.plugin("hotkeys",{__init:function(){if("undefined"==typeof e.hotkeys)throw"jsTree hotkeys: jQuery hotkeys plugin not included.";if(!this.data.ui)throw"jsTree hotkeys: jsTree UI plugin not included.";e.each(this._get_settings().hotkeys,function(i,r){r!==!1&&-1==e.inArray(i,n)&&(e(document).bind("keydown",i,function(e){return t(i,e)}),n.push(i))}),this.get_container().bind("lock.jstree",e.proxy(function(){this.data.hotkeys.enabled&&(this.data.hotkeys.enabled=!1,this.data.hotkeys.revert=!0)},this)).bind("unlock.jstree",e.proxy(function(){this.data.hotkeys.revert&&(this.data.hotkeys.enabled=!0)},this)),this.enable_hotkeys()},defaults:{up:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},"ctrl+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},"shift+up":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_prev(e)),!1},down:function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},"ctrl+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},"shift+down":function(){var e=this.data.ui.hovered||this.data.ui.last_selected||-1;return this.hover_node(this._get_next(e)),!1},left:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},"ctrl+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},"shift+left":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&(e.hasClass("jstree-open")?this.close_node(e):this.hover_node(this._get_prev(e))),!1},right:function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},"ctrl+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},"shift+right":function(){var e=this.data.ui.hovered||this.data.ui.last_selected;return e&&e.length&&(e.hasClass("jstree-closed")?this.open_node(e):this.hover_node(this._get_next(e))),!1},space:function(){return this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").click(),!1},"ctrl+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},"shift+space":function(e){return e.type="click",this.data.ui.hovered&&this.data.ui.hovered.children("a:eq(0)").trigger(e),!1},f2:function(){this.rename(this.data.ui.hovered||this.data.ui.last_selected)},del:function(){this.remove(this.data.ui.hovered||this._get_node(null))}},_fn:{enable_hotkeys:function(){this.data.hotkeys.enabled=!0},disable_hotkeys:function(){this.data.hotkeys.enabled=!1}}})}(jQuery),function(e){e.jstree.plugin("json_data",{__init:function(){var e=this._get_settings().json_data;e.progressive_unload&&this.get_container().bind("after_close.jstree",function(e,t){t.rslt.obj.children("ul").remove()})},defaults:{data:!1,ajax:!1,correct_state:!0,progressive_render:!1,progressive_unload:!1},_fn:{load_node:function(e,t,n){var i=this;this.load_node_json(e,function(){i.__callback({obj:i._get_node(e)}),t.call(this)},n)},_is_loaded:function(t){var n=this._get_settings().json_data;return t=this._get_node(t),-1==t||!t||!n.ajax&&!n.progressive_render&&!e.isFunction(n.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").length>0},refresh:function(t){t=this._get_node(t);var n=this._get_settings().json_data;return t&&-1!==t&&n.progressive_unload&&(e.isFunction(n.data)||n.ajax)&&t.removeData("jstree_children"),this.__call_old()},load_node_json:function(t,n,i){var r,o=this.get_settings().json_data,s=function(){},a=function(){};if(t=this._get_node(t),t&&-1!==t&&(o.progressive_render||o.progressive_unload)&&!t.is(".jstree-open, .jstree-leaf")&&0===t.children("ul").children("li").length&&t.data("jstree_children"))return r=this._parse_json(t.data("jstree_children"),t),r&&(t.append(r),o.progressive_unload||t.removeData("jstree_children")),this.clean_node(t),void(n&&n.call(this));if(t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!o.data&&!o.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(o.data):o.data.call(this,t,e.proxy(function(e){e=this._parse_json(e,t),e?(-1!==t&&t?(t.append(e).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(e.children()),this.clean_node(t),n&&n.call(this)):(-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),o.correct_state&&this.correct_state(t)):o.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this))},this));break;case!!o.data&&!o.ajax||!!o.data&&!!o.ajax&&(!t||-1===t):t&&-1!=t||(r=this._parse_json(o.data,t),r?(this.get_container().children("ul").empty().append(r.children()),this.clean_node()):o.correct_state&&this.get_container().children("ul").empty()),n&&n.call(this);break;case!o.data&&!!o.ajax||!!o.data&&!!o.ajax&&t&&-1!==t:s=function(e,n,r){var s=this.get_settings().json_data.ajax.error;s&&s.call(this,e,n,r),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===n&&o.correct_state&&this.correct_state(t)):"success"===n&&o.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this)},a=function(i,r,a){var l=this.get_settings().json_data.ajax.success;return l&&(i=l.call(this,i,r,a)||i),""===i||i&&i.toString&&""===i.toString().replace(/^[\s\n]+$/,"")||!e.isArray(i)&&!e.isPlainObject(i)?s.call(this,a,r,""):(i=this._parse_json(i,t),void(i?(-1!==t&&t?(t.append(i).children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()),this.clean_node(t),n&&n.call(this)):-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),o.correct_state&&(this.correct_state(t),n&&n.call(this))):o.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this))))},o.ajax.context=this,o.ajax.error=s,o.ajax.success=a,o.ajax.dataType||(o.ajax.dataType="json"),e.isFunction(o.ajax.url)&&(o.ajax.url=o.ajax.url.call(this,t)),e.isFunction(o.ajax.data)&&(o.ajax.data=o.ajax.data.call(this,t)),e.ajax(o.ajax)}},_parse_json:function(t,n,i){var r,o,s,a,l,c=!1,u=this._get_settings(),d=u.json_data,h=u.core.html_titles;if(!t)return c;if(d.progressive_unload&&n&&-1!==n&&n.data("jstree_children",c),e.isArray(t)){if(c=e(),!t.length)return!1;for(o=0,s=t.length;s>o;o++)r=this._parse_json(t[o],n,!0),
|
||||
r.length&&(c=c.add(r))}else{if("string"==typeof t&&(t={data:t}),!t.data&&""!==t.data)return c;c=e("<li />"),t.attr&&c.attr(t.attr),t.metadata&&c.data(t.metadata),t.state&&c.addClass("jstree-"+t.state),e.isArray(t.data)||(r=t.data,t.data=[],t.data.push(r)),e.each(t.data,function(n,i){r=e("<a />"),e.isFunction(i)&&(i=i.call(this,t)),"string"==typeof i?r.attr("href","#")[h?"html":"text"](i):(i.attr||(i.attr={}),i.attr.href||(i.attr.href="#"),r.attr(i.attr)[h?"html":"text"](i.title),i.language&&r.addClass(i.language)),r.prepend("<ins class='jstree-icon'> </ins>"),!i.icon&&t.icon&&(i.icon=t.icon),i.icon&&(-1===i.icon.indexOf("/")?r.children("ins").addClass(i.icon):r.children("ins").css("background","url('"+i.icon+"') center center no-repeat")),c.append(r)}),c.prepend("<ins class='jstree-icon'> </ins>"),t.children&&(d.progressive_render&&"open"!==t.state?c.addClass("jstree-closed").data("jstree_children",t.children):(d.progressive_unload&&c.data("jstree_children",t.children),e.isArray(t.children)&&t.children.length&&(r=this._parse_json(t.children,n,!0),r.length&&(l=e("<ul />"),l.append(r),c.append(l)))))}return i||(a=e("<ul />"),a.append(c),c=a),c},get_json:function(t,n,i,r){var o,s,a,l,c,u,d=[],h=this._get_settings(),p=this;return t=this._get_node(t),t&&-1!==t||(t=this.get_container().find("> ul > li")),n=e.isArray(n)?n:["id","class"],!r&&this.data.types&&n.push(h.types.type_attr),i=e.isArray(i)?i:[],t.each(function(){a=e(this),o={data:[]},n.length&&(o.attr={}),e.each(n,function(e,t){s=a.attr(t),s&&s.length&&s.replace(/jstree[^ ]*/gi,"").length&&(o.attr[t]=(" "+s).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))}),a.hasClass("jstree-open")&&(o.state="open"),a.hasClass("jstree-closed")&&(o.state="closed"),a.data()&&(o.metadata=a.data()),l=a.children("a"),l.each(function(){c=e(this),i.length||-1!==e.inArray("languages",h.plugins)||c.children("ins").get(0).style.backgroundImage.length||c.children("ins").get(0).className&&c.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").length?(u=!1,-1!==e.inArray("languages",h.plugins)&&e.isArray(h.languages)&&h.languages.length&&e.each(h.languages,function(e,t){return c.hasClass(t)?(u=t,!1):void 0}),s={attr:{},title:p.get_text(c,u)},e.each(i,function(e,t){s.attr[t]=(" "+(c.attr(t)||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")}),-1!==e.inArray("languages",h.plugins)&&e.isArray(h.languages)&&h.languages.length&&e.each(h.languages,function(e,t){return c.hasClass(t)?(s.language=t,!0):void 0}),c.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(s.icon=c.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,"")),c.children("ins").get(0).style.backgroundImage.length&&(s.icon=c.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")",""))):s=p.get_text(c),l.length>1?o.data.push(s):o.data=s}),a=a.find("> ul > li"),a.length&&(o.children=p.get_json(a,n,i,!0)),d.push(o)}),d}}})}(jQuery),function(e){var t=!1;e.jstree.plugin("languages",{__init:function(){this._load_css()},defaults:[],_fn:{set_lang:function(n){var i=this._get_settings().languages,r=!1,o=".jstree-"+this.get_index()+" a";if(!e.isArray(i)||0===i.length)return!1;if(-1==e.inArray(n,i)){if(!i[n])return!1;n=i[n]}return n==this.data.languages.current_language?!0:(r=e.vakata.css.get_css(o+"."+this.data.languages.current_language,!1,t),r!==!1&&(r.style.display="none"),r=e.vakata.css.get_css(o+"."+n,!1,t),r!==!1&&(r.style.display=""),this.data.languages.current_language=n,this.__callback(n),!0)},get_lang:function(){return this.data.languages.current_language},_get_string:function(t,n){var i=this._get_settings().languages,r=this._get_settings().core.strings;return e.isArray(i)&&i.length&&(n=n&&-1!=e.inArray(n,i)?n:this.data.languages.current_language),r[n]&&r[n][t]?r[n][t]:r[t]?r[t]:t},get_text:function(t,n){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var i=this._get_settings().languages,r=this._get_settings().core.html_titles;return e.isArray(i)&&i.length?(n=n&&-1!=e.inArray(n,i)?n:this.data.languages.current_language,t=t.children("a."+n)):t=t.children("a:eq(0)"),r?(t=t.clone(),t.children("INS").remove(),t.html()):(t=t.contents().filter(function(){return 3==this.nodeType})[0],t.nodeValue)},set_text:function(t,n,i){if(t=this._get_node(t)||this.data.ui.last_selected,!t.size())return!1;var r,o=this._get_settings().languages,s=this._get_settings().core.html_titles;return e.isArray(o)&&o.length?(i=i&&-1!=e.inArray(i,o)?i:this.data.languages.current_language,t=t.children("a."+i)):t=t.children("a:eq(0)"),s?(r=t.children("INS").clone(),t.html(n).prepend(r),this.__callback({obj:t,name:n,lang:i}),!0):(t=t.contents().filter(function(){return 3==this.nodeType})[0],this.__callback({obj:t,name:n,lang:i}),t.nodeValue=n)},_load_css:function(){var n,i=this._get_settings().languages,r="/* languages css */",o=".jstree-"+this.get_index()+" a";if(e.isArray(i)&&i.length){for(this.data.languages.current_language=i[0],n=0;n<i.length;n++)r+=o+"."+i[n]+" {",i[n]!=this.data.languages.current_language&&(r+=" display:none; "),r+=" } ";t=e.vakata.css.add_sheet({str:r,title:"jstree-languages"})}},create_node:function(t,n,i,r){var o=this.__call_old(!0,t,n,i,function(t){var n,i=this._get_settings().languages,o=t.children("a");if(e.isArray(i)&&i.length){for(n=0;n<i.length;n++)o.is("."+i[n])||t.append(o.eq(0).clone().removeClass(i.join(" ")).addClass(i[n]));o.not("."+i.join(", .")).remove()}r&&r.call(this,t)});return o}}})}(jQuery),function(e){e.jstree.plugin("cookies",{__init:function(){if("undefined"==typeof e.cookie)throw"jsTree cookie: jQuery cookie plugin not included.";var t,n=this._get_settings().cookies;n.save_loaded&&(t=e.cookie(n.save_loaded),t&&t.length&&(this.data.core.to_load=t.split(","))),n.save_opened&&(t=e.cookie(n.save_opened),t&&t.length&&(this.data.core.to_open=t.split(","))),n.save_selected&&(t=e.cookie(n.save_selected),t&&t.length&&this.data.ui&&(this.data.ui.to_select=t.split(","))),this.get_container().one((this.data.ui?"reselect":"reopen")+".jstree",e.proxy(function(){this.get_container().bind("open_node.jstree close_node.jstree select_node.jstree deselect_node.jstree",e.proxy(function(e){this._get_settings().cookies.auto_save&&this.save_cookie((e.handleObj.namespace+e.handleObj.type).replace("jstree",""))},this))},this))},defaults:{save_loaded:"jstree_load",save_opened:"jstree_open",save_selected:"jstree_select",auto_save:!0,cookie_options:{}},_fn:{save_cookie:function(t){if(!this.data.core.refreshing){var n=this._get_settings().cookies;if(!t)return n.save_loaded&&(this.save_loaded(),e.cookie(n.save_loaded,this.data.core.to_load.join(","),n.cookie_options)),n.save_opened&&(this.save_opened(),e.cookie(n.save_opened,this.data.core.to_open.join(","),n.cookie_options)),void(n.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(n.save_selected,this.data.ui.to_select.join(","),n.cookie_options)));switch(t){case"open_node":case"close_node":n.save_opened&&(this.save_opened(),e.cookie(n.save_opened,this.data.core.to_open.join(","),n.cookie_options)),n.save_loaded&&(this.save_loaded(),e.cookie(n.save_loaded,this.data.core.to_load.join(","),n.cookie_options));break;case"select_node":case"deselect_node":n.save_selected&&this.data.ui&&(this.save_selected(),e.cookie(n.save_selected,this.data.ui.to_select.join(","),n.cookie_options))}}}}})}(jQuery),function(e){e.jstree.plugin("sort",{__init:function(){this.get_container().bind("load_node.jstree",e.proxy(function(e,t){var n=this._get_node(t.rslt.obj);n=-1===n?this.get_container().children("ul"):n.children("ul"),this.sort(n)},this)).bind("rename_node.jstree create_node.jstree create.jstree",e.proxy(function(e,t){this.sort(t.rslt.obj.parent())},this)).bind("move_node.jstree",e.proxy(function(e,t){var n=-1==t.rslt.np?this.get_container():t.rslt.np;this.sort(n.children("ul"))},this))},defaults:function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},_fn:{sort:function(t){var n=this._get_settings().sort,i=this;t.append(e.makeArray(t.children("li")).sort(e.proxy(n,i))),t.find("> li > ul").each(function(){i.sort(e(this))}),this.clean_node(t)}}})}(jQuery),function(e){var t=!1,n=!1,i=!1,r=!1,o=!1,s=!1,a=!1,l=!1,c=!1;e.vakata.dnd={is_down:!1,is_drag:!1,helper:!1,scroll_spd:10,init_x:0,init_y:0,threshold:5,helper_left:5,helper_top:10,user_data:{},drag_start:function(t,n,i){e.vakata.dnd.is_drag&&e.vakata.drag_stop({});try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.MozUserSelect="none")}catch(r){}return e.vakata.dnd.init_x=t.pageX,e.vakata.dnd.init_y=t.pageY,e.vakata.dnd.user_data=n,e.vakata.dnd.is_down=!0,e.vakata.dnd.helper=e("<div id='vakata-dragged' />").html(i),e(document).bind("mousemove",e.vakata.dnd.drag),e(document).bind("mouseup",e.vakata.dnd.drag_stop),!1},drag:function(t){if(e.vakata.dnd.is_down){if(!e.vakata.dnd.is_drag){if(!(Math.abs(t.pageX-e.vakata.dnd.init_x)>5||Math.abs(t.pageY-e.vakata.dnd.init_y)>5))return;e.vakata.dnd.helper.appendTo("body"),e.vakata.dnd.is_drag=!0,e(document).triggerHandler("drag_start.vakata",{event:t,data:e.vakata.dnd.user_data})}if("mousemove"===t.type){var n=e(document),i=n.scrollTop(),r=n.scrollLeft();t.pageY-i<20?(s&&"down"===a&&(clearInterval(s),s=!1),s||(a="up",s=setInterval(function(){e(document).scrollTop(e(document).scrollTop()-e.vakata.dnd.scroll_spd)},150))):s&&"up"===a&&(clearInterval(s),s=!1),e(window).height()-(t.pageY-i)<20?(s&&"up"===a&&(clearInterval(s),s=!1),s||(a="down",s=setInterval(function(){e(document).scrollTop(e(document).scrollTop()+e.vakata.dnd.scroll_spd)},150))):s&&"down"===a&&(clearInterval(s),s=!1),t.pageX-r<20?(o&&"right"===l&&(clearInterval(o),o=!1),o||(l="left",o=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()-e.vakata.dnd.scroll_spd)},150))):o&&"left"===l&&(clearInterval(o),o=!1),e(window).width()-(t.pageX-r)<20?(o&&"left"===l&&(clearInterval(o),o=!1),o||(l="right",o=setInterval(function(){e(document).scrollLeft(e(document).scrollLeft()+e.vakata.dnd.scroll_spd)},150))):o&&"right"===l&&(clearInterval(o),o=!1)}e.vakata.dnd.helper.css({left:t.pageX+e.vakata.dnd.helper_left+"px",top:t.pageY+e.vakata.dnd.helper_top+"px"}),e(document).triggerHandler("drag.vakata",{event:t,data:e.vakata.dnd.user_data})}},drag_stop:function(t){o&&clearInterval(o),s&&clearInterval(s),e(document).unbind("mousemove",e.vakata.dnd.drag),e(document).unbind("mouseup",e.vakata.dnd.drag_stop),e(document).triggerHandler("drag_stop.vakata",{event:t,data:e.vakata.dnd.user_data}),e.vakata.dnd.helper.remove(),e.vakata.dnd.init_x=0,e.vakata.dnd.init_y=0,e.vakata.dnd.user_data={},e.vakata.dnd.is_down=!1,e.vakata.dnd.is_drag=!1}},e(function(){var t="#vakata-dragged { display:block; margin:0 0 0 0; padding:4px 4px 4px 24px; position:absolute; top:-2000px; line-height:16px; z-index:10000; } ";e.vakata.css.add_sheet({str:t,title:"vakata"})}),e.jstree.plugin("dnd",{__init:function(){this.data.dnd={active:!1,after:!1,inside:!1,before:!1,off:!1,prepared:!1,w:0,to1:!1,to2:!1,cof:!1,cw:!1,ch:!1,i1:!1,i2:!1,mto:!1},this.get_container().bind("mouseenter.jstree",e.proxy(function(n){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.themes&&(i.attr("class","jstree-"+this.data.themes.theme),r&&r.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),n.currentTarget===n.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==n.target)){var o,s=e.jstree._reference(n.target);s.data.dnd.foreign?(o=s._get_settings().dnd.drag_check.call(this,{o:t,r:s.get_container(),is_root:!0}),o!==!0&&o.inside!==!0&&o.before!==!0&&o.after!==!0||e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")):(s.prepare_move(t,s.get_container(),"last"),s.check_move()&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"))}},this)).bind("mouseup.jstree",e.proxy(function(n){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&n.currentTarget===n.target&&e.vakata.dnd.user_data.obj&&e(e.vakata.dnd.user_data.obj).length&&e(e.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==n.target){var i,r=e.jstree._reference(n.currentTarget);r.data.dnd.foreign?(i=r._get_settings().dnd.drag_check.call(this,{o:t,r:r.get_container(),is_root:!0}),i!==!0&&i.inside!==!0&&i.before!==!0&&i.after!==!0||r._get_settings().dnd.drag_finish.call(this,{o:t,r:r.get_container(),is_root:!0})):r.move_node(t,r.get_container(),"last",n[r._get_settings().dnd.copy_modifier+"Key"])}},this)).bind("mouseleave.jstree",e.proxy(function(t){return t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id?!1:void(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")))},this)).bind("mousemove.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){var n=this.get_container()[0];t.pageX+24>this.data.dnd.cof.left+this.data.dnd.cw?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft+=e.vakata.dnd.scroll_spd},n),100)):t.pageX-24<this.data.dnd.cof.left?(this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i1=setInterval(e.proxy(function(){this.scrollLeft-=e.vakata.dnd.scroll_spd},n),100)):this.data.dnd.i1&&clearInterval(this.data.dnd.i1),t.pageY+24>this.data.dnd.cof.top+this.data.dnd.ch?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop+=e.vakata.dnd.scroll_spd},n),100)):t.pageY-24<this.data.dnd.cof.top?(this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.i2=setInterval(e.proxy(function(){this.scrollTop-=e.vakata.dnd.scroll_spd},n),100)):this.data.dnd.i2&&clearInterval(this.data.dnd.i2)}},this)).bind("scroll.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&i&&r&&(i.hide(),r.hide())},this)).delegate("a","mousedown.jstree",e.proxy(function(e){return 1===e.which?(this.start_drag(e.currentTarget,e),!1):void 0},this)).delegate("a","mouseenter.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_enter(t.currentTarget)},this)).delegate("a","mousemove.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&(n&&n.length&&n.children("a")[0]===t.currentTarget||this.dnd_enter(t.currentTarget),"undefined"==typeof this.data.dnd.off.top&&(this.data.dnd.off=e(t.target).offset()),this.data.dnd.w=(t.pageY-(this.data.dnd.off.top||0))%this.data.core.li_height,this.data.dnd.w<0&&(this.data.dnd.w+=this.data.core.li_height),this.dnd_show())},this)).delegate("a","mouseleave.jstree",e.proxy(function(t){if(e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree){if(t.relatedTarget&&t.relatedTarget.id&&"jstree-marker-line"===t.relatedTarget.id)return!1;i&&i.hide(),r&&r.hide(),this.data.dnd.mto=setTimeout(function(e){return function(){e.dnd_leave(t)}}(this),0)}},this)).delegate("a, #jstree-marker-line","mouseup.jstree",e.proxy(function(t){e.vakata.dnd.is_drag&&e.vakata.dnd.user_data.jstree&&this.dnd_finish(t)},this)),e(document).bind("drag_stop.vakata",e.proxy(function(){this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),this.data.dnd.i1&&clearInterval(this.data.dnd.i1),this.data.dnd.i2&&clearInterval(this.data.dnd.i2),this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,this.data.dnd.off=!1,this.data.dnd.prepared=!1,this.data.dnd.w=!1,this.data.dnd.to1=!1,this.data.dnd.to2=!1,this.data.dnd.i1=!1,this.data.dnd.i2=!1,this.data.dnd.active=!1,this.data.dnd.foreign=!1,i&&i.css({top:"-2000px"}),r&&r.css({top:"-2000px"})},this)).bind("drag_start.vakata",e.proxy(function(t,n){if(n.data.jstree){var i=e(n.event.target);i.closest(".jstree").hasClass("jstree-"+this.get_index())&&this.dnd_enter(i)}},this));var o=this._get_settings().dnd;o.drag_target&&e(document).delegate(o.drag_target,"mousedown.jstree-"+this.get_index(),e.proxy(function(n){t=n.target,e.vakata.dnd.drag_start(n,{jstree:!0,obj:n.target},"<ins class='jstree-icon'></ins>"+e(n.target).text()),this.data.themes&&(i&&i.attr("class","jstree-"+this.data.themes.theme),r&&r.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid");var o=this.get_container();this.data.dnd.cof=o.offset(),this.data.dnd.cw=parseInt(o.width(),10),this.data.dnd.ch=parseInt(o.height(),10),this.data.dnd.foreign=!0,n.preventDefault()},this)),o.drop_target&&e(document).delegate(o.drop_target,"mouseenter.jstree-"+this.get_index(),e.proxy(function(n){this.data.dnd.active&&this._get_settings().dnd.drop_check.call(this,{o:t,r:e(n.target),e:n})&&e.vakata.dnd.helper.children("ins").attr("class","jstree-ok")},this)).delegate(o.drop_target,"mouseleave.jstree-"+this.get_index(),e.proxy(function(t){this.data.dnd.active&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid")},this)).delegate(o.drop_target+", #jstree-marker-line","mouseup.jstree-"+this.get_index(),e.proxy(function(n){this.data.dnd.active&&e.vakata.dnd.helper.children("ins").hasClass("jstree-ok")&&this._get_settings().dnd.drop_finish.call(this,{o:t,r:e(n.target),e:n})},this))},defaults:{copy_modifier:"ctrl",check_timeout:100,open_timeout:500,drop_target:".jstree-drop",drop_check:function(e){return!0},drop_finish:e.noop,drag_target:".jstree-draggable",drag_finish:e.noop,drag_check:function(e){return{after:!1,before:!1,inside:!0}}},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("drag_start.vakata").unbind("drag_stop.vakata"),t=!1},_fn:{dnd_prepare:function(){if(n&&n.length){if(this.data.dnd.off=n.offset(),this._get_settings().core.rtl&&(this.data.dnd.off.right=this.data.dnd.off.left+n.width()),this.data.dnd.foreign){var e=this._get_settings().dnd.drag_check.call(this,{o:t,r:n});return this.data.dnd.after=e.after,this.data.dnd.before=e.before,this.data.dnd.inside=e.inside,this.data.dnd.prepared=!0,this.dnd_show()}return this.prepare_move(t,n,"before"),this.data.dnd.before=this.check_move(),this.prepare_move(t,n,"after"),this.data.dnd.after=this.check_move(),this._is_loaded(n)?(this.prepare_move(t,n,"inside"),this.data.dnd.inside=this.check_move()):this.data.dnd.inside=!1,this.data.dnd.prepared=!0,this.dnd_show()}},dnd_show:function(){if(this.data.dnd.prepared){var t,n=["before","inside","after"],o=!1,s=this._get_settings().core.rtl;switch(n=this.data.dnd.w<this.data.core.li_height/3?["before","inside","after"]:this.data.dnd.w<=2*this.data.core.li_height/3?this.data.dnd.w<this.data.core.li_height/2?["inside","before","after"]:["inside","after","before"]:["after","inside","before"],e.each(n,e.proxy(function(t,n){return this.data.dnd[n]?(e.vakata.dnd.helper.children("ins").attr("class","jstree-ok"),o=n,!1):void 0},this)),o===!1&&e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),t=s?this.data.dnd.off.right-18:this.data.dnd.off.left+10,o){case"before":i.css({left:t+"px",top:this.data.dnd.off.top-6+"px"}).show(),r&&r.css({left:t+8+"px",top:this.data.dnd.off.top-1+"px"}).show();break;case"after":i.css({left:t+"px",top:this.data.dnd.off.top+this.data.core.li_height-6+"px"}).show(),r&&r.css({left:t+8+"px",top:this.data.dnd.off.top+this.data.core.li_height-1+"px"}).show();break;case"inside":i.css({left:t+(s?-4:4)+"px",top:this.data.dnd.off.top+this.data.core.li_height/2-5+"px"}).show(),r&&r.hide();break;default:i.hide(),r&&r.hide()}return c=o,o}},dnd_open:function(){this.data.dnd.to2=!1,this.open_node(n,e.proxy(this.dnd_prepare,this),!0)},dnd_finish:function(e){this.data.dnd.foreign?(this.data.dnd.after||this.data.dnd.before||this.data.dnd.inside)&&this._get_settings().dnd.drag_finish.call(this,{o:t,r:n,p:c}):(this.dnd_prepare(),this.move_node(t,n,c,e[this._get_settings().dnd.copy_modifier+"Key"])),t=!1,n=!1,i.hide(),r&&r.hide()},dnd_enter:function(t){this.data.dnd.mto&&(clearTimeout(this.data.dnd.mto),this.data.dnd.mto=!1);var i=this._get_settings().dnd;this.data.dnd.prepared=!1,n=this._get_node(t),i.check_timeout?(this.data.dnd.to1&&clearTimeout(this.data.dnd.to1),this.data.dnd.to1=setTimeout(e.proxy(this.dnd_prepare,this),i.check_timeout)):this.dnd_prepare(),i.open_timeout?(this.data.dnd.to2&&clearTimeout(this.data.dnd.to2),n&&n.length&&n.hasClass("jstree-closed")&&(this.data.dnd.to2=setTimeout(e.proxy(this.dnd_open,this),i.open_timeout))):n&&n.length&&n.hasClass("jstree-closed")&&this.dnd_open()},dnd_leave:function(t){this.data.dnd.after=!1,this.data.dnd.before=!1,this.data.dnd.inside=!1,e.vakata.dnd.helper.children("ins").attr("class","jstree-invalid"),i.hide(),r&&r.hide(),n&&n[0]===t.target.parentNode&&(this.data.dnd.to1&&(clearTimeout(this.data.dnd.to1),this.data.dnd.to1=!1),this.data.dnd.to2&&(clearTimeout(this.data.dnd.to2),this.data.dnd.to2=!1))},start_drag:function(n,o){t=this._get_node(n),this.data.ui&&this.is_selected(t)&&(t=this._get_node(null,!0));var s=t.length>1?this._get_string("multiple_selection"):this.get_text(t),a=this.get_container();this._get_settings().core.html_titles||(s=s.replace(/</gi,"<").replace(/>/gi,">")),e.vakata.dnd.drag_start(o,{jstree:!0,obj:t},"<ins class='jstree-icon'></ins>"+s),this.data.themes&&(i&&i.attr("class","jstree-"+this.data.themes.theme),r&&r.attr("class","jstree-"+this.data.themes.theme),e.vakata.dnd.helper.attr("class","jstree-dnd-helper jstree-"+this.data.themes.theme)),this.data.dnd.cof=a.offset(),this.data.dnd.cw=parseInt(a.width(),10),this.data.dnd.ch=parseInt(a.height(),10),this.data.dnd.active=!0}}}),e(function(){var t="#vakata-dragged ins { display:block; text-decoration:none; width:16px; height:16px; margin:0 0 0 0; padding:0; position:absolute; top:4px; left:4px; -moz-border-radius:4px; border-radius:4px; -webkit-border-radius:4px; } #vakata-dragged .jstree-ok { background:green; } #vakata-dragged .jstree-invalid { background:red; } #jstree-marker { padding:0; margin:0; font-size:12px; overflow:hidden; height:12px; width:8px; position:absolute; top:-30px; z-index:10001; background-repeat:no-repeat; display:none; background-color:transparent; text-shadow:1px 1px 1px white; color:black; line-height:10px; } #jstree-marker-line { padding:0; margin:0; line-height:0%; font-size:1px; overflow:hidden; height:1px; width:100px; position:absolute; top:-30px; z-index:10000; background-repeat:no-repeat; display:none; background-color:#456c43; cursor:pointer; border:1px solid #eeeeee; border-left:0; -moz-box-shadow: 0px 0px 2px #666; -webkit-box-shadow: 0px 0px 2px #666; box-shadow: 0px 0px 2px #666; -moz-border-radius:1px; border-radius:1px; -webkit-border-radius:1px; }";e.vakata.css.add_sheet({str:t,title:"jstree"}),i=e("<div />").attr({id:"jstree-marker"}).hide().html("»").bind("mouseleave mouseenter",function(e){return i.hide(),r.hide(),e.preventDefault(),e.stopImmediatePropagation(),!1}).appendTo("body"),r=e("<div />").attr({id:"jstree-marker-line"}).hide().bind("mouseup",function(e){return n&&n.length?(n.children("a").trigger(e),e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}).bind("mouseleave",function(t){var o=e(t.relatedTarget);return(o.is(".jstree")||0===o.closest(".jstree").length)&&n&&n.length?(n.children("a").trigger(t),i.hide(),r.hide(),t.preventDefault(),t.stopImmediatePropagation(),!1):void 0}).appendTo("body"),e(document).bind("drag_start.vakata",function(e,t){t.data.jstree&&(i.show(),r&&r.show())}),e(document).bind("drag_stop.vakata",function(e,t){t.data.jstree&&(i.hide(),r&&r.hide())})})}(jQuery),function(e){e.jstree.plugin("checkbox",{__init:function(){this.data.checkbox.noui=this._get_settings().checkbox.override_ui,this.data.ui&&this.data.checkbox.noui&&(this.select_node=this.deselect_node=this.deselect_all=e.noop,this.get_selected=this.get_checked),this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree refresh.jstree",e.proxy(function(e,t){this._prepare_checkboxes(t.rslt.obj)},this)).bind("loaded.jstree",e.proxy(function(e){this._prepare_checkboxes()},this)).delegate(this.data.ui&&this.data.checkbox.noui?"a":"ins.jstree-checkbox","click.jstree",e.proxy(function(e){return e.preventDefault(),this._get_node(e.target).hasClass("jstree-checked")?this.uncheck_node(e.target):this.check_node(e.target),this.data.ui&&this.data.checkbox.noui?(this.save_selected(),void(this.data.cookies&&this.save_cookie("select_node"))):(e.stopImmediatePropagation(),!1)},this))},defaults:{override_ui:!1,two_state:!1,real_checkboxes:!1,checked_parent_open:!0,real_checkboxes_names:function(e){return["check_"+(e[0].id||Math.ceil(1e4*Math.random())),1]}},__destroy:function(){this.get_container().find("input.jstree-real-checkbox").removeClass("jstree-real-checkbox").end().find("ins.jstree-checkbox").remove()},_fn:{_checkbox_notify:function(e,t){t.checked&&this.check_node(e,!1)},_prepare_checkboxes:function(t){if(t=t&&-1!=t?this._get_node(t):this.get_container().find("> ul > li"),t!==!1){var n,i,r=this,o=this._get_settings().checkbox.two_state,s=this._get_settings().checkbox.real_checkboxes,a=this._get_settings().checkbox.real_checkboxes_names;t.each(function(){i=e(this),n=i.is("li")&&(i.hasClass("jstree-checked")||s&&i.children(":checked").length)?"jstree-checked":"jstree-unchecked",i.find("li").andSelf().each(function(){var t,i=e(this);i.children("a"+(r.data.languages?"":":eq(0)")).not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'> </ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(o?"jstree-unchecked":n),s&&(i.children(":checkbox").length?i.children(":checkbox").addClass("jstree-real-checkbox"):(t=a.call(r,i),i.prepend("<input type='checkbox' class='jstree-real-checkbox' id='"+t[0]+"' name='"+t[0]+"' value='"+t[1]+"' />"))),o?(i.hasClass("jstree-checked")||i.children(":checked").length)&&i.addClass("jstree-checked").children(":checkbox").prop("checked",!0):("jstree-checked"===n||i.hasClass("jstree-checked")||i.children(":checked").length)&&i.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked",!0)})}),o||t.find(".jstree-checked").parent().parent().each(function(){r._repair_state(this)})}},change_state:function(t,n){t=this._get_node(t);var i=!1,r=this._get_settings().checkbox.real_checkboxes;if(!t||-1===t)return!1;if(n=n===!1||n===!0?n:t.hasClass("jstree-checked"),this._get_settings().checkbox.two_state)n?(t.removeClass("jstree-checked").addClass("jstree-unchecked"),r&&t.children(":checkbox").prop("checked",!1)):(t.removeClass("jstree-unchecked").addClass("jstree-checked"),r&&t.children(":checkbox").prop("checked",!0));else{if(n){if(i=t.find("li").andSelf(),!i.filter(".jstree-checked, .jstree-undetermined").length)return!1;i.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),r&&i.children(":checkbox").prop("checked",!1)}else{if(i=t.find("li").andSelf(),!i.filter(".jstree-unchecked, .jstree-undetermined").length)return!1;i.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),r&&i.children(":checkbox").prop("checked",!0),this.data.ui&&(this.data.ui.last_selected=t),this.data.checkbox.last_selected=t}t.parentsUntil(".jstree","li").each(function(){var t=e(this);if(n){if(t.children("ul").children("li.jstree-checked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),r&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked"),r&&t.children(":checkbox").prop("checked",!1)}else{if(t.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length)return t.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),r&&t.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1),!1;t.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked"),r&&t.children(":checkbox").prop("checked",!0)}})}return this.data.ui&&this.data.checkbox.noui&&(this.data.ui.selected=this.get_checked()),this.__callback(t),!0},check_node:function(e){if(this.change_state(e,!1)){if(e=this._get_node(e),this._get_settings().checkbox.checked_parent_open){var t=this;e.parents(".jstree-closed").each(function(){t.open_node(this,!1,!0)})}this.__callback({obj:e})}},uncheck_node:function(e){this.change_state(e,!0)&&this.__callback({obj:this._get_node(e)})},check_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!1)}),this.__callback()},uncheck_all:function(){var e=this,t=this._get_settings().checkbox.two_state?this.get_container_ul().find("li"):this.get_container_ul().children("li");t.each(function(){e.change_state(this,!0)}),this.__callback()},is_checked:function(e){return e=this._get_node(e),e.length?e.is(".jstree-checked"):!1},get_checked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-checked"):e.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked")},get_unchecked:function(e,t){return e=e&&-1!==e?this._get_node(e):this.get_container(),t||this._get_settings().checkbox.two_state?e.find(".jstree-unchecked"):e.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked")},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes")},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes")},_repair_state:function(e){if(e=this._get_node(e),e.length){if(this._get_settings().checkbox.two_state)return void e.find("li").andSelf().not(".jstree-checked").removeClass("jstree-undetermined").addClass("jstree-unchecked").children(":checkbox").prop("checked",!0);var t=this._get_settings().checkbox.real_checkboxes,n=e.find("> ul > .jstree-checked").length,i=e.find("> ul > .jstree-undetermined").length,r=e.find("> ul > li").length;0===r?e.hasClass("jstree-undetermined")&&this.change_state(e,!1):0===n&&0===i?this.change_state(e,!0):n===r?this.change_state(e,!1):(e.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined"),t&&e.parentsUntil(".jstree","li").andSelf().children(":checkbox").prop("checked",!1))}},reselect:function(){if(this.data.ui&&this.data.checkbox.noui){var t=this,n=this.data.ui.to_select;n=e.map(e.makeArray(n),function(e){return"#"+e.toString().replace(/^#/,"").replace(/\\\//g,"/").replace(/\//g,"\\/").replace(/\\\./g,".").replace(/\./g,"\\.").replace(/\:/g,"\\:")}),this.deselect_all(),e.each(n,function(e,n){t.check_node(n)}),this.__callback()}else this.__call_old()},save_loaded:function(){var e=this;this.data.core.to_load=[],this.get_container_ul().find("li.jstree-closed.jstree-undetermined").each(function(){this.id&&e.data.core.to_load.push("#"+this.id)})}}}),e(function(){var t=".jstree .jstree-real-checkbox { display:none; } ";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.vakata.xslt=function(t,n,i){var r,o,s,a,l="";return document.recalc?(r=document.createElement("xml"),o=document.createElement("xml"),r.innerHTML=t,o.innerHTML=n,e("body").append(r).append(o),setTimeout(function(t,n,i){return function(){i.call(null,t.transformNode(n.XMLDocument)),setTimeout(function(t,n){return function(){e(t).remove(),e(n).remove();
|
||||
}}(t,n),200)}}(r,o,i),100),!0):("undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"==typeof window.XSLTProcessor&&(t=(new DOMParser).parseFromString(t,"text/xml"),n=(new DOMParser).parseFromString(n,"text/xml")),"undefined"!=typeof window.DOMParser&&"undefined"!=typeof window.XMLHttpRequest&&"undefined"!=typeof window.XSLTProcessor?(s=new XSLTProcessor,(a=e.isFunction(s.transformDocument)?"undefined"!=typeof window.XMLSerializer:!0)?(t=(new DOMParser).parseFromString(t,"text/xml"),n=(new DOMParser).parseFromString(n,"text/xml"),e.isFunction(s.transformDocument)?(l=document.implementation.createDocument("","",null),s.transformDocument(t,n,l,null),i.call(null,(new XMLSerializer).serializeToString(l)),!0):(s.importStylesheet(n),l=s.transformToFragment(t,document),i.call(null,e("<div />").append(l).html()),!0)):!1):!1)};var t={nest:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/html" /><xsl:template match="/"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="/root" /> </xsl:call-template></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <ul> <xsl:for-each select="$node/item"> <xsl:variable name="children" select="count(./item) > 0" /> <li> <xsl:attribute name="class"> <xsl:if test="position() = last()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'class\' and name() != \'state\' and name() != \'hasChildren\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text> </xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text> </xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children or @hasChildren"><xsl:call-template name="nodes"><xsl:with-param name="node" select="current()" /></xsl:call-template></xsl:if> </li> </xsl:for-each> </ul></xsl:template></xsl:stylesheet>',flat:'<?xml version="1.0" encoding="utf-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ><xsl:output method="html" encoding="utf-8" omit-xml-declaration="yes" standalone="no" indent="no" media-type="text/xml" /><xsl:template match="/"> <ul> <xsl:for-each select="//item[not(@parent_id) or @parent_id=0 or not(@parent_id = //item/@id)]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul></xsl:template><xsl:template name="nodes"> <xsl:param name="node" /> <xsl:param name="is_last" /> <xsl:variable name="children" select="count(//item[@parent_id=$node/attribute::id]) > 0" /> <li> <xsl:attribute name="class"> <xsl:if test="$is_last = true()">jstree-last </xsl:if> <xsl:choose> <xsl:when test="@state = \'open\'">jstree-open </xsl:when> <xsl:when test="$children or @hasChildren or @state = \'closed\'">jstree-closed </xsl:when> <xsl:otherwise>jstree-leaf </xsl:otherwise> </xsl:choose> <xsl:value-of select="@class" /> </xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'parent_id\' and name() != \'hasChildren\' and name() != \'class\' and name() != \'state\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins class="jstree-icon"><xsl:text> </xsl:text></ins> <xsl:for-each select="content/name"> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="@href"><xsl:value-of select="@href" /></xsl:when> <xsl:otherwise>#</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="class"><xsl:value-of select="@lang" /> <xsl:value-of select="@class" /></xsl:attribute> <xsl:attribute name="style"><xsl:value-of select="@style" /></xsl:attribute> <xsl:for-each select="@*"> <xsl:if test="name() != \'style\' and name() != \'class\' and name() != \'href\'"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> </xsl:if> </xsl:for-each> <ins> <xsl:attribute name="class">jstree-icon <xsl:if test="string-length(attribute::icon) > 0 and not(contains(@icon,\'/\'))"><xsl:value-of select="@icon" /></xsl:if> </xsl:attribute> <xsl:if test="string-length(attribute::icon) > 0 and contains(@icon,\'/\')"><xsl:attribute name="style">background:url(<xsl:value-of select="@icon" />) center center no-repeat;</xsl:attribute></xsl:if> <xsl:text> </xsl:text> </ins> <xsl:copy-of select="./child::node()" /> </a> </xsl:for-each> <xsl:if test="$children"> <ul> <xsl:for-each select="//item[@parent_id=$node/attribute::id]"> <xsl:call-template name="nodes"> <xsl:with-param name="node" select="." /> <xsl:with-param name="is_last" select="number(position() = last())" /> </xsl:call-template> </xsl:for-each> </ul> </xsl:if> </li></xsl:template></xsl:stylesheet>'},n=function(e){return e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")};e.jstree.plugin("xml_data",{defaults:{data:!1,ajax:!1,xsl:"flat",clean_node:!1,correct_state:!0,get_skip_empty:!1,get_include_preamble:!0},_fn:{load_node:function(e,t,n){var i=this;this.load_node_xml(e,function(){i.__callback({obj:i._get_node(e)}),t.call(this)},n)},_is_loaded:function(t){var n=this._get_settings().xml_data;return t=this._get_node(t),-1==t||!t||!n.ajax&&!e.isFunction(n.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_xml:function(t,n,i){var r=this.get_settings().xml_data,o=function(){},s=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case!r.data&&!r.ajax:throw"Neither data nor ajax settings supplied.";case e.isFunction(r.data):r.data.call(this,t,e.proxy(function(i){this.parse_xml(i,e.proxy(function(i){i&&(i=i.replace(/ ?xmlns="[^"]*"/gi,""),i.length>10?(i=e(i),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()),r.clean_node&&this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),r.correct_state&&(this.correct_state(t),n&&n.call(this))):r.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this)))},this))},this));break;case!!r.data&&!r.ajax||!!r.data&&!!r.ajax&&(!t||-1===t):t&&-1!=t||this.parse_xml(r.data,e.proxy(function(i){i?(i=i.replace(/ ?xmlns="[^"]*"/gi,""),i.length>10&&(i=e(i),this.get_container().children("ul").empty().append(i.children()),r.clean_node&&this.clean_node(t),n&&n.call(this))):r.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this))},this));break;case!r.data&&!!r.ajax||!!r.data&&!!r.ajax&&t&&-1!==t:o=function(e,n,o){var s=this.get_settings().xml_data.ajax.error;s&&s.call(this,e,n,o),-1!==t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===n&&r.correct_state&&this.correct_state(t)):"success"===n&&r.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this)},s=function(i,s,a){i=a.responseText;var l=this.get_settings().xml_data.ajax.success;return l&&(i=l.call(this,i,s,a)||i),""===i||i&&i.toString&&""===i.toString().replace(/^[\s\n]+$/,"")?o.call(this,a,s,""):void this.parse_xml(i,e.proxy(function(i){i&&(i=i.replace(/ ?xmlns="[^"]*"/gi,""),i.length>10?(i=e(i),-1!==t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()),r.clean_node&&this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),r.correct_state&&(this.correct_state(t),n&&n.call(this))):r.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this)))},this))},r.ajax.context=this,r.ajax.error=o,r.ajax.success=s,r.ajax.dataType||(r.ajax.dataType="xml"),e.isFunction(r.ajax.url)&&(r.ajax.url=r.ajax.url.call(this,t)),e.isFunction(r.ajax.data)&&(r.ajax.data=r.ajax.data.call(this,t)),e.ajax(r.ajax)}},parse_xml:function(n,i){var r=this._get_settings().xml_data;e.vakata.xslt(n,t[r.xsl],i)},get_xml:function(t,i,r,o,s){var a,l,c,u,d,h="",p=this._get_settings(),f=this;return t||(t="flat"),s||(s=0),i=this._get_node(i),i&&-1!==i||(i=this.get_container().find("> ul > li")),r=e.isArray(r)?r:["id","class"],!s&&this.data.types&&-1===e.inArray(p.types.type_attr,r)&&r.push(p.types.type_attr),o=e.isArray(o)?o:[],s||(p.xml_data.get_include_preamble&&(h+='<?xml version="1.0" encoding="UTF-8"?>'),h+="<root>"),i.each(function(){h+="<item",c=e(this),e.each(r,function(e,t){var i=c.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof i||(h+=" "+t+'="'+n((" "+(i||"")).replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),c.hasClass("jstree-open")&&(h+=' state="open"'),c.hasClass("jstree-closed")&&(h+=' state="closed"'),"flat"===t&&(h+=' parent_id="'+n(s)+'"'),h+=">",h+="<content>",u=c.children("a"),u.each(function(){a=e(this),d=!1,h+="<name",-1!==e.inArray("languages",p.plugins)&&e.each(p.languages,function(e,t){return a.hasClass(t)?(h+=' lang="'+n(t)+'"',d=t,!1):void 0}),o.length&&e.each(o,function(e,t){var i=a.attr(t);p.xml_data.get_skip_empty&&"undefined"==typeof i||(h+=" "+t+'="'+n((" "+i||"").replace(/ jstree[^ ]*/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"')}),a.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/^\s+$/gi,"").length&&(h+=' icon="'+n(a.children("ins").get(0).className.replace(/jstree[^ ]*|$/gi,"").replace(/\s+$/gi," ").replace(/^ /,"").replace(/ $/,""))+'"'),a.children("ins").get(0).style.backgroundImage.length&&(h+=' icon="'+n(a.children("ins").get(0).style.backgroundImage.replace("url(","").replace(")","").replace(/'/gi,"").replace(/"/gi,""))+'"'),h+=">",h+="<![CDATA["+f.get_text(a,d)+"]]>",h+="</name>"}),h+="</content>",l=c[0].id||!0,c=c.find("> ul > li"),l=c.length?f.get_xml(t,c,r,o,l):"","nest"==t&&(h+=l),h+="</item>","flat"==t&&(h+=l)}),s||(h+="</root>"),h}}})}(jQuery),function(e){e.expr[":"].jstree_contains=function(e,t,n){return(e.textContent||e.innerText||"").toLowerCase().indexOf(n[3].toLowerCase())>=0},e.expr[":"].jstree_title_contains=function(e,t,n){return(e.getAttribute("title")||"").toLowerCase().indexOf(n[3].toLowerCase())>=0},e.jstree.plugin("search",{__init:function(){this.data.search.str="",this.data.search.result=e(),this._get_settings().search.show_only_matches&&this.get_container().bind("search.jstree",function(t,n){e(this).children("ul").find("li").hide().removeClass("jstree-last"),n.rslt.nodes.parentsUntil(".jstree").andSelf().show().filter("ul").each(function(){e(this).children("li:visible").eq(-1).addClass("jstree-last")})}).bind("clear_search.jstree",function(){e(this).children("ul").find("li").css("display","").end().end().jstree("clean_node",-1)})},defaults:{ajax:!1,search_method:"jstree_contains",show_only_matches:!1},_fn:{search:function(t,n){if(""===e.trim(t))return void this.clear_search();var i=this.get_settings().search,r=this,o=function(){},s=function(){};return this.data.search.str=t,!n&&i.ajax!==!1&&this.get_container_ul().find("li.jstree-closed:not(:has(ul)):eq(0)").length>0?(this.search.supress_callback=!0,o=function(){},s=function(e,t,n){var i=this.get_settings().search.ajax.success;i&&(e=i.call(this,e,t,n)||e),this.data.search.to_open=e,this._search_open()},i.ajax.context=this,i.ajax.error=o,i.ajax.success=s,e.isFunction(i.ajax.url)&&(i.ajax.url=i.ajax.url.call(this,t)),e.isFunction(i.ajax.data)&&(i.ajax.data=i.ajax.data.call(this,t)),i.ajax.data||(i.ajax.data={search_string:t}),i.ajax.dataType&&!/^json/.exec(i.ajax.dataType)||(i.ajax.dataType="json"),void e.ajax(i.ajax)):(this.data.search.result.length&&this.clear_search(),this.data.search.result=this.get_container().find("a"+(this.data.languages?"."+this.get_lang():"")+":"+i.search_method+"("+this.data.search.str+")"),this.data.search.result.addClass("jstree-search").parent().parents(".jstree-closed").each(function(){r.open_node(this,!1,!0)}),void this.__callback({nodes:this.data.search.result,str:t}))},clear_search:function(t){this.data.search.result.removeClass("jstree-search"),this.__callback(this.data.search.result),this.data.search.result=e()},_search_open:function(t){var n=this,i=!0,r=[],o=[];this.data.search.to_open.length&&(e.each(this.data.search.to_open,function(t,n){return"#"==n?!0:void(e(n).length&&e(n).is(".jstree-closed")?r.push(n):o.push(n))}),r.length&&(this.data.search.to_open=o,e.each(r,function(e,t){n.open_node(t,function(){n._search_open(!0)})}),i=!1)),i&&this.search(this.data.search.str,!0)}}})}(jQuery),function(e){e.vakata.context={hide_on_mouseleave:!1,cnt:e("<div id='vakata-contextmenu' />"),vis:!1,tgt:!1,par:!1,func:!1,data:!1,rtl:!1,show:function(t,n,i,r,o,s,a){e.vakata.context.rtl=!!a;var l,c,u=e.vakata.context.parse(t);u&&(e.vakata.context.vis=!0,e.vakata.context.tgt=n,e.vakata.context.par=s||n||null,e.vakata.context.data=o||null,e.vakata.context.cnt.html(u).css({visibility:"hidden",display:"block",left:0,top:0}),e.vakata.context.hide_on_mouseleave&&e.vakata.context.cnt.one("mouseleave",function(t){e.vakata.context.hide()}),l=e.vakata.context.cnt.height(),c=e.vakata.context.cnt.width(),i+c>e(document).width()&&(i=e(document).width()-(c+5),e.vakata.context.cnt.find("li > ul").addClass("right")),r+l>e(document).height()&&(r-=l+n[0].offsetHeight,e.vakata.context.cnt.find("li > ul").addClass("bottom")),e.vakata.context.cnt.css({left:i,top:r}).find("li:has(ul)").bind("mouseenter",function(t){var n=e(document).width(),i=e(document).height(),r=e(this).children("ul").show();n!==e(document).width()&&r.toggleClass("right"),i!==e(document).height()&&r.toggleClass("bottom")}).bind("mouseleave",function(t){e(this).children("ul").hide()}).end().css({visibility:"visible"}).show(),e(document).triggerHandler("context_show.vakata"))},hide:function(){e.vakata.context.vis=!1,e.vakata.context.cnt.attr("class","").css({visibility:"hidden"}),e(document).triggerHandler("context_hide.vakata")},parse:function(t,n){if(!t)return!1;var i="",r=!1,o=!0;return n||(e.vakata.context.func={}),i+="<ul>",e.each(t,function(t,n){return n?(e.vakata.context.func[t]=n.action,!o&&n.separator_before&&(i+="<li class='vakata-separator vakata-separator-before'></li>"),o=!1,i+="<li class='"+(n._class||"")+(n._disabled?" jstree-contextmenu-disabled ":"")+"'><ins ",n.icon&&-1===n.icon.indexOf("/")&&(i+=" class='"+n.icon+"' "),n.icon&&-1!==n.icon.indexOf("/")&&(i+=" style='background:url("+n.icon+") center center no-repeat;' "),i+="> </ins><a href='#' rel='"+t+"'>",n.submenu&&(i+="<span style='float:"+(e.vakata.context.rtl?"left":"right")+";'>»</span>"),i+=n.label+"</a>",n.submenu&&(r=e.vakata.context.parse(n.submenu,!0),r&&(i+=r)),i+="</li>",void(n.separator_after&&(i+="<li class='vakata-separator vakata-separator-after'></li>",o=!0))):!0}),i=i.replace(/<li class\='vakata-separator vakata-separator-after'\><\/li\>$/,""),i+="</ul>",e(document).triggerHandler("context_parse.vakata"),i.length>10?i:!1},exec:function(t){return e.isFunction(e.vakata.context.func[t])?(e.vakata.context.func[t].call(e.vakata.context.data,e.vakata.context.par),!0):!1}},e(function(){var t="#vakata-contextmenu { display:block; visibility:hidden; left:0; top:-200px; position:absolute; margin:0; padding:0; min-width:180px; background:#ebebeb; border:1px solid silver; z-index:10000; *width:180px; } #vakata-contextmenu ul { min-width:180px; *width:180px; } #vakata-contextmenu ul, #vakata-contextmenu li { margin:0; padding:0; list-style-type:none; display:block; } #vakata-contextmenu li { line-height:20px; min-height:20px; position:relative; padding:0px; } #vakata-contextmenu li a { padding:1px 6px; line-height:17px; display:block; text-decoration:none; margin:1px 1px 0 1px; } #vakata-contextmenu li ins { float:left; width:16px; height:16px; text-decoration:none; margin-right:2px; } #vakata-contextmenu li a:hover, #vakata-contextmenu li.vakata-hover > a { background:gray; color:white; } #vakata-contextmenu li ul { display:none; position:absolute; top:-2px; left:100%; background:#ebebeb; border:1px solid gray; } #vakata-contextmenu .right { right:100%; left:auto; } #vakata-contextmenu .bottom { bottom:-1px; top:auto; } #vakata-contextmenu li.vakata-separator { min-height:0; height:1px; line-height:1px; font-size:1px; overflow:hidden; margin:0 2px; background:silver; /* border-top:1px solid #fefefe; */ padding:0; } ";e.vakata.css.add_sheet({str:t,title:"vakata"}),e.vakata.context.cnt.delegate("a","click",function(e){e.preventDefault()}).delegate("a","mouseup",function(t){!e(this).parent().hasClass("jstree-contextmenu-disabled")&&e.vakata.context.exec(e(this).attr("rel"))?e.vakata.context.hide():e(this).blur()}).delegate("a","mouseover",function(){e.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover")}).appendTo("body"),e(document).bind("mousedown",function(t){e.vakata.context.vis&&!e.contains(e.vakata.context.cnt[0],t.target)&&e.vakata.context.hide()}),"undefined"!=typeof e.hotkeys&&e(document).bind("keydown","up",function(t){if(e.vakata.context.vis){var n=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();n.length||(n=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last()),n.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","down",function(t){if(e.vakata.context.vis){var n=e.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();n.length||(n=e.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first()),n.addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault()}}).bind("keydown","right",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","left",function(t){e.vakata.context.vis&&(e.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover"),t.stopImmediatePropagation(),t.preventDefault())}).bind("keydown","esc",function(t){e.vakata.context.hide(),t.preventDefault()}).bind("keydown","space",function(t){e.vakata.context.cnt.find(".vakata-hover").last().children("a").click(),t.preventDefault()})}),e.jstree.plugin("contextmenu",{__init:function(){this.get_container().delegate("a","contextmenu.jstree",e.proxy(function(t){t.preventDefault(),e(t.currentTarget).hasClass("jstree-loading")||this.show_contextmenu(t.currentTarget,t.pageX,t.pageY)},this)).delegate("a","click.jstree",e.proxy(function(t){this.data.contextmenu&&e.vakata.context.hide()},this)).bind("destroy.jstree",e.proxy(function(){this.data.contextmenu&&e.vakata.context.hide()},this)),e(document).bind("context_hide.vakata",e.proxy(function(){this.data.contextmenu=!1},this))},__destroy:function(){e(".jstree").length<=1&&e(document).unbind("context_hide.vakata")},defaults:{select_node:!1,show_at_node:!0,items:{create:{separator_before:!1,separator_after:!0,label:"Create",action:function(e){this.create(e)}},rename:{separator_before:!1,separator_after:!1,label:"Rename",action:function(e){this.rename(e)}},remove:{separator_before:!1,icon:!1,separator_after:!1,label:"Delete",action:function(e){this.is_selected(e)?this.remove():this.remove(e)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){this.cut(e)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){this.copy(e)}},paste:{separator_before:!1,icon:!1,separator_after:!1,label:"Paste",action:function(e){this.paste(e)}}}}}},_fn:{show_contextmenu:function(t,n,i){t=this._get_node(t);var r=this.get_settings().contextmenu,o=t.children("a:visible:eq(0)"),s=!1,a=!1;r.select_node&&this.data.ui&&!this.is_selected(t)&&(this.deselect_all(),this.select_node(t,!0)),(r.show_at_node||"undefined"==typeof n||"undefined"==typeof i)&&(s=o.offset(),n=s.left,i=s.top+this.data.core.li_height),a=t.data("jstree")&&t.data("jstree").contextmenu?t.data("jstree").contextmenu:r.items,e.isFunction(a)&&(a=a.call(this,t)),this.data.contextmenu=!0,e.vakata.context.show(a,o,n,i,this,t,this._get_settings().core.rtl),this.data.themes&&e.vakata.context.cnt.attr("class","jstree-"+this.data.themes.theme+"-context")}}})}(jQuery),function(t){t.jstree.plugin("types",{__init:function(){var n=this._get_settings().types;this.data.types.attach_to=[],this.get_container().bind("init.jstree",t.proxy(function(){var e=n.types,i=n.type_attr,r="",o=this;t.each(e,function(e,n){return t.each(n,function(e,t){/^(max_depth|max_children|icon|valid_children)$/.test(e)||o.data.types.attach_to.push(e)}),n.icon?void((n.icon.image||n.icon.position)&&(r+="default"==e?".jstree-"+o.get_index()+" a > .jstree-icon { ":".jstree-"+o.get_index()+" li["+i+'="'+e+'"] > a > .jstree-icon { ',n.icon.image&&(r+=" background-image:url("+n.icon.image+"); "),r+=n.icon.position?" background-position:"+n.icon.position+"; ":" background-position:0 0; ",r+="} ")):!0}),""!==r&&t.vakata.css.add_sheet({str:r,title:"jstree-types"})},this)).bind("before.jstree",t.proxy(function(e,n){var i,r,o=this._get_settings().types.use_data?this._get_node(n.args[0]):!1,s=o&&-1!==o&&o.length?o.data("jstree"):!1;if(s&&s.types&&s.types[n.func]===!1)return e.stopImmediatePropagation(),!1;if(-1!==t.inArray(n.func,this.data.types.attach_to)){if(!n.args[0]||!n.args[0].tagName&&!n.args[0].jquery)return;if(i=this._get_settings().types.types,r=this._get_type(n.args[0]),(i[r]&&"undefined"!=typeof i[r][n.func]||i["default"]&&"undefined"!=typeof i["default"][n.func])&&this._check(n.func,n.args[0])===!1)return e.stopImmediatePropagation(),!1}},this)),e&&this.get_container().bind("load_node.jstree set_type.jstree",t.proxy(function(e,n){var i=n&&n.rslt&&n.rslt.obj&&-1!==n.rslt.obj?this._get_node(n.rslt.obj).parent():this.get_container_ul(),r=!1,o=this._get_settings().types;t.each(o.types,function(e,t){t.icon&&(t.icon.image||t.icon.position)&&(r="default"===e?i.find("li > a > .jstree-icon"):i.find("li["+o.type_attr+"='"+e+"'] > a > .jstree-icon"),t.icon.image&&r.css("backgroundImage","url("+t.icon.image+")"),r.css("backgroundPosition",t.icon.position||"0 0"))})},this))},defaults:{max_children:-1,max_depth:-1,valid_children:"all",use_data:!1,type_attr:"rel",types:{"default":{max_children:-1,max_depth:-1,valid_children:"all"}}},_fn:{_types_notify:function(e,t){t.type&&this._get_settings().types.use_data&&this.set_type(t.type,e)},_get_type:function(e){return e=this._get_node(e),e&&e.length?e.attr(this._get_settings().types.type_attr)||"default":!1},set_type:function(e,t){t=this._get_node(t);var n=t.length&&e?t.attr(this._get_settings().types.type_attr,e):!1;return n&&this.__callback({obj:t,type:e}),n},_check:function(e,n,i){n=this._get_node(n);var r=!1,o=this._get_type(n),s=0,a=this,l=this._get_settings().types,c=!1;if(-1===n){if(!l[e])return;r=l[e]}else{if(o===!1)return;c=l.use_data?n.data("jstree"):!1,c&&c.types&&"undefined"!=typeof c.types[e]?r=c.types[e]:l.types[o]&&"undefined"!=typeof l.types[o][e]?r=l.types[o][e]:l.types["default"]&&"undefined"!=typeof l.types["default"][e]&&(r=l.types["default"][e])}return t.isFunction(r)&&(r=r.call(this,n)),"max_depth"===e&&-1!==n&&i!==!1&&-2!==l.max_depth&&0!==r&&n.children("a:eq(0)").parentsUntil(".jstree","li").each(function(t){return-1!==l.max_depth&&l.max_depth-(t+1)<=0?(r=0,!1):(s=0===t?r:a._check(e,this,!1),-1!==s&&0>=s-(t+1)?(r=0,!1):(s>=0&&(r>s-(t+1)||0>r)&&(r=s-(t+1)),void(l.max_depth>=0&&(l.max_depth-(t+1)<r||0>r)&&(r=l.max_depth-(t+1)))))}),r},check_move:function(){if(!this.__call_old())return!1;var e,n=this._get_move(),i=n.rt._get_settings().types,r=n.rt._check("max_children",n.cr),o=n.rt._check("max_depth",n.cr),s=n.rt._check("valid_children",n.cr),a=0,l=1;if("none"===s)return!1;if(t.isArray(s)&&n.ot&&n.ot._get_type&&(n.o.each(function(){return-1===t.inArray(n.ot._get_type(this),s)?(l=!1,!1):void 0}),l===!1))return!1;if(-2!==i.max_children&&-1!==r&&(a=-1===n.cr?this.get_container().find("> ul > li").not(n.o).length:n.cr.find("> ul > li").not(n.o).length,a+n.o.length>r))return!1;if(-2!==i.max_depth&&-1!==o){if(l=0,0===o)return!1;if("undefined"==typeof n.o.d){for(e=n.o;e.length>0;)e=e.find("> ul > li"),l++;n.o.d=l}if(o-n.o.d<0)return!1}return!0},create_node:function(e,n,i,r,o,s){if(!s&&(o||this._is_loaded(e))){var a,l="string"==typeof n&&n.match(/^before|after$/i)&&-1!==e?this._get_parent(e):this._get_node(e),c=this._get_settings().types,u=this._check("max_children",l),d=this._check("max_depth",l),h=this._check("valid_children",l);if("string"==typeof i&&(i={data:i}),i||(i={}),"none"===h)return!1;if(t.isArray(h))if(i.attr&&i.attr[c.type_attr]){if(-1===t.inArray(i.attr[c.type_attr],h))return!1}else i.attr||(i.attr={}),i.attr[c.type_attr]=h[0];if(-2!==c.max_children&&-1!==u&&(a=-1===l?this.get_container().find("> ul > li").length:l.find("> ul > li").length,a+1>u))return!1;if(-2!==c.max_depth&&-1!==d&&0>d-1)return!1}return this.__call_old(!0,e,n,i,r,o,s)}}})}(jQuery),function(e){e.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(!0),this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return 3==this.nodeType}).remove()},defaults:{data:!1,ajax:!1,correct_state:!0},_fn:{load_node:function(e,t,n){var i=this;this.load_node_html(e,function(){i.__callback({obj:i._get_node(e)}),t.call(this)},n)},_is_loaded:function(t){return t=this._get_node(t),-1==t||!t||!this._get_settings().html_data.ajax&&!e.isFunction(this._get_settings().html_data.data)||t.is(".jstree-open, .jstree-leaf")||t.children("ul").children("li").size()>0},load_node_html:function(t,n,i){var r,o=this.get_settings().html_data,s=function(){},a=function(){};if(t=this._get_node(t),t&&-1!==t){if(t.data("jstree_is_loading"))return;t.data("jstree_is_loading",!0)}switch(!0){case e.isFunction(o.data):o.data.call(this,t,e.proxy(function(i){i&&""!==i&&i.toString&&""!==i.toString().replace(/^[\s\n]+$/,"")?(i=e(i),i.is("ul")||(i=e("<ul />").append(i)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),o.correct_state&&(this.correct_state(t),n&&n.call(this))):o.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this))},this));break;case!o.data&&!o.ajax:t&&-1!=t||(this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),n&&n.call(this);break;case!!o.data&&!o.ajax||!!o.data&&!!o.ajax&&(!t||-1===t):t&&-1!=t||(r=e(o.data),r.is("ul")||(r=e("<ul />").append(r)),this.get_container().children("ul").empty().append(r.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node()),n&&n.call(this);break;case!o.data&&!!o.ajax||!!o.data&&!!o.ajax&&t&&-1!==t:t=this._get_node(t),s=function(e,n,r){var s=this.get_settings().html_data.ajax.error;s&&s.call(this,e,n,r),-1!=t&&t.length?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),"success"===n&&o.correct_state&&this.correct_state(t)):"success"===n&&o.correct_state&&this.get_container().children("ul").empty(),i&&i.call(this)},a=function(i,r,a){var l=this.get_settings().html_data.ajax.success;return l&&(i=l.call(this,i,r,a)||i),""===i||i&&i.toString&&""===i.toString().replace(/^[\s\n]+$/,"")?s.call(this,a,r,""):void(i?(i=e(i),i.is("ul")||(i=e("<ul />").append(i)),-1!=t&&t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.append(i).children("ul").find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),t.removeData("jstree_is_loading")):this.get_container().children("ul").empty().append(i.children()).find("li, a").filter(function(){return!this.firstChild||!this.firstChild.tagName||"INS"!==this.firstChild.tagName}).prepend("<ins class='jstree-icon'> </ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon"),this.clean_node(t),n&&n.call(this)):t&&-1!==t?(t.children("a.jstree-loading").removeClass("jstree-loading"),t.removeData("jstree_is_loading"),o.correct_state&&(this.correct_state(t),n&&n.call(this))):o.correct_state&&(this.get_container().children("ul").empty(),n&&n.call(this)))},o.ajax.context=this,o.ajax.error=s,o.ajax.success=a,o.ajax.dataType||(o.ajax.dataType="html"),e.isFunction(o.ajax.url)&&(o.ajax.url=o.ajax.url.call(this,t)),e.isFunction(o.ajax.data)&&(o.ajax.data=o.ajax.data.call(this,t)),e.ajax(o.ajax)}}}}),e.jstree.defaults.plugins.push("html_data");
|
||||
}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(n){e(n.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,n){n.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,n){n.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,n){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,n){n.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,n){this.get_container().find("a."+t.item_h).not(n.rslt.obj).removeClass(t.item_h),n.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,n=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(n=n.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+n.join(", .")).removeClass(n.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,n){var i,r,o=[],s=!0;return"move_node"==n.func&&n.args[4]===!0&&n.args[0].o&&n.args[0].o.length&&(n.args[0].o.children("a").each(function(){o.push(e(this).text().replace(/^\s+/g,""))}),s=this._check_unique(o,n.args[0].np.find("> ul > li").not(n.args[0].o),"move_node")),"create_node"==n.func&&(n.args[4]||this._is_loaded(n.args[0]))&&(i=this._get_node(n.args[0]),!n.args[1]||"before"!==n.args[1]&&"after"!==n.args[1]||(i=this._get_parent(n.args[0]),i&&-1!==i||(i=this.get_container())),"string"==typeof n.args[2]?o.push(n.args[2]):n.args[2]&&n.args[2].data?o.push(n.args[2].data):o.push(this._get_string("new_node")),s=this._check_unique(o,i.find("> ul > li"),"create_node")),"rename_node"==n.func&&(o.push(n.args[1]),r=this._get_node(n.args[0]),i=this._get_parent(r),i&&-1!==i||(i=this.get_container()),s=this._check_unique(o,i.find("> ul > li").not(r),"rename_node")),s?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,n,i){var r=[],o=!0;return n.children("a").each(function(){r.push(e(this).text().replace(/^\s+/g,""))}),r.length&&t.length?(e.each(t,function(t,n){return-1!==e.inArray(n,r)?(o=!1,!1):void 0}),o||this._get_settings().unique.error_callback.call(null,t,n,i),o):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),n=[];return t.o&&t.o.length?(t.o.children("a").each(function(){n.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(n,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(i){i.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",i.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",i.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",i.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",i.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",i.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((i(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",i.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var n=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");n.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=i(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",i.proxy(function(e){return e.stopImmediatePropagation(),i(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",i.proxy(function(e){i(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&i.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){i(this).find("li").andSelf().each(function(){var e=i(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'> </span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),n=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==n&&(this.data.wholerow.last_html=n,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),i(function(){var r=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";n&&(r+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(r+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),i.vakata.css.add_sheet({str:r,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],n=function(t,n){var i=!0;return t=t||{},n=[].concat(n),e.each(n,function(n,r){return e.isFunction(t[r])?void 0:(i=!1,!1)}),i};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(i,r){var o=-1==i?this._get_settings().model.object:i.data("jstree_model");return n(o,t)?void(this._get_settings().model.async?o.getChildren(e.proxy(function(e){this.model_done(e,r)},this)):this.model_done(o.getChildren(),r)):r.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,n){var i=[],r=this._get_settings(),o=this;e.isArray(t)||(t=[t]),e.each(t,function(t,n){var s=n.getProps()||{};s.attr=n.getAttr()||{},n.getChildrenCount()&&(s.state="closed"),s.data=n.getName(),e.isArray(s.data)||(s.data=[s.data]),o.data.types&&e.isFunction(n.getType)&&(s.attr[r.types.type_attr]=n.getType()),s.attr.id&&r.model.id_prefix&&(s.attr.id=r.model.id_prefix+s.attr.id),s.metadata||(s.metadata={}),s.metadata.jstree_model=n,i.push(s)}),n.call(null,i)}}})}(jQuery)}}()},{}],"bootstrap-collapse":[function(e,t,n){!function(i,r){if("function"==typeof define&&define.amd)define(["exports","module","./util"],r);else if("undefined"!=typeof n&&"undefined"!=typeof t)r(n,t,e("./util"));else{var o={exports:{}};r(o.exports,o,i.Util),i.collapse=o.exports}}(this,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=i(n),a=function(e){var t="collapse",n="4.0.0-alpha",i="bs.collapse",a="."+i,l=".data-api",c=e.fn[t],u=600,d={toggle:!0,parent:""},h={toggle:"boolean",parent:"string"},p={SHOW:"show"+a,SHOWN:"shown"+a,HIDE:"hide"+a,HIDDEN:"hidden"+a,CLICK_DATA_API:"click"+a+l},f={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},g={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},v=function(){function a(t,n){r(this,a),this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],'+('[data-toggle="collapse"][data-target="#'+t.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return o(a,[{key:"toggle",value:function(){e(this._element).hasClass(f.IN)?this.hide():this.show()}},{key:"show",value:function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(f.IN)){var n=void 0,r=void 0;if(this._parent&&(n=e.makeArray(e(m.ACTIVES)),n.length||(n=null)),!(n&&(r=e(n).data(i),r&&r._isTransitioning))){var o=e.Event(p.SHOW);if(e(this._element).trigger(o),!o.isDefaultPrevented()){n&&(a._jQueryInterface.call(e(n),"hide"),r||e(n).data(i,null));var l=this._getDimension();e(this._element).removeClass(f.COLLAPSE).addClass(f.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&e(this._triggerArray).removeClass(f.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var c=function(){e(t._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).addClass(f.IN),t._element.style[l]="",t.setTransitioning(!1),e(t._element).trigger(p.SHOWN)};if(!s["default"].supportsTransitionEnd())return void c();var d=l[0].toUpperCase()+l.slice(1),h="scroll"+d;e(this._element).one(s["default"].TRANSITION_END,c).emulateTransitionEnd(u),this._element.style[l]=this._element[h]+"px"}}}}},{key:"hide",value:function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(f.IN)){var n=e.Event(p.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===g.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",s["default"].reflow(this._element),e(this._element).addClass(f.COLLAPSING).removeClass(f.COLLAPSE).removeClass(f.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&e(this._triggerArray).addClass(f.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var o=function(){t.setTransitioning(!1),e(t._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).trigger(p.HIDDEN)};return this._element.style[i]=0,s["default"].supportsTransitionEnd()?void e(this._element).one(s["default"].TRANSITION_END,o).emulateTransitionEnd(u):void o()}}}},{key:"setTransitioning",value:function(e){this._isTransitioning=e}},{key:"dispose",value:function(){e.removeData(this._element,i),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(n){return n=e.extend({},d,n),n.toggle=Boolean(n.toggle),s["default"].typeCheckConfig(t,n,h),n}},{key:"_getDimension",value:function(){var t=e(this._element).hasClass(g.WIDTH);return t?g.WIDTH:g.HEIGHT}},{key:"_getParent",value:function(){var t=this,n=e(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(n).find(i).each(function(e,n){t._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n}},{key:"_addAriaAndCollapsedClass",value:function(t,n){if(t){var i=e(t).hasClass(f.IN);t.setAttribute("aria-expanded",i),n.length&&e(n).toggleClass(f.COLLAPSED,!i).attr("aria-expanded",i)}}}],[{key:"_getTargetFromElement",value:function(t){var n=s["default"].getSelectorFromElement(t);return n?e(n)[0]:null}},{key:"_jQueryInterface",value:function(t){return this.each(function(){var n=e(this),r=n.data(i),o=e.extend({},d,n.data(),"object"==typeof t&&t);if(!r&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),r||(r=new a(this,o),n.data(i,r)),"string"==typeof t){if(void 0===r[t])throw new Error('No method named "'+t+'"');r[t]()}})}},{key:"VERSION",get:function(){return n}},{key:"Default",get:function(){return d}}]),a}();return e(document).on(p.CLICK_DATA_API,m.DATA_TOGGLE,function(t){t.preventDefault();var n=v._getTargetFromElement(this),r=e(n).data(i),o=r?"toggle":e(this).data();v._jQueryInterface.call(e(n),o)}),e.fn[t]=v._jQueryInterface,e.fn[t].Constructor=v,e.fn[t].noConflict=function(){return e.fn[t]=c,v._jQueryInterface},v}(jQuery);t.exports=a})},{"./util":309}],"components/breadcrumb/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[c["default"].createElement("li",{className:"breadcrumb__item"},c["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[c["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},c["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last text-truncate",key:t},e.text))]}))},t}(d["default"]);h.propTypes={crumbs:c["default"].PropTypes.array},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/form-action/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleClick=i.handleClick.bind(i),i}return a(t,e),t.prototype.render=function(){var e={type:this.props.type,className:this.getButtonClasses(),disabled:this.props.disabled,onClick:this.handleClick};return"undefined"!=typeof this.props.id&&(e.id=this.props.id),c["default"].createElement("button",e,this.getLoadingIcon(),this.props.label)},t.prototype.getButtonClasses=function(){var e=["btn"];return e.push("btn-"+this.props.bootstrapButtonStyle),"undefined"==typeof this.props.label&&e.push("no-text"),"undefined"!=typeof this.props.icon&&e.push("font-icon-"+this.props.icon),this.props.loading===!0&&e.push("btn--loading"),this.props.disabled===!0&&e.push("disabled"),"undefined"!=typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")},t.prototype.getLoadingIcon=function(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("svg",{viewBox:"0 0 44 12"},c["default"].createElement("circle",{cx:"6",cy:"6",r:"6"}),c["default"].createElement("circle",{cx:"22",cy:"6",r:"6"}),c["default"].createElement("circle",{cx:"38",cy:"6",r:"6"}))):null},t.prototype.handleClick=function(e){"undefined"!=typeof this.props.handleClick&&this.props.handleClick(e)},t}(d["default"]);h.propTypes={id:c["default"].PropTypes.string,handleClick:c["default"].PropTypes.func,label:c["default"].PropTypes.string,type:c["default"].PropTypes.string,loading:c["default"].PropTypes.bool,icon:c["default"].PropTypes.string,disabled:c["default"].PropTypes.bool,bootstrapButtonStyle:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string},h.defaultProps={type:"button",bootstrapButtonStyle:"secondary",disabled:!1},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/form-builder/index":[function(e,t,n){"use strict";function i(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 r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):o(e,t))}function c(e){return{schemas:e.schemas}}function u(e){return{actions:(0,g.bindActionCreators)(v,e)}}Object.defineProperty(n,"__esModule",{value:!0}),n.FormBuilderComponent=void 0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},h=e("react"),p=r(h),f=e("react-redux"),g=e("redux"),m=e("state/schema/actions"),v=i(m),_=e("silverstripe-component"),y=r(_),b=e("components/form/index"),x=r(b),w=e("components/text-field/index"),j=r(w),C=e("components/hidden-field/index"),k=r(C),E=e("components/grid-field/index"),T=r(E),D=e("isomorphic-fetch"),S=r(D),P=e("deep-freeze"),O=r(P),M=e("es6-promise"),R=r(M);R["default"].polyfill();var N={components:{TextField:j["default"],GridField:T["default"],HiddenField:k["default"]},getComponentByName:function(e){return this.components[e]},getComponentByDataType:function(e){switch(e){case"String":return this.components.TextField;case"Hidden":return this.components.HiddenField;case"Custom":return this.components.GridField;default:return null}}},I=n.FormBuilderComponent=function(e){function t(n){s(this,t);var i=a(this,e.call(this,n));return i.formSchemaPromise=null,i.state={isFetching:!1},i.mapFieldsToComponents=i.mapFieldsToComponents.bind(i),i}return l(t,e),t.prototype.componentDidMount=function(){this.fetch()},t.prototype.fetch=function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],n=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=[];return this.state.isFetching===!0?this.formSchemaPromise:(t===!0&&i.push("schema"),n===!0&&i.push("state"),this.formSchemaPromise=(0,S["default"])(this.props.schemaUrl,{headers:{"X-FormSchema-Request":i.join()},credentials:"same-origin"}).then(function(e){return e.json()}).then(function(t){e.setState({isFetching:!1}),e.props.actions.setSchema(t)}),this.formSchemaPromise)},t.prototype.mapFieldsToComponents=function(e){var t=this.props.createFn;return e.map(function(e,n){var i=null!==e.component?N.getComponentByName(e.component):N.getComponentByDataType(e.type);if(null===i)return null;var r=(0,O["default"])(e);return"function"==typeof t?t(i,r):p["default"].createElement(i,d({key:n},r))})},t.prototype.render=function(){var e=this.props.schemas[this.props.schemaUrl];if(!e)return null;var t=d({},e.schema.attributes,{"class":null,className:e.schema.attributes["class"],enctype:null,encType:e.schema.attributes.enctype}),n={actions:e.schema.actions,attributes:t,data:e.schema.data,fields:e.schema.fields,mapFieldsToComponents:this.mapFieldsToComponents};return p["default"].createElement(x["default"],n)},t}(y["default"]);I.propTypes={actions:p["default"].PropTypes.object.isRequired,createFn:p["default"].PropTypes.func,schemaUrl:p["default"].PropTypes.string.isRequired,schemas:p["default"].PropTypes.object.isRequired},n["default"]=(0,f.connect)(c,u)(I)},{"components/form/index":"components/form/index","components/grid-field/index":"components/grid-field/index","components/hidden-field/index":"components/hidden-field/index","components/text-field/index":"components/text-field/index","deep-freeze":"deep-freeze","es6-promise":317,"isomorphic-fetch":318,react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/schema/actions":8}],"components/form/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=e("components/form-action/index"),p=i(h),f=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.getFormActionComponents=function(){return this.props.actions.map(function(e){return c["default"].createElement(p["default"],e)})},t.prototype.render=function(){var e=this.props.attributes,t=this.props.mapFieldsToComponents(this.props.fields),n=this.getFormActionComponents();return c["default"].createElement("form",e,t&&c["default"].createElement("fieldset",{className:"form-group"},t),n&&c["default"].createElement("div",{className:"actions-fix-btm"},c["default"].createElement("div",{className:"btn-group",role:"group"},n)))},t}(d["default"]);f.propTypes={actions:c["default"].PropTypes.array,attributes:c["default"].PropTypes.shape({action:c["default"].PropTypes.string.isRequired,className:c["default"].PropTypes.string,encType:c["default"].PropTypes.string,id:c["default"].PropTypes.string,method:c["default"].PropTypes.string.isRequired}),data:c["default"].PropTypes.array,fields:c["default"].PropTypes.array.isRequired,mapFieldsToComponents:c["default"].PropTypes.func.isRequired},n["default"]=f},{"components/form-action/index":"components/form-action/index",react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/cell/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleDrillDown=i.handleDrillDown.bind(i),i}return a(t,e),t.prototype.render=function(){var e={className:"grid-field__cell "+this.props.className,onClick:this.handleDrillDown};return c["default"].createElement("td",e,this.props.children)},t.prototype.handleDrillDown=function(e){"undefined"!=typeof this.props.handleDrillDown&&this.props.handleDrillDown(e)},t}(d["default"]);h.PropTypes={width:c["default"].PropTypes.number,handleDrillDown:c["default"].PropTypes.func},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/header-cell":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("th",null,this.props.children);
|
||||
}(jQuery),function(e){e.jstree.plugin("themeroller",{__init:function(){var t=this._get_settings().themeroller;this.get_container().addClass("ui-widget-content").addClass("jstree-themeroller").delegate("a","mouseenter.jstree",function(n){e(n.currentTarget).hasClass("jstree-loading")||e(this).addClass(t.item_h)}).delegate("a","mouseleave.jstree",function(){e(this).removeClass(t.item_h)}).bind("init.jstree",e.proxy(function(e,t){t.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh"),this._themeroller(t.inst.get_container().find("> ul > li"))},this)).bind("open_node.jstree create_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("loaded.jstree refresh.jstree",e.proxy(function(e){this._themeroller()},this)).bind("close_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.obj)},this)).bind("delete_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.parent)},this)).bind("correct_state.jstree",e.proxy(function(e,n){n.rslt.obj.children("ins.jstree-icon").removeClass(t.opened+" "+t.closed+" ui-icon").end().find("> a > ins.ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_open+" "+t.item_clsd).addClass(t.item_leaf||"jstree-no-icon")},this)).bind("select_node.jstree",e.proxy(function(e,n){n.rslt.obj.children("a").addClass(t.item_a)},this)).bind("deselect_node.jstree deselect_all.jstree",e.proxy(function(e,n){this.get_container().find("a."+t.item_a).removeClass(t.item_a).end().find("a.jstree-clicked").addClass(t.item_a)},this)).bind("dehover_node.jstree",e.proxy(function(e,n){n.rslt.obj.children("a").removeClass(t.item_h)},this)).bind("hover_node.jstree",e.proxy(function(e,n){this.get_container().find("a."+t.item_h).not(n.rslt.obj).removeClass(t.item_h),n.rslt.obj.children("a").addClass(t.item_h)},this)).bind("move_node.jstree",e.proxy(function(e,t){this._themeroller(t.rslt.o),this._themeroller(t.rslt.op)},this))},__destroy:function(){var t=this._get_settings().themeroller,n=["ui-icon"];e.each(t,function(e,t){t=t.split(" "),t.length&&(n=n.concat(t))}),this.get_container().removeClass("ui-widget-content").find("."+n.join(", .")).removeClass(n.join(" "))},_fn:{_themeroller:function(e){var t=this._get_settings().themeroller;e=e&&-1!=e?this._get_node(e):this.get_container_ul(),e=e&&-1!=e?e.parent():this.get_container_ul(),e.find("li.jstree-closed").children("ins.jstree-icon").removeClass(t.opened).addClass("ui-icon "+t.closed).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_open).addClass(t.item_clsd||"jstree-no-icon").end().end().end().end().find("li.jstree-open").children("ins.jstree-icon").removeClass(t.closed).addClass("ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_leaf+" "+t.item_clsd).addClass(t.item_open||"jstree-no-icon").end().end().end().end().find("li.jstree-leaf").children("ins.jstree-icon").removeClass(t.closed+" ui-icon "+t.opened).end().children("a").addClass(t.item).children("ins.jstree-icon").addClass("ui-icon").filter(function(){return-1===this.className.toString().replace(t.item_clsd,"").replace(t.item_open,"").replace(t.item_leaf,"").indexOf("ui-icon-")}).removeClass(t.item_clsd+" "+t.item_open).addClass(t.item_leaf||"jstree-no-icon")}},defaults:{opened:"ui-icon-triangle-1-se",closed:"ui-icon-triangle-1-e",item:"ui-state-default",item_h:"ui-state-hover",item_a:"ui-state-active",item_open:"ui-icon-folder-open",item_clsd:"ui-icon-folder-collapsed",item_leaf:"ui-icon-document"}}),e(function(){var t=".jstree-themeroller .ui-icon { overflow:visible; } .jstree-themeroller a { padding:0 2px; } .jstree-themeroller .jstree-no-icon { display:none; }";e.vakata.css.add_sheet({str:t,title:"jstree"})})}(jQuery),function(e){e.jstree.plugin("unique",{__init:function(){this.get_container().bind("before.jstree",e.proxy(function(t,n){var i,r,o=[],s=!0;return"move_node"==n.func&&n.args[4]===!0&&n.args[0].o&&n.args[0].o.length&&(n.args[0].o.children("a").each(function(){o.push(e(this).text().replace(/^\s+/g,""))}),s=this._check_unique(o,n.args[0].np.find("> ul > li").not(n.args[0].o),"move_node")),"create_node"==n.func&&(n.args[4]||this._is_loaded(n.args[0]))&&(i=this._get_node(n.args[0]),!n.args[1]||"before"!==n.args[1]&&"after"!==n.args[1]||(i=this._get_parent(n.args[0]),i&&-1!==i||(i=this.get_container())),"string"==typeof n.args[2]?o.push(n.args[2]):n.args[2]&&n.args[2].data?o.push(n.args[2].data):o.push(this._get_string("new_node")),s=this._check_unique(o,i.find("> ul > li"),"create_node")),"rename_node"==n.func&&(o.push(n.args[1]),r=this._get_node(n.args[0]),i=this._get_parent(r),i&&-1!==i||(i=this.get_container()),s=this._check_unique(o,i.find("> ul > li").not(r),"rename_node")),s?void 0:(t.stopPropagation(),!1)},this))},defaults:{error_callback:e.noop},_fn:{_check_unique:function(t,n,i){var r=[],o=!0;return n.children("a").each(function(){r.push(e(this).text().replace(/^\s+/g,""))}),r.length&&t.length?(e.each(t,function(t,n){return-1!==e.inArray(n,r)?(o=!1,!1):void 0}),o||this._get_settings().unique.error_callback.call(null,t,n,i),o):!0},check_move:function(){if(!this.__call_old())return!1;var t=this._get_move(),n=[];return t.o&&t.o.length?(t.o.children("a").each(function(){n.push(e(this).text().replace(/^\s+/g,""))}),this._check_unique(n,t.np.find("> ul > li").not(t.o),"check_move")):!0}}})}(jQuery),function(i){i.jstree.plugin("wholerow",{__init:function(){if(!this.data.ui)throw"jsTree wholerow: jsTree UI plugin not included.";this.data.wholerow.html=!1,this.data.wholerow.to=!1,this.get_container().bind("init.jstree",i.proxy(function(e,t){this._get_settings().core.animation=0},this)).bind("open_node.jstree create_node.jstree clean_node.jstree loaded.jstree",i.proxy(function(e,t){this._prepare_wholerow_span(t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1)},this)).bind("search.jstree clear_search.jstree reopen.jstree after_open.jstree after_close.jstree create_node.jstree delete_node.jstree clean_node.jstree",i.proxy(function(e,t){this.data.to&&clearTimeout(this.data.to),this.data.to=setTimeout(function(e,t){return function(){e._prepare_wholerow_ul(t)}}(this,t&&t.rslt&&t.rslt.obj?t.rslt.obj:-1),0)},this)).bind("deselect_all.jstree",i.proxy(function(e,t){this.get_container().find(" > .jstree-wholerow .jstree-clicked").removeClass("jstree-clicked "+(this.data.themeroller?this._get_settings().themeroller.item_a:""))},this)).bind("select_node.jstree deselect_node.jstree ",i.proxy(function(e,t){t.rslt.obj.each(function(){var e=t.inst.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((i(this).offset().top-t.inst.get_container().offset().top+t.inst.get_container()[0].scrollTop)/t.inst.data.core.li_height,10)+")");e.children("a").attr("class",t.rslt.obj.children("a").attr("class"))})},this)).bind("hover_node.jstree dehover_node.jstree",i.proxy(function(e,t){if(this.get_container().find(" > .jstree-wholerow .jstree-hovered").removeClass("jstree-hovered "+(this.data.themeroller?this._get_settings().themeroller.item_h:"")),"hover_node"===e.type){var n=this.get_container().find(" > .jstree-wholerow li:visible:eq("+parseInt((t.rslt.obj.offset().top-this.get_container().offset().top+this.get_container()[0].scrollTop)/this.data.core.li_height,10)+")");n.children("a").attr("class",t.rslt.obj.children(".jstree-hovered").attr("class"))}},this)).delegate(".jstree-wholerow-span, ins.jstree-icon, li","click.jstree",function(e){var t=i(e.currentTarget);"A"===e.target.tagName||"INS"===e.target.tagName&&t.closest("li").is(".jstree-open, .jstree-closed")||(t.closest("li").children("a:visible:eq(0)").click(),e.stopImmediatePropagation())}).delegate("li","mouseover.jstree",i.proxy(function(e){return e.stopImmediatePropagation(),i(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length?!1:(this.hover_node(e.currentTarget),!1)},this)).delegate("li","mouseleave.jstree",i.proxy(function(e){i(e.currentTarget).children("a").hasClass("jstree-hovered").length||this.dehover_node(e.currentTarget)},this)),(t||e)&&i.vakata.css.add_sheet({str:".jstree-"+this.get_index()+" { position:relative; } ",title:"jstree"})},defaults:{},__destroy:function(){this.get_container().children(".jstree-wholerow").remove(),this.get_container().find(".jstree-wholerow-span").remove()},_fn:{_prepare_wholerow_span:function(e){e=e&&-1!=e?this._get_node(e):this.get_container().find("> ul > li"),e!==!1&&e.each(function(){i(this).find("li").andSelf().each(function(){var e=i(this);return e.children(".jstree-wholerow-span").length?!0:void e.prepend("<span class='jstree-wholerow-span' style='width:"+18*e.parentsUntil(".jstree","li").length+"px;'> </span>")})})},_prepare_wholerow_ul:function(){var e=this.get_container().children("ul").eq(0),n=e.html();e.addClass("jstree-wholerow-real"),this.data.wholerow.last_html!==n&&(this.data.wholerow.last_html=n,this.get_container().children(".jstree-wholerow").remove(),this.get_container().append(e.clone().removeClass("jstree-wholerow-real").wrapAll("<div class='jstree-wholerow' />").parent().width(e.parent()[0].scrollWidth).css("top",-1*(e.height()+(t?5:0))).find("li[id]").each(function(){this.removeAttribute("id")}).end()))}}}),i(function(){var r=".jstree .jstree-wholerow-real { position:relative; z-index:1; } .jstree .jstree-wholerow-real li { cursor:pointer; } .jstree .jstree-wholerow-real a { border-left-color:transparent !important; border-right-color:transparent !important; } .jstree .jstree-wholerow { position:relative; z-index:0; height:0; } .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { width:100%; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li, .jstree .jstree-wholerow a { margin:0 !important; padding:0 !important; } .jstree .jstree-wholerow, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow li { background:transparent !important; }.jstree .jstree-wholerow ins, .jstree .jstree-wholerow span, .jstree .jstree-wholerow input { display:none !important; }.jstree .jstree-wholerow a, .jstree .jstree-wholerow a:hover { text-indent:-9999px; !important; width:100%; padding:0 !important; border-right-width:0px !important; border-left-width:0px !important; } .jstree .jstree-wholerow-span { position:absolute; left:0; margin:0px; padding:0; height:18px; border-width:0; padding:0; z-index:0; }";n&&(r+=".jstree .jstree-wholerow a { display:block; height:18px; margin:0; padding:0; border:0; } .jstree .jstree-wholerow-real a { border-color:transparent !important; } "),(t||e)&&(r+=".jstree .jstree-wholerow, .jstree .jstree-wholerow li, .jstree .jstree-wholerow ul, .jstree .jstree-wholerow a { margin:0; padding:0; line-height:18px; } .jstree .jstree-wholerow a { display:block; height:18px; line-height:18px; overflow:hidden; } "),i.vakata.css.add_sheet({str:r,title:"jstree"})})}(jQuery),function(e){var t=["getChildren","getChildrenCount","getAttr","getName","getProps"],n=function(t,n){var i=!0;return t=t||{},n=[].concat(n),e.each(n,function(n,r){return e.isFunction(t[r])?void 0:(i=!1,!1)}),i};e.jstree.plugin("model",{__init:function(){if(!this.data.json_data)throw"jsTree model: jsTree json_data plugin not included.";this._get_settings().json_data.data=function(i,r){var o=-1==i?this._get_settings().model.object:i.data("jstree_model");return n(o,t)?void(this._get_settings().model.async?o.getChildren(e.proxy(function(e){this.model_done(e,r)},this)):this.model_done(o.getChildren(),r)):r.call(null,!1)}},defaults:{object:!1,id_prefix:!1,async:!1},_fn:{model_done:function(t,n){var i=[],r=this._get_settings(),o=this;e.isArray(t)||(t=[t]),e.each(t,function(t,n){var s=n.getProps()||{};s.attr=n.getAttr()||{},n.getChildrenCount()&&(s.state="closed"),s.data=n.getName(),e.isArray(s.data)||(s.data=[s.data]),o.data.types&&e.isFunction(n.getType)&&(s.attr[r.types.type_attr]=n.getType()),s.attr.id&&r.model.id_prefix&&(s.attr.id=r.model.id_prefix+s.attr.id),s.metadata||(s.metadata={}),s.metadata.jstree_model=n,i.push(s)}),n.call(null,i)}}})}(jQuery)}}()},{}],"bootstrap-collapse":[function(e,t,n){!function(i,r){if("function"==typeof define&&define.amd)define(["exports","module","./util"],r);else if("undefined"!=typeof n&&"undefined"!=typeof t)r(n,t,e("./util"));else{var o={exports:{}};r(o.exports,o,i.Util),i.collapse=o.exports}}(this,function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),s=i(n),a=function(e){var t="collapse",n="4.0.0-alpha",i="bs.collapse",a="."+i,l=".data-api",c=e.fn[t],u=600,d={toggle:!0,parent:""},h={toggle:"boolean",parent:"string"},p={SHOW:"show"+a,SHOWN:"shown"+a,HIDE:"hide"+a,HIDDEN:"hidden"+a,CLICK_DATA_API:"click"+a+l},f={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},g={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},v=function(){function a(t,n){r(this,a),this._isTransitioning=!1,this._element=t,this._config=this._getConfig(n),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],'+('[data-toggle="collapse"][data-target="#'+t.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return o(a,[{key:"toggle",value:function(){e(this._element).hasClass(f.IN)?this.hide():this.show()}},{key:"show",value:function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(f.IN)){var n=void 0,r=void 0;if(this._parent&&(n=e.makeArray(e(m.ACTIVES)),n.length||(n=null)),!(n&&(r=e(n).data(i),r&&r._isTransitioning))){var o=e.Event(p.SHOW);if(e(this._element).trigger(o),!o.isDefaultPrevented()){n&&(a._jQueryInterface.call(e(n),"hide"),r||e(n).data(i,null));var l=this._getDimension();e(this._element).removeClass(f.COLLAPSE).addClass(f.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&e(this._triggerArray).removeClass(f.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var c=function(){e(t._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).addClass(f.IN),t._element.style[l]="",t.setTransitioning(!1),e(t._element).trigger(p.SHOWN)};if(!s["default"].supportsTransitionEnd())return void c();var d=l[0].toUpperCase()+l.slice(1),h="scroll"+d;e(this._element).one(s["default"].TRANSITION_END,c).emulateTransitionEnd(u),this._element.style[l]=this._element[h]+"px"}}}}},{key:"hide",value:function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(f.IN)){var n=e.Event(p.HIDE);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),r=i===g.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[r]+"px",s["default"].reflow(this._element),e(this._element).addClass(f.COLLAPSING).removeClass(f.COLLAPSE).removeClass(f.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&e(this._triggerArray).addClass(f.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var o=function(){t.setTransitioning(!1),e(t._element).removeClass(f.COLLAPSING).addClass(f.COLLAPSE).trigger(p.HIDDEN)};return this._element.style[i]=0,s["default"].supportsTransitionEnd()?void e(this._element).one(s["default"].TRANSITION_END,o).emulateTransitionEnd(u):void o()}}}},{key:"setTransitioning",value:function(e){this._isTransitioning=e}},{key:"dispose",value:function(){e.removeData(this._element,i),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(n){return n=e.extend({},d,n),n.toggle=Boolean(n.toggle),s["default"].typeCheckConfig(t,n,h),n}},{key:"_getDimension",value:function(){var t=e(this._element).hasClass(g.WIDTH);return t?g.WIDTH:g.HEIGHT}},{key:"_getParent",value:function(){var t=this,n=e(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(n).find(i).each(function(e,n){t._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n}},{key:"_addAriaAndCollapsedClass",value:function(t,n){if(t){var i=e(t).hasClass(f.IN);t.setAttribute("aria-expanded",i),n.length&&e(n).toggleClass(f.COLLAPSED,!i).attr("aria-expanded",i)}}}],[{key:"_getTargetFromElement",value:function(t){var n=s["default"].getSelectorFromElement(t);return n?e(n)[0]:null}},{key:"_jQueryInterface",value:function(t){return this.each(function(){var n=e(this),r=n.data(i),o=e.extend({},d,n.data(),"object"==typeof t&&t);if(!r&&o.toggle&&/show|hide/.test(t)&&(o.toggle=!1),r||(r=new a(this,o),n.data(i,r)),"string"==typeof t){if(void 0===r[t])throw new Error('No method named "'+t+'"');r[t]()}})}},{key:"VERSION",get:function(){return n}},{key:"Default",get:function(){return d}}]),a}();return e(document).on(p.CLICK_DATA_API,m.DATA_TOGGLE,function(t){t.preventDefault();var n=v._getTargetFromElement(this),r=e(n).data(i),o=r?"toggle":e(this).data();v._jQueryInterface.call(e(n),o)}),e.fn[t]=v._jQueryInterface,e.fn[t].Constructor=v,e.fn[t].noConflict=function(){return e.fn[t]=c,v._jQueryInterface},v}(jQuery);t.exports=a})},{"./util":309}],"components/breadcrumb/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("ol",{className:"breadcrumb"},this.getBreadcrumbs())},t.prototype.getBreadcrumbs=function(){return"undefined"==typeof this.props.crumbs?null:[].concat(this.props.crumbs.slice(0,-1).map(function(e,t){return[c["default"].createElement("li",{className:"breadcrumb__item"},c["default"].createElement("a",{key:t,className:"breadcrumb__item-title",href:e.href},e.text))]}),this.props.crumbs.slice(-1).map(function(e,t){return[c["default"].createElement("li",{className:"breadcrumb__item breadcrumb__item--last"},c["default"].createElement("h2",{className:"breadcrumb__item-title breadcrumb__item-title--last",key:t},e.text))]}))},t}(d["default"]);h.propTypes={crumbs:c["default"].PropTypes.array},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/form-action/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleClick=i.handleClick.bind(i),i}return a(t,e),t.prototype.render=function(){var e={type:this.props.type,className:this.getButtonClasses(),disabled:this.props.disabled,onClick:this.handleClick};return"undefined"!=typeof this.props.id&&(e.id=this.props.id),c["default"].createElement("button",e,this.getLoadingIcon(),this.props.label)},t.prototype.getButtonClasses=function(){var e=["btn"];return e.push("btn-"+this.props.bootstrapButtonStyle),"undefined"==typeof this.props.label&&e.push("no-text"),"undefined"!=typeof this.props.icon&&e.push("font-icon-"+this.props.icon),this.props.loading===!0&&e.push("btn--loading"),this.props.disabled===!0&&e.push("disabled"),"undefined"!=typeof this.props.extraClass&&e.push(this.props.extraClass),e.join(" ")},t.prototype.getLoadingIcon=function(){return this.props.loading?c["default"].createElement("div",{className:"btn__loading-icon"},c["default"].createElement("svg",{viewBox:"0 0 44 12"},c["default"].createElement("circle",{cx:"6",cy:"6",r:"6"}),c["default"].createElement("circle",{cx:"22",cy:"6",r:"6"}),c["default"].createElement("circle",{cx:"38",cy:"6",r:"6"}))):null},t.prototype.handleClick=function(e){"undefined"!=typeof this.props.handleClick&&this.props.handleClick(e)},t}(d["default"]);h.propTypes={id:c["default"].PropTypes.string,handleClick:c["default"].PropTypes.func,label:c["default"].PropTypes.string,type:c["default"].PropTypes.string,loading:c["default"].PropTypes.bool,icon:c["default"].PropTypes.string,disabled:c["default"].PropTypes.bool,bootstrapButtonStyle:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string},h.defaultProps={type:"button",bootstrapButtonStyle:"secondary",disabled:!1},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/form-builder/index":[function(e,t,n){"use strict";function i(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 r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):o(e,t))}function c(e){return{schemas:e.schemas}}function u(e){return{actions:(0,g.bindActionCreators)(v,e)}}Object.defineProperty(n,"__esModule",{value:!0}),n.FormBuilderComponent=void 0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},h=e("react"),p=r(h),f=e("react-redux"),g=e("redux"),m=e("state/schema/actions"),v=i(m),_=e("silverstripe-component"),y=r(_),b=e("components/form/index"),x=r(b),w=e("components/text-field/index"),j=r(w),C=e("components/hidden-field/index"),k=r(C),E=e("components/grid-field/index"),T=r(E),D=e("isomorphic-fetch"),S=r(D),P=e("deep-freeze"),O=r(P),M=e("es6-promise"),R=r(M);R["default"].polyfill();var N={components:{TextField:j["default"],GridField:T["default"],HiddenField:k["default"]},getComponentByName:function(e){return this.components[e]},getComponentByDataType:function(e){switch(e){case"String":return this.components.TextField;case"Hidden":return this.components.HiddenField;case"Custom":return this.components.GridField;default:return null}}},I=n.FormBuilderComponent=function(e){function t(n){s(this,t);var i=a(this,e.call(this,n));return i.formSchemaPromise=null,i.state={isFetching:!1},i.mapFieldsToComponents=i.mapFieldsToComponents.bind(i),i}return l(t,e),t.prototype.componentDidMount=function(){this.fetch()},t.prototype.fetch=function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0],n=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=[];return this.state.isFetching===!0?this.formSchemaPromise:(t===!0&&i.push("schema"),n===!0&&i.push("state"),this.formSchemaPromise=(0,S["default"])(this.props.schemaUrl,{headers:{"X-FormSchema-Request":i.join()},credentials:"same-origin"}).then(function(e){return e.json()}).then(function(t){e.setState({isFetching:!1}),e.props.actions.setSchema(t)}),this.formSchemaPromise)},t.prototype.mapFieldsToComponents=function(e){var t=this.props.createFn;return e.map(function(e,n){var i=null!==e.component?N.getComponentByName(e.component):N.getComponentByDataType(e.type);if(null===i)return null;var r=(0,O["default"])(e);return"function"==typeof t?t(i,r):p["default"].createElement(i,d({key:n},r))})},t.prototype.render=function(){var e=this.props.schemas[this.props.schemaUrl];if(!e)return null;var t=d({},e.schema.attributes,{"class":null,className:e.schema.attributes["class"],enctype:null,encType:e.schema.attributes.enctype}),n={actions:e.schema.actions,attributes:t,data:e.schema.data,fields:e.schema.fields,mapFieldsToComponents:this.mapFieldsToComponents};return p["default"].createElement(x["default"],n)},t}(y["default"]);I.propTypes={actions:p["default"].PropTypes.object.isRequired,createFn:p["default"].PropTypes.func,schemaUrl:p["default"].PropTypes.string.isRequired,schemas:p["default"].PropTypes.object.isRequired},n["default"]=(0,f.connect)(c,u)(I)},{"components/form/index":"components/form/index","components/grid-field/index":"components/grid-field/index","components/hidden-field/index":"components/hidden-field/index","components/text-field/index":"components/text-field/index","deep-freeze":"deep-freeze","es6-promise":317,"isomorphic-fetch":318,react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/schema/actions":8}],"components/form/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=e("components/form-action/index"),p=i(h),f=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.getFormActionComponents=function(){return this.props.actions.map(function(e){return c["default"].createElement(p["default"],e)})},t.prototype.render=function(){var e=this.props.attributes,t=this.props.mapFieldsToComponents(this.props.fields),n=this.getFormActionComponents();return c["default"].createElement("form",e,t&&c["default"].createElement("fieldset",{className:"form-group"},t),n&&c["default"].createElement("div",{className:"actions-fix-btm"},c["default"].createElement("div",{className:"btn-group",role:"group"},n)))},t}(d["default"]);f.propTypes={actions:c["default"].PropTypes.array,attributes:c["default"].PropTypes.shape({action:c["default"].PropTypes.string.isRequired,className:c["default"].PropTypes.string,encType:c["default"].PropTypes.string,id:c["default"].PropTypes.string,method:c["default"].PropTypes.string.isRequired}),data:c["default"].PropTypes.array,fields:c["default"].PropTypes.array.isRequired,mapFieldsToComponents:c["default"].PropTypes.func.isRequired},n["default"]=f},{"components/form-action/index":"components/form-action/index",react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/cell/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleDrillDown=i.handleDrillDown.bind(i),i}return a(t,e),t.prototype.render=function(){var e={className:"grid-field__cell "+this.props.className,onClick:this.handleDrillDown};return c["default"].createElement("td",e,this.props.children)},t.prototype.handleDrillDown=function(e){"undefined"!=typeof this.props.handleDrillDown&&this.props.handleDrillDown(e)},t}(d["default"]);h.PropTypes={width:c["default"].PropTypes.number,handleDrillDown:c["default"].PropTypes.func},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/header-cell":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("th",null,this.props.children);
|
||||
},t}(d["default"]);h.PropTypes={width:c["default"].PropTypes.number},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/header":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=e("./row"),p=i(h),f=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement(p["default"],null,this.props.children)},t}(d["default"]);n["default"]=f},{"./row":"components/grid-field/row",react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/index":[function(e,t,n){"use strict";function i(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 r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function s(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 l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):o(e,t))}function c(e,t){var n=t.data?t.data.recordType:null;return{records:e.records&&n?e.records[n]:{}}}function u(e){return{actions:(0,p.bindActionCreators)(P,e)}}Object.defineProperty(n,"__esModule",{value:!0});var d=e("react"),h=r(d),p=e("redux"),f=e("react-redux"),g=e("silverstripe-component"),m=r(g),v=e("./table"),_=r(v),y=e("./header"),b=r(y),x=e("./header-cell"),w=r(x),j=e("./row"),C=r(j),k=e("./cell"),E=r(k),T=e("./action"),D=r(T),S=e("state/records/actions"),P=i(S),O=function(e){function t(n){s(this,t);var i=a(this,e.call(this,n));return i.deleteRecord=i.deleteRecord.bind(i),i.editRecord=i.editRecord.bind(i),i}return l(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.props.data;this.props.actions.fetchRecords(t.recordType,t.collectionReadEndpoint.method,t.collectionReadEndpoint.url)},t.prototype.render=function(){var e=this,t=this.props.records,n=this.props.data.handleDrillDown;if(!t)return h["default"].createElement("div",null);var i=this.props.data.columns,r=h["default"].createElement("th",{className:"grid-field__action-placeholder"}),o=i.map(function(e,t){return h["default"].createElement(w["default"],{key:t},e.name)}),s=h["default"].createElement(b["default"],null,o.concat(r)),a=Object.keys(t).map(function(r){var o=t[r],s=i.map(function(e,t){var i=e.field.split(".").reduce(function(e,t){return e[t]},o),r={handleDrillDown:n?function(e){return n(e,o)}:null,className:n?"grid-field__cell--drillable":"",key:t,width:e.width};return h["default"].createElement(E["default"],r,i)}),a=h["default"].createElement(E["default"],{key:r+"-actions"},h["default"].createElement(D["default"],{icon:"cog",handleClick:e.editRecord,key:"action-"+r+"-edit",record:o}),h["default"].createElement(D["default"],{icon:"cancel",handleClick:e.deleteRecord,key:"action-"+r+"-delete",record:o})),l={key:r,className:n?"grid-field__row--drillable":""};return h["default"].createElement(C["default"],l,s.concat(a))});return h["default"].createElement(_["default"],{header:s,rows:a})},t.prototype.deleteRecord=function(e,t){e.preventDefault(),this.props.actions.deleteRecord(this.props.data.recordType,t,this.props.data.itemDeleteEndpoint.method,this.props.data.itemDeleteEndpoint.url)},t.prototype.editRecord=function(e){e.preventDefault()},t}(m["default"]);O.propTypes={data:h["default"].PropTypes.shape({recordType:h["default"].PropTypes.string.isRequired,headerColumns:h["default"].PropTypes.array,collectionReadEndpoint:h["default"].PropTypes.object,handleDrillDown:h["default"].PropTypes.func})},n["default"]=(0,f.connect)(c,u)(O)},{"./action":2,"./cell":"components/grid-field/cell/index","./header":"components/grid-field/header","./header-cell":"components/grid-field/header-cell","./row":"components/grid-field/row","./table":"components/grid-field/table",react:"react","react-redux":"react-redux",redux:"redux","silverstripe-component":"silverstripe-component","state/records/actions":6}],"components/grid-field/row":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){var e="grid-field__row "+this.props.className;return c["default"].createElement("tr",{tabIndex:"0",className:e},this.props.children)},t}(d["default"]);n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/grid-field/table":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"container-fluid grid-field"},c["default"].createElement("table",{className:"table table-hover grid-field__table"},c["default"].createElement("thead",null,this.generateHeader()),c["default"].createElement("tbody",null,this.generateRows())))},t.prototype.generateHeader=function(){return"undefined"!=typeof this.props.header?this.props.header:("undefined"!=typeof this.props.data,null)},t.prototype.generateRows=function(){return"undefined"!=typeof this.props.rows?this.props.rows:("undefined"!=typeof this.props.data,null)},t}(d["default"]);h.propTypes={data:c["default"].PropTypes.object,header:c["default"].PropTypes.object,rows:c["default"].PropTypes.array},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/hidden-field/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleChange=i.handleChange.bind(i),i}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"field hidden"},c["default"].createElement("input",this.getInputProps()))},t.prototype.getInputProps=function(){return{className:["hidden",this.props.extraClass].join(" "),id:this.props.name,name:this.props.name,onChange:this.props.onChange,type:"hidden",value:this.props.value}},t.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},t}(d["default"]);h.propTypes={label:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.string},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/north-header/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"toolbar--north container-fluid"},this.props.children)},t}(d["default"]);n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],"components/text-field/index":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("silverstripe-component"),d=i(u),h=function(e){function t(n){o(this,t);var i=s(this,e.call(this,n));return i.handleChange=i.handleChange.bind(i),i}return a(t,e),t.prototype.render=function(){return c["default"].createElement("div",{className:"field text"},this.props.label&&c["default"].createElement("label",{className:"left",htmlFor:"gallery_"+this.props.name},this.props.label),c["default"].createElement("div",{className:"middleColumn"},c["default"].createElement("input",this.getInputProps())))},t.prototype.getInputProps=function(){return{className:["text",this.props.extraClass].join(" "),id:"gallery_"+this.props.name,name:this.props.name,onChange:this.props.onChange,type:"text",value:this.props.value}},t.prototype.handleChange=function(){"undefined"!=typeof this.props.onChange&&this.props.onChange()},t}(d["default"]);h.propTypes={label:c["default"].PropTypes.string,extraClass:c["default"].PropTypes.string,name:c["default"].PropTypes.string.isRequired,onChange:c["default"].PropTypes.func,value:c["default"].PropTypes.string},n["default"]=h},{react:"react","silverstripe-component":"silverstripe-component"}],config:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){i(this,e)}return e.getSection=function(e){return window.ss.config.sections[e]},e.getTopLevelRoutes=function(){var e=[];return Object.keys(window.ss.config.sections).forEach(function(t){var n=window.ss.config.sections[t].route,i=n.match(/^admin\/[^\/]+(\/?)$/);if(i){i[1]||(n+="/");var r=-1===e.indexOf(n);r&&e.push(n)}}),e},e}();n["default"]=r},{}],"deep-freeze":[function(e,t,n){t.exports=function i(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){!e.hasOwnProperty(t)||null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||i(e[t])}),e}},{}],i18n:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(){i(this,e),this.currentLocale=null,this.defaultLocale="en_US",this.lang={}}return e.prototype.setLocale=function(e){this.currentLocale=e},e.prototype.getLocale=function(){return null!==this.currentLocale?this.currentLocale:this.defaultLocale},e.prototype._t=function(e,t,n,i){var r=this.getLocale().replace(/_[\w]+/i,""),o=this.defaultLocale.replace(/_[\w]+/i,"");return this.lang&&this.lang[this.getLocale()]&&this.lang[this.getLocale()][e]?this.lang[this.getLocale()][e]:this.lang&&this.lang[r]&&this.lang[r][e]?this.lang[r][e]:this.lang&&this.lang[this.defaultLocale]&&this.lang[this.defaultLocale][e]?this.lang[this.defaultLocale][e]:this.lang&&this.lang[o]&&this.lang[o][e]?this.lang[o][e]:t?t:""},e.prototype.addDictionary=function(e,t){"undefined"==typeof this.lang[e]&&(this.lang[e]={});for(var n in t)this.lang[e][n]=t[n]},e.prototype.getDictionary=function(e){return this.lang[e]},e.prototype.stripStr=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},e.prototype.stripStrML=function(e){for(var t=e.split("\n"),n=0;n<t.length;n+=1)t[n]=stripStr(t[n]);return stripStr(t.join(" "))},e.prototype.sprintf=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;t>i;i++)n[i-1]=arguments[i];if(0===n.length)return e;var r=new RegExp("(.?)(%s)","g"),o=0;return e.replace(r,function(e,t,i,r,s){return"%"===t?e:t+n[o++]})},e.prototype.inject=function(e,t){var n=new RegExp("{([A-Za-z0-9_]*)}","g");return e.replace(n,function(e,n,i,r){return t[n]?t[n]:e})},e.prototype.detectLocale=function(){var t,n;if(t=jQuery("body").attr("lang"),!t)for(var i=document.getElementsByTagName("meta"),r=0;r<i.length;r++)i[r].attributes["http-equiv"]&&"content-language"==i[r].attributes["http-equiv"].nodeValue.toLowerCase()&&(t=i[r].attributes.content.nodeValue);t||(t=this.defaultLocale);var o=t.match(/([^-|_]*)[-|_](.*)/);if(2==t.length){for(var s in e.lang)if(s.substr(0,2).toLowerCase()==t.toLowerCase()){n=s;break}}else o&&(n=o[1].toLowerCase()+"_"+o[2].toUpperCase());return n},e.prototype.addEvent=function(e,t,n,i){return e.addEventListener?(e.addEventListener(t,n,i),!0):e.attachEvent?e.attachEvent("on"+t,n):void console.log("Handler could not be attached")},e}(),o=new r;window.ss="undefined"!=typeof window.ss?window.ss:{},window.ss.i18n=window.i18n=o,n["default"]=o},{}],jQuery:[function(e,t,n){"use strict";var i="undefined"!=typeof window.jQuery?window.jQuery:null;t.exports=i},{}],"react-addons-css-transition-group":[function(e,t,n){t.exports=e("react/lib/ReactCSSTransitionGroup")},{"react/lib/ReactCSSTransitionGroup":363}],"react-addons-test-utils":[function(e,t,n){t.exports=e("react/lib/ReactTestUtils")},{"react/lib/ReactTestUtils":420}],"react-dom":[function(e,t,n){"use strict";t.exports=e("react/lib/ReactDOM")},{"react/lib/ReactDOM":373}],"react-redux":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0,n.connect=n.Provider=void 0;var r=e("./components/Provider"),o=i(r),s=e("./components/connect"),a=i(s);n.Provider=o["default"],n.connect=a["default"]},{"./components/Provider":326,"./components/connect":327}],react:[function(e,t,n){"use strict";t.exports=e("./lib/React")},{"./lib/React":360}],"reducer-register":[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r={},o=function(){function e(){i(this,e)}return e.prototype.add=function(e,t){if("undefined"!=typeof r[e])throw new Error("Reducer already exists at '"+e+"'");r[e]=t},e.prototype.getAll=function(){return r},e.prototype.getByKey=function(e){return r[e]},e.prototype.remove=function(e){delete r[e]},e}(),s=new o;n["default"]=s},{}],"redux-thunk":[function(e,t,n){"use strict";function i(e){var t=e.dispatch,n=e.getState;return function(e){return function(i){return"function"==typeof i?i(t,n):e(i)}}}t.exports=i},{}],redux:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}n.__esModule=!0;var r=e("./createStore"),o=i(r),s=e("./utils/combineReducers"),a=i(s),l=e("./utils/bindActionCreators"),c=i(l),u=e("./utils/applyMiddleware"),d=i(u),h=e("./utils/compose"),p=i(h);n.createStore=o["default"],n.combineReducers=a["default"],n.bindActionCreators=c["default"],n.applyMiddleware=d["default"],n.compose=p["default"]},{"./createStore":499,"./utils/applyMiddleware":500,"./utils/bindActionCreators":501,"./utils/combineReducers":502,"./utils/compose":503}],router:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e){var t=this.getAbsoluteBase(),n=d["default"].resolve(t,e);return 0!==n.indexOf(t)?n:n.substring(t.length-1)}function o(e){return function(t,n,i,r){return e(c["default"].resolveURLToBase(t),n,i,r)}}function s(e){var t=new c["default"].Route(e);return t.match(c["default"].current,{})}function a(){var e=window.document.getElementsByTagName("base");return e&&e[0]?e[0].href:null}Object.defineProperty(n,"__esModule",{value:!0});var l=e("page.js"),c=i(l),u=e("url"),d=i(u);c["default"].getAbsoluteBase=a.bind(c["default"]),c["default"].resolveURLToBase=r.bind(c["default"]),c["default"].show=o(c["default"].show),c["default"].routeAppliesToCurrentLocation=s,n["default"]=c["default"]},{"page.js":320,url:315}],"silverstripe-backend":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e){var t=void 0,n=void 0;if(!(e.status>=200&&e.status<300))throw n=new Error(e.statusText),n.response=e,n;return t=e}Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},l=e("isomorphic-fetch"),c=i(l),u=e("es6-promise"),d=i(u),h=e("qs"),p=i(h),f=e("merge"),g=i(f);d["default"].polyfill();var m=function(){function e(){o(this,e),this.fetch=c["default"]}return e.prototype.createEndpointFetcher=function(e){function t(e,t){switch(e){case"application/x-www-form-urlencoded":return p["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 n(e,t){switch(e){case"application/x-www-form-urlencoded":return p["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 i(e,t){return""===t?e:e.match(/\?/)?e+"&"+t:e+"?"+t}function o(e){return e.text().then(function(t){return n(e.headers.get("Content-Type"),t)})}function s(e,t){return Object.keys(t).reduce(function(n,i){var o=e[i];return!o||o.remove!==!0&&o.querystring!==!0?a(n,r({},i,t[i])):n},{})}function l(e,n,o){var s=arguments.length<=3||void 0===arguments[3]?{setFromData:!1}:arguments[3],l=n,c=Object.keys(o).reduce(function(t,n){var i=e[n],l=s.setFromData===!0&&!(i&&i.remove===!0),c=i&&i.querystring===!0&&i.remove!==!0;return l||c?a(t,r({},n,o[n])):t},{});return l=i(l,t("application/x-www-form-urlencoded",c)),l=Object.keys(e).reduce(function(t,n){var i=e[n].urlReplacement;return i?t.replace(i,o[n]):t},l)}var c=this,u=a({method:"get",payloadFormat:"application/x-www-form-urlencoded",responseFormat:"application/json",payloadSchema:{},defaultData:{}},e),d={json:"application/json",urlencoded:"application/x-www-form-urlencoded"};return["payloadFormat","responseFormat"].forEach(function(e){d[u[e]]&&(u[e]=d[u[e]])}),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n={Accept:u.responseFormat,"Content-Type":u.payloadFormat},i=g["default"].recursive({},u.defaultData,e),r=l(u.payloadSchema,u.url,i,{setFromData:"get"===u.method.toLowerCase()}),a=t(u.payloadFormat,s(u.payloadSchema,i)),d="get"===u.method.toLowerCase()?[r,n]:[r,a,n];return c[u.method].apply(c,d).then(o)}},e.prototype.get=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return this.fetch(e,{method:"get",credentials:"same-origin",headers:t}).then(s)},e.prototype.post=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i={"Content-Type":"application/x-www-form-urlencoded"};return this.fetch(e,{method:"post",headers:a({},i,n),credentials:"same-origin",body:t}).then(s)},e.prototype.put=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"put",credentials:"same-origin",body:t,headers:n}).then(s)},e.prototype["delete"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return this.fetch(e,{method:"delete",credentials:"same-origin",body:t,headers:n}).then(s)},e}(),v=new m;n["default"]=v},{"es6-promise":317,"isomorphic-fetch":318,merge:319,qs:322}],"silverstripe-component":[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var r=n[i],o=Object.getOwnPropertyDescriptor(t,r);o&&o.configurable&&void 0===e[r]&&Object.defineProperty(e,r,o)}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function 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):r(e,t))}Object.defineProperty(n,"__esModule",{value:!0});var l=e("react"),c=i(l),u=e("../../../client/src/jQuery"),d=i(u),h=function(e){function t(){return o(this,t),s(this,e.apply(this,arguments))}return a(t,e),t.prototype.componentDidMount=function(){if("undefined"!=typeof this.props.cmsEvents){this.cmsEvents=this.props.cmsEvents;for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).on(e,this.cmsEvents[e].bind(this))}},t.prototype.componentWillUnmount=function(){for(var e in this.cmsEvents)({}).hasOwnProperty.call(this.cmsEvents,e)&&(0,d["default"])(document).off(e)},t.prototype.emitCmsEvent=function(e,t){(0,d["default"])(document).trigger(e,t)},t}(l.Component);h.propTypes={cmsEvents:c["default"].PropTypes.object},n["default"]=h},{"../../../client/src/jQuery":"jQuery",react:"react"}]},{},[1]),function(){var e,t,n,i,r=function(e,t){function n(){this.constructor=e}for(var i in t)o.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},o={}.hasOwnProperty;t=function(){function e(t,n){this.form_field=t,this.options=null!=n?n:{},e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){return this.click_test_action=function(e){return function(t){return e.test_active_click(t)}}(this),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+e.group_label+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout(function(e){return function(){return e.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(e){return function(){return e.blur_test()}}(this),100))},e.prototype.results_option_build=function(e){var t,n,i,r,o,s,a;for(t="",a=0,s=this.results_data,r=0,o=s.length;o>r&&(n=s[r],i="",i=n.group?this.result_add_group(n):this.result_add_option(n),""!==i&&(a++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(a>=this.max_shown_results));r++);return t},e.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),n=document.createElement("li"),n.className=t.join(" "),n.style.cssText=e.style,n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.search_text,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&e.active_options>0?(t=[],t.push("group-result"),e.classes&&t.push(e.classes),n=document.createElement("li"),n.className=t.join(" "),n.innerHTML=e.search_text,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},e.prototype.reset_single_select_options=function(){var e,t,n,i,r;for(n=this.results_data,r=[],e=0,t=n.length;t>e;e++)i=n[e],i.selected?r.push(i.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var e,t,n,i,r,o,s,a,l,c,u,d;for(this.no_results_clear(),s=0,l=this.get_search_text(),e=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=new RegExp(e,"i"),o=this.get_search_regex(e),r=this.results_data,t=0,n=r.length;n>t;t++)i=r[t],i.search_match=!1,a=null,this.include_option_in_results(i)&&(i.group&&(i.group_match=!1,i.active_options=0),null!=i.group_array_index&&this.results_data[i.group_array_index]&&(a=this.results_data[i.group_array_index],0===a.active_options&&a.search_match&&(s+=1),a.active_options+=1),i.search_text=i.group?i.label:i.html,i.group&&!this.group_search||(i.search_match=this.search_string_match(i.search_text,o),i.search_match&&!i.group&&(s+=1),i.search_match?(l.length&&(c=i.search_text.search(d),u=i.search_text.substr(0,c+l.length)+"</em>"+i.search_text.substr(c+l.length),i.search_text=u.substr(0,c)+"<em>"+u.substr(c)),
|
||||
null!=a&&(a.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));return this.result_clear_highlight(),1>s&&l.length?(this.update_results_content(""),this.no_results(l)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t;return t=this.search_contains?"":"^",new RegExp(t+e,"i")},e.prototype.search_string_match=function(e,t){var n,i,r,o;if(t.test(e))return!0;if(this.enable_split_word_search&&(e.indexOf(" ")>=0||0===e.indexOf("["))&&(o=e.replace(/\[|\]/g,"").split(" "),o.length))for(n=0,i=o.length;i>n;n++)if(r=o[n],t.test(r))return!0},e.prototype.choices_count=function(){var e,t,n,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=this.form_field.options,e=0,t=i.length;t>e;e++)n=i[e],n.selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){return e.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},e.prototype.keyup_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),n){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(e){return setTimeout(function(e){return function(){return e.results_search()}}(this),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return this.is_multiple&&!this.display_selected_options&&e.selected?!1:!this.display_disabled_options&&e.disabled?!1:!e.empty},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){return this.touch_started?this.search_results_mouseup(e):void 0},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:(t=document.createElement("div"),t.appendChild(e),t.innerHTML)},e.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),i=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,r,o,s;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:this.escapeExpression(e.label),title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),o=e.childNodes,s=[],n=0,i=o.length;i>n;n++)r=o[n],s.push(this.add_option(r,t,e.disabled));return s},e.prototype.add_option=function(e,t,n){return"OPTION"===e.nodeName.toUpperCase()?(""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:n===!0?n:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},e.prototype.escapeExpression=function(e){var t,n;return null==e||e===!1?"":/[\&\<\>\"\'\`]/.test(e)?(t={"<":"<",">":">",'"':""","'":"'","`":"`"},n=/&(?!\w+;)|[\<\>\"\'\`]/g,e.replace(n,function(e){return t[e]||"&"})):e},e}(),i.select_to_array=function(e){var t,n,r,o,s;for(o=new i,s=e.childNodes,n=0,r=s.length;r>n;n++)t=s[n],o.add_node(t);return o.parsed},e=jQuery,e.fn.extend({chosen:function(i){return t.browser_is_supported()?this.each(function(t){var r,o;return r=e(this),o=r.data("chosen"),"destroy"===i?void(o instanceof n&&o.destroy()):void(o instanceof n||r.data("chosen",new n(this,i)))}):this}}),n=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return r(n,t),n.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},n.prototype.set_up_html=function(){var t,n;return t=["chosen-container"],t.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),n={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(n.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=e("<div />",n),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){return this.container.bind("touchstart.chosen",function(e){return function(t){return e.container_mousedown(t),t.preventDefault()}}(this)),this.container.bind("touchend.chosen",function(e){return function(t){return e.container_mouseup(t),t.preventDefault()}}(this)),this.container.bind("mousedown.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.container.bind("mouseup.chosen",function(e){return function(t){e.container_mouseup(t)}}(this)),this.container.bind("mouseenter.chosen",function(e){return function(t){e.mouse_enter(t)}}(this)),this.container.bind("mouseleave.chosen",function(e){return function(t){e.mouse_leave(t)}}(this)),this.search_results.bind("mouseup.chosen",function(e){return function(t){e.search_results_mouseup(t)}}(this)),this.search_results.bind("mouseover.chosen",function(e){return function(t){e.search_results_mouseover(t)}}(this)),this.search_results.bind("mouseout.chosen",function(e){return function(t){e.search_results_mouseout(t)}}(this)),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){return function(t){e.search_results_mousewheel(t)}}(this)),this.search_results.bind("touchstart.chosen",function(e){return function(t){e.search_results_touchstart(t)}}(this)),this.search_results.bind("touchmove.chosen",function(e){return function(t){e.search_results_touchmove(t)}}(this)),this.search_results.bind("touchend.chosen",function(e){return function(t){e.search_results_touchend(t)}}(this)),this.form_field_jq.bind("chosen:updated.chosen",function(e){return function(t){e.results_update_field(t)}}(this)),this.form_field_jq.bind("chosen:activate.chosen",function(e){return function(t){e.activate_field(t)}}(this)),this.form_field_jq.bind("chosen:open.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.form_field_jq.bind("chosen:close.chosen",function(e){return function(t){e.input_blur(t)}}(this)),this.search_field.bind("blur.chosen",function(e){return function(t){e.input_blur(t)}}(this)),this.search_field.bind("keyup.chosen",function(e){return function(t){e.keyup_checker(t)}}(this)),this.search_field.bind("keydown.chosen",function(e){return function(t){e.keydown_checker(t)}}(this)),this.search_field.bind("focus.chosen",function(e){return function(t){e.input_focus(t)}}(this)),this.search_field.bind("cut.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.search_field.bind("paste.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.bind("click.chosen",function(e){return function(t){e.choices_click(t)}}(this)):this.container.bind("click.chosen",function(e){e.preventDefault()})},n.prototype.destroy=function(){return e(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},n.prototype.container_mousedown=function(t){return this.is_disabled||(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null!=t&&e(t.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},n.prototype.search_results_mousewheel=function(e){var t;return e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t?(e.preventDefault(),"DOMMouseScroll"===e.type&&(t=40*t),this.search_results.scrollTop(t+this.search_results.scrollTop())):void 0},n.prototype.blur_test=function(e){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},n.prototype.close_field=function(){return e(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},n.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(t){var n;return n=e(t.target).closest(".chosen-container"),n.length&&this.container[0]===n[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(e){var t,n,i,r,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),r=i+o,n=this.result_highlight.position().top+this.search_results.scrollTop(),t=n+this.result_highlight.outerHeight(),t>=r)return this.search_results.scrollTop(t-i>0?t-i:0);if(o>n)return this.search_results.scrollTop(n)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(e){return this.search_results.html(e)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(e){var t;return this.form_field.tabIndex?(t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t):void 0},n.prototype.set_label_behavior=function(){return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=e("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(e){return function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()}}(this)):void 0},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n.length?(this.result_highlight=n,this.result_select(t),this.search_field.focus()):void 0},n.prototype.search_results_mouseover=function(t){var n;return n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),n?this.result_do_highlight(n):void 0},n.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},n.prototype.choice_build=function(t){var n,i;return n=e("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(t)+"</span>"),t.disabled?n.addClass("search-choice-disabled"):(i=e("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index}),i.bind("click.chosen",function(e){return function(t){return e.choice_destroy_link_click(t)}}(this)),n.append(i)),this.search_container.before(n)},n.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(e(t.target))},n.prototype.choice_destroy=function(e){return this.result_deselect(e[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()):void 0},n.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(e){var t,n;return this.result_highlight?(t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),n=this.results_data[t[0].getAttribute("data-option-array-index")],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),(e.metaKey||e.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())):void 0},n.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},n.prototype.result_deselect=function(e){var t;return t=this.results_data[e],this.form_field.options[t.options_index].disabled?!1:(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},n.prototype.get_search_text=function(){return e("<div/>").text(e.trim(this.search_field.val())).html()},n.prototype.winnow_results_set_highlight=function(){var e,t;return t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first(),null!=e?this.result_do_highlight(e):void 0},n.prototype.no_results=function(t){var n;return n=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),n.find("span").first().html(t),this.search_results.append(n),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.keydown_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==n&&this.pending_backstroke&&this.clear_backstroke(),n){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},n.prototype.search_field_scale=function(){var t,n,i,r,o,s,a,l,c;if(this.is_multiple){for(i=0,c=0,a="position:absolute; left: -1000px; top: -1000px; display:none;",l=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],r=0,o=l.length;o>r;r++)s=l[r],a+=s+":"+this.search_field.css(s)+";";return t=e("<div />",{style:a}),t.text(this.search_field.val()),e("body").append(t),c=t.width()+25,t.remove(),n=this.container.outerWidth(),c>n-10&&(c=n-10),this.search_field.css({width:c+"px"})}},n}(t)}.call(this);
|
||||
//# sourceMappingURL=bundle-lib.js.map
|
||||
|
4
admin/client/dist/styles/bundle.css
vendored
4
admin/client/dist/styles/bundle.css
vendored
File diff suppressed because one or more lines are too long
@ -87,10 +87,10 @@ class CampaignAdminContainer extends SilverStripeComponent {
|
||||
<div className="cms-content__left cms-campaigns collapse in" aria-expanded="true">
|
||||
<NorthHeader>
|
||||
<div className="breadcrumb breadcrumb--current-only">
|
||||
<h2 className="text-truncate breadcrumb__item-title breadcrumb__item-title--last">Campaigns</h2>
|
||||
<h2 className="breadcrumb__item-title breadcrumb__item-title--last">Campaigns</h2>
|
||||
</div>
|
||||
</NorthHeader>
|
||||
<div className="panel-scrollable">
|
||||
<div className="panel-scrollable--single-toolbar">
|
||||
<div className="toolbar--content">
|
||||
<div className="btn-toolbar">
|
||||
<FormAction
|
||||
|
@ -88,7 +88,7 @@ class CampaignListContainer extends SilverStripeComponent {
|
||||
<NorthHeader>
|
||||
<BreadcrumbComponent crumbs={this.props.breadcrumbs} multiline />
|
||||
</NorthHeader>
|
||||
<div className="container-fluid campaign-items panel-scrollable">
|
||||
<div className="container-fluid campaign-items panel-scrollable--double-toolbar">
|
||||
<Accordion>
|
||||
{accordionGroups}
|
||||
</Accordion>
|
||||
|
@ -1,6 +1,7 @@
|
||||
.cms-content__inner {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cms-content__right,
|
||||
.cms-content__left {
|
||||
height: 100%;
|
||||
@ -8,9 +9,18 @@
|
||||
background-color: $body-bg;
|
||||
transition: width .2s;
|
||||
}
|
||||
.panel-scrollable {
|
||||
height: calc(100% - #{$toolbar-total-height});
|
||||
|
||||
.panel-scrollable,
|
||||
.panel-scrollable--single-toolbar,
|
||||
.panel-scrollable--double-toolbar {
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
.panel-scrollable--single-toolbar {
|
||||
height: calc(100% - #{$toolbar-total-height});
|
||||
}
|
||||
.panel-scrollable--double-toolbar {
|
||||
height: calc(100% - #{$toolbar-total-height * 2});
|
||||
}
|
||||
|
||||
// .cms-content can be split into different left/right zones
|
||||
|
Loading…
Reference in New Issue
Block a user