BizInboxComposerShortcutsLabelPopupCardSection.react",["BizInboxComposerShortcutsLabelPopupCardSectionQuery.graphql","BizInboxFbtUtils","ContextCardLabelGetTokenAttributes","ContextCardLabelUtils","FDSIcon.react","FDSPlusCircleOutline24Icon","GeoBaseText.react","GeoFlexbox.react","GeoSection.react","GeoSelectableList.react","GeoSelectableListGenericItem.react","GeoTokenLabel.react","PageContactLabelCreationSource","RelayHooks","react","react-compiler-runtime","useBizInboxComposerShortcutsPopupNavigation"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=s||(s=o("react")),c=s.useMemo,d=e!==void 0?e:e=n("BizInboxComposerShortcutsLabelPopupCardSectionQuery.graphql");function m(e){var t,n,a=o("react-compiler-runtime").c(36),i=e.queries,l=e.props,s=l.isShortcutsPopupVisible,c=l.message,m=l.onInputChange,g=l.setShortcutToken,h=i.queryRef,y=o("RelayHooks").usePreloadedQuery(d,h),C;a[0]!==c?(C=c.substring(7).trim(),a[0]=c,a[1]=C):C=a[1];var b=C,v;if(a[2]!==((t=y.page)==null||(t=t.custom_labels)==null?void 0:t.edges)||a[3]!==((n=y.retrieve_biz_crm_contact)==null||(n=n.business_attributes)==null||(n=n.customer_labels)==null||(n=n.label_list)==null?void 0:n.edges)||a[4]!==b){var S,R,L,E,k,I,T=(S=(R=y.retrieve_biz_crm_contact)==null||(R=R.business_attributes)==null||(R=R.customer_labels)==null||(R=R.label_list)==null?void 0:R.edges.map(f).filter(Boolean))!=null?S:[];v=(L=(E=y.page)==null||(E=E.custom_labels)==null?void 0:E.edges.map(_).filter(Boolean).filter(function(e){return T.every(function(t){return t.name!==e.name})}).filter(function(e){return e.name.toLowerCase().startsWith(b.toLowerCase())}).sort(p).slice(0,10))!=null?L:[],a[2]=(k=y.page)==null||(k=k.custom_labels)==null?void 0:k.edges,a[3]=(I=y.retrieve_biz_crm_contact)==null||(I=I.business_attributes)==null||(I=I.customer_labels)==null||(I=I.label_list)==null?void 0:I.edges,a[4]=b,a[5]=v}else v=a[5];var D=v,x;if(a[6]!==D||a[7]!==b){var $;a[9]!==b?($=function(t){return t.name.toLowerCase()===b.toLowerCase()},a[9]=b,a[10]=$):$=a[10],x=D.find($),a[6]=D,a[7]=b,a[8]=x}else x=a[8];var P=x!==void 0,N=b.length>0&&D.length<10&&!P,M=N?D.length+1:D.length,w;a[11]!==D||a[12]!==b||a[13]!==m||a[14]!==g?(w=function(t){var e,n;t===D.length?(e=b,n=o("ContextCardLabelUtils").DEFAULT_COLOR):(e=D[t].name,n=D[t].color),m("/label "+e),g({type:"LabelToken",name:e,color:n,isNewLabel:t===D.length})},a[11]=D,a[12]=b,a[13]=m,a[14]=g,a[15]=w):w=a[15];var A=w,F=r("useBizInboxComposerShortcutsPopupNavigation")(c,s,M,A),O=F.selectedIndex,B=F.itemRefs,W;a[16]!==O?(W=[O],a[16]=O,a[17]=W):W=a[17];var q;a[18]!==A||a[19]!==O?(q=function(t){var e=t.length>0?t[0]:O;A(e)},a[18]=A,a[19]=O,a[20]=q):q=a[20];var U;if(a[21]!==B||a[22]!==D){var V;a[24]!==B?(V=function(t,n){return u.jsx(r("GeoSelectableListGenericItem.react"),{itemID:n,containerRef:function(t){t?B.current.set(n,t):B.current.delete(n)},children:u.jsx(r("GeoFlexbox.react"),{direction:"row",alignItems:"center",grow:1,justifyContent:"space-between",children:u.jsx(r("GeoTokenLabel.react"),{label:t.name,color:o("ContextCardLabelGetTokenAttributes").getTokenLabelColor(t.color,!1)})})},n)},a[24]=B,a[25]=V):V=a[25],U=D.map(V),a[21]=B,a[22]=D,a[23]=U}else U=a[23];var H;a[26]!==B||a[27]!==D.length||a[28]!==b||a[29]!==N?(H=N?u.jsx(r("GeoSelectableListGenericItem.react"),{itemID:D.length,containerRef:function(t){t?B.current.set(D.length,t):B.current.delete(D.length)},children:u.jsx(r("GeoFlexbox.react"),{direction:"row",alignItems:"center",grow:1,justifyContent:"space-between",children:u.jsxs(r("GeoFlexbox.react"),{direction:"row",alignItems:"center",columnGap:8,children:[u.jsx(r("FDSIcon.react"),{color:"primary",icon:r("FDSPlusCircleOutline24Icon"),size:16}),u.jsxs(r("GeoFlexbox.react"),{direction:"column",children:[u.jsx(r("GeoBaseText.react"),{color:"value",size:"value",weight:"bold",overflowWrap:"break-word",children:b}),u.jsx(r("GeoBaseText.react"),{color:"valueDescription",size:"valueDescription",overflowWrap:"break-word",children:o("BizInboxFbtUtils").getBizInboxComposerShortcutsLabelPopupCreateNewLabelDescription(b)})]})]})})},D.length):null,a[26]=B,a[27]=D.length,a[28]=b,a[29]=N,a[30]=H):H=a[30];var G;return a[31]!==W||a[32]!==q||a[33]!==U||a[34]!==H?(G=u.jsx(r("GeoSection.react"),{children:u.jsxs(r("GeoSelectableList.react"),{selectedItemIDs:W,onSelectionChange:q,selectionType:"single",children:[U,H]})}),a[31]=W,a[32]=q,a[33]=U,a[34]=H,a[35]=G):G=a[35],G}function p(e,t){return e.name.localeCompare(t.name)}function _(e){var t,n,o,a=(t=e.node)==null?void 0:t.name,i=(n=e.node)==null?void 0:n.label_color,l=(o=e.node)==null?void 0:o.label_source;return a==null||i==null||l!==Object.keys(r("PageContactLabelCreationSource"))[1]?null:{name:a,color:i}}function f(e){var t,n,r=(t=e.node)==null?void 0:t.name,o=(n=e.node)==null?void 0:n.label_color;return r==null||o==null?null:{name:r,color:o}}l.default=m}),98);
-----
BizInboxComposerShortcutsLabelPopupCardSectionQuery.graphql",["BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation","relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e={defaultValue:null,kind:"LocalArgument",name:"biz_contact_id"},t={defaultValue:null,kind:"LocalArgument",name:"identity"},r={defaultValue:null,kind:"LocalArgument",name:"page_id"},o={defaultValue:null,kind:"LocalArgument",name:"surface"},a=[{kind:"Variable",name:"biz_contact_id",variableName:"biz_contact_id"},{kind:"Variable",name:"identity",variableName:"identity"},{kind:"Variable",name:"surface",variableName:"surface"}],i=[{kind:"Literal",name:"first",value:400}],l={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"label_color",storageKey:null},u=[{kind:"Variable",name:"id",variableName:"page_id"}],c=[{kind:"Literal",name:"first",value:5e3}],d={alias:null,args:null,kind:"ScalarField",name:"label_source",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[e,t,r,o],kind:"Fragment",metadata:null,name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",selections:[{alias:null,args:a,concreteType:"BizCRMContact",kind:"LinkedField",name:"retrieve_biz_crm_contact",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactBusinessAttributes",kind:"LinkedField",name:"business_attributes",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttribute",kind:"LinkedField",name:"customer_labels",plural:!1,selections:[{alias:null,args:i,concreteType:"BizCRMContactMessageLabelAttributeLabelListConnection",kind:"LinkedField",name:"label_list",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttributeLabelListEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s],storageKey:null}],storageKey:null}],storageKey:"label_list(first:400)"}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:u,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:c,concreteType:"CustomLabelsConnection",kind:"LinkedField",name:"custom_labels",plural:!1,selections:[{alias:null,args:null,concreteType:"CustomLabelsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s,d],storageKey:null}],storageKey:null}],storageKey:"custom_labels(first:5000)"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[e,t,o,r],kind:"Operation",name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",selections:[{alias:null,args:a,concreteType:"BizCRMContact",kind:"LinkedField",name:"retrieve_biz_crm_contact",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactBusinessAttributes",kind:"LinkedField",name:"business_attributes",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttribute",kind:"LinkedField",name:"customer_labels",plural:!1,selections:[{alias:null,args:i,concreteType:"BizCRMContactMessageLabelAttributeLabelListConnection",kind:"LinkedField",name:"label_list",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttributeLabelListEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s,m],storageKey:null}],storageKey:null}],storageKey:"label_list(first:400)"}],storageKey:null}],storageKey:null},m],storageKey:null},{alias:null,args:u,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:c,concreteType:"CustomLabelsConnection",kind:"LinkedField",name:"custom_labels",plural:!1,selections:[{alias:null,args:null,concreteType:"CustomLabelsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s,d,m],storageKey:null}],storageKey:null}],storageKey:"custom_labels(first:5000)"},m],storageKey:null}]},params:{id:n("BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation"),metadata:{},name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----
BizInboxComposerShortcutsLabelPopupCardSection.entrypoint",["BizInboxComposerShortcutsLabelPopupCardSectionQuery$Parameters","JSResourceForInteraction"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){return{queries:{queryRef:{parameters:r("BizInboxComposerShortcutsLabelPopupCardSectionQuery$Parameters"),variables:{surface:"INBOX_FB_CHANNEL",biz_contact_id:t.contactID,identity:t.identity,page_id:t.pageID}}}}},root:r("JSResourceForInteraction")("BizInboxComposerShortcutsLabelPopupCardSection.react").__setRef("BizInboxComposerShortcutsLabelPopupCardSection.entrypoint")},s=e;l.default=s}),98);
-----
BizInboxComposerShortcutsLabelPopupCardSectionQuery$Parameters",["BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation"),metadata:{connection:[{count:null,cursor:null,direction:"forward",path:["retrieve_biz_crm_contact","shared_attributes","suggested_labels"]}]},name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25130156559983526"}),null);
-----
-----
BizInboxComposerShortcutsLabelPopupCardSectionQuery.graphql",["BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation","relay-runtime"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e={defaultValue:null,kind:"LocalArgument",name:"biz_contact_id"},t={defaultValue:null,kind:"LocalArgument",name:"identity"},r={defaultValue:null,kind:"LocalArgument",name:"page_id"},o={defaultValue:null,kind:"LocalArgument",name:"surface"},a=[{kind:"Variable",name:"biz_contact_id",variableName:"biz_contact_id"},{kind:"Variable",name:"identity",variableName:"identity"},{kind:"Variable",name:"surface",variableName:"surface"}],i=[{kind:"Literal",name:"first",value:400}],l={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"label_color",storageKey:null},u=[{kind:"Variable",name:"id",variableName:"page_id"}],c=[{kind:"Literal",name:"first",value:5e3}],d={alias:null,args:null,kind:"ScalarField",name:"label_source",storageKey:null},m={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null};return{fragment:{argumentDefinitions:[e,t,r,o],kind:"Fragment",metadata:null,name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",selections:[{alias:null,args:a,concreteType:"BizCRMContact",kind:"LinkedField",name:"retrieve_biz_crm_contact",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactBusinessAttributes",kind:"LinkedField",name:"business_attributes",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttribute",kind:"LinkedField",name:"customer_labels",plural:!1,selections:[{alias:null,args:i,concreteType:"BizCRMContactMessageLabelAttributeLabelListConnection",kind:"LinkedField",name:"label_list",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttributeLabelListEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s],storageKey:null}],storageKey:null}],storageKey:"label_list(first:400)"}],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:u,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:c,concreteType:"CustomLabelsConnection",kind:"LinkedField",name:"custom_labels",plural:!1,selections:[{alias:null,args:null,concreteType:"CustomLabelsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s,d],storageKey:null}],storageKey:null}],storageKey:"custom_labels(first:5000)"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[e,t,o,r],kind:"Operation",name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",selections:[{alias:null,args:a,concreteType:"BizCRMContact",kind:"LinkedField",name:"retrieve_biz_crm_contact",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactBusinessAttributes",kind:"LinkedField",name:"business_attributes",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttribute",kind:"LinkedField",name:"customer_labels",plural:!1,selections:[{alias:null,args:i,concreteType:"BizCRMContactMessageLabelAttributeLabelListConnection",kind:"LinkedField",name:"label_list",plural:!1,selections:[{alias:null,args:null,concreteType:"BizCRMContactMessageLabelAttributeLabelListEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s,m],storageKey:null}],storageKey:null}],storageKey:"label_list(first:400)"}],storageKey:null}],storageKey:null},m],storageKey:null},{alias:null,args:u,concreteType:"Page",kind:"LinkedField",name:"page",plural:!1,selections:[{alias:null,args:c,concreteType:"CustomLabelsConnection",kind:"LinkedField",name:"custom_labels",plural:!1,selections:[{alias:null,args:null,concreteType:"CustomLabelsEdge",kind:"LinkedField",name:"edges",plural:!0,selections:[{alias:null,args:null,concreteType:"BusinessPresenceCustomLabel",kind:"LinkedField",name:"node",plural:!1,selections:[l,s,d,m],storageKey:null}],storageKey:null}],storageKey:"custom_labels(first:5000)"},m],storageKey:null}]},params:{id:n("BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation"),metadata:{},name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",operationKind:"query",text:null}}})();n("relay-runtime").PreloadableQueryRegistry.set(e.params.id,e),a.exports=e}),null);
-----
BizInboxComposerShortcutsLabelPopupCardSection.entrypoint",["BizInboxComposerShortcutsLabelPopupCardSectionQuery$Parameters","JSResourceForInteraction"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){return{queries:{queryRef:{parameters:r("BizInboxComposerShortcutsLabelPopupCardSectionQuery$Parameters"),variables:{surface:"INBOX_FB_CHANNEL",biz_contact_id:t.contactID,identity:t.identity,page_id:t.pageID}}}}},root:r("JSResourceForInteraction")("BizInboxComposerShortcutsLabelPopupCardSection.react").__setRef("BizInboxComposerShortcutsLabelPopupCardSection.entrypoint")},s=e;l.default=s}),98);
-----
BizInboxComposerShortcutsLabelPopupCardSectionQuery$Parameters",["BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation"),metadata:{connection:[{count:null,cursor:null,direction:"forward",path:["retrieve_biz_crm_contact","shared_attributes","suggested_labels"]}]},name:"BizInboxComposerShortcutsLabelPopupCardSectionQuery",operationKind:"query",text:null}};a.exports=e}),null);
-----
BizInboxComposerShortcutsLabelPopupCardSectionQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="25130156559983526"}),null);
-----