/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2013 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by all applicable intellectual property laws,
* including trade secret and or copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
*  Copyright 2015 Adobe Systems Incorporated
*  All Rights Reserved.
*
* NOTICE:  All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any.  The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by all applicable intellectual property laws,
* including trade secret and or copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

define("acplugins/my-files/js/ac-my-files",["plugins-common/ac-plugins"],function(e){var i=e.MyFiles;return i||(i=e.MyFiles={}),i}),define("acplugins/my-files/js/ops/plugin/initializing-plugin-op",["core/ac-core","files/ac-files","plugins-common/ac-plugins","acplugins/my-files/js/ac-my-files","core/ops/op"],function(e,i,t,n){return n.InitializingPluginOp=e.Op.extend({run:function(){var n,o,s,l,r=this.options,a=r.appApi,c=a.pluginsApi;n=e.modelFactory,o=e.uiModelFactory,s=i.uiModelFactory,_.extend(r,{fileUploadModel:n.create("FileUploadModel"),notificationModel:n.create("NotificationModel"),sessionModel:n.create("SessionModel"),collectionsUiModel:o.create("CollectionsUiModel"),dialogsUiModel:o.create("DialogsUiModel"),errorUiModel:o.create("ErrorUiModel"),fileUploadUiModel:o.create("FileUploadUiModel"),folderUiModel:o.create("FolderUiModel"),hoverPreviewUiModel:o.create("HoverPreviewUiModel"),rhpPreviewUiModel:o.create("RhpPreviewUiModel"),selectionActionsPluginsUiModel:o.create("PluginsUiModel"),keyUiModel:o.create("KeyUiModel"),menusUiModel:o.create("MenusUiModel"),sortUiModel:o.create("SortUiModel"),filesUiModel:s.create("FilesUiModel"),sharingUiModel:s.create("SharingUiModel")}),r.noFullPreviewImpl||_.extend(r,{fullPreviewUiModel:o.create("FullPreviewUiModel"),fullPreviewOverlaysUiModel:o.create("PluginsUiModel"),fullPreviewPluginsUiModel:o.create("PluginsUiModel"),fullPreviewRhpPluginsUiModel:o.create("PluginsUiModel")}),c.isInSearchResultsView()?(_.extend(r,{noSearchControl:!0,noSort:!0,noNewFolder:!0,noFilter:!0,isInSearchResultsView:!0}),r.filesUiModel.set("view",i.FilesUiModel.VIEW_SEARCH_RESULTS)):_.extend(r,{searchModel:n.create("SearchModel",{},this.options),searchUiModel:o.create("SearchUiModel"),selectionUiModel:o.create("SelectionUiModel")}),r.noSelectionActions||(l=c.getPluginTypeConfig("file_selection_actions"),_.extend(r,{actualPluginIds:[]}),_.each(l.plugin_ids,function(e){var i=c.getPluginGroupId(e);e=e+"-"+r.pluginId,r.actualPluginIds.push(e),c.registerPluginsUiModel(e,r.selectionActionsPluginsUiModel),c.addPluginsConfig(e,t.types.file_selection_actions),c.setPluginGroupId(e,i)}),c.registerPluginsUiModel(c.getPluginTypeConfig("file_selection_actions"),r.selectionActionsPluginsUiModel));var d=new $.Deferred,p=r.appApi.connectorsApi,u=p.isConnectorRemovable(p.getConnectorPluginName(r.pluginId));return u?(_.extend(r,{folderModel:n.create("FolderModel")}),d.resolve()):r.appApi.discoveryUrisApi.checkDCAPIEnabled().done(_.bind(function(){r.appApi.discoveryUrisApi.useDCApi()?_.extend(r,{folderModel:n.create("FolderModelDCAPI")}):_.extend(r,{folderModel:n.create("FolderModel")}),d.resolve()})),d.promise()}}),n.InitializingPluginOp}),define("acplugins/my-files/js/ops/plugin/running-plugin-op",["core/ac-core","files/ac-files","acplugins/my-files/js/ac-my-files","core/ops/op"],function(e,i,t){t.RunningPluginOp=e.Op.extend({run:function(){var e,t,n,o,s,l,r,a=this.options;return e=i.opFactory,t=e.create("ListeningForSelectionChangeOp",a),n=e.create("ListeningForViewEventsOp",a),s=e.create("ListeningForSearchInvalidationOp",a),o=e.create("ListeningForSearchQueriesChangeOp",a),l=a.noNotifications?this._getResolvedPromise():e.create("ListeningForCurrentFolderNotificationsOp",a).run(),r=a.noNotifications?this._getResolvedPromise():e.create("ListeningForDupErrorsOp",a).run(),$.when(t.run(),n.run(),s.run(),o.run(),l,r)}})}),define("acplugins/my-files/js/ops/plugin/starting-plugin-op",["core/ac-core","files/ac-files","acplugins/my-files/js/ac-my-files","core/utils/util","core/ops/op"],function(e,i,t,n){t.StartingPluginOp=e.Op.extend({run:function(){var o,s,l=this.options,r=l.appApi,a=i.opFactory,c=$.Deferred();return n.isCEF()||a.create("RestoringFilesPrefsOp",l).run(),a.create("InitializingAcrobatOp",l).run(),t.opFactory.create("RunningPluginOp",l).run(),l.noSelectionActions||e.opFactory.create("LoadingSelectionActionsOp",l).run(),o=l.pluginId,s=r.pluginsApi.getDefaultPluginId("file_selection_dlg"),!r.saveAsApi.isRunningInFileSaveAs()||s!==o||"root-select"!==o&&"ccloud-select"!==o?this._getResolvedPromise():(l.readerContextModel.done(_.bind(function(e){var i=e.get("rna"),t=i.get("viewData").get("fileSelectData");t.invoke("getFileAncestors",[]).done(_.bind(function(e){_.isUndefined(e)||0===e.length||(r.folderApi.setCurrentFolderId(o,e),r.saveAsApi.setCurrentFolderId(e)),c.resolve()},this))},this)),c.promise())}})}),define("acplugins/my-files/js/ops/op-factory",["core/ac-core","acplugins/my-files/js/ac-my-files","acplugins/my-files/js/ops/plugin/initializing-plugin-op","acplugins/my-files/js/ops/plugin/running-plugin-op","acplugins/my-files/js/ops/plugin/starting-plugin-op"],function(e,i){i.OpFactory=e.Op.extend({create:function(e,t){var n=i[e];return n?new n(t):void LOG(0,"AcMyFiles.OpFactory.create: Unrecognized class: "+e)}})}),define("acplugins/ac-bh",[],function(){var e=Ac.Bh;return e||(e=Ac.Bh={}),e}),define("acplugins/build-num",{pluginBuildNumber:"000001"}),define("acplugins/my-files/js/nls/ui-strings",{root:!0,"xx-xx":!0,"de-de":!0,"en-gb":!0,"es-es":!0,"fr-fr":!0,"it-it":!0,"ja-jp":!0,"da-dk":!0,"fi-fi":!0,"nb-no":!0,"nl-nl":!0,"pt-br":!0,"sv-se":!0,"zh-cn":!0,"zh-tw":!0,"ko-kr":!0,"cs-cz":!0,"hu-hu":!0,"pl-pl":!0,"ru-ru":!0,"uk-ua":!0,"tr-tr":!0,"sk-sk":!0,"sl-si":!0,"bg-bg":!0}),define("acplugins/my-files/js/nls/root/ui-strings",{FOOTER_ANCHOR:"Go to Adobe Document Cloud Website",NOTIFICATION_HEADING:"<%= cloudName %> Files",CLOUD_NAME:"Adobe cloud storage",UNSUPPORTED_CONNECTOR_MSG:"<%= actionName %> is currently not supported for files stored in <%= connectorLabel %>."}),define("acplugins/bh-plugin-view",["core/ac-core","acplugins/ac-bh","core/views/plugin-content-view"],function(e,i){return i.PluginView=e.PluginContentView.extend({getAppApiVersion:function(){return Ac.Plugins.groups.blue_heron.FRAMEWORK_VERSION}}),i.PluginView}),define("acplugins/my-files/js/views/plugin-view",["core/ac-core","files/ac-files","plugins-common/ac-plugins","acplugins/ac-bh","acplugins/my-files/js/ac-my-files","core/utils/sc-analytics","acplugins/build-num","core/utils/router-util","core/utils/action-ids","i18n!files/nls/ui-strings","i18n!core/nls/ui-strings","core/utils/file-types","core/utils/util","core/utils/string-util","i18n!acplugins/my-files/js/nls/ui-strings","acplugins/bh-plugin-view","files/views/files-container-view"],function(e,i,t,n,o,s,l,r,a,c,d,p,u,h,g){return o.PluginView=n.PluginView.extend({initialize:function(){n.PluginView.prototype.initialize.call(this),u.isCEF()&&_.extend(this.options,{noUpload:!0,noHoverPreview:!0,noNewFolder:!1,folderDeletionDisabled:!1,noDownload:!0,noShare:!1,noShareButton:!1,footerAnchorText:void 0})},render:function(){var e=this.options;e.appApi.displayApi.applyUIThemeStyles(this.$el).then(_.bind(function(){n.PluginView.prototype.render.call(this),this._renderChildViews(),this._isListeningForFileUploadEvents||(i.opFactory.create("ListeningForFileUploadEventsOp",e).run(),this._isListeningForFileUploadEvents=!0)},this)),!e.appApi.selectionApi.isRunningInFileSelection()||"root-select"!==e.pluginId&&"ccloud-select"!==e.pluginId||e.appApi.rnaApi.done(function(e){e.logAnayticsCustomOpenSave("Time_To_Show_Dialog_View_Connector_File_List")}),e.forRecentFileListing&&this.options.appApi.rnaApi.done(_.bind(function(e){e.fileApi({methodName:"getSelectedRecentFileData"}).done(_.bind(function(){},this))},this))},events:function(){return u.isCEF()?_.extend({},e.View.prototype.events,{changeNetworkStateFromFeat:"_onNetworkStateChangeFromFeat"}):void 0},initPlugin:function(){return this._initPlugin()},selectPlugin:function(t){var n,o,s,l,r,d=this.options,p=d.fullPreviewUiModel,h=d.appApi.routerApi,f=d.appApi.connectorsApi,A=d.appApi.pluginsApi,v=d.appApi.folderApi,C=d.appApi.sessionApi,S=d.appApi.networkConnectivityApi,F=d.appApi.displayApi,I=this.options.rnaRecentFilesSelect,m=u.isCEF();this.options.appApi.done(_.bind(function(){},this));var M=this.options.appApi.routerApi.parseQueryParams(window.location.href.slice(window.location.href.indexOf("?")));if(m&&(t&&(this._pluginOptions=t),d.isInSearchResultsView&&(d.searchModel=this._pluginOptions.searchModel,d.searchUiModel=this._pluginOptions.searchUiModel,d.selectionUiModel=this._pluginOptions.selectionUiModel,d.ussSearchModel=this._pluginOptions.ussSearchModel,d.selectionUiModel.set("multiple_selection",!t.singleFileSelection),d.collectionsUiModel.set("checkbox",!t.singleFileSelection),"root"===d.pluginId?(d.sortUiModel.set("order_by","modified"),d.sortUiModel.set("mru_date_order","modified")):d.sortUiModel.set("order_by","none")),d.forRecentFileListing="true"==M.forRecentFileListing?!0:!1,S.removeNetworkOnlineChangeCallback(this._onOnlineChanged),S.addNetworkOnlineChangeCallback(this._onOnlineChanged),d.appApi.rnaApi.done(_.bind(function(e){e.isFeatRunning()&&e.isASTestAllowInstantiation()&&S.addNetworkConnectivtyChangeCallback(this._onOnlineChanged)},this)),!S.isOnline()&&!I||!C.isSignedInReader()&&!I))return C.removeSignedInChangeCallback(this._onSignedInChange),C.addSignedInChangeCallback(this._onSignedInChange),this._isSelected=!0,d.isInSearchResultsView&&e.opFactory.create("LoadingSelectionActionsOp",d).run(),this.render(),this.options.appApi.displayApi.showSpinner(!1),this._getResolvedPromise();if(t=t||this.getPluginOptions(),t&&(this._setParentScContext(t.scContext),n=t.routeFolderId,o=t.routeViewType,s=t.routeFilesFilters,l=t.routeFileId),n)d.folderUiModel.set("route_folder_id",n),d.searchUiModel.removeAllFieldQueries();else if(s)d.searchUiModel.removeAllFieldQueries(),d.searchUiModel.setFieldQueriesPath(s),d.sortUiModel.setSortFromQueryParams(h.getQueryParams());else if(m&&this._isSelected)return I||(C.removeSignedInChangeCallback(this._onSignedInChange),C.addSignedInChangeCallback(this._onSignedInChange)),this.render(),this._getResolvedPromise();return this._isSelected=!0,m&&!d.isInSearchResultsView,this._startPlugin().then(function(){return I?$.Deferred().resolve().promise():C.ensureSignedIn()}).then(_.bind(function(){var n,s=t&&t.singleFileSelection,u=d.pluginId,S=A.getPluginUiModel(u),M=S.get("connector_name"),P=t&&t.selectedToolPlugin||A.getSelectedPluginId("tools"),U=a.toolIdsToActionIds[P],w=a.toolIdsToActionNames[P],E=f.getConnectorPluginLabel(u);return m&&(this.options.isInSearchResultsView||i.opFactory.create("RestoringFilesPrefsOp",d).run(),I||(C.removeSignedInChangeCallback(this._onSignedInChange),C.addSignedInChangeCallback(this._onSignedInChange)),"root"===M?f.setConnectorPluginRoot(u,v.getRootFolderId(u)):(this.options.footerAnchorText=void 0,this.options.noShare=!0,this.options.noShareButton=!0)),d.selectionUiModel.set("multiple_selection",!s),d.collectionsUiModel.set("checkbox",!s),o&&d.collectionsUiModel.set("view",o),(m||e.Features.isFeatureEnabled("no_collection_item_checkbox")&&h.hasQueryParam("no_collection_item_checkbox","1"))&&d.collectionsUiModel.set("checkbox",!1),this._initFilter(t),this._configureActions(M),this.render(),d.fileUploadUiModel.startListening(),l?(p.isFileOpen(l)||(p.close({silent:!0}),i.opFactory.create("OpeningFullPreviewOp",_.extend({},d,{id:l})).run()),void(m&&F.showSpinner(!1))):f.isConnectorPlugin(u)&&!f.getConnectorPluginRoot(u)?(h.navigate(M),m&&F.showSpinner(!1),this._getResolvedPromise()):d.noUrlUpdate&&f.isActionRestricted(M,U)?(w&&E&&(n=A.getSelectorApi(P),n&&n.getSelectorLabel&&(w=n.getSelectorLabel(),w&&""!==w||(w=a.toolIdsToActionNames[P])),r=_.template(m?g.UNSUPPORTED_CONNECTOR_MSG:c.UNSUPPORTED_CONNECTOR_MSG,{actionName:w,connectorLabel:E}),d.collectionsUiModel.set("force_empty_msg",r)),d.collectionsUiModel.set("force_empty",!0),d.sortUiModel.set("is_locked",!0),d.searchUiModel.set("is_locked",!0),m&&F.showSpinner(!1),this._getResolvedPromise()):(t&&(d=_.extend({},d,_.pick(t,"noHistoryEffect"))),this._runSearchOp(d))},this),_.bind(function(e){if(m){if(F.showSpinner(!1),e&&"NoAccessToPdfServices"===e.errorString)return C.removeSignedInChangeCallback(this._onSignedInChange),C.addSignedInChangeCallback(this._onSignedInChange),this._isSelected=!0,this.render(),this._getResolvedPromise();0===this.$el.children().length&&A.handleServerOutageFailure()}},this))},deselectPlugin:function(){var i=this.options,t=i.appApi.networkConnectivityApi;u.isCEF()&&t.removeNetworkOnlineChangeCallback(this._onOnlineChanged),e.PluginContentView.prototype.deselectPlugin.call(this),this._isSelected=!1},remove:function(){this.deselectPlugin(),e.PluginContentView.prototype.remove.call(this)},releasePlugin:function(){var e=this.options,i=this.options.appApi.folderApi;n.PluginView.prototype.releasePlugin.call(this),u.isCEF()&&(this._unsetPluginRoot(),i.setCurrentFolderId(e.pluginId,void 0),e.folderModel.unset("name"),this._pluginOptions=_.omit(this._pluginOptions,"routeFolderId","routeFilesFilters","routeFileId")),e.folderModel.unset("id"),e.searchUiModel.removeAllFieldQueries()},getSelectionUiModel:function(){return this.options.selectionUiModel},getPluginVersionList:function(){var e=[l.pluginBuildNumber],i=this.options.appApi.baseFilesUrisApi.getServerVersion();return i&&e.push(i),$.Deferred().resolve().promise(e)},getFilesFooterUrl:function(){var i=this.options,t=i.appApi.folderApi;return"root"===i.pluginId?e.opFactory.create("GettingSsoUriOp",i).run("folder/"+encodeURIComponent(t.getRootFolderId())):void 0},clickedOutsideAiCview:function(){return u.isCEF()&&(this._triggerViewEvent(e.ViewEvents.CLEAR_SELECTION),$(document.body).click()),this._getResolvedPromise()},getSiteCatalystName:function(){var e=this.options,i=e.appApi,t=e.pluginId;return i&&i.connectorsApi.isConnectorPlugin(t)?i.connectorsApi.getConnectorPluginScName(t):s.DOCUMENT_CLOUD},doesFileExists:function(e){var i,t,n,o,s,l=this.options,r=l.filesUiModel;return r.isFolderView()?i=l.folderModel.get("items"):l.filesUiModel.isSearchResultsView()&&(i=l.searchModel.get("items")),e&&i&&(e=e.toLowerCase(),s=h.getNormalizedString(e,"NFC"),_.isUndefined(s)||(e=s),n=i.models,t=_.find(n,function(i){return"file"===i.get("object_type")?(o=i.get("name").toLowerCase(),s=h.getNormalizedString(o,"NFC"),_.isUndefined(s)||(o=s),o===e):!1})),t},_runSearchOp:function(e){return this.options.isInSearchResultsView?(u.isCEF()&&this.options.appApi.displayApi.showSpinner(!1),$.Deferred().resolve().promise()):i.opFactory.create("SearchingIfAskedOp",e).run().done(_.bind(function(){if(e.noInitialViewCounts||this._seenInitialView||(this._seenInitialView=!0,this._logInitialViewCounts()),u.isCEF())if("root-select"===e.pluginId){var i=e.folderModel.get("loaded");i&&i===!0&&this.options.appApi.displayApi.showSpinner(!1)}else this.options.appApi.displayApi.showSpinner(!1)},this)).fail(_.bind(function(){u.isCEF()&&this.options.appApi.displayApi.showSpinner(!1)},this))},_onViewEvent:function(i,t){var n=this.options;return n.inFileSelectionDlg&&i===e.ViewEvents.SELECTION_COMMIT?void n.selectionUiModel.commitSelection():void this.trigger(i,t)},_renderChildViews:function(){if(this.options.forRecentFileListing){var t=_.template('<div class="files-rhp ui-theme theme-container">');this.$el.append(t()),this.$rhp=this.$(".files-rhp"),this.$cbView=this._renderChildView("_filesRhpView",i.FilesRhpView,this.$rhp,{forRecentFileList:!0,rhpPreviewUiModel:e.modelFactory.create("RhpPreviewUiModel")})}else this._renderChildView("_filesContainerView",i.FilesContainerView,this.$el)},_initPlugin:function(){var e,i,t=this._initingPluginPromise,n=this.options,s=n.pluginId,l=n.appApi.connectorsApi,r=s,a=g.CLOUD_NAME;return i=l.getConnectorUIName(s),i&&(a=i),e=_.template(g.NOTIFICATION_HEADING,{cloudName:a}),_.extend(this.options,{notificationHeading:e,notificatonCategory:r}),t||(t=this._initingPluginPromise=o.opFactory.create("InitializingPluginOp",this.options).run()),t},_startPlugin:function(){var e=this._startingPluginPromise,i=!1,t=!1;return this.options.forRecentFileListing?(this.render(),void this.options.appApi.displayApi.showSpinner(!1)):(e||(e=this._startingPluginPromise=o.opFactory.create("StartingPluginOp",this.options).run().then(_.bind(function(){this.options.noAcrobat||this._addAppApiCallbacks(),i=this.options.showFoldersInSearch===!0,t=i&&this.options.showNavigationAtRoot===!0,this.options.searchUiModel.set({should_show_folders:i,should_show_navigate_root:t},{silent:!0})},this))),e)},_configureAction:function(e,i,t){var n=this.options,o=n.appApi.connectorsApi,s=o.isActionRestricted(e,i);return s&&(n[t]=!0),s},_configureActions:function(e){var i=this.options,t=i.pluginId,n=i.appApi.connectorsApi;n.isConnectorPlugin(t)&&(this._configureAction(e,a.NEWFOLDER,"noNewFolder"),this._configureAction(e,a.UPLOAD,"noUpload"),this._configureAction(e,a.FILTER,"noFilter"),this._configureAction(e,a.SORT,"noSort")&&i.sortUiModel.set("is_locked",!0),this._configureAction(e,a.SEND,"noShare"),this._configureAction(e,a.SEND,"noShareButton"),this._configureAction(e,a.DOWNLOAD,"noDownload"),this._configureAction(e,a.DELETE,"noDelete"),this._configureAction(e,a.MOVE,"noMove"),this._configureAction(e,a.RENAME,"noRename"))},_initFilter:function(i){var t,n,o,s,l,r=e.SearchUiModel,a=this.options.searchUiModel,c=this._getResolvedPromise();return u.isCEF()&&(c=this.options.readerContextModel),c.then(_.bind(function(){return i?(t=i.filter,t&&(n=t.mimeTypes,o=t.extensions,n&&n.length>0?a.addFieldQuery({field:r.FIELD_FILE_TYPE,value:n.join(),commitQueryBox:!0,queryBoxVisible:!this.options.noVisibleFieldQueries,queryLabel:t.queryLabel,removable:!1},{silent:!0}):u.isCEF()&&o&&o.length>0&&this.options.collectionsUiModel.set("filter_by_extension",o,{silent:!0}),s=t.minSize,s&&a.addFieldQuery({field:r.FIELD_FILE_MIN_SIZE,value:s,commitQueryBox:!1,queryBoxVisible:!this.options.noVisibleFieldQueries,removable:!1},{silent:!0}),l=t.maxSize,l&&a.addFieldQuery({field:r.FIELD_FILE_MAX_SIZE,value:l,commitQueryBox:!1,queryBoxVisible:!this.options.noVisibleFieldQueries,removable:!1},{silent:!0})),t):void 0},this))},_getSiteCatalystContext:function(){var e=this.options,i=e.appApi,t=e.pluginId;return i&&i.connectorsApi.isConnectorPlugin(t)?e.selectFilesScContext?i.connectorsApi.getConnectorPluginScName(t):s.FILE_LIST:e.selectFilesScContext?s.DOCUMENT_CLOUD:s.FILE_LIST},_logInitialViewCounts:function(){var e=this.options,i=e.appApi.siteCatalystApi,t=e.folderModel,n=[this._getSiteCatalystContext(),s.INITIAL_VIEW];i.logScEvent(n.concat([s.NUM_FILES_SHOWN,s.getCountCode(t.getChildFilesCount())])),i.logScEvent(n.concat([s.NUM_FOLDERS_SHOWN,s.getCountCode(t.getChildFoldersCount())]))},_addAppApiCallbacks:function(){var e=this.options.appApi;u.isCEF()||e.sessionApi.addSignedInChangeCallback(this._onSignedInChange),e.acrobatApi.addSelectedFilterIndexChangeCallback(this._onSelectedFilterIndexChange)},_onSignedInChange:function(e,i){var t=this.options;u.isCEF()?this._isSelected?i?(this.deselectPlugin(),this.selectPlugin(this._pluginOptions)):(t.dialogsUiModel.closeAll(),t.selectionUiModel.clearSelection(!1),this.releasePlugin(),delete this._startingPluginPromise,this.render()):i||(t.selectionUiModel.clearSelection(!1),this.releasePlugin(),delete this._startingPluginPromise):i||delete this._startingPluginPromise},_onSelectedFilterIndexChange:function(e,i){var t=this.options;t.collectionsUiModel.set("filter_by_extension",t.appApi.acrobatApi.getFilterFileExtensions(i))},_onOnlineChanged:function(e,i){i?(this.deselectPlugin(),this.selectPlugin(this._pluginOptions)):(this.options.appApi.saveAsApi.setCanSave(!1),this.render())},_unsetPluginRoot:function(){var e=this.options,i=e.appApi.connectorsApi;"root"===i.getConnectorPluginName(e.pluginId)&&i.setConnectorPluginRoot(e.pluginId,void 0)},getFolderAncestorIds:function(){var e,i=[];return e=this.options.folderUiModel.get("path"),_.each(e,function(e){i.push(e.id)}),i},_onNetworkStateChangeFromFeat:function(e,i){var t=(this.options,this.options.appApi);t.rnaApi.done(_.bind(function(e){e.isFeatRunning()&&e.isASTestAllowInstantiation()&&(t.options.networkConnectivityModel.set({is_connected:i?i.state:!1}),t.networkConnectivityApi.removeNetworkConnectivtyChangeCallback(this._onOnlineChanged))},this))},_setContextBoardModel:function(e){this.$cbView&&e&&this.$cbView._setModel(e,!0)},_getSendUriTrimmed:function(){var e=this.options.appApi.baseFilesUrisApi.getSendApiUri(),i=e.lastIndexOf("api");return e=e.substring(0,i)},_onDeleteViewAsset:function(){this._triggerViewEvent(e.ViewEvents.DELETE_SHARED,{parentView:this,parcelModel:this.options.selectionUiModel.getSingleSelectedItemModel()})},_enableRefresh:function(e){this._enableRefresh=e},_refreshDcUI:function(){(void 0==this._enableRefresh||this._enableRefresh)&&this.options.appApi.folderApi.refreshCurrentFolder(this.options)},_refreshAssetSharedStatusInDC:function(e){this.options.appApi.folderApi.updateFileSharedStatus(this.options,e)},_onDeleteReviewAsset:function(i){var t=this.options,n={},o={};i.isOriginalShared?(n.Title=d.CONFIRM_DELETE_SHARED_FILE_TITLE_NO_COPY_MODEL,n.Message=d.CONFIRM_DELETE_SHARED_FILE_MSG_NO_COPY_MODEL,n.ActionButtonName=d.CONFIRM_DELETE_SHARED_FILE_BUTTON_NO_COPY_MODEL):(n.Title=d.CONFIRM_DELETE_SHARED_FILE_TITLE_COPY_MODEL,n.Message=d.CONFIRM_DELETE_SHARED_FILE_MSG_COPY_MODEL,n.ActionButtonName=d.CONFIRM_DELETE_SHARED_FILE_BUTTON_COPY_MODEL),n.RejectButtonName=d.CANCEL,o.InvitationId=i.InvitationId,t.appApi.rnaApi.done(_.bind(function(l){l._reviewAPI.invoke("EurekaAlertDialog",n).done(_.bind(function(n){n===!0&&e.opFactory.create("DeletingReviewOp",this.options).run(i.ParcelId).then(_.bind(function(){try{var e="Delete";void 0!==i.isOriginalShared&&i.isOriginalShared&&(e+=s.VIRGO_ORIGINAL_SHARE),e+=" Review",l._reviewAPI.invoke("logEurekaEventAndDataGroup",["Eureka:Review success","Success",e,"EurekaActions",i.ParcelId,i.role])}catch(n){}l._reviewAPI.invoke("deleteReview",[i.ParcelId,i.InvitationId,i.workflowType]),l._reviewAPI.invoke("AVEurekaDocClose",o),l._reviewAPI.invoke("DeleteEurekaCache",o),this._showToast(d.DELETED_STRING);var r,a=this.options.selectionUiModel.getSingleSelectedItemModel(),c=void 0;Ac.discoveryUrisModel&&(r=Ac.discoveryUrisModel.getUSSUrlsAndUserInfo()),r&&(c=r.isACPUser),t.isInSearchResultsView?c?t.searchUiModel.trigger("refresh_search_category","creative_cloud"):(t.searchUiModel.trigger("refresh_search_category","document_cloud"),t.searchUiModel.trigger("refresh_search_category","review")):(t.selectionUiModel.deselectItem(a.id,!0),t.appApi.folderApi.refreshCurrentFolder(t).then(_.bind(function(){t.selectionUiModel.triggerSelectionChange()},this)))},this))},this))},this))},_showToast:function(i){this.options.toastArgumentString=i,this.options.FadeOutTime=3e3;var t=this.$el;this.$toastPlaceholderDIV=t.find(".rhp-action-toast-placeholder"),0==this.$toastPlaceholderDIV.length&&(this.$toastPlaceholderDIV=$('<div class="rhp-action-toast-placeholder"></div>'),t.append(this.$toastPlaceholderDIV)),this._renderChildView("_rhpToast",e.RhpActionsToast,this.$toastPlaceholderDIV,{options:this.options})},_showCustomizeToast:function(i){if(!_.isUndefined(i)&&!_.isUndefined(i.argsString)){this.options.toastArgumentString=i.argsString,this.options.FadeOutTime=3e3,i.fadeTimeout&&(this.options.FadeOutTime=i.fadeTimeout);var t=this.$el;if(this.$toastPlaceholderDIV=t.find(".rhp-action-toast-placeholder"),0==this.$toastPlaceholderDIV.length&&(this.$toastPlaceholderDIV=$('<div class="rhp-action-toast-placeholder"></div>'),t.append(this.$toastPlaceholderDIV)),this._renderChildView("_rhpToast",e.RhpActionsToast,this.$toastPlaceholderDIV,{options:this.options}),i.hideIcon){var n=t.find(".toast-icon");n&&(n.hide(),this._rhpToast.$toastAction.css("display","block"))}}}}),o.PluginView}),define("acplugins/my-files/js/my-files",["acplugins/my-files/js/ac-my-files","acplugins/my-files/js/ops/op-factory","acplugins/my-files/js/views/plugin-view"],function(e){_.extend(e,{init:function(){e.opFactory=new e.OpFactory}})}),define("acplugins/my-files/js/plugin",["core/ac-core-init","files/ac-files-init","acplugins/my-files/js/ac-my-files","acplugins/my-files/js/my-files"],function(e,i,t){t.init()});