PageSourceSearch

https://my.phorest.com/assets/-embroider-route-entrypoint.js_route_accounts.account.client-merge-DznVkJCV.js

js phorest.com collected 2026-10-01 10:13:31 UTC 22,464 bytes, 2 lines download raw bytes

1import{r as e}from"./rolldown-runtime-C_JJxWoe.js";import{U as t,ci as n,ht as l,l as r,r as i,zn as s}from"./service--Lqu_EMW.js";import{N as a,v as o}from"./component-Cv7T6pwJ.js";import{i as d,n as p,r as c,t as u}from"./runtime--fcdnjmJ-BipZYvmV.js";import{a as m}from"./dist-DRF4cd6a.js";import{c as h,r as g}from"./form-Cmp_Kcg4.js";import{t as f}from"./local-date-format-CYmdF-o8.js";import{p as y}from"./ember-apollo-client-By-dZFGb.js";import{n as C}from"./tracking-ByrDSfdj.js";import{t as b}from"./template-factory-4JBdU-3q.js";import{i as P,r as x}from"./helper-BybnoTgH.js";import{t as S}from"./dist-Dx9K8Dr1.js";import"./modifier-DugsK0v9.js";import{t as v}from"./or-C3OfqlhW.js";import{t as N}from"./template-only-lgzOy1tF.js";import{t as A}from"./hero-icon-CqYWR7XU.js";import{t as M}from"./button-Clf1ALLn.js";import{t as k}from"./not-BOaWQ6bK.js";import{t as T}from"./perform-DAV8t_TK.js";import{t as U}from"./set-BfekzthS.js";import{t as j}from"./alert-CGOCTtRx.js";import{Et as I,H as q,Ma as w,Rn as B}from"./main-BKLggAK6.js";import{t as O}from"./client-search-BCaW53wl.js";import{t as V}from"./save-changes-CK1QXJx7.js";import{t as L}from"./layout-CrteawhY.js";var E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"MergeClients"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ClientMergeRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mergeClients"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[]}]}}],loc:{start:0,end:90}},z=n(a({id:"gELP8x1f",block:'[[[10,0],[14,0,"flex flex-col flex-1 p-4 gap-2"],[12],[1,"\\n  "],[10,0],[14,0,"text-lg font-medium text-primary"],[12],[1,[30,1,["name"]]],[13],[1,"\\n  "],[10,0],[14,0,"flex flex-wrap gap-6"],[12],[1,"\\n"],[41,[30,1,["email"]],[[[1,"      "],[10,0],[14,0,"flex items-center flex-nowrap"],[12],[1,"\\n        "],[8,[32,0],[[24,0,"mr-2"]],[["@size","@name","@variant"],["small","mail","outline"]],null],[1,"\\n        "],[1,[30,1,["email"]]],[1,"\\n      "],[13],[1,"\\n"]],[]],null],[41,[30,1,["mobile"]],[[[1,"      "],[10,0],[14,0,"flex items-center flex-nowrap"],[12],[1,"\\n        "],[8,[32,0],[[24,0,"mr-2"]],[["@size","@name","@variant"],["small","phone","outline"]],null],[1,"\\n        "],[1,[30,1,["mobile"]]],[1,"\\n      "],[13],[1,"\\n"]],[]],null],[1,"  "],[13],[1,"\\n"],[13]],["@client"],["div","if"]]',moduleName:"/home/circleci/repo/app/components/client-merge/clients/client/index.hbs",scope:()=>[A],isStrictMode:!1}),N()),D=n(a({id:"L/NtiFKT",block:'[[[41,[30,1],[[[1,"  "],[10,0],[14,0,"flex flex-col flex-1 gap-4"],[12],[1,"\\n"],[42,[28,[37,3],[[28,[37,3],[[30,1]],null]],null],"id",[[[1,"      "],[10,0],[14,0,"border border-gray-darker rounded flex items-center"],[12],[1,"\\n        "],[8,[32,0],null,[["@client"],[[30,2]]],null],[1,"\\n        "],[8,[32,1],[[24,0,"mr-4"],[16,"aria-label",[28,[32,2],["global.remove"],null]],[24,3,"delete-client-option"],[4,[32,3],["click",[28,[32,4],[[30,4],[30,2]],null]],null]],[["@variant","@shape","@disabled"],["tertiary","square",[30,3]]],[["default"],[[[[1,"\\n          "],[8,[32,5],[[24,0,"w-5 h-5"]],[["@noSizeClass","@name"],[true,"x"]],null],[1,"\\n        "]],[]]]]],[1,"\\n      "],[13],[1,"\\n"]],[2]],null],[1,"  "],[13],[1,"\\n"]],[]],null]],["@clientsToMerge","client","@disabled","@deleteClient"],["if","div","each","-track-array"]]',moduleName:"/home/circleci/repo/app/components/client-merge/clients/index.hbs",scope:()=>[z,M,b,o,P,A],isStrictMode:!1}),N()),R=n(a({id:"fvrd79+Z",block:'[[[8,[30,1,["Subsection"]],null,[["@span"],[[30,2]]],[["default"],[[[[1,"\\n  "],[8,[32,0],null,[["@name","@onChange","@value","@disabled"],[[30,3],[28,[32,1],[[30,4],[3
10,5]],null],[30,6],[28,[32,2],[[30,7,["length"]],2],null]]],[["default"],[[[[1,"\\n    "],[8,[30,8,["Label"]],null,null,[["default"],[[[[1,[30,9]]],[]]]]],[1,"\\n    "],[8,[30,8,["Button"]],null,null,[["default"],[[[[1,"\\n      "],[1,[28,[32,3],[[30,6,["name"]],[30,6]],null]],[1,"\\n    "]],[]]]]],[1,"\\n"],[42,[28,[37,1],[[28,[37,1],[[30,7]],null]],null],null,[[[1,"      "],[8,[30,8,["Option"]],null,[["@value"],[[30,10]]],[["default"],[[[[1,"\\n        "],[1,[28,[32,3],[[30,10,["name"]],[30,10]],null]],[1,"\\n      "]],[]]]]],[1,"\\n"]],[10]],null],[1,"  "]],[8]]]]],[1,"\\n"]],[]]]]]],["@panel","@span","@name","@handlePropertyChange","@propertyName","@propertyValue","@options","listbox","@label","option"],["each","-track-array"]]',moduleName:"/home/circleci/repo/app/components/client-merge/props-merge/select/index.hbs",scope:()=>[h,P,q,v],isStrictMode:!1}),N()),H=n(a({id:"zFgf5SxZ",block:'[[[8,[30,1,["Subsection"]],[[17,2]],null,[["default"],[[[[1,"\\n  "],[8,[32,0],null,[["@name","@onChange","@value","@disabled"],[[30,3],[28,[32,1],[[30,4],[3
10,5]],null],[30,6],[28,[32,2],[[30,7,["length"]],2],null]]],[["default"],[[[[1,"\\n    "],[8,[30,8,["Label"]],null,null,[["default"],[[[[1,[30,9]]],[]]]]],[1,"\\n    "],[8,[30,8,["Button"]],null,null,[["default"],[[[[1,"\\n      "],[1,[28,[32,3],[[30,6],"tiny"],null]],[1,"\\n    "]],[]]]]],[1,"\\n"],[42,[28,[37,1],[[28,[37,1],[[30,7]],null]],null],null,[[[1,"      "],[8,[30,8,["Option"]],null,[["@value"],[[30,10]]],[["default"],[[[[1,"\\n        "],[1,[28,[32,3],[[30,10],"tiny"],null]],[1,"\\n      "]],[]]]]],[1,"\\n"]],[10]],null],[1,"  "]],[8]]]]],[1,"\\n"]],[]]]]]],["@panel","&attrs","@name","@handlePropertyChange","@propertyName","@propertyValue","@options","listbox","@label","option"],["each","-track-array"]]',moduleName:"/home/circleci/repo/app/components/client-merge/props-merge/date-select/index.hbs",scope:()=>[h,P,q,f],isStrictMode:!1}),N()),F=a({id:"qiPoZWwz",block:'[[[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"first-name-select",[30,0,["handleClientPropertyChange"]],[30,0,["firstNames"]],"firstName",[30,2,["firstName"]],[28,[32,1],["client-merge.props.first-name"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"last-name-select",[30,0,["handleClientPropertyChange"]],[30,0,["lastNames"]],"lastName",[30,2,["lastName"]],[28,[32,1],["client-merge.props.last-name"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"mobile-select",[30,0,["handleClientPropertyChange"]],[30,0,["mobiles"]],"mobile",[30,2,["mobile"]],[28,[32,1],["client-merge.props.mobile"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"land-line-select",[30,0,["handleClientPropertyChange"]],[30,0,["landLines"]],"landLine",[30,2,["landLine"]],[28,[32,1],["client-merge.props.land-line"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@span","@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],["2",[30,1],"email-select",[30,0,["handleClientPropertyChange"]],[30,0,["emails"]],"email",[30,2,["email"]],[28,[32,1],["client-merge.props.email"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@span","@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],["2",[30,1],"street-address-1-select",[30,0,["handleClientAddressPropertyChange"]],[30,0,["streetAddress1s"]],"streetAddress1",[30,2,["address","streetAddress1"]],[28,[32,1],["client-merge.props.street-address-1"],null]]],null],[1,"\\n\\n"],[8,[32,2],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"date-of-birth-select",[30,0,["handleClientPropertyChange"]],[30,0,["dateOfBirths"]],"dateOfBirth",[30,2,["dateOfBirth"]],[28,[32,1],["client-merge.props.date-of-birth"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@span","@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],["2",[30,1],"street-address-2-select",[30,0,["handleClientAddressPropertyChange"]],[30,0,["streetAddress2s"]],"streetAddress2",[30,2,["address","streetAddress2"]],[28,[32,1],["client-merge.props.street-address-2"],null]]],null],[1,"\\n\\n"],[8,[32,2],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"client-since-select",[30,0,["handleClientPropertyChange"]],[30,0,["clientSinces"]],"clientSince",[30,2,["clientSince"]],[28,[32,1],["client-merge.props.client-since"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"city-select",[30,0,["handleClientAddressPropertyChange"]],[30,0,["cities"]],"city",[30,2,["address","city"]],[28,[32,1],["client-merge.props.city"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"state-select",[30,0,["handleClientAddressPropertyChange"]],[30,0,["states"]],"state",[30,2,["address","state"]],[28,[32,1],["client-merge.props.state"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"preferred-staff-select",[30,0,["handleClientPropertyChange"]],[30,0,["preferredStaffs"]],"preferredStaff",[30,2,["preferredStaff"]],[28,[32,1],["client-merge.props.preferred-staff"],null]]],null],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"postal-code-select",[30,0,["handleClientAddressPropertyChange"]],[30,0,["postalCodes"]
1],"postalCode",[30,2,["address","postalCode"]],[28,[32,1],["client-merge.props.postal-code"],null]]],null],[1,"\\n\\n"],[8,[30,1,["Subsection"]],[[17,3]],null,[["default"],[[[[1,"\\n  "],[8,[32,3],null,[["@name","@onChange","@value","@disabled"],["country-select",[30,0,["handleCountryChange"]],[30,2,["address","country","code"]],[28,[32,4],[[30,0,["countries","length"]],2],null]]],[["default"],[[[[1,"\\n    "],[8,[30,4,["Label"]],null,null,[["default"],[[[[1,"\\n      "],[1,[28,[32,5],["client-merge.props.country"],null]],[1,"\\n    "]],[]]]]],[1,"\\n    "],[8,[30,4,["Button"]],null,null,[["default"],[[[[1,"\\n"],[41,[30,2,["address","country","code"]],[[[1,"        "],[1,[28,[32,5],[[28,[32,6],["countries.",[30,2,["address","country","code"]]],null]],null]],[1,"\\n"]],[]],null],[1,"    "]],[]]]]],[1,"\\n"],[42,[28,[37,2],[[28,[37,2],[[30,0,["countries"]]],null]],null],null,[[[1,"      "],[8,[30,4,["Option"]],null,[["@value"],[[30,5]]],[["default"],[[[[1,"\\n        "],[1,[28,[32,5],[[28,[32,6],["countries.",[30,5]],null]],null]],[1,"\\n      "]],[]]]]],[1,"\\n"]],[5]],null],[1,"  "]],[4]]]]],[1,"\\n"]],[]]]]],[1,"\\n\\n"],[8,[32,0],null,[["@panel","@name","@handlePropertyChange","@options","@propertyName","@propertyValue","@label"],[[30,1],"client-source-select",[30,0,["handleClientPropertyChange"]],[30,0,["clientSources"]],"clientSource",[30,2,["clientSource"]],[28,[32,1],["client-merge.props.client-source"],null]]],null]],["@panel","@mergedClientProperties","&attrs","listbox","code"],["if","each","-track-array"]]',moduleName:"/home/circleci/repo/app/components/client-merge/props-merge/index.hbs",scope:()=>[R,b,H,h,q,b,x],isStrictMode:!1}),G=class extends S{static{p(this.prototype,"mergedClientProperties",[C])}#e=void d(this,"mergedClientProperties");constructor(){super(...arguments),this.firstNames=this.#t("firstName"),this.lastNames=this.#t("lastName"),this.mobiles=this.#t("mobile"),this.landLines=this.#t("landLine"),this.emails=this.#t("email"),this.streetAddress1s=this.#n("streetAddress1"),this.streetAddress2s=this.#n("streetAddress2"),this.cities=this.#n("city"),this.states=this.#n("state"),this.postalCodes=this.#n("postalCode"),this.countries=this.#l(),this.dateOfBirths=this.#t("dateOfBirth"),this.clientSinces=this.#t("clientSince"),this.preferredStaffs=this.#t("preferredStaff"),this.clientSources=this.#t("clientSource"),s("afterRender",()=>{this.handleInitialMerge()})}#t=e=>[...new Set(this.args.clientsToMerge.map(t=>t[e]).filter(e=>!!e))];#n=e=>[...new Set(this.args.clientsToMerge.map(t=>t.address?.[e]).filter(e=>!!e))];#l=()=>[...new Set(this.args.clientsToMerge.map(e=>e.address?.country?.code).filter(e=>!!e))];handleInitialMerge(){const e={...this.args.mergedClientProperties,firstName:this.firstNames[0],lastName:this.lastNames[0],mobile:this.mobiles[0],landLine:this.landLines[0],email:this.emails[0],dateOfBirth:this.dateOfBirths[0],clientSince:this.clientSinces[0],preferredStaff:this.preferredStaffs[0],clientSource:this.clientSources[0],address:{...this.args.mergedClientProperties.address,streetAddress1:this.streetAddress1s[0],streetAddress2:this.streetAddress2s[0],city:this.cities[0],state:this.states[0],postalCode:this.postalCodes[0],country:this.countries[0]?{code:this.countries[0]}:null}};this.args.onMergedClientPropertiesUpdated(e)}handleClientPropertyChange(e,t){const n={...this.args.mergedClientProperties,[e]:t};this.args.onMergedClientPropertiesUpdated(n)}static{c(this.prototype,"handleClientPropertyChange",[l])}handleClientAddressPropertyChange(e,t){const n={...this.args.mergedClientProperties,address:{...this.args.mergedClientProperties.address,[e]:t}};this.args.onMergedClientPropertiesUpdated(n)}static{c(this.prototype,"handleClientAddressPropertyChange",[l])}handleCountryChange(e){const t={...this.args.mergedClientProperties,address:{...this.args.mergedClientProperties.address,country:{code:e}}};this.args.onMergedClientPropertiesUpdated(t)}static{c(this.prototype,"handleCountryChange",[l])}};n(F,G);var K=a({id:"y8Eq9cip",block:'[[[8,[32,0],[[24,3,"client-merge"],[24,0,"mt-8 mb-20"]],[["@bgColor","@onSubmit","@onCancel","@hasChanges","@submitButtonLabel","@actionBarLabel","@onDiscard","@resetChanges"],["bg-theme",[28,[32,1],[[30,0,["submitTask"]]],null],[30,0,["handleBack"]],[30,0,["mergedClientProperties"]
1],[28,[32,2],["client-merge.merge-all-button"],null],[28,[32,2],["client-merge.action-bar-label"],null],[30,0,["clear"]],[30,0,["clear"]]]],[["default"],[[[[1,"\\n  "],[8,[32,3],[[24,0,"mb-4"]],[["@variant","@text"],["info",[28,[32,2],["client-merge.info"],null]]],null],[1,"\\n\\n  "],[8,[32,4],null,null,[["default"],[[[[1,"\\n    "],[8,[30,2,["Title"]],null,null,[["default"],[[[[1,[28,[32,5],["client-merge.clients-section-title"],null]]],[]]]]],[1,"\\n    "],[8,[30,2,["Description"]],null,null,[["default"],[[[[1,[28,[32,5],["client-merge.client-section-description"],null]]],[]]]]],[1,"\\n\\n    "],[8,[30,2,["Panel"]],null,null,[["default"],[[[[1,"\\n"],[41,[30,0,["clientsToMerge","length"]],[[[1,"        "],[8,[30,3,["Section"]],null,null,[["default"],[[[[1,"\\n          "],[8,[30,3,["Subsection"]],null,[["@fullwidth"],[true]],[["default"],[[[[1,"\\n            "],[8,[32,6],null,[["@clientsToMerge","@deleteClient","@disabled"],[[30,0,["clientsToMerge"]],[30,0,["deleteClient"]],[30,0,["mergedClientProperties"]]]],null],[1,"\\n          "]],[]]]]],[1,"\\n        "]],[]]]]],[1,"\\n"]],[]],null],[1,"\\n      "],[8,[30,3,["Section"]],null,null,[["default"],[[[[1,"\\n        "],[8,[30,3,["Subsection"]],null,[["@fullwidth"],[true]],[["default"],[[[[1,"\\n          "],[10,0],[14,0,"flex justify-between"],[12],[1,"\\n            "],[8,[30,1,["InputGroup"]],null,null,[["default"],[[[[1,"\\n              "],[8,[30,4,["Button"]],[[24,3,"add-client"],[4,[32,7],["click",[28,[32,8],[[30,0],"clientSearchOpen",true],null]],null]],[["@type","@variant","@showLoading","@disabled"],["button","tertiary",[30,0,["loadClientTask","isRunning"]],[30,0,["mergedClientProperties"]]]],[["default"],[[[[1,"\\n                "],[8,[30,5,["Icon"]],[[24,0,"text-primary-lighter"]],[["@name","@iconVariant","@size"],["plus","solid","md"]],null],[1,"\\n                "],[1,[28,[32,5],["client-merge.add-client-button"],null]],[1,"\\n              "]],[5]]]]],[1,"\\n            "]],[4]]]]],[1,"\\n            "],[8,[30,1,["InputGroup"]],null,null,[["default"],[[[[1,"\\n              "],[8,[30,6,["Button"]],[[24,3,"next"],[4,[32,7],["click",[30,0,["handleNext"]]],null]],[["@type","@variant","@disabled"],["button","primary",[28,[32,9],[[30,0,["mergedClientProperties"]],[28,[32,10],[[30,0,["canMerge"]]],null]],null]]],[["default"],[[[[1,"\\n                "],[1,[28,[32,5],["client-merge.next-button"],null]],[1,"\\n              "]],[]]]]],[1,"\\n            "]],[6]]]]],[1,"\\n          "],[13],[1,"\\n        "]],[]]]]],[1,"\\n      "]],[]]]]],[1,"\\n    "]],[3]]]]],[1,"\\n  "]],[2]]]]],[1,"\\n\\n"],[41,[30,0,["mergedClientProperties"]],[[[1,"    "],[8,[32,4],null,null,[["default"],[[[[1,"\\n      "],[8,[30,7,["Title"]],null,null,[["default"],[[[[1,[28,[32,5],["client-merge.properties-section-title"],null]]],[]]]]],[1,"\\n      "],[8,[30,7,["Description"]],null,null,[["default"],[[[[1,[28,[32,5],["client-merge.properties-section-description"],null]]],[]]]]],[1,"\\n\\n      "],[8,[30,7,["Panel"]],null,[["@variant"],["3-column"]],[["default"],[[[[1,"\\n        "],[8,[30,8,["Section"]],null,null,[["default"],[[[[1,"\\n          "],[8,[32,11],null,[["@panel","@clientsToMerge","@mergedClientProperties","@onMergedClientPropertiesUpdated"],[[30,8],[30,0,["clientsToMerge"]],[30,0,["mergedClientProperties"]],[30,0,["handleMergedClientPropertiesUpdated"]]]],null],[1,"\\n        "]],[]]]]],[1,"\\n      "]],[8]]]]],[1,"\\n    "]],[7]]]]],[1,"\\n"]],[]],null],[1,"\\n  "],[8,[32,12],null,[["@isOpen","@onClose","@onClientChoose","@alreadyAddedClientIds"],[[30,0,["clientSearchOpen"]],[28,[32,8],[[30,0],"clientSearchOpen",false],null],[30,0,["handleClientChoose"]],[30,0,["alreadyAddedClientIds"]]]],null],[1,"\\n\\n"]],[1]]]]]],["form","layout","panel","c","b","c","layout","panel"],["if","div"]]',moduleName:"/home/circleci/repo/app/components/client-merge/index.hbs",scope:()=>[V,T,b,j,g,b,D,o,U,v,k,G,O],isStrictMode:!1}),Q=class extends S{static{p(this.prototype,"apollo",[y])}#r=void d(this,"apollo");static{p(this.prototype,"recentClients",[i])}#i=void d(this,"recentClients");static{p(this.prototype,"notifications",[i])}#s=void d(this,"notifications");static{p(this.prototype,"intl",[i])}#a=void d(this,"intl");static{p(this.prototype,"clientsToMerge",[C],function(){return[]})}#o=void d(this,"clientsToMerge");static{p(this.prototype,"clientSearchOpen",[C],function(){return!1})}#d=void d(this,"clientSearchOpen");static{p(this.prototype,"mergedClientProperties",[C],function(){return null})}#e=void d(this,"mergedClientProperties");constructor(){super(...arguments),this.args.initialClientId&&this.loadClientTask.perform(this.args.initialClientId)}get canMerge(){return this.clientsToMerge.length>1}get alreadyAddedClientIds(){return this.clientsToMerge.map(e=>e.id)}handleClientChoose(e){this.clientSearchOpen=!1,this.clientsToMerge.find(t=>
1t.id===e.id)||this.loadClientTask.perform(e.id)}static{c(this.prototype,"handleClientChoose",[l])}deleteClient(e){this.clientsToMerge=this.clientsToMerge.filter(t=>t.id!==e.id),e.id===this.args.initialClientId&&this.args.onClearInitialClient?.()}static{c(this.prototype,"deleteClient",[l])}handleNext(){this.mergedClientProperties=this.clientsToMerge[0]}static{c(this.prototype,"handleNext",[l])}handleMergedClientPropertiesUpdated(e){this.mergedClientProperties=e}static{c(this.prototype,"handleMergedClientPropertiesUpdated",[l])}clear(){this.clientsToMerge=[],this.mergedClientProperties=null,this.args.onClearInitialClient?.()}static{c(this.prototype,"clear",[l])}*loadClientTask(e){const t=yield this.apollo.query({query:B,variables:{id:e}},"client");this.clientsToMerge=[...this.clientsToMerge,t]}static{c(this.prototype,"loadClientTask",[m])}*submitTask(){const e=this.clientsToMerge.map(e=>e.id),t=this.#p();yield this.apollo.mutate({mutation:E,variables:{input:{clientIds:e,mergedClient:t}},update:e=>{this.#c(e)}}),this.notifications.success(this.intl.t("client-merge.success-message")),this.clientsToMerge.forEach(e=>this.recentClients.remove(e)),this.clear()}static{c(this.prototype,"submitTask",[m])}#p(){const e=this.mergedClientProperties;let t=I(e.address,["streetAddress1","streetAddress2","city","state","postalCode"]);return{...I(e,["firstName","lastName","email","mobile","landLine","dateOfBirth"]),clientSourceId:e.clientSource?.id??null,preferredStaffId:e.preferredStaff?.id??null,address:{...t,countryCode:e.address.country?.code}}}#c(e){e.evict({id:"ROOT_QUERY",fieldName:"clients"}),e.gc()}};n(K,Q);var Z=e({default:()=>Y}),Y=a({id:"tnKmvYK6",block:'[[[8,[32,0],null,[["@title","@backLink"],[[28,[32,1],["client-merge.page-title"],null],"accounts.account.manager"]],[["actions","content"],[[[[1,"\\n    "],[10,0],[14,0,"flex"],[12],[1,"\\n"],[41,[30,0,["showEscapeHatch"]],[[[1,"        "],[8,[32,2],[[24,0,"mr-2"],[24,3,"back-to-swing-client-merge"],[4,[32,3],["click",[28,[32,4],[[30,0,["swingBridge","navigateTo"]],"clientMerge"],null]],null]],[["@variant"],["tertiary"]],[["default"],[[[[1,"\\n          "],[8,[30,1,["Icon"]],null,[["@name","@iconVariant"],["reply","outline"]],null],[1,"\\n          "],[1,[28,[32,5],["client-merge.escape-hatch-text"],null]],[1,"\\n        "]],[1]]]]],[1,"\\n"]],[]],null],[1,"    "],[13],[1,"\\n  "]],[]],[[[1,"\\n    "],[8,[32,6],null,[["@initialClientId","@onClearInitialClient"],[[30,0,["clientId"]],[28,[32,7],[[30,0],"clientId",null],null]]],null],[1,"\\n  "]],[]]]]]],["b"],[":actions","div","if",":content"]]',moduleName:"/home/circleci/repo/app/templates/accounts/account/client-merge.hbs",scope:()=>[L,b,M,o,P,b,Q,U],isStrictMode:!1}),J=e({default:()=>W}),W=class extends t{static{p(this.prototype,"swingBridge",[i])}#u=void d(this,"swingBridge");queryParams=["clientId"];static{p(this.prototype,"clientId",[C],function(){return null})}#m=void d(this,"clientId");get showEscapeHatch(){return this.swingBridge.shouldShowEscapeHatch("clientMerge")}},_=e({default:()=>X}),X=u(class extends r{},[w("clients.merge")]),$={};$["my-phorest/templates/accounts/account/client-merge"]=Z,$["my-phorest/controllers/accounts/account/client-merge"]=J,$["my-phorest/routes/accounts/account/client-merge"]=_;export{$ as default};
2//# sourceMappingURL=-embroider-route-entrypoint.js_route_accounts.account.client-merge-DznVkJCV.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.