1"use strict";(self.webpackChunkelg_catalogue=self.webpackChunkelg_catalogue||[]).push([[6318],{87088:function(e,t,a){a.d(t,{r:function(){return m}});var s,n,i,r,l,c=a(47313),o=["title","titleId"];function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},d.apply(this,arguments)}function u(e,t){if(null==e)return{};var a,s,n=function(e,t){if(null==e)return{};var a,s,n={},i=Object.keys(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function h(e,t){var a=e.title,h=e.titleId,m=u(e,o);return c.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":h},m),s||(s=c.createElement("defs",null,c.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}"))),void 0===a?c.createElement("title",{id:h},"archive-folder"):a?c.createElement("title",{id:h},a):null,n||(n=c.createElement("line",{className:"a",x1:3.75,y1:10.875,x2:20.25,y2:10.875})),i||(i=c.createElement("line",{className:"a",x1:3.75,y1:7.125,x2:20.25,y2:7.125})),r||(r=c.createElement("line",{className:"a",x1:3.75,y1:3.375,x2:20.25,y2:3.375})),l||(l=c.createElement("path",{className:"a",d:"M22.5,14.625H15a3,3,0,0,1-6,0H1.5a.75.75,0,0,0-.75.75v3.75a1.5,1.5,0,0,0,1.5,1.5h19.5a1.5,1.5,0,0,0,1.5-1.5v-3.75A.75.75,0,0,0,22.5,14.625Z"})))}var m=c.forwardRef(h);t.Z=a.p+"static/media/archive-folder.80fe617ec227d972b9264d7bca06fedf.svg"},55345:function(e,t,a){a.d(t,{r:function(){return p}});var s,n,i,r,l,c,o=a(47313),d=["title","titleId"];function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},u.apply(this,arguments)}function h(e,t){if(null==e)return{};var a,s,n=function(e,t){if(null==e)return{};var a,s,n={},i=Object.keys(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function m(e,t){var a=e.title,m=e.titleId,p=h(e,d);return o.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":m},p),s||(s=o.createElement("defs",null,o.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}"))),void 0===a?o.createElement("title",{id:m},"filter-text"):a?o.createElement("title",{id:m},a):null,n||(n=o.createElement("path",{className:"a",d:"M14.247,5.25h7.5a1.5,1.5,0,0,1,1.5,1.5v15a1.5,1.5,0,0,1-1.5,1.5H8.247a1.5,1.5,0,0,1-1.5-1.5v-6"})),i||(i=o.createElement("line",{className:"a",x1:12.747,y1:9.75,x2:20.25,y2:9.75})),r||(r=o.createElement("line",{className:"a",x1:10.497,y1:14.25,x2:20.25,y2:14.25})),l||(l=o.createElement("line",{className:"a",x1:10.5,y1:18.75,x2:20.25,y2:18.75})),c||(c=o.createElement("path",{className:"a",d:"M8.25,9.75v-3l4.189-4.189A1.061,1.061,0,0,0,11.689.75H1.811a1.061,1.061,0,0,0-.75,1.811L5.25,6.75v6Z"})))}var p=o.forwardRef(m);a.p},32456:function(e,t,a){a.d(t,{r:function(){return C}});var s,n,i,r,l,c,o,d,u,h,m,p,f,x,y,g,v,_,j,Z=a(47313),k=["title","titleId"];function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},b.apply(this,arguments)}function S(e,t){if(null==e)return{};var a,s,n=function(e,t){if(null==e)return{};var a,s,n={},i=Object.keys(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function w(e,t){var a=e.title,w=e.titleId,C=S(e,k);return Z.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":w},C),s||(s=Z.createElement("defs",null,Z.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}"))),void 0===a?Z.createElement("title",{id:w}
1,"human-resources-team-settings"):a?Z.createElement("title",{id:w},a):null,n||(n=Z.createElement("circle",{className:"a",cx:4.504,cy:17.625,r:2.625})),i||(i=Z.createElement("path",{className:"a",d:"M8.254,23.25a4.25,4.25,0,0,0-7.5,0"})),r||(r=Z.createElement("circle",{className:"a",cx:19.504,cy:17.625,r:2.625})),l||(l=Z.createElement("path",{className:"a",d:"M23.254,23.25a4.25,4.25,0,0,0-7.5,0"})),c||(c=Z.createElement("circle",{className:"a",cx:12.004,cy:3.375,r:2.625})),o||(o=Z.createElement("path",{className:"a",d:"M15.253,8.25a4.269,4.269,0,0,0-6.5,0"})),d||(d=Z.createElement("path",{className:"a",d:"M9.055,19.707A8.28,8.28,0,0,0,15,19.689"})),u||(u=Z.createElement("path",{className:"a",d:"M6.353,6a8.216,8.216,0,0,0-2.6,6c0,.253.015.5.038.75"})),h||(h=Z.createElement("path",{className:"a",d:"M20.216,12.75c.023-.248.038-.5.038-.75a8.216,8.216,0,0,0-2.6-6"})),m||(m=Z.createElement("circle",{className:"a",cx:12.004,cy:13.5,r:2.25})),p||(p=Z.createElement("line",{className:"a",x1:14.254,y1:13.5,x2:15.754,y2:13.5})),f||(f=Z.createElement("line",{className:"a",x1:8.254,y1:13.5,x2:9.754,y2:13.5})),x||(x=Z.createElement("line",{className:"a",x1:12.004,y1:15.75,x2:12.004,y2:17.25})),y||(y=Z.createElement("line",{className:"a",x1:12.004,y1:9.75,x2:12.004,y2:11.25})),g||(g=Z.createElement("line",{className:"a",x1:13.595,y1:15.091,x2:14.656,y2:16.151})),v||(v=Z.createElement("line",{className:"a",x1:9.352,y1:10.848,x2:10.413,y2:11.909})),_||(_=Z.createElement("line",{className:"a",x1:10.413,y1:15.091,x2:9.352,y2:16.151})),j||(j=Z.createElement("line",{className:"a",x1:14.656,y1:10.848,x2:13.595,y2:11.909})))}var C=Z.forwardRef(w);t.Z=a.p+"static/media/human-resources-team-settings.ad8ec72fc7cc0ee37d036e36c09588a0.svg"},42724:function(e,t,a){a(47313);t.Z=a.p+"static/media/blur_linear_yellow.c598ace6f1ba2083aa3a7d3b9567d577.svg"},95539:function(e,t,a){a.r(t),a.d(t,{default:function(){return zt}});var s,n,i,r,l,c,o,d=a(1413),u=a(15671),h=a(43144),m=a(60136),p=a(29388),f=a(47313),x=a(63830),y=a(74700),g=a(68225),v=a(93433),_=a(31881),j=a.n(_),Z=a(67393),k=a(21144),b=a(57009),S=a(82277),w=a(97326),C=a(11409),N=a(96083),F=a(46417),R=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).state={keycloak:e.keycloak,UserRoles:[]},s.isAuthorizedToView=s.isAuthorizedToView.bind((0,w.Z)(s)),s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){var e=this.props.keycloak;this.setState({UserRoles:(0,C.A4)(e)})}},{key:"isAuthorizedToView",value:function(e){var t=!1;return C.qi.forEach((function(a){e.includes(a)&&(t=!0)})),t}},{key:"render",value:function(){var e=this.props,t=e.status,a=e.xSize,s=e.unpublication_requested,n=void 0!==s&&s;return 0===!this.state.UserRoles.length?(0,F.jsx)("div",{}):this.isAuthorizedToView(this.state.UserRoles)?!0===n?(0,F.jsx)(k.Z,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",children:(0,F.jsx)(k.Z,{item:!0,xs:a,children:(0,F.jsx)(N.Z,{size:"small",label:"requested for unpublish",className:"ChipTagYellowOutlined"})})}):(0,F.jsx)(k.Z,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"center",children:(0,F.jsxs)(k.Z,{item:!0,xs:a,children:[("p"===t||"published"===t)&&(0,F.jsx)(N.Z,{size:"small",label:y.Z.published_tag,className:"ChipTagGreenOutlined"}),("g"===t||"ingested"===t)&&(0,F.jsx)(N.Z,{size:"small",label:y.Z.ingested_tag,className:"ChipTagDarkPinkOutlined"}),("i"===t||"internal"===t)&&(0,F.jsx)(N.Z,{size:"small",label:y.Z.internal_tag,className:"ChipTagPinkOutlined"}),("d"===t||"draft"===t)&&(0,F.jsx)(N.Z,{size:"small",label:y.Z.draft_tag,className:"ChipTagLightPinkOutlined"})]})}):(0,F.jsx)("div",{})}}]),a}(f.Component),A=["title","titleId"];function K(){return K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},K.apply(this,arguments)}function I(e,t){if(null==e)return{};var a,s,n=function(e,t){if(null==e)return{};var a,s,n={},i=Object.keys(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function L(e,t){var a=e.title,d=e.titleId,u=I(e,A);return f.createElement("svg",K({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":d},u),s||(s=f.createElement("defs",null,f.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}"))),void 0===a?f.createElement("title",{id:d},"calendar-clock"):a?f.createElement("title",{id:d},a):null,n||(n=f.createElement("path",{className:"a",d:"M8.25,17.25h-6a1.5,1.5,0,0,1-1.5-1.5v-12a1.5,1.5,0,0,1,1.5-1.5h13.5a1.5,1.5,0,0,1,1.5,1.5v4.5"})),i||(i=f.createElement("line",{className:"a",x1:.75,y1:6.75,x2:17.25,y2:6.75})),r||(r=f.createElement("line",{className:"a",x1:5.25,y1:3.75,x2:5.25,y2:.75})),l||(l=f.createElement("line",{className:"a",x1:12.75,y1:3.75,x2:12.75,y2:.75}
1)),c||(c=f.createElement("circle",{className:"a",cx:17.25,cy:17.25,r:6})),o||(o=f.createElement("polyline",{className:"a",points:"19.902 17.25 17.25 17.25 17.25 14.599"})))}var D,T,O,U,E,B,M,z,P,V=f.forwardRef(L),q=(a.p,["title","titleId"]);function W(){return W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},W.apply(this,arguments)}function G(e,t){if(null==e)return{};var a,s,n=function(e,t){if(null==e)return{};var a,s,n={},i=Object.keys(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(s=0;s<i.length;s++)a=i[s],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function J(e,t){var a=e.title,s=e.titleId,n=G(e,q);return f.createElement("svg",W({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:t,"aria-labelledby":s},n),D||(D=f.createElement("defs",null,f.createElement("style",null,".a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}"))),void 0===a?f.createElement("title",{id:s},"calendar-refresh"):a?f.createElement("title",{id:s},a):null,T||(T=f.createElement("path",{className:"a",d:"M8.25,17.25h-6a1.5,1.5,0,0,1-1.5-1.5v-12a1.5,1.5,0,0,1,1.5-1.5h13.5a1.5,1.5,0,0,1,1.5,1.5v4.5"})),O||(O=f.createElement("line",{className:"a",x1:.75,y1:6.75,x2:17.25,y2:6.75})),U||(U=f.createElement("line",{className:"a",x1:5.25,y1:3.75,x2:5.25,y2:.75})),E||(E=f.createElement("line",{className:"a",x1:12.75,y1:3.75,x2:12.75,y2:.75})),B||(B=f.createElement("polyline",{className:"a",points:"15 18.75 11.25 18.75 11.25 22.5"})),M||(M=f.createElement("path",{className:"a",d:"M22.667,19.484a5.573,5.573,0,0,1-10.74-.734"})),z||(z=f.createElement("polyline",{className:"a",points:"19.5 15.75 23.25 15.75 23.25 12"})),P||(P=f.createElement("path",{className:"a",d:"M11.833,15.017a5.572,5.572,0,0,1,10.74.733"})))}var Y=f.forwardRef(J),Q=(a.p,a(3873)),H=a(34960),X=a(1441),$=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleClick=function(e){s.setState({anchorEl:e.currentTarget})},s.handleClose=function(){s.setState({anchorEl:!1})},s.handleCheck=function(e){e.target.checked?s.props.addCheckedResource2List(s.state.resourceData):s.props.removeResourceFromCheckedList(s.state.resourceData)},s.convertData=function(e){var t={pk:e.id,management_object:{unpublication_requested:e.unpublication_requested,under_construction:e.under_construction,size:e.size,status:"",is_active_version:"",is_latest_version:"",functional_service:""},described_entity:{field_value:{entity_type:{field_value:{en:""}},project_name:{field_value:{en:""}},organization_name:{field_value:{en:""}},resource_name:{field_value:{en:""}},lr_subclass:{field_value:{lr_type:{field_value:""}}}}}};return"internal"===e.status?t.management_object.status="i":"draft"===e.status?t.management_object.status="d":"published"===e.status?t.management_object.status="p":"ingested"===e.status&&(t.management_object.status="g"),e.entity_type===C.yM?(t.described_entity.field_value.entity_type.field_value=C.yM,t.described_entity.field_value.project_name.field_value={en:e.resource_name}):e.resource_type===C.e6||"ToolService"===e.resource_type?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value="ToolService",t.described_entity.field_value.resource_name.field_value={en:e.resource_name},t.management_object.is_active_version=e.is_active_version,t.management_object.is_latest_version=e.is_latest_version,t.management_object.functional_service=e.elg_compatible_service):e.resource_type===C.p?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value=C.p,t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.resource_type===C.CD||"LexicalConceptualResource"===e.resource_type?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value="LexicalConceptualResource",t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.resource_type===C.LD||e.resource_type===C.jO||e.resource_type===C.AM||e.resource_type===C.wG||e.resource_type===C.jf?(t.de
1scribed_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value="LanguageDescription",t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.entity_type===C.Eq&&(t.described_entity.field_value.entity_type.field_value=C.Eq,t.described_entity.field_value.organization_name.field_value={en:e.resource_name}),t},s.state={resourceData:e.resource,expanded:!1,expandedLang:!1,expandedLicence:!1,keycloak:e.keycloak,anchorEl:!1,loading:!1},s}return(0,h.Z)(a,[{key:"navigateToResourceDetail",value:function(e){if("draft"!==e.status){var t=(0,C._Q)(e);t&&this.props.history.push({pathname:t})}}},{key:"render",value:function(){var e=this,t=this.state.resourceData,a=t.curator===(0,C.kh)(this.state.keycloak),s=t.legal_validator===(0,C.kh)(this.state.keycloak),n=t.metadata_validator===(0,C.kh)(this.state.keycloak),i=t.technical_validator===(0,C.kh)(this.state.keycloak),r=!1;(C.b.includes(t.resource_type)||C.b.includes(t.entity_type))&&(r=!0);var l=this.convertData(t);return(0,F.jsx)(f.Fragment,{children:(0,F.jsx)(S.Z,{className:"DashboardListItem",children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:1,justifyContent:"space-between",alignItems:"center",className:"ResourceListItem--inner",children:[(0,F.jsx)(k.Z,{item:!0,xs:1,children:""!==t.status&&!r&&(0,F.jsx)(H.Z,{checked:!!(this.props.checkedList.find((function(e){return e.id===t.id}))&&this.props.checkedList.find((function(e){return e.id===t.id})).id>=0),size:"small",onChange:function(t){e.handleCheck(t)}})}),(0,F.jsxs)(k.Z,{item:!0,xs:7,children:[(0,F.jsx)(b.Z,{variant:"h5",className:"draft"===t.status||r?"":"ResourceListTitle",onClick:function(){return r?function(){}:e.navigateToResourceDetail(t)},children:t.resource_name}),t.version&&"undefined"!==t.version&&(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"caption",className:"grey--font",children:["Version: ",t.version]})}),(0,F.jsxs)(k.Z,{item:!0,direction:"column",container:!0,justifyContent:"flex-start",alignItems:"flex-start",className:"pt-05 pb-05",children:[(0,F.jsxs)(k.Z,{item:!0,children:[(0,F.jsx)(V,{className:"xsmall-icon mr-02"}),(0,F.jsxs)(b.Z,{variant:"caption",children:["Created:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.creation_date))," "]})]}),(0,F.jsxs)(k.Z,{item:!0,children:[(0,F.jsx)(Y,{className:"xsmall-icon mr-02"}),(0,F.jsxs)(b.Z,{variant:"caption",children:["Updated:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.last_date_updated))]})]}),(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsx)(b.Z,{variant:"caption",className:"grey--font",children:"LanguageResource"!==t.entity_type?t.entity_type:t.resource_type})}),(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsx)(R,{status:t.status,unpublication_requested:t.unpublication_requested,xSize:12,keycloak:this.state.keycloak})})]})]}),(0,F.jsx)(k.Z,{item:!0,container:!0,justifyContent:"center",alignItems:"center",xs:4,className:"container-align-center",children:this.state.loading?(0,F.jsx)(Q.Z,{}):r?(0,F.jsx)(F.Fragment,{}):(0,F.jsx)(X.Z,{keycloak:this.state.keycloak,isOwner:a,isLegalValidator:s,isMetadataValidator:n,isTechnicalValidator:i,pk:l.pk,data:l,className:"inner-actions-link-no--border--teal",updateRecord:this.props.updateRecords})})]})})})}}]),a}(f.Component),ee=(0,x.EN)($),te=a(11652),ae=a(20337),se=a(58318),ne=a(39402),ie=a(9930),re=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).toggleloadMoreCurators=function(){5===s.state.itemsToShowCurators?s.setState({itemsToShowCurators:s.props.facets._filter_curator.curator.buckets.length,expandedCurators:!0}):s.setState({itemsToShowCurators:5,expandedCurators:!1})},s.handleCurator=function(e,t,a){var n=a.indexOf(t),i="curator__term="+t;-1===n?(s.props.markFacetAsSelected(t),s.props.onSelectKeyword(i)):s.handleUnselected(n,i)},s.state={expandedResourceType:!1,expandedStatus:!1,itemsToShowResourceType:10,itemsToShowStatus:5,itemsToShowCurators:5,expandedCurators:!1,searchKeyword:""},s.toggleloadMoreResourceType=s.toggleloadMoreResourceType.bind((0,w.Z)(s)),s.toggleloadMoreStatus=s.toggleloadMoreStatus.bind((0,w.Z)(s)),s.handleResourceTypeSearch=s.handleResourceTypeSearch.bind((0,w.Z)(s)),s.handleStatusSearch=s.handleStatusSearch.bind((0,w.Z)(s)),s.clearAllFilters=s.clearAllFilters.bind((0,w.Z)(s)),s.handleUnselected=s.handleUnselected.bind((0,w.Z)(s)),s.handleUserSubmit=s.handleUserSubmit.bind((0,w.Z)(s)),s}return(0,h.Z)(a,[{key:"toggleloadMoreResourceType",value:function(){3===this.state.itemsToShowResourceType?this.setState({itemsToShowResourceType:this.props.facets._filter_resource_type.resource_type.buckets.length,expandedRes
1ourceType:!0}):this.setState({itemsToShowResourceType:3,expandedResourceType:!1})}},{key:"toggleloadMoreStatus",value:function(){3===this.state.itemsToShowStatus?this.setState({itemsToShowStatus:this.props.facets._filter_status.status.buckets.length,expandedStatus:!0}):this.setState({itemsToShowStatus:3,expandedStatus:!1})}},{key:"handleUnselected",value:function(e,t){this.props.handleUnselectedFacet(e),this.props.unselectFacet(t)}},{key:"handleResourceTypeSearch",value:function(e,t,a){var s=a.indexOf(t),n="resource_type__term="+t;-1===s?(this.props.markFacetAsSelected(t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleUnpublicationRequested",value:function(e,t,a){var s=a.indexOf("unpublication_requested__term"+t),n="unpublication_requested__term="+t;-1===s?(this.props.markFacetAsSelected("unpublication_requested__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleStatusSearch",value:function(e,t){var a=t.indexOf(e),s="status__term="+e;-1===a?(this.props.markFacetAsSelected(e),this.props.onSelectKeyword(s)):this.handleUnselected(a,s)}},{key:"handlelegally_valid",value:function(e,t,a){var s=a.indexOf("legally_valid__term"+t),n="legally_valid__term="+t;-1===s?(this.props.markFacetAsSelected("legally_valid__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handletechnically_valid",value:function(e,t,a){var s=a.indexOf("technically_valid__term"+t),n="technically_valid__term="+t;-1===s?(this.props.markFacetAsSelected("technically_valid__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handlemetadata_valid",value:function(e,t,a){var s=a.indexOf("metadata_valid__term"+t),n="metadata_valid__term="+t;-1===s?(this.props.markFacetAsSelected("metadata_valid__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleValidatorAssignmentRequired",value:function(e,t,a){var s=a.indexOf("validator_assignment_required__term"+t),n="validator_assignment_required__term="+t;-1===s?(this.props.markFacetAsSelected("validator_assignment_required__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handlefunctional_service",value:function(e,t,a){var s=a.indexOf("functional_service__term"+t),n="functional_service__term="+t;-1===s?(this.props.markFacetAsSelected("functional_service__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleHasData",value:function(e,t,a){var s=a.indexOf("has_data__term"+t),n="has_data__term="+t;-1===s?(this.props.markFacetAsSelected("has_data__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleUserSubmit",value:function(e,t){e.preventDefault();var a=t.indexOf("username"),s=this.state.username,n="username="+s;s.trim()&&-1===a?(this.props.markFacetAsSelected("username"),this.props.onSelectKeyword(n)):this.handleUnselected(a,n)}},{key:"handleservice_status",value:function(e,t,a){var s=a.indexOf("service_status__term"+t),n="service_status__term="+t;-1===s?(this.props.markFacetAsSelected("service_status__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleLicence",value:function(e,t,a){var s=a.indexOf("licence__term"+t),n="licence__term="+t;-1===s?(this.props.markFacetAsSelected("licence__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"handleresubmitted",value:function(e,t,a){var s=a.indexOf("resubmitted__term"+t),n="resubmitted__term="+t;-1===s?(this.props.markFacetAsSelected("resubmitted__term"+t),this.props.onSelectKeyword(n)):this.handleUnselected(s,n)}},{key:"clearAllFilters",value:function(){this.setState({expandedResourceType:!1,expandedStatus:!1,itemsToShowResourceType:10,itemsToShowStatus:5,itemsToShowCurators:5,expandedCurators:!1,searchKeyword:""}),this.props.onClearAllSearchFilters()}},{key:"render",value:function(){var e=this,t=this.props.facets,a=this.state,s=a.itemsToShowResourceType,n=a.itemsToShowStatus,i=this.props.selectedFacets||[],r=[];return i.forEach((function(e){r.push(decodeURIComponent(e))})),(0,F.jsxs)("div",{style:{marginTop:"1em"},children:[r.length>0&&(0,F.jsxs)("div",{style:{marginBottom:"1em"}
1,children:[" ",(0,F.jsx)(ae.Z,{classes:{root:"inner-link-outlined--teal"},endIcon:(0,F.jsx)(se.Z,{}),onClick:function(){return e.clearAllFilters()},children:(0,F.jsx)(Z.Z,{id:"facetsComponent.clearAllFilters",defaultMessage:y.Z.dashoard_items_clear_filters})})," "]}),t._filter_curator&&t._filter_curator.curator.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.curator",defaultMessage:y.Z.dashboard_curator_facet})}),(0,F.jsxs)("ul",{className:"facets-list",children:[t._filter_curator.curator.buckets.slice(0,this.state.itemsToShowCurators).map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handleCurator(a,t.key,r)},children:[-1!==r.indexOf(t.key)?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)})),t._filter_curator.curator.buckets.length>5&&(0,F.jsx)("div",{className:"ShowMore",children:(0,F.jsx)(te.Z,{component:"button",onClick:this.toggleloadMoreCurators,children:this.state.expandedCurators?(0,F.jsx)("span",{children:(0,F.jsx)(Z.Z,{id:"facetsComponent.showLess",defaultMessage:y.Z.show_less})}):(0,F.jsx)("span",{children:(0,F.jsx)(Z.Z,{id:"facetsComponent.showMore",defaultMessage:y.Z.show_more})})})})]})]}),t._filter_resource_type&&t._filter_resource_type.resource_type.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.items",defaultMessage:y.Z.dashboard_items_facet})}),(0,F.jsxs)("ul",{className:"facets-list",children:[t._filter_resource_type.resource_type.buckets.slice(0,s).map((function(t,a){return(0,F.jsxs)("li",{className:C.b.includes(t.key)?"":"FacetButton",button:"true",onClick:function(a){return C.b.includes(t.key)?void 0:e.handleResourceTypeSearch(a,t.key,r)},children:[-1!==r.indexOf(t.key)?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)})),t._filter_resource_type.resource_type.buckets.length>10&&(0,F.jsx)("div",{className:"ShowMore",children:(0,F.jsx)(te.Z,{component:"button",onClick:this.toggleloadMoreResourceType,children:this.state.expandedResourceType?(0,F.jsx)("span",{children:(0,F.jsx)(Z.Z,{id:"facetsComponent.showLess",defaultMessage:y.Z.show_less})}):(0,F.jsx)("span",{children:(0,F.jsx)(Z.Z,{id:"facetsComponent.showMore",defaultMessage:y.Z.show_more})})})})]})]}),t._filter_status&&t._filter_status.status.buckets.length>0&&!(1===t._filter_status.status.buckets.length&&"LanguageResource"===t._filter_status.status.buckets[0].key)&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.status",defaultMessage:y.Z.dashboard_status_facet})}),(0,F.jsxs)("ul",{className:"facets-list",children:[t._filter_status.status.buckets.slice(0,n).map((function(t,a){return"LanguageResource"!==t.key&&(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(){return e.handleStatusSearch(t.key,r)},children:[-1!==r.indexOf(t.key)?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),"published"===t.key&&(0,F.jsxs)("span",{className:"FacetText",children:[" ",y.Z.published_tag]}),"internal"===t.key&&(0,F.jsxs)("span",{className:"FacetText",children:[" ",y.Z.internal_tag]}),"ingested"===t.key&&(0,F.jsxs)("span",{className:"FacetText",children:[" ",y.Z.ingested_tag]}),"published"!==t.key&&"internal"!==t.key&&"ingested"!==t.key&&(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)})),t._filter_status.status.buckets.length>5&&(0,F.jsx)("div",{className:"ShowMore",children:(0,F.jsx)(te.Z,{component:"button",onClick:this.toggleloadMoreStatus,children:this.state.expandedStatus?(0,F.jsx)("span",{children:(0,F.jsx)(Z.Z,{id:"facetsComponent.showLess",defaultMessage:y.Z.show_less})}):(0,F.jsx)("span",{children:(0,F.jsx)(Z.Z,{id:"facetsComponent.showMore",defaultMessage:y.Z.show_more})})})})]})]}),t._filter_functional_service&&t._filter_functional_service.functional_service.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.functional_service",defaultMessage:y.Z.dashboard_functional_service_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_functional_service.functional_service.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handlefunctional_service(a,t.key_as_string,r)},children:[-1!==r.indexOf("functional_service__term".concat(t.key_as_string))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ","false"===t.key_as_string?"no":"yes"," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key_as_string)}))})]}),t._filter_service_status&&t._filter_service_status.service_status.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.service_status",defaultMessage:y.Z.dashboard_service_status_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_service_status.service_status.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handleservice_status(a,t.key,r)},children:[-1!==r.indexOf("service_status__term".concat(t.key))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}
1),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)}))})]}),t._filter_has_data&&t._filter_has_data.has_data.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.hasdata",defaultMessage:y.Z.dashboard_hasdata_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_has_data.has_data.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handleHasData(a,t.key_as_string,r)},children:[-1!==r.indexOf("has_data__term".concat(t.key_as_string))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ","false"===t.key_as_string?"no":"yes"," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key_as_string)}))})]}),t._filter_validator_assignment_required&&t._filter_validator_assignment_required.validator_assignment_required.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.validation",defaultMessage:y.Z.dashboard_validation_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_validator_assignment_required.validator_assignment_required.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handleValidatorAssignmentRequired(a,t.key_as_string,r)},children:[-1!==r.indexOf("validator_assignment_required__term".concat(t.key_as_string))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ","false"===t.key_as_string?"no":"yes"," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key_as_string)}))})]}),t._filter_resubmitted&&t._filter_resubmitted.resubmitted.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.resubmitted",defaultMessage:y.Z.dashboard_resubmitted_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_resubmitted.resubmitted.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handleresubmitted(a,t.key_as_string,r)},children:[-1!==r.indexOf("resubmitted__term".concat(t.key_as_string))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key_as_string," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key_as_string)}))})]}),t._filter_technically_valid&&t._filter_technically_valid.technically_valid.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.technically_valid",defaultMessage:y.Z.dashboard_technically_valid_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_technically_valid.technically_valid.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handletechnically_valid(a,t.key,r)},children:[-1!==r.indexOf("technically_valid__term".concat(t.key))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)}))})]}),t._filter_metadata_valid&&t._filter_metadata_valid.metadata_valid.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.metadata_valid",defaultMessage:y.Z.dashboard_metadata_valid_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_metadata_valid.metadata_valid.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handlemetadata_valid(a,t.key,r)},children:[-1!==r.indexOf("metadata_valid__term".concat(t.key))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}
1),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)}))})]}),t._filter_legally_valid&&t._filter_legally_valid.legally_valid.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myitemsfacetsComponent.legally_valid",defaultMessage:y.Z.dashboard_legally_valid_facet})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_legally_valid.legally_valid.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handlelegally_valid(a,t.key,r)},children:[-1!==r.indexOf("legally_valid__term".concat(t.key))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)}))})]}),t._filter_licence&&t._filter_licence.licence.buckets.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("h5",{className:"bold ml-05",children:(0,F.jsx)(Z.Z,{id:"myDownloads.licence",defaultMessage:"Licence"})}),(0,F.jsx)("ul",{className:"facets-list",children:t._filter_licence.licence.buckets.map((function(t,a){return(0,F.jsxs)("li",{className:"FacetButton",button:"true",onClick:function(a){return e.handleLicence(a,t.key,r)},children:[-1!==r.indexOf("licence__term".concat(t.key))?(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ne.Z,{})]}):(0,F.jsxs)("span",{className:"FacetIcon",children:[" ",(0,F.jsx)(ie.Z,{})]}),(0,F.jsxs)("span",{className:"FacetText",children:[" ",t.key," "]}),(0,F.jsxs)("span",{className:"count",children:[" (",t.doc_count,") "]})]},t.key)}))})]})]})}}]),a}(f.Component),le=a(5684),ce=a(87527),oe=a(51505),de=a(24241),ue=a(31091),he=a(97593),me=a(90182),pe=a(25734),fe=a(6085),xe=a(73002),ye=a(2297),ge=a(14069),ve=a(35154),_e=a(78371),je=a(38390),Ze=a(95939),ke=a(83648),be=a(10367),Se=a(8512);var we=a.p+"static/media/toolservice.5b6bbddc48484d636024866ac0d8de60.svg";var Ce=a.p+"static/media/resource.f4f164946c8dd594f8fd59c790f41c74.svg",Ne=a(87088),Fe=a(42724),Re=a(14632),Ae=a(32456),Ke=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"22px";switch(e.resource_type){case C.e6:return(0,F.jsx)("img",{src:we,alt:e.resource_type});case"Corpus":return(0,F.jsx)("img",{src:Ce,alt:e.resource_type});case"Organization":return(0,F.jsx)("img",{width:t,height:a,src:Re.Z,alt:e.resource_type});case"Project":return(0,F.jsx)("img",{width:t,height:a,src:Ae.Z,alt:e.resource_type});case C.CD:return(0,F.jsx)("img",{width:t,height:a,src:Ne.Z,alt:e.resource_type});case C.LD:case C.jO:case C.AM:case C.jf:case C.wG:return(0,F.jsx)("img",{width:t,height:a,src:Fe.Z,alt:e.resource_type});default:return!1}},Ie=a(50882),Le=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleMultipleIngest=function(){s.setState({loading:!0});var e=s.state.internal_items.map((function(e){return e.id})).join(",");j().patch((0,be.BK)(e)).then((function(e){s.success("Records submited successfully.",e)})).catch((function(e){s.failure("Records submission failed.",e)}))},s.success=function(e,t){s.setState({loading:!1}),Se.Am.success(e,{autoClose:3500}),s.disableDisplay();try{t&&t.data&&t.data.length>0&&s.props.updateRecords(t.data)}catch(a){}},s.failure=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Se.Am.error(e,{autoClose:3500}),s.setState({loading:!1}),s.disableDisplay();try{t&&t.response&&t.response.data,console.log(t)}catch(a){console.log(t)}},s.disableDisplay=function(){s.setState({displayDialog:!1}),s.props.clearSelect("")},s.state={displayDialog:!0,loading:!1,internal_items:s.props.internal_items},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t=this;if(0===this.state.internal_items.length)return(0,F.jsx)(F.Fragment,{});var a=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return!t.state.internal_items.includes(e)})))||[];return(0,F.jsx)("div",{children:(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",disableBackdropClick:!0,maxWidth:"lg",children:[!this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" You are about to ",y.Z.editor_action_ingest_primary," the following records."]}),this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" Please wait while we are submitting for publication the following records. ",(0,F.jsx)(Q.Z,{size:20})]}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsx)(je.Z,{component:"div",children:this.state.internal_items.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))}),a.length>0&&(0,F.jsx)(je.Z,{component:"div",children:(0,F.jsxs)("div",{children:[(0,F.jsx)("hr",{}),(0,F.jsx)(b.Z,{variant:"h5",style:{marginBottom:"10px"},children:y.Z.editor_bulk_ingest}),a.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))]})})]}),(0,F.jsx)("hr",{}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:this.disableDisplay,autoFocus:!0,children:y.Z.dialog_validationResponse_close_button}),(0,F.jsxs)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:function(){return t.handleMultipleIngest()},children:[(0,F.jsx)(ke.r,{className:"xsmall-icon"}),y.Z.editor_action_ingest_secondary]})]})]})})}}]),a}(f.Component),De=a(72728),Te=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleMultipleUnpublish=function(){s.setState({loading:!0});var e=s.state.published_items.map((function(e){return e.id})).join(",");j().patch((0,be.ME)(e),{reason:s.state.reason}).then((function(e){s.success("Your request to unpublish the selected records was submitted successfully.",e)}
1)).catch((function(e){s.failure("Your request to unpublish the selected records was failed.",e)}))},s.success=function(e,t){s.setState({loading:!1}),Se.Am.success(e,{autoClose:3500}),s.disableDisplay();try{t&&t.data&&t.data.length>0&&s.props.updateRecords(t.data)}catch(a){}},s.failure=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Se.Am.error(e,{autoClose:3500}),s.setState({loading:!1}),s.disableDisplay();try{t&&t.response&&t.response.data,console.log(t)}catch(a){console.log(t)}},s.disableDisplay=function(){s.setState({displayDialog:!1}),s.props.clearSelect("")},s.state={displayDialog:!0,loading:!1,published_items:s.props.published_items,reason:""},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t=this;if(0===this.state.published_items.length)return(0,F.jsx)(F.Fragment,{});var a=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return!t.state.published_items.includes(e)})))||[];return(0,F.jsx)("div",{children:(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",disableBackdropClick:!0,maxWidth:"lg",children:[!this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" You are about to send a ",y.Z.editor_action_unpublish_primary," the following records."]}),this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" Please wait while your request submission is in progress. ",(0,F.jsx)(Q.Z,{size:20})]}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsxs)(je.Z,{component:"div",children:[this.state.published_items.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:10,children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))})),(0,F.jsx)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:(0,F.jsx)(k.Z,{item:!0,xs:12,children:(0,F.jsx)(De.Z,{className:"pb-3 wd-100",minRows:10,multiline:!0,required:!0,label:"Unpublication request reason",placeholder:"Unpublication request reason",variant:"outlined",helperText:(0,F.jsx)("span",{children:"Please specify the reason for your unpublication request."}),value:this.state.reason,onChange:function(e){t.setState({reason:e.target.value})}})})})]}),a.length>0&&(0,F.jsx)(je.Z,{component:"div",children:(0,F.jsxs)("div",{children:[(0,F.jsx)("hr",{}),(0,F.jsx)(b.Z,{variant:"h5",style:{marginBottom:"10px"},children:y.Z.editor_bulk_ingest}),a.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:10,children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,unpublication_requested:e.unpublication_requested,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))]})})]}),(0,F.jsx)("hr",{}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:this.disableDisplay,autoFocus:!0,children:y.Z.dialog_validationResponse_close_button}),(0,F.jsxs)(ae.Z,{color:"primary",disabled:this.state.loading||!this.state.reason,onClick:function(){return t.handleMultipleUnpublish()},children:[(0,F.jsx)(ke.r,{className:"xsmall-icon"}),y.Z.editor_action_unpublish_secondary]})]})]})})}}]),a}(f.Component),Oe=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleMultipleDelete=function(){s.setState({loading:!0});var e=s.state.internal_and_draft_items.map((function(e){return e.id})).join(",");j().patch((0,be.ec)(e)).then((function(e){s.success("Records deleted successfully.",e)})).catch((function(e){s.failure("Records deletion failed.",e)}))},s.success=function(e,t){s.setState({loading:!1}),Se.Am.success(e,{autoClose:3500}),s.disableDisplay();try{t&&t.data&&t.data.length>0&&s.props.updateRecords(t.data)}catch(a){}},s.failure=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Se.Am.error(e,{autoClose:3500}),s.setState({loading:!1}),s.disableDisplay();try{t&&t.response&&t.response.data,console.log(t)}catch(a){console.log(t)}},s.disableDisplay=function(){s.setState({displayDialog:!1}),s.props.clearSelect("")},s.state={displayDialog:!0,loading:!1,internal_and_draft_items:s.props.internal_and_draft_items},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t=this;if(0===this.state.internal_and_draft_items.length)return(0,F.jsx)(F.Fragment,{});var a=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return!t.state.internal_and_draft_items.includes(e)})))||[];return(0,F.jsxs)("div",{children:[(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",disableBackdropClick:!0,maxWidth:"lg",children:[!this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" You are about to ",y.Z.editor_action_delete_primary," the following records."]}),this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" Please wait while we are submitting your request for deleti
1on of the following records. ",(0,F.jsx)(Q.Z,{size:20})]}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsx)(je.Z,{component:"div",children:this.state.internal_and_draft_items.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))}),a.length>0&&(0,F.jsx)(je.Z,{component:"div",children:(0,F.jsxs)("div",{children:[(0,F.jsx)("hr",{}),(0,F.jsx)(b.Z,{variant:"h5",style:{marginBottom:"10px"},children:y.Z.editor_bulk_ingest}),a.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))]})})]}),(0,F.jsx)("hr",{}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:this.disableDisplay,autoFocus:!0,children:y.Z.dialog_validationResponse_close_button}),(0,F.jsxs)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:function(){return t.handleMultipleDelete()},children:[(0,F.jsx)(ke.r,{className:"xsmall-icon"}),y.Z.editor_action_delete_secondary]})]})]}),"}"]})}}]),a}(f.Component),Ue=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleMultipleExportXML=function(){s.setState({loading:!0});var e=s.state.internal_and_ingested_and_published_items.map((function(e){return e.id})).join(",");j().get((0,C.GM)(e)).then((function(e){s.success("Request submitted successfully. You will be notified by email.",e)})).catch((function(e){s.failure("Your request failed.",e)}))},s.success=function(e,t){s.setState({loading:!1}),Se.Am.success(e,{autoClose:5e3}),s.disableDisplay();try{t&&t.data&&t.data.length>0&&s.props.updateRecords(t.data)}catch(a){}},s.failure=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Se.Am.error(e,{autoClose:3500}),s.setState({loading:!1}),s.disableDisplay();try{t&&t.response&&t.response.data,console.log(t)}catch(a){console.log(t)}},s.disableDisplay=function(){s.setState({displayDialog:!1}),s.props.clearSelect("")},s.state={displayDialog:!0,loading:!1,internal_and_ingested_and_published_items:s.props.internal_and_ingested_and_published_items},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t=this;if(0===this.state.internal_and_ingested_and_published_items.length)return(0,F.jsx)(F.Fragment,{});var a=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return!t.state.internal_and_ingested_and_published_items.includes(e)})))||[];return(0,F.jsx)("div",{children:(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",disableBackdropClick:!0,maxWidth:"lg",children:[!this.state.loading&&(0,F.jsx)(Ze.Z,{children:" You are about to export the following records."}),this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" Please wait while your request is in progress. ",(0,F.jsx)(Q.Z,{size:20})]}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsx)(je.Z,{component:"div",children:this.state.internal_and_ingested_and_published_items.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:10,children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))}),a.length>0&&(0,F.jsx)(je.Z,{component:"div",children:(0,F.jsxs)("div",{children:[(0,F.jsx)("hr",{}),(0,F.jsx)(b.Z,{variant:"h5",style:{marginBottom:"10px"},children:"The following records will not be exported because they do not meet the status requirements."}),a.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:10,children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,unpublication_requested:e.unpublication_requested,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))]})})]}),(0,F.jsx)("hr",{}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:this.disableDisplay,autoFocus:!0,children:y.Z.dialog_validationResponse_close_button}),(0,F.jsxs)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:function(){return t.handleMultipleExportXML()},children:[(0,F.jsx)(ke.r,{className:"xsmall-icon"}),"xml export"]})]})]})})}}]),a}(f.Component),Ee=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleMultipleDeactivateVersion=function(){s.setState({loading:!0});var e=s.state.deactivate_version_items.map((function(e){return e.id})).join(",");j().patch((0,be.$Z)(e)).then((function(e){s.success("Records submited successfully.",e)}
1)).catch((function(e){s.failure("Records submission failed.",e)}))},s.success=function(e,t){s.setState({loading:!1}),Se.Am.success(e,{autoClose:3500}),s.disableDisplay();try{t&&t.data&&t.data.length>0&&s.props.updateRecords(t.data)}catch(a){}},s.failure=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Se.Am.error(e,{autoClose:3500}),s.setState({loading:!1}),s.disableDisplay();try{t&&t.response&&t.response.data,console.log(t)}catch(a){console.log(t)}},s.disableDisplay=function(){s.setState({displayDialog:!1}),s.props.clearSelect("")},s.state={displayDialog:!0,loading:!1,deactivate_version_items:s.props.deactivate_version_items||[]},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t=this;if(0===this.state.deactivate_version_items.length)return(0,F.jsx)(F.Fragment,{});var a=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return!t.state.deactivate_version_items.includes(e)})))||[];return(0,F.jsx)("div",{children:(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",disableBackdropClick:!0,maxWidth:"lg",children:[!this.state.loading&&(0,F.jsx)(Ze.Z,{children:" You are about to deactivate the version of the following records."}),this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" Please wait while we are submitting your request. ",(0,F.jsx)(Q.Z,{size:20})]}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsx)(je.Z,{component:"div",children:this.state.deactivate_version_items.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsxs)("span",{children:[e.resource_name," ",(0,F.jsxs)("small",{children:[" ",(0,F.jsxs)("b",{children:["version ",e.version]})]})]})]})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))}),a.length>0&&(0,F.jsx)(je.Z,{component:"div",children:(0,F.jsxs)("div",{children:[(0,F.jsx)("hr",{}),(0,F.jsx)(b.Z,{variant:"h5",style:{marginBottom:"10px"},children:y.Z.editor_bulk_general_message}),a.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsxs)("span",{children:[e.resource_name," ",(0,F.jsxs)("small",{children:[" ",(0,F.jsxs)("b",{children:["version ",e.version]})]})," "]})]})})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))]})})]}),(0,F.jsx)("hr",{}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:this.disableDisplay,autoFocus:!0,children:y.Z.dialog_validationResponse_close_button}),(0,F.jsxs)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:function(){return t.handleMultipleDeactivateVersion()},children:[(0,F.jsx)(ke.r,{className:"xsmall-icon"}),y.Z.editor_action_ingest_secondary]})]})]})})}}]),a}(f.Component),Be=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).clearSelect=function(e){s.setState({selectedAction:e})},s.getRecordsOfStatus=function(e,t){var a,n=(null===(a=s.props.checkedList)||void 0===a?void 0:a.filter((function(e){return e.status===t})))||[];if(n.length)switch(t){case"internal":e.push(y.Z.editor_action_ingest_primary),e.includes(y.Z.editor_action_delete_primary)||e.push(y.Z.editor_action_delete_primary),e.includes(y.Z.editor_action_export_data)||e.push(y.Z.editor_action_export_data);break;case"published":(n=n.filter((function(e){return!0!==e.unpublication_requested}))).length>0&&e.push(y.Z.editor_action_unpublish_primary),e.includes(y.Z.editor_action_export_data)||e.push(y.Z.editor_action_export_data),(n.filter((function(e){return e.elg_compatible_service&&e.is_active_version&&!e.is_latest_version}))||[]).length>0&&e.push(y.Z.editor_action_deactivate_vesrion_primary);break;case"draft":!e.includes(y.Z.editor_action_delete_primary)&&e.push(y.Z.editor_action_delete_primary);break;case"ingested":e.includes(y.Z.editor_action_export_data)||e.push(y.Z.editor_action_export_data)}return n},s.state={selectedAction:""},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t,a=this,s=[],n=this.getRecordsOfStatus(s,"internal"),i=this.getRecordsOfStatus(s,"published"),r=this.getRecordsOfStatus(s,"draft"),l=this.getRecordsOfStatus(s,"ingested"),c=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return"published"===e.status})).filter((function(e){return!0===e.unpublication_requested})))||[],o=null===(t=this.props.checkedList)||void 0===t?void 0:t.filter((function(e){return"published"===e.status})).filter((function(e){return e.elg_compatible_service&&e.is_active_version&&!e.is_latest_version}));switch(this.state.selectedAction){case y.Z.editor_action_ingest_primary:return(0,F.jsx)(Le,(0,d.Z)((0,d.Z)({},this.props),{},{internal_items:n,updateRecords:this.props.updateRecords,clearSelect:this.clearSelect}));case y.Z.editor_action_unpublish_primary:return(0,F.jsx)(Te,(0,d.Z)((0,d.Z)({},this.props),{},{published_items:i,updateRecords:this.props.updateRecords,clearSelect:this.clearSelect}));case y.Z.editor_action_delete_primary:return(0,F.jsx)(Oe,(0,d.Z)((0,d.Z)({},this.props),{},{internal_and_draft_items:n.concat(r),updateRecords:this.props.updateRecords,clearSelect:this.clearSelect}));case y.Z.editor_action_export_data:return(0,F.jsx)(Ue,(0,d.Z)((0,d.Z)({},this.props),{},{internal_and_ingested_and_published_items:n.concat(l,i,c),updateRecords:this.props.updateRecords,clearSelect:this.clearSelect}));case y.Z.editor_action_deactivate_vesrion_primary:return(0,F.jsx)(Ee,(0,d.Z)((0,d.Z)({},this.props),{},{deactivate_version_items:o,updateRecords:this.props.updateRecords,clearSelect:this.clearSelect}))}return 0===s.length?(0,F.jsx)(F.Fragment,{}):(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(fe.Z,{variant:"outlined",className:"wd-100",children:[(0,F.jsx)(ye.Z,{htmlFor:"outlined-bulk-action",children:"Action"}),(0,F.jsxs)(xe.Z,{variant:"outlined",native:!0,value:this.state.selectedAction,onChange:function(e){a.setState({selectedAction:e.target.value})},label:"Action",inputProps:{name:"bulk-action",id:"bulk-action"},children:[(0,F.jsx)("option",{"aria-label":"None",value:""}),s.map((function(e,t){return(0,F.jsx)("option",{value:e,children:e},t)}))]}),(0,F.jsx)(pe.Z,{children:"Select an action to perform on your selected items"})]})})}}]),a}(f.Component),Me=a(38493),ze=a(14636),Pe=a(55345),Ve=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).changeValue=function(e){s.handleClose(),s.props.sortBy(e)},s.handleClose=function(){s.setState({anchorEl:null})},s.state={anchorEl:null,openSelect:!0,selectedValue:e.selectedValue||""},s}return(0,h.Z)(a,[{key:"render",value:function(){var e=this,t=[];return t=this.props.called_by_component&&"MyDownloads"===this.props.called_by_component?[{display_value:"Sort by",value:""},{display_value:"item name \u2191",value:"ordering=resource_name"},{display_value:"item name \u2193",value:"ordering=-resource_name"},{display_value:"download date \u2191",value:"ordering=download_date"},{display_value:"download date \u2193",value:"ordering=-download_date"},{display_value:"resource type \u2191",value:"ordering=resource_type"},{display_value:"resource type \u2193",value:"ordering=-resource_type"}]:this.props.called_by_component&&"myUsage"===this.props.called_by_component?[{display_value:"Sort by",value:""},{display_value:"item name \u2191",value:"ordering=resource_name"},{display_value:"item name \u2193",value:"ordering=-resource_name"},{display_value:"call time \u2191",value:"ordering=execution_start"},{display_value:"call time \u2193",value:"ordering=-execution_start"},{display_value:"resource type \u2191",value:"ordering=resource_type"},{display_value:"resource type \u2193",value:"ordering=-resource_type"}]:[{display_value:"Sort by",value:""},{display_value:"item name \u2191",value:"ordering=resource_name"},{display_value:"item name \u2193",value:"ordering=-resource_name"},{display_value:"update date \u2191",value:"ordering=last_date_updated"},{display_value:"update date \u2193",value:"ordering=-last_date_updated"}],(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{onClick:function(t){e.setState({anchorEl:t.currentTarget})},children:(0,F.jsx)(Pe.r,{className:"small-icon yellow--font"})}),(0,F.jsx)(Me.Z,{id:"simple-menu",anchorEl:this.state.anchorEl,keepMounted:!0,open:Boolean(this.state.anchorEl),onClose:function(){return e.handleClose()},children:t.map((function(t,a){return 0===a?(0,F.jsx)(ze.Z,{value:t.value,disabled:0===a,onClick:function(){e.handleClose()},children:(0,F.jsx)("small",{children:t.display_value})},a):t.value===e.state.selectedValue.value?(0,F.jsx)(ze.Z,{value:t.value,onClick:function(){e.changeValue(t)},style:{backgroundColor:"lightblue"},children:(0,F.jsx)("span",{children:t.display_value})},a):(0,F.jsx)(ze.Z,{value:t.value,onClick:function(){e.changeValue(t)},children:(0,F.jsx)("span",{children:t.display_value})},a)}))})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return{selectedValue:e.selectedValue||""}}}]),a}(f.Component),qe=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleWindowSizeChange=function(){s.setState({width:window.innerWidth})},s.getInitialSearchKeyword=function(){return s.props.match.params&&s.props.match.params.term?s.props.match.params.term:""},s.getAllResults=function(){s.getKeywordBasedSearchResults(null)},s.getKeywordBasedSearchResults=function(e){var t=s.props.location?s.props.location.search:"";if(t&&(t=t.substring(t.indexOf("?")+1)),t){for(var a=[],n=t.split("&")||[],i=0;i<n.length;i++){var r=n[i].split("=")||[];2===r.length&&-1===a.indexOf(r[1])&&a.push(r[1])}s.setState({facetSearchKeyword:t,selectedFacets:a})}else s.setState({searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[]});s.isUnmound=!0,s.state.source&&s.state.source.cancel("");var l=j().CancelToken.source();s.setState({source:l,loading:!0}),s.clearSortedBy(),t?j().get((0,C.oy)(e||"",t),{cancelToken:l.token}).then((function(a){s.isUnmound&&s.setState({data:a.data,searchKeyword:e||"",facetSearchKeyword:t,source:null,loading:!1})}
1)).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.oy)(e||"","")).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[],source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getNextPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.next;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e,{cancelToken:t.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getPreviousPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.previous;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e,{cancelToken:t.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.search=function(e){e&&e.preventDefault();var t=s.input.current.value;if(s.setState({searchKeyword:t}),!t)return s.props.history.push("/myItems"),s.clearAllSearchFilters(),!1;if(t&&0===t.length)return s.props.history.push("/myItems"),s.getAllResults(),!1;var a=s.state.facetSearchKeyword;return s.state.facetSearchKeyword?s.props.history.push("/myItems/".concat(encodeURIComponent(t),"?").concat(a)):s.props.history.push("/myItems/".concat(encodeURIComponent(t))),!1},s.handleFacetChange=function(e){if(0===e.length)return s.getAllResults(),!1;var t=s.state.facetSearchKeyword;return t.length>1&&-1===t.indexOf(e)?(e="".concat(s.state.facetSearchKeyword,"&").concat(e),s.setState({facetSearchKeyword:e})):t.length>1&&-1!==t.indexOf(e)?(e="".concat(s.state.facetSearchKeyword),s.setState({facetSearchKeyword:e})):""===t&&s.setState({facetSearchKeyword:e}),s.props.history.push("?".concat(e)),s.isUnmound=!0,s.setState({loading:!0}),s.state.searchKeyword?j().get((0,C.oy)(s.state.searchKeyword||"",e)).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:e,loading:!1})})).catch((function(e){s.setState({loading:!1})})):j().get((0,C.tz)(e)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:"",loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1},s.unselectFacet=function(e){var t=s.state.facetSearchKeyword,a=e.split("="),n="".concat(a[0],"=").concat(encodeURIComponent(a[1]));if(n=n.replace("%2F","/"),-1!==t.indexOf(n)&&(e=n),-1!==t.indexOf(e)){var i=t.replace("&".concat(e),"");return i=t.replace("?".concat(e),""),(i=t.replace("".concat(e),"")).startsWith("&")&&(i=i.substring(1)),-1!==i.indexOf("&&")&&(i=i.replace("&&","&")),i.endsWith("&")&&(i=i.substring(0,i.lastIndexOf("&"))),s.setState({facetSearchKeyword:i,loading:!0}),s.props.history.push("?".concat(i)),s.isUnmound=!0,j().get((0,C.oy)(s.state.searchKeyword||"",i)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:i,loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1}},s.clearAllSearchFilters=function(){s.state.source&&s.state.source.cancel("");var e=j().CancelToken.source();return s.setState({source:e}),s.setState({searchKeyword:"",facetSearchKeyword:"",selectedFacets:[]}),s.setState({loading:!0}),s.props.history.push({pathname:"/myItems",state:{tab:"myres"}}),s.isUnmound=!0,s.clearChekcedList(),s.clearSortedBy(),j().get(C.QV,{cancelToken:e.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({searchKeyword:"",selectedFacets:[],facetSearchKeyword:"",loading:!1}))})).catch((function(e){s.setState({loading:!1})})),!1},s.markFacetAsSelected=function(e){-1===s.state.selectedFacets.indexOf(e)&&s.setState((function(t){return{selectedFacets:[].concat((0,v.Z)(t.selectedFacets),[e])}})),s.clearChekcedList()},s.handleUnselectedFacet=function(e){var t=(0,v.Z)(s.state.selectedFacets);t.splice(e,1),s.setState({selectedFacets:t}),s.clearChekcedList()},s.addCheckedResource2List=function(e){var t=s.state.checkedList;t.push(e),s.setState({checkedList:t})},s.addAllCheckedResource2List=function(){s.setState({isCheckAll:!s.state.isCheckAll}),s.state.data.results.map((function(e){return s.addCheckedResource2List(e)}))},s.removeAllResourceFromCheckedList=function(){s.setState({isCheckAll:!1}),s.setState({checkedList:[]})},s.handleCheckAll=function(e){e.target.checked?s.addAllCheckedResource2List(s.state.resourceData):s.removeAllResourceFromCheckedList(s.state.resourceData)},s.removeResourceFromCheckedList=function(e){var t=s.state.checkedList;t=t.filter((function(t){return t.id!==e.id})),s.setState({checkedList:t})},s.clearChekcedList=function(){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearSortedBy()},s.updateRecords=function(e){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearAllSearchFilters()},s.clearSortedBy=function(){s.setState({sortBy:""})},s.sortBy=function(e){if(e){var t=e.value,a=s.state.sortBy;if(s.setState({sortBy:e}),t!==a){var n=s.state.facetSearchKeyword?"".concat(s.state.facetSearchKeyword,"&").concat(t):"".concat(t);s.state.source&&s.state.source.cancel("");var i=j().CancelToken.source();s.setState({source:i,loading:!0}),s.props.history.push("?".concat(n)),s.state.searchKeyword?j().get((0,C.oy)(s.state.searchKeyword||"",n),{cancelToken:i.token}).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})}
1)).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.tz)(n),{cancelToken:i.token}).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))}}},s.state={data:"",width:window.innerWidth,searchKeyword:s.getInitialSearchKeyword(),facetSearchKeyword:"",selectedFacets:[],keycloak:e.keycloak,source:null,loading:!1,checkedList:[],sortBy:"",isCheckAll:!1},s.isUnmound=!1,s.input=f.createRef(),s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){if(window.addEventListener("resize",this.handleWindowSizeChange),this.props.match.params&&this.props.match.params.term){var e=this.props.match.params.term;this.getKeywordBasedSearchResults(e)}else this.getAllResults()}},{key:"componentWillUnmount",value:function(){this.isUnmound=!1,window.removeEventListener("resize",this.handleWindowSizeChange)}},{key:"componentDidUpdate",value:function(e,t){var a=this.props&&this.props.match&&this.props.match.params&&this.props.match.params.term;a!==(e.match&&e.match.params&&e.match.params.term)&&(a?this.getKeywordBasedSearchResults(a):this.getAllResults())}},{key:"render",value:function(){var e,t,a,s,n,i,r,l,c,o,d=this;return(0,F.jsxs)("div",{children:[(0,F.jsx)(me.q,{children:(0,F.jsx)("title",{children:"European Language Grid My Items"})}),(0,F.jsxs)("section",{className:"wd-100",style:{cursor:this.state.loading?"progress":""},children:[(0,F.jsx)("div",{className:"empty"}),(0,F.jsx)(S.Z,{elevation:3,className:"dashboard-content",children:(0,F.jsxs)(k.Z,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,container:!0,xs:12,spacing:3,className:"dashboard_searchClass",direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,F.jsx)("form",{onSubmit:this.search,className:"dashboard_searchClass_form",children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:3,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:9,children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchPlaceholder",defaultMessage:y.Z.dashboard_search_box,children:function(e){return(0,F.jsx)(le.Z,{type:"search",className:"search-box__input",innerRef:d.input,defaultValue:decodeURIComponent(d.state.searchKeyword),placeholder:e,onChange:function(){var e;null!==(e=d.input.current.value)&&void 0!==e&&e.length||d.search()}})}})}),(0,F.jsx)(k.Z,{item:!0,xs:3,children:(0,F.jsx)(ae.Z,{onClick:this.search,className:"inner-link-outlined--teal wd-100",children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchButton",defaultMessage:y.Z.search})})})]})})}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,spacing:3,sm:12,className:"dashboard-results-area",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:3,className:"search-results-container",children:[(0,F.jsx)(he.Z,{only:["lg","md","sm","xl"],children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:(0,F.jsxs)(ce.Z,{children:[(0,F.jsx)(oe.Z,{expandIcon:(0,F.jsx)(ue.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,F.jsx)(b.Z,{children:" Filters "})}),(0,F.jsx)(de.Z,{children:(0,F.jsx)("div",{children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet})})})]})})}),(0,F.jsx)(he.Z,{only:"xs",children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet})})})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:9,alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:12,justifyContent:"space-between",alignItems:"center",className:"DashboardResultsCount",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:3,alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(k.Z,{item:!0,sm:2,children:(0,F.jsx)(H.Z,{checked:this.state.isCheckAll,size:"small",onChange:function(e){d.handleCheckAll(e)}})}),(0,F.jsxs)(k.Z,{item:!0,sm:10,children:[" ",(0,F.jsx)(b.Z,{variant:"h4",className:"grey--font",children:"Select All"})," "]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:9,alignItems:"center",justifyContent:"flex-end",spacing:1,children:[(0,F.jsx)(k.Z,{item:!0,sm:8,children:(0,F.jsx)(Be,{checkedList:this.state.checkedList,updateRecords:this.updateRecords})}),(0,F.jsx)(k.Z,{item:!0,sm:3,children:(0,F.jsxs)("span",{className:"text-small",style:{float:"right"},children:[this.state.data.count,"\xa0search results ","".concat(null!==(e=this.props)&&void 0!==e&&null!==(t=e.match)&&void 0!==t&&null!==(a=t.params)&&void 0!==a&&a.term&&(null===(s=this.props)||void 0===s||null===(n=s.match)||void 0===n||null===(i=n.params)||void 0===i||null===(r=i.term)||void 0===r?void 0:r.length)>=3?"for ".concat(decodeURIComponent(null===(l=this.props)||void 0===l||null===(c=l.match)||void 0===c||null===(o=c.params)||void 0===o?void 0:o.term)):""),this.state.loading?(0,F.jsx)(Q.Z,{size:20}):void 0]})}),(0,F.jsx)(k.Z,{item:!0,sm:1,children:(0,F.jsx)(Ve,{sortBy:this.sortBy,selectedValue:this.state.sortBy})})]})]}
1),(0,F.jsx)(k.Z,{container:!0,className:"CardContainer",alignItems:"stretch",direction:"row",justifyContent:"center",children:this.state.data.results&&this.state.data.results.map((function(e,t){return(0,F.jsx)(ee,{resource:e,keycloak:d.state.keycloak,addCheckedResource2List:d.addCheckedResource2List,removeResourceFromCheckedList:d.removeResourceFromCheckedList,checkedList:d.state.checkedList,updateRecords:d.updateRecords},JSON.stringify(e))}))})]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,className:"botomMargin pt-3",justifyContent:"center",alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,children:[" ",this.state.data.previous&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getPreviousPage,classes:{root:"inner-link-outlined--teal"},children:["\u2190",(0,F.jsx)(Z.Z,{id:"searchCatalogue.previousPage",defaultMessage:y.Z.previous})," "]})]}),(0,F.jsxs)(k.Z,{item:!0,xs:6,sm:8,children:[null,(0,F.jsx)("div",{children:null})]}),(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,style:{textAlign:"right"},children:[" ",this.state.data.next&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getNextPage,classes:{root:"inner-link-outlined--teal"},children:[(0,F.jsx)(Z.Z,{id:"searchCatalogue.nextPage",defaultMessage:y.Z.next})," \u2192"]})]})]})]})})]})]})}}]),a}(f.Component),We=qe,Ge=a(29439),Je=a(28303),Ye=a(34882),Qe=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleClick=function(e){s.setState({anchorEl:e.currentTarget})},s.handleClose=function(){s.setState({anchorEl:!1})},s.handleCheck=function(e){e.target.checked?s.props.addCheckedResource2List(s.state.resourceData):s.props.removeResourceFromCheckedList(s.state.resourceData)},s.convertData=function(e){var t={pk:e.id,management_object:{unpublication_requested:e.unpublication_requested,size:e.size,status:"",legally_valid:e.legally_valid,metadata_valid:e.metadata_valid},described_entity:{field_value:{entity_type:{field_value:{en:""}},project_name:{field_value:{en:""}},organization_name:{field_value:{en:""}},resource_name:{field_value:{en:""}},lr_subclass:{field_value:{lr_type:{field_value:""}}}}}};return"internal"===e.status?t.management_object.status="i":"draft"===e.status?t.management_object.status="d":"published"===e.status?t.management_object.status="p":"ingested"===e.status?t.management_object.status="g":"unpublished"===e.status?t.management_object.status="u":"rejected"===e.status?t.management_object.status="r":console.log(e.status),e.entity_type===C.yM?(t.described_entity.field_value.entity_type.field_value=C.yM,t.described_entity.field_value.project_name.field_value={en:e.resource_name}):e.resource_type===C.e6||"ToolService"===e.resource_type?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value="ToolService",t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.resource_type===C.p?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value=C.p,t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.resource_type===C.CD||"LexicalConceptualResource"===e.resource_type?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value="LexicalConceptualResource",t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.resource_type===C.LD||e.resource_type===C.jO||e.resource_type===C.AM||e.resource_type===C.wG||e.resource_type===C.jf?(t.described_entity.field_value.entity_type.field_value="LanguageResource",t.described_entity.field_value.lr_subclass.field_value.lr_type.field_value="LanguageDescription",t.described_entity.field_value.resource_name.field_value={en:e.resource_name}):e.entity_type===C.Eq&&(t.described_entity.field_value.entity_type.field_value=C.Eq,t.described_entity.field_value.organization_name.field_value={en:e.resource_name}),t},s.state={resourceData:e.resource,expanded:!1,expandedLang:!1,expandedLicence:!1,keycloak:e.ke
1ycloak,anchorEl:!1,loading:!1},s}return(0,h.Z)(a,[{key:"navigateToResourceDetail",value:function(e,t,a){if("draft"===e.status)return"";if(t||a||(0,C.PQ)(this.props.keycloak))return(0,C._Q)(e);return["ingested","rejected","published"].includes(e.status)?(0,C._Q)(e):""}},{key:"render",value:function(){var e=this,t=this.state.resourceData,a=t.curator===(0,C.kh)(this.state.keycloak),s=t.content_manager===(0,C.kh)(this.state.keycloak),n=this.navigateToResourceDetail(t,a,s);return(0,F.jsx)(f.Fragment,{children:(0,F.jsx)(S.Z,{className:"DashboardListItem",style:{padding:"0.5em"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:2,justifyContent:"space-between",alignItems:"center",className:"ResourceListItem--inner",children:[(0,F.jsx)(k.Z,{item:!0,sm:1,children:(0,F.jsx)(H.Z,{checked:!!(this.props.checkedList.find((function(e){return e.id===t.id}))&&this.props.checkedList.find((function(e){return e.id===t.id})).id>=0),size:"small",onChange:function(t){e.handleCheck(t)}})}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:8,children:[(0,F.jsxs)(k.Z,{item:!0,sm:12,children:[n&&(0,F.jsx)(b.Z,{variant:"h5",className:"ResourceListTitle pt-05",children:(0,F.jsx)(Je.rU,{to:n,children:t.resource_name})}),!n&&(0,F.jsx)(Ye.ZP,{title:"inaccessible to you at this status",children:(0,F.jsx)(b.Z,{variant:"h5",className:"ResourceListTitle pt-05",children:t.resource_name})})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:12,children:[(0,F.jsxs)(k.Z,{item:!0,sm:12,children:[t.version&&"undefined"!==t.version&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",className:"grey--font",children:[" Version: ",t.version," "]})}),(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsx)(b.Z,{variant:"caption",className:"grey--font",children:"LanguageResource"!==t.entity_type?t.entity_type:t.resource_type})}),(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsx)(b.Z,{variant:"caption",className:"grey--font",children:t.repository})}),t.ingestion_date?(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:t.ingestion_date&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",children:["submitted:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.ingestion_date))," "]})})}):void 0,t.legal_validation_date?(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:t.legal_validation_date&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",children:["legal validation date:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.legal_validation_date))," "]})})}):void 0,t.metadata_validation_date?(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:t.metadata_validation_date&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",children:["metadata validation date:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.metadata_validation_date))," "]})})}):void 0,(0,F.jsx)(k.Z,{item:!0,sm:12,children:(0,F.jsx)(R,{status:t.status,unpublication_requested:t.unpublication_requested,marked_as_deleted:t.marked_as_deleted,xSize:6,keycloak:this.state.keycloak})}),(0,F.jsxs)(k.Z,{item:!0,sm:12,container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",className:"pt-05 pb-05",children:[!0===t.has_data&&(0,F.jsx)(N.Z,{size:"small",label:"has data",className:"ChipTagGreen"}),!0===t.resubmitted&&(0,F.jsx)(N.Z,{size:"small",label:"resubmitted",className:"ChipTagYellow"})]}),(0,F.jsxs)(k.Z,{item:!0,sm:12,children:[t.legal_validator&&(0,F.jsx)(k.Z,{item:!0,className:"padding5",children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"body2",className:"Text-fontSize--12 grey--font",children:["legal validator: ",t.legal_validator," "]})})}),t.metadata_validator&&(0,F.jsx)(k.Z,{item:!0,className:"padding5",children:(0,F.jsxs)("span",{children:[(0,F.jsxs)(b.Z,{variant:"body2",className:"Text-fontSize--12 grey--font",children:["metadata validator: ",t.metadata_validator]})," "]})}),t.technical_validator&&(0,F.jsx)(k.Z,{item:!0,className:"padding5",children:(0,F.jsxs)("span",{children:[(0,F.jsxs)(b.Z,{variant:"body2",className:"Text-fontSize--12 grey--font",children:["technical validator: ",t.technical_validator]})," "]})}),t.curator&&(0,F.jsx)(k.Z,{item:!0,className:"padding5",children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"body2",className:"Text-fontSize--12 grey--font",children:["curator: ",t.curator]})})})]})]}),(0,F.jsxs)(k.Z,{item:!0,sm:12,children:[t.review_comments&&t.review_comments.length>0&&(0,F.jsxs)("div",{className:"review-card",children:[(0,F.jsx)(b.Z,{variant:"body2",className:"Text-fontSize--12 bold",children:"Review comments"}),t.review_comments.map((function(e,t){return(0,F.jsx)("div",{children:(0,F.jsx)(b.Z,{variant:"caption",className:"pt-05",children:e})},t)}))," "]}),t.validator_notes&&t.validator_notes.length>0&&(0,F.jsxs)("div",{className:"review-card mt-1",children:[(0,F.jsx)(b.Z,{variant:"body2",className:"Text-fontSize--12 bold",children:"Validator notes"}),t.validator_notes.map((function(e,t){return(0,F.jsx)("div",{children:(0,F.jsx)(b.Z,{variant:"caption",className:"pt-05",children:e})},t)}))]})]})]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:3,justifyContent:"flex-start",children:[t.legally_valid&&(0,F.jsx)(k.Z,{item:!0,sm:12,className:"padding5 pt1",children:(0,F.jsxs)(b.Z,{className:"Text-fontSize--12 grey--font",children:["legally valid ",(0,F.jsx)("span",{children:" "}
1),"yes"===t.legally_valid&&(0,F.jsx)("span",{className:"badge bg-green mr-05",children:"yes"}),"no"===t.legally_valid&&(0,F.jsx)("span",{className:"badge bg-red mr-05",children:"rejected"}),"not validated"===t.legally_valid&&(0,F.jsx)("span",{className:"badge bg-light-pink mr-05",children:"not validated"})]})}),t.metadata_valid&&(0,F.jsx)(k.Z,{item:!0,sm:12,className:"padding5",children:(0,F.jsxs)(b.Z,{className:"Text-fontSize--12 grey--font",children:["metadata valid ",(0,F.jsx)("span",{children:" "}),"yes"===t.metadata_valid&&(0,F.jsx)("span",{className:"badge bg-green mr-05",children:"yes"}),"no"===t.metadata_valid&&(0,F.jsx)("span",{className:"badge bg-red mr-05",children:"rejected"}),"not validated"===t.metadata_valid&&(0,F.jsx)("span",{className:"badge bg-light-pink mr-05",children:"not validated"})]})}),t.technically_valid&&(0,F.jsx)(k.Z,{item:!0,sm:12,className:"padding5",children:(0,F.jsxs)(b.Z,{className:"Text-fontSize--12 grey--font",children:["technically valid ",(0,F.jsx)("span",{children:" "}),"yes"===t.technically_valid&&(0,F.jsx)("span",{className:"badge bg-green mr-05",children:"yes"}),"no"===t.technically_valid&&(0,F.jsx)("span",{className:"badge bg-red mr-05",children:"rejected"}),"not validated"===t.technically_valid&&(0,F.jsx)("span",{className:"badge bg-light-pink mr-05",children:"not validated"})]})}),t.service_status&&(0,F.jsx)(k.Z,{item:!0,sm:12,className:"padding5",children:(0,F.jsxs)(b.Z,{className:"Text-fontSize--12 grey--font",children:["service status ",(0,F.jsx)("span",{children:" "}),"Completed"===t.service_status&&(0,F.jsx)("span",{className:"badge bg-green mr-05",children:t.service_status}),"Pending"===t.service_status&&(0,F.jsx)("span",{className:"badge bg-light-pink mr-05",children:t.service_status}),"New"===t.service_status&&(0,F.jsx)("span",{className:"badge bg-green-dark mr-05",children:t.service_status})]})})]})]})})})}}]),a}(f.Component),He=(0,x.EN)(Qe),Xe=a(37034),$e=a(78797),et=a(56446),tt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleSubmit=function(){var e=s.state.ingested_items.map((function(e){return e.id})).join(",");s.setState({loading:!0}),"Reject"===s.state.selectedOption||"Reject"===s.state.technicalSelectedOption?j().patch((0,be.X9)(e),{metadata_approve:"Approve"===s.state.selectedOption,technically_approve:"Approve"===s.state.technicalSelectedOption,review_comments:s.state.reasons,validator_notes:s.state.validator_notes}).then((function(e){s.success("Records submited successfully.",e)})).catch((function(e){s.failure("Records submission failed.",e)})):"Approve"===s.state.selectedOption&&"Approve"===s.state.technicalSelectedOption?j().patch((0,be.X9)(e),{metadata_approve:!0,technically_approve:!0,validator_notes:s.state.validator_notes}).then((function(e){s.success("Records submited successfully.",e)})).catch((function(e){s.failure("Records submission failed.",e)})):j().patch((0,be.X9)(e),{validator_notes:s.state.validator_notes}).then((function(e){s.success("Records submited successfully.",e)})).catch((function(e){s.failure("Records submission failed.",e)}))},s.success=function(e,t){s.setState({loading:!1}),Se.Am.success(e,{autoClose:3500}),s.disableDisplay();try{t&&t.data&&t.data.length>0&&s.props.updateRecords(t.data)}catch(a){}},s.failure=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Se.Am.error(e,{autoClose:3500}),s.setState({loading:!1}),s.disableDisplay();try{t&&t.response&&t.response.data,console.log(t)}catch(a){console.log(t)}},s.disableDisplay=function(e,t){"backdropClick"!==t&&(s.setState({displayDialog:!1}),s.props.clearSelect(""))},s.state={displayDialog:!0,loading:!1,ingested_items:s.props.ingested_items,dialogueIndex:0,selectedOption:"",technicalSelectedOption:"",reasons:"",validator_notes:""},s}return(0,h.Z)(a,[{key:"render",value:function(){var e,t=this;if(0===this.state.ingested_items.length)return(0,F.jsx)(F.Fragment,{});var a=["Approve","Reject"],s=(null===(e=this.props.checkedList)||void 0===e?void 0:e.filter((function(e){return!t.state.ingested_items.includes(e)})))||[];return 0===this.state.dialogueIndex?(0,F.jsx)("div",{children:(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"lg",children:[!this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" You are about to ",y.Z.validator_action_technical," to the following records."]}),this.state.loading&&(0,F.jsxs)(Ze.Z,{children:[" Please wait while we are submitting your request. ",(0,F.jsx)(Q.Z,{size:20})]}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsx)(je.Z,{component:"div",children:this.state.ingested_items.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))}),s.length>0&&(0,F.jsx)(je.Z,{component:"div",children:(0,F.jsxs)("div",{children:[(0,F.jsx)("hr",{}),(0,F.jsx)(b.Z,{variant:"h5",style:{marginBottom:"10px"},children:y.Z.editor_bulk_general_message}),s.map((function(e,t){var a=Ke(e);return(0,F.jsx)("div",{style:{marginBottom:"5px"},children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:6,children:(0,F.jsx)("span",{children:(0,F.jsxs)(b.Z,{variant:"h5",children:[(0,F.jsx)("span",{style:{marginRight:"10px"},children:a}),(0,F.jsx)("span",{children:e.resource_name})]})})}),(0,F.jsx)(k.Z,{item:!0,xs:2,children:(0,F.jsx)(R,{status:e.status,xSize:12,keycloak:Ie.t})})]})},JSON.stringify(e))}))]})})]}),(0,F.jsx)("hr",{}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:this.disableDisplay,autoFocus:!0,children:y.Z.dialog_validationResponse_close_button}),(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:function(){t.setState({dialogueIndex:1})},children:"Continue"})]})]})}):1===this.state.dialogueIndex?(0,F.jsxs)(ge.Z,{open:this.state.displayDialog,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,F.jsx)(Ze.Z,{id:"-dialog-title",children:(0,F.jsx)(b.Z,{className:"pb-3",align:"center",color:"primary",variant:"body1",children:" Please fill in the following fields in order to validate the records"})}),(0,F.jsxs)(_e.Z,{children:[(0,F.jsxs)(je.Z,{component:"div",children:[(0,F.jsx)(b.Z,{variant:"h4",children:"Metadata validation: "}),(0,F.jsx)(Xe.Z,{"aria-label":"validate",name:"validate",value:this.state.selectedOption,onChange:function(e){t.setState({reasons:"",selectedOption:e.target.value})},children:a.map((function(e){return(0,F.jsx)(et.Z,{value:e,control:(0,F.jsx)($e.Z,{}),label:e},e)}))}),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(b.Z,{variant:"h4",children:"Technical validation: "}),(0,F.jsx)(Xe.Z,{"aria-label":"validate",name:"validate",value:this.state.technicalSelectedOption,onChange:function(e){t.setState({reasons:"",technicalSelectedOption:e.target.value})},children:a.map((function(e){return(0,F.jsx)(et.Z,{value:e,control:(0,F.jsx)($e.Z,{}),label:e},e)}))})]})]}),(0,F.jsxs)(je.Z,{component:"div",children:[("Reject"===this.state.selectedOption||"Reject"===this.state.technicalSelectedOption)&&(0,F.jsx)(k.Z,{children:(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsx)(De.Z,{className:"pb-3 wd-100",multiline:!0,minRows:8,required:"Reject"===this.state.selectedOption||"Reject"===this.state.technicalSelectedOption,label:"Reasons",placeholder:"Reason for rejection",variant:"outlined",helperText:(0,F.jsx)("span",{children:"Please state the reasons for rejecting the records (to be sent out to the curator)"}),value:this.state.reasons,onChange:function(e){t.setState({reasons:e.target.value})}})})}),(0,F.jsx)("div",{children:(0,F.jsx)(k.Z,{children:(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsx)(De.Z,{className:"pb-3 wd-100",multiline:!0,minRows:8,required:!1,label:"Validator notes",placeholder:"Validator notes",variant:"outlined",helperText:(0,F.jsx)("span",{children:"Internal notes (visible only to other validators)"}),value:this.state.validator_notes,onChange:function(e){t.setState({validator_notes:e.target.value})}})})})})]})]}),(0,F.jsxs)(ve.Z,{children:[(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading||"Reject"===this.state.selectedOption&&!this.state.reasons||"Reject"===this.state.technicalSelectedOption&&!this.state.reasons||!this.state.selectedOption&&!this.state.validator_notes||!this.state.technicalSelectedOption&&!this.state.validator_notes,onClick:function(){return t.handleSubmit()},children:"Submit"}),(0,F.jsx)("span",{children:(0,F.jsx)(ae.Z,{color:"primary",disabled:this.state.loading,onClick:function(){return t.disableDisplay()},children:"Cancel"})})]})]}):(0,F.jsx)(F.Fragment,{})}}]),a}(f.Component),at=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).clearSelect=function(e){s.setState({selectedAction:e})},s.getRecordsOfStatus=function(e,t,a){var n,i=(null===(n=s.props.checkedList)||void 0===n?void 0:n.filter((function(e){return e.status===t})))||[];if(a&&i&&i.length>0&&(i=i.filter((function(e){return e.elg_compatible_service&&(e.resource_type===C.e6||"ToolService"===e.resource_type)&&"Completed"===e.service_status&&"yes"!==e.metadata_valid&&"yes"!==e.technically_valid}))),i.length&&"ingested"===t)e.includes(y.Z.validator_action_technical)||e.push(y.Z.validator_action_technical);return i},s.state={selectedAction:""},s}return(0,h.Z)(a,[{key:"render",value:function(){var e=this,t=[],a=this.getRecordsOfStatus(t,"ingested",!0);return this.state.selectedAction===y.Z.validator_action_technical?(0,F.jsx)(tt,(0,d.Z)((0,d.Z)({},this.props),{},{ingested_items:a,updateRecords:this.props.updateRecords,clearSelect:this.clearSelect})):0===t.length?(0,F.jsx)(F.Fragment,{}):(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(fe.Z,{variant:"outlined",className:"wd-100",children:[(0,F.jsx)(ye.Z,{htmlFor:"outlined-bulk-action",children:"Action"}),(0,F.jsxs)(xe.Z,{variant:"outlined",native:!0,value:this.state.selectedAction,onChange:function(t){e.setState({selectedAction:t.target.value})},label:"Action",inputProps:{name:"validator-bulk-action",id:"validator-bulk-action"},children:[(0,F.jsx)("option",{"aria-label":"None",value:""}),t.map((function(e,t){return(0,F.jsx)("option",{value:e,children:e},t)}))]}),(0,F.jsx)(pe.Z,{children:"Select an action to perform on your selected items"})]})})}}]),a}(f.Component),st=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).changeValue=function(e){s.handleClose(),s.props.sortBy(e)},s.handleClose=function(){s.setState({anchorEl:null})},s.state={anchorEl:null,openSelect:!0,selectedValue:e.selectedValue||""},s}return(0,h.Z)(a,[{key:"render",value:function(){var e=this;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Pe.r,{className:"small-icon yellow--font",onClick:function(t){e.setState({anchorEl:t.currentTarget})}}),(0,F.jsx)(Me.Z,{id:"simple-menu",anchorEl:this.state.anchorEl,keepMounted:!0,open:Boolean(this.state.anchorEl),onClose:function(){return e.handleClose()},children:[{display_value:"Sort by",value:""},{display_value:"item name \u2191",value:"ordering=resource_name"},{display_value:"item name \u2193",value:"ordering=-resource_name"},{display_value:"submitted date \u2191",value:"ordering=ingestion_date"},{display_value:"submitted date \u2193",value:"ordering=-ingestion_date"},{display_value:"item id \u2191",value:"ordering=id"},{display_value:"item id \u2193",value:"ordering=-id"}].map((function(t,a){return 0===a?(0,F.jsx)(ze.Z,{value:t.value,disabled:0===a,onClick:function(){e.handleClose()},children:(0,F.jsx)("small",{children:t.display_value})},a):t.value===e.state.selectedValue.value?(0,F.jsx)(ze.Z,{value:t.value,onClick:function(){e.changeValue(t)},style:{backgroundColor:"lightblue"},children:(0,F.jsx)("span",{children:t.display_value})},a):(0,F.jsx)(ze.Z,{value:t.value,onClick:function(){e.changeValue(t)},children:(0,F.jsx)("span",{children:t.display_value})},a)}))})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return{selectedValue:e.selectedValue||""}}}]),a}(f.Component),nt=a(31172),it=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleWindowSizeChange=function(){s.setState({width:window.innerWidth})},s.getInitialSearchKeyword=function(){return s.props.match.params&&s.props.match.params.term?s.props.match.params.term:""},s.getAllResults=function(){s.getKeywordBasedSearchResults(null)},s.getKeywordBasedSearchResults=function(e){try{var t=s.props.location?s.props.location.search:"",a=nt.parse(t);if(t&&(t=t.substring(t.indexOf("?")+1)),Object.keys(a).length>0){for(var n=[],i=0,r=Object.entries(a);i<r.length;i++){var l=(0,Ge.Z)(r[i],2),c=l[0],o=l[1];if("page"!==c)if(Array.isArray(o))for(var d=0;d<o.length;d++)n.push(decodeURIComponent(o[d]));else"username"===c?n.push("username"):"has_data__term"===c?n.push("has_data__term"+o):"metadata_valid__term"===c?n.push("metadata_valid__term"+o):"legally_valid__term"===c?n.push("legally_valid__term"+o):"functional_service__term"===c?n.push("functional_service__term"+o):n.push(decodeURIComponent(o));else if(!Number.isInteger(Number(o))&&Number(o)<=0)return void s.props.history.push("/")}s.setState({facetSearchKeyword:t,selectedFacets:n})}else s.setState({searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[]});s.state.source&&s.state.source.cancel("");var u=j().CancelToken.source();s.setState({source:u,loading:!0}),s.clearSortedBy(),t?j().get((0,C.VG)(e||"",t)).then((function(a){s.setState({data:a.data,searchKeyword:e||"",facetSearchKeyword:t,source:null,loading:!1})}
1)).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.VG)(e||"","")).then((function(t){s.setState({data:t.data,searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[],source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))}catch(h){console.log(h)}document.body.scrollTop=0,document.documentElement.scrollTop=0},s.getNextPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.next;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getPreviousPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.previous;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.search=function(e){if(e&&e.preventDefault(),!s.state.searchKeyword)return s.props.history.push({pathname:"/myValidations",state:{tab:"myval"}}),s.clearAllSearchFilters(),!1;if(s.state.searchKeyword&&0===s.state.searchKeyword.length)return s.props.history.push({pathname:"/myValidations",state:{tab:"myval"}}),s.getAllResults(),!1;var t=s.state.facetSearchKeyword;return s.state.facetSearchKeyword?s.props.history.push("/myValidations/".concat(encodeURIComponent(s.state.searchKeyword),"?").concat(t)):s.props.history.push("/myValidations/".concat(encodeURIComponent(s.state.searchKeyword))),!1},s.handleChange=function(e){s.state.source&&s.state.source.cancel("");var t=e.target.value;if(s.setState({searchKeyword:t}),0===t.length)return s.clearAllSearchFilters(),!1},s.handleFacetChange=function(e){if(0===e.length)return s.getAllResults(),!1;e=e.split("=")[0]+"="+encodeURIComponent(e.split("=")[1]);var t=s.state.facetSearchKeyword;return t.length>1&&-1===t.indexOf(e)?(e="".concat(t,"&").concat(e),s.setState({facetSearchKeyword:e})):t.length>1&&-1!==t.indexOf(e)?(e="".concat(t),s.setState({facetSearchKeyword:e})):""===t&&s.setState({facetSearchKeyword:e}),s.props.history.push("?".concat(e)),s.isUnmound=!0,s.setState({loading:!0}),s.state.searchKeyword?j().get((0,C.VG)(s.state.searchKeyword||"",e)).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:e,loading:!1})})).catch((function(e){s.setState({loading:!1})})):j().get((0,C.Su)(e)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:"",loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1},s.unselectFacet=function(e){var t=s.state.facetSearchKeyword,a=nt.parse(t),n=e.split("="),i=(0,Ge.Z)(n,2),r=i[0],l=i[1];if("username"===r)l.trim()?a[r]=l:delete a[r];else if(a[r])if(Array.isArray(a[r])){var c=a[r].indexOf(l);a[r].splice(c,1),0===a[r].length&&delete a[r]}else delete a[r];var o="";if(Object.keys(a).length>0){for(var d=0,u=Object.entries(a);d<u.length;d++){var h=(0,Ge.Z)(u[d],2),m=h[0],p=h[1];if("page"!==m)if(Array.isArray(p))for(var f=0;f<p.length;f++)o+=m+"="+encodeURIComponent(p[f])+"&";else o+=m+"="+encodeURIComponent(p)+"&"}o.endsWith("&")&&(o=o.substring(0,o.lastIndexOf("&")))}for(var x=[],y=0,g=Object.entries(a);y<g.length;y++){var v=(0,Ge.Z)(g[y],2),_=v[0],Z=v[1];"username"===_?x.push("username"):"has_data__term"===_?x.push("has_data__term"+Z):"metadata_valid__term"===_?x.push("metadata_valid__term"+Z):"legally_valid__term"===_?x.push("legally_valid__term"+Z):"functional_service__term"===_?x.push("functional_service__term"+Z):x.push(Z)}return s.setState({selectedFacets:x}),s.props.history.push("?".concat(o)),j().get((0,C.VG)(s.state.searchKeyword||"",o)).then((function(e){s.setState({data:e.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:o,loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1},s.clearAllSearchFilters=function(){s.state.source&&s.state.source.cancel("");var e=j().CancelToken.source();return s.setState({source:e}),s.setState({searchKeyword:"",facetSearchKeyword:"",selectedFacets:[]}),s.setState({loading:!0}),s.props.history.push({pathname:"/myValidations",state:{tab:"myval"}}),s.isUnmound=!0,s.clearChekcedList(),s.clearSortedBy(),j().get(C.Cr).then((function(e){s.isUnmound&&(s.setState(e),s.setState({searchKeyword:"",selectedFacets:[],facetSearchKeyword:"",loading:!1}))})).catch((function(e){s.setState({loading:!1})}
1)),!1},s.markFacetAsSelected=function(e){-1===s.state.selectedFacets.indexOf(e)&&s.setState((function(t){return{selectedFacets:[].concat((0,v.Z)(t.selectedFacets),[e])}})),s.clearChekcedList()},s.handleUnselectedFacet=function(e){var t=(0,v.Z)(s.state.selectedFacets);t.splice(e,1),s.setState({selectedFacets:t}),s.clearChekcedList()},s.addCheckedResource2List=function(e){var t=s.state.checkedList;t.push(e),s.setState({checkedList:t})},s.addAllCheckedResource2List=function(){s.setState({isCheckAll:!s.state.isCheckAll}),s.state.data.results.map((function(e){return s.addCheckedResource2List(e)}))},s.removeAllResourceFromCheckedList=function(){s.setState({isCheckAll:!1}),s.setState({checkedList:[]})},s.handleCheckAll=function(e){e.target.checked?s.addAllCheckedResource2List(s.state.resourceData):s.removeAllResourceFromCheckedList(s.state.resourceData)},s.removeResourceFromCheckedList=function(e){var t=s.state.checkedList;t=t.filter((function(t){return t.id!==e.id})),s.setState({checkedList:t})},s.clearChekcedList=function(){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearSortedBy()},s.updateRecords=function(e){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearAllSearchFilters()},s.clearSortedBy=function(){s.setState({sortBy:""})},s.sortBy=function(e){if(e){var t=e.value,a=s.state.sortBy;if(s.setState({sortBy:e}),t!==a){var n=s.state.facetSearchKeyword?"".concat(s.state.facetSearchKeyword,"&").concat(t):"".concat(t);s.state.source&&s.state.source.cancel("");var i=j().CancelToken.source();s.setState({source:i,loading:!0}),s.props.history.push("?".concat(n)),s.isUnmound=!0,s.state.searchKeyword?j().get((0,C.VG)(s.state.searchKeyword||"",n)).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.Su)(n)).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))}}},s.state={data:"",width:window.innerWidth,searchKeyword:s.getInitialSearchKeyword(),facetSearchKeyword:"",selectedFacets:[],keycloak:e.keycloak,source:null,loading:!1,checkedList:[],sortBy:"",isCheckAll:!1},s.isUnmound=!1,s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){if(window.addEventListener("resize",this.handleWindowSizeChange),this.props.match.params&&this.props.match.params.term){var e=this.props.match.params.term;this.getKeywordBasedSearchResults(e)}else this.getAllResults()}},{key:"componentWillUnmount",value:function(){this.isUnmound=!1,window.removeEventListener("resize",this.handleWindowSizeChange)}},{key:"componentDidUpdate",value:function(e,t){var a=this.props&&this.props.match&&this.props.match.params&&this.props.match.params.term;a!==(e.match&&e.match.params&&e.match.params.term)&&(a?this.getKeywordBasedSearchResults(a):this.getAllResults())}},{key:"render",value:function(){var e,t,a,s,n,i,r,l,c,o,d=this;return(0,F.jsxs)("div",{children:[(0,F.jsx)(me.q,{children:(0,F.jsxs)("title",{children:["ELG ",y.Z.dashboard_my_validations]})}),(0,F.jsxs)("section",{className:"wd-100",style:{cursor:this.state.loading?"progress":""},children:[(0,F.jsx)("div",{className:"empty"}),(0,F.jsx)(S.Z,{elevation:3,className:"dashboard-content",children:(0,F.jsxs)(k.Z,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,container:!0,xs:12,spacing:3,className:"dashboard_searchClass",direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,F.jsx)("form",{onSubmit:this.search,className:"dashboard_searchClass_form",children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:3,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:9,sm:9,children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchPlaceholder",defaultMessage:y.Z.dashboard_search_box,children:function(e){return(0,F.jsx)(le.Z,{type:"search",className:"search-box__input",value:decodeURIComponent(d.state.searchKeyword),onChange:d.handleChange,placeholder:e})}})}),(0,F.jsx)(k.Z,{item:!0,xs:3,sm:3,children:(0,F.jsx)(ae.Z,{onClick:this.search,className:"inner
1-link-outlined--teal wd-100",children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchButton",defaultMessage:y.Z.search})})})]})})}),(0,F.jsxs)(k.Z,{item:!0,container:!0,alignItems:"flex-start",xs:12,spacing:3,sm:12,className:"dashboard-results-area",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:3,className:"search-results-container",children:[(0,F.jsx)(he.Z,{only:["lg","md","sm","xl"],children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:(0,F.jsxs)(ce.Z,{children:[(0,F.jsx)(oe.Z,{expandIcon:(0,F.jsx)(ue.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,F.jsx)(b.Z,{children:" Filters "})}),(0,F.jsx)(de.Z,{children:(0,F.jsx)("div",{children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet,tab:"myval"})})})]})})}),(0,F.jsx)(he.Z,{only:"xs",children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet,tab:"myval"})})})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:9,sm:9,alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,justifyContent:"flex-end",alignItems:"center",spacing:2,className:"DashboardResultsCount",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:3,alignItems:"center",justifyContent:"space-between",children:[(0,F.jsx)(k.Z,{item:!0,sm:2,children:(0,F.jsx)(H.Z,{checked:this.state.isCheckAll,size:"small",onChange:function(e){d.handleCheckAll(e)}})}),(0,F.jsxs)(k.Z,{item:!0,xs:10,children:[" ",(0,F.jsx)(b.Z,{variant:"h4",className:"grey--font",children:"Select All"})," "]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:9,alignItems:"center",justifyContent:"flex-end",spacing:1,children:[(0,F.jsx)(k.Z,{item:!0,sm:8,children:(0,F.jsx)(at,{checkedList:this.state.checkedList,updateRecords:this.updateRecords})}),(0,F.jsx)(k.Z,{item:!0,sm:3,children:(0,F.jsxs)("span",{className:"text-small",style:{float:"right"},children:[this.state.data.count,"\xa0search results ","".concat(null!==(e=this.props)&&void 0!==e&&null!==(t=e.match)&&void 0!==t&&null!==(a=t.params)&&void 0!==a&&a.term&&(null===(s=this.props)||void 0===s||null===(n=s.match)||void 0===n||null===(i=n.params)||void 0===i||null===(r=i.term)||void 0===r?void 0:r.length)>=3?"for ".concat(decodeURIComponent(null===(l=this.props)||void 0===l||null===(c=l.match)||void 0===c||null===(o=c.params)||void 0===o?void 0:o.term)):""),this.state.loading?(0,F.jsx)(Q.Z,{size:20}):void 0]})}),(0,F.jsx)(k.Z,{item:!0,sm:1,children:(0,F.jsx)(st,{sortBy:this.sortBy,selectedValue:this.state.sortBy})})]})]}),(0,F.jsx)(k.Z,{container:!0,className:"CardContainer",alignItems:"stretch",direction:"row",justifyContent:"center",children:this.state.data.results&&this.state.data.results.map((function(e,t){return(0,F.jsx)(He,{resource:e,keycloak:d.state.keycloak,addCheckedResource2List:d.addCheckedResource2List,removeResourceFromCheckedList:d.removeResourceFromCheckedList,checkedList:d.state.checkedList,updateRecords:d.updateRecords},JSON.stringify(e))}))})]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,className:"botomMargin pt-3",justifyContent:"center",alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,children:[" ",this.state.data.previous&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getPreviousPage,classes:{root:"inner-link-outlined--teal"},children:["\u2190",(0,F.jsx)(Z.Z,{id:"searchCatalogue.previousPage",defaultMessage:y.Z.previous})," "]})]}),(0,F.jsxs)(k.Z,{item:!0,xs:6,sm:8,children:[null,(0,F.jsx)("div",{children:null})]}),(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,style:{textAlign:"right"},children:[" ",this.state.data.next&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getNextPage,classes:{root:"inner
1-link-outlined--teal"},children:[(0,F.jsx)(Z.Z,{id:"searchCatalogue.nextPage",defaultMessage:y.Z.next})," \u2192"]})]})]})]})})]})]})}}]),a}(f.Component),rt=it,lt=a(393),ct=a(87977),ot=a(46396),dt=a(19106),ut=a(36060),ht=a(23405),mt=a(53446),pt=a(38227),ft=a(33623),xt=a(36075),yt=a(42138),gt=a(11178),vt=[{key:"start_at",display_value:"Started"},{key:"duration",display_value:"Duration (seconds)"},{key:"bytes",display_value:"Bytes"},{key:"status",display_value:"Status"},{key:"mapped_call_type",display_value:"Call type"}],_t=["#299ba3","#7c5cd6","#636e7b"],jt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).getData=function(){var e=j().CancelToken.source();s.setState({source:e,loading:!0}),j().get((0,C.aM)(s.props.resource.item_id),null,{cancelToken:e.token}).then((function(e){s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){console.log("error while fetching expanded data"),s.setState({source:null,loading:!1,data:null})}))},s.disableDisplay=function(){s.setState({showDialogue:!1}),s.props.handleExpandeView(!1)},s.formatDate=function(e){return new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(e))},s.formatDuration=function(e){return new Intl.NumberFormat("en-GB").format(e)},s.formatStatus=function(e){return"succeeded"===e?(0,F.jsx)(N.Z,{size:"small",label:"succeeded",className:"ChipTagGreen"}):(0,F.jsx)(N.Z,{size:"small",label:e,className:"ChipTagLightPink"})},s.createchartdata=function(){var e=[];try{var t=new Set,a=new Map;s.state.data.map((function(e,s){if(t.add(e.status),a.has(e.status)){var n=a.get(e.status);a.set(e.status,n+1)}else a.set(e.status,1);return e}));for(var n=(0,v.Z)(t),i=0;i<=n.length;i++)e.push({name:n[i],value:a.get(n[i])});return e.filter((function(e){return e.name}))}catch(r){return[]}},s.renderCustomizedLabel=function(e){var t=e.cx,a=e.cy,s=e.midAngle,n=e.innerRadius,i=e.outerRadius,r=e.percent,l=(e.index,Math.PI/180),c=n+.5*(i-n),o=t+c*Math.cos(-s*l),d=a+c*Math.sin(-s*l);return(0,F.jsx)("text",{x:o,y:d,fill:"white",textAnchor:o>t?"start":"end",dominantBaseline:"central",children:"".concat((100*r).toFixed(0),"%")})},s.renderPieChart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];try{return!e||e&&0===e.length?(0,F.jsx)(F.Fragment,{}):(0,F.jsxs)(F.Fragment,{children:[" Status ",(0,F.jsx)(xt.u,{width:200,height:100,children:(0,F.jsx)(yt.b,{data:e,cx:"50%",cy:"100%",startAngle:180,endAngle:0,innerRadius:30,outerRadius:80,fill:"#9ca5b0",paddingAngle:5,dataKey:"value",nameKey:"name",labelLine:!1,label:s.renderCustomizedLabel,children:e.map((function(e,t){return(0,F.jsx)(gt.b,{fill:_t[t%_t.length]},"cell-".concat(t))}))})})]})}catch(t){return(0,F.jsx)(F.Fragment,{})}},s.tableRender=function(){return(0,F.jsx)(f.Fragment,{children:(0,F.jsx)(k.Z,{container:!0,direction:"row",alignItems:"flex-start",spacing:2,children:(0,F.jsx)(k.Z,{item:!0,xs:12,children:(0,F.jsx)(ht.Z,{component:S.Z,style:{marginBottom:"5%"},children:(0,F.jsxs)(ot.Z,{"aria-label":"Batch service registration table",size:"small",className:"my-items-table",children:[(0,F.jsx)(mt.Z,{children:(0,F.jsx)(pt.Z,{children:vt.map((function(e,t){return(0,F.jsx)(ut.Z,{children:e.display_value},t)}))})}),(0,F.jsx)(dt.Z,{children:s.state.data.sort((function(e,t){return e&&t?new Date(t.start_at)-new Date(e.start_at):0})).map((function(e,t){return(0,F.jsx)(pt.Z,{children:vt.map((function(a,n){return"start_at"===a.key||"end_at"===a.key?(0,F.jsx)(ut.Z,{children:s.formatDate(e[a.key])},t+n+1):"is_latest_usage"===a.key?(0,F.jsx)(ut.Z,{children:e[a.key]?"Yes":"No"},t+n+1):"status"===a.key?(0,F.jsx)(ut.Z,{children:s.formatStatus(e[a.key])},t+n+1):"duration"===a.key?(0,F.jsx)(ut.Z,{children:s.formatDuration(e[a.key])},t+n+1):(0,F.jsx)(ut.Z,{children:e[a.key]},t+n+1)}))},t+JSON.stringify(e))}))})]})})})})})},s.state={data:null,source:null,loading:null,showDialogue:!0},s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){this.getData()}},{key:"componentWillUnmount",value:function(){this.state.source&&this.state.source.cancel("")}},{key:"render",value:function(){var e=this.state.data;return(0,F.jsx)(F.Fragment,{children:(0,F.jsxs)(ge.Z,{open:this.state.showDialogue,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",fullWidth:!0,style:{insetBlockStart:"130px"},children:[(0,F.jsx)(Ze.Z,{align:"center",children:this.props.resource.resource_name}),e?(0,F.jsx)(_e.Z,{children:(0,F.jsxs)(je.Z,{component:"div",children:[this.tableRender(),(0,F.jsx)(F.Fragment,{children:this.renderPieChart(this.createchartdata())})]})}):(0,F.jsx)(F.Fragment,{children:this.state.loading?(0,F.jsx)(ft.Z,{}):"No available information"}),(0,F.jsx)(ve.Z,{children:(0,F.jsx)(ae.Z,{color:"primary",onClick:this.disableDisplay,autoFocus:!0,children:"Cancel"})})]})})}}]),a}(f.PureComponent),Zt=jt,kt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleClick=function(e){s.setState({anchorEl:e.currentTarget})},s.handleClose=function(){s.setState({anchorEl:!1})},s.handleCheck=function(e){e.target.checked?s.props.addCheckedResource2List(s.state.resourceData):s.props.removeResourceFromCheckedList(s.state.resourceData)},s.handleExpand=function(e){s.setState({showExpandView:e})}
1,s.state={resourceData:e.resource,keycloak:e.keycloak,anchorEl:!1,loading:!1,showExpandView:!1},s}return(0,h.Z)(a,[{key:"navigateToResourceDetail",value:function(e){if("draft"!==e.status){var t=(0,C._Q)(e);return t||void 0}}},{key:"render",value:function(){var e=this,t=this.state.resourceData;t.hasOwnProperty("item_id")||Object.assign(t,{item_id:JSON.parse(JSON.stringify(t.id))}),Object.assign(t,{id:t.record_id});var a=this.navigateToResourceDetail(t);return this.state.showExpandView?(0,F.jsx)(Zt,{resource:t,handleExpandeView:this.handleExpand,navigateToResourceDetail:this.navigateToResourceDetail}):(0,F.jsx)(f.Fragment,{children:(0,F.jsx)(S.Z,{className:"DashboardListItem",children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:1,justifyContent:"space-between",alignItems:"center",className:"ResourceListItem--inner",children:[(0,F.jsxs)(k.Z,{item:!0,sm:8,children:[a&&(0,F.jsx)(b.Z,{variant:"h5",className:"ResourceListTitle pt-05",children:(0,F.jsx)(Je.rU,{to:a,children:t.resource_name})}),(0,F.jsx)(k.Z,{item:!0,container:!0,sm:12,children:(0,F.jsxs)(k.Z,{item:!0,sm:8,children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,spacing:1,className:"pb-05 pt-05",children:[t.version&&"undefined"!==t.version&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",className:"grey--font",children:[" Version: ",t.version]})}),(0,F.jsx)(k.Z,{item:!0,children:!0===t.is_active_version&&(0,F.jsx)("div",{children:(0,F.jsx)("span",{className:"badge bg-teal-light mr-05",children:"Active version"})})}),(0,F.jsx)(k.Z,{item:!0,children:!0===t.is_latest_version&&(0,F.jsx)("div",{children:(0,F.jsx)("span",{className:"badge bg-orange-light mr-05",children:"Latest version"})})})]}),t.execution_start?(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:t.execution_start&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",children:["Execution started at:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.execution_start))," "]})})}):void 0,(0,F.jsx)(k.Z,{item:!0,sm:12,container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:t.duration&&(0,F.jsxs)(b.Z,{variant:"caption",className:"pt-05",children:["Duration: ",t.duration," (secs)"]})}),(0,F.jsx)(k.Z,{item:!0,sm:12,container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:t.bytes&&(0,F.jsxs)(b.Z,{variant:"caption",className:"pt-05",children:["Bytes: ",t.bytes]})}),(0,F.jsx)(k.Z,{item:!0,sm:12,container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",children:t.number_of_usages&&(0,F.jsxs)(b.Z,{variant:"caption",className:"pt-05",children:["Number of times used: ",(0,F.jsx)(ct.ZP,{end:t.number_of_usages})]})}),(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"row",justifyContent:"flex-start",alignItems:"flex-start",sm:12,children:"succeeded"===t.status?(0,F.jsx)(N.Z,{size:"small",label:"succeeded",className:"ChipTagGreenOutlined"}):(0,F.jsx)(N.Z,{size:"small",label:t.status,className:"ChipTagLightPinkOutlined"})})]})})]}),(0,F.jsx)(k.Z,{item:!0,sm:4,children:(0,F.jsx)(k.Z,{item:!0,sm:12,style:{textAlign:"center"},children:(0,F.jsx)(ae.Z,{onClick:function(){return e.handleExpand(!0)},classes:{root:"inner-link-outlined--teal"},"aria-controls":"simple-menu","aria-haspopup":"true",disabled:!t.other_usages||t.other_usages&&t.other_usages.length<=0,endIcon:(0,F.jsx)(lt.Z,{}),children:"Show more"})})})]})})})}}]),a}(f.Component),bt=(0,x.EN)(kt),St=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleWindowSizeChange=function(){s.setState({width:window.innerWidth})},s.getInitialSearchKeyword=function(){return s.props.match.params&&s.props.match.params.term?s.props.match.params.term:""},s.getAllResults=function(){s.getKeywordBasedSearchResults(null)},s.getKeywordBasedSearchResults=function(e){var t=s.props.location?s.props.location.search:"";if(t&&(t=t.substring(t.indexOf("?")+1)),t){for(var a=[],n=t.split("&")||[],i=0;i<n.length;i++){var r=n[i].split("=")||[];2===r.length&&-1===a.indexOf(r[1])&&a.push(r[1])}s.setState({facetSearchKeyword:t,selectedFacets:a})}else s.setState({searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[]});s.isUnmound=!0,s.state.source&&s.state.source.cancel("");var l=j().CancelToken.source();s.setState({source:l,loading:!0}),s.clearSortedBy(),t?j().get((0,C.aD)(e||"",t),{cancelToken:l.token}).then((function(a){s.isUnmound&&s.setState({data:a.data,searchKeyword:e||"",facetSearchKeyword:t,source:null,loading:!1})}
1)).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.aD)(e||"","")).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[],source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getNextPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.next;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e,{cancelToken:t.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getPreviousPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.previous;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e,{cancelToken:t.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.search=function(e){e&&e.preventDefault();var t=s.input.current.value;if(s.setState({searchKeyword:t}),!t)return s.props.history.push("/myusage"),s.clearAllSearchFilters(),!1;if(t&&0===t.length)return s.props.history.push("/myusage"),s.getAllResults(),!1;var a=s.state.facetSearchKeyword;return s.state.facetSearchKeyword?s.props.history.push("/myusage/".concat(encodeURIComponent(t),"?").concat(a)):s.props.history.push("/myusage/".concat(encodeURIComponent(t))),!1},s.handleFacetChange=function(e){if(0===e.length)return s.getAllResults(),!1;var t=s.state.facetSearchKeyword;return t.length>1&&-1===t.indexOf(e)?(e="".concat(s.state.facetSearchKeyword,"&").concat(e),s.setState({facetSearchKeyword:e})):t.length>1&&-1!==t.indexOf(e)?(e="".concat(s.state.facetSearchKeyword),s.setState({facetSearchKeyword:e})):""===t&&s.setState({facetSearchKeyword:e}),s.props.history.push("?".concat(e)),s.isUnmound=!0,s.setState({loading:!0}),s.state.searchKeyword?j().get((0,C.aD)(s.state.searchKeyword||"",e)).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:e,loading:!1})})).catch((function(e){s.setState({loading:!1})})):j().get((0,C.YN)(e)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:"",loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1},s.unselectFacet=function(e){var t=s.state.facetSearchKeyword,a=e.split("="),n="".concat(a[0],"=").concat(encodeURIComponent(a[1]));if(n=n.replace("%2F","/"),-1!==t.indexOf(n)&&(e=n),-1!==t.indexOf(e)){var i=t.replace("&".concat(e),"");return i=t.replace("?".concat(e),""),(i=t.replace("".concat(e),"")).startsWith("&")&&(i=i.substring(1)),-1!==i.indexOf("&&")&&(i=i.replace("&&","&")),i.endsWith("&")&&(i=i.substring(0,i.lastIndexOf("&"))),s.setState({facetSearchKeyword:i,loading:!0}),s.props.history.push("?".concat(i)),s.isUnmound=!0,j().get((0,C.aD)(s.state.searchKeyword||"",i)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:i,loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1}},s.clearAllSearchFilters=function(){s.state.source&&s.state.source.cancel("");var e=j().CancelToken.source();return s.setState({source:e}),s.setState({searchKeyword:"",facetSearchKeyword:"",selectedFacets:[]}),s.setState({loading:!0}),s.props.history.push({pathname:"/myusage",state:{tab:"myres"}}),s.isUnmound=!0,s.clearChekcedList(),s.clearSortedBy(),j().get(C.DP,{cancelToken:e.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({searchKeyword:"",selectedFacets:[],facetSearchKeyword:"",loading:!1}))})).catch((function(e){s.setState({loading:!1})})),!1},s.markFacetAsSelected=function(e){-1===s.state.selectedFacets.indexOf(e)&&s.setState((function(t){return{selectedFacets:[].concat((0,v.Z)(t.selectedFacets),[e])}})),s.clearChekcedList()},s.handleUnselectedFacet=function(e){var t=(0,v.Z)(s.state.selectedFacets);t.splice(e,1),s.setState({selectedFacets:t}),s.clearChekcedList()},s.addCheckedResource2List=function(e){var t=s.state.checkedList;t.push(e),s.setState({checkedList:t})},s.addAllCheckedResource2List=function(){s.setState({isCheckAll:!s.state.isCheckAll}),s.state.data.results.map((function(e){return s.addCheckedResource2List(e)}))},s.removeAllResourceFromCheckedList=function(){s.setState({isCheckAll:!1}),s.setState({checkedList:[]})},s.handleCheckAll=function(e){e.target.checked?s.addAllCheckedResource2List(s.state.resourceData):s.removeAllResourceFromCheckedList(s.state.resourceData)},s.removeResourceFromCheckedList=function(e){var t=s.state.checkedList;t=t.filter((function(t){return t.id!==e.id})),s.setState({checkedList:t})},s.clearChekcedList=function(){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearSortedBy()},s.updateRecords=function(e){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearAllSearchFilters()},s.clearSortedBy=function(){s.setState({sortBy:""})},s.sortBy=function(e){if(e){var t=e.value,a=s.state.sortBy;if(s.setState({sortBy:e}),t!==a){var n=s.state.facetSearchKeyword?"".concat(s.state.facetSearchKeyword,"&").concat(t):"".concat(t);s.state.source&&s.state.source.cancel("");var i=j().CancelToken.source();s.setState({source:i,loading:!0}),s.props.history.push("?".concat(n)),s.state.searchKeyword?j().get((0,C.aD)(s.state.searchKeyword||"",n),{cancelToken:i.token}).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})}
1)).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.YN)(n),{cancelToken:i.token}).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))}}},s.state={data:"",width:window.innerWidth,searchKeyword:s.getInitialSearchKeyword(),facetSearchKeyword:"",selectedFacets:[],keycloak:e.keycloak,source:null,loading:!1,checkedList:[],sortBy:"",isCheckAll:!1},s.isUnmound=!1,s.input=f.createRef(),s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){if(window.addEventListener("resize",this.handleWindowSizeChange),this.props.match.params&&this.props.match.params.term){var e=this.props.match.params.term;this.getKeywordBasedSearchResults(e)}else this.getAllResults()}},{key:"componentWillUnmount",value:function(){this.isUnmound=!1,window.removeEventListener("resize",this.handleWindowSizeChange)}},{key:"componentDidUpdate",value:function(e,t){var a=this.props&&this.props.match&&this.props.match.params&&this.props.match.params.term;a!==(e.match&&e.match.params&&e.match.params.term)&&(a?this.getKeywordBasedSearchResults(a):this.getAllResults())}},{key:"render",value:function(){var e,t,a,s,n,i,r,l,c,o,d=this;return(0,F.jsxs)("div",{children:[(0,F.jsx)(me.q,{children:(0,F.jsx)("title",{children:"European Language Grid My Usage"})}),(0,F.jsxs)("section",{className:"wd-100",style:{cursor:this.state.loading?"progress":""},children:[(0,F.jsx)("div",{className:"empty"}),(0,F.jsx)(S.Z,{elevation:3,className:"dashboard-content",children:(0,F.jsxs)(k.Z,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,container:!0,xs:12,spacing:3,className:"dashboard_searchClass",direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,F.jsx)("form",{onSubmit:this.search,className:"dashboard_searchClass_form",children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:3,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:9,children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchPlaceholder",defaultMessage:y.Z.dashboard_search_box,children:function(e){return(0,F.jsx)(le.Z,{type:"search",className:"search-box__input",innerRef:d.input,defaultValue:decodeURIComponent(d.state.searchKeyword),placeholder:e,onChange:function(){var e;null!==(e=d.input.current.value)&&void 0!==e&&e.length||d.search()}})}})}),(0,F.jsx)(k.Z,{item:!0,xs:3,children:(0,F.jsx)(ae.Z,{onClick:this.search,className:"inner-link-outlined--teal wd-100",children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchButton",defaultMessage:y.Z.search})})})]})})}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,spacing:3,sm:12,className:"dashboard-results-area",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:3,className:"search-results-container",children:[(0,F.jsx)(he.Z,{only:["lg","md","sm","xl"],children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:(0,F.jsxs)(ce.Z,{children:[(0,F.jsx)(oe.Z,{expandIcon:(0,F.jsx)(ue.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,F.jsx)(b.Z,{children:" Filters "})}),(0,F.jsx)(de.Z,{children:(0,F.jsx)("div",{children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet})})})]})})}),(0,F.jsx)(he.Z,{only:"xs",children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet})})})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:9,alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,justifyContent:"flex-end",alignItems:"center",spacing:2,className:"DashboardResultsCount",children:[(0,F.jsx)(k.Z,{item:!0,sm:8,children:(0,F.jsx)(Be,{checkedList:this.state.checkedList,updateRecords:this.updateRecords})}),(0,F.jsx)(k.Z,{item:!0,sm:3,children:(0,F.jsxs)("span",{className:"text-small",style:{float:"right"},children:[this.state.data.count,"\xa0search results ","".concat(null!==(e=this.props)&&void 0!==e&&null!==(t=e.match)&&void 0!==t&&null!==(a=t.params)&&void 0!==a&&a.term&&(null===(s=this.props)||void 0===s||null===(n=s.match)||void 0===n||null===(i=n.params)||void 0===i||null===(r=i.term)||void 0===r?void 0:r.length)>=3?"for ".concat(decodeURIComponent(null===(l=this.props)||void 0===l||null===(c=l.match)||void 0===c||null===(o=c.params)||void 0===o?void 0:o.term)):""),this.state.loading?(0,F.jsx)(Q.Z,{size:20}):void 0]})}),(0,F.jsx)(k.Z,{item:!0,sm:1,children:(0,F.jsx)(Ve,{sortBy:this.sortBy,selectedValue:this.state.sortBy,called_by_component:"myUsage"})})]}
1),(0,F.jsx)(k.Z,{container:!0,className:"CardContainer",alignItems:"stretch",direction:"row",justifyContent:"center",children:this.state.data.results&&this.state.data.results.map((function(e,t){return(0,F.jsx)(bt,{resource:e,keycloak:d.state.keycloak},JSON.stringify(e))}))})]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,className:"botomMargin pt-3",justifyContent:"center",alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,children:[" ",this.state.data.previous&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getPreviousPage,classes:{root:"inner-link-outlined--teal"},children:["\u2190",(0,F.jsx)(Z.Z,{id:"searchCatalogue.previousPage",defaultMessage:y.Z.previous})," "]})]}),(0,F.jsxs)(k.Z,{item:!0,xs:6,sm:8,children:[null,(0,F.jsx)("div",{children:null})]}),(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,style:{textAlign:"right"},children:[" ",this.state.data.next&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getNextPage,classes:{root:"inner-link-outlined--teal"},children:[(0,F.jsx)(Z.Z,{id:"searchCatalogue.nextPage",defaultMessage:y.Z.next})," \u2192"]})]})]})]})})]})]})}}]),a}(f.Component),wt=St,Ct=a(12285),Nt=a(54070),Ft=[{key:"downloaded_at",display_value:"Downloaded"},{key:"mapped_source_of_download",display_value:"Source"},{key:"licenses",display_value:"Licences"},{key:"download",display_value:"Download"}],Rt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).getData=function(){var e=j().CancelToken.source();s.setState({source:e,loading:!0}),j().get((0,C.fr)(s.props.resource.item_id),null,{cancelToken:e.token}).then((function(e){s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){console.log("error while fetching expanded data"),s.setState({source:null,loading:!1,data:null})}))},s.disableDisplay=function(){s.setState({showDialogue:!1}),s.props.handleExpandeView(!1)},s.formatDate=function(e){return new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(e))},s.tableRender=function(){return(0,F.jsx)(f.Fragment,{children:(0,F.jsx)(k.Z,{container:!0,direction:"row",alignItems:"flex-start",spacing:2,children:(0,F.jsx)(k.Z,{item:!0,xs:12,children:(0,F.jsx)(ht.Z,{component:S.Z,style:{marginBottom:"5%"},children:(0,F.jsxs)(ot.Z,{"aria-label":"Batch service registration table",size:"small",children:[(0,F.jsx)(mt.Z,{children:(0,F.jsx)(pt.Z,{children:Ft.map((function(e,t){return(0,F.jsx)(ut.Z,{children:e.display_value},t)}))})}),(0,F.jsx)(dt.Z,{children:s.state.data.sort((function(e,t){return e&&t?new Date(t.downloaded_at)-new Date(e.downloaded_at):0})).map((function(e,t){var a=e.downloaded_distribution_id,n=e.metadata_record,i=e.file_name&&e.file_name.substring(e.file_name.lastIndexOf("/")+1),r=a&&i&&!s.state.loading;return(0,F.jsx)(pt.Z,{children:Ft.map((function(l,c){if("downloaded_at"===l.key)return(0,F.jsx)(ut.Z,{children:s.formatDate(e[l.key])},t+c+1);if("is_latest_download"===l.key)return(0,F.jsx)(ut.Z,{children:e[l.key]?"Yes":"No"},t+c+1);if("licenses"===l.key){var o=e[l.key].map((function(a,s){return(0,F.jsx)("div",{children:a},a+s+t+e.id)}));return(0,F.jsx)(ut.Z,{children:o},t+c+1)}return"download"===l.key?(0,F.jsx)(ut.Z,{children:(0,F.jsx)("span",{children:(0,F.jsxs)(Nt.Z,{disabled:!r,onClick:function(){s.handleAccept(n,a,e.file_name)},children:[(0,F.jsx)(Ct.Z,{fontSize:"small"}),(0,F.jsx)(b.Z,{variant:"caption",className:"grey--font",children:i})]})})},t+c+1):(0,F.jsx)(ut.Z,{children:e[l.key]},t+c+1)}))},t+JSON.stringify(e))}))})]})})})})})},s.state={data:null,source:null,loading:null,showDialogue:!0,s3URL:null},s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){this.getData()}},{key:"handleAccept",value:function(e,t,a){var s=this,n=j().CancelToken.source();this.setState({source:n,loading:!0}),j().post((0,C.Im)(e),null,{headers:{"Cache-Control":"no-store, max-age=0",Pragma:"no-cache",Expires:"Wed, 21 Oct 2015 07:28:00 GMT",filename:a,"elg-resource-distribution-id":t,"ACCEPT-LICENCE":!0},cancelToken:n.token}).then((function(e){s.setState({s3URL:e.data["s3-url"],source:null,loading:!1})}
1)).catch((function(e){console.log("error while downloading"),s.setState({source:null,loading:!1,"s3-url":null})}))}},{key:"render",value:function(){var e=this.state.data;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(ge.Z,{open:this.state.showDialogue,onClose:this.disableDisplay,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",maxWidth:"xl",fullWidth:!0,style:{insetBlockStart:"130px"},children:[(0,F.jsx)(Ze.Z,{align:"center",children:this.props.resource.resource_name}),e?(0,F.jsx)(_e.Z,{children:(0,F.jsx)(je.Z,{component:"div",children:this.tableRender()})}):(0,F.jsx)(F.Fragment,{children:this.state.loading?(0,F.jsx)(ft.Z,{}):"No available information"}),(0,F.jsx)(ve.Z,{children:(0,F.jsx)(ae.Z,{color:"primary",onClick:this.disableDisplay,autoFocus:!0,children:"Cancel"})})]}),this.state.s3URL&&(0,F.jsx)("div",{style:{display:"none"},children:(0,F.jsx)("iframe",{title:"Download Reource",src:this.state.s3URL})})]})}}]),a}(f.PureComponent),At=Rt,Kt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).togglexpandedLicence=function(){s.setState({expandedLicence:!s.state.expandedLicence})},s.navigateToResourceDetail=function(e){if("draft"!==e.status){var t=(0,C._Q)(e);return t||void 0}},s.handleExpand=function(e){s.setState({showExpandView:e})},s.state={resourceData:e.resource,expandedLicence:!1,keycloak:e.keycloak,anchorEl:!1,loading:!1,source:null,s3URL:null,showExpandView:!1},s}return(0,h.Z)(a,[{key:"componentWillUnmount",value:function(){this.state.source&&this.state.source.cancel("")}},{key:"handleAccept",value:function(e,t,a){var s=this,n=j().CancelToken.source();this.setState({source:n,loading:!0}),j().post((0,C.Im)(e),null,{headers:{"Cache-Control":"no-store, max-age=0",Pragma:"no-cache",Expires:"Wed, 21 Oct 2015 07:28:00 GMT",filename:a,"elg-resource-distribution-id":t,"ACCEPT-LICENCE":!0},cancelToken:n.token}).then((function(e){s.setState({s3URL:e.data["s3-url"],source:null,loading:!1})})).catch((function(e){console.log("error while downloading"),s.setState({source:null,loading:!1,"s3-url":null})}))}},{key:"render",value:function(){var e=this,t=this.state.resourceData;t.hasOwnProperty("item_id")||Object.assign(t,{item_id:JSON.parse(JSON.stringify(t.id))}),Object.assign(t,{id:t.record_id});t.distribution_id;var a=this.navigateToResourceDetail(t),s={resource:t};return this.state.showExpandView?(0,F.jsx)(At,{resource:t,handleExpandeView:this.handleExpand,navigateToResourceDetail:this.navigateToResourceDetail}):(0,F.jsxs)(f.Fragment,{children:[(0,F.jsx)(S.Z,{className:"DashboardListItem",children:(0,F.jsxs)(k.Z,{item:!0,sm:12,container:!0,spacing:1,justifyContent:"space-between",alignItems:"center",className:"ResourceListItem--inner",children:[(0,F.jsxs)(k.Z,{item:!0,sm:8,children:[a&&(0,F.jsx)(b.Z,{variant:"h5",className:"ResourceListTitle pt-05",children:(0,F.jsx)(Je.rU,{to:a,children:t.resource_name})}),(0,F.jsxs)(k.Z,{item:!0,container:!0,sm:12,children:[(0,F.jsxs)(k.Z,{item:!0,sm:12,children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,spacing:1,className:"pb-05 pt-05",children:[t.version&&"undefined"!==t.version&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",className:"grey--font",children:[" Version: ",t.version," "]})}),(0,F.jsx)(k.Z,{item:!0,children:!0===t.is_latest_version&&(0,F.jsx)("div",{children:(0,F.jsx)("span",{className:"badge bg-orange-light mr-05",children:"latest version"})})}),(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",className:"grey--font",children:[t.file_name&&t.file_name.substring(t.file_name.lastIndexOf("/")+1)," "]})})]}),t.download_date?(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:t.download_date&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",children:["downloaded at:\xa0",new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"long",day:"2-digit"}).format(new Date(t.download_date))," "]})})}):void 0,t.number_of_downloads&&(0,F.jsx)(k.Z,{item:!0,container:!0,direction:"column",justifyContent:"flex-start",alignItems:"flex-start",children:t.number_of_downloads&&(0,F.jsx)(k.Z,{item:!0,children:(0,F.jsxs)(b.Z,{variant:"caption",children:["Number of downloads:\xa0",(0,F.jsx)(ct.ZP,{end:t.number_of_downloads,delay:1})]})})})]}),!1]})]}),(0,F.jsx)(k.Z,{item:!0,sm:4,children:(0,F.jsx)(k.Z,{item:!0,sm:12,style:{textAlign:"center"},children:(0,F.jsx)(ae.Z,{onClick:function(){return e.handleExpand(!0)}
1,classes:{root:"inner-link-outlined--teal"},"aria-controls":"simple-menu","aria-haspopup":"true",disabled:!s||s&&s.length<=0,endIcon:(0,F.jsx)(lt.Z,{}),children:"Show more"})})})]})}),this.state.s3URL&&(0,F.jsx)("div",{style:{display:"none"},children:(0,F.jsx)("iframe",{title:"Download Reource",src:this.state.s3URL})})]})}}]),a}(f.Component),It=(0,x.EN)(Kt),Lt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;return(0,u.Z)(this,a),(s=t.call(this,e)).handleWindowSizeChange=function(){s.setState({width:window.innerWidth})},s.getInitialSearchKeyword=function(){return s.props.match.params&&s.props.match.params.term?s.props.match.params.term:""},s.getAllResults=function(){s.getKeywordBasedSearchResults(null)},s.getKeywordBasedSearchResults=function(e){var t=s.props.location?s.props.location.search:"";if(t&&(t=t.substring(t.indexOf("?")+1)),t){for(var a=[],n=t.split("&")||[],i=0;i<n.length;i++){var r=n[i].split("=")||[];2===r.length&&-1===a.indexOf(r[1])&&a.push(r[1])}s.setState({facetSearchKeyword:t,selectedFacets:a})}else s.setState({searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[]});s.isUnmound=!0,s.state.source&&s.state.source.cancel("");var l=j().CancelToken.source();s.setState({source:l,loading:!0}),s.clearSortedBy(),t?j().get((0,C.zw)(e||"",t),{cancelToken:l.token}).then((function(a){s.isUnmound&&s.setState({data:a.data,searchKeyword:e||"",facetSearchKeyword:t,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.zw)(e||"","")).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:e||"",facetSearchKeyword:"",selectedFacets:[],source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getNextPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.next;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e,{cancelToken:t.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.getPreviousPage=function(){s.isUnmound=!0,s.setState({isCheckAll:!1});var e=s.state.data.previous;s.state.source&&s.state.source.cancel("");var t=j().CancelToken.source();s.setState({source:t,loading:!0}),j().get(e,{cancelToken:t.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({source:null,loading:!1}))})).catch((function(e){s.setState({source:null,loading:!1})}))},s.search=function(e){e&&e.preventDefault();var t=s.input.current.value;if(s.setState({searchKeyword:t}),!t)return s.props.history.push("/mydownloads"),s.clearAllSearchFilters(),!1;if(t&&0===t.length)return s.props.history.push("/mydownloads"),s.getAllResults(),!1;var a=s.state.facetSearchKeyword;return s.state.facetSearchKeyword?s.props.history.push("/mydownloads/".concat(encodeURIComponent(t),"?").concat(a)):s.props.history.push("/mydownloads/".concat(encodeURIComponent(t))),!1},s.handleFacetChange=function(e){if(0===e.length)return s.getAllResults(),!1;var t=s.state.facetSearchKeyword;return t.length>1&&-1===t.indexOf(e)?(e="".concat(s.state.facetSearchKeyword,"&").concat(e),s.setState({facetSearchKeyword:e})):t.length>1&&-1!==t.indexOf(e)?(e="".concat(s.state.facetSearchKeyword),s.setState({facetSearchKeyword:e})):""===t&&s.setState({facetSearchKeyword:e}),s.props.history.push("?".concat(e)),s.isUnmound=!0,s.setState({loading:!0}),s.state.searchKeyword?j().get((0,C.zw)(s.state.searchKeyword||"",e)).then((function(t){s.isUnmound&&s.setState({data:t.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:e,loading:!1})})).catch((function(e){s.setState({loading:!1})})):j().get((0,C.RQ)(e)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:"",loading:!1})})).catch((function(e){s.setState({loading:!1})})),!1},s.unselectFacet=function(e){var t=s.state.facetSearchKeyword,a=e.split("="),n="".concat(a[0],"=").concat(encodeURIComponent(a[1]));if(n=n.replace("%2F","/"),-1!==t.indexOf(n)&&(e=n),-1!==t.indexOf(e)){var i=t.replace("&".concat(e),"");return i=t.replace("?".concat(e),""),(i=t.replace("".concat(e),"")).startsWith("&")&&(i=i.substring(1)),-1!==i.indexOf("&&")&&(i=i.replace("&&","&")),i.endsWith("&")&&(i=i.substring(0,i.lastIndexOf("&"))),s.setState({facetSearchKeyword:i,loading:!0}),s.props.history.push("?".concat(i)),s.isUnmound=!0,j().get((0,C.zw)(s.state.searchKeyword||"",i)).then((function(e){s.isUnmound&&s.setState({data:e.data,searchKeyword:s.state.searchKeyword||"",facetSearchKeyword:i,loading:!1})}
1)).catch((function(e){s.setState({loading:!1})})),!1}},s.clearAllSearchFilters=function(){s.state.source&&s.state.source.cancel("");var e=j().CancelToken.source();return s.setState({source:e}),s.setState({searchKeyword:"",facetSearchKeyword:"",selectedFacets:[]}),s.setState({loading:!0}),s.props.history.push({pathname:"/mydownloads",state:{tab:"myres"}}),s.isUnmound=!0,s.clearChekcedList(),s.clearSortedBy(),j().get(C.bU,{cancelToken:e.token}).then((function(e){s.isUnmound&&(s.setState(e),s.setState({searchKeyword:"",selectedFacets:[],facetSearchKeyword:"",loading:!1}))})).catch((function(e){s.setState({loading:!1})})),!1},s.markFacetAsSelected=function(e){-1===s.state.selectedFacets.indexOf(e)&&s.setState((function(t){return{selectedFacets:[].concat((0,v.Z)(t.selectedFacets),[e])}})),s.clearChekcedList()},s.handleUnselectedFacet=function(e){var t=(0,v.Z)(s.state.selectedFacets);t.splice(e,1),s.setState({selectedFacets:t}),s.clearChekcedList()},s.addCheckedResource2List=function(e){var t=s.state.checkedList;t.push(e),s.setState({checkedList:t})},s.addAllCheckedResource2List=function(){s.setState({isCheckAll:!s.state.isCheckAll}),s.state.data.results.map((function(e){return s.addCheckedResource2List(e)}))},s.removeAllResourceFromCheckedList=function(){s.setState({isCheckAll:!1}),s.setState({checkedList:[]})},s.handleCheckAll=function(e){e.target.checked?s.addAllCheckedResource2List(s.state.resourceData):s.removeAllResourceFromCheckedList(s.state.resourceData)},s.removeResourceFromCheckedList=function(e){var t=s.state.checkedList;t=t.filter((function(t){return t.id!==e.id})),s.setState({checkedList:t})},s.clearChekcedList=function(){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearSortedBy()},s.updateRecords=function(e){s.setState({checkedList:[]}),s.setState({isCheckAll:!1}),s.clearAllSearchFilters()},s.clearSortedBy=function(){s.setState({sortBy:""})},s.sortBy=function(e){if(e){var t=e.value,a=s.state.sortBy;if(s.setState({sortBy:e}),t!==a){var n=s.state.facetSearchKeyword?"".concat(s.state.facetSearchKeyword,"&").concat(t):"".concat(t);s.state.source&&s.state.source.cancel("");var i=j().CancelToken.source();s.setState({source:i,loading:!0}),s.props.history.push("?".concat(n)),s.state.searchKeyword?j().get((0,C.zw)(s.state.searchKeyword||"",n),{cancelToken:i.token}).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})})):j().get((0,C.RQ)(n),{cancelToken:i.token}).then((function(e){s.isUnmound&&s.setState({data:e.data,source:null,loading:!1})})).catch((function(e){s.setState({source:null,loading:!1})}))}}},s.state={data:"",width:window.innerWidth,searchKeyword:s.getInitialSearchKeyword(),facetSearchKeyword:"",selectedFacets:[],keycloak:e.keycloak,source:null,loading:!1,checkedList:[],sortBy:"",isCheckAll:!1},s.isUnmound=!1,s.input=f.createRef(),s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){if(window.addEventListener("resize",this.handleWindowSizeChange),this.props.match.params&&this.props.match.params.term){var e=this.props.match.params.term;this.getKeywordBasedSearchResults(e)}else this.getAllResults()}},{key:"componentWillUnmount",value:function(){this.isUnmound=!1,window.removeEventListener("resize",this.handleWindowSizeChange)}},{key:"componentDidUpdate",value:function(e,t){var a=this.props&&this.props.match&&this.props.match.params&&this.props.match.params.term;a!==(e.match&&e.match.params&&e.match.params.term)&&(a?this.getKeywordBasedSearchResults(a):this.getAllResults())}},{key:"render",value:function(){var e,t,a,s,n,i,r,l,c,o,d=this;return(0,F.jsxs)("div",{children:[(0,F.jsx)(me.q,{children:(0,F.jsx)("title",{children:"European Language Grid My Usage"})}),(0,F.jsxs)("section",{className:"wd-100",style:{cursor:this.state.loading?"progress":""},children:[(0,F.jsx)("div",{className:"empty"}),(0,F.jsx)(S.Z,{elevation:3,className:"dashboard-content",children:(0,F.jsxs)(k.Z,{container:!0,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,container:!0,xs:12,spacing:3,className:"dashboard_searchClass",direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,F.jsx)("form",{onSubmit:this.search,className:"dashboard_searchClass_form",children:(0,F.jsxs)(k.Z,{item:!0,xs:12,container:!0,spacing:3,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,F.jsx)(k.Z,{item:!0,xs:9,children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchPlaceholder",defaultMessage:y.Z.dashboard_search_box,children:function(e){return(0,F.jsx)(le.Z,{type:"search",className:"search-box__input",innerRef:d.input,defaultValue:decodeURIComponent(d.state.searchKeyword),placeholder:e,onChange:function(){var e;null!==(e=d.input.current.value)&&void 0!==e&&e.length||d.search()}})}})}),(0,F.jsx)(k.Z,{item:!0,xs:3,children:(0,F.jsx)(ae.Z,{onClick:this.search,className:"inner
1-link-outlined--teal wd-100",children:(0,F.jsx)(Z.Z,{id:"searchCatalogue.searchButton",defaultMessage:y.Z.search})})})]})})}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,spacing:3,sm:12,className:"dashboard-results-area",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:3,className:"search-results-container",children:[(0,F.jsx)(he.Z,{only:["lg","md","sm","xl"],children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:(0,F.jsxs)(ce.Z,{children:[(0,F.jsx)(oe.Z,{expandIcon:(0,F.jsx)(ue.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,F.jsx)(b.Z,{children:" Filters "})}),(0,F.jsx)(de.Z,{children:(0,F.jsx)("div",{children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet})})})]})})}),(0,F.jsx)(he.Z,{only:"xs",children:(0,F.jsx)(k.Z,{item:!0,xs:12,className:"left-facets-area",children:this.state.data.facets&&(0,F.jsx)(re,{facets:this.state.data.facets,onSelectKeyword:this.handleFacetChange,onClearAllSearchFilters:this.clearAllSearchFilters,unselectFacet:this.unselectFacet,selectedFacets:this.state.selectedFacets,markFacetAsSelected:this.markFacetAsSelected,handleUnselectedFacet:this.handleUnselectedFacet})})})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:9,alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,justifyContent:"flex-end",alignItems:"center",spacing:2,className:"DashboardResultsCount",children:[(0,F.jsx)(k.Z,{item:!0,xs:8,children:(0,F.jsx)(Be,{checkedList:this.state.checkedList,updateRecords:this.updateRecords})}),(0,F.jsx)(k.Z,{item:!0,sm:3,children:(0,F.jsxs)("span",{className:"text-small",style:{float:"right"},children:[this.state.data.count,"\xa0search results ","".concat(null!==(e=this.props)&&void 0!==e&&null!==(t=e.match)&&void 0!==t&&null!==(a=t.params)&&void 0!==a&&a.term&&(null===(s=this.props)||void 0===s||null===(n=s.match)||void 0===n||null===(i=n.params)||void 0===i||null===(r=i.term)||void 0===r?void 0:r.length)>=3?"for ".concat(decodeURIComponent(null===(l=this.props)||void 0===l||null===(c=l.match)||void 0===c||null===(o=c.params)||void 0===o?void 0:o.term)):""),this.state.loading?(0,F.jsx)(Q.Z,{size:20}):void 0]})}),(0,F.jsx)(k.Z,{item:!0,sm:1,children:(0,F.jsx)(Ve,{sortBy:this.sortBy,selectedValue:this.state.sortBy,called_by_component:"MyDownloads"})})]}),(0,F.jsx)(k.Z,{container:!0,className:"CardContainer",alignItems:"stretch",direction:"row",justifyContent:"center",children:this.state.data.results&&this.state.data.results.map((function(e,t){return(0,F.jsx)(It,{resource:e,keycloak:d.state.keycloak},JSON.stringify(e))}))})]})]}),(0,F.jsxs)(k.Z,{item:!0,container:!0,xs:12,className:"botomMargin pt-3",justifyContent:"center",alignItems:"center",children:[(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,children:[" ",this.state.data.previous&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getPreviousPage,classes:{root:"inner-link-outlined--teal"},children:["\u2190",(0,F.jsx)(Z.Z,{id:"searchCatalogue.previousPage",defaultMessage:y.Z.previous})," "]})]}),(0,F.jsxs)(k.Z,{item:!0,xs:6,sm:8,children:[null,(0,F.jsx)("div",{children:null})]}),(0,F.jsxs)(k.Z,{item:!0,xs:3,sm:2,style:{textAlign:"right"},children:[" ",this.state.data.next&&(0,F.jsxs)(ae.Z,{disabled:this.state.loading,onClick:this.getNextPage,classes:{root:"inner-link-outlined--teal"},children:[(0,F.jsx)(Z.Z,{id:"searchCatalogue.nextPage",defaultMessage:y.Z.next})," \u2192"]})]})]})]})})]})]})}}]),a}(f.Component),Dt=Lt,Tt=a(42267),Ot=a(94899),Ut=a(36281),Et=a(62300);function Bt(e){return{id:"full-width-tab-".concat(e),"aria-controls":"full-width-tabpanel-".concat(e)}}var Mt=function(e){(0,m.Z)(a,e);var t=(0,p.Z)(a);function a(e){var s;(0,u.Z)(this,a),(s=t.call(this,e)).toggleTab=function(e){"myres"===e?s.props.history.push("/myItems"):"myval"===e?s.props.history.push("/myValidations"):"myuse"===e?s.props.history.push("/myUsage"):"mydown"===e&&s.props.history.push("/myDownloads"),s.setState({tab:s.state.tabIndexes[e]})},s.getTabIndexes=function(){var e=C.Z6.filter((function(e){return(0,C.A4)(s.props.keycloak).includes(e)})).length>0,t=C.Xe.filter((function(e){return(0,C.A4)(s.props.keycloak).includes(e)})).length>0,a=s.props.keycloak&&s.props.keycloak.authenticated,n=s.props.keycloak&&s.props.keycloak.authenticated,i=[];e&&i.push("myres"),t&&i.push("myval"),a&&i.push("myuse"),n&&i.push("mydown");var r={};
1return i.forEach((function(e,t){return r[e]=t})),r};var n=s.getTabIndexes(),i=s.props.location.state?n[s.props.location.state.tab]:0;return s.state={tabIndexes:n,tab:i},s}return(0,h.Z)(a,[{key:"componentDidMount",value:function(){var e=this.props.location.pathname,t=this.props.location&&this.props.location.state&&this.props.location.state.tab;if(t)this.toggleTab(t);else if(e)switch(e){case"/myValidations":this.toggleTab("myval");break;case"/myItems":this.toggleTab("myres");break;case"/myUsage":this.toggleTab("myuse");break;case"/myDownloads":this.toggleTab("mydown")}}},{key:"render",value:function(){var e=this,t={myres:y.Z.dashboard_my_items,myval:y.Z.dashboard_my_validations,myuse:y.Z.dashboard_my_usage,mydown:y.Z.dashboard_my_downloads};return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(g.Z,(0,d.Z)({},this.props)),(0,F.jsx)(Ot.Z,{maxWidth:"xl",className:"my-resouces-table dashboard-app-bar-mg",children:(0,F.jsxs)("div",{children:[(0,F.jsxs)(Ut.Z,{value:this.state.tab,onChange:this.toggleTab,"aria-label":"simple tabs example",className:"simple-tabs-forms",children:[((0,C.A4)(this.props.keycloak).includes("provider")||(0,C.PQ)(this.props.keycloak)||(0,C.IJ)(this.props.keycloak))&&(0,F.jsx)(Et.Z,(0,d.Z)((0,d.Z)({label:t.myres},Bt(0)),{},{onClick:function(){e.toggleTab("myres")}})),((0,C.wC)(this.props.keycloak)||(0,C.Ae)(this.props.keycloak)||(0,C.F4)(this.props.keycloak)||(0,C.PQ)(this.props.keycloak))&&(0,F.jsx)(Et.Z,(0,d.Z)((0,d.Z)({label:t.myval},Bt(1)),{},{onClick:function(){e.toggleTab("myval")}})),this.props.keycloak&&this.props.keycloak.authenticated&&(0,F.jsx)(Et.Z,(0,d.Z)((0,d.Z)({label:t.myuse},Bt(0)),{},{onClick:function(){e.toggleTab("myuse")}})),this.props.keycloak&&this.props.keycloak.authenticated&&(0,F.jsx)(Et.Z,(0,d.Z)((0,d.Z)({label:t.mydown},Bt(0)),{},{onClick:function(){e.toggleTab("mydown")}}))]}),((0,C.A4)(this.props.keycloak).includes("provider")||(0,C.PQ)(this.props.keycloak)||(0,C.IJ)(this.props.keycloak))&&(0,F.jsx)(Tt.Z,{value:this.state.tab,index:this.state.tabIndexes.myres,className:"myitems--outer",children:(0,F.jsx)(We,(0,d.Z)((0,d.Z)({},this.props),{},{keycloak:this.props.keycloak}))}),this.props.keycloak&&this.props.keycloak.authenticated&&(0,F.jsx)(Tt.Z,{value:this.state.tab,index:this.state.tabIndexes.myuse,className:"myitems--outer",children:(0,F.jsx)(wt,(0,d.Z)((0,d.Z)({},this.props),{},{keycloak:this.props.keycloak}))}),this.props.keycloak&&this.props.keycloak.authenticated&&(0,F.jsx)(Tt.Z,{value:this.state.tab,index:this.state.tabIndexes.mydown,className:"myitems--outer",children:(0,F.jsx)(Dt,(0,d.Z)((0,d.Z)({},this.props),{},{keycloak:this.props.keycloak}))}),((0,C.wC)(this.props.keycloak)||(0,C.Ae)(this.props.keycloak)||(0,C.F4)(this.props.keycloak)||(0,C.PQ)(this.props.keycloak)||(0,C.IJ)(this.props.keycloak))&&(0,F.jsx)(Tt.Z,{value:this.state.tab,index:this.state.tabIndexes.myval,className:"myitems--outer",children:(0,F.jsx)(rt,(0,d.Z)((0,d.Z)({},this.props),{},{keycloak:this.props.keycloak}))})]})})]})}}]),a}(f.Component),zt=(0,x.EN)(Mt)},42267:function(e,t,a){a.d(t,{Z:function(){return o}});var s=a(1413),n=a(45987),i=(a(47313),a(86571)),r=a(57009),l=a(46417),c=["children","value","index"];function o(e){var t=e.children,a=e.value,o=e.index,d=(0,n.Z)(e,c);return(0,l.jsx)(r.Z,(0,s.Z)((0,s.Z)({component:"div",role:"tabpanel",hidden:a!==o,id:"wrapped-tabpanel-".concat(o),"aria-labelledby":"wrapped-tab-".concat(o)},d),{},{children:a===o&&(0,l.jsx)(i.Z,{p:3,children:t})}))}},44133:function(e,t,a){var s=a(87462),n=a(45987),i=a(47313),r=a(83061),l=a(80454),c=a(79685),o=a(82277),d=i.forwardRef((function(e,t){var a=e.classes,l=e.className,d=e.color,u=void 0===d?"primary":d,h=e.position,m=void 0===h?"fixed":h,p=(0,n.Z)(e,["classes","className","color","position"]);return i.createElement(o.Z,(0,s.Z)({square:!0,component:"header",elevation:4,className:(0,r.default)(a.root,a["position".concat((0,c.Z)(m))],a["color".concat((0,c.Z)(u))],l,"fixed"===m&&"mui-fixed"),ref:t},p))}));t.Z=(0,l.Z)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)}
1,colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(d)},23405:function(e,t,a){var s=a(87462),n=a(45987),i=a(47313),r=a(83061),l=a(80454),c=i.forwardRef((function(e,t){var a=e.classes,l=e.className,c=e.component,o=void 0===c?"div":c,d=(0,n.Z)(e,["classes","className","component"]);return i.createElement(o,(0,s.Z)({ref:t,className:(0,r.default)(a.root,l)},d))}));t.Z=(0,l.Z)({root:{width:"100%",overflowX:"auto"}},{name:"MuiTableContainer"})(c)},53446:function(e,t,a){var s=a(87462),n=a(45987),i=a(47313),r=a(83061),l=a(80454),c=a(83147),o={variant:"head"},d="thead",u=i.forwardRef((function(e,t){var a=e.classes,l=e.className,u=e.component,h=void 0===u?d:u,m=(0,n.Z)(e,["classes","className","component"]);return i.createElement(c.Z.Provider,{value:o},i.createElement(h,(0,s.Z)({className:(0,r.default)(a.root,l),ref:t,role:h===d?null:"rowgroup"},m)))}));t.Z=(0,l.Z)({root:{display:"table-header-group"}},{name:"MuiTableHead"})(u)},12285:function(e,t,a){var s=a(95318),n=a(20862);t.Z=void 0;var i=n(a(47313)),r=(0,s(a(52293)).default)(i.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");t.Z=r},393:function(e,t,a){var s=a(95318),n=a(20862);t.Z=void 0;var i=n(a(47313)),r=(0,s(a(52293)).default)(i.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz");t.Z=r}}]);
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.