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

(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"+Gvn":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_ru.jpg"},"/6YQ":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_fr.png"},"/Syu":function(e){e.exports=JSON.parse('{"environment":"stage","accessToken":"","userProfileId":"","subscriptionType":"paid"}')},"/Wem":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_fi.jpg"},"/o1Y":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ja.jpg"},"0saz":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_sv.jpg"},"2BIK":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_sv.jpg"},"3otC":function(e,t){e.exports="1.95.4"},"4dXS":function(e,t,n){"use strict";n.r(t),n.d(t,"docPickerDialogID",(function(){return ve})),n.d(t,"docPickerDialogClass",(function(){return Ce})),n.d(t,"renderPickerWithNode",(function(){return Oe})),n.d(t,"showSingletonDocPicker",(function(){return we})),n.d(t,"showMultiInstanceDocPicker",(function(){return xe})),n.d(t,"openDocumentPicker",(function(){return De})),n.d(t,"saveAsDocumentPicker",(function(){return Ee})),n.d(t,"saveAsCopyDocumentPicker",(function(){return Se})),n.d(t,"linkAssetsPicker",(function(){return ye})),n.d(t,"relinkAssetsPicker",(function(){return Te})),n.d(t,"multiInstancelinkAssetsPicker",(function(){return Pe})),n.d(t,"multiInstanceSaveAsDocumentPicker",(function(){return Le}));var o=n("q1tI"),s=n.n(o),a=n("i8i4"),i=n("EcEN"),r=n.n(i),c=n("JRPe");const l={event:{category:"DESKTOP"},source:{name:"CCX-Document-Picker"}};var d=n("t+6E"),p=n("j6Ri"),u=n.n(p),h=n("bUsb"),g=n.n(h),m=n("2oH+"),b=n.n(m),f=n("okNM"),_=n("OQA9"),k=n("WgUl"),v=n.n(k),C=function(e,t,n,o){var s,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i};const O=n("KoSV");let w=class extends o.Component{render(){const{value:e,errorMessage:t,onInputChange:n,onPrimaryButtonClick:s,isDialogOpen:a}=this.props,i=o.createElement(c.b,{id:"pickerView.saveAsInput"}),r=t===d.s.invalidChar?{characters:d.r}:{},l=""!==t,p=l?"pickerView.error.saveAs."+t:"pickerView.error.saveAs.default",u=l?"invalid":"";return o.createElement("div",{className:O.root},o.createElement("div",{className:O.input},o.createElement("div",{className:O.label},i),o.createElement("div",{className:O.textField},o.createElement(v.a,{autoFocus:!0,placeholder:"",validationState:u,className:O.textChild,value:e,onChange:e=>n&&n(e),onKeyDown:e=>{"Enter"===e.key&&s&&s()},disableOnOverlay:a}))),o.createElement("div",{className:O.error},o.createElement("div",{className:`${O.label} ${O.indentFix}`},i),o.createElement("div",{className:O.errorMessage+(l?" "+O.show:"")},o.createElement(c.b,{id:p,values:r,defaultMessage:p}))))}};w=C([f.d],w);var x=Object(c.g)(w),D=n("Cn9g"),E=n.n(D);const S=n("orUL");class y extends o.Component{constructor(){super(...arguments),this._renderButton=({name:e,className:t="spectrum-Button",style:n={},onClickHandler:s,variant:a="primary",disabled:i=!1,quiet:r=!1,icon:l=null})=>o.createElement("div",{key:e,className:S.button,id:"PickerViewFooter_ActionButton"+e},o.createElement(E.a,{className:t,variant:a,style:n,quiet:r,icon:l,disabled:i,onClick:s},o.createElement(c.b,{id:"pickerViewFooter.button."+e})))}render(){const{primaryButtonLabel:e,cancelButtonLabel:t,switchToOSPickerLabel:n,onPrimaryButtonClick:s,onCancel:a,onSwitchToOSPicker:i,disableOnYourComputerButton:r,platform:c,primaryButtonDisabled:l,disableCancelButton:p}=this.props,u=c===d.k.win,h=this._renderButton({name:t,onClickHandler:a,style:{paddingLeft:"7px",paddingRight:"7px"},disabled:!!p}),g=s?this._renderButton({className:l?"spectrum-Button--cta is-disabled":"spectrum-Button--cta",disabled:l,name:e,onClickHandler:s,style:{paddingLeft:"7px",paddingRight:"7px"},variant:"cta"}):void 0;return o.createElement("div",{className:S.root},i&&o.createElement("div",{className:S.left},!r&&this._renderButton({name:n,onClickHandler:i,variant:"secondary"})),o.createElement("div",{className:S.right},u?o.createElement(o.Fragment,null,g,a&&h):o.createElement(o.Fragment,null,a&&h,g)))}}var T=y,P=n("W+Dz");const L=n("+lVt");class A extends o.Component{constructor(){super(...arguments),this.onSwitch=(e,t)=>{e.preventDefault(),this.props.onSwitchView(e,t)}}render(){const{currentView:e,tabs:t}=this.props,n=o.createElement(c.b,{id:"pickerView.verticalView.header"});return o.createElement("div",{className:L.root},o.createElement("div",{className:L.sidenav},o.createElement(P.SideNav,{defaultValue:"Layout"},o.createElement(P.SideNavHeading,{label:n,variant:"heading3"}),t.map(e=>o.createElement(P.SideNavItem,{value:e.defaultLabel,label:e.defaultLabel,key:e.id,onClick:t=>this.onSwitch(t,e)})))),o.createElement("div",{className:L.mainItems},t.find(t=>t.defaultLabel===e).component))}}var I,j=A;!function(e){e.linkAssets="linkAssets",e.open="open",e.organizer="organizer",e.relink="relink",e.save="save",e.saveAs="saveAs",e.saveAsCopy="saveAsCopy",e.saveToFolder="saveToFolder"}(I||(I={}));var N=I,B=n("L+OI"),V=n.n(B),U=n("tbFH"),R=function(e,t,n,o){var s,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},F=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};const M=n("c56M");let H=class extends o.Component{constructor(e){super(e),this.locale=this.props.intl.locale.substr(0,2),this._renderButton=({name:e,onClickHandler:t,variant:n="primary",quiet:s=!1,disabled:a=!1})=>{const{intl:i}=this.props;return o.createElement("div",{key:e,id:"OnboardingView_ActionButton_"+e},o.createElement(E.a,{variant:n,quiet:s,disabled:a,onClick:t,label:i.formatMessage({defaultMessage:e,id:"onboardingCdp.button."+e}),useUxpButton:!1}))};const{ccxIngest:t}=this.props;t&&t.fireEvent({event:{subcategory:"Onboarding",subtype:"page",type:"render",workflow:"Main"}},!1).catch(e=>{console.warn("[OnboardingView] ccxIngest.fireEvent failed "+e)}),this.state={},this.loadImages()}async loadImages(){const{productId:e}=this.props;let t;try{t=await this._require(`./Onboarding_Cloud_${e.toLowerCase()}_${this.locale}.png`)}catch(e){t=await this._require(`./Onboarding_Cloud_${this.locale}.jpg`)}const n=await this._require(`./Onboarding_Local_${e.toLowerCase()}_${this.locale}.jpg`);this.setState({cloudDocImageSrc:t,localDiskImageSrc:n})}_require(e){try{return U(e)}catch(t){return U(e.replace(new RegExp(this.locale+".jpg$"),"en.jpg"))}}render(){const{dontShowCheckValue:e,onToggleDismissal:t,onSwitchToCDOPicker:n,onSwitchToOSPicker:s,productId:a,intl:i}=this.props,{cloudDocImageSrc:r,localDiskImageSrc:l}=this.state,d="onboardingCdp.panel.body.saveToCloud."+a.toLowerCase();return o.createElement("div",{className:M.root},o.createElement("div",{className:M.main},o.createElement("div",{className:M.header},o.createElement(c.b,{id:"onboardingCdp.header"}),o.createElement("div",{className:M.subheader},o.createElement(c.b,{id:"onboardingCdp.subheader"}))),o.createElement("div",{className:M.panels},o.createElement("div",{className:M.panel},o.createElement("div",{className:M.panelImage},o.createElement("img",{src:r,alt:""})),o.createElement("div",{className:M.panelBody},o.createElement("div",{className:M.panelHeader},o.createElement(c.b,{id:"onboardingCdp.panel.header.saveToCloud"}),o.createElement("div",{className:M.label},o.createElement(c.b,{id:"onboardingCdp.label.new"}))),o.createElement("div",{className:M.panelContent},o.createElement(c.b,{id:d})),this._renderButton({name:"saveToCloud",onClickHandler:n}))),o.createElement("div",{className:M.panel},o.createElement("div",{className:M.panelImage},o.createElement("img",{src:l,alt:""})),o.createElement("div",{className:M.panelBody},o.createElement("div",{className:M.panelHeader},o.createElement(c.b,{id:"onboardingCdp.panel.header.saveToLocal"})),o.createElement("div",{className:M.panelContent},o.createElement(c.b,{id:"onboardingCdp.panel.body.saveToLocal"})),this._renderButton({name:"saveToLocal",onClickHandler:s})))),o.createElement("div",{id:"OnboardingView_CheckboxButton"},o.createElement(V.a,{onClick:t,label:i.formatMessage({id:"onboardingCdp.checkbox.doNotShowAgain"}),checked:e}))))}};H=R([f.d,F("design:paramtypes",[Object])],H);var Y=Object(p.ccxIngest)("doc-picker-service")(Object(c.g)(H)),z=function(e,t,n,o){var s,a=arguments.length,i=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(i=(a<3?s(i):a>3?s(t,n,i):s(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i},q=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};const K=n("5HZb");var J,W,G;!function(e){e.saveAs="save",e.saveAsCopy="saveAsCopy",e.saveToFolder="choose",e.cancel="cancel",e.switchToOSPicker="switchToOSPicker",e.switchToSketchLibrariesImport="switchToSketchLibrariesImport"}(J||(J={})),function(e){e.cloudDocs="Cloud Documents",e.recents="Recents",e.sharedWithYou="Shared With You",e.libraries="Libraries"}(W||(W={})),function(e){e.DontShow="DontShow",e.CloudDocs="CloudDocs",e.LocalDocs="LocalDocs"}(G||(G={}));let $=class extends s.a.Component{constructor(e,...t){super(e,...t),this.focusEl=s.a.createRef(),this.cloudDocumentTab={component:s.a.createElement(d.c,null),defaultLabel:"Cloud Documents",id:"cloud",ingestSubcategory:"Cloud Documents",label:"pickerView.cloud_docs"},this.convertToSketchLibrariesTab={defaultLabel:"Convert Sketch Library...",id:"sketch",ingestSubcategory:"Convert Sketch Libary",label:"pickerView.sketch_library",action:()=>this.onSwitchToSketchLibrariesImport()},this.recentTab={component:s.a.createElement(d.l,null),defaultLabel:"Recent",id:"recent",ingestSubcategory:"Recent",label:"pickerView.recent"},this.sharedWithYouTab={component:s.a.createElement(d.m,null),defaultLabel:"Shared with You",id:"shared",ingestSubcategory:"Shared with You",label:"pickerView.shared_with_you"},this.deletedTab={component:s.a.createElement(d.d,null),defaultLabel:"Deleted",id:"deleted",ingestSubcategory:"DeletedCDP",label:"header.Deleted"},this._handleTabChange=e=>{const t=this._getTabs()[e],{action:n,component:o}=t;this._fireIngestEvent({event:{subtype:t.ingestSubcategory,type:"click",workflow:"Navigation"}},!1),n&&("string"==typeof n?this.executeValidAction(n):n(t)),o&&this.setState({activeTab:e})},this.executeValidAction=e=>{const{view:t}=this.cdoStore;e!==J.saveAs&&e!==J.saveAsCopy&&e!==J.saveToFolder||this._fireIngestEvent({event:{subcategory:"Save as Cloud Document",subtype:"save-as",type:"click",workflow:"Document-Operation"},ui:{view_type:t}},!0),this.setState({selectedAction:e,errorMessage:""},()=>{const{selectedAction:e,saveAsName:t,dontShowCheckboxValue:n}=this.state,{windowController:o,mode:s}=this.props,a={action:e,dismissInterstitial:n?"true":"false",folder:this.docStore.currentPath,mode:s,name:t,windowController:o};a.folder&&""!==a.folder&&"/"!==a.folder.charAt(0)&&(a.folder="/"+a.folder),this.callbacks.onExecutePickerAction&&this.callbacks.onExecutePickerAction(a)})},this.handleSaveAsInputChange=e=>{this.setState({saveAsName:e})},this._handleOnboardingAction=e=>{const{dontShowCheckboxValue:t}=this.state;let n={subcategory:"Onboarding",type:"click",workflow:"Main",subtype:"",value:!1};switch(e){case G.CloudDocs:this.setState({showOnboarding:!1}),n={...n,subtype:"save-cloud",value:t};break;case G.LocalDocs:this.callbacks.onExecutePickerAction({action:"switchToOSPicker",dismissInterstitial:t,mode:"saveAs"}),this.setState({showOnboarding:!1}),n={...n,subtype:"save-local",value:t};break;case G.DontShow:const e=!t;this.setState({dontShowCheckboxValue:e}),n={...n,subtype:"dont-show",value:e}}this._fireIngestEvent({event:n},!1)},this.onSaveAs=()=>{const{saveAsName:e}=this.state,t=Object(d.t)(e);t===d.s.valid?this.executeValidAction(J.saveAs):this.setState({errorMessage:t})},this.onSaveToFolder=()=>{this.executeValidAction(J.saveToFolder)},this.onCancel=()=>{this.executeValidAction(J.cancel)},this.onCancelListener=()=>{const{parentNode:e}=this.props;e&&e.removeEventListener("cancel",this.onCancelListener),this.onCancel()},this.onSwitchToOSPicker=()=>{this._fireIngestEvent({event:{subtype:"Your Computer",type:"click",workflow:"Navigation"}},!0),this.executeValidAction(J.switchToOSPicker)},this.onSwitchToSketchLibrariesImport=()=>{this._fireIngestEvent({event:{subtype:"Convert Sketch Libary",type:"click",workflow:"Navigation"}},!0),this.executeValidAction(J.switchToSketchLibrariesImport)},this.onBeforeItemClicked=e=>{const{mode:t}=this.props;switch(t){case N.open:case N.relink:return!0;case N.saveAs:case N.saveAsCopy:this.setState({saveAsName:e.title});break;case N.saveToFolder:}return!1},this.onSwitchView=(e,t)=>{const n=e.target.textContent,{action:o,component:s}=t;o&&o(t),s&&this.setState({currentView:n})},this.renderSaveAsView=()=>{const{isUserLoggedOut:e}=this.docStore,{saveAsName:t,errorMessage:n,platform:o}=this.state,{intl:a,isDialogOpen:i,onDialogStateChange:r,disableCancelButton:c,disableOnYourComputerButton:l}=this.props,p=(this._getTabs(),""===t),u=this.isCloudOnlyFolderAndOffline(),h=e||p||u,g=s.a.createElement(x,{value:t,errorMessage:n,onInputChange:this.handleSaveAsInputChange,onPrimaryButtonClick:this.onSaveAs,isDialogOpen:i}),m=s.a.createElement(d.c,{onBeforeItemClicked:this.onBeforeItemClicked,onDialogStateChange:r}),b=s.a.createElement(T,{disableOnYourComputerButton:l,primaryButtonLabel:J.saveAs,cancelButtonLabel:J.cancel,switchToOSPickerLabel:J.switchToOSPicker,onCancel:this.onCancel,onPrimaryButtonClick:this.onSaveAs,onSwitchToOSPicker:this.onSwitchToOSPicker,platform:o,primaryButtonDisabled:h,disableCancelButton:c});return s.a.createElement(s.a.Fragment,null,g,m,b)},this.renderSaveToFolderView=()=>{const e=s.a.createElement(d.c,{onBeforeItemClicked:this.onBeforeItemClicked}),t=this.isCloudOnlyFolderAndOffline(),{platform:n}=this.state,{intl:o,disableCancelButton:a,disableOnYourComputerButton:i}=this.props,r=s.a.createElement(T,{disableOnYourComputerButton:i,primaryButtonLabel:J.saveToFolder,cancelButtonLabel:J.cancel,onPrimaryButtonClick:this.onSaveToFolder,platform:n,primaryButtonDisabled:t,onCancel:this.onCancel,disableCancelButton:a});return s.a.createElement(s.a.Fragment,null,e,r)},this.renderMainView=()=>{const{activeTab:e,platform:t}=this.state,{cdpTabs:n,disableCancelButton:o,disableOnYourComputerButton:a}=this.props,i=s.a.createElement("div",{className:K.tabHeaderEmpty});let r,l;const d=this._getTabs();if(n){const t=d[e];l=t&&t.component,r=s.a.createElement("div",{className:K.tabHeader},s.a.createElement(_.TabList,{variant:"compact",keyboardActivation:"manual",onChange:this._handleTabChange,className:K.tabs,selectedIndex:e},d.map(e=>s.a.createElement(_.Tab,Object.assign({key:e.id},e.additionalTabProps),s.a.createElement(c.b,{id:e.label,defaultMessage:e.defaultLabel})))))}else r=i,l=this.cloudDocumentTab.component;const p=s.a.createElement(T,{disableOnYourComputerButton:a,switchToOSPickerLabel:J.switchToOSPicker,onSwitchToOSPicker:this.onSwitchToOSPicker,cancelButtonLabel:J.cancel,onCancel:this.onCancel,platform:t,disableCancelButton:o});return s.a.createElement(s.a.Fragment,null,n?i:r,n?this.renderVerticalTabView(d):l,p)},this.renderVerticalTabView=e=>{const{currentView:t}=this.state,{intl:n}=this.props;return s.a.createElement(j,{intl:n,onSwitchView:this.onSwitchView,currentView:t,tabs:e})},this.renderResourceView=()=>{const{platform:e}=this.state,{intl:t,imsData:n,disableCancelButton:o}=this.props,{hostProductData:a}=this.cdoStore,i=s.a.createElement("div",null),r=s.a.createElement(T,{cancelButtonLabel:J.cancel,onCancel:this.onCancel,platform:e,disableCancelButton:o});return s.a.createElement(s.a.Fragment,null,i,r)},this.state={activeTab:e.defaultTab||0,dontShowCheckboxValue:!e.showInterstitial,errorMessage:"",platform:e.cdoStore.hostProductData.platform,saveAsName:e.saveAsName||"",selectedAction:"",showOnboarding:e.showInterstitial,currentView:W.cloudDocs||""},this.callbacks=e.callbacks,this.cdoStore=e.cdoStore,this.docStore=e.cdoStore.docStore,this._fireIngestEvent({event:{subcategory:"Init",subtype:"component",type:"init",workflow:"Initialize"}},!1)}componentDidMount(){const{folder:e}=this.props;e&&this.docStore.setCurrentPath(e);setTimeout(()=>{const{mode:e}=this.props;this.focusEl.current&&!this.focusEl.current.contains(document.activeElement)&&this.focusEl.current.focus()},500),this._fireIngestEvent({event:{subcategory:"Landing",subtype:"page",type:"render",workflow:"Main"}},!1)}componentDidUpdate(e){const{saveAsName:t,folder:n}=this.props;t!==e.saveAsName&&this.setState({errorMessage:"",saveAsName:t}),n!==e.folder&&n!==this.docStore.currentPath&&this.docStore.setCurrentPath(n)}_getTabs(){const{mode:e,additionalTabs:t,deletedTab:n}=this.props;let o;switch(e){case N.linkAssets:o=[this.cloudDocumentTab,this.sharedWithYouTab,this.convertToSketchLibrariesTab];break;case N.relink:o=[this.recentTab,this.cloudDocumentTab,this.sharedWithYouTab];break;case N.open:o=[this.recentTab,this.cloudDocumentTab,this.sharedWithYouTab],n&&o.push(this.deletedTab);break;case N.saveAs:default:o=[]}return o=t&&t.length>0?o.concat(...t):o,o}_hasMoreThanOneTab(){return this._getTabs().length>1}_isSaveAsPicker(){const{mode:e}=this.props;return e===N.saveAs||e===N.saveAsCopy}_fireIngestEvent(e,t){const{ccxIngest:n}=this.props;n&&n.fireEvent(e,t).catch(e=>{console.warn("[PickerView] ccxIngest.fireEvent failed "+e)})}isCloudOnlyFolderAndOffline(){const{currentFolderCollection:e,isOnline:t}=this.docStore;return e&&!e.hasOfflineContent&&!t}render(){const{hostProductData:e}=this.cdoStore,{dontShowCheckboxValue:t,showOnboarding:n}=this.state,{mode:o}=this.props,{parentNode:a}=this.props,i=this._isSaveAsPicker(),r=o===N.open||o===N.relink||o===N.linkAssets,c=o===N.saveToFolder,l=n&&i,d=s.a.createElement(s.a.Fragment,null,r&&this.renderMainView(),i&&this.renderSaveAsView(),c&&this.renderSaveToFolderView()),p=s.a.createElement(Y,{dontShowCheckValue:t,onSwitchToCDOPicker:()=>this._handleOnboardingAction(G.CloudDocs),onSwitchToOSPicker:()=>this._handleOnboardingAction(G.LocalDocs),onToggleDismissal:()=>this._handleOnboardingAction(G.DontShow),productId:e.productId});return!a||n||this.listenerAdded||(a.addEventListener("cancel",this.onCancelListener),this.listenerAdded=!0),s.a.createElement("div",{className:K.root+" PickerView",tabIndex:-1,ref:this.focusEl},l?p:d)}};$=z([Object(f.c)("cdoStore","callbacks"),f.d,q("design:paramtypes",[Object,Object])],$);var X=Object(p.ccxIngest)("doc-picker-service")(Object(c.g)($)),Q=n("ybeB"),Z=n.n(Q),ee=n("3otC"),te=n.n(ee),ne=n("/Syu"),oe=n("9y/e"),se=n("L+l/");n("lx0c"),n("rHX9"),n("yNAW");const ae={default:Z.a};let ie,re;const ce=window;let le,de;if("undefined"!=typeof cdoHost)ie=cdoHost,re=ce.require("uxp").host,le=ce.require("os").release();else{le="Unknown";try{ie=ce.require("cdoHost")}catch(e){console.warn("No host app provided, using web as the host and loading configuration from .config/")}}re||(re={addEventListener:()=>{},buildNumber:"1.2.3"}),de=ie?{analyticsProjectKey:ie.analyticsProjectKey,apiKey:ie.apiKey,callbacks:{onFeatureEnabled:e=>ie.featureEnabled(e),onGetLocalRecents:async()=>ie.getLocalRecents(),onGetPreviewRendition:async e=>{const t=await ie.getUxpPreviewRendition(e);return Promise.resolve(t)}},cloudStorageEnabled:()=>!0,dcxId:ie.dcxAppId,defaultDocumentIcons:ae,defaultTab:ie.defaultTab||0,documentFilter:ie.documentFilter,environment:ie.environment,featureFlags:{cdpTabs:ie.featureEnabled("CloudDocUseCDPTabs"),disableACPL:!1,disableCloudDocPrefetch:!0,disableOnYourComputerButton:ie.featureEnabled("disableOnYourComputerButton"),emptyViewLoggedOutMessage:!0,enableAssetRef:ie.featureEnabled("enableAssetRef"),enableCDPOnboarding:ie.featureEnabled("CloudDocCDPOnboarding"),enableCloudDocExport:ie.featureEnabled("CloudDocExport"),enableCloudDocFolders:ie.featureEnabled("CloudDocFolders"),enableCloudDocMultiSelectOpen:ie.featureEnabled("CloudDocMultiSelectOpen"),enableCloudDocPinning:ie.featureEnabled("CloudDocPinning"),enableCloudDocRename:ie.featureEnabled("CloudDocRename"),enableSAM:ie.featureEnabled("CloudDocUseSAM"),focusManagementEnabled:!0,useAdobeReactVirtualized:ie.featureEnabled("CloudDocUseARVS"),useCDPDeletedTab:ie.featureEnabled("CloudDocUseCDPDeletedTab"),useOrganizerMode:ie.featureEnabled("CloudDocOrganizerDemo")},fetchToken:async e=>{try{return await ie.getUserAccessToken(e)}catch(e){return console.error("[CDP] fetchToken: "+e),""}},fetchUserEmail:()=>ie.getUserEmail(),fetchUserId:()=>ie.getUserId(),locale:ie.locale||ie.appLanguage,platform:Object(d.u)(ie.platform),productBuildNumber:re&&re.buildNumber||"",productId:ie.sapCode,productName:ie.name,productVersion:ie.version,subscriptionType:()=>"type1",theme:async()=>{if(ie.getTheme)switch(await ie.getTheme()){case"dark":return d.o.dark;case"darkest":return d.o.darkest;case"light":return d.o.light;case"lightest":return d.o.lightest;default:return d.o.light}},uiLocale:ie.locale||ie.appLanguage,onboardingHelpJumpToken:ie.onboardingHelpJumpToken}:{...oe,...ne,callbacks:{onFeatureEnabled:e=>!0,onGetLocalRecents:async()=>Promise.resolve([])},cloudStorageEnabled:()=>oe.cloudStorageEnabled,defaultDocumentIcons:ae,defaultTab:0,featureFlags:se.featureFlags,fetchToken:()=>("undefined"===ne.accessToken&&console.warn("accessToken has not been defined in ./config/imsData.json"),ne.accessToken),fetchUserId:()=>("undefined"===ne.userProfileId&&console.warn("userProfileId has not been defined in ./config/imsData.json"),ne.userProfileId),locale:"en",subscriptionType:()=>ne.subscriptionType,theme:async()=>d.o.lightest};const pe={environment:de.environment,fetchToken:de.fetchToken,fetchUserEmail:de.fetchUserEmail,fetchUserId:de.fetchUserId,subscriptionType:de.subscriptionType()},ue={analyticsProjectKey:de.analyticsProjectKey,apiKey:de.apiKey,dcxId:de.dcxId,defaultDocumentIcons:de.defaultDocumentIcons,documentFilter:de.documentFilter,featureFlags:de.featureFlags,platform:de.platform,platformVersion:de.platformVersion,productBuildNumber:de.productBuildNumber,productId:de.productId,productLocation:"com.adobe.ccx.document-picker",productName:de.productName,productVersion:de.productVersion,uiLocale:de.uiLocale,onboardingHelpJumpToken:de.onboardingHelpJumpToken};class he extends o.Component{constructor(e){super(e),this._handleOpenDocuments=e=>{const{closeDialog:t}=this.props;this._isInApp?(ie.openDocuments(e),t&&t()):console.info("[ccx-document-picker] open document on host "+JSON.stringify(e))},this._handleUpdateUserDocuments=()=>{this._cdoProviderRef.current.onUpdateDocuments()},this._handleThemeChange=()=>{de.theme&&de.theme().then(e=>this.setState({theme:e},()=>{console.info("[ccx-document-picker] Theme changed to: "+e)}))},this.onDialogStateChange=e=>{this.setState({isDialogOpen:e})};const{callbacks:t,cdoIMSData:n,theme:s}=e;this._isInApp=void 0!==ie,this._defaultTab=de.defaultTab,this._cdoProviderRef=o.createRef(),this._ingestProviderRef=o.createRef(),this._callbacks={...de.callbacks,onExecutePickerAction:e=>{this._handleExecutePickerAction(e)},onOpenDocuments:e=>this._handleOpenDocuments(e),onStatusChange:e=>{this._cdoProviderRef.current.onUpdateDocuments()},...t};const a={};e.theme?a.theme=d.o[s]:de.theme&&de.theme().then(e=>this.setState({theme:e},()=>{console.info("[ccx-document-picker] Initial theme set to: "+e)})),a.isDialogOpen=!1,this.state=a,this._imsData=n||pe,this._isInApp&&(re?(re.addEventListener("MRUFileListChanged",this._handleUpdateUserDocuments),re.addEventListener("UPDATEUSERDOCUMENTS",this._handleUpdateUserDocuments),re.addEventListener("com.adobe.cdp.events.UpdateUserDocuments",this._handleUpdateUserDocuments),re.addEventListener("themechanged",this._handleThemeChange)):(ie.addEventListener("MRUFileListChanged",this._handleUpdateUserDocuments),ie.addEventListener("UPDATEUSERDOCUMENTS",this._handleUpdateUserDocuments),ie.addEventListener("com.adobe.cdp.events.UpdateUserDocuments",this._handleUpdateUserDocuments),ie.addEventListener("themechanged",this._handleThemeChange)))}componentDidUpdate(e){this._handleUpdateUserDocuments();const{mode:t}=e.pickerInfo,{pickerInfo:n}=this.props,{mode:o}=n;t!==o&&this.setState({mode:o})}get locale(){return d.h.normalizeLocale(de.locale)}get hostProductData(){const{pickerInfo:e,cdoHostProductData:t}=this.props,n={...ue.featureFlags,...e.featureFlags};return{...t||ue,featureFlags:n}}_handleExecutePickerAction(e){const{pickerInfo:t,closeDialog:n}=this.props;if(this._isInApp){const o=t;o.name=e.name,o.folder=e.folder;const{windowController:s}=o;ie.executePickerAction&&(s?ie.executePickerAction(e,o.windowController):ie.executePickerAction(e,void 0)),n&&n()}else console.info("[ccx-document-picker] execute action: "+JSON.stringify(e))}_getIngestProviderData(){const e=this._imsData.fetchUserId(),{subscriptionType:t}=this._imsData;return"unavailable"===t&&(this._imsData.subscriptionType=ie.subscriptionType()),b()(l,{env:{fw:{name:"CDOPicker",version:te.a}},event:{build:this.hostProductData.productBuildNumber,language:this.locale,user_agent:navigator.userAgent,user_guid:e},source:{client_id:this.hostProductData.productId,name:this.hostProductData.productName,os_version:le,platform:this.hostProductData.platform,version:this.hostProductData.productVersion},user:{service_code:e?"sign-in":"",service_level:t}})}render(){const{theme:e,isDialogOpen:t}=this.state,{pickerInfo:n,openedSessionGuid:s}=this.props,{windowController:a,isPanel:i,additionalTabs:r,isWebDialog:c,name:l,folder:p,mode:h,disableCancelButton:m="false"}=n,{enableCDPOnboarding:b,cdpTabs:f,disableOnYourComputerButton:_,useCDPDeletedTab:k,useOrganizerMode:v}=this.hostProductData.featureFlags;let C="",O=n.mode;v&&(C="{",O=N.organizer);const w=this._getIngestProviderData(),x="dark"===e||"darkest"===e?"dark":"light",D=b&&(!n.showInterstitial||"true"===n.showInterstitial),E=["cdpTheme-"+x,"theme-"+x,"DocumentPickerRoot",i?"DocumentPickerPanel":"DocumentPicker",c&&"DocumentPickerWebDialog","cdoCoreVariables"];return o.createElement("div",{className:E.join(" ")},o.createElement(u.a,{allowNoToken:!0,apiKey:"doc-picker-service",env:this._imsData.environment,data:w,debounce:3e3,product:te.a,project:"doc-picker-service",ref:this._ingestProviderRef},o.createElement(g.a,{theme:x,disableNativeControls:t,productId:this.hostProductData.productId},o.createElement(d.a,{analyticsData:w,imsData:this._imsData,hostProductData:this.hostProductData,locale:this.locale,callbacks:this._callbacks,mode:O,ref:this._cdoProviderRef,cloudURLProtocol:C,cardSize:f?d.CardSize.Medium:void 0},o.createElement(X,{key:s,defaultTab:this._defaultTab,saveAsName:l,folder:p,onDialogStateChange:this.onDialogStateChange,isDialogOpen:t,showInterstitial:D,mode:h,parentNode:n.parentNode,cdpTabs:f,disableOnYourComputerButton:_,windowController:a,additionalTabs:r,disableCancelButton:"true"===m,deletedTab:k})))))}}he.defaultProps={initialTheme:d.o.lightest};var ge=Object(c.g)(he);n("DtKy");const me=c.d;class be extends o.Component{componentDidCatch(e,t){console.error("CDP_App.CatchError: ",e),console.error("CDP_App.CatchInfo: ",t)}render(){const{closeDialog:e,openedSessionGuid:t,pickerInfo:n,cdoHostProductData:s,callbacks:a,cdoIMSData:i,theme:r}=this.props;return o.createElement(me,{locale:"en"},o.createElement(ge,{openedSessionGuid:t,pickerInfo:n,closeDialog:e,cdoHostProductData:s,callbacks:a,cdoIMSData:i,theme:r}))}}var fe=be;let _e;const ke=window,ve="ccx-document-picker",Ce="ccx-document-picker-multi-instance";function Oe(e,t,n,s){let i={mode:e,parentNode:t,title:"",name:"",featureFlags:{},folder:"",finalizeActionCb:()=>{},showInterstitial:"",windowController:void 0};const c=n&&n.data,l=c&&c.windowController;if(c&&l&&(t.windowController=l),"undefined"!=typeof cdoHost&&cdoHost.getPickerInfo)i=cdoHost.getPickerInfo(e),i.mode=e;else try{_e=ke.require("cdoHost"),_e&&_e.getPickerInfo&&(i=_e.getPickerInfo(e),i.mode=e)}catch(e){console.warn("No host app provided, using web as the host and loading configuration from .config/")}i={...i,...c},i.featureFlags=s,i.parentNode=t,a.render(o.createElement(fe,{openedSessionGuid:r.a.v1(),pickerInfo:i,closeDialog:()=>{t.close&&t.close()}}),t)}function we(e,t,n){let o=document.getElementById(ve);o||(o=document.createElement("dialog"),o.id=ve,o.setAttribute("uxp-initial-width","836"),o.setAttribute("uxp-initial-height","576"),document.body.appendChild(o)),Oe(e,o,t,n),o.showModal()}function xe(e,t,n){const o=document.createElement("dialog");o.className=Ce,o.setAttribute("uxp-initial-width","836"),o.setAttribute("uxp-initial-height","576"),document.body.appendChild(o),Oe(e,o,t,n),o.showModal()}function De(e,t){we(N.open,e,t)}function Ee(e,t){we(N.saveAs,e,t)}function Se(e,t){we(N.saveAsCopy,e,t)}function ye(e,t){we(N.linkAssets,e,t)}function Te(e,t){we(N.relink,e,t)}function Pe(e,t){xe(N.linkAssets,e,t)}function Le(e,t){xe(N.saveAs,e,t)}},"58L5":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_tr.jpg"},"91/y":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_pl.png"},"9b0s":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_fi.jpg"},"9jRT":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_de.jpg"},"9y/e":function(e){e.exports=JSON.parse('{"apiKey":"CometDesktop3","dcxId":"Adobe.CC.CDO.Dev","platform":"web","productId":"CDOSAMPLEAPP-WEB","productLocation":"com.adobe.ccx.cdo.web","productName":"CDOSAMPLEAPP-WEB","productVersion":"1.0.0","cloudStorageEnabled":true,"isEnterpriseUser":false,"isLicenseAvailable":true,"cloudURLProtocol":"","locale":"en","uiLocale":"en_US","quota":{"quotaUsed":100,"quotaTotal":0},"documentFilter":[],"docTypeIcons":{"default":"assets/default-file-icon@4x.png"},"onboardingHelpJumpToken":""}')},ACGC:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_uk.jpg"},BIIv:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_no.png"},BLEV:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_tw.png"},"C+P8":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_da.jpg"},DP5t:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_es.png"},E3jr:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_ru.jpg"},Eahm:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_fr.jpg"},Ebdi:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_cz.png"},Emwk:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_pt.jpg"},"Gei+":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_se.png"},I2ZB:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_zh.jpg"},JN8N:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_hu.jpg"},KhYw:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_da.jpg"},"L+l/":function(e){e.exports=JSON.parse('{"host":"cdo","uxp":{"windowSize":{"height":768,"width":1024},"uiMapping":{"cdo":""},"islandType":"welcome","usePlugin":"cdo"},"debug":true,"loggingLevel":"debug","featureFlags":{"focusManagementEnabled":true}}')},M2po:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_cs.jpg"},MN2q:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_ru.png"},Me8U:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_fr.jpg"},Mg2M:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_it.jpg"},MmpT:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_de.jpg"},NOeG:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_br.png"},NvGw:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_pt.jpg"},Ol22:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_hu.jpg"},R0Se:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_ja.jpg"},RClw:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_uk.jpg"},"U/Ux":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_de.png"},UPfj:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_ja.jpg"},URsw:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_es.jpg"},Ugtx:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_hu.jpg"},UlSO:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_en.jpg"},V95m:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_ko.png"},VT8i:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_de.jpg"},X0ju:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_ko.jpg"},XA8p:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_nb.jpg"},Yx4c:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_nl.jpg"},Zlv5:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_cs.jpg"},cG3C:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_ua.png"},cTQG:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_dk.png"},cYH0:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_jp.png"},dfNC:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_en.jpg"},dmm0:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_zh.jpg"},e4SR:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_es.jpg"},f3hR:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ko.jpg"},f3p3:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_hu.png"},"gRo+":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ru.jpg"},ggtY:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_it.jpg"},huSU:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_cs.jpg"},i5uM:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_tr.jpg"},iwVa:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_pt.jpg"},izj8:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_nb.jpg"},jCRv:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_tr.jpg"},lVAu:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_nl.png"},lbVO:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_uk.jpg"},mLeN:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_sv.jpg"},mgde:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_tw.jpg"},mxCb:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_nb.jpg"},n6gQ:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_fi.png"},n74N:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_cn.jpg"},nt0m:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_it.png"},nzyY:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_pl.jpg"},of9E:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_da.jpg"},paXd:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_fr.jpg"},q7sh:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_fi.jpg"},qIth:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_zh.jpg"},rYtH:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_nl.jpg"},rfMf:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_en.png"},sCJn:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_ko.jpg"},uOJK:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_tr.png"},uTFu:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_ilst_cn.png"},uaCR:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_phxs_en.jpg"},w012:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_pl.jpg"},wnOR:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Cloud_pl.jpg"},"x98+":function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_it.jpg"},ybeB:function(e,t,n){e.exports=n.p+"assets/picker/default-file-icon.png"},z7W0:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_nl.jpg"},zBpB:function(e,t,n){e.exports=n.p+"assets/picker/Onboarding_Local_ilst_es.jpg"}}]);