").addClass("dragAvatar timelineContent bringToFront selected").hide();t("body").append(i),i.append(this.$selection.clone()),this.cssClassSelector&&i.append(this.$el.find("."+this.cssClassSelector).clone());var n=this.$selection.offset(),o=r.getEventPos(e),s=n.top-o.pageY,a=n.left-o.pageX-this.value[0]*this.scale;return{type:"dragSliderContent",dragLockToAxis:!0,restrictToXAxis:!1,restrictToYAxis:!1,moveXThreshold:20,moveYThreshold:20,data:{slider:this,avatar:i},avatar:i[0],avatarXOffset:a,avatarYOffset:s}},onDragStart:function(e,t){this.draggingElement="content",t.dragObject.data.avatar.show(),this.cssClassSelector&&(this.$cssClassSelector=this.$el.find("."+this.cssClassSelector),this.$cssClassSelector.hide()),this.$selection.hide(),this.isDragging=!0},onMove:function(e,t){var i=t.dragObject.position.x-t.dragObject.startPosition.x;this.dragValue=this._move(i/this.scale+this.value[0],this.value[1]-this.value[0],!0)},onDragDone:function(e,t){this.$selection.show(),this.cssClassSelector&&this.$cssClassSelector.show(),t.dragObject.data.avatar.hide(),this.trigger("dragSlider:isDropped",i.extend({id:this.id},t))}},_onKeyPress:function(e){var n=t(e.currentTarget),o=n.hasClass("lefthandle"),s=n.hasClass("righthandle");if(13===e.keyCode||32===e.keyCode)return this._select(e),n.toggleClass("active",o||s),void n.focus();var r={title:this.title},a=0,l=0,c="";switch(e.keyCode){case 9:return void n.toggleClass("active",!1);case 37:a=-.1;break;case 39:a=.1;break;case 38:if(o||s)return e.stopPropagation(),void e.preventDefault();l=-1;break;case 40:if(o||s)return e.stopPropagation(),void e.preventDefault();l=1;break;default:return}if(e.stopPropagation(),e.preventDefault(),n.toggleClass("active",o||s),this._startArrowKeyMove(),o){var d=a+this.value[0],h=this.value[1]-this.value[0]-a;d<0?h+=d:d>this.value[1]&&(d=this.value[1]),this.dragValue=this._move(d,h,!0)}else if(s)this.dragValue=this._move(this.value[0],a+(this.value[1]-this.value[0]),!0);else if(0!=a)this.dragValue=this._move(a+this.value[0],this.value[1]-this.value[0],!0);else{var u={id:this.id,payloadData:{undoRedoTransactionId:i.uniqueId("dragSlider")}},g=l>0?"dragSlider:movingDown":"dragSlider:movingUp";this.trigger(g,u),this.trigger("dragSlider:isDropped",u)}this.dragValue&&(r.newStartTime=this._roundValueForScreenReader(this.dragValue[0]),r.newEndTime=this._roundValueForScreenReader(this.dragValue[1]),this._move(this.dragValue[0],this.dragValue[1]-this.dragValue[0]),this.dragValue=null,this._notifyValueChanged()),r.resourceName=o?"timelineMoveWidgetStartTime":s?"timelineMoveWidgetEndTime":l<0?"timelineMoveWidgetUp":l>0?"timelineMoveWidgetDown":"timelineMoveWidget",this._update(),c=this.stringResources.get(r.resourceName,r),this._ScreenReader.callOut(c)},_roundValueForScreenReader:function(e){return Math.round(100*e)/100},_isTouchMode:function(){return"ontouchstart"in document.documentElement}});return c}),define("text!storytelling/views/templates/TimelineHighlightIndicatorView.html",[],function(){return'
'}),define("storytelling/views/highlight/TimelineHighlightAction",["dashboard-analytics/visualizations/interactions/FilterAction","jquery","underscore"],function(e,t,i){return e.extend({init:function(e,t,i,n,o,s,r){this.visualization=e,this.slot=t,this.dataItem=t.getDataItemList()[i],this.mapIndex=i,this.pageContextAPI=n,this.services=o,this.logger=s,this.itemContext={uniqueId:this.dataItem.getId(),itemId:this.dataItem.getColumnId(),itemName:this.dataItem.getLabel(),dataType:this.dataItem.getDataType(),sourceId:this.visualization.getDataSource().getId()},this.renderModule=this.getEditorModuleName(),this.highlightAct=r},removeFilter:function(e){var n=t.extend(!0,[],this.highlightAct.get("payload"));i.find(this.highlightAct.payload,function(t,i){if(t.columnId===e){if(!t.operator)return!0;var o={columnId:n[i].columnId,columnLabel:n[i].columnLabel,id:n[i].columnId,values:[]};return n[i].aggregationType&&(o.aggregationType=n[i].aggregationType),n[i]=o,this.highlightAct.set({payload:n}),!0}}.bind(this))},getEditorModuleName:function(){return"storytelling/views/highlight/TimelineHighlightEditWrapperView"}})}),define("storytelling/views/highlight/TimelineHighlightFlyoutController",["underscore","dashboard-analytics/visualizations/renderer/filter/FilterLabelHelper","./TimelineHighlightAction"],function(e,t,i){return function(){function n(e){_classCallCheck(this,n),this.highlightAct=e.highlightAct,this.launchView=e.launchView,this.launchPoint=e.launchPoint,this.backButtonCallback=e.show,this.dashboardApi=e.dashboardApi,this.pageContextAPI=e.pageContextAPI,this.services=e.services,this.logger=this.dashboardApi.getGlassCoreSvc(".Logger"),this.stringResources=this.dashboardApi.getDashboardCoreSvc(".StringResources"),this.content=e.content,this.visualization=e.visualization,this.filterLabelHelper=new t({dataSource:this.visualization.getDataSource(),timelineFilter:"timelineFilter",filterLineEnabled:this._isFilterLineEnabled,filterLineDeleteEnabled:this._isFilterLineDeleteEnabled,dashboardApi:this.dashboardApi})}return n.prototype.onEditTimelineFilter=function(e,t){this.editTimelineFilter(t,e.currentTarget)},n.prototype.onRemoveTimelineFilter=function(t,n){t.stopPropagation();var o=e.find(this.visualization.getSlots().getMappingInfoList(),function(e){return e.dataItem.getColumnId()===n}),s=o.slot,r=o.indexInSlot;new i(this.visualization,s,r,this.pageContextAPI,this.services,this.logger,this.highlightAct).removeFilter(n)},n.prototype.getItemActions=function(){return this._generateFilterListItems(this.highlightAct.get("payload"))},n.prototype._generateFilterListItems=function(e){var t=this,i=this.filterLabelHelper.generateFilterListItems(e);return i.forEach(function(e){e.editLabel=t.stringResources.get("editTimelineHighlight"),e.deleteLabel=t.stringResources.get("deleteTimelineHighlight"),e.editAction=t.onEditTimelineFilter.bind(t),e.deleteAction=t.onRemoveTimelineFilter.bind(t)}),i},n.prototype.editTimelineFilter=function(t,n){if(!n)return Promise.resolve();var o=[e.findWhere(this.highlightAct.get("payload"),{columnId:t})],s=e.find(this.visualization.getSlots().getMappingInfoList(),function(e){return e.dataItem.getColumnId()===t}),r=s.slot,a=s.dataItem,l=s.indexInSlot,c=new i(this.visualization,r,l,this.pageContextAPI,this.services,this.logger,this.highlightAct),d=c.getEditorModuleName(),h={columnId:t,filterSpec:o,highlightAct:this.highlightAct,columnTitle:a.getLabel(),title:this.stringResources.get("timelineHighlightTitle"),slot:r,dashboardApi:this.dashboardApi,pageContextAPI:this.pageContextAPI,services:this.services,itemContext:c.itemContext};return this.content.getFeature("InteractivityController.deprecated").getActionHelper().renderFilterDialog(d,h,this.launchPoint,this.launchView,this.backButtonCallback)},n.prototype._isFilterLineDeleteEnabled=function(e){return Boolean(e.values.length)},n.prototype._isFilterLineEnabled=function(){return!0},n}()}),define("storytelling/views/TimelineHighlightIndicatorView",["baglass/core-client/js/core-client/ui/core/View","jquery","gemini/app/util/ScreenReaderUtil","storytelling-ui/storytelling-ui.min","text!./templates/TimelineHighlightIndicatorView.html","dashboard-analytics/visualizations/renderer/filter/FilterLabelHelper","./highlight/TimelineHighlightFlyoutController","react","react-dom","../util/WidgetHelper"],function(e,t,i,n,o,s,r,a,l,c){var d=e.extend({templateString:o,init:function(e){d.inherited("init",this,arguments),this.controller=e.controller,this.widgetId=e.widgetId,this.scaleManager=e.scaleManager,this.episodeModel=e.episodeModel,this.highlightAct=e.highlightAct,this.id=e.highlightAct.id,this.services=e.services,this.dashboardApi=e.dashboardApi,this.widgetHelper=new c({dashboardApi:this.dashboardApi}),this.widget=this.widgetHelper.getWidget(this.widgetId),this.content=this.widgetHelper.getContent(this.widgetId),this.widget&&this.content&&(this.visualization=this.content.getFeature("Visualization"),this.filterLabelHelper=new s({dataSource:this.visualization.getDataSource(),dashboardApi:this.dashboardApi})),this.pageContextAPI=this.controller.model.pageContext.getAPI(),this.extraCssClass=e.extraCssClass||"",this._ScreenReader=new i,this.stringResources=this.dashboardApi.getDashboardCoreSvc(".StringResources"),this.flyoutHolder=document.createElement("div"),this.flyoutHolder.classList.add("flyout-holder")},render:function(){var e=this._getTooltipLabel();this.el.id="timelineHighlight_"+this.id,this.el.setAttribute("role","application"),this.el.className="timelineHighlight "+this.extraCssClass,this.el.setAttribute("tabindex","0"),this.el.dataset.selector="true",this.el.dataset.id=this.id,e&&(this.el.setAttribute("aria-label",e),this.el.setAttribute("title",e));var t=this.dotTemplate({id:this.id});this.$el.html(t),this._indicatorWidth=this.$el.outerWidth(),this._handleWidth=this.$el.closest(".sliderContent").find(".handle").outerWidth(),this._updateHighlightPosition(this.highlightAct.timer,!1),this._updateHighlightState(),this._registerEvents()},remove:function(){this._unregisterEvents(),d.inherited("remove",this,arguments)},onSliderChange:function(){this._updateHighlightPosition(this.highlightAct.timer,!1)},onScaleChange:function(){this._updateHighlightPosition(this.highlightAct.timer,!1)},onPayloadChange:function(){this._updateHighlightState(),this._updateTooltipLabel()},_updateHighlightState:function(){this.highlightAct.get("payload").filter(function(e){return e.operator}).length?this.$el.removeClass("empty"):this.$el.addClass("empty")},_updateHighlightPosition:function(e,t){var i=this.controller.getTickDuration();e=Math.round(e/i)*i;var n=this.scaleManager.convertTimeToPosition(e);return n-=this._indicatorWidth/2,t||(n=this._limitPositionToInsideHandles(n)),this.$el.css("left",n+"px"),n},launchHighlightSummaryDialog:function(){this.flyoutView=new r({dashboardApi:this.dashboardApi,content:this.content,visualization:this.visualization,pageContextAPI:this.pageContextAPI,services:this.services,highlightAct:this.highlightAct,launchView:this,show:this.launchHighlightSummaryDialog,launchPoint:this.$el.get(0)}),this.$el.append(this.flyoutHolder),this._flyout=a.createElement(n.HighlightSummaryFlyout,{anchorElement:this.$el.get(0),closeFlyout:this.closeFlyout.bind(this),itemActions:this.flyoutView.getItemActions(),title:this.stringResources.get("timelineHighlightTitle")}),l.render(this._flyout,this.flyoutHolder)},getPlacement:function(){return"top"},_registerEvents:function(){this._dragStartCallback=this._onDragStart.bind(this),this._dragLeftRightCallback=this._onDragLeftRight.bind(this),this._dragEndCallback=this._onDragEnd.bind(this),this._clickCallback=this._onClick.bind(this),this._onKeyPressCallback=this._onKeyPress.bind(this),this.$el.hammer({correct_for_drag_min_distance:!1}).on("dragstart",this._dragStartCallback).on("dragleft",this._dragLeftRightCallback).on("dragright",this._dragLeftRightCallback).on("dragend",this._dragEndCallback),this.$el.find(".svgIcon").on("primaryaction",this._clickCallback),this.$el.on("keydown",this._onKeyPressCallback)},setTime:function(e){this._updateHighlightPosition(e,!1)},_unregisterEvents:function(){this._flyout&&this.closeFlyout(),this.$el&&(this.$el.off("dragstart",null,this._dragStartCallback).off("dragleft",null,this._dragLeftRightCallback).off("dragright",null,this._dragLeftRightCallback).off("dragend",null,this._dragEndCallback),this.$el.find(".svgIcon").off("primaryaction",this._clickCallback),this.$el.off("keydown",this._onKeyPressCallback))},_onDragLeftRight:function(e){if(e.gesture){e.gesture.preventDefault(),e.gesture.stopPropagation();var t=this._positionFromLeft+e.gesture.deltaX,i=this.scaleManager.convertPositionToTime(t);i=this._limitTimerToSlider(i),this._updateHighlightPosition(i,!0)}},_onDragEnd:function(e){if(e.gesture){e.gesture.stopPropagation(),this.controller.trigger("timeline:highlightIndicatorDragEnded");var t=this._positionFromLeft+e.gesture.deltaX,i=this.scaleManager.convertPositionToTime(t);i=this._limitTimerToSlider(i),this._updateHighlightPosition(i,!1),this.controller.updateTimelineHighlight(this.widgetId,this.id,{timer:i})}this._dragEnd=!0},_onDragStart:function(){this.closeFlyout(),this.controller.trigger("timeline:highlightIndicatorDragStarted",this.widgetId);var e=this.scaleManager.convertTimeToPosition(this.highlightAct.timer);this._positionFromLeft=this._limitPositionToInsideHandles(e)},_updateTooltipLabel:function(){var e=this._getTooltipLabel();e!==this.$el.attr("title")&&(this.$el.attr("title",e),this.$el.attr("aria-label",e))},_getTooltipLabel:function(){var e=this,t=this.stringResources.get("timelineHighlightTitle");if(this.filterLabelHelper){this.filterLabelHelper.generateFilterListItems(this.highlightAct.payload).forEach(function(i){t+="\n",t+=e.stringResources.get("filter_tooltip",{title:i.title,description:i.description})})}return t},_onClick:function(e){if("click"===e.type&&this._dragEnd)return void(this._dragEnd=!1);if(e.stopPropagation(),e.preventDefault(),!this.visAPI){var t=this.widgetHelper.getWidget(this.widgetId),i=this.widgetHelper.getContent(this.widgetId);if(!t||!i)return;this.visAPI=t.getVisApi&&t.getVisApi(),this.visualization=i.getFeature("Visualization")}this.$el.append(this.flyoutHolder);var o=a.createElement(n.HighlightFlyout,{widgetId:this.widgetId,actId:this.id,controller:this.controller,anchorElement:this.$el.get(0),closeFlyout:this.closeFlyout.bind(this),openSummaryDialog:this.launchHighlightSummaryDialog.bind(this)});l.render(o,this.flyoutHolder)},_onKeyPress:function(e){t(e.currentTarget).focus();var i=0;switch(e.keyCode){case 13:case 32:return void this._onClick(e);case 37:i=this.scaleManager.convertPositionToTime(-20);break;case 39:i=this.scaleManager.convertPositionToTime(20);break;case 38:case 40:return e.stopPropagation(),void e.preventDefault();default:return}e.stopPropagation(),e.preventDefault();var n=this._limitTimerToSlider(this.highlightAct.timer+i);this._updateHighlightPosition(n,!1),this.controller.updateTimelineHighlight(this.widgetId,this.id,{timer:n});var o={id:this.id,time:n},s=this.stringResources.get("timeline_highlight_moved_to",o);this._ScreenReader.callOut(s)},_limitTimerToSlider:function(e){return e=Math.max(e,this.episodeModel.getEntranceAct().timer+1),e=Math.min(e,this.episodeModel.getExitAct().timer-1)},_limitPositionToInsideHandles:function(e){var t=this.episodeModel.getEntranceAct().timer,i=this.scaleManager.convertTimeToPosition(t);i+=this._handleWidth;var n=this.episodeModel.getExitAct().timer,o=this.scaleManager.convertTimeToPosition(n);o-=this._handleWidth+this._indicatorWidth,e=Math.min(e,o),e=Math.max(e,i);var s=this.scaleManager.convertTimeToPosition(n-t-2*this._handleWidth);return s
'});r.a.add(a),t.a=a}},["67a028d36a358d57b346"])}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/zoom-out_16",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([3],{"260d0f7fca78ef9be641":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("bf8b125c61ce0c4e0359"));t.default=o.a},"3865314c5959606874d4":function(t,i){t.exports=e},bf8b125c61ce0c4e0359:function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"zoom-out_16_v6",use:"zoom-out_16_v6-usage",viewBox:"0 0 16 16",content:' '});r.a.add(a),t.a=a}},["260d0f7fca78ef9be641"])}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/zoom-fit_16",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([11],{"3865314c5959606874d4":function(t,i){t.exports=e},"57d26dcbc4c7ec6b0dbf":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("939e1d4ea6e9e284e10c"));t.default=o.a},"939e1d4ea6e9e284e10c":function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"zoom-fit_16_v6",use:"zoom-fit_16_v6-usage",viewBox:"0 0 16 16",content:' '});r.a.add(a),t.a=a}},["57d26dcbc4c7ec6b0dbf"])}),define("storytelling/views/TimelineView",["baglass/core-client/js/core-client/ui/core/View","jquery","underscore","text!./templates/TimelineView.html","./TimelineRulerView","./TimelineTimeIndicatorView","./TimelineSliderView","./SnapIndicatorView","storytelling-ui/storytelling-ui.min","react","react-dom","../ScaleManager","baglass/core-client/js/core-client/utils/Utils","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/zoom-in_16","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/zoom-out_16","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/zoom-fit_16","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/minimize_16"],function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,f,p,m){var v=e.extend({templateString:n,events:{"primaryaction .zoomIn":"onZoomInClick","primaryaction .zoomOut":"onZoomOutClick","primaryaction .zoomFit":"onZoomToFitClick","primaryaction .timelineRuler":"onTimelineRulerClick"},init:function(e){v.inherited("init",this,arguments),this.storyController=e.storyController,this.controller=e.controller,this.dashboardApi=e.dashboardApi,this.dndManager=e.dndManager,this.glassContext=e.glassContext,this.services=e.services,this.stringResources=this.dashboardApi.getDashboardCoreSvc(".StringResources"),this.zoom=1,this.rangeSliders=null,this.rangeSlidersMap=null,this.scaleManager=new h},render:function(){this.controller.on("duration:changed",this.onDurationChanged,this),this.controller.on("modelEpisode:added",this.onWidgetAdded,this),this.controller.on("modelEpisode:removed",this.onWidgetRemoved,this),this.controller.on("modelEpisode:changed",this.onModelEpisodeChanged,this),this.controller.on("modelEpisodes:reorder",this.onModelEpisodesReorder,this),this.controller.on("slider:change",this.onSliderTitleChange,this),this.controller.on("timeline:change",this.onSliderChange,this),this.controller.on("timeline:willChange",this.onSliderWillChange,this),this.controller.on("timeline:select",this.onSliderSelect,this),this.controller.on("timeline:movingUp",this.onSliderMoveUp,this),this.controller.on("timeline:movingDown",this.onSliderMoveDown,this),this.controller.on("timeline:doneMoving",this.onSliderDrop,this),this.controller.on("timeline:sliderDragStarted",this.onDragStarted,this),this.controller.on("timeline:highlightIndicatorDragStarted",this.highlightIndicatorDragStarted,this),this.controller.on("timeline:highlightIndicatorDragEnded",this.highlightIndicatorDragEnded,this),this.scaleManager.on("scale:change",this.onScaleChanged,this),t(window).on("resize.privateViewEvents"+this.viewId,this.onResize.bind(this));var e=this.dotTemplate({timelineRightContainerLabel:this.stringResources.get("timelineRightContainerLabel"),collapseScene:this.stringResources.get("close"),zoomToFit:this.stringResources.get("timelineZoomFit"),zoomIn:this.stringResources.get("timelineZoomIn"),zoomOut:this.stringResources.get("timelineZoomOut")});this.$el.addClass("timeline").attr("role","region").attr("aria-label",this.stringResources.get("timelineViewLabel")).html(e),this.$scrollContainer=this.$(".timelineContent"),this.$timelineSliders=this.$scrollContainer.find(".timelineSliders"),this.$blanket=this.$el.find(".timelineBlanket"),this.$leftContainer=this.$el.find(".leftContainer");var i=this.$el.find(".rightContainer");this.$zoomOutButton=i.find(".zoomOut"),this.$zoomInButton=i.find(".zoomIn"),this.$zoomFitButton=i.find(".zoomFit"),this.$collapseButton=i.find(".collapseScene"),u.setIcon(this.$zoomInButton,g.default.id),u.setIcon(this.$zoomOutButton,f.default.id),u.setIcon(this.$zoomFitButton,p.default.id),u.setIcon(this.$collapseButton,m.default.id),this.renderTimelineRowTracks(),this.renderTimelines(),this.renderRulerView(),this.scaleToFit(),this.registerHandlers(),this._updateSelectedSliders(),this.setFocus()},renderFadeIn:function(e){this.render(),this.hide(),this.$el.fadeIn(e)},fadeOut:function(e){this.$el.fadeOut(e)},renderRulerView:function(){this.timeRulerView=new o({el:this.$el.find(".timelineRuler"),controller:this.controller,scaleManager:this.scaleManager}),this.timeRulerView.render(),this.timeIndicatorView=new s({el:this.$el.find(".timelinePosition"),controller:this.controller,scaleManager:this.scaleManager,services:this.services}),this.timeIndicatorView.render(),this._fixRulerPosition()},renderSnapIndicatorView:function(){this.snapIndicatorView=new a({$slidersHolder:this.$el.find(".timelineSliders"),controller:this.controller,scaleManager:this.scaleManager}),this.snapIndicatorView.render()},registerHandlers:function(){this.$collapseButton.on("primaryaction",this.storyController.collapseScene.bind(this.storyController)),this.$scrollContainer.on("scroll",this.onScroll.bind(this))},onSliderTitleChange:function(){this.rangeSlidersMap&&i.each(this.rangeSlidersMap,function(e){var t=this._getWidgetTitle(e.id);t!==e.getLabel()&&e.setLabel(t)}.bind(this))},renderTimelineRowTracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=c.createElement(l.RowTrackView,{timelineEpisodes:this.controller.getTimelineEpisodes(),marginTop:e});d.render(t,this.$leftContainer[0])},renderTimelines:function(){this.rangeSlidersId=[],this.rangeSlidersMap&&i.each(this.rangeSlidersMap,function(e){e.remove()}),this.rangeSlidersMap={};var e=this._createTimelineInfos();i.each(e,function(e){this.renderTimeline(e)}.bind(this))},renderTimeline:function(e){var i=t("
").appendTo(this.$timelineSliders),n=new r({el:i,id:e.id,model:e.model,label:this._getWidgetTitle(e.id),scaleManager:this.scaleManager,timelineController:this.controller,glassContext:this.glassContext,dndManager:this.dndManager,services:this.services,dashboardApi:this.dashboardApi});n.render(),this.rangeSlidersId.push(e.id),this.rangeSlidersMap[e.id]=n},setFocus:function(){this.$el.find(".timelinePosition .handle").focus()},remove:function(){t(window).off("resize.privateViewEvents"+this.viewId),this.controller.off("duration:changed",this.onDurationChanged,this),this.controller.off("modelEpisode:added",this.onWidgetAdded,this),this.controller.off("modelEpisode:removed",this.onWidgetRemoved,this),this.controller.off("modelEpisode:changed",this.onModelEpisodeChanged,this),this.controller.off("modelEpisodes:reorder",this.onModelEpisodesReorder,this),this.controller.off("slider:change",this.onSliderTitleChange,this),this.controller.off("timeline:change",this.onSliderChange,this),this.controller.off("timeline:willChange",this.onSliderWillChange,this),this.controller.off("timeline:select",this.onSliderSelect,this),this.controller.off("timeline:movingUp",this.onSliderMoveUp,this),this.controller.off("timeline:movingDown",this.onSliderMoveDown,this),this.controller.off("timeline:doneMoving",this.onSliderDrop,this),this.controller.off("timeline:sliderDragStarted",this.onDragStarted,this),this.controller.off("timeline:highlightIndicatorDragStarted",this.highlightIndicatorDragStarted,this),this.controller.off("timeline:highlightIndicatorDragEnded",this.highlightIndicatorDragEnded,this),this.scaleManager.off("scale:change",this.onScaleChanged,this),this.timeRulerView=null,this.timeIndicatorView&&(this.timeIndicatorView.remove(),this.timeIndicatorView=null),this.$leftContainer&&this.$leftContainer.length&&d.unmountComponentAtNode(this.$leftContainer[0]),this.rangeSlidersId=null,this.rangeSlidersMap&&i.each(this.rangeSlidersMap,function(e){e.remove()}),this.rangeSlidersMap=null,v.inherited("remove",this,arguments)},scaleToFit:function(){var e=this.controller.getDuration();0===e&&(e=this.controller.getDefaultWidgetDuration()),this.scaleManager.updateDuration(e,this.$scrollContainer.outerWidth(!1)),this.scaleManager.scaleToFit()},onResize:function(){this.$el.is(":visible")&&(this.scaleToFit(),this.scaleManager.stepScale(this.zoom),this._updateTimelineWidth())},onScroll:function(){this._fixRulerPosition(),this._updateSelectedSliders()},onZoomInClick:function(){this.scaleManager.stepScale(2),this.zoom=2*this.zoom,this._updateZoomButtons()},onZoomOutClick:function(){this.scaleManager.stepScale(.5),this.zoom=.5*this.zoom,this._updateZoomButtons()},onZoomToFitClick:function(){this.scaleToFit(),this.zoom=1,this._updateZoomButtons()},onTimelineRulerClick:function(){this.timeIndicatorView.setFocus()},onSliderWillChange:function(e){this.controller.isPlaying()&&this.controller.pause(),e.getDragValue&&(this.controller.updateLastEstablishedEventQueue(),this.snapIndicatorView||this.renderSnapIndicatorView(),this.snapIndicatorView.showIndicator(e.getDragValue,e.getDraggingElement))},onSliderChange:function(){this._updateTimelineWidth(),this.lastStatePlaying&&this.controller.getCursorTime()=0&&(this.rangeSlidersId.splice(n,1),this.rangeSlidersMap[e].remove(),delete this.rangeSlidersMap[e]),this._onWidgetAddRemove()}},_getWidgetTitle:function(e){var t=this.dashboardApi.getCanvas().getContent(e),i=t.getFeature("Serializer").toJSON(),n=!!t.getPropertyValue("value.graphic.content"),o=Object.assign({},i.features.Models_internal,{hasGraphic:n});return this.dashboardApi.getFeature(".SmartNamingSvc").getWidgetName(o)},onModelEpisodeChanged:function(e){if(this.rangeSlidersMap){var t=this.rangeSlidersMap[e.id];if(t){var i=this._createTimelineValue(e.value);t.setValue(i,!0)}}},onModelEpisodesReorder:function(){var e=t(document.activeElement),n=this._createTimelineInfos();this.rangeSlidersId=[];var o=null;i.each(n,function(e){this.rangeSlidersId.push(e.id);var t=this._getSliderByModelId(e.id);o?o.after(t):this.$timelineSliders.prepend(t),o=t}.bind(this)),e.focus()},onShowSliderSelection:function(e){var t=this.rangeSlidersMap[e.widgetId];t&&(t.toggleSelected(!0),this._updateSelectedSlider(e.widgetId))},onSliderDrop:function(e){var t=i.indexOf(this.rangeSlidersId,e.id);this.controller.moveEpisodeBefore(e.id,this.rangeSlidersId[t+1],{payloadData:e.payloadData})},onDragStarted:function(e){this._closeFlyouts(e)},highlightIndicatorDragStarted:function(){this.$scrollContainer.css({overflow:"hidden"})},highlightIndicatorDragEnded:function(){this.$scrollContainer.css({overflow:"auto"})},onSliderMoveUp:function(e){var n=t(document.activeElement),o=i.indexOf(this.rangeSlidersId,e.id),s=e.to?i.indexOf(this.rangeSlidersId,e.to):o-1;if(!(-1===o||s<0)){for(;o>s;){var r=this._getSliderByModelId(this.rangeSlidersId[o]),a=this._getSliderByModelId(this.rangeSlidersId[o-1]);r.insertBefore(a);var l=this.rangeSlidersId[o-1];this.rangeSlidersId[o-1]=this.rangeSlidersId[o],this.rangeSlidersId[o]=l,o--}u.embedSVGIcon(this.$el),n.focus()}},onSliderMoveDown:function(e){var n=t(document.activeElement),o=i.indexOf(this.rangeSlidersId,e.id),s=e.to?i.indexOf(this.rangeSlidersId,e.to):o+1;if(!(-1===o||-1===s||s>=this.rangeSlidersId.length)){for(;othis.scaleManager.getMinScale();this.$zoomOutButton.toggleClass("disabled",!i),this.$zoomInButton.toggleClass("disabled",!t),this.$zoomInButton.attr("aria-disabled",!t),this.$zoomOutButton.attr("aria-disabled",!i)}});return v}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/chevron-down_16",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([1459],{"3865314c5959606874d4":function(t,i){t.exports=e},aa537d430eed17163a1c:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("f21266730b5c85314a2a"));t.default=o.a},f21266730b5c85314a2a:function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"chevron-down_16_v6",use:"chevron-down_16_v6-usage",viewBox:"0 0 16 16",content:' '});r.a.add(a),t.a=a}},["aa537d430eed17163a1c"])}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/add_16",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([1713],{"3865314c5959606874d4":function(t,i){t.exports=e},"3b1c227192eaf5ac253d":function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"add_16_v6",use:"add_16_v6-usage",viewBox:"0 0 16 16",content:' '});r.a.add(a),t.a=a},ad744edc6295a7b387a2:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("3b1c227192eaf5ac253d"));t.default=o.a}},["ad744edc6295a7b387a2"])}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/maximize_16",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([800],{"1fbfbad79d094b145b98":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("ddd6212080dade5a747e"));t.default=o.a},"3865314c5959606874d4":function(t,i){t.exports=e},ddd6212080dade5a747e:function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"maximize_16_v6",use:"maximize_16_v6-usage",viewBox:"0 0 16 16",content:' '});r.a.add(a),t.a=a}},["1fbfbad79d094b145b98"])}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/overflow-menu--horizontal_16",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([696],{"3865314c5959606874d4":function(t,i){t.exports=e},"3e093e5642cd68f65e20":function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"overflow-menu--horizontal_16_v6",use:"overflow-menu--horizontal_16_v6-usage",viewBox:"0 0 16 16",content:''});r.a.add(a),t.a=a},"7b8e9c951999a27dfd31":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("3e093e5642cd68f65e20"));t.default=o.a}},["7b8e9c951999a27dfd31"])}),function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i=window.webpackJsonPBaGraphics;window.webpackJsonPBaGraphics=function(n,s,r){for(var a,l,c,d=0,h=[];d"+e+""};return function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,i=this.render();return this.node=i,t.appendChild(i),i},t.prototype.render=function(){var e=this.stringify();return n(d(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,i),t}(i)}()}()}).call(t,i("698d75b157f24ae829cc"))},"9ce58a7deea14f49ef01":function(e,t,i){(function(t){!function(t,i){e.exports=function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function i(e){return e=e||Object.create(null),{on:function(t,i){(e[t]||(e[t]=[])).push(i)},off:function(t,i){e[t]&&e[t].splice(e[t].indexOf(i)>>>0,1)},emit:function(t,i){(e[t]||[]).map(function(e){e(i)}),(e["*"]||[]).map(function(e){e(t,i)})}}}function n(e,t){return C(e).reduce(function(e,i){if(!i.attributes)return e;var n=C(i.attributes),o=t?n.filter(t):n;return e.concat(o)},[])}function o(e){return e.replace(O,function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()})}function s(e,t,i){return C(e).forEach(function(e){var n=e.getAttribute(E);if(n&&0===n.indexOf(t)){var o=n.replace(t,i);e.setAttributeNS(M,E,o)}}),e}var r=("undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self,e(function(e,t){!function(t,i){e.exports=function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(e){return Array.isArray(e)?[]:{}}function i(i,n){return n&&!0===n.clone&&e(i)?s(t(i),i,n):i}function n(t,n,o){var r=t.slice();return n.forEach(function(n,a){void 0===r[a]?r[a]=i(n,o):e(n)?r[a]=s(t[a],n,o):-1===t.indexOf(n)&&r.push(i(n,o))}),r}function o(t,n,o){var r={};return e(t)&&Object.keys(t).forEach(function(e){r[e]=i(t[e],o)}),Object.keys(n).forEach(function(a){e(n[a])&&t[a]?r[a]=s(t[a],n[a],o):r[a]=i(n[a],o)}),r}function s(e,t,s){var r=Array.isArray(t),a=s||{arrayMerge:n},l=a.arrayMerge||n;return r?Array.isArray(e)?l(e,t,s):i(t,s):o(e,t,s)}return s.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,i){return s(e,i,t)})},s}()}()})),a=e(function(e,t){var i={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}};t.default=i,e.exports=t.default}),l=function(e){return Object.keys(e).map(function(t){return t+'="'+e[t].toString().replace(/"/g,""")+'"'}).join(" ")},c=a.svg,d=a.xlink,h={};h[c.name]=c.uri,h[d.name]=d.uri;var u,g=function(e,t){void 0===e&&(e="");var i=r(h,t||{});return""+e+" "},f=a.svg,p=a.xlink,m={attrs:(u={style:["position: absolute","width: 0","height: 0"].join("; ")},u[f.name]=f.uri,u[p.name]=p.uri,u)},v=function(e){this.config=r(m,e||{}),this.symbols=[]};v.prototype.add=function(e){var t=this,i=t.symbols,n=this.find(e.id);return n?(i[i.indexOf(n)]=e,!1):(i.push(e),!0)},v.prototype.remove=function(e){var t=this,i=t.symbols,n=this.find(e);return!!n&&(i.splice(i.indexOf(n),1),n.destroy(),!0)},v.prototype.find=function(e){return this.symbols.filter(function(t){return t.id===e})[0]||null},v.prototype.has=function(e){return null!==this.find(e)},v.prototype.stringify=function(){var e=this.config,t=e.attrs,i=this.symbols.map(function(e){return e.stringify()}).join("");return g(i,t)},v.prototype.toString=function(){return this.stringify()},v.prototype.destroy=function(){this.symbols.forEach(function(e){return e.destroy()})};var y=function(e){var t=e.id,i=e.viewBox,n=e.content;this.id=t,this.viewBox=i,this.content=n};y.prototype.stringify=function(){return this.content},y.prototype.toString=function(){return this.stringify()},y.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach(function(t){return delete e[t]})};var _,S=function(e){var t=!!document.importNode,i=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(i,!0):i},b=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,i=this.render();return this.node=i,t.appendChild(i),i},t.prototype.render=function(){var e=this.stringify();return S(g(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,i),t}(y),w={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},C=function(e){return Array.prototype.slice.call(e,0)},x=navigator.userAgent,T={isChrome:/chrome/i.test(x),
isFirefox:/firefox/i.test(x),isIE:/msie/i.test(x)||/trident/i.test(x),isEdge:/edge/i.test(x)},I=function(e,t){var i=document.createEvent("CustomEvent");i.initCustomEvent(e,!1,!1,t),window.dispatchEvent(i)},P=function(e){var t=[];return C(e.querySelectorAll("style")).forEach(function(e){e.textContent+="",t.push(e)}),t},L=function(e){return(e||window.location.href).split("#")[0]},A=function(e){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",function(t,i,n){I(e,{oldUrl:n,newUrl:i})})}])},k=function(e,t){return void 0===t&&(t="linearGradient, radialGradient, pattern"),C(e.querySelectorAll("symbol")).forEach(function(e){C(e.querySelectorAll(t)).forEach(function(t){e.parentNode.insertBefore(t,e)})}),e},M=a.xlink.uri,E="xlink:href",O=/[{}|\\\^\[\]`"<>]/g,$=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],R=$.map(function(e){return"["+e+"]"}).join(","),D=function(e,t,i,r){var a=o(i),l=o(r);n(e.querySelectorAll(R),function(e){var t=e.localName,i=e.value;return-1!==$.indexOf(t)&&-1!==i.indexOf("url("+a)}).forEach(function(e){return e.value=e.value.replace(a,l)}),s(t,a,l)},j={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"},H=function(e){function t(t){var n=this;void 0===t&&(t={}),e.call(this,r(w,t));var o=i();this._emitter=o,this.node=null;var s=this,a=s.config;if(a.autoConfigure&&this._autoConfigure(t),a.syncUrlsWithBaseTag){var l=document.getElementsByTagName("base")[0].getAttribute("href");o.on(j.MOUNT,function(){return n.updateUrls("#",l)})}var c=this._handleLocationChange.bind(this);this._handleLocationChange=c,a.listenLocationChangeEvent&&window.addEventListener(a.locationChangeEvent,c),a.locationChangeAngularEmitter&&A(a.locationChangeEvent),o.on(j.MOUNT,function(e){a.moveGradientsOutsideSymbol&&k(e)}),o.on(j.SYMBOL_MOUNT,function(e){a.moveGradientsOutsideSymbol&&k(e.parentNode),(T.isIE||T.isEdge)&&P(e)})}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.prototype._autoConfigure=function(e){var t=this,i=t.config;void 0===e.syncUrlsWithBaseTag&&(i.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===e.locationChangeAngularEmitter&&(i.locationChangeAngularEmitter="angular"in window),void 0===e.moveGradientsOutsideSymbol&&(i.moveGradientsOutsideSymbol=T.isFirefox)},t.prototype._handleLocationChange=function(e){var t=e.detail,i=t.oldUrl,n=t.newUrl;this.updateUrls(i,n)},t.prototype.add=function(t){var i=this,n=e.prototype.add.call(this,t);return this.isMounted&&n&&(t.mount(i.node),this._emitter.emit(j.SYMBOL_MOUNT,t.node)),n},t.prototype.attach=function(e){var t=this,i=this;if(i.isMounted)return i.node;var n="string"==typeof e?document.querySelector(e):e;return i.node=n,this.symbols.forEach(function(e){e.mount(i.node),t._emitter.emit(j.SYMBOL_MOUNT,e.node)}),C(n.querySelectorAll("symbol")).forEach(function(e){var t=b.createFromExistingNode(e);t.node=e,i.add(t)}),this._emitter.emit(j.MOUNT,n),n},t.prototype.destroy=function(){var e=this,t=e.config,i=e.symbols,n=e._emitter;i.forEach(function(e){return e.destroy()}),n.off("*"),window.removeEventListener(t.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},t.prototype.mount=function(e,t){void 0===e&&(e=this.config.mountTo),void 0===t&&(t=!1);var i=this;if(i.isMounted)return i.node;var n="string"==typeof e?document.querySelector(e):e,o=i.render();return this.node=o,t&&n.childNodes[0]?n.insertBefore(o,n.childNodes[0]):n.appendChild(o),this._emitter.emit(j.MOUNT,o),o},t.prototype.render=function(){return S(this.stringify())},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},t.prototype.updateUrls=function(e,t){if(!this.isMounted)return!1;var i=document.querySelectorAll(this.config.usagesToUpdate);return D(this.node,i,L(e)+"#",L(t)+"#"),!0},Object.defineProperties(t.prototype,n),t}(v),B=e(function(e){!function(t,i){e.exports=function(){var e,t=[],i=document,n=i.documentElement.doScroll,o=(n?/^loaded|^c/:/^loaded|^i|^c/).test(i.readyState);return o||i.addEventListener("DOMContentLoaded",e=function(){for(i.removeEventListener("DOMContentLoaded",e),o=1;e=t.shift();)e()}),function(e){o?setTimeout(e,0):t.push(e)}}()}()});!window.__SVG_SPRITE__?(_=new H({attrs:{id:"__SVG_SPRITE_NODE__"}}),window.__SVG_SPRITE__=_):_=window.__SVG_SPRITE__;var W=function(){var e=document.getElementById("__SVG_SPRITE_NODE__");e?_.attach(e):_.mount(document.body,!0)};return document.body?W():B(W),_}()}()}).call(t,i("698d75b157f24ae829cc"))}}),define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/illustrations-js/ba-graphics-icons-commons.js",function(){}),function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/illustrations-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/illustrations-js/visualization-widget_128",["@ba-ui-toolkit/ba-graphics/dist/illustrations-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/illustrations-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/illustrations-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([3],{"12f7eb33bd32cb77e74d":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("6ecce6eea40a7ece8355"));t.default=o.a},"3865314c5959606874d4":function(t,i){t.exports=e},"6ecce6eea40a7ece8355":function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"visualization-widget_128_v6",use:"visualization-widget_128_v6-usage",viewBox:"0 0 128 128",content:' '});r.a.add(a),t.a=a}},["12f7eb33bd32cb77e74d"])}),define("storytelling/views/FilmStripView",["baglass/core-client/js/core-client/ui/core/View","baglass/core-client/js/core-client/utils/BrowserUtils","baglass/core-client/js/core-client/utils/ContentFormatter","baglass/core-client/js/core-client/utils/dom-utils","baglass/core-client/js/core-client/utils/Utils","text!./templates/FilmStripView.html","text!./templates/SceneCell.html","text!./templates/AddSceneCell.html","text!./templates/OverviewCell.html","jquery","underscore","doT","../nls/StringResources","gemini/app/ui/dialogs/RenameDialog","text!../layout/templates/sceneLayoutListing.json","storytelling-ui/storytelling-ui.min","./TimelineView","gemini/app/ui/dnd/DnDHelper","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/chevron-down_16","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/add_16","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/maximize_16","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/overflow-menu--horizontal_16","../lib/@ba-ui-toolkit/ba-graphics/dist/illustrations-js/visualization-widget_128","react","react-dom","hammerjs","jquery.hammer"],function(e,t,i,n,o,s,r,a,l,c,d,h,u,g,f,p,m,v,y,_,S,b,w,C,x){var T=e.extend({templateString:s,collapseDuration:400,enlargeDuration:400,events:{"keydown .scene, .overview, .addScene":"onKeydown"},init:function(e){T.inherited("init",this,arguments),this.dashboardApi=e.dashboardApi,this.controller=e.controller,this.timelineController=this.controller.getTimelineController(),this.canvasController=this.timelineController.canvasController,this.glassContext=e.glassContext,this.dndManager=e.dndManager,this.services=e.services,this._dropZones=[],this.logger=this.dashboardApi.getGlassCoreSvc(".Logger"),this.translationService=this.dashboardApi.getDashboardCoreSvc("TranslationService"),this.nextPreviousDuration=900,this.nextPreviousDelay=this.nextPreviousDuration/6,this.forceReFocus=!1,this.flyoutHolder=document.createElement("div"),this.flyoutHolder.classList.add("flyout-holder")},render:function(){var e=this;this.$el.addClass("filmstrip"),this.contentEl=this.el.parentNode,this.controller.on("change:pageSize",this.onPageSizeChange,this),this.controller.on("change:showOverviews",this.onShowOverviewsChanged,this),this.controller.on("layoutType:changed",this.onLayoutTypeChanged,this),this.controller.on("mode:change",this.onModeChanged,this),this.controller.on("scene:add",this.onSceneAdded,this),this.controller.on("scene:collapse",this.onSceneCollapse,this),this.controller.on("scene:expand",this.onSceneExpand,this),this.controller.on("scene:remove",this.onSceneRemoved,this),this.controller.on("scene:select",this.onSceneSelected,this),this.controller.model.on("change:layout",this.onChangeLayout,this),this.timelineController.on("scene:reorder",this.onSceneReorder,this),this.canvasController.addRemoveNotifier.on("widget:addDone",this.onWidgetAdded,this),this.canvasController.addRemoveNotifier.on("widget:removeDone",this.onWidgetRemoved,this);var t=this.dotTemplate({});return this.$el.html(t),this.$sceneSequencer=this.$el.find(".sceneSequencer"),this.$sceneList=this.$el.find(".sceneList"),this.$sceneSequencer.hammer().on("mousedown",".scene",this.onSceneContextMenu.bind(this)).on("clicktap",".scene",this.onSceneClick.bind(this)).on("dragstart",".scene",this.onSceneDragStart.bind(this)).on("hold",".scene",this.onSelectedSceneHold.bind(this)).on("primaryaction","span.overflow",this.onSceneOverflowClick.bind(this)).on("primaryaction","span.expandScene",this.onExpandSceneClick.bind(this)),this.cellTemplate=h.template(r),this.controller.getScenes().forEach(function(t,i){var n=e.renderSceneCell(t,i);e.$sceneList.append(n),e.middleShortenSceneTitle(e._getSceneSelector(t.id))}),this.updateOverviewButton(),this._setupFilmStripDropZone(),this._toggleModeChanged(this.controller.isAuthoring()),Promise.all([this._addExpandSceneCoachmark(),this._addOverviewSceneCoachmark()])},_scaleCell:function(e,t){if(t&&t.width&&t.height){e.css({width:125*t.width/t.height+"px",height:"125px"})}},renderSceneCell:function(e,t){var i=this,n=this.cellTemplate({id:e.id,index:t,title:e.get("title"),expandSceneLabel:u.get("storySceneExpand"),sceneActionMenuLabel:u.get("storySceneActionMenu"),selected:t===this.controller.getSelectedSceneIndex(),widgetIndicated:this.controller.isScenePopulated(e.id)}),s=c(n);return this.translationService.registerView({view:s,model:e}),o.setIcon(s.find(".expandScene"),S.default.id),o.setIcon(s.find(".overflow"),b.default.id),o.setIcon(s.find(".widgetIndicator"),w.default.id),e.on("change:title",function(){i.onSceneLabelChange(e)}),this._scaleCell(s,this.controller.model.layout.pageSize),this._setupDropZones(s),s},_setupDropZones:function(e){var t=this,i=e[0],n=this.dndManager.addDropTarget(i,{accepts:function(e){return"sceneCell"===e.type||"widget"===e.type},onDragEnter:function(e,t){"widget"===e.type&&t.classList.add("dropZone")},onDragMove:function(e,i){if("sceneCell"===e.type){t._dropNodeModelId=i.dataset.modelId;var n=t.controller.getSceneIndex(t._dropNodeModelId);t._dragModelIndex>n?t.$sceneList[0].insertBefore(t._cloneDragEl,i):t.$sceneList[0].insertBefore(t._cloneDragEl,i.nextSibling)}},onDrop:function(i){"widget"===i.type&&(v.handleWidgetDrop(t.dashboardApi.getCanvas(),e.attr("data-model-id"),i),e[0].classList.remove("dropZone"))},onDragLeave:function(e,t){"widget"===e.type&&t.classList.remove("dropZone")}});this._dropZones.push({dropZone:n,node:i})},_setupFilmStripDropZone:function(){var e=this,t=this.el,i=this.$sceneList[0],n=this.dndManager.addDropTarget(t,{accepts:function(e){return"sceneCell"===e.type},onDragStart:function(){e.sceneListBounds=i.getBoundingClientRect()},onDragMove:function(t){var n=i.firstChild,o=i.lastChild;t.position.xe.sceneListBounds.left+e.sceneListBounds.width&&o!==e._cloneDragEl&&(e._dropNodeModelId=o.dataset.modelId,i.appendChild(e._cloneDragEl))}});this._dropZones.push({dropZone:n,node:t})},renderAddSceneCell:function(){var e=h.template(a),t=e({addTitle:u.get("addSceneBtnTitle"),chevronTitle:u.get("addSceneChevronBtnTitle")});this.$addSceneCell=c(t),this.$sceneSequencer.after(this.$addSceneCell),this._scaleCell(this.$addSceneCell,this.controller.model.layout.pageSize);var i=this.$addSceneCell.find(".addContainer");o.setIcon(i,_.default.id),i.on("click",this.onAddSceneClick.bind(this));var n=this.$addSceneCell.find(".chevron");o.setIcon(n,y.default.id),n.on("primaryaction",this.onAddSceneOverflowClick.bind(this))},onSceneLabelChange:function(e){var t=this._getSceneSelector(e.id);this._getTitleEl(t).textContent=e.get("title")||"",this.middleShortenSceneTitle(t)},middleShortenSceneTitle:function(e){var t=this._getTitleEl(e);i.middleShortenString(t)},_getTitleEl:function(e){return this.el.querySelector(e+" .pageTitle")},onShowOverviewsChanged:function(){this.updateOverviewButton()},updateOverviewButton:function(e){if(this.controller.showAuthoringOverview()){this._$overviewStart?e&&this._updateOverviewIcon(this.$el.find(".overview.start .layoutIcon"),-1):(this._$overviewStart=this._renderOverviewButton(-1),this.$el.prepend(this._$overviewStart),this._scaleCell(this._$overviewStart,this.controller.model.layout.pageSize));var t=this._$overviewStart.find(".sceneSubContainer .pageInfo");this.controller.showStartOverview()?t.show():t.hide()}else this._$overviewStart&&(this._$overviewStart.remove(),this._$overviewStart=null);this.controller.showEndOverview()?this._$overviewEnd?e&&this._updateOverviewIcon(this.$el.find(".overview.end .layoutIcon"),-2):(this._$overviewEnd=this._renderOverviewButton(-2),this.$el.append(this._$overviewEnd),this._scaleCell(this._$overviewEnd,this.controller.model.layout.pageSize)):this._$overviewEnd&&(this._$overviewEnd.remove(),this._$overviewEnd=null)},_renderOverviewButton:function(e){var t=this._getOverviewLabel(e);this.overviewCellTemplate||(this.overviewCellTemplate=h.template(l));var i=this.overviewCellTemplate({title:t,selected:e===this.controller.getSelectedSceneIndex(),index:this._getOverviewIndex(e)}),n=c(i);return-1===e?n.addClass("start").on("primaryaction",this.onOverviewStartClick.bind(this)):-2===e&&n.addClass("end").on("primaryaction",this.onOverviewEndClick.bind(this)),this._updateOverviewIcon(n.find(".layoutIcon"),e),n},_getOverviewLabel:function(e){return-1===e?u.get("sceneListStart"):-2===e?u.get("sceneListEnd"):u.get("overviewBtnLabel")},_getOverviewIndex:function(e){var t=this.$sceneList.children(),i=null;return-1===e?i=0:-2===e&&(i=t.length+1),i},_updateOverviewIcon:function(e,t){var i=this.controller.getNavModel(),n=i.indexOf("panAndZoom")>=0?"dashboard-"+i:null,s=this._getOverviewLabel(t);n&&(e.empty(),o.setIcon(e,n,s))},remove:function(){var e=this;if(this.controller){this.controller.off("change:pageSize",this.onPageSizeChange,this),this.controller.off("change:showOverviews",this.onShowOverviewsChanged,this),this.controller.off("layoutType:changed",this.onLayoutTypeChanged,this),this.controller.off("mode:change",this.onModeChanged,this),this.controller.off("scene:add",this.onSceneAdded,this),this.controller.off("scene:collapse",this.onSceneCollapse,this),this.controller.off("scene:expand",this.onSceneExpand,this),this.controller.off("scene:remove",this.onSceneRemoved,this),this.controller.off("scene:select",this.onSceneSelected,this);(this.controller.getScenes()||[]).forEach(function(t){t.off("change:title",null,e)}),this.controller.model&&this.controller.model.off("change:layout",this.onChangeLayout,this)}this.timelineController.off("scene:reorder",this.onSceneReorder,this),this.canvasController&&this.canvasController.addRemoveNotifier&&(this.canvasController.addRemoveNotifier.off("widget:addDone",this.onWidgetAdded,this),this.canvasController.addRemoveNotifier.off("widget:removeDone",this.onWidgetRemoved,this)),this._dropZones&&(this._dropZones.forEach(function(t){t.dropZone&&t.node&&(t.dropZone.remove(),t.node!==e.el&&t.node.parentNode.removeChild(t.node))}),this._dropZones=[]),T.inherited("remove",this,arguments)},onAddSceneClick:function(){var e=this;this.controller.addScene().catch(function(t){e.logger.error("Unable to add new scene to story",t)})},onSceneClick:function(e){e.stopPropagation(),this._closeFlyout();var t=this.$sceneList.children().index(e.currentTarget),i=e.currentTarget.dataset.modelId;this.controller.selectScene({index:t,modelId:i})},onOverviewStartClick:function(e){e.stopPropagation(),this.controller.selectScene({index:-1})},onOverviewEndClick:function(e){e.stopPropagation(),this.controller.selectScene({index:-2})},onExpandSceneClick:function(e){e.stopPropagation(),this.controller.expandScene()},onModeChanged:function(e){this._toggleModeChanged(e.authoring),this.updateOverviewButton()},onSceneAdded:function(e){this._addScene(e.scene,e.index,e.insertBefore),this._refreshCellPageNumbers()},onSceneRemoved:function(e){this._removeScene(e.id),this._refreshCellPageNumbers(),this.updateOverviewButton()},onSceneSelected:function(e){this._selectScene(e),this._refreshTimeline()},onSceneExpand:function(e){this._expandScene(this.$sceneList.children().eq(e.index))},onSceneCollapse:function(e){this._collapseScene(this.$sceneList.children().eq(e.index))},onLayoutTypeChanged:function(){this.updateOverviewButton(!0)},onPageSizeChange:function(e){var t=this;this.$sceneList.children().each(function(i,n){t._scaleCell(c(n),e)}),this._scaleCell(this.$addSceneCell,e),this._$overviewStart&&this._scaleCell(this._$overviewStart,e),this._$overviewEnd&&this._scaleCell(this._$overviewEnd,e)},onSceneContextMenu:function(e){3===e.which&&this.onSceneOverflowClick(e)},onSceneOverflowClick:function(e){if(e.stopPropagation(),this.preventContext||!this.controller.isAuthoring())this.preventContext=!1;else{if(this._flyout)return void this._closeFlyout();var t=c(e.currentTarget).closest("[data-model-id]"),i=t.data("modelId"),n={name:this.controller.getScene(this.controller.getSceneIndex(i)).get("title"),type:"Scene",allowEmpty:!0,id:d.uniqueId("renameDialog")},o=new g(n,function(e){this.controller.renameScene(i,e)}.bind(this)),s=function(){o.open()},r=e.currentTarget;r.parentNode.id===i+"_tablabel"&&(r=r.parentNode),this.$el.append(this.flyoutHolder),this._flyout=C.createElement(p.SceneCellFlyout,{sceneId:i,controller:this.controller,anchorElement:r,closeFlyout:this._closeFlyout.bind(this),renameDialog:s}),x.render(this._flyout,this.flyoutHolder)}},onAddSceneOverflowClick:function(e){var t=e.currentTarget.children[0],i={target:e.currentTarget,onOpen:function(){t.setAttribute("class","svgIcon selected")},onClose:function(){t.setAttribute("class","svgIcon"),this._closeFlyout()}.bind(this)};this._flyout?i.onClose():this._showContextMenu(i)},_showContextMenu:function(e){this.preventContext||!this.controller.isAuthoring()?this.preventContext=!1:this.controller.isAuthoring()&&(this.$el.append(this.flyoutHolder),this._flyout=C.createElement(p.AddSceneFlyout,{anchorElement:e.target,closeFlyout:e.onClose,onOpen:e.onOpen,onLayoutSelection:this.controller.addScene.bind(this.controller),stringResources:this.services.getSvcSync(".StringResources"),sceneLayoutListing:JSON.parse(f).sceneLayouts}),x.render(this._flyout,this.flyoutHolder))},_closeFlyout:function(){this._flyout&&(x.unmountComponentAtNode(this.flyoutHolder),this.$el.find(".flyout-holder").remove(),this._flyout=null,this.preventContext=!1)},onSceneReorder:function(e){var t=function(e,t){if(e!==t){var i=e.parentNode,n=i.insertBefore(document.createTextNode(""),e);i.insertBefore(e,t),i.insertBefore(t,n),i.removeChild(n)}},i=e.model.getParent().items;d.each(i,function(e,i){var n=this.$sceneList.children().eq(i),o=this.$sceneList.find(this._getSceneSelector(e.id));t(o[0],n[0])},this),this.$sceneList.find("#"+e.model.id+"_tablabel>.expandScene").find(".coachMark").remove(),this._refreshCellPageNumbers()},onSceneDragStart:function(e){!n.isPointerTouch(e)&&this.controller.isAuthoring()&&this._startReorderScenes(e)},onSelectedSceneHold:function(e){e.currentTarget.classList.contains("selected")&&this.controller.isAuthoring()&&(this._shakeOnHold(e.currentTarget),this._startReorderScenes(e))},_startReorderScenes:function(e){var i=this,o=e.currentTarget,s=c(o),r=this._makeAvatar(s);this._cloneDragEl=r[0].cloneNode(),this._cloneDragEl.classList.remove("sceneMoveAvatar"),this._cloneDragEl.classList.add("scenePlaceholder"),this._dragModelIndex=this.controller.getSceneIndex(e.currentTarget.dataset.modelId);var a=this.controller.getSceneById(e.currentTarget.dataset.modelId),l=o.classList.contains("selected"),d=s.offset(),h=n.getEventPos(e),u=d.top-h.pageY,g=d.left-h.pageX;this.dndManager.startDrag({event:e,type:"sceneCell",data:a,avatar:r[0],moveXThreshold:20,avatarYOffset:u,avatarXOffset:g,restrictToXAxis:!0,callerCallbacks:{onDragStart:function(){i.$el.addClass("noScroll"),i._dropNodeModelId=null,i.$sceneList[0].insertBefore(i._cloneDragEl,o),o.style.display="none",o.classList.remove("selected"),o.classList.remove("shake")},onDragDone:function(){if(i._dropNodeModelId){var e=i.controller.getSceneIndex(i._dropNodeModelId),n=i.controller.getSceneById(i._dropNodeModelId);i.beforeModelId=n.getNextSiblingId(),i._dragModelIndex>e&&(i.beforeModelId=n.id)}return i.$sceneList[0].insertBefore(o,i._cloneDragEl),t.isIE11()?i.$sceneList[0].removeChild(i._cloneDragEl):i._cloneDragEl.remove(),o.style.display="",l&&o.classList.add("selected"),i.el.classList.remove("noScroll"),i._dropNodeModelId&&i.controller.moveViewBefore(a,i.beforeModelId),i.beforeModelId=null,i._cloneDragEl=null,i._dropNodeModelId=null,!0}}})},_makeAvatar:function(e){var t=e.clone().addClass("sceneMoveAvatar"),i=t[0];return i.removeAttribute("id"),i.removeAttribute("tabindex"),i.removeAttribute("role"),i.removeAttribute("data-model-id"),t.find(".overflow").remove(),t.find(".expandScene").remove(),t.find(".pageInfo").remove(),document.body.appendChild(i),t},onWidgetAdded:function(e){var t=this._getWidgetSceneId(e.id);this._widgetIndicated(t)},onWidgetRemoved:function(e){var t=this._getWidgetSceneId(e.id);this._widgetIndicated(t)},_getWidgetSceneId:function(e){var t=void 0;if(this.controller&&this.controller.model){var i=this.controller.model.layout.findTopLevelParentItem(e);i&&(t=this.controller.getSceneIndex(i.id)>-1?i.id:null)}return t},_widgetIndicated:function(e){var t;e?(t=this.controller.isScenePopulated(e),this.$el.find(this._getSceneSelector(e)+" .widgetIndicator").toggleClass("widgetIndicated",t)):(t=this.timelineController.getTimelineEpisodeCount()>0,this.$el.find(".scene.selected .widgetIndicator").toggleClass("widgetIndicated",t))},_widgetIndicatedMove:function(e,t){this._widgetIndicated();var i=this.controller.isScenePopulated(e);t.find(".widgetIndicator").toggleClass("widgetIndicated",i)},_findTopLevelParentItem:function(e){var t=[];if(e&&e.parameter&&e.parameter.updateArray){var i=e.parameter.updateArray;t=d.map(i,function(e){var t=this.controller.model.layout.findTopLevelParentItem(e.parentId);return t&&t.id&&!this.controller.isOverview()?t.id:e.parentId}.bind(this))}return t},onChangeLayout:function(e){this._updateWidgetIndicator(e),this.timelineView&&this._showTimeline(0)},_updateWidgetIndicator:function(e){var t=this._findTopLevelParentItem(e.prevValue),i=this._findTopLevelParentItem(e.value);if(0!==t.length&&0!==i.length&&0===d.intersection(t,i).length){for(var n=0;n=2&&(i.eq(0).find(".pageNumber")[0].setAttribute("data-index",0),i.eq(1).find(".pageNumber")[0].setAttribute("data-index",e.length+1))},_createAnimationDummyDiv:function(){return c("
").css({width:"100%",height:"1px",display:"inline-block"})},_expandScene:function(e){var t=this,i=this.$el.scrollLeft(),n=e.position(),o=parseInt(e.css("margin-left"),10),s=e.css("width"),r=e.css("height"),a=e.find(".sceneOverlay, .widgetIndicator"),l=this.enlargeDuration,c=this._createAnimationDummyDiv().appendTo(this.$el);this._removeExpandSceneCoachmark(),this._closeFlyout(),this.$el.scrollLeft(i).css("overflow-x","hidden"),e.addClass("animating"),a.fadeOut(l/3),e.animate({width:this.$el.outerWidth(!0),height:this.$el.outerHeight(!0),opacity:0},{duration:l,complete:function(){t._showTimeline(l/4,function(){t.$el.hide(),e.removeClass("animating"),e.css({width:s,height:r,opacity:1}),a.css("display",""),c.remove()})}}),this.$el.animate({scrollLeft:n.left+o+i},l)},_collapseScene:function(e){var t=this;this.$el.show();var i=this.$el.scrollLeft(),n=this.$el.outerWidth(!0),o=this.$el.outerHeight(!0),s=parseInt(e.css("margin-left"),10),r=e.css("width"),a=e.css("height"),l=this.collapseDuration,c=this._createAnimationDummyDiv().appendTo(this.$sceneList);this.$el.scrollLeft(i),e.addClass("animating"),this.timelineView&&this.timelineView.fadeOut({complete:function(){t.timelineView.remove(),t.timelineView=null},duration:l/4}),e.find(".sceneOverlay, .widgetIndicator").css({transform:"scale(0)",opacity:0}).delay(l).animate({transform:1,opacity:1},{step:function(e,t){"transform"===t.prop&&(this.style.transform="scale("+e+")")},complete:function(){this.style.transform=null,this.style.opacity=null},duration:l/2}),e.css({width:n,height:o,opacity:0}),i=this.$el.scrollLeft(),this.$el.scrollLeft(e.position().left+s+i),e.animate({width:r,height:a,opacity:1},{duration:l,complete:function(){e.removeClass("animating"),t.$el.css("overflow-x","auto"),c.remove()}}),this.$el.animate({scrollLeft:i-parseInt(this.$sceneList.css("margin-left"),10)},l)},_refreshTimeline:function(){var e=this;this.timelineView&&this.timelineView.fadeOut({complete:function(){e.timelineView&&e._showTimeline(e.enlargeDuration/4)}})},_showTimeline:function(e,t){if(this.timelineView&&(this.timelineView.remove(),this.timelineView=null),null!==this.timelineController.getCurrentScene())this._createTimeline(),this.timelineView.renderFadeIn({complete:t,duration:e});else{var i=this.controller.currentSceneIndex;-1===i?i=0:-2===i&&(i=this.controller.getSceneCount()-1),this._collapseScene(this.$sceneList.children().eq(i))}},_createTimeline:function(){var e=document.createElement("div");this.contentEl.appendChild(e),this.timelineView=new m({el:e,storyController:this.controller,controller:this.timelineController,dashboardApi:this.dashboardApi,dndManager:this.dndManager,glassContext:this.glassContext,services:this.services})},_removeExpandSceneCoachmark:function(){var e=c(".expandScene.coachMarkContainer");if(e.find(".coachMark:visible").length){var t=e.attr("id");this.dashboardApi.getGlassCoreSvc(".CoachMarkService").getPersistence().marksAsRead(t),e.find(".coachMark").hide()}},_addExpandSceneCoachmark:function(){var e=this.$sceneList.find(".expandScene").first(),t={id:"com.ibm.bi.dashboard.filmstrip.expandScene",domElement:e[0],title:u.get("expandSceneCoachmarkTitle"),contents:u.get("expandSceneCoachmarkContents")};return this.dashboardApi.prepareGlassOptions(t),this.dashboardApi.getFeature("CoachMark").addCoachMark(t)},_addOverviewSceneCoachmark:function(){var e=this.$el.find(".overview").first();if(1===e.length){var t={id:"com.ibm.bi.dashboard.filmstrip.overview",domElement:e[0],title:u.get("overviewCoachmarkTitle"),contents:u.get("overviewCoachmarkContents")};this.dashboardApi.prepareGlassOptions(t);return this.dashboardApi.getFeature("CoachMark").addCoachMark(t)}return Promise.resolve()},_selectScene:function(e){this._closeFlyout();var t=e.scene&&e.scene.id;if(t){var i=void 0;if(i="start"===t||"end"===t?this.$el.find(".overview."+t):this.$sceneList.find(this._getSceneSelector(t)),1===i.length){this.$el.find(".overview.selected, .scene.selected").removeClass("selected").attr("tabindex",-1),i.addClass("selected").attr("tabindex",0),(this.forceReFocus||c.contains(this.el,document.activeElement)&&i.is(":visible"))&&(i.focus(),this.forceReFocus=!1);var n=this._getSceneScrollPosition(i);this.$el.scrollLeft(n.scrollLeft).animate({scrollLeft:n.position},400)}}},_shakeOnHold:function(e){this._closeFlyout(),this.preventContext=!0,e.classList.add("shake"),this.el.classList.add("noScroll"),c(e).one("mouseup touchup",function(){e.classList.remove("shake"),this.el.classList.remove("noScroll"),this.preventContext=!1}.bind(this))},_wrapEvent:function(e){return{code:e.keyCode||e.charCode,modifier:e.ctrlKey||e.metaKey,altKey:e.altKey,shiftKey:e.shiftKey,originalEvent:e}},onKeydown:function(e){var t=this._wrapEvent(e);if(this._shouldMoveSceneLeft(t))this._moveSceneLeft(this._getSceneIdFromElement(e));else if(this._shouldMoveSceneRight(t))this._moveSceneRight(this._getSceneIdFromElement(e));else if(this._shouldNavigateLeft(t))this.controller.previousScene();else if(this._shouldNavigateRight(t))this.controller.nextScene();else if(this._shouldShowContextMenu(t))this.onSceneOverflowClick(e);else if(this._shouldDeleteScene(t))this.controller.deleteScene(this._getSceneIdFromElement(e));else if(this._shouldPerformEnter(t))c(e.target).click();else if(this._shouldPerformExpand(t))this.controller.expandScene();else{if(!this._shouldPerformTogglePlayPause(t))return;this.controller.togglePlayPause()}e.stopPropagation(),e.preventDefault()},_getSceneIdFromElement:function(e){return e.currentTarget.dataset.modelId},_shouldMoveSceneLeft:function(e){return e.modifier&&(37===e.code||38===e.code)},_shouldMoveSceneRight:function(e){return e.modifier&&(39===e.code||40===e.code)},_shouldNavigateLeft:function(e){return 37===e.code||38===e.code},_shouldNavigateRight:function(e){return 39===e.code||40===e.code},_shouldDeleteScene:function(e){var t=this._getSceneIdFromElement(e.originalEvent),i=t&&this.controller.isAuthoring()&&this.controller.getSceneCount()>1,n=46===e.code||8===e.code,o=!e.modifier&&!e.altKey;return n&&o&&i},_shouldShowContextMenu:function(e){return e.shiftKey&&121===e.code},_shouldPerformEnter:function(e){return 13===e.code&&!c(e.originalEvent.target).hasClass("coachMark")},_shouldPerformExpand:function(e){return 121===e.code},_shouldPerformTogglePlayPause:function(e){return 32===e.code},_moveSceneLeft:function(e){this.controller.isAuthoring()&&e&&this.controller.moveSceneLeft(e)},_moveSceneRight:function(e){this.controller.isAuthoring()&&e&&this.controller.moveSceneRight(e)},_getSceneScrollPosition:function(e){var t=this.$el.scrollLeft(),i=e.position(),n=parseInt(e.css("margin-left"),10),o=this.$el.outerWidth(),s=i.left,r=i.left+e.outerWidth(!0);return s<0?s+=t-n-30:s=r>o?t+n+30+(r-o):t,e.index()===this.$sceneList.children().length-1&&(s+=2*e.width()),{position:s,scrollLeft:t}}});return T}),function(e,t){
if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"));else if("function"==typeof define&&define.amd)define("storytelling/lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/catalog_32",["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"],t);else{var i=t("object"==typeof exports?require("@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"):e["@ba-ui-toolkit/ba-graphics/dist/icons-js/ba-graphics-icons-commons.js"]);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}("undefined"!=typeof self?self:this,function(e){return webpackJsonPBaGraphics([1511],{"08a643d7fc7720e9457a":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("3865314c5959606874d4"),o=(i.n(n),i("e9e00e251cd62b5bba01"));t.default=o.a},"3865314c5959606874d4":function(t,i){t.exports=e},e9e00e251cd62b5bba01:function(e,t,i){"use strict";var n=i("9689a9c94ae38b47fa2c"),o=i.n(n),s=i("9ce58a7deea14f49ef01"),r=i.n(s),a=new o.a({id:"catalog_32_v6",use:"catalog_32_v6-usage",viewBox:"0 0 32 32",content:' '});r.a.add(a),t.a=a}},["08a643d7fc7720e9457a"])}),define("storytelling/views/StoryPaneView",["baglass/core-client/js/core-client/ui/core/View","text!./templates/StoryPaneView.html","./FilmStripView","../nls/StringResources","../lib/@ba-ui-toolkit/ba-graphics/dist/icons-js/catalog_32"],function(e,t,i,n,o){var s=e.extend({templateString:t,init:function(e){s.inherited("init",this,arguments),this.dashboardApi=e.dashboardApi,this.services=e.services,this.minimumSize=200},initialize:function(){return this._setupEvents()},_setupEvents:function(){var e=this;return this.dashboardApi.getDashboardSvc(".LifeCycleManager").then(function(t){t.registerLifeCycleHandler("post:dashboard.focus",function(){e.dashboardApi.getCurrentContentView().isAuthorMode()&&e.trigger("openPane")}),t.registerLifeCycleHandler("post:mode.edit",function(){e.trigger("openPane")}),e.dashboardApi.on("widget:maximize",e._disableAndSwitchHandlerListener,e),e.dashboardApi.on("widget:restore",e._restoreHandlerListener,e)})},_disableAndSwitchHandlerListener:function(){this.trigger("disableAndSwitchHandle")},_restoreHandlerListener:function(){this.trigger("restoreHandle")},getSplitterOpts:function(){return Promise.resolve({handleClass:"storyHandle",handleIcon:o.default.id,handleOpenTitle:n.get("filmstripHandleOpenLabel"),handleCloseTitle:n.get("filmstripHandleCloseLabel"),hidden:!1,view:this,initialSize:200,overrideGlobalMaxSize:200})},render:function(){var e=this.dotTemplate();return this.$el.addClass("storytelling blockOnExpandView").html(e),this._createFilmStrip()},remove:function(){this.filmStripView&&this.filmStripView.remove(),this.dashboardApi.off("widget:maximize",this._disableAndSwitchHandlerListener,this),this.dashboardApi.off("widget:restore",this._restoreHandlerListener,this),s.inherited("remove",this,arguments)},_createFilmStrip:function(){var e=this,t=document.createElement("div");return this.el.querySelector(".content").appendChild(t),Promise.all([this.dashboardApi.getDashboardSvc(".DndManager"),this.dashboardApi.getDashboardSvc(".StoryPaneService")]).then(function(n){var o=n[0],s=n[1];return e.filmStripView=new i({el:t,dashboardApi:e.dashboardApi,controller:s,dndManager:o,glassContext:e.services.biGlass.glassContext,services:e.services}),e.filmStripView.render()})}});return s}),define("text!storytelling/glass/templates/ExportView.html",[],function(){return''}),define("storytelling/glass/ExportView",["bacontentnav/ui/views/SaveAsView","baglass/core-client/js/core-client/ui/properties/CheckBox","text!./templates/ExportView.html","../nls/StringResources"],function(e,t,i,n){var o=e.extend({templateString:i,events:{},init:function(){o.inherited("init",this,arguments)},render:function(){o.inherited("render",this,arguments),this._oLoadCheckBox=new t({id:"load_after_export",el:this.$(".loadAfterExportContainer"),name:"loadAfterExport",label:n.get("loadAfterExportLabel"),ariaLabel:n.get("loadAfterExportLabel"),checked:!0,controlOnLeft:!0}),this._oLoadCheckBox.doRender()},getLoadAfterExport:function(){return this._oLoadCheckBox.isChecked()},remove:function(){this._oLoadCheckBox.remove(),o.inherited("remove",this,arguments)}});return o}),define("storytelling/glass/ExportToStoryDialog",["bacontentnav/ui/dialogs/SaveAsDialog","storytelling/nls/StringResources","./ExportView","underscore"],function(e,t,i,n){var o=e.extend({init:function(e){this.options=e,this.options.service=this.options.service||{},this.options.service.save=this.onSave.bind(this);var s=n.defaults(this.options,{buttons:[{text:t.get("exportLabel"),handler:this.ok.bind(this),type:"primary",defaultId:"save_button"},"cancel"],viewClass:i,className:"exportToStoryDialog",id:"exportDialogTitle",title:t.get("exportDialogTitle")});o.inherited("init",this,[s])},onOpen:function(){o.inherited("onOpen",this),this._container().find("footer").attr("role","contentinfo").attr("aria-label",t.get("exportDialogFooter"))},onSave:function(e,t,i,n){return this.options.service.export(e,t,i,n,this.view.getLoadAfterExport())}});return o}),define("storytelling/baseBundle",function(){});