"use strict";(self.webpackChunkseahub_frontend=self.webpackChunkseahub_frontend||[]).push([[9743],{59743:function(e,t,n){n.r(t),n.d(t,{default:function(){return a}});var r=n(62822),u=n(10467),a=function(){var e=(0,u.default)((0,r.A)().mark((function e(t){var n,a,c,o,s,i=arguments;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:{},Array.isArray(n)&&(n=n[0]),a=document.createElement("a"),c=t,e.t0="body"in t,!e.t0){e.next=9;break}return e.next=8,function(){var e=(0,u.default)((0,r.A)().mark((function e(t,n){var a,c,o,s;return(0,r.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.getReader(),c=new ReadableStream({start:function(e){return function(){var t=(0,u.default)((0,r.A)().mark((function t(){return(0,r.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",a.read().then((function(t){var r=t.done,u=t.value;if(!r)return e.enqueue(u),n();e.close()})));case 1:case"end":return t.stop()}}),t)})));function n(){return t.apply(this,arguments)}return n}()()}}),o=new Response(c),e.next=5,o.blob();case 5:return s=e.sent,e.abrupt("return",(a.releaseLock(),new Blob([s],{type:n})));case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(t.body,t.headers.get("content-type"));case 8:c=e.sent;case 9:return a.download=n.fileName||"Untitled",e.t1=URL,e.next=13,c;case 13:return e.t2=e.sent,a.href=e.t1.createObjectURL.call(e.t1,e.t2),o=function(){"function"==typeof s&&s()},s=n.legacySetup&&n.legacySetup(o,(function(){return s(reject)}),a),e.abrupt("return",(a.addEventListener("click",(function(){setTimeout((function(){return URL.revokeObjectURL(a.href)}),3e4),o()})),a.click(),null));case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}]);