(self.webpackChunkmediacms_frontend=self.webpackChunkmediacms_frontend||[]).push([[431],{27087:function(e,t,n){"use strict";functionr(e,t){(null==t||t>e.length)&&(t=e.length);for(varn=0,r=newArray(t);n<t;n++)r[n]=e[n];returnr}n.d(t,{Z:function(){returnr}})},95458:function(e,t,n){"use strict";if(n.d(t,{Z:function(){returni}}),411==n.j)varr=n(27087);functioni(e){if(Array.isArray(e))return(0,r.Z)(e)}},97692:function(e,t,n){"use strict";functionr(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){returnr}})},57539:function(e,t,n){"use strict";functionr(e){if("undefined"!=typeofSymbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])returnArray.from(e)}n.d(t,{Z:function(){returnr}})},20303:function(e,t,n){"use strict";functionr(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:function(){returnr}})},89959:function(e,t,n){"use strict";if(n.d(t,{Z:function(){returns}}),411==n.j)varr=n(95458);if(411==n.j)vari=n(57539);if(411==n.j)varo=n(70299);if(411==n.j)vara=n(20303);functions(e){return(0,r.Z)(e)||(0,i.Z)(e)||(0,o.Z)(e)||(0,a.Z)()}},70299:function(e,t,n){"use strict";if(n.d(t,{Z:function(){returni}}),411==n.j)varr=n(27087);functioni(e,t){if(e){if("string"==typeofe)return(0,r.Z)(e,t);varn=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void0}}},13506:function(e,t,n){"use strict";varr=n(12672),i=function(e){vart=Object.create(null);returne&&Object.keys(e).forEach((function(n){if("default"!==n){varr=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){returne[n]}})}})),t.default=e,Object.freeze(t)}(n(35466)),o=function(e){vart=e.files,n=i.useRef(),o=i.useContext(r.LocalizationContext).l10n,a=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft,s=i.useRef([]),l=o&&o.attachment?o.attachment.clickToDownload:"Click to download",u=function(e){vart=n.current,r=[].slice.call(t.getElementsByClassName("rpv-attachment__item"));if(0!==r.length){r.forEach((function(e){returne.setAttribute("tabindex","-1")}));vari=document.activeElement,o=r[Math.min(r.length-1,Math.max(0,e(r,i)))];o.setAttribute("tabindex","0"),o.focus()}};returnr.useIsomorphicLayoutEffect((function(){vare=n.current;if(e){vart=[].slice.call(e.getElementsByClassName("rpv-attachment__item"));if(s.current=t,t.length>0){varr=t[0];r.focus(),r.setAttribute("tabindex","0")}}}),[]),i.createElement("div",{"data-testid":"attachment__list",className:r.classNames({"rpv-attachment__list":!0,"rpv-attachment__list--rtl":a}),ref:n,tabIndex:-1,onKeyDown:function(e){switch(e.key){case"ArrowDown":e.preventDefault(),u((function(e,t){returne.indexOf(t)+1}));break;case"ArrowUp":e.preventDefault(),u((function(e,t){returne.indexOf(t)-1}));break;case"End":e.preventDefault(),u((function(e,t){returne.length-1}));break;case"Home":e.preventDefault(),u((function(e,t){return0}))}}},t.map((function(e){returni.createElement("button",{className:"rpv-attachment__item",key:e.fileName,tabIndex:-1,title:l,type:"button",onClick:function(){returnt=e.fileName,r="string"==typeof(n=e.data)?"":URL.createObjectURL(newBlob([n],{type:""})),(i=document.createElement("a")).style.display="none",i.href=r||t,i.setAttribute("download",function(e){vart=e.split("/").pop();returnt?t.split("#")[0].split("?")[0]:e}(t)),document.body.appendChild(i),i.click(),document.body.removeChild(i),void(r&&URL.revokeObjectURL(r));vart,n,r,i}},e.fileName)})))},a=function(e){vart=e.doc,n=i.useContext(r.LocalizationContext).l10n,a=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft,s=n&&n.attachment?n.attachment.noAttachment:"There is no attachment",l=i.useState({files:[],isLoaded:!1}),u=l[0],c=l[1];returni.useEffect((function(){t.getAttachments().then((fu