1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="8a3cf477-db9a-4fad-b31f-4e90ba2931fc",t._sentryDebugIdIdentifier="sentry-dbid-8a3cf477-db9a-4fad-b31f-4e90ba2931fc")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63424],{7073:(t,e,r)=>{"use strict";r.d(e,{C8:()=>U,vj:()=>T,O$:()=>k,s5:()=>C,d0:()=>D,Vs:()=>x,r$:()=>L,Ym:()=>B,wE:()=>I,vm:()=>F,oR:()=>H});var n,a=r(44478),i=r(42969),s=r(63857),o=r(60180),c=r.n(o),u=r(58398),l=r(23745),f=r(67251),d=r(29898),p=r(52672),h=r(76966),m=r(7379),y=r.n(m);function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(b=function(){return!!t})()}var v=function(t){function e(){var t,r,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,f.default)(this,e),t=e,r=[a],t=(0,p.default)(t),n=(0,d.default)(this,b()?Reflect.construct(t,r||[],(0,p.default)(this).constructor):t.apply(this,r)),y().call(n,a),n.name=a.name,n.description=a.description,n.imageUrl=a.imageUrl,n.viewCount=a.viewCount,n.subscribersCount=a.subscribersCount,n.permalink=a.permalink,n}return(0,h.default)(e,t),(0,l.default)(e)}(y());(0,i.default)(v,"_type","recommendations"),(0,i.default)(v,"baseURL","/recommendations");var g=r(63415),E=r.n(g),A=r(5323),O=r.n(A),j=r(92604),w=r(61158),_=r(64747);function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach(function(e){(0,i.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var x=function(t){var e;return e=(0,s.A)(c().mark(function e(r){var n;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:j.A.FETCH_PROJECTS_REQUEST}),e.prev=1,e.next=4,u.A.query(t);case 4:n=e.sent,r({type:j.A.FETCH_PROJECTS_SUCCESS,projects:n.map(function(t){return S({id:t.id},t.attributes())}),meta:n.meta}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),r({type:j.A.FETCH_PROJECTS_FAILURE,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[1,8]])})),function(t){return e.apply(this,arguments)}},U=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=(0,s.A)(c().mark(function t(n){var i,o,l,f,d,p,h;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n({type:j.A.FETCH_ALL_PROJECTS_REQUEST}),t.prev=1,i=[],o={page:1,per_page:r?999:50,sort:"name",order:"asc",assigned:!0,filterable:!0,fields:{project:["name"].concat((0,a.A)(e))}},t.next=6,u.A.query(o);case 6:if(l=t.sent,f={data:(0,a.A)(l),meta:l.meta},!(l&&l.meta&&l.meta.all>50)){t.next=13;break}return d=Math.ceil(l.meta.all/50),p=E()(2,d+1),t.next=13,Promise.all(p.map(function(){var t=(0,s.A)(c().mark(function t(e,r){var n,a;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=S(S({},o),{},{page:e}),t.next=3,u.A.query(n).catch(function(t){return{chunkIndex:r,error:Error(t)}});case 3:a=t.sent,f.data=f.data.concat(a);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()));case 13:h=[],f.data.forEach(function(t){t&&t.error instanceof Error?i.push(t):h.push(S({id:t.id},t.attributes()))}),n({type:j.A.FETCH_ALL_PROJECTS_SUCCESS,projects:O()(h,"name"),meta:f.meta}),t.next=21;break;case 18:t.prev=18,t.t0=t.catch(1),n({type:j.A.FETCH_ALL_PROJECTS_FAILURE,errorMessage:t.t0.statusText||t.t0.status});case 21:case"end":return t.stop()}},t,null,[[1,18]])})),function(e){return t.apply(this,arguments)}},R=(n=(0,s.A)(c().mark(function t(e,r,n,i){var s,o,l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,u.A.query(n);case 3:o=(s=t.sent).map(function(t){return S({id:t.id},t.attributes())}),l=i.length>0?[].concat((0,a.A)(i),(0,a.A)(o)):o,e({type:j.A.FETCH_PROJECTS_SUCCESS,projects:l,meta:s.meta}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),e({type:j.A.FETCH_PROJECTS_FAILURE,errorMessage:t.t0.statusText||t.t0.status});case 12:case"end":return t.stop()}},t,null,[[0,9]])})),function(t,e,r,a){return n.apply(this,arguments)}),T=function(){var t,e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=(0,s.A)(c().mark(function t(n,a){var i,s,o,u;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n({type:j.A.FETCH_PROJECTS_REQUEST}),i=!1===e?S(S({},a().projects.query),{},{assigned:r}):S(S({},a().projects.query),{},{assigned:!0,filterable:e}),s=a().projects.filters.state,o=S(S({},a().projects.filters),{},{state:"all"===s?"":s}),u=new w.A(i,o),t.next=7,R(n,a,u,[]);case 7:case"end":return t.stop()}},t)})),function(e,r){return t.apply(this,arguments)}},C=function(){var t;return t=(0,s.A)(c().mark(function t(e,r){var n,a,i,s;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e({type:j.A.FETCH_PROJECTS_REQUEST}),a=S(S({},r().projects.query),{},{per_page:50,assigned:!0,filterable:!0}),i={sort:{created_at:"desc"},state:_.wu,parent_id:null==(n=r())||null==(n=n.hub)||null==(n=n.hub)?void 0:n.id},s=new w.A(a,i),t.prev=4,t.next=7,R(e,r,s,r().projects.projects);case 7:t.next=12;break;case 9:t.prev=9,t.t0=t.catch(4),e({type:j.A.FETCH_PROJECTS_FAILURE,errorMessage:t.t0.statusText||t.t0.status});case 12:case"end":return t.stop()}},t,null,[[4,9]])}
1)),function(e,r){return t.apply(this,arguments)}},k=function(){var t;return t=(0,s.A)(c().mark(function t(e,r){var n,a,i;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e({type:j.A.FETCH_PROJECTS_REQUEST}),n=S(S({},r().projects.query),{},{fields:{project:["name","image_url","banner_url","description","permalink","state","published_at","parent_id","visibility_mode"]},per_page:50,assigned:!0,filterable:!0}),a=S(S({},r().projects.filters),{},{sort:{created_at:"desc"},state:_.wu}),i=new w.A(n,a),t.next=6,R(e,r,i,r().projects.projects);case 6:case"end":return t.stop()}},t)})),function(e,r){return t.apply(this,arguments)}},H=function(t){return{type:j.A.UPDATE_PROJECTS_QUERY,query:t}},F=function(t){return{type:j.A.UPDATE_PROJECTS_FILTERS,filters:t}},D=function(t){return{type:j.A.FILTER_PROJECTS_BY_NAME,search:t}},L=function(){return{type:j.A.RESET_PROJECTS_PAGE}},I=function(t){return{type:j.A.TOGGLE_PROJECT,id:t}},B=function(t){return{type:j.A.TOGGLE_ALL_PROJECTS,selected:t}}},26796:(t,e,r)=>{"use strict";r.d(e,{Av:()=>l,I3:()=>u,PI:()=>c,dS:()=>o,iv:()=>f,lg:()=>d});var n=r(56557),a=r.n(n),i=r(66315),s=r.n(i);r(46476),a().extend(s());var o=function(t,e){if(!t)throw Error("Missing required argument: timestamp1");if(!e)throw Error("Missing required argument: timestamp2");return a()(e).isAfter(a()(t))?1:-1},c=function(t){if(!t)throw Error("Missing required argument: timestamp");return a()(t).fromNow()},u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"D MMM YYYY, H:mm",r=arguments.length>2?arguments[2]:void 0;if(!t)throw Error("Missing required argument: timestamp");return"fr-CA"===r?a()(t).locale("fr-ca").format(e):a()(t).format(e)},l=function(t,e){if(!t)throw Error("Missing required argument: timestamp");var r="fr-CA"===e?"D MMMM YYYY":"MMMM D, YYYY";return"fr-CA"===e?a()(t).locale("fr-ca").format(r):a()(t).format(r)},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"second";if(!t)throw Error("Missing required argument: timestamp");return a()().diff(t,e)},d=function(t){return t?a()(t).format():null}},38644:(t,e,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/people/administrators/[id]",function(){return r(95430)}])},61158:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var n=r(23745),a=r(67251),i=function(t){return null==t||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length||Array.isArray(t)&&0===t.length};let s=(0,n.default)(function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in(0,a.default)(this,t),e)i(e[n])||(this[n]=e[n]);for(var s in r){var o=r[s];i(o)||(this.filters||(this.filters={}),this.filters[s]=o)}})},64747:(t,e,r)=>{"use strict";r.d(e,{YL:()=>n,kn:()=>a,wu:()=>s,yL:()=>i});var n="fr-CA",a="en",i="fr",s=["published","archived","draft"]},73473:(t,e,r)=>{"use strict";r.d(e,{nD:()=>c,um:()=>o});var n=r(42969);function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach(function(e){(0,n.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function s(t){if(null==t||"object"!=typeof t)return t;var e,r="function"==typeof t.attributes?t.attributes():i({},t),n=null!=(e=t.id)?e:r.id;return i(i({},r),null!=n?{id:n}:{})}function o(t){if(null==t)return[];var e=(Array.isArray(t)?t:[]).map(s);return null!=t.meta&&(e.meta=t.meta),e}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["owner","project","trackable"];if(null==t||"object"!=typeof t)return t;var r=s(t);return e.forEach(function(e){null!=t[e]&&(r[e]=s(t[e]))}),r}},73664:(t,e,r)=>{"use strict";r.d(e,{A:()=>m});var n=r(67251),a=r(23745),i=r(29898),s=r(52672),o=r(76966),c=r(42969),u=r(7379),l=r.n(u),f=r(48363),d=r
1(1234);function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}var h=function(t){function e(){var t,r,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.default)(this,e),t=e,r=[o],t=(0,s.default)(t),a=(0,i.default)(this,p()?Reflect.construct(t,r||[],(0,s.default)(this).constructor):t.apply(this,r)),l().call(a,o),a.name=o.name,a.description=o.description,a.state=o.state,a.createdAt=o.createdAt,a.updatedAt=o.updatedAt,a.permalink=o.permalink,a.isNewHub=o.isNewHub||!1,a.platformAnalyticsTagList=o.platformAnalyticsTagList||[],a.userIds=o.userIds||[],a.imageDescription=o.imageDescription,a.imageCaption=o.imageCaption,a.imageUrl=o.imageUrl,a.visibilityMode=o.visibilityMode,a.segments=a.hasMany(d.A,o.segments),a}return(0,o.default)(e,t),(0,a.default)(e,[{key:"validate",value:function(){(0,f.default)(this.name)&&this.errors.add({code:"blank",source:{pointer:"/data/attributes/name"}})}},{key:"getTags",value:function(){var t=this;return this.constructor.adapter.get("".concat(this.constructBaseURL(),"/").concat(this.id,"/tags")).then(function(e){var r=e.data;return t.constructor.deserialize(r)})}},{key:"getAdmins",value:function(){var t=this;return this.constructor.adapter.get("".concat(this.constructBaseURL(),"/").concat(this.id,"/admins")).then(function(e){var r=e.data;return t.constructor.deserialize(r)})}},{key:"associateSegments",value:function(){return this.constructor.adapter.put("".concat(this.constructBaseURL(),"/").concat(this.id,"/visibility"),this.serialize())}},{key:"generatePermalink",value:function(){var t=this;return this.constructor.adapter.get("".concat(this.constructBaseURL(),"/generate_permalink?name=").concat(this.name)).then(function(e){var r=e.data;return t.constructor.deserialize(r)})}}],[{key:"authorize",value:function(t,e){return this.adapter.post("".concat(this.constructBaseURL(),"/").concat(t,"/admins"),{data:{attributes:{user_id:e}}})}},{key:"unauthorize",value:function(t,e){return this.adapter.delete("".concat(this.constructBaseURL(),"/").concat(t,"/admins/").concat(e))}}])}(l());(0,c.default)(h,"_type","hubs"),(0,c.default)(h,"baseURL","/hubs");let m=h},73706:(t,e,r)=>{"use strict";r.d(e,{A:()=>m});var n=r(67251),a=r(23745),i=r(29898),s=r(52672),o=r(76966),c=r(42969),u=r(14232),l=r(59234),f=r(71858),d=r(37876);function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(h=function(){return!!t})()}let m=function(t){var e,r,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=function(e){function r(){(0,n.default)(this,r);for(var t,e,a,o=arguments.length,u=Array(o),l=0;l<o;l++)u[l]=arguments[l];return e=r,a=[].concat(u),e=(0,s.default)(e),t=(0,i.default)(this,h()?Reflect.construct(e,a||[],(0,s.default)(this).constructor):e.apply(this,a)),(0,c.default)(t,"awaitingPrerequisites",!1),t}return(0,o.default)(r,e),(0,a.default)(r,[{key:"componentDidMount",value:function(){var t=this.props,e=t.doneFetching,r=t.fetchData;void 0!==e&&e||(this.awaitingPrerequisites=!0,r())}},{key:"componentDidUpdate",value:function(t){var e,r=this.props,n=r.doneFetching,a=void 0!==n&&n,i=r.fetchData,s=r.fetching,o=null!=(e=t.doneFetching)&&e;if(!a&&o&&!s){this.awaitingPrerequisites=!1,i();return}if(a||s&&!t.fetching){this.awaitingPrerequisites=!1;return}this.awaitingPrerequisites&&!s&&i()}},{key:"componentWillUnmount",value:function(){this.awaitingPrerequisites=!1;var t=this.props,e=t.resetData,r=t.doneFetching;"function"==typeof e&&void 0!==r&&r&&e()}},{key:"errorNode",value:function(){return null}},{key:"contentNode",value:function(){return this.props.fetchError?this.errorNode():(0,d.jsx)(t,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){(0,c.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEac
1h(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({},this.props))}},{key:"loadingNode",value:function(){var t={small:24,medium:40,large:60}[this.props.spinnerSize||"medium"];return this.props.loaderMinHeight,(0,d.jsx)(l.A,{position:"relative",minHeight:"200px",display:"flex",alignItems:"center",justifyContent:"center",children:(0,d.jsx)(f.A,{size:t})})}},{key:"render",value:function(){var t=this.props,e=t.doneFetching,r=t.suppressLoader;return void 0!==e&&e||void 0!==r&&r?this.contentNode():this.loadingNode()}}])}(u.Component),(0,c.default)(e,"displayName","WithDataFetching"),(0,c.default)(e,"defaultProps",{spinnerSize:"medium",suppressLoader:null!=(r=m.suppressLoader)&&r}),e}},75564:(t,e,r)=>{"use strict";r.d(e,{Br:()=>p,R5:()=>h,oR:()=>m,qQ:()=>b,vm:()=>y});var n=r(42969),a=r(63857),i=r(60180),s=r.n(i),o=r(15158),c=r(73664),u=r(61158),l=r(73473);function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach(function(e){(0,n.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var p=function(){var t;return t=(0,a.A)(s().mark(function t(e){var r;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e({type:o.A.FETCH_HUBS_REQUEST}),t.prev=1,t.next=4,c.A.query({per_page:9999});case 4:r=t.sent,e({type:o.A.FETCH_HUBS_SUCCESS,hubs:(0,l.um)(r)}),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),e({type:o.A.FETCH_HUBS_FAILURE,errorMessage:t.t0.message||t.t0.statusText||t.t0.status});case 11:case"end":return t.stop()}},t,null,[[1,8]])})),function(e){return t.apply(this,arguments)}},h=function(){var t;return t=(0,a.A)(s().mark(function t(e,r){var n,a,i,f,p;return s().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e({type:o.A.QUERY_HUBS_REQUEST}),n=r().hubs.query,a=r().hubs.filters.state,i=d(d({},r().hubs.filters),{},{state:a}),f=new u.A(n,i),t.prev=5,t.next=8,c.A.query(f);case 8:p=t.sent,e({type:o.A.QUERY_HUBS_SUCCESS,hubs:(0,l.um)(p)}),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(5),e({type:o.A.QUERY_HUBS_FAILURE,errorMessage:t.t0.message||t.t0.statusText||t.t0.status});case 15:case"end":return t.stop()}},t,null,[[5,12]])})),function(e,r){return t.apply(this,arguments)}},m=function(t){return{type:o.A.UPDATE_HUBS_QUERY,query:t}},y=function(t){return{type:o.A.UPDATE_HUBS_FILTERS,filters:t}},b=function(){return{type:o.A.RESET_HUBS}}},78012:(t,e,r)=>{"use strict";r.d(e,{HT:()=>g,vj:()=>v,C3:()=>A,gw:()=>E});var n=r(42969),a=r(63857),i=r(60180),s=r.n(i),o=r(35294),c=r(67251),u=r(23745),l=r(29898),f=r(52672),d=r(76966),p=r(7379),h=r.n(p);function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(m=function(){return!!t})()}var y=function(t){function e(){var t,r,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,c.default)(this,e),t=e,r=[a],t=(0,f.default)(t),n=(0,l.default)(this,m()?Reflect.construct(t,r||[],(0,f.default)(this).constructor):t.apply(this,r)),h().call(n,a),n.name=a.name,n.permalink=a.permalink,n.state=a.state,n}return(0,d.default)(e,t),(0,u.default)(e,null,[{key:"authorize",value:function(t,e){return this.adapter.post(this.constructBaseURL({userId:e}),{data:{attributes:{project_ids:t}}})}},{key:"unauthorize",value:function(t,e){return this.adapter.delete("".concat(this.constructBaseURL({userId:e}),"/").concat(t))}}])}(h());function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}(0,n.default)(y,"_type","project-admin-authorized-projects"),(0,n.default)(y,"baseURL","/project_administrators/:userId/projects");var v=function(t){var e;return e=(0,a.A)(s().mark(function e(r,a){var i;return s().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:o.A.FETCH_PROJECTS_REQUEST}),e.prev=1,e.next=4,y.fetchAll({userId:t||a().currentUser.user.id});case 4:i=e.sent,r({type:o.A.FETCH_PROJECTS_SUCCESS,projects:i.reduce(function(t,e){return t[e.id]=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
1e%2?b(Object(r),!0).forEach(function(e){(0,n.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({id:e.id},e.attributes()),t},{})}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),r({type:o.A.FETCH_PROJECTS_FAILURE,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[1,8]])})),function(t,r){return e.apply(this,arguments)}},g=function(t,e){var r;return r=(0,a.A)(s().mark(function r(n){return s().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:o.A.AUTHORIZE_PROJECT_REQUEST}),r.prev=1,r.next=4,y.authorize([t],e);case 4:n({type:o.A.AUTHORIZE_PROJECT_SUCCESS,id:t}),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(1),n({type:o.A.AUTHORIZE_PROJECT_FAILURE,errorMessage:r.t0.statusText||r.t0.status});case 10:case"end":return r.stop()}},r,null,[[1,7]])})),function(t){return r.apply(this,arguments)}},E=function(t,e){var r;return r=(0,a.A)(s().mark(function r(n){return s().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:o.A.UNAUTHORIZE_PROJECT_REQUEST}),r.prev=1,r.next=4,y.unauthorize(t,e);case 4:n({type:o.A.UNAUTHORIZE_PROJECT_SUCCESS,id:t}),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(1),n({type:o.A.UNAUTHORIZE_PROJECT_FAILURE,errorMessage:r.t0.statusText||r.t0.status});case 10:case"end":return r.stop()}},r,null,[[1,7]])})),function(t){return r.apply(this,arguments)}},A=function(){return{type:o.A.RESET_PROJECTS}}},95430:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__N_SSP:()=>tk,default:()=>tH});var n=r(31777),a=r(59234),i=r(71858),s=r(98579),o=r(54237),c=r(89099),u=r(46783),l=r(26796),f=r(37876),d="D MMM YYYY, H:mm";let p=(0,n.Ng)(function(t){return{administrator:t.administrator.administrator}},function(){return{}})(function(t){var e=t.administrator,r=(0,o.useTranslation)(["administrators","date"]),n=r.t,i=r.i18n,s=e.createdAt,c=e.lastSeenAt,p=e.accessibleProjectsCount,h=e.roleName,m="site_admin"===h?n("administrators:administrators.all"):void 0!==p&&""!==p&&null!==p?String(p):"â",y=[{title:n("administrators:administrators.dateJoined"),content:s?(0,l.I3)(s,d,i.language):""},{title:n("administrators:administrators.lastSeen"),content:c?(0,l.I3)(c,d,i.language):"â"},{title:n("administrators:administrators.projectAccess"),content:m}];return(0,f.jsxs)(a.A,{sx:{pb:1},children:[(0,f.jsx)(u.A,{component:"div",sx:{color:"primary.main",fontSize:"1rem",fontWeight:600,lineHeight:1.5},children:e.login}),h?(0,f.jsx)(u.A,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:n("administrators:administrators.".concat(h))}):null,(0,f.jsx)(a.A,{sx:{mt:{xs:2,sm:5},width:"100%",display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, minmax(".concat(240,"px, 1fr))")},gap:0,overflowX:{sm:"auto"},WebkitOverflowScrolling:"touch",pb:.25},children:y.map(function(t,e){return(0,f.jsxs)(a.A,{sx:{py:{xs:1.5,sm:0},px:{xs:0,sm:2.5*(0!==e)},borderBottom:{xs:e<y.length-1?"1px solid":"none",sm:"none"},borderColor:"divider",borderRight:{sm:e<y.length-1?"1px solid":"none"},minWidth:0},children:[(0,f.jsx)(u.A,{variant:"body2",component:"div",sx:{fontWeight:600,mb:.25,whiteSpace:"nowrap"},children:t.title}),(0,f.jsx)(u.A,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",overflow:"visible",textOverflow:"clip"},children:t.content||"â"})]},t.title)})})]})});var h=r(68523),m=r(96633),y=r(67251),b=r(23745),v=r(29898),g=r(52672),E=r(76966),A=r(14232),O=r(63857),j=r(42969),w=r(59860),_=r(60180),P=r.n(_),S=r(83129),x=r(7073),U=r(78012),R=r(1796),T=r(34626),C=r(55700);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function H(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach(function(e){(0,j.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEac
1h(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function F(t){var e=t.label,r=t.placeholder,n=t.options,a=t.value,i=t.onSelect,s=t.onDeselect,o=(0,A.useState)(""),c=o[0],u=o[1],l=(0,A.useMemo)(function(){if(!c.trim())return n;var t=c.toLowerCase();return n.filter(function(e){return e.name.toLowerCase().includes(t)})},[n,c]),d=n.filter(function(t){return a.includes(String(t.id))});return(0,f.jsx)(R.A,{multiple:!0,options:l,getOptionLabel:function(t){return t.name},value:d,onChange:function(t,e){var r=new Set(e.map(function(t){return String(t.id)})),n=new Set(a.map(String));n.forEach(function(t){r.has(t)||s(t)}),r.forEach(function(t){n.has(t)||i(t)})},inputValue:c,onInputChange:function(t,e){return u(e)},sx:C.OP,slotProps:C.HE,renderOption:C.$S,renderInput:function(t){return(0,f.jsx)(T.A,H(H({},t),{},{label:e,placeholder:r,margin:"normal",size:"small"}))},isOptionEqualToValue:function(t,e){return String(t.id)===String(e.id)}})}var D=r(73706),L=["adminId"];function I(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function B(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?I(Object(r),!0).forEach(function(e){(0,j.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}let M=(0,n.Ng)(function(t,e){return{label:e.label,placeholder:e.placeholder,adminId:t.administrator.administrator.id,options:t.projects.projects,value:Object.keys(t.projectAdminAuthorizedProjects.projects),fetching:t.projectAdminAuthorizedProjects.fetching,doneFetching:t.projectAdminAuthorizedProjects.doneFetching,fetchError:t.projectAdminAuthorizedProjects.fetchError}},function(t){return(0,S.zH)({queryProjects:x.Vs,fetchProjects:U.vj,resetProjects:U.C3,authorizeProject:U.HT,unauthorizeProject:U.gw},t)},function(t,e){var r,n=t.adminId;return B(B({},(0,w.A)(t,L)),{},{fetchData:(r=(0,O.A)(P().mark(function t(){return P().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([e.queryProjects({per_page:9999,sort:"name",assigned:!0,fields:{project:["name"]}}),e.fetchProjects(n)]);case 2:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)}),resetData:e.resetProjects,onSelect:function(t){return e.authorizeProject(t,n)},onDeselect:function(t){return e.unauthorizeProject(t,n)}})})((0,D.A)(F));var z=r(75564),N=r(5174),q=r(7379),J=r.n(q);function Y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Y=function(){return!!t})()}var Q=function(t){function e(){var t,r,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,y.default)(this,e),t=e,r=[a],t=(0,g.default)(t),n=(0,v.default)(this,Y()?Reflect.construct(t,r||[],(0,g.default)(this).constructor):t.apply(this,r)),J().call(n,a),n.name=a.name,n.permalink=a.permalink,n}return(0,E.default)(e,t),(0,b.default)(e,null,[{key:"authorize",value:function(t,e){return this.adapter.post(this.constructBaseURL({userId:e}),{data:{attributes:{hub_ids:t}}})}},{key:"unauthorize",value:function(t,e){return this.adapter.delete("".concat(this.constructBaseURL({userId:e}),"/").concat(t))}}])}(J());function Z(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}(0,j.default)(Q,"_type","hub-admin-authorized-hubs"),(0,j.default)(Q,"baseURL","/hub_administrators/:userId/hubs");var W=function(t){var e;return e=(0,O.A)(P().mark(function e(r,n){var a;return P().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:N.A.FETCH_HUBS_REQUEST}),e.prev=1,e.next=4,Q.fetchAll({userId:t||n().currentUser.user.id});case 4:a=e.sent,r({type:N.A.FETCH_HUBS_SUCCESS,hubs:a.reduce(function(t,e){return t[e.id]=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
1e%2?Z(Object(r),!0).forEach(function(e){(0,j.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({id:e.id},e.attributes()),t},{})}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),r({type:N.A.FETCH_HUBS_FAILURE,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[1,8]])})),function(t,r){return e.apply(this,arguments)}},G=function(t,e){var r;return r=(0,O.A)(P().mark(function r(n){return P().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:N.A.AUTHORIZE_HUB_REQUEST}),r.prev=1,r.next=4,Q.authorize([t],e);case 4:n({type:N.A.AUTHORIZE_HUB_SUCCESS,id:t}),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(1),n({type:N.A.AUTHORIZE_HUB_FAILURE,errorMessage:r.t0.statusText||r.t0.status});case 10:case"end":return r.stop()}},r,null,[[1,7]])})),function(t){return r.apply(this,arguments)}},V=function(t,e){var r;return r=(0,O.A)(P().mark(function r(n){return P().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n({type:N.A.UNAUTHORIZE_HUB_REQUEST}),r.prev=1,r.next=4,Q.unauthorize(t,e);case 4:n({type:N.A.UNAUTHORIZE_HUB_SUCCESS,id:t}),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(1),n({type:N.A.UNAUTHORIZE_HUB_FAILURE,errorMessage:r.t0.statusText||r.t0.status});case 10:case"end":return r.stop()}},r,null,[[1,7]])})),function(t){return r.apply(this,arguments)}},$=function(){return{type:N.A.RESET_HUBS}},X=["adminId"];function K(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function tt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?K(Object(r),!0).forEach(function(e){(0,j.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}let te=(0,n.Ng)(function(t,e){return{label:e.label,placeholder:e.placeholder,adminId:t.administrator.administrator.id,options:t.hubs.hubs,value:Object.keys(t.hubAdminAuthorizedHubs.hubs),fetching:t.hubAdminAuthorizedHubs.fetching,doneFetching:t.hubAdminAuthorizedHubs.doneFetching,fetchError:t.hubAdminAuthorizedHubs.fetchError}},function(t){return(0,S.zH)({queryHubs:z.Br,fetchHubs:W,resetHubs:$,authorizeHub:G,unauthorizeHub:V},t)},function(t,e){var r,n=t.adminId;return tt(tt({},(0,w.A)(t,X)),{},{fetchData:(r=(0,O.A)(P().mark(function t(){return P().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([e.queryHubs(),e.fetchHubs(n)]);case 2:case"end":return t.stop()}},t)})),function(){return r.apply(this,arguments)}),resetData:e.resetHubs,onSelect:function(t){return e.authorizeHub(t,n)},onDeselect:function(t){return e.unauthorizeHub(t,n)}})})((0,D.A)(F));var tr=r(33713),tn=r(39976),ta=r(97044);let ti=(0,n.Ng)(function(t){return{userFeature:t.userFeatures.features,administrator:t.administrator.administrator}},function(t){return(0,S.zH)({enableFeature:ta.Ed,disableFeature:ta.jI,toggleUserFeature:ta.kB,fetchUserFeatures:ta.JR},t)})(function(t){var e=t.label,r=t.type,n=t.userFeature,a=t.administrator,i=t.enableFeature,s=t.disableFeature,o=t.toggleUserFeature,c=t.fetchUserFeatures,l=(0,A.useState)(!1),d=l[0],p=l[1];return(0,A.useEffect)(function(){c(a.id)},[c,a.id]),(0,A.useEffect)(function(){var t=n.show_new_auto_notification_email;t&&"boolean"==typeof t.enabled&&p(t.enabled)},[n.show_new_auto_notification_email]),(0,f.jsxs)(tr.A,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{py:1},children:[(0,f.jsx)(u.A,{variant:"body2",component:"span",sx:{flex:1},children:e}),(0,f.jsx)(tn.A,{id:r,checked:d,onChange:function(t,e){o(r),e?i(r):s(r),p(e)},slotProps:{input:{"aria-label":e}}
1})]})});function ts(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ts=function(){return!!t})()}var to=function(t){function e(){var t,r;return(0,y.default)(this,e),t=e,r=arguments,t=(0,g.default)(t),(0,v.default)(this,ts()?Reflect.construct(t,r||[],(0,g.default)(this).constructor):t.apply(this,r))}return(0,E.default)(e,t),(0,b.default)(e,[{key:"render",value:function(){var t=this.props,e=t.t,r=t.adminRole,n=t.isAutoNotificationFTEnabled,a=t.currentUser;switch(r){case m.ProjectAdmin:return(0,f.jsxs)("div",{children:[(0,f.jsx)(M,{label:e("administrators:administrators.projectAccess"),placeholder:e("administrators:administrators.selectProjects")}),n&&("hub_admin"===a.roleName||"site_admin"===a.roleName)&&(0,f.jsx)(ti,{type:"show_new_auto_notification_email",label:e("administrators:administrators.allowAutoNotify")})]});case m.HubAdmin:return(0,f.jsx)(te,{label:e("administrators:administrators.hubAccess"),placeholder:e("administrators:administrators.selectHubs")});default:return!1}}}])}(A.Component);let tc=(0,o.withTranslation)(["administrators"])(to);var tu=r(77328),tl=r.n(tu),tf=r(98512),td=r(21471),tp=r(50225),th=r(66035),tm=r(40553),ty=r(45911),tb=r(31123),tv=r(82803),tg=r(86085),tE=r(84227);function tA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function tO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tA(Object(r),!0).forEach(function(e){(0,j.default)(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tA(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var tj=/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=^.{8,16}$)/,tw=r(50643);let t_=(0,n.Ng)(function(t){return{administrator:t.administrator.administrator,fetching:t.currentUser.fetching,errors:t.currentUser.errors}},function(t){return(0,S.zH)({resetUserPassword:tw.cw},t)})(function(t){var e=t.resetUserPassword,r=t.fetching,n=t.errors,i=(0,A.useState)(!1),s=i[0],c=i[1],l=(0,A.useState)({}),d=l[0],p=l[1],h=(0,A.useState)({}),m=h[0],y=h[1],b=(0,A.useState)({open:!1,message:"",severity:"success"}),v=b[0],g=b[1],E=(0,A.useRef)(!1),O=(0,o.useTranslation)(["common","administrators"]).t;(0,A.useEffect)(function(){if(!r&&E.current){E.current=!1;var t=Array.isArray(n)?n:n?[n]:[];t.length>0?g({open:!0,message:(0,tE.A)(t),severity:"error"}):(g({open:!0,message:O("administrators:administrators.successMessage"),severity:"success"}),c(!1),p({}),y({}))}},[r,n,O]);var w=function(t,e){p(function(r){return tO(tO({},r),{},(0,j.default)({},t,e))})},_=function(t){var e=d[t];return tj.test(e)?(y(function(e){return tO(tO({},e),{},(0,j.default)({},t,""))}),!0):(y(function(r){return tO(tO({},r),{},(0,j.default)({},t,e?O("administrators:administrators.wrongPasswordFormat"):O("administrators:administrators.emptyField")))}),!1)},P=function(){p({}),y({}),c(!1)},S=[{name:"oldPassword",placeholder:O("administrators:administrators.previousPasswordPlaceholder"),label:O("administrators:administrators.previousPassword")},{name:"newPassword",placeholder:O("administrators:administrators.newPasswordPlaceholder"),label:O("administrators:administrators.newPassword")},{name:"newPasswordConfirmation",placeholder:O("administrators:administrators.confirmPasswordPlaceholder"),label:O("administrators:administrators.confirmPassword")}];return(0,f.jsxs)(a.A,{children:[(0,f.jsx)(u.A,{variant:"subtitle1",sx:{mb:1},children:O("administrators:administrators.changePasswordHeading")}),(0,f.jsx)(td.A,{variant:"outlined",onClick:function(){return c(!0)},children:O("administrators:administrators.changePasswordHeadingSecondary")}),(0,f.jsxs)(tp.A,{open:s,onClose:P,fullWidth:!0,maxWidth:"sm",children:[(0,f.jsxs)(ty.A,{sx:{position:"relative",pr:7},children:[(0,f.jsx)(a.A,{component:"span",children:O("administrators:administrators.changeMyPassword")}),(0,f.jsx)(tb.A,{"aria-label":O("common:common.close"),onClick:P,sx:{position:"absolute",top:8,right:8},children:(0,f.jsx)(tg.A,{})})]}),(0,f.jsx)(tm.A,{children:S.map(function(t){var e=t.name,r=t.label,n=t.placeholder;return(0,f.jsx)(a.A,{sx:{mt:1},children:(0,f.jsx)(T.A,{fullWidth:!0,type:"password",name:e,label:r,placeholder:n,required:!0,value:d[e]||"",onChange:function(t){return w(e,t.target.value)},onBlur:function(){return _(e)},error:!!m[e],helperText:m[e]?m[e]:"newPassword"===e?O("common:common.passwordTip"):void 0,margin:"dense",size:"small"})},e)})}),(0,f.jsxs)(th.A,{sx:{px:3,pb:2},children:[(0,f.jsx)(td.A,{onClick:P,children:O("common:common.cancel")}),(0,f.jsx)(td.A,{variant:"contained",onClick:function(){var t=!1;["oldPassword","newPassword","newPasswordConfirmation"].forEach(function(e){_(e)||(t=!0)}),!t&&(d.newPassword===d.newPasswordConfirmation||(y(function(t){return tO(tO({},t),{},{newPasswordConfirmation:O("administrators:administrators.noMatch")})}),0))&&(E.current=!0,e(d))},disabled:r,children:O("administrators:administrators.changeMyPassword")})]})]}),(0,f.jsx)(tv.A,{open:v.open,autoHideDuration:6e3,onClose:function(){return g(function(t){return tO(tO({},t),{},{open:!1})})},anchorOrigin:{vertical:"bottom",horizontal:"center"},children:(0,f.jsx)(tf.A,{severity:v.severity,variant:"filled",onClose:function(){return g(function(t){return tO(tO({},t),{},{open:!1})})},children:v.message})})]})});var tP=r(18847),tS=r.n(tP)()(function(){return r.e(7336).then(r.bind(r,7336))},{ssr:!1,loading:function(){return(0,f.jsx)(a.A,{display:"flex",justifyContent:"center",py:6,children:(0,f.jsx)(i.A,{})})},loadableGenerated:{webpack:function(){return[7336]}}});let tx=(0,o.withTranslation)(["administrators"])((0,c.withRouter)(function(t){var e,r,n=t.fetchAdministratorError,a=t.fetchSignUpResponseError,i=t.adminRole,o=t.isAutoNotificationFTEnabled,c=t.currentUser,u=t.router,l=t.t;return n||a?(0,f.jsx)(h.default,{}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(tl(),{children:(0,f.jsx)("title",{children:l("administrators:administrators.pageTitle")})}),(0,f.jsx)(tS,{metaContent:(0,f.jsx)(p,{}),panels:(e=[(0,f.jsx)(s.A,{hidePasswordField:!0},"form")],r=[],i!==m.SiteAdmin&&i!==m.BlockedUser&&r.push((0,f.jsx)(tc,{adminRole:i,isAutoNotificationFTEnabled:!!o,currentUser:c},"access")),u.query.page&&r.push((0,f.jsx)(t_,{},"reset")),r.length&&e.push(r),e),primaryPanelMaxWidth:560})]})})),tU=(0,n.Ng)(function(t){return{fetchAdministratorError:t.administrators.fetchError,adminRole:t.administrator.administrator.roleName,currentUser:t.currentUser.user,isAutoNotificationFTEnabled:t.features.features.hasOwnProperty("show_new_auto_notification_email")&&t.features.features.show_new_auto_notification_email.enabled}},function(){return{}})(tx);var tR=r(20640),tT=r(49012),tC=(0,tR.A)((0,tT.A)(tU)),tk=!0;let tH=tC},97044:(t,e,r)=>{"use strict";r.d(e,{jI:()=>O,Ed:()=>A,JR:()=>E,kB:()=>j});var n=r(63857),a=r(60180),i=r.n(a),s=r(42838),o=r(67251),c=r(23745),u=r(29898),l=r(52672),f=r(76966),d=r(42969),p=r(5054),h=r.n(p),m=r(70546),y=r(85150),b=r.n(y);function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(v=function(){return!!t})()}var g=function(t){function e(){var t,r,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.default)(this,e),t=e,r=[a],t=(0,l.default)(t),n=(0,u.default)(this,v()?Reflect.construct(t,r||[],(0,l.default)(this).constructor):t.apply(this,r)),h().call(n,a),n.title=a.title,n.enabled=a.enabled,n.administrator=n.belongsTo(b(),a.administrator),n}
1return(0,f.default)(e,t),(0,c.default)(e,[{key:"constructBaseURL",value:function(){return this.constructor.constructBaseURL({id:this.administrator.id})}},{key:"enable",value:function(){var t=this;return this.constructor.adapter.patch(this.constructBaseURL()+"/"+this.id+"/enable",this.serialize()).catch(function(e){throw t.errors=new m.default(e.data),e})}},{key:"disable",value:function(){var t=this;return this.constructor.adapter.patch(this.constructBaseURL()+"/"+this.id+"/disable",this.serialize()).catch(function(e){throw t.errors=new m.default(e.data),e})}}])}(h());(0,d.default)(g,"_type","user-feature"),(0,d.default)(g,"baseURL","/users/:id/features");var E=function(t){var e;return e=(0,n.A)(i().mark(function e(r){var n;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:s.A.FETCH_USER_ENABLE_FEATURE_REQUEST}),e.prev=1,e.next=4,g.fetchAll({id:t});case 4:n=e.sent,r({type:s.A.FETCH_USER_ENABLE_FEATURE_SUCCESS,features:n}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),r({type:s.A.FETCH_USER_ENABLE_FEATURE_FAILURE,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[1,8]])})),function(t){return e.apply(this,arguments)}},A=function(t){var e;return e=(0,n.A)(i().mark(function e(r,n){var a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:s.A.USER_ENABLE_FEATURE_REQUEST,id:t}),a=new g({administrator:n().administrator.administrator,id:t}),e.prev=2,e.next=5,a.enable();case 5:r({type:s.A.USER_ENABLE_FEATURE_SUCCESS,id:t}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),r({type:s.A.USER_ENABLE_FEATURE_FAILURE,id:t,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[2,8]])})),function(t,r){return e.apply(this,arguments)}},O=function(t){var e;return e=(0,n.A)(i().mark(function e(r,n){var a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r({type:s.A.USER_DISABLE_FEATURE_REQUEST,id:t}),a=new g({administrator:n().administrator.administrator,id:t}),e.prev=2,e.next=5,a.disable();case 5:r({type:s.A.USER_DISABLE_FEATURE_SUCCESS,id:t}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),r({type:s.A.USER_DISABLE_FEATURE_FAILURE,id:t,errorMessage:e.t0.statusText||e.t0.status});case 11:case"end":return e.stop()}},e,null,[[2,8]])})),function(t,r){return e.apply(this,arguments)}},j=function(t){return{type:s.A.TOGGLE_USER_FEATURE,id:t}}}},t=>{t.O(0,[62501,6853,65595,8145,40990,28672,23638,61284,26122,4942,1796,12208,82909,67376,73039,91656,89661,55801,20640,72853,65597,14724,5682,90636,46593,38792],()=>t(t.s=38644)),_N_E=t.O()}]); 2//# sourceMappingURL=[id]-995454591f990f50.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.