MWSDevicesAppDetailsPageApkUrlSection.react",["fbt","CometRelayErrorHandling","GeoBaseText.react","GeoHStack.react","GeoStatusIcon.react","GeoText.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppApkParameters.react","MWSDevicesAppDetailsPageApkUrlEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesFormHeading.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","geoMargin","isValidHttpURL","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useMemo,m=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var p=a[0];a=a[1];var q=m(null),r=q[0],s=q[1],t=c("qpl")._(440735277,"762"),u=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(t);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(t,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,t]);q=l(function(){return g.appLink.length!==0&&!c("isValidHttpURL")(g.appLink,!0)?d("MWSDevicesAppFormConstants").APP_LINK_ERROR_MESSAGE:null},[g.appLink]);var v=l(function(){return g.appID!==null&&!g.areApkParamsAutomatic?d("MWSDevicesAppFormConstants").APP_LINK_WARNING_MESSAGE:null},[g.appID,g.areApkParamsAutomatic]),w=k(function(a,b,c,e){s(null),d("MMAQPLUserFlow").start(t),p({onCompleted:function(){u(!0),i({type:"UPDATE_APP_LINK",value:a}),b!=null&&i({type:"UPDATE_APP_PACKAGE_NAME",value:b}),c!=null&&i({type:"UPDATE_APP_VERSION_CODE",value:c}),e()},onError:function(a){u(!1,a),s(h._(/*BTDS*/"Failed to update apk url, please try again."))},variables:{input:{app_binary:{download_uri:a,filename:"",resource_id:g.appBinaryID},app_package_name:b==null?void 0:b.trim(),app_version_code:c,remote_app_id:g.appID},refetch_app_details:!0}})},[g.appBinaryID,g.appID,i,p,u,t]);return j.jsx(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageApkUrlEditCard.react"),{errorMessage:r,isLoading:a,onSave:w}),growDisplayContent:1,isDisabled:!b,children:j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("MWSDevicesFormHeading.react"),{description:d("MWSDevicesAppFormConstants").APP_LINK_DESCRIPTION,level:3,title:d("MWSDevicesAppFormConstants").APP_LINK_LABEL}),j.jsx(c("GeoText.react"),{xstyle:c("geoMargin").top8,children:h._(/*BTDS*/"{app link}",[h._param("app link",g.appLink)])}),j.jsx(n,{status:"error",statusMessage:q}),j.jsx(n,{status:"warning",statusMessage:v}),j.jsx(o,{areParamsAutomatic:g.areApkParamsAutomatic})]})})}a.displayName=a.name+" [from "+f.id+"]";function n(a){var b=a.status;a=a.statusMessage;return a==null?null:j.jsxs(c("GeoHStack.react"),{children:[j.jsx(c("GeoStatusIcon.react"),{status:b}),j.jsx(c("GeoBaseText.react"),{color:"warning",size:"valueDescription",children:a})]})}n.displayName=n.name+" [from "+f.id+"]";function o(a){a=a.areParamsAutomatic;return a?null:j.jsx(c("GeoVStack.react"),{xstyle:c("geoMargin").top8,children:j.jsx(c("MWSDevicesAppApkParameters.react"),{isViewOnly:!0})})}o.displayName=o.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageApkHashSection.react",["fbt","ix","CometRelayErrorHandling","GeoBaseText.react","GeoHStack.react","GeoIcon.react","GeoText.react","MMAQPLUserFlow","MWSDevicesAppDetailsPageApkHashEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesFormHeading.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","fbicon","geoMargin","qpl","react"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k=j||(j=d("react"));b=j;var l=b.useCallback,m=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,j=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var n=a[0];a=a[1];var o=m(null),p=o[0],q=o[1],r=c("qpl")._(440735277,"762"),s=l(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(r);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(r,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,r]);o=l(function(a,b){q(null),d("MMAQPLUserFlow").start(r),n({onCompleted:function(){s(!0),j({type:"UPDATE_APP_HASH",value:a}),b()},onError:function(a){s(!1,a),q(h._(/*BTDS*/"Failed to update apk hash, please try again."))},variables:{input:{app_binary:{content_hash_256:a,filename:"",resource_id:g.appBinaryID},remote_app_id:g.appID},refetch_app_details:!0}})},[g.appBinaryID,g.appID,j,n,s,r]);return k.jsxs(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:k.jsx(c("MWSDevicesAppDetailsPageApkHashEditCard.react"),{errorMessage:p,isLoading:a,onSave:o}),growDisplayContent:1,isDisabled:!b,children:[k.jsx(c("MWSDevicesFormHeading.react"),{description:d("MWSDevicesAppFormConstants").APP_HASH_DESCRIPTION,level:3,title:d("MWSDevicesAppFormConstants").APP_HASH_LABEL}),g.hash===""||g.hash==null?k.jsxs(c("GeoHStack.react"),{alignItems:"center",children:[k.jsx(c("GeoIcon.react"),{color:"error",icon:d("fbicon")._(i("491583"),16)}),k.jsx(c("GeoBaseText.react"),{color:"value",size:"value",children:h._(/*BTDS*/"Not added")})]}):k.jsx(c("GeoText.react"),{xstyle:c("geoMargin").top8,children:h._(/*BTDS*/"{app link}",[h._param("app link",g.hash)])})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageAppNameSection.react",["fbt","CometRelayErrorHandling","GeoText.react","MMAQPLUserFlow","MWSDevicesAppDetailsPageAppNameEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesFormHeading.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","geoMargin","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var m=a[0];a=a[1];var n=l(null),o=n[0],p=n[1],q=c("qpl")._(440735277,"762"),r=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(q);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(q,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,q]);n=k(function(a,b){p(null),d("MMAQPLUserFlow").start(q),m({onCompleted:function(){r(!0),i({type:"UPDATE_APP_NAME",value:a}),b()},onError:function(a){r(!1,a),p(h._(/*BTDS*/"Failed to update app name, please try again."))},variables:{input:{app_name:a,remote_app_id:g.appID},refetch_app_details:!0}})},[g.appID,i,m,r,q]);return j.jsxs(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageAppNameEditCard.react"),{errorMessage:o,isLoading:a,onSave:n}),growDisplayContent:1,isDisabled:!b,children:[j.jsx(c("MWSDevicesFormHeading.react"),{description:d("MWSDevicesAppFormConstants").APP_NAME_DESCRIPTION,level:3,title:d("MWSDevicesAppFormConstants").APP_NAME_LABEL}),j.jsx(c("GeoText.react"),{xstyle:c("geoMargin").top8,children:h._(/*BTDS*/"{app link}",[h._param("app link",g.appName)])})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppSettingsPageUpdateSettings.react",["fbt","CometRelayErrorHandling","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoHStack.react","GeoNotice.react","GeoSwitch.react","GeoText.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppFormReducer","MWSDevicesAppSelfHostedUpdatePriorityForm.react","MWSDevicesAppUpdateTypeForm.react","MWSDevicesAppsGKs","MWSDevicesStringUtils","RelayHooks","geoMargin","isMWSDevicesAppFormValid","qpl","react","useGeoSelection"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useMemo,m=b.useReducer,n=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.isSelfHostedApp,g=a.itapCompanyID;a=a.itemID;var i=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext(),q=i.appData,r=i.dispatch;i=m(d("MWSDevicesAppFormReducer").reducer,babelHelpers["extends"]({},q));var s=i[0],t=i[1],u=c("qpl")._(440735277,"762"),v=k(function(a){r(a),t(a)},[r,t]);i=n(null);var w=i[0],x=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var y=i[0],z=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql"));var A=i[0],B=i[1];i=c("useGeoSelection")(a);a=i.toggleSelection;var C=l(function(){return B||z},[B,z]);i=l(function(){return C||!d("isMWSDevicesAppFormValid").isMWSDevicesAppUpdateSettingUpdatedWithUserData(s,q,!0)},[q,s,C]);var D=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(g,e,(c=q.appID)!=null?c:"",a);d("MWSDevicesAppFormHelper").logChangesInAppUpdateSettings(g,e,s,q,a);a&&d("MMAQPLUserFlow").start(u);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(u,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[q,s,e,g,u]),E=k(function(){v({type:"UPDATE_DEVICE_UPDATE_PRIORITY",value:s.deviceUpdatePriority}),v({type:"UPDATE_IS_AUTOMATIC_UPDATE_ENABLED",value:s.isAutoUpdateEnabled}),v({type:"UPDATE_DEVICE_UPDATE_TYPE",value:s.deviceUpdateType})},[s,v]),F=k(function(){x(null);d("MMAQPLUserFlow").start(u);if(f)y({onCompleted:function(){E(),D(!0)},onError:function(a){D(!1,a),x(p)},variables:{input:{device_update_priority:s.deviceUpdatePriority,remote_app_id:q.appID},refetch_app_details:!1}});else{var a;A({onCompleted:function(){E(),D(!0)},onError:function(a){D(!1,a),x(p)},variables:{input:{managed_app_id:(a=q.appID)!=null?a:"",update_settings:{device_update_type:s.deviceUpdateType,is_autoupdate_enabled:s.isAutoUpdateEnabled}}}})}},[q.appID,s.deviceUpdatePriority,s.deviceUpdateType,s.isAutoUpdateEnabled,f,D,A,u,y,E]);return j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("GeoFlexbox.react"),{xstyle:c("geoMargin").vert8,children:j.jsxs(c("GeoVStack.react"),{children:[j.jsx(o,{appDataWithChanges:s,editStateDispatch:t,isDisabled:!b,isLoading:C,isSelfHostedApp:f}),w!=null&&j.jsx(c("GeoNotice.react"),{status:"error",children:w})]})}),j.jsxs(c("GeoHStack.react"),{alignItems:"end",grow:1,justifyContent:"end",children:[j.jsx(c("GeoCancelButton.react"),{isDisabled:C,onClick:a}),j.jsx(c("GeoButton.react"),{disabledMessage:b?null:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:i||!b,isLoading:C,label:h._(/*BTDS*/"Save"),onClick:F,variant:"primary"})]})]})}a.displayName=a.name+" [from "+f.id+"]";function o(a){var b=a.appDataWithChanges,e=a.editStateDispatch,f=a.isDisabled,g=a.isLoading;a=a.isSelfHostedApp;var h=function(a){e({type:"UPDATE_IS_AUTOMATIC_UPDATE_ENABLED",value:a})};if(a)return j.jsx(c("MWSDevicesAppSelfHostedUpdatePriorityForm.react"),{isDisabled:f,isLoading:g,propAppData:b,propDispatch:e});if(d("MWSDevicesAppsGKs").GK_Q4B_ADMIN_CENTER_APP_UPDATE_CONTROL)return j.jsx(c("MWSDevicesAppUpdateTypeForm.react"),{isDisabled:f,isLabelHidden:!0,propAppData:b,propDispatch:e});else return j.jsxs(c("GeoHStack.react"),{children:[j.jsx(c("GeoSwitch.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:f,isLabelHidden:!0,label:"App updates",onChange:h,value:b.isAutoUpdateEnabled}),j.jsx(c("GeoText.react"),{children:q})]})}o.displayName=o.name+" [from "+f.id+"]";var p=h._(/*BTDS*/"Failed to update app update control settings. Please try again."),q=h._(/*BTDS*/"Turn on automatic updates for all devices");g["default"]=a}),226);
-----
MWSDevicesAppVisualsPageTabAppImageEdit.react",["fbt","CometRelayErrorHandling","GeoBaseText.react","GeoButton.react","GeoCancelButton.react","GeoHStack.react","GeoHeading.react","GeoNotice.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppDetailsConstants","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppFormReducer","MWSDevicesAppImageDragDropUploadForm.react","MWSDevicesStringUtils","MWSDeviesAppAddModalHelper","RelayHooks","geoMargin","qpl","react","useGeoSelection"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useMemo,m=b.useReducer,n=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.imageType,g=a.isSelfHostedApp,i=a.itapCompanyID;a=a.itemID;var t=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext(),u=t.appData,v=t.dispatch;t=m(d("MWSDevicesAppFormReducer").reducer,babelHelpers["extends"]({},u));var w=t[0],x=t[1];t=n(null);var y=t[0],z=t[1],A=c("qpl")._(440735277,"762");t=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var B=t[0],C=t[1];t=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql"));var D=t[0],E=t[1];t=c("useGeoSelection")(a);a=t.toggleSelection;var F=l(function(){return E||C},[E,C]);t=l(function(){var a;return F||f==="icon"&&((a=u.icon)==null?void 0:a.id)===((a=w.icon)==null?void 0:a.id)||f==="logo"&&((a=u.logo)==null?void 0:a.id)===((a=w.logo)==null?void 0:a.id)},[(t=u.icon)==null?void 0:t.id,(t=u.logo)==null?void 0:t.id,(t=w.icon)==null?void 0:t.id,(t=w.logo)==null?void 0:t.id,f,F]);var G=k(function(a){var b;switch(f){case"icon":return g?(b=(b=a.update_library_app)==null||(b=b.remote_app)==null?void 0:b.images_icon)!=null?b:{}:(b=(b=a.xhw_q4b_update_managed_app_settings)==null||(b=b.private_app)==null?void 0:b.images_icon)!=null?b:{};case"logo":return g?(b=(b=a.update_library_app)==null||(b=b.remote_app)==null?void 0:b.images_logo)!=null?b:{}:(a=(b=a.xhw_q4b_update_managed_app_settings)==null||(b=b.private_app)==null?void 0:b.images_logo)!=null?a:{}}},[f,g]),H=k(function(a){a=G(a);var b=a.filename,c=a.id;a=a.image_uri;var d=f==="icon"?"UPDATE_APP_ICON":"UPDATE_APP_LOGO";v({type:d,value:{file:null,filename:b!=null?b:"",id:c,uri:a}});x({type:d,value:{file:null,filename:b!=null?b:"",id:c,uri:a}});x({type:"SET_APP_IMAGE_IDS_TO_DELETE",value:[]})},[v,G,f]),I=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(i,e,(c=u.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(A);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(A,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[u.appID,e,i,A]),J=k(function(a,b,c){d("MWSDeviesAppAddModalHelper").handleImageLogging(b,c,e,i),H(a)},[e,i,H]),K=k(function(){z(null);var a=d("MWSDeviesAppAddModalHelper").getUploadablesData(w),b=a.iconUploaded,c=a.logoUploaded;a=a.uploadables;d("MMAQPLUserFlow").start(A);if(g){var e;B({onCompleted:function(a){J(a,c,b),I(!0)},onError:function(a){I(!1,a),z(f==="icon"?q:r)},uploadables:a,variables:{input:{app_icon:f==="icon"&&((e=w.icon)==null?void 0:e.file)!=null?"app_icon":null,app_logo:f==="logo"&&((e=w.logo)==null?void 0:e.file)!=null?"app_logo":null,images_to_delete:w.imageIDsToDelete,remote_app_id:u.appID},refetch_app_details:!1}})}else{D({onCompleted:function(a){J(a,c,b),I(!0)},onError:function(a){I(!1,a),z(f==="icon"?q:r)},uploadables:a,variables:{input:{image_settings:{app_icon:f==="icon"&&((e=w.icon)==null?void 0:e.file)!=null?"app_icon":null,app_logo:f==="logo"&&((a=w.logo)==null?void 0:a.file)!=null?"app_logo":null,images_to_delete:w.imageIDsToDelete},managed_app_id:(e=u.appID)!=null?e:""}}})}},[u.appID,w,f,g,I,D,A,B,J]);return j.jsxs(c("GeoVStack.react"),{children:[j.jsxs(c("GeoVStack.react"),{xstyle:s.uploadSection,children:[f==="icon"&&j.jsx(o,{}),f==="logo"&&j.jsx(p,{}),j.jsx(c("MWSDevicesAppImageDragDropUploadForm.react"),{appData:w,dispatch:x,imageType:f,isDisabled:!b,isLoading:F,itapCompanyID:i,loggerEventOrigin:e,showHeading:!1,testid:void 0})]}),y!=null&&j.jsx(c("GeoNotice.react"),{status:"error",children:y}),j.jsxs(c("GeoHStack.react"),{alignItems:"end",grow:1,justifyContent:"end",children:[j.jsx(c("GeoCancelButton.react"),{isDisabled:F,onClick:a}),j.jsx(c("GeoButton.react"),{disabledMessage:b?null:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:t||!b,isLoading:F,label:h._(/*BTDS*/"Save"),onClick:K,variant:"primary"})]})]})}a.displayName=a.name+" [from "+f.id+"]";function o(){return j.jsxs(j.Fragment,{children:[j.jsx(c("GeoHeading.react"),{level:3,children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_ICON_GUIDELINES_LABEL}),j.jsx(c("GeoBaseText.react"),{color:"placeholder",size:"value",xstyle:c("geoMargin").start24,children:j.jsxs("ul",{style:{listStyleType:"disc"},children:[j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_ICON_GUIDELINES_DESCRIPTION}),j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_ICON_DIMENSION_DESCRIPTION})]})})]})}o.displayName=o.name+" [from "+f.id+"]";function p(){return j.jsxs(j.Fragment,{children:[j.jsx(c("GeoHeading.react"),{level:3,children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_LOGO_GUIDELINES_LABEL}),j.jsx(c("GeoBaseText.react"),{color:"placeholder",size:"value",xstyle:c("geoMargin").start24,children:j.jsxs("ul",{style:{listStyleType:"disc"},children:[j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_LOGO_GUIDELINES_DESCRIPTION}),j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_LOGO_DIMENSION_DESCRIPTION})]})})]})}p.displayName=p.name+" [from "+f.id+"]";var q=h._(/*BTDS*/"Failed to update app icon. Please try again."),r=h._(/*BTDS*/"Failed to update app logo. Please try again."),s={uploadSection:{width:"x3hqpx7",$$css:!0}};g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageAppHeadersSection.react",["fbt","CometRelayErrorHandling","MMAQPLUserFlow","MWSDevicesAppDetailsPageAppHeadersEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppRequestHeaders.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var m=a[0];a=a[1];var n=l(null),o=n[0],p=n[1],q=c("qpl")._(440735277,"762"),r=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(q);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(q,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,q]);n=k(function(a,b){p(null),d("MMAQPLUserFlow").start(q),m({onCompleted:function(){r(!0),i({type:"SET_APP_HEADERS",value:a}),b()},onError:function(a){r(!1,a),p(h._(/*BTDS*/"Failed to update app headers, please try again."))},variables:{input:{app_binary:{filename:"",headers:a.filter(function(a){a=a.key;return a.length>0}).map(function(a){var b=a.key;a=a.value;return{key:b.trim(),value:a.trim()}}),resource_id:g.appBinaryID},remote_app_id:g.appID},refetch_app_details:!0}})},[g.appBinaryID,g.appID,i,m,r,q]);return j.jsx(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageAppHeadersEditCard.react"),{errorMessage:o,isLoading:a,onSave:n}),growDisplayContent:1,isDisabled:!b,children:j.jsx(c("MWSDevicesAppRequestHeaders.react"),{addInfo:!1,description:d("MWSDevicesAppFormConstants").APP_CUSTOM_REQUEST_HEADERS_DESCRIPTION,heading:d("MWSDevicesAppFormConstants").APP_CUSTOM_REQUEST_HEADERS_LABEL,isOptional:!1,isViewOnly:!0,showNoHeadersMessage:!0})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppSettingsPagePermissionSettings.react",["fbt","CometRelay","CometRelayErrorHandling","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoHStack.react","GeoNotice.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppFormReducer","MWSDevicesAppPermissionsForm.react","MWSDevicesAppPermissionsHelper","MWSDevicesStringUtils","RelayHooks","emptyFunction","geoMargin","isMWSDevicesAppFormValid","nullthrows","qpl","react","useGeoSelection"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useEffect,m=b.useMemo,n=b.useReducer,o=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.isSelfHostedApp,g=a.itapCompanyID;a=a.itemID;var i=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext(),q=i.apkScanNotificationDict,r=d("CometRelay").useRelayEnvironment();i=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var s=i.appData,t=i.dispatch;i=n(d("MWSDevicesAppFormReducer").reducer,babelHelpers["extends"]({},s));var u=i[0],v=i[1],w=c("qpl")._(440735277,"762"),x=k(function(a){t(a),v(a)},[t,v]);i=o(null);var y=i[0],z=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var A=i[0],B=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql"));var C=i[0],D=i[1];i=c("useGeoSelection")(a);a=i.toggleSelection;var E=m(function(){return D||B},[D,B]);i=m(function(){return E||!d("isMWSDevicesAppFormValid").isMWSDevicesAppPermissionSettingUpdatedWithUserData(u,s)},[s,u,E]);var F=k(function(){x({type:"SET_APP_PERMISSION_POLICIES",value:u.permissionPolicies})},[u.permissionPolicies,x]),G=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(g,e,(c=s.appID)!=null?c:"",a);a&&(d("MMAQPLUserFlow").endSuccess(w),d("MWSDevicesAppFormHelper").logAppPermissionsUpdateSuccess(g,e,u,s));if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(w,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}});d("MWSDevicesAppFormHelper").logAppPermissionsUpdateFailure(g,e,u,s)}},[s,u,e,g,w]),H=k(function(){d("MMAQPLUserFlow").start(w);if(f)A({onCompleted:function(){F(),G(!0)},onError:function(a){G(!1,a),z(p)},variables:{input:{permission_policies:d("MWSDevicesAppPermissionsHelper").getPermissionPoliciesForUpdate(u),remote_app_id:s.appID},refetch_app_details:!1}});else{var a;C({onCompleted:function(){F(),G(!0)},onError:function(a){G(!1,a),z(p)},variables:{input:{managed_app_id:(a=s.appID)!=null?a:"",permission_policies:d("MWSDevicesAppPermissionsHelper").getPermissionPoliciesForUpdate(u)}}})}},[s.appID,u,f,G,C,w,A,F]);l(function(){if(q[c("nullthrows")(s.appID)]!=null){var a=q[c("nullthrows")(s.appID)].apkParserStatus;s.apkParserStatus!==a&&(x({type:"UPDATE_APK_SCAN_RESULT",value:a}),a==="FINISHED"&&d("MWSDevicesAppPermissionsHelper").fetchPermissionsData(s.appID,c("emptyFunction"),r,x))}},[s,s.apkParserStatus,s.appID,q,r,x]);return j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("GeoFlexbox.react"),{xstyle:[c("geoMargin").top8,c("geoMargin").bottom24],children:j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("MWSDevicesAppPermissionsForm.react"),{eventOrigin:e,isDisabled:!b,itapCompanyID:g,propAppData:u,propDispatch:v}),y!=null&&j.jsx(c("GeoNotice.react"),{status:"error",children:y})]})}),j.jsxs(c("GeoHStack.react"),{alignItems:"end",grow:1,justifyContent:"end",children:[j.jsx(c("GeoCancelButton.react"),{isDisabled:E,onClick:a}),j.jsx(c("GeoButton.react"),{disabledMessage:b?null:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:i||!b,isLoading:E,label:h._(/*BTDS*/"Save"),onClick:H,variant:"primary"})]})]})}a.displayName=a.name+" [from "+f.id+"]";var p=h._(/*BTDS*/"Failed to update app permissions. Please try again.");g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageAppExpansionFilesSection.react",["fbt","CometRelayErrorHandling","MMAQPLUserFlow","MWSDevicesAppDetailsPageAppExpansionFilesEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppExpansionFiles.react","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var m=a[0];a=a[1];var n=l(null),o=n[0],p=n[1],q=c("qpl")._(440735277,"762"),r=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(q);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(q,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,q]);n=k(function(a,b){p(null),d("MMAQPLUserFlow").start(q),m({onCompleted:function(){r(!0),i({type:"SET_APP_EXPANSION_FILES",value:a}),b()},onError:function(a){r(!1,a),p(h._(/*BTDS*/"Failed to update app expansionFiles, please try again."))},variables:{input:{external_resources:a.filter(function(a){a=a.fileName;return a.length>0}).map(function(a){var b=a.fileLink,c=a.fileName;a=a.hash;return{content_hash_256:a,download_uri:b.trim(),filename:c.trim()}}),remote_app_id:g.appID},refetch_app_details:!0}})},[g.appID,i,m,r,q]);return j.jsx(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageAppExpansionFilesEditCard.react"),{errorMessage:o,isLoading:a,onSave:n}),growDisplayContent:1,isDisabled:!b,children:j.jsx(c("MWSDevicesAppExpansionFiles.react"),{addInfo:!1,description:d("MWSDevicesAppFormConstants").APP_EXPANSION_FILE_DESCRIPTION,heading:d("MWSDevicesAppFormConstants").APP_EXPANSION_FILE_LABEL,isOptional:!1,isViewOnly:!0,showNoFileMessage:!0})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppDetailsTabsMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="30405803929034562"}),null);
-----
MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="23922748687353196"}),null);
-----
-----
MWSDevicesAppDetailsPageApkHashSection.react",["fbt","ix","CometRelayErrorHandling","GeoBaseText.react","GeoHStack.react","GeoIcon.react","GeoText.react","MMAQPLUserFlow","MWSDevicesAppDetailsPageApkHashEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesFormHeading.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","fbicon","geoMargin","qpl","react"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k=j||(j=d("react"));b=j;var l=b.useCallback,m=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,j=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var n=a[0];a=a[1];var o=m(null),p=o[0],q=o[1],r=c("qpl")._(440735277,"762"),s=l(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(r);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(r,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,r]);o=l(function(a,b){q(null),d("MMAQPLUserFlow").start(r),n({onCompleted:function(){s(!0),j({type:"UPDATE_APP_HASH",value:a}),b()},onError:function(a){s(!1,a),q(h._(/*BTDS*/"Failed to update apk hash, please try again."))},variables:{input:{app_binary:{content_hash_256:a,filename:"",resource_id:g.appBinaryID},remote_app_id:g.appID},refetch_app_details:!0}})},[g.appBinaryID,g.appID,j,n,s,r]);return k.jsxs(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:k.jsx(c("MWSDevicesAppDetailsPageApkHashEditCard.react"),{errorMessage:p,isLoading:a,onSave:o}),growDisplayContent:1,isDisabled:!b,children:[k.jsx(c("MWSDevicesFormHeading.react"),{description:d("MWSDevicesAppFormConstants").APP_HASH_DESCRIPTION,level:3,title:d("MWSDevicesAppFormConstants").APP_HASH_LABEL}),g.hash===""||g.hash==null?k.jsxs(c("GeoHStack.react"),{alignItems:"center",children:[k.jsx(c("GeoIcon.react"),{color:"error",icon:d("fbicon")._(i("491583"),16)}),k.jsx(c("GeoBaseText.react"),{color:"value",size:"value",children:h._(/*BTDS*/"Not added")})]}):k.jsx(c("GeoText.react"),{xstyle:c("geoMargin").top8,children:h._(/*BTDS*/"{app link}",[h._param("app link",g.hash)])})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageAppNameSection.react",["fbt","CometRelayErrorHandling","GeoText.react","MMAQPLUserFlow","MWSDevicesAppDetailsPageAppNameEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesFormHeading.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","geoMargin","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var m=a[0];a=a[1];var n=l(null),o=n[0],p=n[1],q=c("qpl")._(440735277,"762"),r=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(q);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(q,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,q]);n=k(function(a,b){p(null),d("MMAQPLUserFlow").start(q),m({onCompleted:function(){r(!0),i({type:"UPDATE_APP_NAME",value:a}),b()},onError:function(a){r(!1,a),p(h._(/*BTDS*/"Failed to update app name, please try again."))},variables:{input:{app_name:a,remote_app_id:g.appID},refetch_app_details:!0}})},[g.appID,i,m,r,q]);return j.jsxs(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageAppNameEditCard.react"),{errorMessage:o,isLoading:a,onSave:n}),growDisplayContent:1,isDisabled:!b,children:[j.jsx(c("MWSDevicesFormHeading.react"),{description:d("MWSDevicesAppFormConstants").APP_NAME_DESCRIPTION,level:3,title:d("MWSDevicesAppFormConstants").APP_NAME_LABEL}),j.jsx(c("GeoText.react"),{xstyle:c("geoMargin").top8,children:h._(/*BTDS*/"{app link}",[h._param("app link",g.appName)])})]})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppSettingsPageUpdateSettings.react",["fbt","CometRelayErrorHandling","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoHStack.react","GeoNotice.react","GeoSwitch.react","GeoText.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppFormReducer","MWSDevicesAppSelfHostedUpdatePriorityForm.react","MWSDevicesAppUpdateTypeForm.react","MWSDevicesAppsGKs","MWSDevicesStringUtils","RelayHooks","geoMargin","isMWSDevicesAppFormValid","qpl","react","useGeoSelection"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useMemo,m=b.useReducer,n=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.isSelfHostedApp,g=a.itapCompanyID;a=a.itemID;var i=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext(),q=i.appData,r=i.dispatch;i=m(d("MWSDevicesAppFormReducer").reducer,babelHelpers["extends"]({},q));var s=i[0],t=i[1],u=c("qpl")._(440735277,"762"),v=k(function(a){r(a),t(a)},[r,t]);i=n(null);var w=i[0],x=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var y=i[0],z=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql"));var A=i[0],B=i[1];i=c("useGeoSelection")(a);a=i.toggleSelection;var C=l(function(){return B||z},[B,z]);i=l(function(){return C||!d("isMWSDevicesAppFormValid").isMWSDevicesAppUpdateSettingUpdatedWithUserData(s,q,!0)},[q,s,C]);var D=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(g,e,(c=q.appID)!=null?c:"",a);d("MWSDevicesAppFormHelper").logChangesInAppUpdateSettings(g,e,s,q,a);a&&d("MMAQPLUserFlow").start(u);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(u,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[q,s,e,g,u]),E=k(function(){v({type:"UPDATE_DEVICE_UPDATE_PRIORITY",value:s.deviceUpdatePriority}),v({type:"UPDATE_IS_AUTOMATIC_UPDATE_ENABLED",value:s.isAutoUpdateEnabled}),v({type:"UPDATE_DEVICE_UPDATE_TYPE",value:s.deviceUpdateType})},[s,v]),F=k(function(){x(null);d("MMAQPLUserFlow").start(u);if(f)y({onCompleted:function(){E(),D(!0)},onError:function(a){D(!1,a),x(p)},variables:{input:{device_update_priority:s.deviceUpdatePriority,remote_app_id:q.appID},refetch_app_details:!1}});else{var a;A({onCompleted:function(){E(),D(!0)},onError:function(a){D(!1,a),x(p)},variables:{input:{managed_app_id:(a=q.appID)!=null?a:"",update_settings:{device_update_type:s.deviceUpdateType,is_autoupdate_enabled:s.isAutoUpdateEnabled}}}})}},[q.appID,s.deviceUpdatePriority,s.deviceUpdateType,s.isAutoUpdateEnabled,f,D,A,u,y,E]);return j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("GeoFlexbox.react"),{xstyle:c("geoMargin").vert8,children:j.jsxs(c("GeoVStack.react"),{children:[j.jsx(o,{appDataWithChanges:s,editStateDispatch:t,isDisabled:!b,isLoading:C,isSelfHostedApp:f}),w!=null&&j.jsx(c("GeoNotice.react"),{status:"error",children:w})]})}),j.jsxs(c("GeoHStack.react"),{alignItems:"end",grow:1,justifyContent:"end",children:[j.jsx(c("GeoCancelButton.react"),{isDisabled:C,onClick:a}),j.jsx(c("GeoButton.react"),{disabledMessage:b?null:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:i||!b,isLoading:C,label:h._(/*BTDS*/"Save"),onClick:F,variant:"primary"})]})]})}a.displayName=a.name+" [from "+f.id+"]";function o(a){var b=a.appDataWithChanges,e=a.editStateDispatch,f=a.isDisabled,g=a.isLoading;a=a.isSelfHostedApp;var h=function(a){e({type:"UPDATE_IS_AUTOMATIC_UPDATE_ENABLED",value:a})};if(a)return j.jsx(c("MWSDevicesAppSelfHostedUpdatePriorityForm.react"),{isDisabled:f,isLoading:g,propAppData:b,propDispatch:e});if(d("MWSDevicesAppsGKs").GK_Q4B_ADMIN_CENTER_APP_UPDATE_CONTROL)return j.jsx(c("MWSDevicesAppUpdateTypeForm.react"),{isDisabled:f,isLabelHidden:!0,propAppData:b,propDispatch:e});else return j.jsxs(c("GeoHStack.react"),{children:[j.jsx(c("GeoSwitch.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:f,isLabelHidden:!0,label:"App updates",onChange:h,value:b.isAutoUpdateEnabled}),j.jsx(c("GeoText.react"),{children:q})]})}o.displayName=o.name+" [from "+f.id+"]";var p=h._(/*BTDS*/"Failed to update app update control settings. Please try again."),q=h._(/*BTDS*/"Turn on automatic updates for all devices");g["default"]=a}),226);
-----
MWSDevicesAppVisualsPageTabAppImageEdit.react",["fbt","CometRelayErrorHandling","GeoBaseText.react","GeoButton.react","GeoCancelButton.react","GeoHStack.react","GeoHeading.react","GeoNotice.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppDetailsConstants","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppFormReducer","MWSDevicesAppImageDragDropUploadForm.react","MWSDevicesStringUtils","MWSDeviesAppAddModalHelper","RelayHooks","geoMargin","qpl","react","useGeoSelection"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useMemo,m=b.useReducer,n=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.imageType,g=a.isSelfHostedApp,i=a.itapCompanyID;a=a.itemID;var t=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext(),u=t.appData,v=t.dispatch;t=m(d("MWSDevicesAppFormReducer").reducer,babelHelpers["extends"]({},u));var w=t[0],x=t[1];t=n(null);var y=t[0],z=t[1],A=c("qpl")._(440735277,"762");t=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var B=t[0],C=t[1];t=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql"));var D=t[0],E=t[1];t=c("useGeoSelection")(a);a=t.toggleSelection;var F=l(function(){return E||C},[E,C]);t=l(function(){var a;return F||f==="icon"&&((a=u.icon)==null?void 0:a.id)===((a=w.icon)==null?void 0:a.id)||f==="logo"&&((a=u.logo)==null?void 0:a.id)===((a=w.logo)==null?void 0:a.id)},[(t=u.icon)==null?void 0:t.id,(t=u.logo)==null?void 0:t.id,(t=w.icon)==null?void 0:t.id,(t=w.logo)==null?void 0:t.id,f,F]);var G=k(function(a){var b;switch(f){case"icon":return g?(b=(b=a.update_library_app)==null||(b=b.remote_app)==null?void 0:b.images_icon)!=null?b:{}:(b=(b=a.xhw_q4b_update_managed_app_settings)==null||(b=b.private_app)==null?void 0:b.images_icon)!=null?b:{};case"logo":return g?(b=(b=a.update_library_app)==null||(b=b.remote_app)==null?void 0:b.images_logo)!=null?b:{}:(a=(b=a.xhw_q4b_update_managed_app_settings)==null||(b=b.private_app)==null?void 0:b.images_logo)!=null?a:{}}},[f,g]),H=k(function(a){a=G(a);var b=a.filename,c=a.id;a=a.image_uri;var d=f==="icon"?"UPDATE_APP_ICON":"UPDATE_APP_LOGO";v({type:d,value:{file:null,filename:b!=null?b:"",id:c,uri:a}});x({type:d,value:{file:null,filename:b!=null?b:"",id:c,uri:a}});x({type:"SET_APP_IMAGE_IDS_TO_DELETE",value:[]})},[v,G,f]),I=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(i,e,(c=u.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(A);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(A,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[u.appID,e,i,A]),J=k(function(a,b,c){d("MWSDeviesAppAddModalHelper").handleImageLogging(b,c,e,i),H(a)},[e,i,H]),K=k(function(){z(null);var a=d("MWSDeviesAppAddModalHelper").getUploadablesData(w),b=a.iconUploaded,c=a.logoUploaded;a=a.uploadables;d("MMAQPLUserFlow").start(A);if(g){var e;B({onCompleted:function(a){J(a,c,b),I(!0)},onError:function(a){I(!1,a),z(f==="icon"?q:r)},uploadables:a,variables:{input:{app_icon:f==="icon"&&((e=w.icon)==null?void 0:e.file)!=null?"app_icon":null,app_logo:f==="logo"&&((e=w.logo)==null?void 0:e.file)!=null?"app_logo":null,images_to_delete:w.imageIDsToDelete,remote_app_id:u.appID},refetch_app_details:!1}})}else{D({onCompleted:function(a){J(a,c,b),I(!0)},onError:function(a){I(!1,a),z(f==="icon"?q:r)},uploadables:a,variables:{input:{image_settings:{app_icon:f==="icon"&&((e=w.icon)==null?void 0:e.file)!=null?"app_icon":null,app_logo:f==="logo"&&((a=w.logo)==null?void 0:a.file)!=null?"app_logo":null,images_to_delete:w.imageIDsToDelete},managed_app_id:(e=u.appID)!=null?e:""}}})}},[u.appID,w,f,g,I,D,A,B,J]);return j.jsxs(c("GeoVStack.react"),{children:[j.jsxs(c("GeoVStack.react"),{xstyle:s.uploadSection,children:[f==="icon"&&j.jsx(o,{}),f==="logo"&&j.jsx(p,{}),j.jsx(c("MWSDevicesAppImageDragDropUploadForm.react"),{appData:w,dispatch:x,imageType:f,isDisabled:!b,isLoading:F,itapCompanyID:i,loggerEventOrigin:e,showHeading:!1,testid:void 0})]}),y!=null&&j.jsx(c("GeoNotice.react"),{status:"error",children:y}),j.jsxs(c("GeoHStack.react"),{alignItems:"end",grow:1,justifyContent:"end",children:[j.jsx(c("GeoCancelButton.react"),{isDisabled:F,onClick:a}),j.jsx(c("GeoButton.react"),{disabledMessage:b?null:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:t||!b,isLoading:F,label:h._(/*BTDS*/"Save"),onClick:K,variant:"primary"})]})]})}a.displayName=a.name+" [from "+f.id+"]";function o(){return j.jsxs(j.Fragment,{children:[j.jsx(c("GeoHeading.react"),{level:3,children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_ICON_GUIDELINES_LABEL}),j.jsx(c("GeoBaseText.react"),{color:"placeholder",size:"value",xstyle:c("geoMargin").start24,children:j.jsxs("ul",{style:{listStyleType:"disc"},children:[j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_ICON_GUIDELINES_DESCRIPTION}),j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_ICON_DIMENSION_DESCRIPTION})]})})]})}o.displayName=o.name+" [from "+f.id+"]";function p(){return j.jsxs(j.Fragment,{children:[j.jsx(c("GeoHeading.react"),{level:3,children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_LOGO_GUIDELINES_LABEL}),j.jsx(c("GeoBaseText.react"),{color:"placeholder",size:"value",xstyle:c("geoMargin").start24,children:j.jsxs("ul",{style:{listStyleType:"disc"},children:[j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_LOGO_GUIDELINES_DESCRIPTION}),j.jsx("li",{children:d("MWSDevicesAppDetailsConstants").APP_VISUALS_APP_LOGO_DIMENSION_DESCRIPTION})]})})]})}p.displayName=p.name+" [from "+f.id+"]";var q=h._(/*BTDS*/"Failed to update app icon. Please try again."),r=h._(/*BTDS*/"Failed to update app logo. Please try again."),s={uploadSection:{width:"x3hqpx7",$$css:!0}};g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageAppHeadersSection.react",["fbt","CometRelayErrorHandling","MMAQPLUserFlow","MWSDevicesAppDetailsPageAppHeadersEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppRequestHeaders.react","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var m=a[0];a=a[1];var n=l(null),o=n[0],p=n[1],q=c("qpl")._(440735277,"762"),r=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(q);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(q,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,q]);n=k(function(a,b){p(null),d("MMAQPLUserFlow").start(q),m({onCompleted:function(){r(!0),i({type:"SET_APP_HEADERS",value:a}),b()},onError:function(a){r(!1,a),p(h._(/*BTDS*/"Failed to update app headers, please try again."))},variables:{input:{app_binary:{filename:"",headers:a.filter(function(a){a=a.key;return a.length>0}).map(function(a){var b=a.key;a=a.value;return{key:b.trim(),value:a.trim()}}),resource_id:g.appBinaryID},remote_app_id:g.appID},refetch_app_details:!0}})},[g.appBinaryID,g.appID,i,m,r,q]);return j.jsx(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageAppHeadersEditCard.react"),{errorMessage:o,isLoading:a,onSave:n}),growDisplayContent:1,isDisabled:!b,children:j.jsx(c("MWSDevicesAppRequestHeaders.react"),{addInfo:!1,description:d("MWSDevicesAppFormConstants").APP_CUSTOM_REQUEST_HEADERS_DESCRIPTION,heading:d("MWSDevicesAppFormConstants").APP_CUSTOM_REQUEST_HEADERS_LABEL,isOptional:!1,isViewOnly:!0,showNoHeadersMessage:!0})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppSettingsPagePermissionSettings.react",["fbt","CometRelay","CometRelayErrorHandling","GeoButton.react","GeoCancelButton.react","GeoFlexbox.react","GeoHStack.react","GeoNotice.react","GeoVStack.react","MMAQPLUserFlow","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesAppFormReducer","MWSDevicesAppPermissionsForm.react","MWSDevicesAppPermissionsHelper","MWSDevicesStringUtils","RelayHooks","emptyFunction","geoMargin","isMWSDevicesAppFormValid","nullthrows","qpl","react","useGeoSelection"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useEffect,m=b.useMemo,n=b.useReducer,o=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.isSelfHostedApp,g=a.itapCompanyID;a=a.itemID;var i=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext(),q=i.apkScanNotificationDict,r=d("CometRelay").useRelayEnvironment();i=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var s=i.appData,t=i.dispatch;i=n(d("MWSDevicesAppFormReducer").reducer,babelHelpers["extends"]({},s));var u=i[0],v=i[1],w=c("qpl")._(440735277,"762"),x=k(function(a){t(a),v(a)},[t,v]);i=o(null);var y=i[0],z=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var A=i[0],B=i[1];i=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation.graphql"));var C=i[0],D=i[1];i=c("useGeoSelection")(a);a=i.toggleSelection;var E=m(function(){return D||B},[D,B]);i=m(function(){return E||!d("isMWSDevicesAppFormValid").isMWSDevicesAppPermissionSettingUpdatedWithUserData(u,s)},[s,u,E]);var F=k(function(){x({type:"SET_APP_PERMISSION_POLICIES",value:u.permissionPolicies})},[u.permissionPolicies,x]),G=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(g,e,(c=s.appID)!=null?c:"",a);a&&(d("MMAQPLUserFlow").endSuccess(w),d("MWSDevicesAppFormHelper").logAppPermissionsUpdateSuccess(g,e,u,s));if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(w,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}});d("MWSDevicesAppFormHelper").logAppPermissionsUpdateFailure(g,e,u,s)}},[s,u,e,g,w]),H=k(function(){d("MMAQPLUserFlow").start(w);if(f)A({onCompleted:function(){F(),G(!0)},onError:function(a){G(!1,a),z(p)},variables:{input:{permission_policies:d("MWSDevicesAppPermissionsHelper").getPermissionPoliciesForUpdate(u),remote_app_id:s.appID},refetch_app_details:!1}});else{var a;C({onCompleted:function(){F(),G(!0)},onError:function(a){G(!1,a),z(p)},variables:{input:{managed_app_id:(a=s.appID)!=null?a:"",permission_policies:d("MWSDevicesAppPermissionsHelper").getPermissionPoliciesForUpdate(u)}}})}},[s.appID,u,f,G,C,w,A,F]);l(function(){if(q[c("nullthrows")(s.appID)]!=null){var a=q[c("nullthrows")(s.appID)].apkParserStatus;s.apkParserStatus!==a&&(x({type:"UPDATE_APK_SCAN_RESULT",value:a}),a==="FINISHED"&&d("MWSDevicesAppPermissionsHelper").fetchPermissionsData(s.appID,c("emptyFunction"),r,x))}},[s,s.apkParserStatus,s.appID,q,r,x]);return j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("GeoFlexbox.react"),{xstyle:[c("geoMargin").top8,c("geoMargin").bottom24],children:j.jsxs(c("GeoVStack.react"),{children:[j.jsx(c("MWSDevicesAppPermissionsForm.react"),{eventOrigin:e,isDisabled:!b,itapCompanyID:g,propAppData:u,propDispatch:v}),y!=null&&j.jsx(c("GeoNotice.react"),{status:"error",children:y})]})}),j.jsxs(c("GeoHStack.react"),{alignItems:"end",grow:1,justifyContent:"end",children:[j.jsx(c("GeoCancelButton.react"),{isDisabled:E,onClick:a}),j.jsx(c("GeoButton.react"),{disabledMessage:b?null:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,isDisabled:i||!b,isLoading:E,label:h._(/*BTDS*/"Save"),onClick:H,variant:"primary"})]})]})}a.displayName=a.name+" [from "+f.id+"]";var p=h._(/*BTDS*/"Failed to update app permissions. Please try again.");g["default"]=a}),226);
-----
MWSDevicesAppDetailsPageAppExpansionFilesSection.react",["fbt","CometRelayErrorHandling","MMAQPLUserFlow","MWSDevicesAppDetailsPageAppExpansionFilesEditCard.react","MWSDevicesAppDetailsTabsMutation.graphql","MWSDevicesAppExpansionFiles.react","MWSDevicesAppFormConstants","MWSDevicesAppFormContext","MWSDevicesAppFormHelper","MWSDevicesInlineEditSection.react","MWSDevicesStringUtils","RelayHooks","qpl","react"],(function(a,b,c,d,e,f,g,h){"use strict";var i,j=i||(i=d("react"));b=i;var k=b.useCallback,l=b.useState;function a(a){var b=a.canManageApps,e=a.eventOrigin,f=a.itapCompanyID;a=d("MWSDevicesAppFormContext").useMWSDevicesAppFormContext();var g=a.appData,i=a.dispatch;a=d("RelayHooks").useMutation(c("MWSDevicesAppDetailsTabsMutation.graphql"));var m=a[0];a=a[1];var n=l(null),o=n[0],p=n[1],q=c("qpl")._(440735277,"762"),r=k(function(a,b){var c;d("MWSDevicesAppFormHelper").logAppUpdateSuccessOrFailure(f,e,(c=g.appID)!=null?c:"",a);a&&d("MMAQPLUserFlow").endSuccess(q);if(b){d("CometRelayErrorHandling").markErrorAsHandled(b);d("MMAQPLUserFlow").endCancelOrFailure(q,b,{annotations:{string:{cancelReason:b.toString(),www_request_id:(c=b.source)==null?void 0:c.www_request_id}}})}},[g.appID,e,f,q]);n=k(function(a,b){p(null),d("MMAQPLUserFlow").start(q),m({onCompleted:function(){r(!0),i({type:"SET_APP_EXPANSION_FILES",value:a}),b()},onError:function(a){r(!1,a),p(h._(/*BTDS*/"Failed to update app expansionFiles, please try again."))},variables:{input:{external_resources:a.filter(function(a){a=a.fileName;return a.length>0}).map(function(a){var b=a.fileLink,c=a.fileName;a=a.hash;return{content_hash_256:a,download_uri:b.trim(),filename:c.trim()}}),remote_app_id:g.appID},refetch_app_details:!0}})},[g.appID,i,m,r,q]);return j.jsx(c("MWSDevicesInlineEditSection.react"),{disabledMessage:d("MWSDevicesStringUtils").Q4B_MISSING_PERMISSION_MSG,editCard:j.jsx(c("MWSDevicesAppDetailsPageAppExpansionFilesEditCard.react"),{errorMessage:o,isLoading:a,onSave:n}),growDisplayContent:1,isDisabled:!b,children:j.jsx(c("MWSDevicesAppExpansionFiles.react"),{addInfo:!1,description:d("MWSDevicesAppFormConstants").APP_EXPANSION_FILE_DESCRIPTION,heading:d("MWSDevicesAppFormConstants").APP_EXPANSION_FILE_LABEL,isOptional:!1,isViewOnly:!0,showNoFileMessage:!0})})}a.displayName=a.name+" [from "+f.id+"]";g["default"]=a}),226);
-----
MWSDevicesAppDetailsTabsMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="30405803929034562"}),null);
-----
MWSDevicesAppDetailsTabsMutationManagedPrivateAppMutation_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="23922748687353196"}),null);
-----