diff --git a/admin/client/dist/js/LeftAndMain.js b/admin/client/dist/js/LeftAndMain.js index 2378c0d5a..2a8cee034 100644 --- a/admin/client/dist/js/LeftAndMain.js +++ b/admin/client/dist/js/LeftAndMain.js @@ -289,7 +289,7 @@ data.__forceReferer = forceReferer; if (forceReload) { - data.__forceReload = Math.random(); + data.__forceReload = 1 + Math.random(); } window.ss.router.show(url, data); @@ -888,7 +888,9 @@ config = $.extend(config, $.datepicker.regional[config.locale], {}); } - $(this).datepicker(config); + if (!this.prop('disabled') && !this.prop('readonly')) { + $(this).datepicker(config); + } this._super(); diff --git a/admin/client/dist/js/bundle-legacy.js b/admin/client/dist/js/bundle-legacy.js index 4669e4711..98a3ca76a 100644 --- a/admin/client/dist/js/bundle-legacy.js +++ b/admin/client/dist/js/bundle-legacy.js @@ -1,4 +1,4 @@ !function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o'),$("body").append(dialog)),0===dialog.children().length&&dialog.addClass("loading");var form=this.closest("form"),button=this,formData=form.serializeArray();return formData.push({name:button.attr("name"),value:"1"}),$.ajax({url:form.attr("action"),data:formData,type:"POST",global:!1,complete:function(){dialog.removeClass("loading")},success:function(data,status,xhr){if(0===xhr.getResponseHeader("Content-Type").indexOf("text/plain")){var container=$('
');container.find("span").text(data),dialog.append(container)}else dialog.html(data)},error:function error(xhr){var error=xhr.responseText||"Something went wrong. Please try again in a few minutes.",container=$('
');container.find("span").text(error),dialog.append(container)}}),!1}}),$("#add-to-campaign__dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,minHeight:200,maxHeight:200,minWidth:200,maxWidth:500}),this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},onssdialogclose:function(){this.empty()},"onchosen:showing_dropdown":function(){this.css({overflow:"visible"})},"onchosen:hiding_dropdown":function(){this.css({overflow:""})}})})},{jQuery:"jQuery"}],3:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){var frame=$(".cms-container").find("iframe");frame.each(function(index,iframe){try{$(iframe).contents().off("click.ss-ui-action-tabset")}catch(e){console.warn("Unable to access iframe, possible https mis-match")}}),$(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(event,ui){this.riseUp(event,ui)},onclick:function(event,ui){this.attachCloseHandler(event,ui)},attachCloseHandler:function(event,ui){var _closeHandler,that=this,frame=$(".cms-container").find("iframe");_closeHandler=function(event){var panel,frame;panel=$(event.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),$(event.target).closest(that).length||panel.length||(that.tabs("option","active",!1),frame=$(".cms-container").find("iframe"),frame.each(function(index,iframe){$(iframe).contents().off("click.ss-ui-action-tabset",_closeHandler)}),$(document).off("click.ss-ui-action-tabset",_closeHandler))},$(document).on("click.ss-ui-action-tabset",_closeHandler),frame.length>0&&frame.each(function(index,iframe){$(iframe).contents().on("click.ss-ui-action-tabset",_closeHandler)})},riseUp:function(event,ui){var elHeight,trigger,endOfWindow,elPos,activePanel,activeTab,topPosition,containerSouth,padding;return elHeight=$(this).find(".ui-tabs-panel").outerHeight(),trigger=$(this).find(".ui-tabs-nav").outerHeight(),endOfWindow=$(window).height()+$(document).scrollTop()-trigger,elPos=$(this).find(".ui-tabs-nav").offset().top,activePanel=ui.newPanel,activeTab=ui.newTab,elPos+elHeight>=endOfWindow&&elPos-elHeight>0?(this.addClass("rise-up"),null!==activeTab.position()&&(topPosition=-activePanel.outerHeight(),containerSouth=activePanel.parents(".toolbar--south"),containerSouth&&(padding=activeTab.offset().top-containerSouth.offset().top,topPosition-=padding),$(activePanel).css("top",topPosition+"px"))):(this.removeClass("rise-up"),null!==activeTab.position()&&$(activePanel).css("bottom","100%")),!1}}),$(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(ui.newPanel).length>0&&$(ui.newPanel).css("left",ui.newTab.position().left+"px")}}),$(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),$(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(ui.newPanel).length>0&&($(ui.newTab).hasClass("last")?($(ui.newPanel).css({left:"auto",right:"0px"}),$(ui.newPanel).parent().addClass("tabset-open-last")):($(ui.newPanel).css("left",ui.newTab.position().left+"px"),$(ui.newTab).hasClass("first")&&($(ui.newPanel).css("left","0px"),$(ui.newPanel).parent().addClass("tabset-open"))))}}),$(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(e){$(e.target).parent().find("li .active").removeClass("active"),$(e.target).find("a").addClass("active")}},ontabsbeforeactivate:function(event,ui){this._super(event,ui),$(ui.newPanel).css({left:"auto",right:"auto"}),$(ui.newPanel).length>0&&$(ui.newPanel).parent().addClass("tabset-open")}})})},{jQuery:"jQuery"}],4:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss.tree",function($){$("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return $(".cms-tree")},fromTree:{oncheck_node:function(e,data){this.serializeFromTree()},onuncheck_node:function(e,data){this.serializeFromTree()}},registerDefault:function(){this.register(ss.config.adminUrl+"pages/batchactions/publish",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/unpublish",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/delete",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete?"),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/archive",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_ARCHIVE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to archive these pages?\n\nThese pages and all of their children pages will be unpublished and sent to the archive."),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/restore",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:ids.length}));return confirmed?ids:!1}),this.register(ss.config.adminUrl+"pages/batchactions/deletefromlive",function(ids){var confirmed=confirm(_i18n2["default"].inject(_i18n2["default"]._t("CMSMAIN.BATCH_DELETELIVE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"),{num:ids.length}));return confirmed?ids:!1})},onadd:function(){this.registerDefault(),this._super()},register:function(type,callback){this.trigger("register",{type:type,callback:callback});var actions=this.getActions();actions[type]=callback,this.setActions(actions)},unregister:function(type){this.trigger("unregister",{type:type});var actions=this.getActions();actions[type]&&delete actions[type],this.setActions(actions)},refreshSelected:function(rootNode){var self=this,st=this.getTree(),ids=this.getIDs(),allIds=[],viewMode=$(".cms-content-batchactions-button"),actionUrl=this.find(":input[name=Action]").val();null==rootNode&&(rootNode=st);for(var idx in ids)$($(st).getNodeByID(idx)).addClass("selected").attr("selected","selected");if(!actionUrl||-1==actionUrl||!viewMode.hasClass("active"))return void $(rootNode).find("li").each(function(){$(this).setEnabled(!0)});$(rootNode).find("li").each(function(){allIds.push($(this).data("id")),$(this).addClass("treeloading").setEnabled(!1)});var actionUrlParts=$.path.parseUrl(actionUrl),applicablePagesUrl=actionUrlParts.hrefNoSearch+"/applicablepages/";applicablePagesUrl=$.path.addSearchParams(applicablePagesUrl,actionUrlParts.search),applicablePagesUrl=$.path.addSearchParams(applicablePagesUrl,{csvIDs:allIds.join(",")}),jQuery.getJSON(applicablePagesUrl,function(applicableIDs){jQuery(rootNode).find("li").each(function(){$(this).removeClass("treeloading");var id=$(this).data("id");0==id||$.inArray(id,applicableIDs)>=0?$(this).setEnabled(!0):($(this).removeClass("selected").setEnabled(!1),$(this).prop("selected",!1))}),self.serializeFromTree()})},serializeFromTree:function(){var tree=this.getTree(),ids=tree.getSelectedIDs();return this.setIDs(ids),!0},setIDs:function(ids){this.find(":input[name=csvIDs]").val(ids?ids.join(","):null)},getIDs:function(){var value=this.find(":input[name=csvIDs]").val();return value?value.split(","):[]},onsubmit:function(e){var self=this,ids=this.getIDs(),tree=this.getTree(),actions=this.getActions();if(!ids||!ids.length)return alert(_i18n2["default"]._t("CMSMAIN.SELECTONEPAGE","Please select at least one page")),e.preventDefault(),!1;var type=this.find(":input[name=Action]").val();if(actions[type]&&(ids=this.getActions()[type].apply(this,[ids])),!ids||!ids.length)return e.preventDefault(),!1;this.setIDs(ids),tree.find("li").removeClass("failed");var button=this.find(":submit:first");return button.addClass("loading"),jQuery.ajax({url:type,type:"POST",data:this.serializeArray(),complete:function(xmlhttp,status){button.removeClass("loading"),tree.jstree("refresh",-1),self.setIDs([]),self.find(":input[name=Action]").val("").change();var msg=xmlhttp.getResponseHeader("X-Status");msg&&statusMessage(decodeURIComponent(msg),"success"==status?"good":"bad")},success:function(data,status){var id,node;if(data.modified){var modifiedNodes=[];for(id in data.modified)node=tree.getNodeByID(id),tree.jstree("set_text",node,data.modified[id].TreeTitle),modifiedNodes.push(node);$(modifiedNodes).effect("highlight")}if(data.deleted)for(id in data.deleted)node=tree.getNodeByID(id),node.length&&tree.jstree("delete_node",node);if(data.error)for(id in data.error)node=tree.getNodeByID(id),$(node).addClass("failed")},dataType:"json"}),e.preventDefault(),!1}}),$(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var tree=$(".cms-tree"),form=$("#Form_BatchActionsForm");this._super(),this.data("active")?(tree.addClass("multiple"),tree.removeClass("draggable"),form.serializeFromTree()):(tree.removeClass("multiple"),tree.addClass("draggable")),$("#Form_BatchActionsForm").refreshSelected()}}),$("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(e){var form=$(e.target.form),btn=form.find(":submit"),selected=$(e.target).val();selected&&-1!=selected?btn.removeAttr("disabled").button("refresh"):btn.attr("disabled","disabled").button("refresh"),$("#Form_BatchActionsForm").refreshSelected(),this.trigger("chosen:updated"),this._super(e)}})})},{i18n:"i18n",jQuery:"jQuery"}],5:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms-content").entwine({onadd:function(){this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),$(".cms-content .cms-tree").entwine({onadd:function(){var self=this;this._super(),this.bind("select_node.jstree",function(e,data){var node=data.rslt.obj,loadedNodeID=self.find(":input[name=ID]").val(),origEvent=data.args[2],container=$(".cms-container");if(!origEvent)return!1;if($(node).hasClass("disabled"))return!1;if($(node).data("id")!=loadedNodeID){var url=$(node).find("a:first").attr("href");url&&"#"!=url?(url=url.split("?")[0],self.jstree("deselect_all"),self.jstree("uncheck_all"),$.path.isExternal($(node).find("a:first"))&&(url=url=$.path.makeUrlAbsolute(url,$("base").attr("href"))),document.location.search&&(url=$.path.addSearchParams(url,document.location.search.replace(/^\?/,""))),container.loadPanel(url)):self.removeForm()}})}}),$(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms-content .cms-content-header, .cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto"),this.height(this.innerHeight()-this.css("padding-top")-this.css("padding-bottom"))}})})},{jQuery:"jQuery"}],6:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);window.onbeforeunload=function(e){var form=(0,_jQuery2["default"])(".cms-edit-form");return form.trigger("beforesubmitform"),form.is(".changed")&&!form.is(".discardchanges")?_i18n2["default"]._t("LeftAndMain.CONFIRMUNSAVEDSHORT"):void 0},_jQuery2["default"].entwine("ss",function($){$(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},ValidationErrorShown:!1,onadd:function(){this.attr("autocomplete","off"),this._setupChangeTracker();for(var overrideAttr in{action:!0,method:!0,enctype:!0,name:!0}){var el=this.find(":input[name=_form_"+overrideAttr+"]");el&&(this.attr(overrideAttr,el.val()),el.remove())}this.setValidationErrorShown(!1),this._super()},"from .cms-tabset":{onafterredrawtabs:function(){if(this.hasClass("validationerror")){var tabError=this.find(".message.validation, .message.required").first().closest(".tab");$(".cms-container").clearCurrentTabState();var $tabSet=tabError.closest(".ss-tabset");$tabSet.length||($tabSet=tabError.closest(".cms-tabset")),$tabSet.length?$tabSet.tabs("option","active",tabError.index(".tab")):this.getValidationErrorShown()||(this.setValidationErrorShown(!0),errorMessage(ss.i18n._t("ModelAdmin.VALIDATIONERROR","Validation Error")))}}},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function(){if(this.trigger("beforesubmitform"),!this.is(".changed")||this.is(".discardchanges"))return!0;var confirmed=confirm(_i18n2["default"]._t("LeftAndMain.CONFIRMUNSAVED"));return confirmed&&this.addClass("discardchanges"),confirmed},onsubmit:function(e,button){return"_blank"!=this.prop("target")?(button&&this.closest(".cms-container").submitForm(this,button),!1):void 0},validate:function(){var isValid=!0;return this.trigger("validate",{isValid:isValid}),isValid},"from .htmleditor":{oneditorinit:function(e){var self=this,field=$(e.target).closest(".field.htmleditor"),editor=field.find("textarea.htmleditor").getEditor().getInstance();editor.onClick.add(function(e){self.saveFieldFocus(field.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(e){this.saveFieldFocus($(e.target).attr("id"))},onfocus:function(e){this.saveFieldFocus($(e.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(e){var field=$(e.target).closest(".field.treedropdown");this.saveFieldFocus(field.attr("id"))}},"from .cms-edit-form .dropdown .chosen-container a":{onfocusin:function(e){var field=$(e.target).closest(".field.dropdown");this.saveFieldFocus(field.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(selected){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var id=$(this).attr("id"),focusElements=[];if(focusElements.push({id:id,selected:selected}),focusElements)try{window.sessionStorage.setItem(id,JSON.stringify(focusElements))}catch(err){if(err.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw err}}},restoreFieldFocus:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var elementID,activeTab,elementTab,toggleComposite,scrollY,self=this,hasSessionStorage="undefined"!=typeof window.sessionStorage&&window.sessionStorage,sessionData=hasSessionStorage?window.sessionStorage.getItem(this.attr("id")):null,sessionStates=sessionData?JSON.parse(sessionData):!1,tabbed=0!==this.find(".ss-tabset").length;if(hasSessionStorage&&sessionStates.length>0){if($.each(sessionStates,function(i,sessionState){self.is("#"+sessionState.id)&&(elementID=$("#"+sessionState.selected))}),$(elementID).length<1)return void this.focusFirstInput();if(activeTab=$(elementID).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),elementTab="tab-"+$(elementID).closest(".ss-tabset .ui-tabs-panel").attr("id"),tabbed&&elementTab!==activeTab)return;toggleComposite=$(elementID).closest(".togglecomposite"),toggleComposite.length>0&&toggleComposite.accordion("activate",toggleComposite.find(".ui-accordion-header")),scrollY=$(elementID).position().top,$(elementID).is(":visible")||(elementID="#"+$(elementID).closest(".field").attr("id"),scrollY=$(elementID).position().top),$(elementID).focus(),scrollY>$(window).height()/2&&self.find(".cms-content-fields").scrollTop(scrollY)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),$(".cms-edit-form .btn-toolbar input.action[type=submit], .cms-edit-form .btn-toolbar button.action").entwine({onclick:function(e){return this.hasClass("gridfield-button-delete")&&!confirm(_i18n2["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?(e.preventDefault(),!1):(this.is(":disabled")||this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),$(".cms-edit-form .btn-toolbar input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .btn-toolbar button.action.ss-ui-action-cancel").entwine({onclick:function(e){window.history.length>1?window.history.back():this.parents("form").trigger("submit",[this]),e.preventDefault()}}),$(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var tabs=this.find("> ul:first");1==tabs.children("li").length&&tabs.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}})});var errorMessage=function(text){jQuery.noticeAdd({text:text,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{i18n:"i18n",jQuery:"jQuery"}],7:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms-description-toggle").entwine({onadd:function(){var shown=!1,fieldId=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),$trigger=this.find(".cms-description-trigger"),$description=this.find(".description");this.hasClass("description-toggle-enabled")||(0===$trigger.length&&($trigger=this.find(".middleColumn").first().after('').next()),this.addClass("description-toggle-enabled"),$trigger.on("click",function(){$description[shown?"hide":"show"](),shown=!shown}),$description.hide())}})})},{jQuery:"jQuery"}],8:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var descriptionEl=this.find(".description");descriptionEl.length&&(this.attr("title",descriptionEl.text()).tooltip({content:descriptionEl.html()}),descriptionEl.remove())}}),$(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},{jQuery:"jQuery"}],9:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].fn.layout.defaults.resize=!1,jLayout="undefined"==typeof jLayout?{}:jLayout,jLayout.threeColumnCompressor=function(spec,options){function typeLayout(type){var func=type+"Size";return function(container){var menuSize=menu[func](),contentSize=content[func](),previewSize=preview[func](),insets=container.insets();return width=menuSize.width+contentSize.width+previewSize.width,height=Math.max(menuSize.height,contentSize.height,previewSize.height),{width:insets.left+insets.right+width,height:insets.top+insets.bottom+height}}}if("undefined"==typeof spec.menu||"undefined"==typeof spec.content||"undefined"==typeof spec.preview)throw'Spec is invalid. Please provide "menu", "content" and "preview" elements.';if("undefined"==typeof options.minContentWidth||"undefined"==typeof options.minPreviewWidth||"undefined"==typeof options.mode)throw'Spec is invalid. Please provide "minContentWidth", "minPreviewWidth", "mode"';if("split"!==options.mode&&"content"!==options.mode&&"preview"!==options.mode)throw'Spec is invalid. "mode" should be either "split", "content" or "preview"';var obj={options:options},menu=_jQuery2["default"].jLayoutWrap(spec.menu),content=_jQuery2["default"].jLayoutWrap(spec.content),preview=_jQuery2["default"].jLayoutWrap(spec.preview);return obj.layout=function(container){var size=container.bounds(),insets=container.insets(),top=insets.top,bottom=size.height-insets.bottom,left=insets.left,right=size.width-insets.right,menuWidth=spec.menu.width(),contentWidth=0,previewWidth=0;"preview"===this.options.mode?(contentWidth=0,previewWidth=right-left-menuWidth):"content"===this.options.mode?(contentWidth=right-left-menuWidth,previewWidth=0):(contentWidth=(right-left-menuWidth)/2,previewWidth=right-left-(menuWidth+contentWidth),contentWidth').fadeIn(),par.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return $("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var persistedState,cookieValue;return void 0!==$.cookie&&(cookieValue=$.cookie("cms-menu-sticky"),void 0!==cookieValue&&null!==cookieValue&&(persistedState="true"===cookieValue)),persistedState},setPersistedStickyState:function(isSticky){void 0!==$.cookie&&$.cookie("cms-menu-sticky",isSticky,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var shouldCollapse,manualState=this.getPersistedCollapsedState(),menuIsSticky=$(".cms-menu").getPersistedStickyState(),automaticState=this.siteTreePresent();return shouldCollapse=void 0===manualState?automaticState:manualState!==automaticState&&menuIsSticky?manualState:automaticState},onadd:function(){var self=this;setTimeout(function(){self.togglePanel(!self.getEvaluatedCollapsedState(),!1,!1)},0),$(window).on("ajaxComplete",function(e){setTimeout(function(){self.togglePanel(!self.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),$(".cms-menu-list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(xhr){var controller=xhr.getResponseHeader("X-Controller");if(controller){var item=this.find("li#Menu-"+controller.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));item.hasClass("current")||item.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,data){this.updateMenuFromResponse(data.xhr)},onaftersubmitform:function(e,data){this.updateMenuFromResponse(data.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,data){this.updateMenuFromResponse(data.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(e){this.toggleClass("collapsed",$(e.target).hasClass("collapsed")),$(".cms-container").trigger("windowresize"),this.hasClass("collapsed")&&this.find("li.children.opened").removeClass("opened"),this.hasClass("collapsed")||$(".toggle-children.opened").closest("li").addClass("opened")}},updateItems:function(){var editPageItem=this.find("#Menu-CMSMain");editPageItem[editPageItem.is(".current")?"show":"hide"]();var currentID=$(".cms-content input[name=ID]").val();currentID&&this.find("li").each(function(){$.isFunction($(this).setRecordID)&&$(this).setRecordID(currentID)})}}),$(".cms-menu-list li").entwine({toggleFlyout:function(bool){var fly=$(this);if(fly.children("ul").first().hasClass("collapsed-flyout"))if(bool){if(!fly.children("ul").first().children("li").first().hasClass("clone")){var li=fly.clone();li.addClass("clone").css({}),li.children("ul").first().remove(),li.find("span").not(".text").remove(),li.find("a").first().unbind("click"),fly.children("ul").prepend(li)}$(".collapsed-flyout").show(),fly.addClass("opened"),fly.children("ul").find("li").fadeIn("fast")}else li&&li.remove(),$(".collapsed-flyout").hide(),fly.removeClass("opened"),fly.find("toggle-children").removeClass("opened"),fly.children("ul").find("li").hide()}}),$(".cms-menu-list li").hoverIntent(function(){$(this).toggleFlyout(!0)},function(){$(this).toggleFlyout(!1)}),$(".cms-menu-list .toggle").entwine({onclick:function(e){e.preventDefault(),$(this).toogleFlyout(!0)}}),$(".cms-menu-list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append(''),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var parent=this.getMenuItem();parent&&parent.open(),this.find("li.clone")&&this.find("li.clone").remove(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened"); -},select:function(){var parent=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),parent){var parentSiblings=parent.siblings();parent.addClass("current"),parentSiblings.removeClass("current").close(),parentSiblings.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),$(".cms-menu-list *").entwine({getMenu:function(){return this.parents(".cms-menu-list:first")}}),$(".cms-menu-list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),$(".cms-menu-list li a").entwine({onclick:function(e){var isExternal=$.path.isExternal(this.attr("href"));if(!(e.which>1||isExternal)&&"_blank"!=this.attr("target")){e.preventDefault();var item=this.getMenuItem(),url=this.attr("href");isExternal||(url=$("base").attr("href")+url);var children=item.find("li");children.length?children.first().find("a").click():document.location.href=url,item.select()}}}),$(".cms-menu-list li .toggle-children").entwine({onclick:function(e){var li=this.closest("li");return li.toggle(),!1}}),$(".cms .profile-link").entwine({onclick:function(){return $(".cms-container").loadPanel(this.attr("href")),$(".cms-menu-list li").removeClass("current").close(),!1}}),$(".cms-menu .sticky-toggle").entwine({onadd:function(){var isSticky=!!$(".cms-menu").getPersistedStickyState();this.toggleCSS(isSticky),this.toggleIndicator(isSticky),this._super()},toggleCSS:function(isSticky){this[isSticky?"addClass":"removeClass"]("active")},toggleIndicator:function(isSticky){this.next(".sticky-status-indicator").text(isSticky?"fixed":"auto")},onclick:function(){var $menu=this.closest(".cms-menu"),persistedCollapsedState=$menu.getPersistedCollapsedState(),persistedStickyState=$menu.getPersistedStickyState(),newStickyState=void 0===persistedStickyState?!this.hasClass("active"):!persistedStickyState;void 0===persistedCollapsedState?$menu.setPersistedCollapsedState($menu.hasClass("collapsed")):void 0!==persistedCollapsedState&&newStickyState===!1&&$menu.clearPersistedCollapsedState(),$menu.setPersistedStickyState(newStickyState),this.toggleCSS(newStickyState),this.toggleIndicator(newStickyState),this._super()}})})},{jQuery:"jQuery"}],11:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$.entwine.warningLevel=$.entwine.WARN_LEVEL_BESTPRACTISE,$(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==$.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var isCollapsed,cookieValue;return this.canSetCookie()&&(cookieValue=$.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==cookieValue&&null!==cookieValue&&(isCollapsed="true"===cookieValue)),isCollapsed},setPersistedCollapsedState:function(newState){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),newState,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var isCollapsed=this.getPersistedCollapsedState();return void 0===isCollapsed&&(isCollapsed=this.hasClass("collapsed")),isCollapsed},onadd:function(){var collapsedContent,container;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(container=$("
").append('»').append('«'),this.append(container)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),collapsedContent=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(collapsedContent.length?collapsedContent.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(doExpand,silent,doSaveState){var newWidth,collapsedContent;silent||(this.trigger("beforetoggle.sspanel",doExpand),this.trigger(doExpand?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!doExpand),newWidth=doExpand?this.getWidthExpanded():this.getWidthCollapsed(),this.width(newWidth),collapsedContent=this.find(".cms-panel-content-collapsed"),collapsedContent.length&&(this.find(".cms-panel-content")[doExpand?"show":"hide"](),this.find(".cms-panel-content-collapsed")[doExpand?"hide":"show"]()),doSaveState!==!1&&this.setPersistedCollapsedState(!doExpand),this.trigger("toggle",doExpand),this.trigger(doExpand?"expand":"collapse")},expandPanel:function(force){(force||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(force){!force&&this.hasClass("collapsed")||this.togglePanel(!1)}}),$(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),$(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),$(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),$(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),$(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},{jQuery:"jQuery"}],12:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss.preview",function($){$(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(stateName,save){var self=this,states=this._getNavigatorStates();return save!==!1&&$.each(states,function(index,state){self.saveState("state",stateName)}),this.setCurrentStateName(stateName),this._loadCurrentState(),this.redraw(),this},changeMode:function(modeName,save){var container=$(".cms-container");if("split"==modeName)container.entwine(".ss").splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==modeName)container.entwine(".ss").contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=modeName)throw"Invalid mode: "+modeName;container.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return save!==!1&&this.saveState("mode",modeName),this.redraw(),this},changeSize:function(sizeName){var sizes=this.getSizes();return this.setCurrentSizeName(sizeName),this.removeClass("auto desktop tablet mobile").addClass(sizeName),this.find(".preview-device-outer").width(sizes[sizeName].width).height(sizes[sizeName].height),this.find(".preview-device-inner").width(sizes[sizeName].width),this.saveState("size",sizeName),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var currentStateName=this.getCurrentStateName();currentStateName&&this.find(".cms-preview-states").changeVisibleState(currentStateName);var layoutOptions=$(".cms-container").entwine(".ss").getLayoutOptions();layoutOptions&&$(".preview-mode-selector").changeVisibleMode(layoutOptions.mode);var currentSizeName=this.getCurrentSizeName();return currentSizeName&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(name,value){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+name,value)},loadState:function(name){return this._supportsLocalStorage()?window.localStorage.getItem("cms-preview-state-"+name):void 0},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),$.browser.msie&&$.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var style=$("#FontFixStyleElement");return style.length||(style=$('').appendTo("head")),style},onadd:function(){var self=this,iframe=(this.parent(),this.find("iframe"));iframe.addClass("center"),iframe.bind("load",function(){self._adjustIframeForPreview(),self._loadCurrentPage(),$(this).removeClass("loading")}),$.browser.msie&&8===parseInt($.browser.version,10)&&iframe.bind("readystatechange",function(e){"interactive"==iframe[0].readyState&&(self.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){self.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this.append('
'),this.find(".cms-preview-overlay").hide(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var storage,result,uid=new Date;try{return(storage=window.localStorage).setItem(uid,uid),result=storage.getItem(uid)==uid,storage.removeItem(uid),result&&storage}catch(exception){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function(){var $viewModeSelector=$(".preview-mode-selector");$viewModeSelector.removeClass("split-disabled"),$viewModeSelector.find(".disabled-tooltip").hide()},ondisable:function(){var $viewModeSelector=$(".preview-mode-selector");$viewModeSelector.addClass("split-disabled"),$viewModeSelector.find(".disabled-tooltip").show()},_block:function(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var mode,size;return $(".cms-previewable").length?(mode=this.loadState("mode"),size=this.loadState("size"),this._moveNavigator(),mode&&"content"==mode||(this.enablePreview(),this._loadCurrentState()),this.redraw(),mode&&this.changeMode(mode),size&&this.changeSize(size)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,data){data.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var url=this.getPendingURL();url&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(url),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(url){return this.find("iframe").addClass("loading").attr("src",url),this},_getNavigatorStates:function(){var urlMap=$.map(this.getAllowedStates(),function(name){var stateLink=$(".cms-preview-states .state-name[data-name="+name+"]");return stateLink.length?{name:name,url:stateLink.attr("href"),active:stateLink.hasClass("active")}:null});return urlMap},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var states=this._getNavigatorStates(),currentStateName=this.getCurrentStateName(),currentState=null;states&&(currentState=$.grep(states,function(state,index){return currentStateName===state.name||!currentStateName&&state.active}));var url=null;return currentState[0]?url=currentState[0].url:states.length?(this.setCurrentStateName(states[0].name),url=states[0].url):this.setCurrentStateName(null),url&&(url+=(-1===url.indexOf("?")?"?":"&")+"CMSPreview=1"),this.is(".column-hidden")?(this.setPendingURL(url),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),url?(this._loadUrl(url),this._unblock()):this._block()),this},_moveNavigator:function(){var previewEl=$(".cms-preview .cms-preview-controls"),navigatorEl=$(".cms-edit-form .cms-navigator");navigatorEl.length&&previewEl.length?previewEl.html($(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var doc;$(".cms-container");try{doc=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(doc){var id=$(doc).find("meta[name=x-page-id]").attr("content"),editLink=$(doc).find("meta[name=x-cms-edit-link]").attr("content"),contentPanel=$(".cms-content");id&&contentPanel.find(":input[name=ID]").val()!=id&&$(".cms-container").entwine(".ss").loadPanel(editLink)}}},_adjustIframeForPreview:function(){var doc,iframe=this.find("iframe")[0];if(iframe){try{doc=iframe.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(doc){for(var links=doc.getElementsByTagName("A"),i=0;i'):this.parent().append('')}}),$(".preview-device-outer").entwine({onclick:function(){this.toggleClass("rotate")}})})},{i18n:"i18n",jQuery:"jQuery"}],13:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss.tree",function($){$(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!$.isNumeric(this.data("jstree_instance_id"))){var hints=this.attr("data-hints");hints&&this.setHints($.parseJSON(hints));var self=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(e,data){self.setIsLoaded(!0),data.inst._set_settings({html_data:{ajax:{url:self.data("urlTree"),data:function(node){var params=self.data("searchparams")||[];return params=$.grep(params,function(n,i){return"ID"!=n.name&&"value"!=n.name}),params.push({name:"ID",value:$(node).data("id")?$(node).data("id"):0}),params.push({name:"ajax",value:1}),params}}}}),self.updateFromEditForm(),self.css("visibility","visible"),data.inst.hide_checkboxes()}).bind("before.jstree",function(e,data){if("start_drag"==data.func&&(!self.hasClass("draggable")||self.hasClass("multiselect")))return e.stopImmediatePropagation(),!1;if($.inArray(data.func,["check_node","uncheck_node"])){var node=$(data.args[0]).parents("li:first"),allowedChildren=node.find("li:not(.disabled)");if(node.hasClass("disabled")&&0==allowedChildren)return e.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(e,data){if(!self.getIsUpdatingTree()){var movedNode=data.rslt.o,newParentNode=data.rslt.np,newParentID=(data.inst._get_parent(movedNode),$(newParentNode).data("id")||0),nodeID=$(movedNode).data("id"),siblingIDs=$.map($(movedNode).siblings().andSelf(),function(el){return $(el).data("id")});$.ajax({url:$.path.addSearchParams(self.data("urlSavetreenode"),self.data("extraParams")),type:"POST",data:{ID:nodeID,ParentID:newParentID,SiblingIDs:siblingIDs},success:function(){$(".cms-edit-form :input[name=ID]").val()==nodeID&&$(".cms-edit-form :input[name=ParentID]").val(newParentID),self.updateNodesFromServer([nodeID])},statusCode:{403:function(){$.jstree.rollback(data.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(e,data){$(document).triggerHandler(e,data)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(e){var id=$(".cms-edit-form :input[name=ID]").val();this.updateNodesFromServer([id])}},getTreeConfig:function(){var self=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(data){var movedNode=$(data.o),newParent=$(data.np),isMovedOntoContainer=data.ot.get_container()[0]==data.np[0],movedNodeClass=movedNode.getClassname(),newParentClass=newParent.getClassname(),hints=self.getHints(),disallowedChildren=[],hintKey=newParentClass?newParentClass:"Root",hint=hints&&"undefined"!=typeof hints[hintKey]?hints[hintKey]:null;hint&&movedNode.attr("class").match(/VirtualPage-([^\s]*)/)&&(movedNodeClass=RegExp.$1),hint&&(disallowedChildren="undefined"!=typeof hint.disallowedChildren?hint.disallowedChildren:[]);var isAllowed=!(0===movedNode.data("id")||movedNode.hasClass("status-archived")||isMovedOntoContainer&&"inside"!=data.p||newParent.hasClass("nochildren")||disallowedChildren.length&&-1!=$.inArray(movedNodeClass,disallowedChildren));return isAllowed}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:$("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(params,callback){params?this.data("searchparams",params):this.removeData("searchparams"),this.jstree("refresh",-1,callback)},getNodeByID:function(id){return this.find("*[data-id="+id+"]")},createNode:function(html,data,callback){var self=this,parentNode=void 0!==data.ParentID?self.getNodeByID(data.ParentID):!1,newNode=$(html),properties={data:""};newNode.hasClass("jstree-open")?properties.state="open":newNode.hasClass("jstree-closed")&&(properties.state="closed"),this.jstree("create_node",parentNode.length?parentNode:-1,"last",properties,function(node){for(var origClasses=node.attr("class"),i=0;i399?"bad":"good",ignoredMessages=["OK","success","HTTP/2.0 200"];return null===url||isSameUrl(origUrl,url)&&isSameUrl(destUrl,url)||window.ss.router.show(url,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:xhr.getResponseHeader("X-Pjax")?xhr.getResponseHeader("X-Pjax"):settings.headers["X-Pjax"]}),xhr.getResponseHeader("X-Reauthenticate")?void $(".cms-container").showLoginDialog():(0!==xhr.status&&msg&&-1===$.inArray(msg,ignoredMessages)&&statusMessage(decodeURIComponent(msg),msgType),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('

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

').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),void this._super())},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},"from .cms-menu-list li a":{onclick:function(e){var href=$(e.target).attr("href");e.which>1||href==this._tabStateUrl()||this.splitViewMode()}},updateLayoutOptions:function(newSpec){var spec=this.getLayoutOptions(),dirty=!1;for(var k in newSpec)spec[k]!==newSpec[k]&&(spec[k]=newSpec[k],dirty=!0);dirty&&this.redraw()},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.data("jlayout",jLayout.threeColumnCompressor({menu:this.children(".cms-menu"),content:this.children(".cms-content"),preview:this.children(".cms-preview")},this.getLayoutOptions())),this.layout(),this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())},checkCanNavigate:function(selectors){var contentEls=this._findFragments(selectors||["Content"]),trackedEls=contentEls.find(":data(changetracker)").add(contentEls.filter(":data(changetracker)")),safe=!0;return trackedEls.length?(trackedEls.each(function(){$(this).confirmUnsavedChanges()||(safe=!1)}),safe):!0},loadPanel:function(url){var data=(arguments.length<=1||void 0===arguments[1]?"":arguments[1],arguments.length<=2||void 0===arguments[2]?{}:arguments[2]),forceReload=arguments[3],forceReferer=arguments.length<=4||void 0===arguments[4]?document.URL:arguments[4];this.checkCanNavigate(data.pjax?data.pjax.split(","):["Content"])&&(this.saveTabState(),data.__forceReferer=forceReferer,forceReload&&(data.__forceReload=Math.random()),window.ss.router.show(url,data))},reloadCurrentPanel:function(){this.loadPanel(document.URL,null,null,!0)},submitForm:function(form,button,callback,ajaxOptions){var self=this;button||(button=this.find(".btn-toolbar :submit[name=action_save]")),button||(button=this.find(".btn-toolbar :submit:first")),form.trigger("beforesubmitform"),this.trigger("submitform",{form:form,button:button}),$(button).addClass("loading");var validationResult=form.validate();if("undefined"!=typeof validationResult&&!validationResult)return statusMessage("Validation failed.","bad"),$(button).removeClass("loading"),!1;var formData=form.serializeArray();return formData.push({name:$(button).attr("name"),value:"1"}),formData.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:form.attr("action"),data:formData,type:"POST",complete:function(){$(button).removeClass("loading")},success:function(data,status,xhr){form.removeClass("changed"),callback&&callback(data,status,xhr);var newContentEls=self.handleAjaxResponse(data,status,xhr);newContentEls&&newContentEls.filter("form").trigger("aftersubmitform",{status:status,xhr:xhr,formData:formData})}},ajaxOptions)),!1},LastState:null,PauseState:!1,handleStateChange:function(event){var historyState=arguments.length<=1||void 0===arguments[1]?window.history.state:arguments[1];if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var self=this,fragments=historyState.pjax||"Content",headers={},fragmentsArr=fragments.split(","),contentEls=this._findFragments(fragmentsArr);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){var lastState=this.getLastState();return this.setPauseState(!0),lastState&&lastState.path?window.ss.router.show(lastState.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(historyState),contentEls.length=0})),newContentEl.removeClass(layoutClasses.join(" ")).addClass(origLayoutClasses.join(" ")),origStyle&&newContentEl.attr("style",origStyle);var styles=newContentEl.find("style").detach();styles.length&&$(document).find("head").append(styles),contentEl.replaceWith(newContentEl),!origParent.is(".cms-container")&&origParentLayoutApplied&&origParent.layout()});var newForm=newContentEls.filter("form");newForm.hasClass("cms-tabset")&&newForm.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(state&&"undefined"!=typeof state.tabState?state.tabState:null),newContentEls}},_findFragments:function(fragments){return $("[data-pjax-fragment]").filter(function(){var i,nodeFragments=$(this).data("pjaxFragment").split(" ");for(i in fragments)if(-1!=$.inArray(fragments[i],nodeFragments))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var selectedTabs=[],url=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(i,el){var id=$(el).attr("id");id&&$(el).data("tabs")&&($(el).data("ignoreTabState")||$(el).getIgnoreTabState()||selectedTabs.push({id:id,selected:$(el).tabs("option","selected")}))}),selectedTabs){var tabsUrl="tabs-"+url;try{window.sessionStorage.setItem(tabsUrl,JSON.stringify(selectedTabs))}catch(err){if(err.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw err}}}},restoreTabState:function(overrideStates){var self=this,url=this._tabStateUrl(),hasSessionStorage="undefined"!=typeof window.sessionStorage&&window.sessionStorage,sessionData=hasSessionStorage?window.sessionStorage.getItem("tabs-"+url):null,sessionStates=sessionData?JSON.parse(sessionData):!1;this.find(".cms-tabset, .ss-tabset").each(function(){var index,tab,tabset=$(this),tabsetId=tabset.attr("id"),forcedTab=tabset.children("ul").children("li.ss-tabs-force-active");tabset.data("tabs")&&(tabset.tabs("refresh"),forcedTab.length?index=forcedTab.first().index():overrideStates&&overrideStates[tabsetId]?(tab=tabset.find(overrideStates[tabsetId].tabSelector),tab.length&&(index=tab.index())):sessionStates&&$.each(sessionStates,function(i,state){tabsetId==state.id&&(index=state.selected)}),null!==index&&(tabset.tabs("option","active",index),self.trigger("tabstaterestored")))})},clearTabState:function(url){if("undefined"!=typeof window.sessionStorage){var s=window.sessionStorage;if(url)s.removeItem("tabs-"+url);else for(var i=0;i'),dialog.attr("id",(new Date).getTime()),dialog.data("url",url),$("body").append(dialog)}}),$(".leftandmain-logindialog").entwine({onmatch:function(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,minHeight:370,maxHeight:400,closeOnEscape:!1,open:function(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")}})},onunmatch:function(){this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(bool){this.is(":visible")?this.close():this.open()},reauthenticate:function(data){"undefined"!=typeof data.SecurityID&&$(":input[name=SecurityID]").val(data.SecurityID),"undefined"!=typeof data.TempID&&$("body").data("member-tempid",data.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function(){this.append('
'),this._super()},onunmatch:function(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()},onremove:function(){this.data("button")&&this.button("destroy"),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var href=this.attr("href"),url=href&&!href.match(/^#/)?href:this.data("href"),data={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(url,null,data),e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$("").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href?href:this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var id="ss-ui-dialog-"+this.getUUID(),dialog=$("#"+id);dialog.length||(dialog=$('
'),$("body").append(dialog));var extraClass=this.data("popupclass")?this.data("popupclass"):"";return dialog.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:extraClass}),!1}}),$(".cms-content .btn-toolbar").entwine({onmatch:function(){this.find(".ss-ui-button").click(function(){var form=this.form;form&&(form.clickedButton=this,setTimeout(function(){form.clickedButton=null},10))}),this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove(),this.find(".ss-ui-button").each(function(){$(this).data("button")||$(this).button()}),this.find(".ss-ui-buttonset").buttonset()}}),$(".cms .field.date input.text").entwine({onmatch:function(){var holder=$(this).parents(".field.date:first"),config=holder.data();return config.showcalendar?(config.showOn="button",config.locale&&$.datepicker.regional[config.locale]&&(config=$.extend(config,$.datepicker.regional[config.locale],{})),$(this).datepicker(config),void this._super()):void this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){return this.is(".no-chosen")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),void this._super())},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .ss-gridfield").entwine({showDetailView:function(url){var params=window.location.search.replace(/^\?/,"");params&&(url=$.path.addSearchParams(url,params)),$(".cms-container").loadPanel(url)}}),$(".cms-search-form").entwine({onsubmit:function(e){var nonEmptyInputs,url;nonEmptyInputs=this.find(":input:not(:submit)").filter(function(){var vals=$.grep($(this).fieldValue(),function(val){return val});return vals.length}),url=this.attr("action"),nonEmptyInputs.length&&(url=$.path.addSearchParams(url,nonEmptyInputs.serialize().replace("+","%20")));var container=this.closest(".cms-container");return container.find(".cms-edit-form").tabs("select",0),container.loadPanel(url,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var form=$(this).parents("form");form.clearForm(),form.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),form.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var self=this,url=this.data("url");if(!url)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[url]?(this.addClass("loading"),$.ajax({url:url,complete:function(){self.removeClass("loading")},success:function(data,status,xhr){self.html(data)}})):this.html(window._panelDeferredCache[url]))}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var activeTab=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("uiTabs")||this.tabs({active:-1!=activeTab.index()?activeTab.index():0,beforeLoad:function(e,ui){return!1},activate:function(e,ui){var actions=$(this).closest("form").find(".btn-toolbar");$(ui.newTab).closest("li").hasClass("readonly")?actions.fadeOut():actions.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var matches=$(this).attr("href").match(/#.*/);matches&&$(this).attr("href",document.location.href.replace(/#.*/,"")+matches[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var self=this,$filters=$(".cms-content-filters").first(),collapsed=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),$filters[collapsed?"slideDown":"slideUp"]({complete:function(){self.data("collapsed",!collapsed),self.data("animating",!1)}}))},onclick:function(){this.showHide()}})});var statusMessage=function(text,type){text=jQuery("
").text(text).html(),jQuery.noticeAdd({text:text,type:type,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{jQuery:"jQuery"}]},{},[1]); +},select:function(){var parent=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),parent){var parentSiblings=parent.siblings();parent.addClass("current"),parentSiblings.removeClass("current").close(),parentSiblings.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),$(".cms-menu-list *").entwine({getMenu:function(){return this.parents(".cms-menu-list:first")}}),$(".cms-menu-list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),$(".cms-menu-list li a").entwine({onclick:function(e){var isExternal=$.path.isExternal(this.attr("href"));if(!(e.which>1||isExternal)&&"_blank"!=this.attr("target")){e.preventDefault();var item=this.getMenuItem(),url=this.attr("href");isExternal||(url=$("base").attr("href")+url);var children=item.find("li");children.length?children.first().find("a").click():document.location.href=url,item.select()}}}),$(".cms-menu-list li .toggle-children").entwine({onclick:function(e){var li=this.closest("li");return li.toggle(),!1}}),$(".cms .profile-link").entwine({onclick:function(){return $(".cms-container").loadPanel(this.attr("href")),$(".cms-menu-list li").removeClass("current").close(),!1}}),$(".cms-menu .sticky-toggle").entwine({onadd:function(){var isSticky=!!$(".cms-menu").getPersistedStickyState();this.toggleCSS(isSticky),this.toggleIndicator(isSticky),this._super()},toggleCSS:function(isSticky){this[isSticky?"addClass":"removeClass"]("active")},toggleIndicator:function(isSticky){this.next(".sticky-status-indicator").text(isSticky?"fixed":"auto")},onclick:function(){var $menu=this.closest(".cms-menu"),persistedCollapsedState=$menu.getPersistedCollapsedState(),persistedStickyState=$menu.getPersistedStickyState(),newStickyState=void 0===persistedStickyState?!this.hasClass("active"):!persistedStickyState;void 0===persistedCollapsedState?$menu.setPersistedCollapsedState($menu.hasClass("collapsed")):void 0!==persistedCollapsedState&&newStickyState===!1&&$menu.clearPersistedCollapsedState(),$menu.setPersistedStickyState(newStickyState),this.toggleCSS(newStickyState),this.toggleIndicator(newStickyState),this._super()}})})},{jQuery:"jQuery"}],11:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$.entwine.warningLevel=$.entwine.WARN_LEVEL_BESTPRACTISE,$(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==$.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var isCollapsed,cookieValue;return this.canSetCookie()&&(cookieValue=$.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==cookieValue&&null!==cookieValue&&(isCollapsed="true"===cookieValue)),isCollapsed},setPersistedCollapsedState:function(newState){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),newState,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&$.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var isCollapsed=this.getPersistedCollapsedState();return void 0===isCollapsed&&(isCollapsed=this.hasClass("collapsed")),isCollapsed},onadd:function(){var collapsedContent,container;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(container=$("
").append('»').append('«'),this.append(container)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),collapsedContent=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(collapsedContent.length?collapsedContent.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(doExpand,silent,doSaveState){var newWidth,collapsedContent;silent||(this.trigger("beforetoggle.sspanel",doExpand),this.trigger(doExpand?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!doExpand),newWidth=doExpand?this.getWidthExpanded():this.getWidthCollapsed(),this.width(newWidth),collapsedContent=this.find(".cms-panel-content-collapsed"),collapsedContent.length&&(this.find(".cms-panel-content")[doExpand?"show":"hide"](),this.find(".cms-panel-content-collapsed")[doExpand?"hide":"show"]()),doSaveState!==!1&&this.setPersistedCollapsedState(!doExpand),this.trigger("toggle",doExpand),this.trigger(doExpand?"expand":"collapse")},expandPanel:function(force){(force||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(force){!force&&this.hasClass("collapsed")||this.togglePanel(!1)}}),$(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),$(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),$(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),$(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),$(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},{jQuery:"jQuery"}],12:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss.preview",function($){$(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(stateName,save){var self=this,states=this._getNavigatorStates();return save!==!1&&$.each(states,function(index,state){self.saveState("state",stateName)}),this.setCurrentStateName(stateName),this._loadCurrentState(),this.redraw(),this},changeMode:function(modeName,save){var container=$(".cms-container");if("split"==modeName)container.entwine(".ss").splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==modeName)container.entwine(".ss").contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=modeName)throw"Invalid mode: "+modeName;container.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return save!==!1&&this.saveState("mode",modeName),this.redraw(),this},changeSize:function(sizeName){var sizes=this.getSizes();return this.setCurrentSizeName(sizeName),this.removeClass("auto desktop tablet mobile").addClass(sizeName),this.find(".preview-device-outer").width(sizes[sizeName].width).height(sizes[sizeName].height),this.find(".preview-device-inner").width(sizes[sizeName].width),this.saveState("size",sizeName),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var currentStateName=this.getCurrentStateName();currentStateName&&this.find(".cms-preview-states").changeVisibleState(currentStateName);var layoutOptions=$(".cms-container").entwine(".ss").getLayoutOptions();layoutOptions&&$(".preview-mode-selector").changeVisibleMode(layoutOptions.mode);var currentSizeName=this.getCurrentSizeName();return currentSizeName&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(name,value){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+name,value)},loadState:function(name){return this._supportsLocalStorage()?window.localStorage.getItem("cms-preview-state-"+name):void 0},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),$.browser.msie&&$.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var style=$("#FontFixStyleElement");return style.length||(style=$('').appendTo("head")),style},onadd:function(){var self=this,iframe=(this.parent(),this.find("iframe"));iframe.addClass("center"),iframe.bind("load",function(){self._adjustIframeForPreview(),self._loadCurrentPage(),$(this).removeClass("loading")}),$.browser.msie&&8===parseInt($.browser.version,10)&&iframe.bind("readystatechange",function(e){"interactive"==iframe[0].readyState&&(self.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){self.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this.append('
'),this.find(".cms-preview-overlay").hide(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var storage,result,uid=new Date;try{return(storage=window.localStorage).setItem(uid,uid),result=storage.getItem(uid)==uid,storage.removeItem(uid),result&&storage}catch(exception){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function(){var $viewModeSelector=$(".preview-mode-selector");$viewModeSelector.removeClass("split-disabled"),$viewModeSelector.find(".disabled-tooltip").hide()},ondisable:function(){var $viewModeSelector=$(".preview-mode-selector");$viewModeSelector.addClass("split-disabled"),$viewModeSelector.find(".disabled-tooltip").show()},_block:function(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var mode,size;return $(".cms-previewable").length?(mode=this.loadState("mode"),size=this.loadState("size"),this._moveNavigator(),mode&&"content"==mode||(this.enablePreview(),this._loadCurrentState()),this.redraw(),mode&&this.changeMode(mode),size&&this.changeSize(size)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,data){data.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var url=this.getPendingURL();url&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(url),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(url){return this.find("iframe").addClass("loading").attr("src",url),this},_getNavigatorStates:function(){var urlMap=$.map(this.getAllowedStates(),function(name){var stateLink=$(".cms-preview-states .state-name[data-name="+name+"]");return stateLink.length?{name:name,url:stateLink.attr("href"),active:stateLink.hasClass("active")}:null});return urlMap},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var states=this._getNavigatorStates(),currentStateName=this.getCurrentStateName(),currentState=null;states&&(currentState=$.grep(states,function(state,index){return currentStateName===state.name||!currentStateName&&state.active}));var url=null;return currentState[0]?url=currentState[0].url:states.length?(this.setCurrentStateName(states[0].name),url=states[0].url):this.setCurrentStateName(null),url&&(url+=(-1===url.indexOf("?")?"?":"&")+"CMSPreview=1"),this.is(".column-hidden")?(this.setPendingURL(url),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),url?(this._loadUrl(url),this._unblock()):this._block()),this},_moveNavigator:function(){var previewEl=$(".cms-preview .cms-preview-controls"),navigatorEl=$(".cms-edit-form .cms-navigator");navigatorEl.length&&previewEl.length?previewEl.html($(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var doc;$(".cms-container");try{doc=this.find("iframe")[0].contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(doc){var id=$(doc).find("meta[name=x-page-id]").attr("content"),editLink=$(doc).find("meta[name=x-cms-edit-link]").attr("content"),contentPanel=$(".cms-content");id&&contentPanel.find(":input[name=ID]").val()!=id&&$(".cms-container").entwine(".ss").loadPanel(editLink)}}},_adjustIframeForPreview:function(){var doc,iframe=this.find("iframe")[0];if(iframe){try{doc=iframe.contentDocument}catch(e){console.warn("Unable to access iframe, possible https mis-match")}if(doc){for(var links=doc.getElementsByTagName("A"),i=0;i
'):this.parent().append('')}}),$(".preview-device-outer").entwine({onclick:function(){this.toggleClass("rotate")}})})},{i18n:"i18n",jQuery:"jQuery"}],13:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss.tree",function($){$(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!$.isNumeric(this.data("jstree_instance_id"))){var hints=this.attr("data-hints");hints&&this.setHints($.parseJSON(hints));var self=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(e,data){self.setIsLoaded(!0),data.inst._set_settings({html_data:{ajax:{url:self.data("urlTree"),data:function(node){var params=self.data("searchparams")||[];return params=$.grep(params,function(n,i){return"ID"!=n.name&&"value"!=n.name}),params.push({name:"ID",value:$(node).data("id")?$(node).data("id"):0}),params.push({name:"ajax",value:1}),params}}}}),self.updateFromEditForm(),self.css("visibility","visible"),data.inst.hide_checkboxes()}).bind("before.jstree",function(e,data){if("start_drag"==data.func&&(!self.hasClass("draggable")||self.hasClass("multiselect")))return e.stopImmediatePropagation(),!1;if($.inArray(data.func,["check_node","uncheck_node"])){var node=$(data.args[0]).parents("li:first"),allowedChildren=node.find("li:not(.disabled)");if(node.hasClass("disabled")&&0==allowedChildren)return e.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(e,data){if(!self.getIsUpdatingTree()){var movedNode=data.rslt.o,newParentNode=data.rslt.np,newParentID=(data.inst._get_parent(movedNode),$(newParentNode).data("id")||0),nodeID=$(movedNode).data("id"),siblingIDs=$.map($(movedNode).siblings().andSelf(),function(el){return $(el).data("id")});$.ajax({url:$.path.addSearchParams(self.data("urlSavetreenode"),self.data("extraParams")),type:"POST",data:{ID:nodeID,ParentID:newParentID,SiblingIDs:siblingIDs},success:function(){$(".cms-edit-form :input[name=ID]").val()==nodeID&&$(".cms-edit-form :input[name=ParentID]").val(newParentID),self.updateNodesFromServer([nodeID])},statusCode:{403:function(){$.jstree.rollback(data.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(e,data){$(document).triggerHandler(e,data)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(e){var id=$(".cms-edit-form :input[name=ID]").val();this.updateNodesFromServer([id])}},getTreeConfig:function(){var self=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(data){var movedNode=$(data.o),newParent=$(data.np),isMovedOntoContainer=data.ot.get_container()[0]==data.np[0],movedNodeClass=movedNode.getClassname(),newParentClass=newParent.getClassname(),hints=self.getHints(),disallowedChildren=[],hintKey=newParentClass?newParentClass:"Root",hint=hints&&"undefined"!=typeof hints[hintKey]?hints[hintKey]:null;hint&&movedNode.attr("class").match(/VirtualPage-([^\s]*)/)&&(movedNodeClass=RegExp.$1),hint&&(disallowedChildren="undefined"!=typeof hint.disallowedChildren?hint.disallowedChildren:[]);var isAllowed=!(0===movedNode.data("id")||movedNode.hasClass("status-archived")||isMovedOntoContainer&&"inside"!=data.p||newParent.hasClass("nochildren")||disallowedChildren.length&&-1!=$.inArray(movedNodeClass,disallowedChildren));return isAllowed}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:$("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(params,callback){params?this.data("searchparams",params):this.removeData("searchparams"),this.jstree("refresh",-1,callback)},getNodeByID:function(id){return this.find("*[data-id="+id+"]")},createNode:function(html,data,callback){var self=this,parentNode=void 0!==data.ParentID?self.getNodeByID(data.ParentID):!1,newNode=$(html),properties={data:""};newNode.hasClass("jstree-open")?properties.state="open":newNode.hasClass("jstree-closed")&&(properties.state="closed"),this.jstree("create_node",parentNode.length?parentNode:-1,"last",properties,function(node){for(var origClasses=node.attr("class"),i=0;i399?"bad":"good",ignoredMessages=["OK","success","HTTP/2.0 200"];return null===url||isSameUrl(origUrl,url)&&isSameUrl(destUrl,url)||window.ss.router.show(url,{id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:xhr.getResponseHeader("X-Pjax")?xhr.getResponseHeader("X-Pjax"):settings.headers["X-Pjax"]}),xhr.getResponseHeader("X-Reauthenticate")?void $(".cms-container").showLoginDialog():(0!==xhr.status&&msg&&-1===$.inArray(msg,ignoredMessages)&&statusMessage(decodeURIComponent(msg),msgType),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('

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

').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),void this._super())},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},"from .cms-menu-list li a":{onclick:function(e){var href=$(e.target).attr("href");e.which>1||href==this._tabStateUrl()||this.splitViewMode()}},updateLayoutOptions:function(newSpec){var spec=this.getLayoutOptions(),dirty=!1;for(var k in newSpec)spec[k]!==newSpec[k]&&(spec[k]=newSpec[k],dirty=!0);dirty&&this.redraw()},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.data("jlayout",jLayout.threeColumnCompressor({menu:this.children(".cms-menu"),content:this.children(".cms-content"),preview:this.children(".cms-preview")},this.getLayoutOptions())),this.layout(),this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())},checkCanNavigate:function(selectors){var contentEls=this._findFragments(selectors||["Content"]),trackedEls=contentEls.find(":data(changetracker)").add(contentEls.filter(":data(changetracker)")),safe=!0;return trackedEls.length?(trackedEls.each(function(){$(this).confirmUnsavedChanges()||(safe=!1)}),safe):!0},loadPanel:function(url){var data=(arguments.length<=1||void 0===arguments[1]?"":arguments[1],arguments.length<=2||void 0===arguments[2]?{}:arguments[2]),forceReload=arguments[3],forceReferer=arguments.length<=4||void 0===arguments[4]?document.URL:arguments[4];this.checkCanNavigate(data.pjax?data.pjax.split(","):["Content"])&&(this.saveTabState(),data.__forceReferer=forceReferer,forceReload&&(data.__forceReload=1+Math.random()),window.ss.router.show(url,data))},reloadCurrentPanel:function(){this.loadPanel(document.URL,null,null,!0)},submitForm:function(form,button,callback,ajaxOptions){var self=this;button||(button=this.find(".btn-toolbar :submit[name=action_save]")),button||(button=this.find(".btn-toolbar :submit:first")),form.trigger("beforesubmitform"),this.trigger("submitform",{form:form,button:button}),$(button).addClass("loading");var validationResult=form.validate();if("undefined"!=typeof validationResult&&!validationResult)return statusMessage("Validation failed.","bad"),$(button).removeClass("loading"),!1;var formData=form.serializeArray();return formData.push({name:$(button).attr("name"),value:"1"}),formData.push({name:"BackURL",value:document.URL.replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:form.attr("action"),data:formData,type:"POST",complete:function(){$(button).removeClass("loading")},success:function(data,status,xhr){form.removeClass("changed"),callback&&callback(data,status,xhr);var newContentEls=self.handleAjaxResponse(data,status,xhr);newContentEls&&newContentEls.filter("form").trigger("aftersubmitform",{status:status,xhr:xhr,formData:formData})}},ajaxOptions)),!1},LastState:null,PauseState:!1,handleStateChange:function(event){var historyState=arguments.length<=1||void 0===arguments[1]?window.history.state:arguments[1];if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var self=this,fragments=historyState.pjax||"Content",headers={},fragmentsArr=fragments.split(","),contentEls=this._findFragments(fragmentsArr);if(this.setStateChangeCount(this.getStateChangeCount()+1),!this.checkCanNavigate()){var lastState=this.getLastState();return this.setPauseState(!0),lastState&&lastState.path?window.ss.router.show(lastState.path):window.ss.router.back(),void this.setPauseState(!1)}if(this.setLastState(historyState),contentEls.length=0})),newContentEl.removeClass(layoutClasses.join(" ")).addClass(origLayoutClasses.join(" ")),origStyle&&newContentEl.attr("style",origStyle);var styles=newContentEl.find("style").detach();styles.length&&$(document).find("head").append(styles),contentEl.replaceWith(newContentEl),!origParent.is(".cms-container")&&origParentLayoutApplied&&origParent.layout()});var newForm=newContentEls.filter("form");newForm.hasClass("cms-tabset")&&newForm.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(state&&"undefined"!=typeof state.tabState?state.tabState:null),newContentEls}},_findFragments:function(fragments){return $("[data-pjax-fragment]").filter(function(){var i,nodeFragments=$(this).data("pjaxFragment").split(" ");for(i in fragments)if(-1!=$.inArray(fragments[i],nodeFragments))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var selectedTabs=[],url=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(i,el){var id=$(el).attr("id");id&&$(el).data("tabs")&&($(el).data("ignoreTabState")||$(el).getIgnoreTabState()||selectedTabs.push({id:id,selected:$(el).tabs("option","selected")}))}),selectedTabs){var tabsUrl="tabs-"+url;try{window.sessionStorage.setItem(tabsUrl,JSON.stringify(selectedTabs))}catch(err){if(err.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw err}}}},restoreTabState:function(overrideStates){var self=this,url=this._tabStateUrl(),hasSessionStorage="undefined"!=typeof window.sessionStorage&&window.sessionStorage,sessionData=hasSessionStorage?window.sessionStorage.getItem("tabs-"+url):null,sessionStates=sessionData?JSON.parse(sessionData):!1;this.find(".cms-tabset, .ss-tabset").each(function(){var index,tab,tabset=$(this),tabsetId=tabset.attr("id"),forcedTab=tabset.children("ul").children("li.ss-tabs-force-active");tabset.data("tabs")&&(tabset.tabs("refresh"),forcedTab.length?index=forcedTab.first().index():overrideStates&&overrideStates[tabsetId]?(tab=tabset.find(overrideStates[tabsetId].tabSelector),tab.length&&(index=tab.index())):sessionStates&&$.each(sessionStates,function(i,state){tabsetId==state.id&&(index=state.selected)}),null!==index&&(tabset.tabs("option","active",index),self.trigger("tabstaterestored")))})},clearTabState:function(url){if("undefined"!=typeof window.sessionStorage){var s=window.sessionStorage;if(url)s.removeItem("tabs-"+url);else for(var i=0;i
'),dialog.attr("id",(new Date).getTime()),dialog.data("url",url),$("body").append(dialog)}}),$(".leftandmain-logindialog").entwine({onmatch:function(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,minHeight:370,maxHeight:400,closeOnEscape:!1,open:function(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")}})},onunmatch:function(){this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(bool){this.is(":visible")?this.close():this.open()},reauthenticate:function(data){"undefined"!=typeof data.SecurityID&&$(":input[name=SecurityID]").val(data.SecurityID),"undefined"!=typeof data.TempID&&$("body").data("member-tempid",data.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function(){this.append('
'),this._super()},onunmatch:function(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()},onremove:function(){this.data("button")&&this.button("destroy"),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var href=this.attr("href"),url=href&&!href.match(/^#/)?href:this.data("href"),data={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(url,null,data),e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$("").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href?href:this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var id="ss-ui-dialog-"+this.getUUID(),dialog=$("#"+id);dialog.length||(dialog=$('
'),$("body").append(dialog));var extraClass=this.data("popupclass")?this.data("popupclass"):"";return dialog.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:extraClass}),!1}}),$(".cms-content .btn-toolbar").entwine({onmatch:function(){this.find(".ss-ui-button").click(function(){var form=this.form;form&&(form.clickedButton=this,setTimeout(function(){form.clickedButton=null},10))}),this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove(),this.find(".ss-ui-button").each(function(){$(this).data("button")||$(this).button()}),this.find(".ss-ui-buttonset").buttonset()}}),$(".cms .field.date input.text").entwine({onmatch:function(){var holder=$(this).parents(".field.date:first"),config=holder.data();return config.showcalendar?(config.showOn="button",config.locale&&$.datepicker.regional[config.locale]&&(config=$.extend(config,$.datepicker.regional[config.locale],{})),this.prop("disabled")||this.prop("readonly")||$(this).datepicker(config),void this._super()):void this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .form__fieldgroup-item select.dropdown").entwine({onmatch:function(){return this.is(".no-chosen")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chosen").chosen("destroy"),this.siblings(".chosen-container").remove(),applyChosen(this),void this._super())},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .ss-gridfield").entwine({showDetailView:function(url){var params=window.location.search.replace(/^\?/,"");params&&(url=$.path.addSearchParams(url,params)),$(".cms-container").loadPanel(url)}}),$(".cms-search-form").entwine({onsubmit:function(e){var nonEmptyInputs,url;nonEmptyInputs=this.find(":input:not(:submit)").filter(function(){var vals=$.grep($(this).fieldValue(),function(val){return val});return vals.length}),url=this.attr("action"),nonEmptyInputs.length&&(url=$.path.addSearchParams(url,nonEmptyInputs.serialize().replace("+","%20")));var container=this.closest(".cms-container");return container.find(".cms-edit-form").tabs("select",0),container.loadPanel(url,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var form=$(this).parents("form");form.clearForm(),form.find(".dropdown select").prop("selectedIndex",0).trigger("chosen:updated"),form.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var self=this,url=this.data("url");if(!url)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[url]?(this.addClass("loading"),$.ajax({url:url,complete:function(){self.removeClass("loading")},success:function(data,status,xhr){self.html(data)}})):this.html(window._panelDeferredCache[url]))}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var activeTab=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("uiTabs")||this.tabs({active:-1!=activeTab.index()?activeTab.index():0,beforeLoad:function(e,ui){return!1},activate:function(e,ui){var actions=$(this).closest("form").find(".btn-toolbar");$(ui.newTab).closest("li").hasClass("readonly")?actions.fadeOut():actions.show()}}),this.trigger("afterredrawtabs")},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var matches=$(this).attr("href").match(/#.*/);matches&&$(this).attr("href",document.location.href.replace(/#.*/,"")+matches[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var self=this,$filters=$(".cms-content-filters").first(),collapsed=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),$filters[collapsed?"slideDown":"slideUp"]({complete:function(){self.data("collapsed",!collapsed),self.data("animating",!1)}}))},onclick:function(){this.showHide()}})});var statusMessage=function(text,type){text=jQuery("
").text(text).html(),jQuery.noticeAdd({text:text,type:type,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{jQuery:"jQuery"}]},{},[1]); //# sourceMappingURL=bundle-legacy.js.map diff --git a/admin/client/dist/js/bundle-lib.js b/admin/client/dist/js/bundle-lib.js index ca0142e2d..90874bc69 100644 --- a/admin/client/dist/js/bundle-lib.js +++ b/admin/client/dist/js/bundle-lib.js @@ -1,7 +1,7 @@ require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o"),this.options.alternate.text&&this.buttonElement.append(""+this.options.alternate.text+""),this._refreshAlternate()},refresh:function(){_jQuery2["default"].ui.button.prototype.refresh.call(this),this._refreshAlternate()},destroy:function(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),_jQuery2["default"].ui.button.prototype.destroy.call(this)}}),_jQuery2["default"].widget("ssui.ssdialog",_jQuery2["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){_jQuery2["default"].ui.dialog.prototype._create.call(this);var self=this,iframe=(0,_jQuery2["default"])('');iframe.bind("load",function(e){"about:blank"!=(0,_jQuery2["default"])(this).attr("src")&&(iframe.addClass("loaded").show(),self._resizeIframe(),self.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(iframe),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){_jQuery2["default"].ui.dialog.prototype.open.call(this);var self=this,iframe=this.element.children("iframe");!this.options.iframeUrl||iframe.hasClass("loaded")&&!this.options.reloadOnOpen||(iframe.hide(),iframe.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,_jQuery2["default"])(window).bind("resize.ssdialog",function(){self._resizeIframe()})},close:function(){_jQuery2["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,_jQuery2["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function(){var newWidth,newHeight,opts={},iframe=this.element.children("iframe");this.options.widthRatio&&(newWidth=(0,_jQuery2["default"])(window).width()*this.options.widthRatio,this.options.minWidth&&newWidththis.options.maxWidth?opts.width=this.options.maxWidth:opts.width=newWidth),this.options.heightRatio&&(newHeight=(0,_jQuery2["default"])(window).height()*this.options.heightRatio,this.options.minHeight&&newHeightthis.options.maxHeight?opts.height=this.options.maxHeight:opts.height=newHeight),jQuery.isEmptyObject(opts)||(this._setOptions(opts),iframe.attr("width",opts.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),iframe.attr("height",opts.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),_jQuery2["default"].widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var options=this.options,title=options.title||this.originalTitle||" ",titleId=_jQuery2["default"].ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var uiDialogTitlebar=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(options.closeButton){var uiDialogTitlebarClose=(0,_jQuery2["default"])('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).appendTo(uiDialogTitlebar);(this.uiDialogTitlebarCloseText=(0,_jQuery2["default"])("")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose)}(0,_jQuery2["default"])("").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),_jQuery2["default"].extend(_jQuery2["default"].ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)}})},{jQuery:"jQuery"}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={SET_BREADCRUMBS:"SET_BREADCRUMBS"}},{}],6:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.ACTION_TYPES={ADD_FORM:"ADD_FORM",REMOVE_FORM:"REMOVE_FORM",SUBMIT_FORM_FAILURE:"SUBMIT_FORM_FAILURE",SUBMIT_FORM_REQUEST:"SUBMIT_FORM_REQUEST",SUBMIT_FORM_SUCCESS:"SUBMIT_FORM_SUCCESS",UPDATE_FIELD:"UPDATE_FIELD"}},{}],7:[function(require,module,exports){"use strict";function removeForm(formId){return function(dispatch){dispatch({type:_FormActionTypes.ACTION_TYPES.REMOVE_FORM,payload:{formId:formId}})}}function updateField(formId,updates){return function(dispatch){dispatch({type:_FormActionTypes.ACTION_TYPES.UPDATE_FIELD,payload:{formId:formId,updates:updates}})}}function addForm(formState){return function(dispatch){dispatch({type:_FormActionTypes.ACTION_TYPES.ADD_FORM,payload:{formState:formState}})}}function submitForm(submitApi,formId,fieldValues){return function(dispatch){dispatch({type:_FormActionTypes.ACTION_TYPES.SUBMIT_FORM_REQUEST,payload:{formId:formId}}),submitApi(_extends({ID:formId},fieldValues),{"X-Formschema-Request":"state"}).then(function(response){dispatch({type:_FormActionTypes.ACTION_TYPES.SUBMIT_FORM_SUCCESS,payload:{response:response}})})["catch"](function(error){dispatch({type:_FormActionTypes.ACTION_TYPES.SUBMIT_FORM_FAILURE,payload:{formId:formId,error:error}})})}}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i=0?tmp.width:0),"number"==typeof value.height&&(tmp.height=value.height-(item.outerHeight(!0)-item.height()),tmp.height=tmp.height>=0?tmp.height:0),item.css(tmp),item):(tmp=item.position(),{x:tmp.left,y:tmp.top,width:item.outerWidth(!1),height:item.outerHeight(!1)})},preferredSize:function(){var minSize,maxSize,margin=item.margin(),size={width:0,height:0},l=item.data("jlayout");return l&&resize?(size=l.preferred(that),minSize=that.minimumSize(),maxSize=that.maximumSize(),size.width+=margin.left+margin.right,size.height+=margin.top+margin.bottom,size.widthmaxSize.width||size.height>maxSize.height)&&(size.width=Math.min(size.width,maxSize.width),size.height=Math.min(size.height,maxSize.height))):(size=that.bounds(),size.width+=margin.left+margin.right,size.height+=margin.top+margin.bottom),size}}),that};$.fn.layout=function(options){var opts=$.extend({},$.fn.layout.defaults,options);return $.each(this,function(){var element=$(this),o=$.metadata&&element.metadata().layout?$.extend(opts,element.metadata().layout):opts,o=element.data("layoutType")?$.extend(o,{type:element.data("layoutType")}):o,elementWrapper=wrap(element,o.resize);"border"===o.type&&"undefined"!=typeof jLayout.border?($.each(["north","south","west","east","center"],function(i,name){element.children().hasClass(name)&&(o[name]=wrap(element.children("."+name+":first")))}),element.data("jlayout",jLayout.border(o))):"grid"===o.type&&"undefined"!=typeof jLayout.grid?(o.items=[],element.children().each(function(i){$(this).hasClass("ui-resizable-handle")||(o.items[i]=wrap($(this)))}),element.data("jlayout",jLayout.grid(o))):"flexGrid"===o.type&&"undefined"!=typeof jLayout.flexGrid?(o.items=[],element.children().each(function(i){$(this).hasClass("ui-resizable-handle")||(o.items[i]=wrap($(this)))}),element.data("jlayout",jLayout.flexGrid(o))):"column"===o.type&&"undefined"!=typeof jLayout.column?(o.items=[],element.children().each(function(i){$(this).hasClass("ui-resizable-handle")||(o.items[i]=wrap($(this)))}),element.data("jlayout",jLayout.column(o))):"flow"===o.type&&"undefined"!=typeof jLayout.flow&&(o.items=[],element.children().each(function(i){$(this).hasClass("ui-resizable-handle")||(o.items[i]=wrap($(this)))}),element.data("jlayout",jLayout.flow(o))),o.resize&&elementWrapper.bounds(elementWrapper.preferredSize()),elementWrapper.doLayout(),element.css({position:"relative"}),void 0!==$.ui&&element.addClass("ui-widget")})},$.fn.layout.defaults={resize:!0,type:"grid"}}(jQuery)},{}],14:[function(require,module,exports){!function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:350};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY,track=function(ev){cX=ev.pageX,cY=ev.pageY},compare=function(ev,ob){return ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t),Math.abs(pX-cX)+Math.abs(pY-cY)
").addClass("notice-wrap").appendTo("body"),noticeItemOuter=jQuery("
").addClass("notice-item-wrapper"),noticeItemInner=jQuery("
").hide().addClass("notice-item "+options.type).appendTo(noticeWrapAll).html("

"+options.text+"

").animate(options.inEffect,options.inEffectDuration).wrap(noticeItemOuter),noticeItemClose=jQuery("
").addClass("notice-item-close").prependTo(noticeItemInner).html("x").click(function(){jQuery.noticeRemove(noticeItemInner)}),noticeItemInner.hover(function(){hover=!0},function(){hover=!1}),options.stay||setTimeout(function(){var noticeHover=setInterval(function(){hover||(jQuery.noticeRemove(noticeItemInner),clearInterval(noticeHover))},1e3)},options.stayTime)},noticeRemove:function(obj){obj.animate({opacity:"0"},600,function(){obj.parent().animate({height:"0px"},300,function(){obj.parent().remove()})})}})}(jQuery)},{}],16:[function(require,module,exports){!function($){"use strict";var num=function(value){return parseInt(value,10)||0};$.each(["min","max"],function(i,name){$.fn[name+"Size"]=function(value){var width,height;return value?(void 0!==value.width&&this.css(name+"-width",value.width),void 0!==value.height&&this.css(name+"-height",value.height),this):(width=this.css(name+"-width"),height=this.css(name+"-height"),{width:"max"===name&&(void 0===width||"none"===width||-1===num(width))&&Number.MAX_VALUE||num(width),height:"max"===name&&(void 0===height||"none"===height||-1===num(height))&&Number.MAX_VALUE||num(height)})}}),$.fn.isVisible=function(){return this.is(":visible")},$.each(["border","margin","padding"],function(i,name){$.fn[name]=function(value){return value?(void 0!==value.top&&this.css(name+"-top"+("border"===name?"-width":""),value.top),void 0!==value.bottom&&this.css(name+"-bottom"+("border"===name?"-width":""),value.bottom),void 0!==value.left&&this.css(name+"-left"+("border"===name?"-width":""),value.left),void 0!==value.right&&this.css(name+"-right"+("border"===name?"-width":""),value.right),this):{top:num(this.css(name+"-top"+("border"===name?"-width":""))),bottom:num(this.css(name+"-bottom"+("border"===name?"-width":""))),left:num(this.css(name+"-left"+("border"===name?"-width":""))),right:num(this.css(name+"-right"+("border"===name?"-width":"")))}}})}(jQuery)},{}],17:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj -}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].fn.extend({ssDatepicker:function(opts){return(0,_jQuery2["default"])(this).each(function(){if(!(0,_jQuery2["default"])(this).data("datepicker")){(0,_jQuery2["default"])(this).siblings("button").addClass("ui-icon ui-icon-calendar");var config=((0,_jQuery2["default"])(this).parents(".field.date:first"),_jQuery2["default"].extend(opts||{},(0,_jQuery2["default"])(this).data(),(0,_jQuery2["default"])(this).data("jqueryuiconfig"),{}));config.showcalendar&&(config.locale&&_jQuery2["default"].datepicker.regional[config.locale]&&(config=_jQuery2["default"].extend(config,_jQuery2["default"].datepicker.regional[config.locale],{})),config.min&&(config.minDate=_jQuery2["default"].datepicker.parseDate("yy-mm-dd",config.min)),config.max&&(config.maxDate=_jQuery2["default"].datepicker.parseDate("yy-mm-dd",config.max)),config.dateFormat=config.jquerydateformat,(0,_jQuery2["default"])(this).datepicker(config))}})}}),(0,_jQuery2["default"])(document).on("click",".field.date input.text,input.text.date",function(){(0,_jQuery2["default"])(this).ssDatepicker(),(0,_jQuery2["default"])(this).data("datepicker")&&(0,_jQuery2["default"])(this).datepicker("show")})},{jQuery:"jQuery"}],18:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss",function($){$(".ss-gridfield").entwine({reload:function(ajaxOpts,successCallback){var self=this,form=this.closest("form"),focusedElName=this.find(":input:focus").attr("name"),data=form.find(":input").serializeArray();ajaxOpts||(ajaxOpts={}),ajaxOpts.data||(ajaxOpts.data=[]),ajaxOpts.data=ajaxOpts.data.concat(data),window.location.search&&(ajaxOpts.data=window.location.search.replace(/^\?/,"")+"&"+$.param(ajaxOpts.data)),form.addClass("loading"),$.ajax($.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(data){if(self.empty().append($(data).children()),focusedElName&&self.find(':input[name="'+focusedElName+'"]').focus(),self.find(".filter-header").length){var content;"show"==ajaxOpts.data[0].filter?(content='',self.addClass("show-filter").find(".filter-header").show()):(content='',self.removeClass("show-filter").find(".filter-header").hide()),self.find(".sortable-header th:last").html(content)}form.removeClass("loading"),successCallback&&successCallback.apply(this,arguments),self.trigger("reload",self)},error:function(e){alert(_i18n2["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),form.removeClass("loading")}},ajaxOpts))},showDetailView:function(url){window.location.href=url},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(k,v){var state=this.getState();state[k]=v,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(state))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}),$(".ss-gridfield *").entwine({getGridField:function(){return this.closest(".ss-gridfield")}}),$(".ss-gridfield :button[name=showFilter]").entwine({onclick:function(e){$(".filter-header").show("slow").find(":input:first").focus(),this.closest(".ss-gridfield").addClass("show-filter"),this.parent().html(''),e.preventDefault()}}),$(".ss-gridfield .ss-gridfield-item").entwine({onclick:function(e){if($(e.target).closest(".action").length)return this._super(e),!1;var editLink=this.find(".edit-link");editLink.length&&this.getGridField().showDetailView(editLink.prop("href"))},onmouseover:function(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),$(".ss-gridfield .action").entwine({onclick:function(e){var filterState="show";return this.button("option","disabled")?void e.preventDefault():(!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(filterState="hidden"),this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:filterState}]}),void e.preventDefault())},actionurl:function(){var btn=this.closest(":button"),grid=this.getGridField(),form=this.closest("form"),data=form.find(":input.gridstate").serialize(),csrf=form.find('input[name="SecurityID"]').val();data+="&"+encodeURIComponent(btn.attr("name"))+"="+encodeURIComponent(btn.val()),csrf&&(data+="&SecurityID="+encodeURIComponent(csrf)),window.location.search&&(data=window.location.search.replace(/^\?/,"")+"&"+data);var connector=-1==grid.data("url").indexOf("?")?"?":"&";return $.path.makeUrlAbsolute(grid.data("url")+connector+data,$("base").attr("href"))}}),$(".ss-gridfield .add-existing-autocompleter").entwine({onbuttoncreate:function(){var self=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){self.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var $button=this.find(".ss-ui-button"),$input=this.find('input[type="text"]'),inputHasValue=""!==$input.val(),buttonDisabled=$button.is(":disabled");(inputHasValue&&buttonDisabled||!inputHasValue&&!buttonDisabled)&&$button.button("option","disabled",!buttonDisabled)}}),$(".ss-gridfield .col-buttons .action.gridfield-button-delete, .cms-edit-form .btn-toolbar button.action.action-delete").entwine({onclick:function(e){return confirm(_i18n2["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),$(".ss-gridfield .action.gridfield-button-print").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(e){var url=this.actionurl();return window.open(url),e.preventDefault(),!1}}),$(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus();var ifWin=this.contentWindow||this;ifWin.print()})},onunmatch:function(){this._super()}}),$(".ss-gridfield .action.no-ajax").entwine({onclick:function(e){return window.location.href=this.actionurl(),e.preventDefault(),!1}}),$(".ss-gridfield .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView($(this).prop("href")),!1}}),$(".ss-gridfield[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return $.map(this.getSelectedItems(),function(el){return $(el).data("id")})}}),$(".ss-gridfield[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),$(".ss-gridfield .filter-header :input").entwine({onmatch:function(){var filterbtn=this.closest(".form__fieldgroup").find(".ss-gridfield-button-filter"),resetbtn=this.closest(".form__fieldgroup").find(".ss-gridfield-button-reset");this.val()&&(filterbtn.addClass("filtered"),resetbtn.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var filterbtn=this.closest(".form__fieldgroup").find(".ss-gridfield-button-filter"),resetbtn=this.closest(".form__fieldgroup").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var btns=this.closest(".filter-header").find(".ss-gridfield-button-filter"),filterState="show";return!this.hasClass("ss-gridfield-button-close")&&this.closest(".ss-gridfield").hasClass("show-filter")||(filterState="hidden"),this.getGridField().reload({data:[{name:btns.attr("name"),value:btns.val(),filter:filterState}]}),!1}filterbtn.addClass("hover-alike"),resetbtn.addClass("hover-alike")}}}),$(".ss-gridfield .relation-search").entwine({onfocusin:function(event){this.autocomplete({source:function(request,response){var searchField=$(this.element);$(this.element).closest("form");$.ajax({headers:{"X-Pjax":"Partial"},dataType:"json",type:"GET",url:$(searchField).data("searchUrl"),data:encodeURIComponent(searchField.attr("name"))+"="+encodeURIComponent(searchField.val()),success:response,error:function(e){alert(_i18n2["default"]._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(event,ui){var hiddenField=$('');hiddenField.val(ui.item.id),$(this).closest(".ss-gridfield").find(".action_gridfield_relationfind").replaceWith(hiddenField);var addbutton=$(this).closest(".ss-gridfield").find(".action_gridfield_relationadd");addbutton.data("button")?addbutton.button("enable"):addbutton.removeAttr("disabled")}})}}),$(".ss-gridfield .pagination-page-number input").entwine({onkeydown:function(event){if(13==event.keyCode){var newpage=parseInt($(this).val(),10),gridfield=$(this).getGridField();return gridfield.setState("GridFieldPaginator",{currentPage:newpage}),gridfield.reload(),!1}}})})},{i18n:"i18n",jQuery:"jQuery"}],19:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var editorID;return{init:function(ID){editorID=ID,this.create()},destroy:function(){tinymce.EditorManager.execCommand("mceRemoveEditor",!1,editorID)},getInstance:function(){return tinymce.EditorManager.get(editorID)},onopen:function(){},onclose:function(){},getConfig:function(){var selector="#"+editorID,config=(0,_jQuery2["default"])(selector).data("config"),self=this;return config.selector=selector,config.setup=function(ed){ed.on("change",function(){self.save()})},config},save:function(){var instance=this.getInstance();instance.save(),(0,_jQuery2["default"])(instance.getElement()).trigger("change")},create:function(){var config=this.getConfig();"undefined"!=typeof config.baseURL&&(tinymce.EditorManager.baseURL=config.baseURL),tinymce.init(config)},repaint:function(){},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().getElement()},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(node){this.getInstance().selection.select(node)},setContent:function(html,opts){this.getInstance().setContent(html,opts)},insertContent:function(html,opts){this.getInstance().insertContent(html,opts)},replaceContent:function(html,opts){this.getInstance().execCommand("mceReplaceContent",!1,html,opts)},insertLink:function(attrs,opts){this.getInstance().execCommand("mceInsertLink",!1,attrs,opts)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var settings=this.getConfig,cb=settings.urlconverter_callback;return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(bookmark){this.getInstance().selection.moveToBookmark(bookmark),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers["default"]=ss.editorWrappers.tinyMCE,_jQuery2["default"].entwine("ss",function($){$("textarea.htmleditor").entwine({Editor:null,onadd:function(){var edClass=this.data("editor")||"default",ed=ss.editorWrappers[edClass]();this.setEditor(ed),ed.init(this.attr("id")),this._super()},onremove:function(){this.getEditor().destroy(),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(){this.getEditor().save(),this._super()}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openDialog:function(type){var capitalize=function(text){return text.charAt(0).toUpperCase()+text.slice(1).toLowerCase()},self=this,url=$("#cms-editor-dialogs").data("url"+capitalize(type)+"form"),dialog=$(".htmleditorfield-"+type+"dialog");dialog.length?(dialog.getForm().setElement(this),dialog.html(""),dialog.addClass("loading"),dialog.open()):(dialog=$('
'),$("body").append(dialog)),$.ajax({url:url,complete:function(){dialog.removeClass("loading")},success:function(html){dialog.html(html),dialog.getForm().setElement(self),dialog.trigger("ssdialogopen")}})}}),$(".htmleditorfield-dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,buttons:{insert:{text:_i18n2["default"]._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept","class":"ss-ui-action-constructive media-insert",click:function(){$(this).find("form").submit()}}}}),this._super()},getForm:function(){return this.find("form")},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(bool){this.is(":visible")?this.close():this.open()},onscroll:function(){this.animate({scrollTop:this.find("form").height()},500)}}),$("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null,setSelection:function(node){return this._super($(node))},onadd:function(){var titleEl=this.find(":header:first");this.getDialog().attr("title",titleEl.text()),this._super()},onremove:function(){this.setSelection(null),this.setBookmark(null),this.setElement(null),this._super()},getDialog:function(){return this.closest(".htmleditorfield-dialog")},fromDialog:{onssdialogopen:function(){var ed=this.getEditor();this.setSelection(ed.getSelectedNode()),this.setBookmark(ed.createBookmark()),ed.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(),this.updateFromEditor()},onssdialogclose:function(){var ed=this.getEditor();ed.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function(){return this.getElement().getEditor()},modifySelection:function(callback){var ed=this.getEditor();ed.moveToBookmark(this.getBookmark()),callback.call(this,ed),this.setSelection(ed.getSelectedNode()),this.setBookmark(ed.createBookmark()),ed.blur()},updateFromEditor:function(){},redraw:function(){},resetFields:function(){this.find(".tree-holder").empty()}}),$("form.htmleditorfield-linkform").entwine({onsubmit:function(e){return this.insertLink(),this.getDialog().close(),!1},resetFields:function(){this._super(),this[0].reset()},redraw:function(){this._super();var linkType=this.find(":input[name=LinkType]:checked").val();this.addAnchorSelector(),this.resetFileField(),this.find(".step2").nextAll(".field").not('.field[id$="'+linkType+'_Holder"]').hide(),this.find('.field[id$="LinkType_Holder"]').show(),this.find('.field[id$="'+linkType+'_Holder"]').show(),"internal"!=linkType&&"anchor"!=linkType||this.find('.field[id$="Anchor_Holder"]').show(),"email"==linkType?this.find('.field[id$="Subject_Holder"]').show():this.find('.field[id$="TargetBlank_Holder"]').show(),"anchor"==linkType&&this.find('.field[id$="AnchorSelector_Holder"]').show(),this.find('.field[id$="Description_Holder"]').show()},getLinkAttributes:function(){var href,target=null,subject=this.find(":input[name=Subject]").val(),anchor=this.find(":input[name=Anchor]").val();switch(this.find(":input[name=TargetBlank]").is(":checked")&&(target="_blank"),this.find(":input[name=LinkType]:checked").val()){case"internal":href="[sitetree_link,id="+this.find(":input[name=internal]").val()+"]",anchor&&(href+="#"+anchor);break;case"anchor":href="#"+anchor;break;case"file":var fileid=this.find(".ss-uploadfield .ss-uploadfield-item").attr("data-fileid");href=fileid?"[file_link,id="+fileid+"]":"";break;case"email":href="mailto:"+this.find(":input[name=email]").val(),subject&&(href+="?subject="+encodeURIComponent(subject)),target=null;break;default:href=this.find(":input[name=external]").val(),-1==href.indexOf("://")&&(href="http://"+href)}return{href:href,target:target,title:this.find(":input[name=Description]").val()}},insertLink:function(){this.modifySelection(function(ed){ed.insertLink(this.getLinkAttributes())})},removeLink:function(){this.modifySelection(function(ed){ed.removeLink()}),this.resetFileField(),this.close()},resetFileField:function(){var fileField=this.find('.ss-uploadfield[id$="file_Holder"]'),fileUpload=fileField.data("fileupload"),currentItem=fileField.find(".ss-uploadfield-item[data-fileid]");currentItem.length&&(fileUpload._trigger("destroy",null,{context:currentItem}),fileField.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function(){if(!this.find(":input[name=AnchorSelector]").length){var self=this,anchorSelector=$('');this.find(":input[name=Anchor]").parent().append(anchorSelector),this.updateAnchorSelector(),anchorSelector.change(function(e){self.find(':input[name="Anchor"]').val($(this).val())})}},getAnchors:function(){var linkType=this.find(":input[name=LinkType]:checked").val(),dfdAnchors=$.Deferred();switch(linkType){case"anchor":var collectedAnchors=[],ed=this.getEditor();if(ed){var raw=ed.getContent().match(/\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim);if(raw&&raw.length)for(var i=0;i'+_i18n2["default"]._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"")),dfdAnchors.done(function(anchors){if(selector.empty(),selector.append($('")),anchors)for(var j=0;j'+anchors[j]+""))}).fail(function(message){selector.empty(),selector.append($('"))}),$.browser.msie&&selector.hide().show()},updateFromEditor:function(){var fieldName,htmlTagPattern=/<\S[^><]*>/g,data=this.getCurrentLink();if(data)for(fieldName in data){var el=this.find(":input[name="+fieldName+"]"),selected=data[fieldName];"string"==typeof selected&&(selected=selected.replace(htmlTagPattern,"")),el.is(":checkbox")?el.prop("checked",selected).change():el.is(":radio")?el.val([selected]).change():"file"==fieldName?(el=this.find(':input[name="'+fieldName+'[Uploads][]"]'),el=el.parents(".ss-uploadfield"),function attach(el,selected){el.getConfig()?el.attachFiles([selected]):setTimeout(function(){attach(el,selected)},50)}(el,selected)):el.val(selected).change()}},getCurrentLink:function(){var selectedEl=this.getSelection(),href="",target="",title="",action="insert",style_class="",linkDataSource=null;return selectedEl.length&&(linkDataSource=selectedEl.is("a")?selectedEl:selectedEl=selectedEl.parents("a:first")),linkDataSource&&linkDataSource.length&&this.modifySelection(function(ed){ed.selectNode(linkDataSource[0])}),linkDataSource.attr("href")||(linkDataSource=null),linkDataSource&&(href=linkDataSource.attr("href"),target=linkDataSource.attr("target"),title=linkDataSource.attr("title"),style_class=linkDataSource.attr("class"),href=this.getEditor().cleanLink(href,linkDataSource),action="update"),href.match(/^mailto:(.*)$/)?{LinkType:"email",email:RegExp.$1,Description:title}:href.match(/^(assets\/.*)$/)||href.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)?{LinkType:"file",file:RegExp.$1,Description:title,TargetBlank:!!target}:href.match(/^#(.*)$/)?{LinkType:"anchor",Anchor:RegExp.$1,Description:title,TargetBlank:!!target}:href.match(/^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i)?{LinkType:"internal",internal:RegExp.$1,Anchor:RegExp.$2?RegExp.$2.substr(1):"",Description:title,TargetBlank:!!target}:href?{LinkType:"external",external:href,Description:title,TargetBlank:!!target}:null}}),$("form.htmleditorfield-linkform input[name=LinkType]").entwine({onclick:function(e){this.parents("form:first").redraw(),this._super()},onchange:function(){this.parents("form:first").redraw();var linkType=this.parent().find(":checked").val();"anchor"!==linkType&&"internal"!==linkType||this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),$("form.htmleditorfield-linkform input[name=internal]").entwine({onvalueupdated:function(){this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),$("form.htmleditorfield-linkform :submit[name=action_remove]").entwine({onclick:function(e){return this.parents("form:first").removeLink(),this._super(),!1}}),$("form.htmleditorfield-mediaform").entwine({toggleCloseButton:function(){var updateExisting=Boolean(this.find(".ss-htmleditorfield-file").length);this.find(".overview .action-delete")[updateExisting?"hide":"show"]()},onsubmit:function(){return this.modifySelection(function(ed){this.find(".ss-htmleditorfield-file").each(function(){$(this).insertHTML(ed)})}),this.getDialog().close(),!1},updateFromEditor:function(){var self=this,node=this.getSelection();if(node.is("img")){var idOrUrl=node.data("id")||node.data("url")||node.attr("src");this.showFileView(idOrUrl).done(function(filefield){filefield.updateFromNode(node),self.toggleCloseButton(),self.redraw()})}this.redraw()},redraw:function(updateExisting){this._super();var node=this.getSelection(),hasItems=Boolean(this.find(".ss-htmleditorfield-file").length),editingSelected=node.is("img"),insertingURL=this.hasClass("insertingURL"),header=this.find(".header-edit");header[hasItems?"show":"hide"](),this.closest("ui-dialog").find("ui-dialog-buttonpane .media-insert").button(hasItems?"enable":"disable").toggleClass("ui-state-disabled",!hasItems),this.find(".htmleditorfield-default-panel")[editingSelected||insertingURL?"hide":"show"](),this.find(".htmleditorfield-web-panel")[editingSelected||!insertingURL?"hide":"show"]();var mediaFormHeading=this.find(".htmleditorfield-mediaform-heading.insert");editingSelected?mediaFormHeading.hide():insertingURL?(mediaFormHeading.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTURL")).prepend(''),this.find(".htmleditorfield-web-panel input.remoteurl").focus()):mediaFormHeading.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTFROM")).find(".back-button").remove(),this.find(".htmleditorfield-mediaform-heading.update")[editingSelected?"show":"hide"](),this.find(".ss-uploadfield-item-actions")[editingSelected?"hide":"show"](),this.find(".ss-uploadfield-item-name")[editingSelected?"hide":"show"](),this.find(".ss-uploadfield-item-preview")[editingSelected?"hide":"show"](),this.find(".btn-toolbar .media-update")[editingSelected?"show":"hide"](),this.find(".ss-uploadfield-item-editform").toggleEditForm(editingSelected),this.find(".htmleditorfield-from-cms .field.treedropdown").css("left",$(".htmleditorfield-mediaform-heading:visible").outerWidth()),this.closest(".ui-dialog").addClass("ss-uploadfield-dropzone"),this.closest(".ui-dialog").find(".ui-dialog-buttonpane .media-insert .ui-button-text").text([editingSelected?_i18n2["default"]._t("HtmlEditorField.UPDATE","Update"):_i18n2["default"]._t("HtmlEditorField.INSERT","Insert")])},resetFields:function(){this.find(".ss-htmleditorfield-file").remove(),this.find(".ss-gridfield-items .ui-selected").removeClass("ui-selected"),this.find("li.ss-uploadfield-item").remove(),this.redraw(),this._super()},getFileView:function(idOrUrl){return this.find(".ss-htmleditorfield-file[data-id="+idOrUrl+"]")},showFileView:function(idOrUrl){var self=this,params=Number(idOrUrl)==idOrUrl?{ID:idOrUrl}:{FileURL:idOrUrl},item=$('
');this.find(".content-edit").prepend(item);var dfr=$.Deferred();return $.ajax({url:$.path.addSearchParams(this.attr("action").replace(/MediaForm/,"viewfile"),params),success:function(html,status,xhr){var newItem=$(html).filter(".ss-htmleditorfield-file");item.replaceWith(newItem),self.redraw(),dfr.resolve(newItem)},error:function(){item.remove(),dfr.reject()}}),dfr.promise()}}),$("form.htmleditorfield-mediaform div.ss-upload .upload-url").entwine({onclick:function(){var form=this.closest("form");form.addClass("insertingURL"),form.redraw()}}),$("form.htmleditorfield-mediaform .htmleditorfield-mediaform-heading .back-button").entwine({onclick:function(){var form=this.closest("form");form.removeClass("insertingURL"),form.redraw()}}),$("form.htmleditorfield-mediaform .ss-gridfield-items").entwine({onselectableselected:function(e,ui){var form=this.closest("form"),item=$(ui.selected);item.is(".ss-gridfield-item")&&(form.closest("form").showFileView(item.data("id")),form.redraw(),form.parent().trigger("scroll"))},onselectableunselected:function(e,ui){var form=this.closest("form"),item=$(ui.unselected);item.is(".ss-gridfield-item")&&(form.getFileView(item.data("id")).remove(),form.redraw())}}),$("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function(e){var form=this.closest("form"),editFieldIDs=[];form.find("div.content-edit").find("div.ss-htmleditorfield-file").each(function(){editFieldIDs.push($(this).data("id"))});var uploadedFiles=$(".ss-uploadfield-files",this).children(".ss-uploadfield-item");uploadedFiles.each(function(){var uploadedID=$(this).data("fileid");uploadedID&&-1==$.inArray(uploadedID,editFieldIDs)&&($(this).remove(),form.showFileView(uploadedID))}),form.parent().trigger("scroll"),form.redraw()}}),$("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function(){this._super(),this.validate()},onkeyup:function(){this.validate()},onchange:function(){this.validate()},getAddButton:function(){return this.closest(".CompositeField").find("button.add-url")},validate:function(){var val=this.val(),orig=val;return val=$.trim(val),val=val.replace(/^https?:\/\//i,""),orig!==val&&this.val(val),this.getAddButton().button(val?"enable":"disable"),!!val}}),$("form.htmleditorfield-form.htmleditorfield-mediaform .add-url").entwine({getURLField:function(){return this.closest(".CompositeField").find("input.remoteurl")},onclick:function(e){var urlField=this.getURLField(),container=this.closest(".CompositeField"),form=this.closest("form");return urlField.validate()&&(container.addClass("loading"),form.showFileView("http://"+urlField.val()).done(function(){container.removeClass("loading"),form.parent().trigger("scroll")}),form.redraw()),!1}}),$("form.htmleditorfield-mediaform .ss-htmleditorfield-file").entwine({getAttributes:function(){},getExtraData:function(){},getHTML:function(){return $("
").append($("").attr({href:this.data("url")}).text(this.find(".name").text())).html()},insertHTML:function(ed){ed.replaceContent(this.getHTML())},updateFromNode:function(node){},updateDimensions:function(constrainBy,maxW,maxH){var aspect,widthEl=this.find(":input[name=Width]"),heightEl=this.find(":input[name=Height]"),w=widthEl.val(),h=heightEl.val();w&&h&&(constrainBy?(aspect=heightEl.getOrigVal()/widthEl.getOrigVal(),"Width"==constrainBy?(maxW&&w>maxW&&(w=maxW),h=Math.floor(w*aspect)):"Height"==constrainBy&&(maxH&&h>maxH&&(h=maxH),w=Math.ceil(h/aspect))):(maxW&&w>maxW&&(w=maxW),maxH&&h>maxH&&(h=maxH)),widthEl.val(w),heightEl.val(h))}}),$("form.htmleditorfield-mediaform .ss-htmleditorfield-file.image").entwine({getAttributes:function(){var width=this.find(":input[name=Width]").val(),height=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),alt:this.find(":input[name=AltText]").val(),width:width?parseInt(width,10):null,height:height?parseInt(height,10):null,title:this.find(":input[name=Title]").val(),"class":this.find(":input[name=CSSClass]").val(),"data-id":this.find(":input[name=FileID]").val()}},getExtraData:function(){return{CaptionText:this.find(":input[name=CaptionText]").val()}},getHTML:function(){},insertHTML:function(ed){var form=this.closest("form"),node=form.getSelection();ed||(ed=form.getEditor());var attrs=this.getAttributes(),extraData=this.getExtraData(),replacee=node&&node.is("img")?node:null;replacee&&replacee.parent().is(".captionImage")&&(replacee=replacee.parent());var img=node&&node.is("img")?node:$("");img.attr(attrs);var container=img.parent(".captionImage"),caption=container.find(".caption");extraData.CaptionText?(container.length||(container=$("
")),container.attr("class","captionImage "+attrs["class"]).css("width",attrs.width),caption.length||(caption=$('

').appendTo(container)),caption.attr("class","caption "+attrs["class"]).text(extraData.CaptionText)):container=caption=null;var replacer=container?container:img;replacee&&replacee.not(replacer).length&&replacee.replaceWith(replacer),container&&container.prepend(img),replacee||(ed.repaint(),ed.insertContent($("
").append(replacer).html(),{skip_undo:1})),ed.addUndo(),ed.repaint()},updateFromNode:function(node){this.find(":input[name=AltText]").val(node.attr("alt")),this.find(":input[name=Title]").val(node.attr("title")),this.find(":input[name=CSSClass]").val(node.attr("class")),this.find(":input[name=Width]").val(node.width()),this.find(":input[name=Height]").val(node.height()),this.find(":input[name=CaptionText]").val(node.siblings(".caption:first").text()),this.find(":input[name=FileID]").val(node.data("id"))}}),$("form.htmleditorfield-mediaform .ss-htmleditorfield-file.flash").entwine({getAttributes:function(){var width=this.find(":input[name=Width]").val(),height=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),width:width?parseInt(width,10):null,height:height?parseInt(height,10):null,"data-fileid":this.find(":input[name=FileID]").val()}},getHTML:function(){var attrs=this.getAttributes(),el=tinyMCE.activeEditor.plugins.media.dataToImg({type:"flash",width:attrs.width,height:attrs.height,params:{src:attrs.src},video:{sources:[]}});return $("
").append(el).html()},updateFromNode:function(node){}}),$("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function(){var width=this.find(":input[name=Width]").val(),height=this.find(":input[name=Height]").val();return{src:this.find(".thumbnail-preview").attr("src"),width:width?parseInt(width,10):null,height:height?parseInt(height,10):null,"class":this.find(":input[name=CSSClass]").val(),alt:this.find(":input[name=AltText]").val(),title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){var width=this.find(":input[name=Width]").val(),height=this.find(":input[name=Height]").val();return{ -CaptionText:this.find(":input[name=CaptionText]").val(),Url:this.find(":input[name=URL]").val(),thumbnail:this.find(".thumbnail-preview").attr("src"),width:width?parseInt(width,10):null,height:height?parseInt(height,10):null,cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function(){var el,attrs=this.getAttributes(),extraData=this.getExtraData(),imgEl=$("").attr(attrs).addClass("ss-htmleditorfield-file embed");return $.each(extraData,function(key,value){imgEl.attr("data-"+key,value)}),el=extraData.CaptionText?$('

'+extraData.CaptionText+"

").prepend(imgEl):imgEl,$("
").append(el).html()},updateFromNode:function(node){this.find(":input[name=AltText]").val(node.attr("alt")),this.find(":input[name=Title]").val(node.attr("title")),this.find(":input[name=Width]").val(node.width()),this.find(":input[name=Height]").val(node.height()),this.find(":input[name=Title]").val(node.attr("title")),this.find(":input[name=CSSClass]").val(node.data("cssclass")),this.find(":input[name=FileID]").val(node.data("fileid"))}}),$("form.htmleditorfield-mediaform .ss-htmleditorfield-file .dimensions :input").entwine({OrigVal:null,onmatch:function(){this._super(),this.setOrigVal(parseInt(this.val(),10))},onunmatch:function(){this._super()},onfocusout:function(e){this.closest(".ss-htmleditorfield-file").updateDimensions(this.attr("name"))}}),$("form.htmleditorfield-mediaform .ss-uploadfield-item .ss-uploadfield-item-cancel").entwine({onclick:function(e){var form=this.closest("form"),file=this.closest("ss-uploadfield-item");form.find(".ss-gridfield-item[data-id="+file.data("id")+"]").removeClass("ui-selected"),this.closest(".ss-uploadfield-item").remove(),form.redraw(),e.preventDefault()}}),$("div.ss-assetuploadfield .ss-uploadfield-item-edit, div.ss-assetuploadfield .ss-uploadfield-item-name").entwine({getEditForm:function(){return this.closest(".ss-uploadfield-item").find(".ss-uploadfield-item-editform")},fromEditForm:{onchange:function(e){var form=$(e.target);form.removeClass("edited"),form.addClass("edited")}},onclick:function(e){var editForm=this.getEditForm();return this.closest(".ss-uploadfield-item").hasClass("ss-htmleditorfield-file")?(editForm.parent("ss-uploadfield-item").removeClass("ui-state-warning"),editForm.toggleEditForm(),e.preventDefault(),!1):void this._super(e)}}),$("div.ss-assetuploadfield .ss-uploadfield-item-editform").entwine({toggleEditForm:function(bool){var itemInfo=this.prev(".ss-uploadfield-item-info"),status=itemInfo.find(".ss-uploadfield-item-status"),text="";bool===!0||bool!==!1&&0===this.height()?(text=_i18n2["default"]._t("UploadField.Editing","Editing ..."),this.height("auto"),itemInfo.find(".toggle-details-icon").addClass("opened"),status.removeClass("ui-state-success-text").removeClass("ui-state-warning-text")):(this.height(0),itemInfo.find(".toggle-details-icon").removeClass("opened"),this.hasClass("edited")?(text=_i18n2["default"]._t("UploadField.CHANGESSAVED","Changes Made"),this.removeClass("edited"),status.addClass("ui-state-success-text")):(text=_i18n2["default"]._t("UploadField.NOCHANGES","No Changes"),status.addClass("ui-state-success-text"))),status.attr("title",text).text(text)}}),$('form.htmleditorfield-mediaform .field[id$="ParentID_Holder"] .TreeDropdownField').entwine({onadd:function(){this._super();var self=this;this.bind("change",function(){var fileList=self.closest("form").find(".ss-gridfield");fileList.setState("ParentID",self.getValue()),fileList.reload()})}})})},{i18n:"i18n",jQuery:"jQuery"}],20:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].entwine("ss",function($){$(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){var hash=window.location.hash;this.redrawTabs(),""!==hash&&this.openTabFromURL(hash),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks(),this.tabs()},openTabFromURL:function(hash){var $trigger;$.each(this.find(".cms-panel-link"),function(){return-1!==this.href.indexOf(hash)&&1===$(hash).length?($trigger=$(this),!1):void 0}),void 0!==$trigger&&$(window).one("ajaxComplete",function(){$trigger.click()})},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var matches=$(this).attr("href").match(/#.*/);matches&&$(this).attr("href",document.location.href.replace(/#.*/,"")+matches[0])}})}})})},{jQuery:"jQuery"}],21:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n);_jQuery2["default"].entwine("ss",function($){var windowWidth,windowHeight;$(window).bind("resize.treedropdownfield",function(){var cb=function(){$(".TreeDropdownField").closePanel()};if($.browser.msie&&parseInt($.browser.version,10)<9){var newWindowWidth=$(window).width(),newWindowHeight=$(window).height();newWindowWidth==windowWidth&&newWindowHeight==windowHeight||(windowWidth=newWindowWidth,windowHeight=newWindowHeight,cb())}else cb()});var strings={openlink:_i18n2["default"]._t("TreeDropdownField.OpenLink"),fieldTitle:"("+_i18n2["default"]._t("TreeDropdownField.FieldTitle")+")",searchFieldTitle:"("+_i18n2["default"]._t("TreeDropdownField.SearchFieldTitle")+")"},_clickTestFn=function(e){$(e.target).parents(".TreeDropdownField").length||$(".TreeDropdownField").closePanel()};$(".TreeDropdownField").entwine({CurrentXhr:null,onadd:function(){this.append('
');var linkTitle=strings.openLink;linkTitle&&this.find("treedropdownfield-toggle-panel-link a").attr("title",linkTitle),this.data("title")&&this.setTitle(this.data("title")),this.getPanel().hide(),this._super()},getPanel:function(){return this.find(".treedropdownfield-panel")},openPanel:function(){$(".TreeDropdownField").closePanel(),$("body").bind("click",_clickTestFn);var panel=this.getPanel(),tree=this.find(".tree-holder");panel.css("width",this.width()),panel.show();var toggle=this.find(".treedropdownfield-toggle-panel-link");toggle.addClass("treedropdownfield-open-tree"),this.addClass("treedropdownfield-open-tree"),toggle.find("a").removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-n"),tree.is(":empty")&&!panel.hasClass("loading")?this.loadTree(null,this._riseUp):this._riseUp(),this.trigger("panelshow")},_riseUp:function(){var elHeight,elPos,endOfWindow,container=this,dropdown=this.getPanel(),toggle=this.find(".treedropdownfield-toggle-panel-link"),offsetTop=toggle.innerHeight();toggle.length>0&&(endOfWindow=$(window).height()+$(document).scrollTop()-toggle.innerHeight(),elPos=toggle.offset().top,elHeight=dropdown.innerHeight(),elPos+elHeight>endOfWindow&&elPos-elHeight>0?(container.addClass("treedropdownfield-with-rise"),offsetTop=-dropdown.outerHeight()):container.removeClass("treedropdownfield-with-rise")),dropdown.css({top:offsetTop+"px"})},closePanel:function(){jQuery("body").unbind("click",_clickTestFn);var toggle=this.find(".treedropdownfield-toggle-panel-link");toggle.removeClass("treedropdownfield-open-tree"),this.removeClass("treedropdownfield-open-tree treedropdownfield-with-rise"),toggle.find("a").removeClass("ui-icon-triangle-1-n").addClass("ui-icon-triangle-1-s"),this.getPanel().hide(),this.trigger("panelhide")},togglePanel:function(){this[this.getPanel().is(":visible")?"closePanel":"openPanel"]()},setTitle:function(title){title=title||this.data("title")||strings.fieldTitle,this.find(".treedropdownfield-title").html(title),this.data("title",title)},getTitle:function(){return this.find(".treedropdownfield-title").text()},updateTitle:function(){var self=this,tree=self.find(".tree-holder"),val=this.getValue(),updateFn=function(){var val=self.getValue();if(val){var node=tree.find('*[data-id="'+val+'"]'),title=node.children("a").find("span.jstree_pageicon")?node.children("a").find("span.item").html():null;title||(title=node.length>0?tree.jstree("get_text",node[0]):null),title&&(self.setTitle(title),self.data("title",title)),node&&tree.jstree("select_node",node)}else self.setTitle(self.data("empty-title")),self.removeData("title")};tree.is(":empty")&&val?this.loadTree({forceValue:val},updateFn):updateFn()},setValue:function(val){this.data("metadata",$.extend(this.data("metadata"),{id:val})),this.find(":input:hidden").val(val).trigger("valueupdated").trigger("change")},getValue:function(){return this.find(":input:hidden").val()},loadTree:function(params,callback){var xhr,self=this,panel=this.getPanel(),treeHolder=$(panel).find(".tree-holder"),params=params?$.extend({},this.getRequestParams(),params):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),panel.addClass("loading"),xhr=$.ajax({url:this.data("urlTree"),data:params,complete:function(xhr,status){panel.removeClass("loading")},success:function(html,status,xhr){treeHolder.html(html);var firstLoad=!0;treeHolder.jstree("destroy").bind("loaded.jstree",function(e,data){var val=self.getValue(),selectNode=treeHolder.find('*[data-id="'+val+'"]'),currentNode=data.inst.get_selected();val&&selectNode!=currentNode&&data.inst.select_node(selectNode),firstLoad=!1,callback&&callback.apply(self)}).jstree(self.getTreeConfig()).bind("select_node.jstree",function(e,data){var node=data.rslt.obj,id=$(node).data("id");firstLoad||self.getValue()!=id?(self.data("metadata",$.extend({id:id},$(node).getMetaData())),self.setTitle(data.inst.get_text(node)),self.setValue(id)):(self.data("metadata",null),self.setTitle(null),self.setValue(null),data.inst.deselect_node(node)),firstLoad||self.closePanel(),firstLoad=!1}),self.setCurrentXhr(null)}}),this.setCurrentXhr(xhr)},getTreeConfig:function(){var self=this;return{core:{html_titles:!0,animation:0},html_data:{data:this.getPanel().find(".tree-holder").html(),ajax:{url:function url(node){var url=$.path.parseUrl(self.data("urlTree")).hrefNoSearch;return url+"/"+($(node).data("id")?$(node).data("id"):0)},data:function(node){var query=$.query.load(self.data("urlTree")).keys,params=self.getRequestParams();return params=$.extend({},query,params,{ajax:1})}}},ui:{select_limit:1,initially_select:[this.getPanel().find(".current").attr("id")]},themes:{theme:"apple"},types:{types:{"default":{check_node:function(node){return!node.hasClass("disabled")},uncheck_node:function(node){return!node.hasClass("disabled")},select_node:function(node){return!node.hasClass("disabled")},deselect_node:function(node){return!node.hasClass("disabled")}}}},plugins:["html_data","ui","themes","types"]}},getRequestParams:function(){return{}}}),$(".TreeDropdownField .tree-holder li").entwine({getMetaData:function(){var matches=this.attr("class").match(/class-([^\s]*)/i),klass=matches?matches[1]:"";return{ClassName:klass}}}),$(".TreeDropdownField *").entwine({getField:function(){return this.parents(".TreeDropdownField:first")}}),$(".TreeDropdownField").entwine({onclick:function(e){return this.togglePanel(),!1}}),$(".TreeDropdownField .treedropdownfield-panel").entwine({onclick:function(e){return!1}}),$(".TreeDropdownField.searchable").entwine({onadd:function(){this._super();var title=_i18n2["default"]._t("TreeDropdownField.ENTERTOSEARCH");this.find(".treedropdownfield-panel").prepend($(''))},search:function(str,callback){this.openPanel(),this.loadTree({search:str},callback)},cancelSearch:function(){this.closePanel(),this.loadTree()}}),$(".TreeDropdownField.searchable input.search").entwine({onkeydown:function(e){var field=this.getField();return 13==e.keyCode?(field.search(this.val()),!1):void(27==e.keyCode&&field.cancelSearch())}}),$(".TreeDropdownField.multiple").entwine({getTreeConfig:function(){var cfg=this._super();return cfg.checkbox={override_ui:!0,two_state:!0},cfg.plugins.push("checkbox"),cfg.ui.select_limit=-1,cfg},loadTree:function(params,callback){var xhr,self=this,panel=this.getPanel(),treeHolder=$(panel).find(".tree-holder"),params=params?$.extend({},this.getRequestParams(),params):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),panel.addClass("loading"),xhr=$.ajax({url:this.data("urlTree"),data:params,complete:function(xhr,status){panel.removeClass("loading")},success:function(html,status,xhr){treeHolder.html(html);var firstLoad=!0;self.setCurrentXhr(null),treeHolder.jstree("destroy").bind("loaded.jstree",function(e,data){$.each(self.getValue(),function(i,val){data.inst.check_node(treeHolder.find("*[data-id="+val+"]"))}),firstLoad=!1,callback&&callback.apply(self)}).jstree(self.getTreeConfig()).bind("uncheck_node.jstree check_node.jstree",function(e,data){var nodes=data.inst.get_checked(null,!0);self.setValue($.map(nodes,function(el,i){return $(el).data("id")})),self.setTitle($.map(nodes,function(el,i){return data.inst.get_text(el)})),self.data("metadata",$.map(nodes,function(el,i){return{id:$(el).data("id"),metadata:$(el).getMetaData()}}))})}}),this.setCurrentXhr(xhr)},getValue:function(){var val=this._super();return val.split(/ *, */)},setValue:function(val){this._super($.isArray(val)?val.join(","):val)},setTitle:function(title){this._super($.isArray(title)?title.join(", "):title)},updateTitle:function(){}}),$(".TreeDropdownField input[type=hidden]").entwine({onadd:function(){this._super(),this.bind("change.TreeDropdownField",function(){$(this).getField().updateTitle()})},onremove:function(){this._super(),this.unbind(".TreeDropdownField")}})})},{i18n:"i18n",jQuery:"jQuery"}],22:[function(require,module,exports){(function(global){"use strict";function define(O,key,value){O[key]||Object[DEFINE_PROPERTY](O,key,{writable:!0,configurable:!0,value:value})}if(require("core-js/shim"),require("babel-regenerator-runtime"),require("core-js/fn/regexp/escape"),global._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");global._babelPolyfill=!0;var DEFINE_PROPERTY="defineProperty";define(String.prototype,"padLeft","".padStart),define(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(key){[][key]&&define(Array,key,Function.call.bind([][key]))})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-regenerator-runtime":23,"core-js/fn/regexp/escape":24,"core-js/shim":311}],23:[function(require,module,exports){(function(process,global){!function(global){"use strict";function wrap(innerFn,outerFn,self,tryLocsList){var generator=Object.create((outerFn||Generator).prototype),context=new Context(tryLocsList||[]);return generator._invoke=makeInvokeMethod(innerFn,self,context),generator}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){prototype[method]=function(arg){return this._invoke(method,arg)}})}function AwaitArgument(arg){this.arg=arg}function AsyncIterator(generator){function invoke(method,arg){var result=generator[method](arg),value=result.value;return value instanceof AwaitArgument?Promise.resolve(value.arg).then(invokeNext,invokeThrow):Promise.resolve(value).then(function(unwrapped){return result.value=unwrapped,result})}function enqueue(method,arg){function callInvokeWithMethodAndArg(){return invoke(method,arg)}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):new Promise(function(resolve){resolve(callInvokeWithMethodAndArg())})}"object"==typeof process&&process.domain&&(invoke=process.domain.bind(invoke));var previousPromise,invokeNext=invoke.bind(generator,"next"),invokeThrow=invoke.bind(generator,"throw");invoke.bind(generator,"return");this._invoke=enqueue}function makeInvokeMethod(innerFn,self,context){var state=GenStateSuspendedStart;return function(method,arg){if(state===GenStateExecuting)throw new Error("Generator is already running");if(state===GenStateCompleted){if("throw"===method)throw arg;return doneResult()}for(;;){var delegate=context.delegate;if(delegate){if("return"===method||"throw"===method&&delegate.iterator[method]===undefined){context.delegate=null;var returnMethod=delegate.iterator["return"];if(returnMethod){var record=tryCatch(returnMethod,delegate.iterator,arg);if("throw"===record.type){method="throw",arg=record.arg;continue}}if("return"===method)continue}var record=tryCatch(delegate.iterator[method],delegate.iterator,arg);if("throw"===record.type){context.delegate=null,method="throw",arg=record.arg;continue}method="next",arg=undefined;var info=record.arg;if(!info.done)return state=GenStateSuspendedYield,info;context[delegate.resultName]=info.value,context.next=delegate.nextLoc,context.delegate=null}if("next"===method)context._sent=arg,state===GenStateSuspendedYield?context.sent=arg:context.sent=undefined;else if("throw"===method){if(state===GenStateSuspendedStart)throw state=GenStateCompleted,arg;context.dispatchException(arg)&&(method="next",arg=undefined)}else"return"===method&&context.abrupt("return",arg);state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if("normal"===record.type){state=context.done?GenStateCompleted:GenStateSuspendedYield;var info={value:record.arg,done:context.done};if(record.arg!==ContinueSentinel)return info;context.delegate&&"next"===method&&(arg=undefined)}else"throw"===record.type&&(state=GenStateCompleted,method="throw",arg=record.arg)}}}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0)}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},ContinueSentinel}}}("object"==typeof global?global:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:313}],24:[function(require,module,exports){require("../../modules/core.regexp.escape"),module.exports=require("../../modules/_core").RegExp.escape},{"../../modules/_core":44,"../../modules/core.regexp.escape":139}],25:[function(require,module,exports){module.exports=function(it){if("function"!=typeof it)throw TypeError(it+" is not a function!");return it}},{}],26:[function(require,module,exports){var cof=require("./_cof");module.exports=function(it,msg){if("number"!=typeof it&&"Number"!=cof(it))throw TypeError(msg);return+it}},{"./_cof":39}],27:[function(require,module,exports){var UNSCOPABLES=require("./_wks")("unscopables"),ArrayProto=Array.prototype;void 0==ArrayProto[UNSCOPABLES]&&require("./_hide")(ArrayProto,UNSCOPABLES,{}),module.exports=function(key){ArrayProto[UNSCOPABLES][key]=!0}},{"./_hide":61,"./_wks":136}],28:[function(require,module,exports){module.exports=function(it,Constructor,name,forbiddenField){if(!(it instanceof Constructor)||void 0!==forbiddenField&&forbiddenField in it)throw TypeError(name+": incorrect invocation!");return it}},{}],29:[function(require,module,exports){var isObject=require("./_is-object");module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},{"./_is-object":70}],30:[function(require,module,exports){"use strict";var toObject=require("./_to-object"),toIndex=require("./_to-index"),toLength=require("./_to-length");module.exports=[].copyWithin||function(target,start){var O=toObject(this),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments.length>2?arguments[2]:void 0,count=Math.min((void 0===end?len:toIndex(end,len))-from,len-to),inc=1;for(to>from&&from+count>to&&(inc=-1,from+=count-1,to+=count-1);count-- >0;)from in O?O[to]=O[from]:delete O[to],to+=inc,from+=inc;return O}},{"./_to-index":126,"./_to-length":129,"./_to-object":130}],31:[function(require,module,exports){"use strict";var toObject=require("./_to-object"),toIndex=require("./_to-index"),toLength=require("./_to-length");module.exports=function(value){for(var O=toObject(this),length=toLength(O.length),aLen=arguments.length,index=toIndex(aLen>1?arguments[1]:void 0,length),end=aLen>2?arguments[2]:void 0,endPos=void 0===end?length:toIndex(end,length);endPos>index;)O[index++]=value;return O}},{"./_to-index":126,"./_to-length":129,"./_to-object":130}],32:[function(require,module,exports){var forOf=require("./_for-of");module.exports=function(iter,ITERATOR){var result=[];return forOf(iter,!1,result.push,result,ITERATOR),result}},{"./_for-of":58}],33:[function(require,module,exports){var toIObject=require("./_to-iobject"),toLength=require("./_to-length"),toIndex=require("./_to-index");module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var value,O=toIObject($this),length=toLength(O.length),index=toIndex(fromIndex,length);if(IS_INCLUDES&&el!=el){for(;length>index;)if(value=O[index++],value!=value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}}},{"./_to-index":126,"./_to-iobject":128,"./_to-length":129}],34:[function(require,module,exports){var ctx=require("./_ctx"),IObject=require("./_iobject"),toObject=require("./_to-object"),toLength=require("./_to-length"),asc=require("./_array-species-create");module.exports=function(TYPE,$create){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX,create=$create||asc;return function($this,callbackfn,that){for(var val,res,O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?create($this,length):IS_FILTER?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(val=self[index],res=f(val,index,O),TYPE))if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return!0;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return!1;return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./_array-species-create":36,"./_ctx":46,"./_iobject":66,"./_to-length":129,"./_to-object":130}],35:[function(require,module,exports){var aFunction=require("./_a-function"),toObject=require("./_to-object"),IObject=require("./_iobject"),toLength=require("./_to-length");module.exports=function(that,callbackfn,aLen,memo,isRight){aFunction(callbackfn);var O=toObject(that),self=IObject(O),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(2>aLen)for(;;){if(index in self){memo=self[index],index+=i;break}if(index+=i,isRight?0>index:index>=length)throw TypeError("Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)index in self&&(memo=callbackfn(memo,self[index],index,O));return memo}},{"./_a-function":25,"./_iobject":66,"./_to-length":129,"./_to-object":130}],36:[function(require,module,exports){var isObject=require("./_is-object"),isArray=require("./_is-array"),SPECIES=require("./_wks")("species");module.exports=function(original,length){var C;return isArray(original)&&(C=original.constructor,"function"!=typeof C||C!==Array&&!isArray(C.prototype)||(C=void 0),isObject(C)&&(C=C[SPECIES],null===C&&(C=void 0))),new(void 0===C?Array:C)(length)}},{"./_is-array":68,"./_is-object":70,"./_wks":136}],37:[function(require,module,exports){"use strict";var aFunction=require("./_a-function"),isObject=require("./_is-object"),invoke=require("./_invoke"),arraySlice=[].slice,factories={},construct=function(F,len,args){if(!(len in factories)){for(var n=[],i=0;len>i;i++)n[i]="a["+i+"]";factories[len]=Function("F,a","return new F("+n.join(",")+")")}return factories[len](F,args)};module.exports=Function.bind||function(that){var fn=aFunction(this),partArgs=arraySlice.call(arguments,1),bound=function(){var args=partArgs.concat(arraySlice.call(arguments));return this instanceof bound?construct(fn,args.length,args):invoke(fn,args,that)};return isObject(fn.prototype)&&(bound.prototype=fn.prototype),bound}},{"./_a-function":25,"./_invoke":65,"./_is-object":70}],38:[function(require,module,exports){var cof=require("./_cof"),TAG=require("./_wks")("toStringTag"),ARG="Arguments"==cof(function(){return arguments}()),tryGet=function(it,key){try{return it[key]}catch(e){}};module.exports=function(it){var O,T,B;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(T=tryGet(O=Object(it),TAG))?T:ARG?cof(O):"Object"==(B=cof(O))&&"function"==typeof O.callee?"Arguments":B}},{"./_cof":39,"./_wks":136}],39:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],40:[function(require,module,exports){"use strict";var dP=require("./_object-dp").f,create=require("./_object-create"),redefineAll=(require("./_hide"),require("./_redefine-all")),ctx=require("./_ctx"),anInstance=require("./_an-instance"),defined=require("./_defined"),forOf=require("./_for-of"),$iterDefine=require("./_iter-define"),step=require("./_iter-step"),setSpecies=require("./_set-species"),DESCRIPTORS=require("./_descriptors"),fastKey=require("./_meta").fastKey,SIZE=DESCRIPTORS?"_s":"size",getEntry=function(that,key){var entry,index=fastKey(key);if("F"!==index)return that._i[index];for(entry=that._f;entry;entry=entry.n)if(entry.k==key)return entry};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,"_i"),that._i=create(null),that._f=void 0,that._l=void 0,that[SIZE]=0,void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that)});return redefineAll(C.prototype,{clear:function(){for(var that=this,data=that._i,entry=that._f;entry;entry=entry.n)entry.r=!0,entry.p&&(entry.p=entry.p.n=void 0),delete data[entry.i];that._f=that._l=void 0,that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i],entry.r=!0,prev&&(prev.n=next),next&&(next.p=prev),that._f==entry&&(that._f=next),that._l==entry&&(that._l=prev),that[SIZE]--} -return!!entry},forEach:function(callbackfn){anInstance(this,C,"forEach");for(var entry,f=ctx(callbackfn,arguments.length>1?arguments[1]:void 0,3);entry=entry?entry.n:this._f;)for(f(entry.v,entry.k,this);entry&&entry.r;)entry=entry.p},has:function(key){return!!getEntry(this,key)}}),DESCRIPTORS&&dP(C.prototype,"size",{get:function(){return defined(this[SIZE])}}),C},def:function(that,key,value){var prev,index,entry=getEntry(that,key);return entry?entry.v=value:(that._l=entry={i:index=fastKey(key,!0),k:key,v:value,p:prev=that._l,n:void 0,r:!1},that._f||(that._f=entry),prev&&(prev.n=entry),that[SIZE]++,"F"!==index&&(that._i[index]=entry)),that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){$iterDefine(C,NAME,function(iterated,kind){this._t=iterated,this._k=kind,this._l=void 0},function(){for(var that=this,kind=that._k,entry=that._l;entry&&entry.r;)entry=entry.p;return that._t&&(that._l=entry=entry?entry.n:that._t._f)?"keys"==kind?step(0,entry.k):"values"==kind?step(0,entry.v):step(0,[entry.k,entry.v]):(that._t=void 0,step(1))},IS_MAP?"entries":"values",!IS_MAP,!0),setSpecies(NAME)}}},{"./_an-instance":28,"./_ctx":46,"./_defined":48,"./_descriptors":49,"./_for-of":58,"./_hide":61,"./_iter-define":74,"./_iter-step":76,"./_meta":83,"./_object-create":87,"./_object-dp":88,"./_redefine-all":107,"./_set-species":112}],41:[function(require,module,exports){var classof=require("./_classof"),from=require("./_array-from-iterable");module.exports=function(NAME){return function(){if(classof(this)!=NAME)throw TypeError(NAME+"#toJSON isn't generic");return from(this)}}},{"./_array-from-iterable":32,"./_classof":38}],42:[function(require,module,exports){"use strict";var redefineAll=require("./_redefine-all"),getWeak=require("./_meta").getWeak,anObject=require("./_an-object"),isObject=require("./_is-object"),anInstance=require("./_an-instance"),forOf=require("./_for-of"),createArrayMethod=require("./_array-methods"),$has=require("./_has"),arrayFind=createArrayMethod(5),arrayFindIndex=createArrayMethod(6),id=0,uncaughtFrozenStore=function(that){return that._l||(that._l=new UncaughtFrozenStore)},UncaughtFrozenStore=function(){this.a=[]},findUncaughtFrozen=function(store,key){return arrayFind(store.a,function(it){return it[0]===key})};UncaughtFrozenStore.prototype={get:function(key){var entry=findUncaughtFrozen(this,key);return entry?entry[1]:void 0},has:function(key){return!!findUncaughtFrozen(this,key)},set:function(key,value){var entry=findUncaughtFrozen(this,key);entry?entry[1]=value:this.a.push([key,value])},"delete":function(key){var index=arrayFindIndex(this.a,function(it){return it[0]===key});return~index&&this.a.splice(index,1),!!~index}},module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,"_i"),that._i=id++,that._l=void 0,void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that)});return redefineAll(C.prototype,{"delete":function(key){if(!isObject(key))return!1;var data=getWeak(key);return data===!0?uncaughtFrozenStore(this)["delete"](key):data&&$has(data,this._i)&&delete data[this._i]},has:function(key){if(!isObject(key))return!1;var data=getWeak(key);return data===!0?uncaughtFrozenStore(this).has(key):data&&$has(data,this._i)}}),C},def:function(that,key,value){var data=getWeak(anObject(key),!0);return data===!0?uncaughtFrozenStore(that).set(key,value):data[that._i]=value,that},ufstore:uncaughtFrozenStore}},{"./_an-instance":28,"./_an-object":29,"./_array-methods":34,"./_for-of":58,"./_has":60,"./_is-object":70,"./_meta":83,"./_redefine-all":107}],43:[function(require,module,exports){"use strict";var global=require("./_global"),$export=require("./_export"),redefine=require("./_redefine"),redefineAll=require("./_redefine-all"),meta=require("./_meta"),forOf=require("./_for-of"),anInstance=require("./_an-instance"),isObject=require("./_is-object"),fails=require("./_fails"),$iterDetect=require("./_iter-detect"),setToStringTag=require("./_set-to-string-tag"),inheritIfRequired=require("./_inherit-if-required");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={},fixMethod=function(KEY){var fn=proto[KEY];redefine(proto,KEY,"delete"==KEY?function(a){return IS_WEAK&&!isObject(a)?!1:fn.call(this,0===a?0:a)}:"has"==KEY?function(a){return IS_WEAK&&!isObject(a)?!1:fn.call(this,0===a?0:a)}:"get"==KEY?function(a){return IS_WEAK&&!isObject(a)?void 0:fn.call(this,0===a?0:a)}:"add"==KEY?function(a){return fn.call(this,0===a?0:a),this}:function(a,b){return fn.call(this,0===a?0:a,b),this})};if("function"==typeof C&&(IS_WEAK||proto.forEach&&!fails(function(){(new C).entries().next()}))){var instance=new C,HASNT_CHAINING=instance[ADDER](IS_WEAK?{}:-0,1)!=instance,THROWS_ON_PRIMITIVES=fails(function(){instance.has(1)}),ACCEPT_ITERABLES=$iterDetect(function(iter){new C(iter)}),BUGGY_ZERO=!IS_WEAK&&fails(function(){for(var $instance=new C,index=5;index--;)$instance[ADDER](index,index);return!$instance.has(-0)});ACCEPT_ITERABLES||(C=wrapper(function(target,iterable){anInstance(target,C,NAME);var that=inheritIfRequired(new Base,target,C);return void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that),that}),C.prototype=proto,proto.constructor=C),(THROWS_ON_PRIMITIVES||BUGGY_ZERO)&&(fixMethod("delete"),fixMethod("has"),IS_MAP&&fixMethod("get")),(BUGGY_ZERO||HASNT_CHAINING)&&fixMethod(ADDER),IS_WEAK&&proto.clear&&delete proto.clear}else C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER),redefineAll(C.prototype,methods),meta.NEED=!0;return setToStringTag(C,NAME),O[NAME]=C,$export($export.G+$export.W+$export.F*(C!=Base),O),IS_WEAK||common.setStrong(C,NAME,IS_MAP),C}},{"./_an-instance":28,"./_export":53,"./_fails":55,"./_for-of":58,"./_global":59,"./_inherit-if-required":64,"./_is-object":70,"./_iter-detect":75,"./_meta":83,"./_redefine":108,"./_redefine-all":107,"./_set-to-string-tag":113}],44:[function(require,module,exports){var core=module.exports={version:"2.2.2"};"number"==typeof __e&&(__e=core)},{}],45:[function(require,module,exports){"use strict";var $defineProperty=require("./_object-dp"),createDesc=require("./_property-desc");module.exports=function(object,index,value){index in object?$defineProperty.f(object,index,createDesc(0,value)):object[index]=value}},{"./_object-dp":88,"./_property-desc":106}],46:[function(require,module,exports){var aFunction=require("./_a-function");module.exports=function(fn,that,length){if(aFunction(fn),void 0===that)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./_a-function":25}],47:[function(require,module,exports){"use strict";var anObject=require("./_an-object"),toPrimitive=require("./_to-primitive"),NUMBER="number";module.exports=function(hint){if("string"!==hint&&hint!==NUMBER&&"default"!==hint)throw TypeError("Incorrect hint");return toPrimitive(anObject(this),hint!=NUMBER)}},{"./_an-object":29,"./_to-primitive":131}],48:[function(require,module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},{}],49:[function(require,module,exports){module.exports=!require("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":55}],50:[function(require,module,exports){var isObject=require("./_is-object"),document=require("./_global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./_global":59,"./_is-object":70}],51:[function(require,module,exports){module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],52:[function(require,module,exports){var getKeys=require("./_object-keys"),gOPS=require("./_object-gops"),pIE=require("./_object-pie");module.exports=function(it){var result=getKeys(it),getSymbols=gOPS.f;if(getSymbols)for(var key,symbols=getSymbols(it),isEnum=pIE.f,i=0;symbols.length>i;)isEnum.call(it,key=symbols[i++])&&result.push(key);return result}},{"./_object-gops":94,"./_object-keys":97,"./_object-pie":98}],53:[function(require,module,exports){var global=require("./_global"),core=require("./_core"),hide=require("./_hide"),redefine=require("./_redefine"),ctx=require("./_ctx"),PROTOTYPE="prototype",$export=function(type,name,source){var key,own,out,exp,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,target=IS_GLOBAL?global:IS_STATIC?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports[PROTOTYPE]||(exports[PROTOTYPE]={});IS_GLOBAL&&(source=name);for(key in source)own=!IS_FORCED&&target&&void 0!==target[key],out=(own?target:source)[key],exp=IS_BIND&&own?ctx(out,global):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,target&&redefine(target,key,out,type&$export.U),exports[key]!=out&&hide(exports,key,exp),IS_PROTO&&expProto[key]!=out&&(expProto[key]=out)};global.core=core,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},{"./_core":44,"./_ctx":46,"./_global":59,"./_hide":61,"./_redefine":108}],54:[function(require,module,exports){var MATCH=require("./_wks")("match");module.exports=function(KEY){var re=/./;try{"/./"[KEY](re)}catch(e){try{return re[MATCH]=!1,!"/./"[KEY](re)}catch(f){}}return!0}},{"./_wks":136}],55:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},{}],56:[function(require,module,exports){"use strict";var hide=require("./_hide"),redefine=require("./_redefine"),fails=require("./_fails"),defined=require("./_defined"),wks=require("./_wks");module.exports=function(KEY,length,exec){var SYMBOL=wks(KEY),fns=exec(defined,SYMBOL,""[KEY]),strfn=fns[0],rxfn=fns[1];fails(function(){var O={};return O[SYMBOL]=function(){return 7},7!=""[KEY](O)})&&(redefine(String.prototype,KEY,strfn),hide(RegExp.prototype,SYMBOL,2==length?function(string,arg){return rxfn.call(string,this,arg)}:function(string){return rxfn.call(string,this)}))}},{"./_defined":48,"./_fails":55,"./_hide":61,"./_redefine":108,"./_wks":136}],57:[function(require,module,exports){"use strict";var anObject=require("./_an-object");module.exports=function(){var that=anObject(this),result="";return that.global&&(result+="g"),that.ignoreCase&&(result+="i"),that.multiline&&(result+="m"),that.unicode&&(result+="u"),that.sticky&&(result+="y"),result}},{"./_an-object":29}],58:[function(require,module,exports){var ctx=require("./_ctx"),call=require("./_iter-call"),isArrayIter=require("./_is-array-iter"),anObject=require("./_an-object"),toLength=require("./_to-length"),getIterFn=require("./core.get-iterator-method");module.exports=function(iterable,entries,fn,that,ITERATOR){var length,step,iterator,iterFn=ITERATOR?function(){return iterable}:getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0;if("function"!=typeof iterFn)throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++)entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]);else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;)call(iterator,f,step.value,entries)}},{"./_an-object":29,"./_ctx":46,"./_is-array-iter":67,"./_iter-call":72,"./_to-length":129,"./core.get-iterator-method":137}],59:[function(require,module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},{}],60:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],61:[function(require,module,exports){var dP=require("./_object-dp"),createDesc=require("./_property-desc");module.exports=require("./_descriptors")?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},{"./_descriptors":49,"./_object-dp":88,"./_property-desc":106}],62:[function(require,module,exports){module.exports=require("./_global").document&&document.documentElement},{"./_global":59}],63:[function(require,module,exports){module.exports=!require("./_descriptors")&&!require("./_fails")(function(){return 7!=Object.defineProperty(require("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":49,"./_dom-create":50,"./_fails":55}],64:[function(require,module,exports){var isObject=require("./_is-object"),setPrototypeOf=require("./_set-proto").set;module.exports=function(that,target,C){var P,S=target.constructor;return S!==C&&"function"==typeof S&&(P=S.prototype)!==C.prototype&&isObject(P)&&setPrototypeOf&&setPrototypeOf(that,P),that}},{"./_is-object":70,"./_set-proto":111}],65:[function(require,module,exports){module.exports=function(fn,args,that){var un=void 0===that;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},{}],66:[function(require,module,exports){var cof=require("./_cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return"String"==cof(it)?it.split(""):Object(it)}},{"./_cof":39}],67:[function(require,module,exports){var Iterators=require("./_iterators"),ITERATOR=require("./_wks")("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return void 0!==it&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},{"./_iterators":77,"./_wks":136}],68:[function(require,module,exports){var cof=require("./_cof");module.exports=Array.isArray||function(arg){return"Array"==cof(arg)}},{"./_cof":39}],69:[function(require,module,exports){var isObject=require("./_is-object"),floor=Math.floor;module.exports=function(it){return!isObject(it)&&isFinite(it)&&floor(it)===it}},{"./_is-object":70}],70:[function(require,module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},{}],71:[function(require,module,exports){var isObject=require("./_is-object"),cof=require("./_cof"),MATCH=require("./_wks")("match");module.exports=function(it){var isRegExp;return isObject(it)&&(void 0!==(isRegExp=it[MATCH])?!!isRegExp:"RegExp"==cof(it))}},{"./_cof":39,"./_is-object":70,"./_wks":136}],72:[function(require,module,exports){var anObject=require("./_an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];throw void 0!==ret&&anObject(ret.call(iterator)),e}}},{"./_an-object":29}],73:[function(require,module,exports){"use strict";var create=require("./_object-create"),descriptor=require("./_property-desc"),setToStringTag=require("./_set-to-string-tag"),IteratorPrototype={};require("./_hide")(IteratorPrototype,require("./_wks")("iterator"),function(){return this}),module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)}),setToStringTag(Constructor,NAME+" Iterator")}},{"./_hide":61,"./_object-create":87,"./_property-desc":106,"./_set-to-string-tag":113,"./_wks":136}],74:[function(require,module,exports){"use strict";var LIBRARY=require("./_library"),$export=require("./_export"),redefine=require("./_redefine"),hide=require("./_hide"),has=require("./_has"),Iterators=require("./_iterators"),$iterCreate=require("./_iter-create"),setToStringTag=require("./_set-to-string-tag"),getPrototypeOf=require("./_object-gpo"),ITERATOR=require("./_wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var methods,key,IteratorPrototype,getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function(){return new Constructor(this,kind)};case VALUES:return function(){return new Constructor(this,kind)}}return function(){return new Constructor(this,kind)}},TAG=NAME+" Iterator",DEF_VALUES=DEFAULT==VALUES,VALUES_BUG=!1,proto=Base.prototype,$native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),$entries=DEFAULT?DEF_VALUES?getMethod("entries"):$default:void 0,$anyNative="Array"==NAME?proto.entries||$native:$native;if($anyNative&&(IteratorPrototype=getPrototypeOf($anyNative.call(new Base)),IteratorPrototype!==Object.prototype&&(setToStringTag(IteratorPrototype,TAG,!0),LIBRARY||has(IteratorPrototype,ITERATOR)||hide(IteratorPrototype,ITERATOR,returnThis))),DEF_VALUES&&$native&&$native.name!==VALUES&&(VALUES_BUG=!0,$default=function(){return $native.call(this)}),LIBRARY&&!FORCED||!BUGGY&&!VALUES_BUG&&proto[ITERATOR]||hide(proto,ITERATOR,$default),Iterators[NAME]=$default,Iterators[TAG]=returnThis,DEFAULT)if(methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:$entries},FORCED)for(key in methods)key in proto||redefine(proto,key,methods[key]);else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods);return methods}},{"./_export":53,"./_has":60,"./_hide":61,"./_iter-create":73,"./_iterators":77,"./_library":79,"./_object-gpo":95,"./_redefine":108,"./_set-to-string-tag":113,"./_wks":136}],75:[function(require,module,exports){var ITERATOR=require("./_wks")("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR]();riter["return"]=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return!1;var safe=!1;try{var arr=[7],iter=arr[ITERATOR]();iter.next=function(){return{done:safe=!0}},arr[ITERATOR]=function(){return iter},exec(arr)}catch(e){}return safe}},{"./_wks":136}],76:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],77:[function(require,module,exports){module.exports={}},{}],78:[function(require,module,exports){var getKeys=require("./_object-keys"),toIObject=require("./_to-iobject");module.exports=function(object,el){for(var key,O=toIObject(object),keys=getKeys(O),length=keys.length,index=0;length>index;)if(O[key=keys[index++]]===el)return key}},{"./_object-keys":97,"./_to-iobject":128}],79:[function(require,module,exports){module.exports=!1},{}],80:[function(require,module,exports){var $expm1=Math.expm1;module.exports=!$expm1||$expm1(10)>22025.465794806718||$expm1(10)<22025.465794806718||-2e-17!=$expm1(-2e-17)?function(x){return 0==(x=+x)?x:x>-1e-6&&1e-6>x?x+x*x/2:Math.exp(x)-1}:$expm1},{}],81:[function(require,module,exports){module.exports=Math.log1p||function(x){return(x=+x)>-1e-8&&1e-8>x?x-x*x/2:Math.log(1+x)}},{}],82:[function(require,module,exports){module.exports=Math.sign||function(x){return 0==(x=+x)||x!=x?x:0>x?-1:1}},{}],83:[function(require,module,exports){var META=require("./_uid")("meta"),isObject=require("./_is-object"),has=require("./_has"),setDesc=require("./_object-dp").f,id=0,isExtensible=Object.isExtensible||function(){return!0},FREEZE=!require("./_fails")(function(){return isExtensible(Object.preventExtensions({}))}),setMeta=function(it){setDesc(it,META,{value:{i:"O"+ ++id,w:{}}})},fastKey=function(it,create){if(!isObject(it))return"symbol"==typeof it?it:("string"==typeof it?"S":"P")+it;if(!has(it,META)){if(!isExtensible(it))return"F";if(!create)return"E";setMeta(it)}return it[META].i},getWeak=function(it,create){if(!has(it,META)){if(!isExtensible(it))return!0;if(!create)return!1;setMeta(it)}return it[META].w},onFreeze=function(it){return FREEZE&&meta.NEED&&isExtensible(it)&&!has(it,META)&&setMeta(it),it},meta=module.exports={KEY:META,NEED:!1,fastKey:fastKey,getWeak:getWeak,onFreeze:onFreeze}},{"./_fails":55,"./_has":60,"./_is-object":70,"./_object-dp":88,"./_uid":135}],84:[function(require,module,exports){var Map=require("./es6.map"),$export=require("./_export"),shared=require("./_shared")("metadata"),store=shared.store||(shared.store=new(require("./es6.weak-map"))),getOrCreateMetadataMap=function(target,targetKey,create){var targetMetadata=store.get(target);if(!targetMetadata){if(!create)return;store.set(target,targetMetadata=new Map)}var keyMetadata=targetMetadata.get(targetKey);if(!keyMetadata){if(!create)return;targetMetadata.set(targetKey,keyMetadata=new Map)}return keyMetadata},ordinaryHasOwnMetadata=function(MetadataKey,O,P){var metadataMap=getOrCreateMetadataMap(O,P,!1);return void 0===metadataMap?!1:metadataMap.has(MetadataKey)},ordinaryGetOwnMetadata=function(MetadataKey,O,P){var metadataMap=getOrCreateMetadataMap(O,P,!1);return void 0===metadataMap?void 0:metadataMap.get(MetadataKey)},ordinaryDefineOwnMetadata=function(MetadataKey,MetadataValue,O,P){getOrCreateMetadataMap(O,P,!0).set(MetadataKey,MetadataValue)},ordinaryOwnMetadataKeys=function(target,targetKey){var metadataMap=getOrCreateMetadataMap(target,targetKey,!1),keys=[];return metadataMap&&metadataMap.forEach(function(_,key){keys.push(key)}),keys},toMetaKey=function(it){return void 0===it||"symbol"==typeof it?it:String(it)},exp=function(O){$export($export.S,"Reflect",O)};module.exports={store:store,map:getOrCreateMetadataMap,has:ordinaryHasOwnMetadata,get:ordinaryGetOwnMetadata,set:ordinaryDefineOwnMetadata,keys:ordinaryOwnMetadataKeys,key:toMetaKey,exp:exp}},{"./_export":53,"./_shared":115,"./es6.map":169,"./es6.weak-map":275}],85:[function(require,module,exports){var head,last,notify,global=require("./_global"),macrotask=require("./_task").set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode="process"==require("./_cof")(process),flush=function(){var parent,fn;for(isNode&&(parent=process.domain)&&parent.exit();head;)fn=head.fn,fn(),head=head.next;last=void 0,parent&&parent.enter()};if(isNode)notify=function(){process.nextTick(flush)};else if(Observer){var toggle=!0,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=!toggle}}else notify=Promise&&Promise.resolve?function(){Promise.resolve().then(flush)}:function(){macrotask.call(global,flush)};module.exports=function(fn){var task={fn:fn,next:void 0};last&&(last.next=task),head||(head=task,notify()),last=task}},{"./_cof":39,"./_global":59,"./_task":125}],86:[function(require,module,exports){"use strict";var getKeys=require("./_object-keys"),gOPS=require("./_object-gops"),pIE=require("./_object-pie"),toObject=require("./_to-object"),IObject=require("./_iobject"),$assign=Object.assign;module.exports=!$assign||require("./_fails")(function(){var A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";return A[S]=7,K.split("").forEach(function(k){B[k]=k}),7!=$assign({},A)[S]||Object.keys($assign({},B)).join("")!=K})?function(target,source){for(var T=toObject(target),aLen=arguments.length,index=1,getSymbols=gOPS.f,isEnum=pIE.f;aLen>index;)for(var key,S=IObject(arguments[index++]),keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S),length=keys.length,j=0;length>j;)isEnum.call(S,key=keys[j++])&&(T[key]=S[key]);return T}:$assign},{"./_fails":55,"./_iobject":66,"./_object-gops":94,"./_object-keys":97,"./_object-pie":98,"./_to-object":130}],87:[function(require,module,exports){var anObject=require("./_an-object"),dPs=require("./_object-dps"),enumBugKeys=require("./_enum-bug-keys"),IE_PROTO=require("./_shared-key")("IE_PROTO"),Empty=function(){},PROTOTYPE="prototype",createDict=function(){var iframeDocument,iframe=require("./_dom-create")("iframe"),i=enumBugKeys.length,gt=">";for(iframe.style.display="none",require("./_html").appendChild(iframe),iframe.src="javascript:",iframeDocument=iframe.contentWindow.document,iframeDocument.open(),iframeDocument.write("