AvatarCreatorsCreationFlowFantaUploadView.react",["fbt","ix","AvatarCreatorsCreationFlowActions","AvatarCreatorsCreationFlowContext","AvatarCreatorsCreationFlowFantaUploadViewQuery.graphql","AvatarCreatorsCreationFlowUpload","AvatarCreatorsCreationFlowUtils","CometImage.react","GeoButton.react","GeoCancelButton.react","GeoDivider.react","GeoFileSelector.react","GeoFlexbox.react","GeoGuidanceCard.react","GeoGuidanceCardContent.react","GeoGuidanceCardHeader.react","GeoHStack.react","GeoHeading.react","GeoIcon.react","GeoLink.react","GeoModal.react","GeoModalFooter.react","GeoModalHeader.react","GeoSection.react","GeoSelectableList.react","GeoSelectableListTextItem.react","GeoText.react","GeoTextList.react","GeoTextListItem.react","GeoVStack.react","RelayHooks","fbicon","geoMargin","react","useFileInput","useGeoToaster"],(function(a,b,c,d,e,f,g,h,i){"use strict";var j,k,l=k||(k=d("react"));e=k;var m=e.useCallback,n=e.useRef,o=e.useState,p=250,q={dragNDropContainer:{display:"x78zum5",justifyContent:"xl56j7k",position:"x1n2onr6",$$css:!0},fullHeight:{height:"x5yr21d",$$css:!0}},r=new Blob([""],{type:"application/zip"});function s(a){var b=a.file;function e(){d("AvatarCreatorsCreationFlowUtils").saveFile(b!=null?b:r,"texture.png")}return l.jsx(c("GeoButton.react"),{"data-testid":void 0,grow:"fill",isDisabled:b==null,label:h._(/*BTDS*/"Download starter kit"),onClick:e})}s.displayName=s.name+" [from "+f.id+"]";function t(a){return a?h._(/*BTDS*/"Upload new package"):h._(/*BTDS*/"Upload package")}var u=20;function v(a){var b=a.fantaIngesionResults,e=a.isDisabled;a=a.selectFile;return l.jsx(c("GeoVStack.react"),{children:l.jsx(c("GeoButton.react"),{"data-testid":void 0,grow:"fill",icon:d("fbicon")._(i("568448"),16),isDisabled:e,label:t(b),onClick:a,variant:"primary"})})}v.displayName=v.name+" [from "+f.id+"]";function w(a){a=a.error;return l.jsxs(c("GeoVStack.react"),{children:[l.jsx(c("GeoHeading.react"),{level:2,children:h._(/*BTDS*/"{testName} test",[h._param("testName",a.title)])}),l.jsx(c("GeoGuidanceCard.react"),{header:l.jsx(c("GeoGuidanceCardHeader.react"),{heading:a.description}),status:"error",children:l.jsx(c("GeoGuidanceCardContent.react"),{children:l.jsx(c("GeoText.react"),{children:a.message})})}),l.jsx(c("GeoGuidanceCard.react"),{header:l.jsx(c("GeoGuidanceCardHeader.react"),{heading:h._(/*BTDS*/"How to fix")}),status:"active-feedback",children:l.jsxs(c("GeoGuidanceCardContent.react"),{children:[l.jsx(c("GeoSection.react"),{children:l.jsx(c("GeoText.react"),{children:a.howToFix})}),a.links.length>0&&l.jsx(c("GeoSection.react"),{children:l.jsx("div",{style:{width:410},children:l.jsx(c("GeoTextList.react"),{children:a.links.map(function(a,b){return l.jsx(c("GeoTextListItem.react"),{children:l.jsx(c("GeoLink.react"),{href:a.url,target:"_blank",children:a.title})},b)})})})})]})})]})}w.displayName=w.name+" [from "+f.id+"]";function x(a){var b=a.fantaIngestionResults,d=a.filename,e=a.resultsModalVisible,f=a.selectFile,g=a.setResultsModalVisible;a=o([0]);var i=a[0];a=a[1];return l.jsx(c("GeoModal.react"),{"data-testid":void 0,footer:l.jsx(c("GeoModalFooter.react"),{primaryButton:l.jsx(c("GeoButton.react"),{autoFocus:!0,"data-testid":void 0,label:h._(/*BTDS*/"Upload new package"),onClick:f,variant:"primary"}),secondaryButton:l.jsx(c("GeoCancelButton.react"),{"data-testid":void 0,label:h._(/*BTDS*/"Close")})}),header:l.jsx(c("GeoModalHeader.react"),{description:h._(/*BTDS*/{"*":"{issueCount} issues found in file {filename}","_1":"{issueCount} issue found in file {filename}"},[h._plural(b.length),h._param("issueCount",b.length),h._param("filename",d)]),heading:h._(/*BTDS*/"Ingestion Results")}),isShown:e,label:h._(/*BTDS*/"Ingestion Results"),onHide:function(){return g(!1)},children:l.jsxs(c("GeoHStack.react"),{children:[l.jsx("div",{style:{minWidth:180},children:l.jsx(c("GeoSelectableList.react"),{onSelectionChange:a,selectedItemIDs:i,selectionType:"single",xstyle:c("geoMargin").horiz20,children:b.map(function(a,b){return l.jsx(c("GeoSelectableListTextItem.react"),{"data-testid":void 0,itemID:b,label:a.title},b)})})}),l.jsx(c("GeoDivider.react"),{direction:"vertical"}),i.length>0&&l.jsx(w,{error:b[i[0]]})]})})}x.displayName=x.name+" [from "+f.id+"]";function y(a){var b=a.fantaIngestionResults,e=a.filename,f=a.resultsModalVisible,g=a.selectFile,j=a.setResultsModalVisible;a=b.length===0;return l.jsx("div",{style:{backgroundColor:a?"rgb(241, 244, 247)":"rgb(255, 235, 235)",border:"1px solid #a7b3bf",borderRadius:"4px",height:p,maxWidth:"100%"},children:l.jsx("div",{style:{marginLeft:"12px",marginRight:"12px",paddingTop:"60px",textAlign:"center"},children:a?l.jsxs(l.Fragment,{children:[l.jsx(c("GeoIcon.react"),{color:"success","data-testid":void 0,icon:d("fbicon")._(i("498147"),24)}),l.jsx(c("GeoHeading.react"),{level:4,textAlign:"center",xstyle:c("geoMargin").top12,children:h._(/*BTDS*/"Package ingested successfully")})]}):l.jsxs(c("GeoVStack.react"),{alignItems:"center",children:[l.jsx(c("GeoIcon.react"),{color:"error","data-testid":void 0,icon:d("fbicon")._(i("681772"),24)}),l.jsx(c("GeoHeading.react"),{level:4,textAlign:"center",xstyle:c("geoMargin").top12,children:h._(/*BTDS*/"Package ingested with errors")}),h._(/*BTDS*/"Please check validation results for more details"),l.jsx(c("GeoButton.react"),{"data-testid":void 0,label:h._(/*BTDS*/"View ingestion results"),onClick:function(){j(!0)}}),l.jsx(x,{fantaIngestionResults:b,filename:e,resultsModalVisible:f,selectFile:g,setResultsModalVisible:j})]})})})}y.displayName=y.name+" [from "+f.id+"]";function a(a){a=a.fantaIngestionResults;var e=n(),f=d("RelayHooks").useRelayEnvironment(),g=c("useGeoToaster")(),h=g.add,k=d("AvatarCreatorsCreationFlowContext").useAvatarCreatorsCreationFlowDispatch();g=o(!1);var r=g[0],w=g[1];g=o(null);var x=g[0],z=g[1];g=m(function(a){w(!1),d("AvatarCreatorsCreationFlowUpload").checkFileSize(a,u,h,function(){z(a[0].name);var c="24307810005487583",e=j!==void 0?j:j=b("AvatarCreatorsCreationFlowFantaUploadViewQuery.graphql");c={creatable_version_id:c,test_case_filter:{statuses:["ERROR"]},test_result_query_options:{sort:{direction:"DESC",key:"STATUS"}}};d("RelayHooks").fetchQuery(f,e,c).subscribe({error:function(a){},next:function(a){var b;if(a==null?void 0:(b=a.node)==null?void 0:(b=b.test_results)==null?void 0:b.nodes){b=a.node.test_results.nodes;a=b.filter(function(a){return a.test_status==="ERROR"}).map(function(a){var b;b=((b=a.test_case_results)==null?void 0:b.nodes)||[];return b.map(function(b){var c;return{description:((c=b.error_message)==null?void 0:c.summary)||"",howToFix:"",links:[],message:((c=b.error_message)==null?void 0:c.description)||"",title:((b=a.test_registration)==null?void 0:b.test_display_name)||""}})});k(d("AvatarCreatorsCreationFlowActions").setFantaIngestionResults(a.flat()))}else k(d("AvatarCreatorsCreationFlowActions").setFantaIngestionResults([]))}})})},[h,k,f]);g=c("useFileInput")(g,{accept:[".usdz"],allowMultiple:!1});return l.jsxs(c("GeoVStack.react"),{children:[l.jsx(s,{file:null}),a==null?l.jsxs(c("GeoFlexbox.react"),{xstyle:q.dragNDropContainer,children:[l.jsx("div",{style:{height:p,maxWidth:"100%"}}),l.jsx("div",babelHelpers["extends"]({ref:e},{className:"x127qqk8 x10l6tqk xbudbmw xwa60dl x11lhmoz x1sqwptx"},{onDragLeave:function(){e.current&&(e.current.className="x127qqk8 x10l6tqk xbudbmw xwa60dl x11lhmoz x1sqwptx")},onDragOver:function(){e.current&&(e.current.className="x11gdpij x127qqk8 x10l6tqk xbudbmw xwa60dl x11lhmoz x1sqwptx")},onDrop:function(){e.current&&(e.current.className="x127qqk8 x10l6tqk xbudbmw xwa60dl x11lhmoz x1sqwptx")},children:l.jsx(c("GeoFileSelector.react"),{"data-testid":void 0,fileTypes:["application/zip"],image:l.jsx(c("CometImage.react"),{src:i("399268")}),isDisabled:!1,isLabelHidden:!0,label:t(a),onChange:function(a){e.current&&(e.current.className="x127qqk8 x10l6tqk xbudbmw xwa60dl x11lhmoz x1sqwptx")},value:[],xstyle:q.fullHeight})}))]}):l.jsx(y,{fantaIngestionResults:a,filename:x,resultsModalVisible:r,selectFile:g,setResultsModalVisible:w}),l.jsx(v,{fantaIngesionResults:a,isDisabled:!1,selectFile:g})]})}a.displayName=a.name+" [from "+f.id+"]";e=d("AvatarCreatorsCreationFlowContext").withAvatarCreatorsCreationFlowState(a,function(a){return{fantaIngestionResults:a.fantaIngestionResults}});g["default"]=e}),226);
-----
AvatarCreatorsCreationFlowFantaUploadViewQuery.graphql",["AvatarCreatorsCreationFlowFantaUploadViewQuery_facebookRelayOperation"],(function(a,b,c,d,e,f){"use strict";a=function(){var a={defaultValue:null,kind:"LocalArgument",name:"creatable_version_id"},c={defaultValue:null,kind:"LocalArgument",name:"test_case_filter"},d={defaultValue:null,kind:"LocalArgument",name:"test_result_query_options"},e=[{kind:"Variable",name:"id",variableName:"creatable_version_id"}],f={alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},g=[{kind:"Variable",name:"query_options",variableName:"test_result_query_options"}],h={alias:null,args:null,kind:"ScalarField",name:"test_status",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"test_display_name",storageKey:null},j=[{kind:"Variable",name:"filter",variableName:"test_case_filter"}],k={alias:null,args:null,concreteType:"Error",kind:"LinkedField",name:"error_message",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"summary",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null}],storageKey:null},l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[a,c,d],kind:"Fragment",metadata:null,name:"AvatarCreatorsCreationFlowFantaUploadViewQuery",selections:[{alias:null,args:e,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[f,{kind:"InlineFragment",selections:[{alias:null,args:g,concreteType:"XFBDigiGoodsCreatableVersionTestResultsConnection",kind:"LinkedField",name:"test_results",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBMVMDigiGoodsTestResult",kind:"LinkedField",name:"nodes",plural:!0,selections:[h,{alias:null,args:null,concreteType:"XFBMVMDigiGoodsTestRegistration",kind:"LinkedField",name:"test_registration",plural:!1,selections:[i],storageKey:null},{alias:null,args:j,concreteType:"XFBMVMDigiGoodsTestResultTestCaseResultsConnection",kind:"LinkedField",name:"test_case_results",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBMVMDigiGoodsTestCaseResult",kind:"LinkedField",name:"nodes",plural:!0,selections:[k],storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}],type:"XFBDigiGoodsCreatableVersion",abstractKey:"__isXFBDigiGoodsCreatableVersion"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[a,d,c],kind:"Operation",name:"AvatarCreatorsCreationFlowFantaUploadViewQuery",selections:[{alias:null,args:e,concreteType:null,kind:"LinkedField",name:"node",plural:!1,selections:[f,{kind:"InlineFragment",selections:[{alias:null,args:g,concreteType:"XFBDigiGoodsCreatableVersionTestResultsConnection",kind:"LinkedField",name:"test_results",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBMVMDigiGoodsTestResult",kind:"LinkedField",name:"nodes",plural:!0,selections:[h,{alias:null,args:null,concreteType:"XFBMVMDigiGoodsTestRegistration",kind:"LinkedField",name:"test_registration",plural:!1,selections:[i,l],storageKey:null},{alias:null,args:j,concreteType:"XFBMVMDigiGoodsTestResultTestCaseResultsConnection",kind:"LinkedField",name:"test_case_results",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBMVMDigiGoodsTestCaseResult",kind:"LinkedField",name:"nodes",plural:!0,selections:[k,l],storageKey:null}],storageKey:null},l],storageKey:null}],storageKey:null}],type:"XFBDigiGoodsCreatableVersion",abstractKey:"__isXFBDigiGoodsCreatableVersion"},l],storageKey:null}]},params:{id:b("AvatarCreatorsCreationFlowFantaUploadViewQuery_facebookRelayOperation"),metadata:{},name:"AvatarCreatorsCreationFlowFantaUploadViewQuery",operationKind:"query",text:null}}}();e.exports=a}),null);
-----
AvatarCreatorsCreationFlowFantaUploadViewQuery_facebookRelayOperation",[],(function(a,b,c,d,e,f){e.exports="29484487574530769"}),null);
-----