PageSourceSearch

https://app.zesty.co/997.06b5c2471acb3337.js

js zesty.co collected 2026-10-02 11:52:58 UTC 29,122 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4c82c482-c6e1-541f-a1bf-8a67b509f301")}catch(e){}}();
3(self.webpackChunkcloudvisor=self.webpackChunkcloudvisor||[]).push([[997],{27546:function(M,E,t){t.d(E,{c:function(){return _},e:function(){return p}});var _=function(){return(c=_||(_={})).simple="columnSimple",c.custom="columnCustom",c.shortDate="columnShortDate",c.number="number",c.fullDate="columnFullDate",c.withCopy="columnWithCopy",c.boolean="columnBoolean",c.priceWithCurrency="priceWithCurrency",c.percent="percent",c.progressBar="progressBar",_;var c}(),p=function(){return(c=p||(p={}))[c.Hide=0]="Hide",c[c.Blur=1]="Blur",p;var c}()},78997:function(M,E,t){t.r(E),t.d(E,{AdminPanelModule:function(){return U}});var _=t(7329),p=t(52200),c=t(48750),P=t(541),v=function(){return(g=v||(v={})).Organizations="organizations",g.Accounts="accounts",g.Users="users",g.Partners="partners",g.Reports="reports",g.ApproveBilling="approve-billing",g.Permissions="permissions",v;var g}(),D=t(14032),u=t(18259),s=[{path:"",component:function(){var g=(0,_.Z)(function S(C){(0,p.Z)(this,S),this.appConfig=C});return g.\u0275fac=function(C){return new(C||g)(u.Y36(D.q))},g.\u0275cmp=u.Xpm({type:g,selectors:[["app-admin-panel"]],decls:1,vars:0,template:function(C,y){1&C&&u._UZ(0,"router-outlet")},directives:[P.lC],encapsulation:2}),g}(),children:[{path:v.Organizations,loadChildren:function(){return t.e(55).then(t.bind(t,41055)).then(function(S){return S.AdminOrganizationsModule})}},{path:v.Accounts,loadChildren:function(){return t.e(130).then(t.bind(t,10130)).then(function(S){return S.AdminAccountsModule})}},{path:v.Users,loadChildren:function(){return t.e(275).then(t.bind(t,96275)).then(function(S){return S.AdminUsersModule})}},{path:v.Partners,loadChildren:function(){return t.e(285).then(t.bind(t,21285)).then(function(S){return S.AdminPartnersModule})}},{path:v.Reports,loadChildren:function(){return t.e(277).then(t.bind(t,67277)).then(function(S){return S.AdminReportsModule})}},{path:v.ApproveBilling,loadChildren:function(){return t.e(787).then(t.bind(t,31787)).then(function(S){return S.ApproveBillingModule})}},{path:v.Permissions,loadChildren:function(){return t.e(166).then(t.bind(t,57166)).then(function(S){return S.AdminPermissionsModule})}},{path:"",redirectTo:v.Organizations,pathMatch:"full"}]}],o=function(){var g=(0,_.Z)(function S(){(0,p.Z)(this,S)});return g.\u0275fac=function(C){return new(C||g)},g.\u0275mod=u.oAB({type:g}),g.\u0275inj=u.cJS({imports:[[P.Bz.forChild(s)],P.Bz]}),g}(),i=t(50855),r=t(6415),f=t(23466),O=t(91338),A=t(74343),d=t(95095),n=t(85878),e=t(11878),a=t(6039),l=t(85231),m=t(46446),L=t(63236),U=function(){var g=(0,_.Z)(function S(){(0,p.Z)(this,S)});return g.\u0275fac=function(C){return new(C||g)},g.\u0275mod=u.oAB({type:g}),g.\u0275inj=u.cJS({providers:[A.O,d.w,O.L,r.z,f.o,i._,m.h,L.k,l.Y,e.J,a.i,n.g],imports:[[c.ez,o]]}),g}()},9763:function(M,E,t){t.d(E,{g:function(){return _}});var _={isLoaded:!1,isLoading:!1,accounts:[],accountsDetails:new Map,accountsPermissions:new Map,expandedElement:null}},50855:function(M,E,t){t.d(E,{_:function(){return r}});var _=t(52200),p=t(7329),c=t(9763),P=t(6415),v=t(23466),D=t(81134),u=t(94236),h=t(98636),s=t(18293),o=t(18259),i=t(34040),r=function(){var f=function(){return(0,p.Z)(function O(A,d,n){(0,_.Z)(this,O),this.api=A,this.state=d,this.toasterService=n,this.getState$=this.state.getState$},[{key:"loadAll",value:function(){var d=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!d&&this.state.getState.isLoaded?this.getState$.pipe((0,u.j)("accounts")):(this.state.resetState(),this.state.setState({isLoading:!0}),this.loadData(Number(d)))}},{key:"expandDetails",value:function(d){return this.state.setState({expandedElement:d}),this.loadDetails(null==d?void 0:d.account_uuid)}},{key:"getAccountPermissions",value:function(d){return this.loadAccountPermissions(d.account_uuid)}},{key:"updateAccount",value:function(d){var n=this;return this.state.setState({isLoading:!0}),this.api.updateAccount(d).pipe((0,h.b)(function(e){var a=n.state.getState.accountsDetails;a.set(d.account_uuid,e);var l=n.state.getState.accounts.map(function(m){return m.account_uuid===d.account_uuid?e:m});n.state.setState({accountsDetails:a,accounts:l,expandedElement:Object.assign({},n.state.getState.expandedElement),isLoading:!1}),n.toasterService.handleSuccessMessage("Account details updated.")}),(0,s.K)(function(e){return console.error(e),n.toasterService.handleRequestFailed(e),n.state.setState({isLoading:!1}),(0,D.of)(null)}))}},{key:"deleteAccount",value:function(d){var n=this;return this.state.setState({isLoading:!0}),this.api.deleteAccount(d).pipe((0,h.b)(function(){var e=n.state.getState.accountsDetails;e.delete(d.account.account_uuid);var a=n.state.getState.accounts.filter(function(l){return l.account_uuid!==d.account.account_uuid});n.state.setState({accountsDetails:e,accounts:a,expandedElement:null,isLoading:!1}),n.toasterService.handleSuccessMessage("The account has been successfully deleted.")}),(0,s.K)(function(e){return console.error(e),n.toasterService.handleErrorMessage("There was an error deleting the account. Please contact R&D"),n.state.setState({isLoading:!1}),(0,D.of)(null)}))}},{key:"closeDetails",value:function(){this.state.setState({expandedElement:null})}},{key:"loadData",value:function(d){var n=this;return this.api.loadAll(d).pipe((0,h.b)(function(e){n.state.setState({accounts:e,isLoaded:!0,isLoading:!1})}),(0,s.K)(function(e){return console.error(e),n.state.setState({isLoaded:!1,isLoading:!1}),n.toasterService.handleRequestFailed(e),(0,D.of)(Object.assign({},c.g)).pipe((0,u.j)("accounts"))}))}},{key:"loadDetails",value:function(d){var n=this;return d||"string"==typeof d?this.state.getState.accountsDetails.has(d)?(0,D.of)(this.state.getState.accountsDetails.get(d)):this.api.loadDetails(d).pipe((0,h.b)(function(e){var a=n.state.getState.accountsDetails;a.set(d,e),n.state.setState({accountsDetails:a})}),(0,s.K)(function(e){return console.error(e),n.toasterService.handleRequestFailed(e),(0,D.of)(null)})):(0,D.of)(null)}},{key:"loadAccountPermissions",value:function(d){var n=this;return this.state.getState.accountsPermissions.has(d)?(0,D.of)(this.state.getState.accountsPermissions.get(d)):this.api.loadAccountPermissions(d).pipe((0,h.b)(function(e){var a=n.state.getState.accountsPermissions;a.set(d,e),n.state.setState({accountsPermissions:a})}),(0,s.K)(function(e){return console.error(e),n.toasterService.handleRequestFailed(e),(0,D.of)(null)}))}}])}();return f.\u0275fac=function(A){return new(A||f)(o.LFG(P.z),o.LFG(v.o),o.LFG(i.b))},f.\u0275prov=o.Yz7({token:f,factory:f.\u0275fac}),f}()},6415:function(M,E,t){t.d(E,{z:function(){return u}});var _=t(52200),p=t(7329),c=t(92525),P=t(49440),v=t(33927),D=t(18259),u=function(){var h=function(){return(0,p.Z)(function s(o){(0,_.Z)(this,s),this.apiFacade=o},[{key:"loadAll",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r="admin/accounts?bypass_cache=".concat(i);return this.apiFacade.get(r).pipe((0,v.U)(function(f){return(0,P.tN)(f.accounts)}))}},{key:"loadDetails",value:function(i){var r="admin/accounts/".concat(i);return this.apiFacade.get(r)}},{key:"loadAccountPermissions",value:function(i){var r="admin/accounts/".concat(i,"/permissions");return this.apiFacade.get(r)}},{key:"updateAccount",value:function(i){var r="admin/accounts/".concat(i.account_uuid);return this.apiFacade.put(r,i).pipe((0,v.U)(function(f){return f.account}))}},{key:"deleteAccount",value:function(i){var r="admin/accounts/".concat(i.org_id,"/").concat(i.account.account_uuid);return this.apiFacade.delete(r)}}])}();
3return h.\u0275fac=function(o){return new(o||h)(D.LFG(c.x))},h.\u0275prov=D.Yz7({token:h,factory:h.\u0275fac}),h}()},23466:function(M,E,t){t.d(E,{o:function(){return D}});var _=t(52200),p=t(7329),c=t(9763),P=t(76491),v=t(18259),D=function(){var u=function(){return(0,p.Z)(function h(){(0,_.Z)(this,h),this._state$=new P.X(Object.assign({},c.g)),this.getState$=this._state$.asObservable()},[{key:"getState",get:function(){return this._state$.getValue()}},{key:"setState",value:function(o){return this._state$.next(Object.assign(Object.assign({},this.getState),o))}},{key:"resetState",value:function(){return this._state$.next(Object.assign(Object.assign({},c.g),{accountsDetails:new Map,accountsPermissions:new Map}))}}])}();return u.\u0275fac=function(s){return new(s||u)},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac}),u}()},90591:function(M,E,t){t.d(E,{R:function(){return _}});var _=function(){return(p=_||(_={})).LiveBilling="LIVE_BILLING",p.CURBased="CUR_BASED",p.CUROnly="CUR_ONLY",_;var p}()},80620:function(M,E,t){t.d(E,{M:function(){return _}});var _={isLoaded:!1,isLoading:!1,organizations:[],organizationsDetails:new Map,expandedElement:null}},91338:function(M,E,t){t.d(E,{L:function(){return O}});var _=t(52200),p=t(7329),c=t(80620),P=t(90591),v=t(95095),D=t(74343),u=t(94236),h=t(92597),s=t(18293),o=t(98636),i=t(81134),r=t(18259),f=t(34040),O=function(){var A=function(){return(0,p.Z)(function d(n,e,a){(0,_.Z)(this,d),this.toasterService=n,this.state=e,this.api=a,this.defaultAwsRegions=["ap-south-2","ap-south-1","eu-south-1","eu-south-2","me-central-1","il-central-1","ca-central-1","eu-central-1","eu-central-2","us-west-1","us-west-2","af-south-1","eu-north-1","eu-west-3","eu-west-2","eu-west-1","ap-northeast-3","ap-northeast-2","me-south-1","ap-northeast-1","sa-east-1","ap-east-1","ca-west-1","ap-southeast-1","ap-southeast-2","ap-southeast-3","ap-southeast-4","us-east-1","us-east-2"],this.getState$=this.state.getState$},[{key:"loadAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!e&&this.state.getState.isLoaded?this.getState$.pipe((0,u.j)("organizations")):(this.state.resetState(),this.state.setState({isLoading:!0}),this.loadData(Number(e)))}},{key:"expandDetails",value:function(e){return this.state.setState({expandedElement:e}),this.loadDetails(null==e?void 0:e.org_id)}},{key:"getResellerName",value:function(e){return this.api.loadResellerName(e)}},{key:"loadGuaranteeTypes",value:function(e){return this.api.loadGuaranteeTypes(e).pipe((0,h.d)())}},{key:"updateDataSource",value:function(e,a){return e.dataSource===a.dataSource?a.dataSource===P.R.CUROnly?this.api.updateExcludedAccounts(a.organizationId,a.excludedAccounts):(0,i.of)(null):this.api.updateDataSourceWithExcludedAccounts(a.organizationId,a.dataSource,a.excludedAccounts)}},{key:"getCustomerPreferences",value:function(e){var a=this;return this.api.getCustomerPreferences(e).pipe((0,s.K)(function(l){throw console.error(l),a.toasterService.handleRequestFailed(l),l}))}},{key:"updateCustomerPreferences",value:function(e){var a=this;return this.api.updateCustomerPreferences(e).pipe((0,o.b)(function(){a.toasterService.handleSuccessMessage("Blended preferences updated.")}),(0,s.K)(function(l){var m,L,U,g,S,C="Ooops, something went wrong...";throw"string"==typeof(null===(m=l.error)||void 0===m?void 0:m.detail)?C=null===(L=l.error)||void 0===L?void 0:L.detail:Array.isArray(null===(U=l.error)||void 0===U?void 0:U.detail)&&(C=null===(S=null===(g=l.error)||void 0===g?void 0:g.detail[0])||void 0===S?void 0:S.msg),console.error(l),a.toasterService.handleErrorMessage(C),l}))}},{key:"getAwsRegions",value:function(){var e=this;return this.api.getAwsRegions().pipe((0,s.K)(function(a){return console.error(a),(0,i.of)(e.defaultAwsRegions)}))}},{key:"getExcludedAccounts",value:function(e){return this.api.getExcludedAccounts(e)}},{key:"updateOrganization",value:function(e){var a=this;return this.api.updateOrganization(e).pipe((0,o.b)(function(l){var m=new Map(a.state.getState.organizationsDetails);m.delete(e.org_id);var L=a.state.getState.organizations.map(function(U){return U.org_id===e.org_id?l:U});
3a.state.setState({organizationsDetails:m,organizations:L,expandedElement:null}),a.toasterService.handleSuccessMessage("Organization details updated.")}),(0,s.K)(function(l){return console.error(l),a.toasterService.handleRequestFailed(l),(0,i.of)(null)}))}},{key:"changeStatus",value:function(e,a){var l=this;return this.api.changeStatus(e,a).pipe((0,o.b)(function(){var m=new Map(l.state.getState.organizationsDetails);m.delete(e),l.state.setState({organizationsDetails:m,expandedElement:null}),l.toasterService.handleSuccessMessage("Organization status updated.")}),(0,s.K)(function(m){return console.error(m),l.toasterService.handleRequestFailed(m),(0,i.of)(null)}))}},{key:"exportOrganizations",value:function(){var e=this;return this.api.exportOrganizations().pipe((0,o.b)(function(){e.toasterService.handleSuccessMessage("Report was sent successfully. Please check your email.")}),(0,s.K)(function(a){return console.error(a),e.toasterService.handleRequestFailed(a),(0,i.of)(null)}))}},{key:"getState",get:function(){return this.state.getState}},{key:"loadData",value:function(e){var a=this;return this.api.loadAll(e).pipe((0,o.b)(function(l){a.state.setState({organizations:l,isLoaded:!0,isLoading:!1})}),(0,s.K)(function(l){return console.error(l),a.state.setState({isLoaded:!1,isLoading:!1}),a.toasterService.handleRequestFailed(l),(0,i.of)(Object.assign({},c.M)).pipe((0,u.j)("organizations"))}))}},{key:"loadDetails",value:function(e){var a=this;return e||"number"==typeof e?this.state.getState.organizationsDetails.has(e)?(0,i.of)(this.state.getState.organizationsDetails.get(e)):this.api.loadDetails(e).pipe((0,o.b)(function(l){var m=a.state.getState.organizationsDetails;m.set(e,l),a.state.setState({organizationsDetails:m})}),(0,s.K)(function(l){return console.error(l),a.toasterService.handleRequestFailed(l),(0,i.of)(null)})):(0,i.of)(null)}}])}();return A.\u0275fac=function(n){return new(n||A)(r.LFG(f.b),r.LFG(v.w),r.LFG(D.O))},A.\u0275prov=r.Yz7({token:A,factory:A.\u0275fac}),A}()},74343:function(M,E,t){t.d(E,{O:function(){return h}});var _=t(52200),p=t(7329),c=t(92525),P=t(49440),v=t(33927),D=t(18259),h=function(){var s=function(){return(0,p.Z)(function o(i){(0,_.Z)(this,o),this.apiFacade=i},[{key:"loadAll",value:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,f="admin/organizations?bypass_cache=".concat(r);return this.apiFacade.get(f).pipe((0,v.U)(function(O){return(0,P.tN)(O.organizations)}))}},{key:"loadDetails",value:function(r){var f="admin/organizations/".concat(r);return this.apiFacade.get(f)}},{key:"loadResellerName",value:function(r){var f="admin/partners/".concat(r,"/name");return this.apiFacade.get(f).pipe((0,v.U)(function(O){return O.reseller_name}))}},{key:"loadGuaranteeTypes",value:function(r){var f="billing/guarantee_type_list?product=".concat(r);return this.apiFacade.get(f).pipe((0,v.U)(function(O){return O.guarantee_type_list}))}},{key:"updateOrganization",value:function(r){var f="admin/organizations/".concat(r.org_id);return this.apiFacade.put(f,r).pipe((0,v.U)(function(O){return O.organization}))}},{key:"exportOrganizations",value:function(){return this.apiFacade.get("admin/organizations/extract")}},{key:"changeStatus",value:function(r,f){var O="admin/organizations/".concat(r,"/").concat(f?"activate":"deactivate");return this.apiFacade.put(O)}},{key:"getExcludedAccounts",value:function(r){var f="admin/organizations/".concat(r,"/excluded_accounts");return this.apiFacade.get(f).pipe((0,v.U)(function(O){return O.excluded_accounts}))}},{key:"updateDataSourceWithExcludedAccounts",value:function(r,f,O){var A="admin/organizations/".concat(r,"/data_source");return this.apiFacade.post(A,{dataSource:f,payload:{excludedAccounts:O}})}},{key:"updateExcludedAccounts",value:function(r,f){var O="admin/organizations/".concat(r,"/excluded_accounts");return this.apiFacade.post(O,{excludedAccounts:f})}},{key:"getCustomerPreferences",value:function(r){var f="discount/v1/customer-preferences/".concat(r);return this.apiFacade.get(f)}},{key:"updateCustomerPreferences",value:function(r){var f=r.orgId,O=function(s,o){var i={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&o.indexOf(r)<0&&(i[r]=s[r]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var f=0;for(r=Object.getOwnPropertySymbols(s);f<r.length;f++)o.indexOf(r[f])<0&&Object.prototype.propertyIsEnumerable.call(s,r[f])&&(i[r[f]]=s[r[f]])}return i}(r,["orgId"]),A="discount/v1/customer-preferences/".concat(f);return this.apiFacade.post(A,O)}},{key:"getAwsRegions",value:function(){return this.apiFacade.get("discount/v1/customer-preferences/aws-regions")}}])}();return s.\u0275fac=function(i){return new(i||s)(D.LFG(c.x))},s.\u0275prov=D.Yz7({token:s,factory:s.\u0275fac}),s}()},95095:function(M,E,t){t.d(E,{w:function(){return D}});
3var _=t(52200),p=t(7329),c=t(80620),P=t(76491),v=t(18259),D=function(){var u=function(){return(0,p.Z)(function h(){(0,_.Z)(this,h),this._state$=new P.X(Object.assign({},c.M)),this.getState$=this._state$.asObservable()},[{key:"getState",get:function(){return this._state$.getValue()}},{key:"setState",value:function(o){return this._state$.next(Object.assign(Object.assign({},this.getState),o))}},{key:"resetState",value:function(){return this._state$.next(Object.assign(Object.assign({},c.M),{organizationsDetails:new Map}))}}])}();return u.\u0275fac=function(s){return new(s||u)},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac}),u}()},83355:function(M,E,t){t.d(E,{f:function(){return _}});var _={isLoading:!1,isLoaded:!1,partners:[],expandedElement:null}},85878:function(M,E,t){t.d(E,{g:function(){return f}});var _=t(52200),p=t(7329),c=t(60438),P=t(83355),v=t(11878),D=t(6039),u=t(81134),h=t(94236),s=t(98636),o=t(18293),i=t(18259),r=t(34040),f=function(){var O=function(){return(0,p.Z)(function A(d,n,e,a){(0,_.Z)(this,A),this.api=d,this.state=n,this.toasterService=e,this.userApi=a,this.getState$=this.state.getState$},[{key:"getState",get:function(){return this.state.getState}},{key:"loadAllResellers",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return n||this.state.getState.isLoading||!this.state.getState.isLoaded?(this.state.setState({isLoading:!0}),this.loadData()):this.getState$.pipe((0,h.j)("partners"))}},{key:"updateResellerOrganizations",value:function(n){var e=this;return this.state.setState({isLoading:!0}),this.api.updateResellerOrganizations(n).pipe((0,s.b)(function(){var a=e.state.getState.partners.map(function(l){return l.reseller_id===n.reseller_id?Object.assign(Object.assign({},l),{organizations:n.organizations.map(function(m){return Number(m)})}):l});e.state.setState({isLoading:!1,partners:a,expandedElement:null}),e.toasterService.handleSuccessMessage("Partner organizations has been updated.")}),(0,o.K)(function(a){return console.error(a),e.state.setState({isLoading:!1}),e.toasterService.handleRequestFailed(a),(0,u.of)(a)}))}},{key:"updateReseller",value:function(n){var e=this;return this.state.setState({isLoading:!0}),this.api.updateReseller(n).pipe((0,s.b)(function(){var a=e.state.getState.partners.map(function(l){return l.reseller_id===n.reseller_id?Object.assign(Object.assign(Object.assign({},l),n.attributes),{organizations:n.attributes.organizations.map(function(m){return Number(m)})}):l});e.state.setState({isLoading:!1,partners:a,expandedElement:null}),e.toasterService.handleSuccessMessage("Partner information updated.")}),(0,o.K)(function(a){return console.error(a),e.state.setState({isLoading:!1}),e.toasterService.handleRequestFailed(a),(0,u.of)(a)}))}},{key:"expandDetails",value:function(n){this.state.setState({expandedElement:n})}},{key:"closeDetails",value:function(){this.state.setState({expandedElement:null})}},{key:"exportResellers",value:function(){var n=this;return this.api.exportResellers().pipe((0,s.b)(function(){n.toasterService.handleSuccessMessage("Report was sent successfully. Please check your email.")}),(0,o.K)(function(e){return console.error(e),n.toasterService.handleRequestFailed(e),(0,u.of)(null)}))}},{key:"inviteUser",value:function(n){var e=this;return this.state.setState({isLoading:!0}),this.userApi.invite(n,!0).pipe((0,s.b)(function(){e.state.setState({isLoading:!1}),e.toasterService.handleSuccessMessage("User invited.")}),(0,o.K)(function(a){return e.state.setState({isLoading:!1}),e.toasterService.handleRequestFailed(a),(0,u.of)(null)}))}},{key:"loadData",value:function(){var n=this;return this.api.loadAllResellers().pipe((0,s.b)(function(e){n.state.setState({partners:e,isLoading:!1,isLoaded:!0})}),(0,o.K)(function(e){return console.error(e),n.state.setState({isLoading:!1,isLoaded:!1}),n.toasterService.handleRequestFailed(e),(0,u.of)(Object.assign({},P.f)).pipe((0,h.j)("partners"))}))}}])}();return O.\u0275fac=function(d){return new(d||O)(i.LFG(v.J),i.LFG(D.i),i.LFG(r.b),i.LFG(c._))},O.\u0275prov=i.Yz7({token:O,factory:O.\u0275fac}),O}()},11878:function(M,E,t){t.d(E,{J:function(){return D}});var _=t(52200),p=t(7329),c=t(92525),P=t(33927),v=t(18259),D=function(){var u=function(){return(0,p.Z)(function h(s){(0,_.Z)(this,h),this.apiFacade=s},[{key:"loadAllResellers",value:function(){return this.apiFacade.get("admin/partners").pipe((0,P.U)(function(i){return i.resellers.map(function(r){return Object.assign(Object.assign({},r),{default_plan:Object.assign({},r.plans),organizations:r.organizations.map(function(f){return Number(f)})})})}))}},{key:"updateReseller",value:function(o){var i="admin/partners/".concat(o.reseller_id);return this.apiFacade.put(i,o)}},{key:"updateResellerOrganizations",value:function(o){var i="admin/partners/".concat(o.reseller_id,"/organizations");return this.apiFacade.put(i,o)}},{key:"exportResellers",value:function(){return this.apiFacade.get("admin/partners/extract")}}])}();return u.\u0275fac=function(s){return new(s||u)(v.LFG(c.x))},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac}),u}()},6039:function(M,E,t){t.d(E,{i:function(){return D}});
3var _=t(52200),p=t(7329),c=t(83355),P=t(76491),v=t(18259),D=function(){var u=function(){return(0,p.Z)(function h(){(0,_.Z)(this,h),this._state$=new P.X(Object.assign({},c.f)),this.getState$=this._state$.asObservable()},[{key:"getState",get:function(){return this._state$.getValue()}},{key:"setState",value:function(o){return this._state$.next(Object.assign(Object.assign({},this.getState),o))}},{key:"resetState",value:function(){return this._state$.next(Object.assign({},c.f))}}])}();return u.\u0275fac=function(s){return new(s||u)},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac}),u}()},93182:function(M,E,t){t.d(E,{I:function(){return p},a:function(){return c}});var _=t(27546),p=[{name:"Full name",prop:"nickname",columnType:_.c.simple,isSortable:!0},{name:"Company",prop:"organization",columnType:_.c.withCopy,isSortable:!0},{name:"Email",prop:"email",columnType:_.c.withCopy,isSortable:!0},{name:"Enabled",prop:"enabled",columnType:_.c.boolean,isSortable:!0},{name:"Created",prop:"created",columnType:_.c.shortDate,isSortable:!0}],c="cloudvisor"},33564:function(M,E,t){t.d(E,{N:function(){return c},P:function(){return p}});var _=t(93182),p=function(){var v=new Map;return v.set(_.a,[]),v},c={isLoading:!1,isLoaded:!1,whitelabelUsers:p(),assignedOrganizations:new Map,expandedElement:null}},85231:function(M,E,t){t.d(E,{Y:function(){return O}});var _=t(52200),p=t(7329),c=t(93182),P=t(33564),v=t(46446),D=t(63236),u=t(81134),h=t(94236),s=t(33927),o=t(98636),i=t(18293),r=t(18259),f=t(34040),O=function(){var A=function(){return(0,p.Z)(function d(n,e,a){(0,_.Z)(this,d),this.api=n,this.state=e,this.toasterService=a,this.getState$=this.state.getState$},[{key:"getState",get:function(){return this.state.getState}},{key:"loadWhitelabelUsers",value:function(e){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a&&this.state.getState.whitelabelUsers.has(e)&&!this.state.getState.isLoading&&this.state.getState.isLoaded)return this.getState$.pipe((0,h.j)("whitelabelUsers"),(0,s.U)(function(m){return m.get(e)}));var l=new Map(this.state.getState.whitelabelUsers);return l.delete(e),this.state.setState(Object.assign(Object.assign({isLoading:!0},e===c.a&&{isLoaded:!1}),{whitelabelUsers:l})),this.loadData(e,Number(a))}},{key:"expandDetails",value:function(e){return this.state.setState({expandedElement:e}),this.loadDetails(null==e?void 0:e.uuid)}},{key:"deleteUser",value:function(e){var a=this;return this.state.setState({isLoading:!0}),this.api.deleteUser(e).pipe((0,o.b)(function(l){if(l.success){var m=new Map(a.state.getState.whitelabelUsers);if(a.state.getState.whitelabelUsers.has(e.whitelabel)){var L=a.state.getState.whitelabelUsers.get(e.whitelabel).filter(function(g){return g.uuid!==e.uuid});m.set(e.whitelabel,L)}var U=a.state.getState.whitelabelUsers.get(c.a).filter(function(g){return g.uuid!==e.uuid});m.set(c.a,U),a.state.setState({whitelabelUsers:m,expandedElement:null}),a.toasterService.handleSuccessMessage("User deleted.")}a.state.setState({isLoading:!1})}),(0,i.K)(function(l){return console.error(l),a.state.setState({isLoading:!1}),a.toasterService.handleRequestFailed(l),(0,u.of)({success:!1})}))}},{key:"assignUserToOrganization",value:function(e,a){var l=this;return this.state.setState({isLoading:!0}),this.api.assignUserToOrganization(e,a).pipe((0,o.b)(function(m){if(m.success){var L=new Map(l.state.getState.assignedOrganizations);L.set(e.uuid,a),l.state.setState({assignedOrganizations:L,expandedElement:null}),l.toasterService.handleSuccessMessage("User assigner to the selected organizations.")}l.state.setState({isLoading:!1})}),(0,i.K)(function(m){return console.error(m),l.state.setState({isLoading:!1}),l.toasterService.handleRequestFailed(m),(0,u.of)({success:!1})}))}},{key:"closeDetails",value:function(){this.state.setState({expandedElement:null})}},{key:"getStateForWhitelabel",value:function(e){return this.state.getState.whitelabelUsers.has(e)?this.state.getState.whitelabelUsers.get(e):null}},{key:"loadData",value:function(e,a){var l=this;return this.api.loadAll(e,a).pipe((0,o.b)(function(m){var L=new Map(l.state.getState.whitelabelUsers);L.set(e,m),l.state.setState({whitelabelUsers:L,isLoading:!1,isLoaded:!0})}),(0,i.K)(function(m){return console.error(m),l.state.setState({isLoading:!1,isLoaded:!1}),l.toasterService.handleRequestFailed(m),(0,u.of)(Object.assign({},P.N)).pipe((0,h.j)("whitelabelUsers"),(0,s.U)(function(L){return L.get(e)}))}))}},{key:"loadDetails",value:function(e){var a=this;return e||"string"==typeof e?this.state.getState.assignedOrganizations.has(e)?(0,u.of)(this.state.getState.assignedOrganizations.get(e)):this.api.loadUserOrganizations(e).pipe((0,o.b)(function(l){var m=new Map(a.state.getState.assignedOrganizations);m.set(e,l),a.state.setState({assignedOrganizations:m})}),(0,i.K)(function(l){return console.error(l),a.toasterService.handleRequestFailed(l),(0,u.of)(null)})):(0,u.of)(null)}}])}();return A.\u0275fac=function(n){return new(n||A)(r.LFG(v.h),r.LFG(D.k),r.LFG(f.b))},A.\u0275prov=r.Yz7({token:A,factory:A.\u0275fac}),A}()},46446:function(M,E,t){t.d(E,{h:function(){return D}});var _=t(52200),p=t(7329),c=t(92525),P=t(33927),v=t(18259),D=function(){var u=function(){return(0,p.Z)(function h(s){(0,_.Z)(this,h),this.apiFacade=s},[{key:"loadAll",value:function(o){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="admin/users/v2?bypass_cache=".concat(i,"&white_label=").concat(o);return this.apiFacade.get(r).pipe((0,P.U)(function(f){return f.users}))}},{key:"loadAllResellers",value:function(){return this.apiFacade.get("admin/partners").pipe((0,P.U)(function(i){return i.resellers}))}},{key:"loadUserOrganizations",value:function(o){var i="admin/users/".concat(o,"/organizations");return this.apiFacade.get(i).pipe((0,P.U)(function(r){return r.organizations}))}},{key:"loadDetails",value:function(o){var i="admin/users/".concat(o);return this.apiFacade.get(i)}},{key:"assignUserToOrganization",value:function(o,i){var r="admin/users/".concat(o.whitelabel.toLowerCase(),"/").concat(o.uuid,"/assign");return this.apiFacade.put(r,{org_list:i}).pipe((0,P.U)(function(){return{success:!0}}))}},{key:"deleteUser",value:function(o){var i="admin/users/".concat(o.whitelabel,"/").concat(o.uuid);return this.apiFacade.delete(i,{body:{email:o.email}}).pipe((0,P.U)(function(){return{success:!0}}))}}])}();return u.\u0275fac=function(s){return new(s||u)(v.LFG(c.x))},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac}),u}()},63236:function(M,E,t){t.d(E,{k:function(){return D}});
3var _=t(52200),p=t(7329),c=t(33564),P=t(76491),v=t(18259),D=function(){var u=function(){return(0,p.Z)(function h(){(0,_.Z)(this,h),this._state$=new P.X(Object.assign({},c.N)),this.getState$=this._state$.asObservable()},[{key:"getState",get:function(){return this._state$.getValue()}},{key:"setState",value:function(o){return this._state$.next(Object.assign(Object.assign({},this.getState),o))}},{key:"resetState",value:function(){return this._state$.next(Object.assign(Object.assign({},c.N),{assignedOrganizations:new Map,whitelabelUsers:(0,c.P)()}))}}])}();return u.\u0275fac=function(s){return new(s||u)},u.\u0275prov=v.Yz7({token:u,factory:u.\u0275fac}),u}()}}]);
4//# sourceMappingURL=997.06b5c2471acb3337.js.map
5//# debugId=4c82c482-c6e1-541f-a1bf-8a67b509f301

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.