diff --git a/index.html b/index.html index 3be525d1..32d6e40b 100644 --- a/index.html +++ b/index.html @@ -57,6 +57,6 @@ })(); - + \ No newline at end of file diff --git a/js/about.84ffedc7.js.map b/js/about.84ffedc7.js.map deleted file mode 100644 index 8874ac2d..00000000 --- a/js/about.84ffedc7.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/about.84ffedc7.js","sources":["webpack:///js/about.84ffedc7.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/js/about.84ffedc7.js b/js/about.eeb9d3b0.js similarity index 98% rename from js/about.84ffedc7.js rename to js/about.eeb9d3b0.js index eed49603..184d5a06 100644 --- a/js/about.84ffedc7.js +++ b/js/about.eeb9d3b0.js @@ -1,2 +1,2 @@ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["about"],{9224:function(t){t.exports=JSON.parse('{"a":"0.4.12"}')},"941d":function(t,e,i){},a664:function(t,e,i){"use strict";var n=i("941d"),o=i.n(n);o.a},f820:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"about width-limited",style:{"background-image":"url("+t.siteConfig.background_image+")"}},[i("section",{staticClass:"hero"},[i("div",{staticClass:"hero-body"},[i("div",{staticClass:"container"},[i("h1",{staticClass:"title"},[t._v("About "+t._s(t.siteConfig.site_name))]),i("h2",{staticClass:"subtitle"},[t._v("v"+t._s(t.version))])])])]),i("br"),i("section",{staticStyle:{"text-align":"center"}},[t.siteConfig.contact_form_url?i("b-button",{on:{click:function(e){return t.openUrl(t.siteConfig.contact_form_url)}}},[t._v("Contact Us")]):t._e(),t.siteConfig.subscribe_url?i("b-button",{on:{click:function(e){return t.openUrl(t.siteConfig.subscribe_url)}}},[t._v("Subscribe")]):t._e(),t.siteConfig.contact_form_url?i("b-button",{on:{click:function(e){return t.openUrl("/docs/#/terms_of_service")}}},[t._v("Terms of Service")]):t._e()],1),i("br"),i("section",{staticStyle:{"text-align":"center"}},[t.siteConfig.contribute_url?i("b-button",{on:{click:function(e){return t.openUrl("/docs/#/contribute_models/README")}}},[t._v("Contribute Models")]):t._e(),t.siteConfig.join_partners_url?i("b-button",{on:{click:function(e){return t.openUrl("/docs/#/community_partners/README")}}},[t._v("Join Community Partners")]):t._e(),i("b-button",{on:{click:function(e){return t.openUrl("https://github.com/bioimage-io/bioimage.io/issues/28")}}},[t._v("BioImage.IO Weekly Meeting")])],1),i("br"),i("section",{staticClass:"hero",staticStyle:{"min-height":"100px"}},[t.siteConfig.about_url?i("markdown",{attrs:{url:t.siteConfig.about_url}}):t._e()],1),i("br"),t.siteConfig.footer?i("div",{staticClass:"columns is-mobile is-centered"},t._l(t.siteConfig.footer,(function(e){return i("div",{key:e.label,staticClass:"column is-one-quarter",staticStyle:{"text-align":"center",width:"16%"}},[i("b-tooltip",{attrs:{label:e.tooltip,position:"is-top"}},[i("a",{attrs:{href:e.url,target:"_blank"}},[i("figure",[i("img",{staticStyle:{"max-height":"55px"},attrs:{src:e.logo}}),i("figcaption",{staticClass:"hide-on-small-screen"},[t._v(" "+t._s(e.label)+" ")])])])])],1)})),0):t._e(),t.siteConfig.footnote?i("div",{staticStyle:{"text-align":"center"}},[i("p",[t._v(t._s(t.siteConfig.footnote))]),t._m(0)]):t._e(),i("br")])},o=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("p",[t._v(" The giraffe icon used in the BioImage logo is adapted from the "),i("a",{attrs:{href:"https://twemoji.twitter.com/",target:"_blank"}},[t._v("Twemoji project")]),t._v(" maintained by Twitter and released under "),i("a",{attrs:{href:"https://creativecommons.org/licenses/by/4.0/"}},[t._v("CC-BY 4.0")]),t._v(" license. ")])}],s=i("5530"),r=i("2f62"),c=i("9224"),a=i("e6e0"),l={name:"About",computed:Object(s["a"])({},Object(r["b"])({siteConfig:function(t){return t.siteConfig}})),components:{markdown:a["a"]},data:function(){return{version:c["a"]}},methods:{openUrl:function(t){window.open(t)}}},u=l,b=(i("a664"),i("2877")),f=Object(b["a"])(u,n,o,!1,null,"3bc7cce4",null);e["default"]=f.exports}}]); -//# sourceMappingURL=about.84ffedc7.js.map \ No newline at end of file +//# sourceMappingURL=about.eeb9d3b0.js.map \ No newline at end of file diff --git a/js/about.eeb9d3b0.js.map b/js/about.eeb9d3b0.js.map new file mode 100644 index 00000000..d01429b4 --- /dev/null +++ b/js/about.eeb9d3b0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js/about.eeb9d3b0.js","sources":["webpack:///js/about.eeb9d3b0.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/js/app.0b69f1ad.js b/js/app.0b69f1ad.js deleted file mode 100644 index 0b65c219..00000000 --- a/js/app.0b69f1ad.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(e){function t(t){for(var r,i,s=t[0],c=t[1],l=t[2],u=0,d=[];u",MAX_RDF_VERSION))throw new Error("Unsupported format version ".concat(e.format_version," (it must <=").concat(MAX_RDF_VERSION,")"));if(!spdx_license_list_full__WEBPACK_IMPORTED_MODULE_29___default.a[e.license])throw new Error("Invalid license, the license identifier must be one from the SPDX license list (https://spdx.org/licenses/)");if(!e.type)throw new Error("`type` key is not defined in the RDF.");e.covers=e.covers||[];var r,i=e.covers.map((function(e){return e.startsWith("http")?e:new URL(e,t).href})),a=[],o=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_25__["a"])(i);try{for(o.s();!(r=o.n()).done;){var s=r.value;if(s.includes("access_token="))throw new Error("Cover URL should not contain access token: "+s);a.push({relation:"hasPart",identifier:s,resource_type:"image-figure",scheme:"url"})}}catch(h){o.e(h)}finally{o.f()}e.links=e.links||[];var c,l=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_25__["a"])(e.links);try{for(l.s();!(c=l.n()).done;){var u=c.value;if(u.includes("access_token="))throw new Error("Link should not contain access token: "+u);a.push({identifier:"https://bioimage.io/#/r/"+encodeURIComponent(u),relation:"references",resource_type:"other",scheme:"url"})}}catch(h){l.e(h)}finally{l.f()}if(!e.rdf_source)throw new Error("`rdf_source` key is not found in the RDF");var d=e.rdf_source.startsWith("http")?e.rdf_source:new URL(e.rdf_source,t).href;if(d.startsWith("http")&&d.includes("api/files")&&(d=d.split("/"),d=d[d.length-1],d=new URL(d,t).href),a.push({identifier:d,relation:"isCompiledBy",resource_type:"other",scheme:"url"}),e.documentation){if(e.documentation.includes("access_token="))throw new Error("Documentation URL should not contain access token");a.push({identifier:e.documentation.startsWith("http")?e.documentation:new URL(e.documentation,t).href,relation:"isDocumentedBy",resource_type:"publication-technicalnote",scheme:"url"})}e.authors=e.authors||[];var p=e.authors.map((function(e){return"string"===typeof e?{name:e.split(";")[0],affiliation:""}:{name:e.name.split(";")[0],affiliation:e.affiliation,orcid:e.orcid}})),f='Download RDF Package
')+(n&&"

".concat(n,"

")||""),_=["bioimage.io","bioimage.io:"+e.type],m={title:e.name,description:f,access_right:"open",license:e.license,upload_type:"other",creators:p,publication_date:(new Date).toISOString().split("T")[0],keywords:_.concat(e.tags),notes:e.description+additionalNote,related_identifiers:a,communities:[]};return m}function depositionToRdf(e){var t=e.metadata,n=t.keywords.filter((function(e){return e.startsWith("bioimage.io:")}))[0];if(!n)throw new Error("deposit (".concat(e.id,') does not contain a bioimage.io type keyword starts with "bioimage.io:"'));n=n.replace("bioimage.io:","");var r,i=[],a=[],o=null,s=null,c=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_25__["a"])(t.related_identifiers);try{for(c.s();!(r=c.n()).done;){var l=r.value;if("isCompiledBy"===l.relation&&"url"===l.scheme)if(o=l.identifier,o.startsWith("file://"))o=o.replace("file://",e.links.bucket+"/");else{if(!o.includes("/files/"))throw new Error("Invalid file identifier: "+l.identifier);var u=o.includes("/api/files/")?/.*zenodo.org\/api\/files\/.*\/(.*)/:/.*zenodo.org\/.*\/files\/(.*)/,d=u.exec(o);if(!d)throw new Error("Invalid file identifier: "+l.identifier);var p=d[1];o="".concat(e.links.bucket,"/").concat(p)}else if("hasPart"===l.relation&&"image-figure"===l.resource_type&&"url"===l.scheme){var f=l.identifier;if(f.startsWith("file://"))f=f.replace("file://",e.links.bucket+"/");else if(f.includes("".concat(e.id,"/files/"))){var _=f.includes("/api/files/")?/.*zenodo.org\/api\/files\/.*\/(.*)/:/.*zenodo.org\/.*\/files\/(.*)/,m=_.exec(f);m?f="".concat(e.links.bucket,"/").concat(m[1]):console.error("Invalid cover image file identifier: "+l.identifier)}else console.error("Invalid cover image file identifier: "+l.identifier);i.push(f)}else if("references"===l.relation&&"url"===l.scheme&&l.identifier.startsWith("https://bioimage.io/#/r/")){var h=l.identifier.replace("https://bioimage.io/#/r/","");a.push(decodeURIComponent(h))}else if("isDocumentedBy"===l.relation&&"url"===l.scheme){var g=l.identifier.split("/files/")[1];s=g?"".concat(e.links.bucket,"/").concat(g):l.identifier}}}catch(v){c.e(v)}finally{c.f()}var b=t.notes.replace(additionalNote,"");if(!o)throw new Error("Invalid deposit (".concat(e.id,'), rdf.yaml or model.yaml is not defined in the metadata (as part of the "related_identifiers")'));return{id:e.conceptdoi,name:t.title,type:n,authors:t.creators,tags:t.keywords.filter((function(e){return"bioimage.io"!==e||!e.startsWith("bioimage.io:")})).concat(["zenodo"]),description:b,stats:e.stats,license:"string"===typeof t.license?t.license:t.license.id,documentation:s,covers:i,links:a,rdf_source:o,config:{_doi:e.doi,_conceptdoi:e.conceptdoi,_deposit:e}}}function getUserId(e){return e&&(e.credential&&e.credential.user_id||e.lastUserId)}var ZenodoClient=function(){function e(t,n,r){Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_23__["a"])(this,e),this.baseURL=t,this.clientId=n,this.isSandbox=r,this.lastUserId=null,this.callbackUrl=encodeURIComponent("https://imjoy.io/login-helper"),this.credential=null,this.credentialKey=r?"sandbox_zenodo_credential":"production_zenodo_credential",this.userIdKey=r?"sandbox_zenodo_user_id":"production_zenodo_user_id";try{this.lastUserId=localStorage.getItem(this.userIdKey),this.lastUserId&&(this.lastUserId=parseInt(this.lastUserId));var i=localStorage.getItem(this.credentialKey);i&&(this.credential=JSON.parse(i),this.getCredential(),this.credential&&this.lastUserId!==this.credential.user_id&&(this.lastUserId=this.credential.user_id,localStorage.setItem(this.userIdKey,this.lastUserId)))}catch(a){console.error("Failed to reset ".concat(this.credentialKey,": ").concat(a)),localStorage.removeItem(this.credentialKey)}}return Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_24__["a"])(e,[{key:"getCredential",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=60*(n||40)*1e3,!this.credential){e.next=8;break}if(!(this.credential.create_at+1e3*parseInt(this.credential.expires_in)>Date.now()+n)){e.next=6;break}return e.abrupt("return",this.credential);case 6:this.credential=null;try{localStorage.removeItem(this.credentialKey)}catch(r){console.error("Failed to reset ".concat(this.credentialKey,": ").concat(r))}case 8:if(!t){e.next=21;break}return e.prev=9,e.next=12,this.login();case 12:e.next=21;break;case 14:if(e.prev=14,e.t0=e["catch"](9),!confirm("Failed to login: ".concat(e.t0,", would you like to try again?"))){e.next=20;break}return e.next=19,this.getCredential(t);case 19:return e.abrupt("return",e.sent);case 20:throw e.t0;case 21:return e.abrupt("return",this.credential);case 22:case"end":return e.stop()}}),e,this,[[9,14]])})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"getResourceItems",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r,i,a,o,s,c,l,u,d,p,f,_,m,h;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.community,r=t.page,i=t.type,a=t.keywords,o=t.query,s=t.sort,c=t.size,r=r||1,i=i||"all",a=a||[],a.includes("bioimage.io")||a.push("bioimage.io"),c=c||20,s=s||"mostrecent",l="all"!==i?"&keywords=bioimage.io:"+i:"",u=l+(a.length>0?"&"+a.map((function(e){return"keywords="+encodeURIComponent(e)})).join("&"):"")+(o?"&q="+o:""),d="".concat(this.baseURL,"/api/records/?").concat(n?"communities="+n:"","&sort=").concat(s,"&page=").concat(r,"&size=").concat(c)+u,e.next=12,fetch(d);case 12:return p=e.sent,e.t0=JSON,e.next=16,p.text();case 16:if(e.t1=e.sent,f=e.t0.parse.call(e.t0,e.t1),!f||400!==f.status){e.next=21;break}return alert(f.message),e.abrupt("return");case 21:return f&&f.hits||(alert("Failed to find similar items, please try it again."),console.warn("Hitting rate limit, retrying in 1s")),_=f.hits.hits,m=_.map((function(e){try{return depositionToRdf(e)}catch(t){return console.warn(t),null}})),console.log("Get items from URL: ",m.map((function(e){return e.id})),d),h=m.filter((function(e){return!!e})),f.aggregations.access_right.buckets.length>0?h.total=f.aggregations.access_right.buckets[0].doc_count:h.total=0,e.abrupt("return",h);case 28:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getUserId",value:function(){return this.credential&&this.credential.user_id||this.lastUserId}},{key:"logout",value:function(){var e=this;return new Promise((function(t,n){e.credential=null;try{localStorage.removeItem(e.credentialKey)}catch(o){console.error("Failed to reset ".concat(e.credentialKey))}var r=window.open("".concat(e.baseURL,"/logout"),"Logout");try{r.focus()}catch(o){return void n("Logout window blocked. If you have a popup blocker enabled, please add bioimage.io to your exception list.")}var i=120,a=setInterval((function(){r.closed?(clearInterval(a),t()):(i--,i<=0&&(clearInterval(a),r.close(),n("Timeout error")))}),1e3);setTimeout((function(){r.close()}),1e3)}))}},{key:"login",value:function(){var e=this;return new Promise((function(t,n){if(e.lastUserId||confirm("Redirecting to Zenodo.org. If you failed to login, please come back here to try it again.")){var r=randId(),i=window.open("".concat(e.baseURL,"/oauth/authorize?scope=deposit%3Awrite+deposit%3Aactions&state=").concat(r,"&redirect_uri=").concat(e.callbackUrl,"&response_type=token&client_id=").concat(e.clientId),"Login");try{i.focus()}catch(l){return void n("Login window blocked. If you have a popup blocker enabled, please add bioimage.io to your exception list.")}e.credential=null;var a=120,o=!1,s=setInterval((function(){o?clearInterval(s):i.closed?(clearInterval(s),n("The login window was closed unexpectedly")):(a--,a<=0&&(clearInterval(s),i.close(),n("Timeout error")))}),1e3),c=function a(c){if(i===c.source){if(window.removeEventListener("message",a),clearInterval(s),i.close(),o=!0,e.credential)return;if(c.data.error)return void setTimeout((function(){n(c.data.error)}),1);if(!c.data.access_token||c.data.state!==r)return void n("Failed to obtain the access token, please make sure your account is valid and try it again.");console.log("Successfully logged in",c.data),e.credential=c.data,e.credential.user_id=parseInt(/'id': u'([0-9]+)'/gm.exec(c.data.user)[1]),e.credential.create_at=Date.now(),e.lastUserId!==e.credential.user_id&&(e.lastUserId=e.credential.user_id,localStorage.setItem(e.userIdKey,e.lastUserId)),localStorage.setItem(e.credentialKey,JSON.stringify(e.credential)),t(c.data)}};window.addEventListener("message",c,!1)}}))}},{key:"createDeposition",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t={"Content-Type":"application/json"},e.next=3,fetch("".concat(this.baseURL,"/api/deposit/depositions?access_token=").concat(this.credential.access_token),{method:"POST",body:JSON.stringify({}),headers:t});case 3:if(n=e.sent,!n.ok){e.next=10;break}return e.next=7,n.json();case 7:return e.abrupt("return",e.sent);case 10:return e.t0=Error,e.next=13,n.text();case 13:throw e.t1=e.sent,e.t2="Failed to create deposition, error: "+e.t1,new e.t0(e.t2);case 16:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getDeposit",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id?t.id:t,e.next=3,fetch("".concat(this.baseURL,"/api/records/").concat(n),{method:"GET"});case 3:if(r=e.sent,!r.ok){e.next=10;break}return e.next=7,r.json();case 7:return e.abrupt("return",e.sent);case 10:throw new Error("Failed to get deposit: "+n);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"retrieve",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id?t.id:t,e.next=3,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(n,"?access_token=").concat(this.credential.access_token),{method:"GET"});case 3:if(r=e.sent,!r.ok){e.next=10;break}return e.next=7,r.json();case 7:return e.abrupt("return",e.sent);case 10:throw new Error("Failed to retrieve deposit: "+n);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"edit",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id?t.id:t,r={"Content-Type":"application/json"},e.next=4,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(n,"/actions/edit?access_token=").concat(this.credential.access_token),{method:"POST",body:JSON.stringify({}),headers:r});case 4:if(i=e.sent,!i.ok){e.next=11;break}return e.next=8,i.json();case 8:return e.abrupt("return",e.sent);case 11:throw new Error("Failed to edit deposit: "+n);case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"discard",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n="string"===typeof t?t:t.id,r={"Content-Type":"application/json"},e.next=4,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(n,"/actions/discard?access_token=").concat(this.credential.access_token),{method:"POST",body:JSON.stringify({}),headers:r});case 4:if(i=e.sent,!i.ok){e.next=11;break}return e.next=8,i.json();case 8:return e.abrupt("return",e.sent);case 11:throw new Error("Failed to discard deposit: "+n);case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"createNewVersion",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n="string"===typeof t?t:t.id,r={"Content-Type":"application/json"},e.next=4,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(n,"/actions/newversion?access_token=").concat(this.credential.access_token),{method:"POST",body:JSON.stringify({}),headers:r});case 4:if(i=e.sent,!i.ok){e.next=11;break}return e.next=8,i.json();case 8:return e.abrupt("return",e.sent);case 11:throw new Error("Failed to create a new version for deposit: "+n);case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"updateMetadata",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t,n){var r,i,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r="string"===typeof t?t:t.id,console.log("Updating deposition metadata of ".concat(r,":"),n),i={"Content-Type":"application/json"},e.next=5,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(r,"?access_token=").concat(this.credential.access_token),{method:"PUT",body:JSON.stringify({metadata:n}),headers:i});case 5:if(a=e.sent,!a.ok){e.next=12;break}return e.next=9,a.json();case 9:return e.abrupt("return",e.sent);case 12:return e.next=14,a.json();case 14:throw o=e.sent,new Error("Failed to update metadata, error: "+JSON.stringify(o.errors||o.message));case 16:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"uploadFile",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t,n,r,i){var a,o,s,c,l,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.links.bucket,o=r||n.name,s={headers:{"Content-Type":n.type},onUploadProgress:function(e){if(i)i(e.loaded);else{var t=Math.round(1*e.loaded/n.size*100);console.log("uploading annotation, size: "+Math.round(e.loaded/1e6)+"MB, "+t+"% uploaded.")}}},e.prev=3,l="".concat(a,"/").concat(o,"?access_token=").concat(this.credential.access_token),e.next=7,axios__WEBPACK_IMPORTED_MODULE_27___default.a.put(l,n,s);case 7:c=e.sent,e.next=21;break;case 10:return e.prev=10,e.t0=e["catch"](3),console.error(e.t0),console.error("Failed to upload, possibly due to access token expired:",e.t0),alert("Authentication information expired, please login to Zenodo and authorize ShareLoc.XYZ again."),e.next=17,this.login();case 17:return u="".concat(a,"/").concat(o,"?access_token=").concat(this.credential.access_token),e.next=20,axios__WEBPACK_IMPORTED_MODULE_27___default.a.put(u,n,s);case 20:c=e.sent;case 21:return e.abrupt("return",c.data);case 22:case"end":return e.stop()}}),e,this,[[3,10]])})));function t(t,n,r,i){return e.apply(this,arguments)}return t}()},{key:"publish",value:function(){var e=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_26__["a"])(regeneratorRuntime.mark((function e(t){var n,r,i,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id?t.id:t,r={"Content-Type":"application/json"},e.next=4,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(n,"/actions/publish?access_token=").concat(this.credential.access_token),{method:"POST",body:JSON.stringify({}),headers:r});case 4:if(i=e.sent,!i.ok){e.next=16;break}return e.next=8,i.json();case 8:if(a=e.sent,!a.submitted||!a.doi_url){e.next=13;break}return e.abrupt("return",a);case 13:throw new Error("Failed to publish, error: "+JSON.stringify(a));case 14:e.next=20;break;case 16:return e.next=18,i.json();case 18:throw o=e.sent,new Error("Failed to publish, error: "+JSON.stringify(o.errors||o.message));case 20:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),e}();function compareVersions(v1,comparator,v2){if(comparator="="==comparator?"==":comparator,-1==["==","===","<","<=",">",">=","!=","!=="].indexOf(comparator))throw new Error("Invalid comparator. "+comparator);for(var v1parts=v1.split("."),v2parts=v2.split("."),maxLen=Math.max(v1parts.length,v2parts.length),part1,part2,cmp=0,i=0;ipart2&&(cmp=-1);return eval("0"+comparator+cmp)}function debounce(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}function concatAndResolveUrl(e,t){for(var n=e.split("/"),r=t.split("/"),i=[],a=0,o=n.length;a/g,"%3E"),e}function replaceAllRelByAbs(e,t){var n="[^-a-z0-9:._]";t.endsWith("/")||(t+="/");var r="(?:;|(?!\\d))",i={" ":"(?:\\s| ?|�*32"+r+"|�*20"+r+")","(":"(?:\\(|�*40"+r+"|�*28"+r+")",")":"(?:\\)|�*41"+r+"|�*29"+r+")",".":"(?:\\.|�*46"+r+"|�*2e"+r+")"},a={},o=i[" "]+"*",s="(?:[^>\"']*(?:\"[^\"]*\"|'[^']*'))*?[^>]*";function c(e){var t=e.toLowerCase();if(i[e])return i[e];for(var n=e.toUpperCase(),o="",s=0;s"+a+"]*"+o+")","gi");e=e.replace(t,(function(e){return e.replace(s,l).replace(c,l).replace(u,l)}))}function _(t,r,i,a,o,s){"string"==typeof t&&(t=new RegExp(t,"gi")),r=n+r,a="string"==typeof a?a:"gi";var c,l=new RegExp("("+r+'\\s*=\\s*")([^"]*)',"gi"),u=new RegExp("("+r+"\\s*=\\s*')([^']+)","gi"),d=new RegExp("("+i+')([^"]+)(")',a),f=new RegExp("("+i+")([^']+)(')",a);if("string"==typeof o){s="string"==typeof s?s:"";var _=new RegExp("("+i+")([^\"'][^"+o+"]*"+(s?"?)("+s+")":")()"),a);c=function(e,t,n){return t+n.replace(d,p).replace(f,p).replace(_,p)}}else c=function(e,t,n){return t+n.replace(d,p).replace(f,p)};e=e.replace(t,(function(e){return e.replace(l,c).replace(u,c)}))}return _("|'"+c("refresh")+"'"+s+">|"+c("refresh")+"(?:"+c(" ")+s+">|>))","content",c("url")+o+c("=")+o,"i"),f("<"+s+n+"href\\s*="+s+">","href"),f("<"+s+n+"src\\s*="+s+">","src"),f("","data"),f("","codebase"),f("|'"+c("movie")+"'"+s+">|"+c("movie")+"(?:"+c(" ")+s+">|>))","value"),f(/]*>(?:[^"']*(?:"[^"]*"|'[^']*'))*?[^'"]*(?:<\/style|$)/gi,"url","\\s*\\(\\s*","","\\s*\\)"),_("<"+s+n+"style\\s*="+s+">","style",c("url")+o+c("(")+o,0,o+c(")"),c(")")),e}},"034f":function(e,t,n){"use strict";var r=n("85ec"),i=n.n(r);i.a},1:function(e,t){},"106f":function(e,t,n){"use strict";var r=n("944d"),i=n.n(r);i.a},"132b":function(e,t,n){"use strict";var r=n("c9e7"),i=n.n(r);i.a},"133d":function(e){e.exports=JSON.parse('{"site_name":"BioImage.IO","site_icon":"๐Ÿฆ’","site_logo":"/static/img/bioimage-io-logo-white.svg","author":"BioImage.IO Team","keywords":"Bioimaging, AI, deep learning, image processing","description":"Bioimage.io -- an AI model repository for deep learning.","twitter_site":"@bioimageio","twitter_creator":"@weioyang","twitter_image":"https://bioimage.io/static/img/bioimage-io-banner.png","og_url":"https://bioimage.io","og_title":"BioImage.IO","og_image":"https://bioimage.io/static/img/bioimage-io-banner.png","og_description":"Advanced AI models in one-click","background_image":"static/img/zoo-background.svg","manifest_url":"https://bioimage-io.github.io/collection-bioimage-io/rdf.json","explore_button_text":"๐Ÿš€ Explore the Zoo","subscribe_url":"https://docs.google.com/forms/d/e/1FAIpQLSfQhTjXOuTXZNtalprbsXMPd4ct2ydiMhlPc2lhcs6WY4yo0w/viewform?embedded=true","contact_form_url":"https://oeway.typeform.com/to/K3j2tJt7","contribute_url":"https://bioimage.io/docs/#/contribute_models/README","join_partners_url":"https://bioimage.io/docs/community_partners/README.md","about_url":null,"footer":[{"label":"Question","tooltip":"Ask a question on image.sc forum","logo":"/static/img/imagesc-logo.png","url":"https://forum.image.sc/tag/bioimageio"},{"label":"Feedback Form","tooltip":"Give us some feedback through this Google Form","logo":"/static/img/feedback-icon.png","url":"https://docs.google.com/forms/d/e/1FAIpQLSfhRaldWH-CSJvSxHzxpG1_HGnNzQ-evpMcaJMo1HaSuLaCMA/viewform?usp=sf_link"},{"label":"Source Code","tooltip":"Github Repository","logo":"/static/img/github.png","url":"https://github.com/bioimage-io/bioimage.io"},{"label":"Contact Us","tooltip":"Send us a message","logo":"/static/img/contact.png","url":"https://oeway.typeform.com/to/K3j2tJt7"},{"label":"AI4Life","tooltip":"We receive funding through the AI4Life project with support from the European Unionโ€™s Horizon Europe research and innovation programme under grant agreement number 101057970","logo":"/static/img/AI4Life-logo-giraffe.png","url":"https://ai4life.eurobioimaging.eu/"},{"label":"Deploys By Netlify","tooltip":"This site is powered by Netlify","logo":"https://www.netlify.com/img/global/badges/netlify-color-accent.svg","url":"https://www.netlify.com"}],"rdf_root_repo":"bioimage-io/collection-bioimage-io","enable_comment":true,"splash_title":"BioImage Model Zoo","splash_subtitle":"Advanced AI models in one-click","splash_feature_list":["Integrated with Fiji, ilastik, ImJoy and more","Try model instantly with BioEngine","Contribute your models via Github","Link models to datasets and applications"],"table_view":{"columns":["name","authors","badges","apps"]},"zenodo_config":{"enabled":true,"sandbox_client_id":"0Zb8YkwXBqt2zelL9WyorERRzJufdTJMgxxuibmQ","production_client_id":"nO6VNWAiRjklxcVx0roedRnQncQTyEMRkTDzg6kd","community":"bioimage-io","use_sandbox":false},"attachment_table":{"columns":[{"field":"name","label":"Name","width":80,"sortable":true},{"field":"description","label":"Description","width":100,"max_length":100,"sortable":true},{"field":"timestamp","label":"Timestamp","class":"tag is-success","sortable":true},{"field":"source","label":"Source","type":"url","text":"open","class":"button is-small"},{"field":"download_url","label":"Download","type":"url","text":"Download","class":"button is-small"}],"detailed":true,"detailed_image":null,"detailed_body":"description"},"footnote":"BioImage.IO -- a collaborative effort to bring AI models to the bioimaging community. We receive funding support from the European Unionโ€™s Horizon Europe research and innovation programme under grant agreement number 101057970 (https://ai4life.eurobioimaging.eu/)","partners":[],"excluded_partners":["bioimageio"],"excluded_tags":["bioimage.io","bioimage.io:model","bioimage.io:application","bioimage.io:workflow","bioimage.io:notebook","bioimage.io:dataset","zenodo"],"resource_categories":[{"name":"models","type":"model","description":"list ai models","outline_color":"rgb(36 0 236)","tag_categories":{"modality":["electron-microscopy","cryo-electron-microscopy","fluorescence-light-microscopy","transmission-light-microscopy","super-resolution-microscopy","x-ray-microscopy","force-microscopy","high-content-imaging","whole-slide-imaging","other"],"dims":["2d","3d","2d-t","3d-t"],"content":["cells","nuclei","extracellular-vesicles","tissue","plant","mitochondria","vasculature","cell-membrane","brain","whole-organism"],"framework":["tensorflow","pytorch","tensorflow.js"],"software":["ilastik","imagej","fiji","imjoy","deepimagej","napari"],"method":["stardist","cellpose","yolo","care","n2v","denoiseg"],"network":["unet","densenet","resnet","inception","shufflenet"],"task":["semantic-segmentation","instance-segmentation","object-detection","image-classification","denoising","image-restoration","image-reconstruction","in-silico-labeling"]}},{"name":"applications","type":"application","outline_color":"rgb(83 230 7)","common_tags":["software","notebook","bioengine","workflow","macro"],"description":"list software, web apps, notebooks and utility tools"},{"name":"datasets","type":"dataset","outline_color":"rgb(236 0 185)","description":"list datasets"}]}')},"17ec":function(e,t,n){"use strict";var r=n("dd68"),i=n.n(r);i.a},2:function(e,t){},3:function(e,t){},"3a38":function(e,t,n){},"423d":function(e,t,n){},4871:function(e,t,n){},"524f":function(e,t,n){"use strict";var r=n("7411"),i=n.n(r);i.a},"560e":function(e,t,n){},"56d7":function(e,t,n){"use strict";n.r(t);n("4160"),n("b64b"),n("159b");var r,i,a=n("5530"),o=(n("e260"),n("e6cf"),n("cca6"),n("a79d"),n("2b0e")),s=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("nav",{staticClass:"navbar is-link is-fixed-top"},[n("div",{staticClass:"navbar-brand"},[n("a",{attrs:{href:"#/"}},[n("img",{staticStyle:{width:"264px","margin-left":"8px","margin-top":"6px"},attrs:{src:e.siteConfig.site_logo}})]),n("div",{staticClass:"navbar-burger burger",class:{"is-active":e.showMenu},attrs:{"data-target":"navbarExampleTransparentExample"},on:{click:function(t){e.showMenu=!e.showMenu}}},[n("span"),n("span"),n("span")])]),n("div",{staticClass:"navbar-menu",class:{"is-active":e.showMenu},attrs:{id:"navbarExampleTransparentExample"}},[n("div",{staticClass:"navbar-end"},[n("a",{staticClass:"navbar-item",attrs:{href:"#/upload"}},[n("b-icon",{attrs:{icon:"plus"}}),n("span",[e._v("Upload")])],1),n("a",{staticClass:"navbar-item",attrs:{href:"/docs"}},[n("b-icon",{attrs:{icon:"playlist-check"}}),n("span",[e._v("Documentation")])],1),n("a",{staticClass:"navbar-item",attrs:{href:"#/about"}},[n("b-icon",{attrs:{icon:"information-outline"}}),n("span",[e._v("About")])],1),n("a",{staticClass:"navbar-item",attrs:{id:"imjoy-menu"}})])])]),n("router-view",{style:{marginTop:e.showNavbar?"64px":"0px"}})],1)},c=[],l=n("2f62"),u=(n("fb6a"),n("d3b7"),n("ac1f"),n("3ca3"),n("1276"),n("2ca0"),n("ddb0"),n("2b3d"),n("b85c")),d=(n("96cf"),n("1da1")),p=n("025e"),f="\n.window>.titlebar {\n cursor: move;\n}\n.window>.titlebar>.title {\n font-size: 1rem!important;\n}\n\n.window>.titlebar>.title>div>.button {\n height: 18px!important;\n line-height: 18px!important;\n}\n\n/* hide the fullscreen button */\n.window>.titlebar>.title>div>.button:nth-child(3){\n display:none!important;\n}\n.imjoy-windows > img {\n display: none;\n}\n",_=new Promise((function(e,t){r=e,i=t}));function m(){return h.apply(this,arguments)}function h(){return h=Object(d["a"])(regeneratorRuntime.mark((function e(){var t,n,a,o,s,c,l,_;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:l=function(){return l=Object(d["a"])(regeneratorRuntime.mark((function e(t,n){var r,i,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t&&t.config.namespace&&t.config.namespace&&(i=document.getElementById("output_"+t.config.namespace),n.dialog||n.window_id&&document.getElementById(n.window_id)||(r=document.createElement("div"),r.id=Object(p["f"])(),r.classList.add("imjoy-window"),i.style.height="600px",i.appendChild(r),n.window_id=r.id)),!(n.type&&n.type.startsWith("imjoy/")||"joy"===n.type)){e.next=10;break}return e.next=4,window.imjoy.pm.createWindow(t,{src:"https://grid.imjoy.io/#/app",window_id:n.window_id,namespace:n.namespace});case 4:return o=e.sent,e.next=7,o.createWindow(n);case 7:a=e.sent,e.next=12;break;case 10:n.window_manager_container||(n.dialog=!0),a=window.imjoy.pm.createWindow(t,n);case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)}))),l.apply(this,arguments)},c=function(e,t){return l.apply(this,arguments)},t=window.location.href.split("#")[1].split("?")[1],n=new URLSearchParams(t),a=n.get("dev"),a&&a&&(o=document.createElement("style"),o.innerText=f,document.head.appendChild(o),s=document.createElement("div"),s.id="window-container",document.body.appendChild(s)),_={getPlugin:function(e,t,n){return Object(d["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n=n||{},t&&t.namespace||(n.namespace=n.namespace||e&&e.config.namespace),r.next=4,window.imjoy.pm.getPlugin(e,t,n);case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r)})))()},showStatus:function(e,t){return Object(d["a"])(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e||!e.config.namespace){n.next=5;break}if(!e.config.namespace){n.next=5;break}return r=document.getElementById("status_"+e.config.namespace),r.innerHTML="".concat(t.slice(0,128)),n.abrupt("return");case 5:window.app.showSnackbar(t,5);case 6:case"end":return n.stop()}}),n)})))()},showProgress:function(e,t){return Object(d["a"])(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!e||!e.config.namespace){n.next=7;break}if(!e.config.namespace){n.next=7;break}return r=document.getElementById("progress_"+e.config.namespace),t<1&&(t*=100),t>100&&(t=100),r.style.width="".concat(t,"%"),n.abrupt("return");case 7:t=t||0,t<1&&(t*=100),window.app.progress=t,window.app.$forceUpdate();case 11:case"end":return n.stop()}}),n)})))()},showMessage:function(e,t,n){return Object(d["a"])(regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:n=n||5,e&&e.config.namespace&&e.config.namespace&&(i=document.getElementById("status_"+e.config.namespace),i.innerHTML="".concat(t.slice(0,128))),window.app.showSnackbar(t,n);case 3:case"end":return r.stop()}}),r)})))()},showDialog:function(e,t){return Object(d["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.dialog=!0,n.next=3,c(e,t);case 3:return n.abrupt("return",n.sent);case 4:case"end":return n.stop()}}),n)})))()},createWindow:c},window.loadImJoyBasicApp({version:"0.14.4",process_url_query:!0,show_window_title:!1,show_progress_bar:!0,show_empty_window:!0,hide_about_imjoy:!0,menu_style:{},window_style:{width:"100%",height:"100%"},main_container:null,menu_container:"imjoy-menu",window_manager_container:a?"window-container":null,imjoy_api:_}).then(function(){var e=Object(d["a"])(regeneratorRuntime.mark((function e(t){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=t.imjoy.api,t.$on("window-size-pos-changing",(function(e){var t,n=document.querySelectorAll(".reveal iframe"),r=Object(u["a"])(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;i.style.pointerEvents=e?"none":"all"}}catch(a){r.e(a)}finally{r.f()}})),t.addMenuItem({label:"โž• Load Plugin",callback:function(){var e=prompt("Please type a ImJoy plugin URL","https://github.com/imjoy-team/imjoy-plugins/blob/master/repository/ImageAnnotator.imjoy.html");e&&t.loadPlugin(e)}}),t.addMenuItem({label:"๐ŸŽข Playground",callback:function(){i.createWindow({src:"https://if.imjoy.io"})}}),t.addMenuItem({label:"๐Ÿ““ Notebooks",callback:function(){i.createWindow({src:"https://jupyter.imjoy.io"})}}),window.api=i,window.imjoy=t.imjoy,window.app=t,r(t.imjoy),t.imjoy.pm.reloadPluginRecursively({uri:"https://raw.githubusercontent.com/imjoy-team/imjoy-core-plugins/master/docs/WebPythonWorker.imjoy.html"}),t.imjoy.pm.reloadPluginRecursively({uri:"https://imjoy-team.github.io/jupyter-engine-manager/Jupyter-Engine-Manager.imjoy.html"}).then((function(e){var t=n.get("engine"),r=n.get("spec");t?e.api.createEngine({name:"MyCustomEngine",nbUrl:t,url:t.split("?")[0]}).then((function(){console.log("Jupyter Engine connected!")})).catch((function(e){console.error("Failed to connect to Jupyter Engine",e)})):e.api.createEngine({name:"MyBinder Engine",url:"https://mybinder.org",spec:r||"oeway/imjoy-binder-image/master"}).then((function(){console.log("Binder Engine connected!")})).catch((function(e){console.error("Failed to connect to MyBinder Engine",e)}))})),t.addMenuItem({label:"โ„น๏ธ Github",callback:function(){window.open("https://github.com/bioimage-io/bioimage.io")}});case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error(e),i()}));case 8:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function g(e){return b.apply(this,arguments)}function b(){return b=Object(d["a"])(regeneratorRuntime.mark((function e(t){var n,r,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=window.location.href.split("#")[1].split("?")[1],r=new URLSearchParams(n),i=r.get("dev"),i){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,_;case 7:a=window.app,a.loadPlugin("https://if.imjoy.io").then((function(){a.imjoy.event_bus.on("plugin_loaded",(function(e){t("add",e)})),a.imjoy.event_bus.on("plugin_unloaded",(function(e){t("remove",e)})),a.imjoy.event_bus.on("add_window",(function(e){window.scrollTo(0,0),setTimeout((function(){if(!e.dialog){var t=document.getElementById(e.window_id).parentElement.parentElement;t.style.top="100px"}}),200)}))}));case 9:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)}function v(e,t,n){return y.apply(this,arguments)}function y(){return y=Object(d["a"])(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(n,r),t.showLoader(!0),e.prev=2,!n.passive){e.next=7;break}return e.next=6,window.api.createWindow({src:n.source,passive:!0});case 6:return e.abrupt("return");case 7:return e.next=9,window.api.getPlugin({src:n.source});case 9:return i=e.sent,e.next=12,i.run({config:{referer:window.location.href,mode:"all",type:"bioengine"},data:r});case 12:t.showLoader(!1),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](2),console.error(e.t0);case 18:return e.prev=18,t.showLoader(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[2,15,18,21]])}))),y.apply(this,arguments)}function w(e,t,n){return x.apply(this,arguments)}function x(){return x=Object(d["a"])(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(n,r),t.showLoader(!0),e.prev=2,!n.passive){e.next=7;break}return e.next=6,window.api.createWindow({src:n.source,passive:!0});case 6:return e.abrupt("return");case 7:return e.next=9,window.api.getPlugin({src:n.source});case 9:return i=e.sent,e.next=12,i.run({config:{referer:window.location.href,mode:"one",type:"bioengine"},data:r});case 12:e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](2),console.error(e.t0);case 17:return e.prev=17,t.showLoader(!1),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[2,14,17,20]])}))),x.apply(this,arguments)}var k={name:"App",data:function(){return{showMenu:!1}},computed:Object(a["a"])({},Object(l["b"])({showNavbar:function(e){return e.showNavbar},siteConfig:function(e){return e.siteConfig}})),mounted:function(){var e=this;m().then((function(){e.$store.commit("setBioEngineReady",!0)})).catch((function(t){console.error(t),e.$store.commit("setBioEngineReady",!1)}))}},I=k,C=(n("034f"),n("2877")),O=Object(C["a"])(I,s,c,!1,null,null,null),E=O.exports,R=n("9483");Object(R["a"])("".concat("/","service-worker.js"),{ready:function(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered:function(){console.log("Service worker has been registered.")},cached:function(){console.log("Content has been cached for offline use.")},updatefound:function(){console.log("New content is downloading.")},updated:function(){console.log("New content is available; please refresh.")},offline:function(){console.log("No internet connection found. App is running in offline mode.")},error:function(e){console.error("Error during service worker registration:",e)}});var j=n("8c4f"),D=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"home"},[n("section",{staticClass:"hero is-link is-fullheight is-fullheight-with-navbar",staticStyle:{"max-height":"1024px!important",height:"100%","min-height":"640px"}},[n("div",{staticClass:"hero-body",staticStyle:{position:"relative"}},[e.selectedPartner?n("img",{staticClass:"background-img",attrs:{src:e.selectedPartner.background_image}}):n("img",{staticClass:"background-img",attrs:{src:e.siteConfig.background_image}}),e.partners?n("partners-component",{staticStyle:{position:"absolute",bottom:"0px"},attrs:{partners:e.partners},on:{switchPartner:e.switchPartner}}):e._e(),e.selectedPartner?n("div",{staticClass:"container",staticStyle:{"margin-bottom":"100px"}},[n("h1",{staticClass:"title is-1"},[e._v(" "+e._s(e.selectedPartner.splash_title)+" ")]),n("h2",{staticClass:"subtitle is-3"},[e._v(" "+e._s(e.selectedPartner.splash_subtitle)+" ")]),e.selectedPartner.splash_feature_list?n("ul",{staticClass:"feature-list"},e._l(e.selectedPartner.splash_feature_list,(function(t){return n("li",{key:t},[e._v(" "+e._s(t)+" ")])})),0):e._e(),n("br"),e.selectedPartner.about_url?n("b-button",{staticStyle:{"text-transform":"none"},attrs:{rounded:""},on:{click:function(t){return e.showAboutPartner(e.selectedPartner)}}},[n("span",{staticClass:"explore-btn"},[e._v("About")])]):e._e(),e._v(" "),n("b-button",{staticStyle:{"text-transform":"none"},attrs:{rounded:""},on:{click:e.enter}},[n("span",{staticClass:"explore-btn"},[e._v(e._s(e.selectedPartner.explore_button_text))])])],1):n("div",{staticClass:"container",staticStyle:{"margin-bottom":"100px"}},[n("h1",{staticClass:"title is-1"},[e._v(" "+e._s(e.siteConfig.splash_title)+" ")]),n("h2",{staticClass:"subtitle is-3"},[e._v(" "+e._s(e.siteConfig.splash_subtitle)+" ")]),e.siteConfig.splash_feature_list?n("ul",{staticClass:"feature-list"},e._l(e.siteConfig.splash_feature_list,(function(t){return n("li",{key:t},[e._v(" "+e._s(t)+" ")])})),0):e._e(),n("br"),n("b-button",{staticStyle:{"text-transform":"none"},attrs:{rounded:""},on:{click:e.enter}},[n("span",{staticClass:"explore-btn"},[e._v(e._s(e.siteConfig.explore_button_text))])])],1)],1)]),n("span",{ref:"search_anchor"}),n("br"),n("section",{staticStyle:{"margin-top":"-30px",opacity:"0.6"}},[n("b-progress",{attrs:{value:e.progress}})],1),n("br"),e.resourceCategories.length>1?n("div",{staticClass:"container",staticStyle:{"text-align":"center"}},[n("b-tooltip",{attrs:{label:"List all items",position:"is-bottom"}},[n("div",{staticClass:"item-lists is-link",class:{active:!e.selectedCategory},staticStyle:{width:"30px","margin-left":"-16px","border-bottom-color":"gray"},on:{click:function(t){e.selectedCategory=null,e.updateQueryTags()}}},[e._v(" All ")])]),e._l(e.resourceCategories,(function(t){return n("b-tooltip",{key:t.name,attrs:{label:t.description,position:"is-bottom"}},[n("div",{staticClass:"item-lists is-link",class:{active:e.selectedCategory===t},style:{"border-bottom-color":t.outline_color},on:{click:function(n){e.selectedCategory=t,e.updateQueryTags()}}},[e._v(" "+e._s(t.name)+" ")])])}))],2):e._e(),n("resource-item-selector",{attrs:{allItems:e.resourceItems,fullLabelList:e.fullLabelList,tagCategories:e.tagCategories,type:e.selectedCategory&&e.selectedCategory.type,showDisplayMode:e.screenWidth>700,searchTags:e.searchTags},on:{"selection-changed":e.updateResourceItemList,"display-mode-change":e.displayModeChanged,"tags-updated":e.updateQueryTags,"input-change":e.removePartner}}),n("br"),e.selectedItems?n("resource-item-list",{attrs:{allItems:e.selectedItems,displayMode:e.screenWidth>700?e.displayMode:"card",bioEngineReady:e.bioEngineReady},on:{"show-resource-item-info":e.showResourceItemInfo,"select-tag":function(t){e.searchTags=[t]}}}):e._e(),n("br"),n("footer",{staticClass:"footer"},[e.siteConfig.footer?n("div",{staticClass:"columns is-mobile is-centered"},e._l(e.siteConfig.footer,(function(t){return n("div",{key:t.label,staticClass:"column is-one-quarter",staticStyle:{"text-align":"center",width:"16%"}},[n("b-tooltip",{attrs:{label:t.tooltip,position:"is-top"}},[n("a",{attrs:{href:t.url,target:"_blank"}},[n("figure",[n("img",{staticStyle:{"max-height":"55px"},attrs:{src:t.logo}}),n("figcaption",{staticClass:"hide-on-small-screen"},[e._v(" "+e._s(t.label)+" ")])])])])],1)})),0):e._e(),e.siteConfig.footnote?n("div",{staticStyle:{"text-align":"center"}},[n("p",[e._v(e._s(e.siteConfig.footnote))])]):e._e()]),n("modal",{staticStyle:{"max-width":"100%","max-height":"100%","z-index":"9999"},attrs:{name:"window-modal-dialog",resizable:!e.dialogWindowConfig.fullscreen,width:e.dialogWindowConfig.width,height:e.dialogWindowConfig.height,adaptive_size:e.dialogWindowConfig.adaptive_size,minWidth:200,minHeight:150,fullscreen:e.dialogWindowConfig.fullscreen,draggable:".drag-handle",scrollable:!0}},[e.selectedDialogWindow?n("div",{staticClass:"dialog-header",class:{"drag-handle":!e.isTouchDevice},on:{dblclick:function(t){return e.maximizeDialogWindow()}}},[n("div",{staticStyle:{position:"absolute",left:"2px","margin-top":"-1px"}},[n("button",{staticClass:"noselect dialog-control-button",staticStyle:{background:"#ff0000c4"},on:{click:function(t){return e.closeDialogWindow(e.selectedDialogWindow)}}},[e._v(" x ")]),e.screenWidth>700?n("button",{staticClass:"noselect dialog-control-button",staticStyle:{background:"#00cdff61"},on:{click:function(t){return e.minimizeDialogWindow()}}},[e._v(" - ")]):e._e(),e.screenWidth>700?n("button",{staticClass:"noselect dialog-control-button",staticStyle:{background:"#00cdff61"},on:{click:function(t){return e.maximizeDialogWindow()}}},[e._v(" "+e._s(e.dialogWindowConfig.fullscreen?"=":"+")+" ")]):e._e()]),n("span",{staticClass:"noselect dialog-title"},[e._v(" "+e._s(e.selectedDialogWindow.name))]),n("b-dropdown",{staticStyle:{position:"absolute",right:"1px"},attrs:{"aria-role":"list",position:"is-bottom-left"}},[n("button",{staticClass:"button",staticStyle:{background:"rgba(0, 205, 255, 0.38)",color:"white",width:"34px"},attrs:{slot:"trigger"},slot:"trigger"},[n("b-icon",{attrs:{icon:"dots-horizontal"}})],1),e._l(e.dialogWindows,(function(t){return n("b-dropdown-item",{key:t.id,attrs:{"aria-role":"listitem"},on:{click:function(n){return e.selectWindow(t)}}},[e._v(e._s(t.name))])}))],2)],1):e._e(),e._l(e.dialogWindows,(function(t){return[n("div",{directives:[{name:"show",rawName:"v-show",value:t===e.selectedDialogWindow,expression:"wdialog === selectedDialogWindow"}],key:t.window_id,staticStyle:{height:"calc(100% - 18px)"}},[n("div",{staticClass:"noselect",staticStyle:{width:"100%",height:"100%"},attrs:{id:t.window_id}})])]}))],2),n("modal",{staticStyle:{"max-width":"100%","max-height":"100%"},attrs:{name:"info-dialog",resizable:!0,minWidth:200,minHeight:150,height:600,width:800,fullscreen:e.infoDialogFullscreen,draggable:".drag-handle",scrollable:!0}},[n("div",{staticClass:"dialog-header",class:{"drag-handle":!e.isTouchDevice},on:{dblclick:function(t){return e.maximizeInfoWindow()}}},[n("div",{staticStyle:{position:"absolute",left:"2px","margin-top":"-1px"}},[n("button",{staticClass:"noselect dialog-control-button",staticStyle:{background:"#ff0000c4"},on:{click:function(t){return e.closeInfoWindow()}}},[e._v(" x ")]),e.screenWidth>700?n("button",{staticClass:"noselect dialog-control-button",staticStyle:{background:"#00cdff61"},on:{click:function(t){return e.maximizeInfoWindow()}}},[e._v(" "+e._s(e.infoDialogFullscreen?"=":"+")+" ")]):e._e()]),n("span",{staticClass:"noselect dialog-title"},[e._v(" "+e._s(e.infoDialogTitle))])]),"markdown"===e.showInfoDialogMode?n("div",{staticClass:"markdown-container"},[n("markdown-component",{attrs:{content:e.infoMarkdownContent,url:e.infoMarkdownUrl}}),e.infoCommentBoxTitle?n("comment-box",{attrs:{title:e.infoCommentBoxTitle}}):e._e()],1):"attachments"===e.showInfoDialogMode&&e.selectedResourceItem?n("div",{staticClass:"markdown-container"},[n("attachments-component",{attrs:{attachments:e.selectedResourceItem.attachments,focusTarget:e.selectedResourceItem._focus}})],1):"model"===e.showInfoDialogMode&&e.selectedResourceItem?n("resource-item-info",{attrs:{"resource-item":e.selectedResourceItem,"show-resource-item-info":e.showResourceItemInfo}}):e._e()],1)],1)},T=[],P=(n("a4d3"),n("e01a"),n("99af"),n("4de4"),n("a630"),n("caad"),n("c975"),n("a15b"),n("d81d"),n("a434"),n("b0c0"),n("6062"),n("8a79"),n("2532"),n("5319"),n("841c"),n("e2c1")),M=n("0d52"),S=n.n(M),L=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"container content-wrapper"},[n("section",{staticClass:"center "},[n("b-field",{staticStyle:{"max-width":"calc(100vw - 10px)","margin-bottom":"20px"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(t)}}},[n("div",{staticStyle:{position:"absolute",top:"36px",left:"50%",transform:"translate3d(-50%, 0, 0)"}},e._l(e.commonTags,(function(t,r){return n("a",{key:t,staticStyle:{margin:"3px"},on:{click:function(n){e.selectedTags=[t]}}},[e._v(e._s(t)+e._s(r===e.commonTags.length-1?"":","))])})),0),n("b-taginput",{staticClass:"searchbar",attrs:{loading:e.loading,type:"is-info","allow-new":"",data:e.filteredTags,"open-on-focus":!0,autocomplete:"",ellipsis:"",icon:"magnify",placeholder:"Type a keyword and press enter"},on:{input:e.updateSelectedTags,typing:e.getFilteredTags},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.option)+" ")]}}]),model:{value:e.selectedTags,callback:function(t){e.selectedTags=t},expression:"selectedTags"}}),n("b-dropdown",{attrs:{"aria-role":"list",position:"is-bottom-left"}},[n("button",{staticClass:"button tags-button",attrs:{slot:"trigger"},slot:"trigger"},[n("span",[e._v("Tags & Filters")]),n("b-icon",{attrs:{icon:"menu-down"}})],1),n("div",{staticClass:"dropdown-panel",attrs:{"aria-role":"listitem"}},[n("div",{staticClass:"container",staticStyle:{"max-width":"100%"}},[n("div",{staticClass:"field"},[n("b-switch",{model:{value:e.matchingAll,callback:function(t){e.matchingAll=t},expression:"matchingAll"}},[e._v("Match: "+e._s(e.matchingAll?" All":"Any"))]),n("b-switch",{model:{value:e.freeTextMode,callback:function(t){e.freeTextMode=t},expression:"freeTextMode"}},[e._v("Free text: "+e._s(e.freeTextMode?" Enabled":"Disabled"))]),n("b-tooltip",{attrs:{label:"โš ๏ธInclude unverified resource items contributed by users on Zenodo.",position:"is-bottom"}},[n("b-switch",{model:{value:e.includeWilderness,callback:function(t){e.includeWilderness=t},expression:"includeWilderness"}},[e._v("Include wilderness: "+e._s(e.includeWilderness?" Yes":"No"))])],1)],1),e._l(e.categories.grouped,(function(t,r){return n("div",{key:r,staticClass:"column"},[e._v(" "+e._s(r)+": "),n("br"),e._l(t,(function(t){return n("a",{key:t,staticStyle:{display:"inline-block"},on:{click:function(n){return e.addTagSelection(t)}}},[n("b-tag",{staticStyle:{cursor:"pointer"},attrs:{rounded:""}},[e._v(e._s(t))])],1)}))],2)})),n("div",{staticClass:"column"},[Object.keys(e.categories.grouped).length>0?n("span",[e._v("other: "),n("br")]):e._e(),e._l(e.categories.other,(function(t){return n("a",{key:t,staticStyle:{display:"inline-block"},on:{click:function(n){return e.addTagSelection(t)}}},[n("b-tag",{staticStyle:{cursor:"pointer"},attrs:{rounded:""}},[e._v(e._s(t))])],1)}))],2)],2)])]),e.showDisplayMode?n("b-field",{staticClass:"display-mode-btn"},[n("p",{staticClass:"control"},[n("b-tooltip",{attrs:{label:"Display mode: list",position:"is-top"}},[n("button",{staticClass:"button",class:{"is-primary":"list"===e.displayMode},staticStyle:{top:"1px",height:"34px"},on:{click:function(t){return e.switchDisplayMode("list")}}},[n("b-icon",{attrs:{icon:"format-list-bulleted"}})],1)])],1),n("p",{staticClass:"control"},[n("b-tooltip",{attrs:{label:"Display mode: card",position:"is-top"}},[n("button",{staticClass:"button",class:{"is-primary":"card"===e.displayMode},staticStyle:{top:"1px",height:"34px"},on:{click:function(t){return e.switchDisplayMode("card")}}},[n("b-icon",{attrs:{icon:"view-grid"}})],1)])],1)]):e._e()],1)],1)])},A=[],U=(n("a623"),n("45fc"),n("498a"),{name:"ResourceItemSelector",props:{allItems:{type:Array,default:null},type:{type:String,default:null},fullLabelList:{type:Array,default:null},tagCategories:{type:Object,default:null},showDisplayMode:{type:Boolean,default:!1},searchTags:{type:Array,default:null}},data:function(){return{selectedTags:[],filteredTags:[],loading:!1,matchingAll:!0,freeTextMode:!0,includeWilderness:!0,displayMode:"card"}},watch:{type:function(e){this.allItems&&(this.type=e,this.applySearch(this.selectedTags))},selectedTags:function(e){this.applySearch(e)},allItems:function(){this.applySearch(this.selectedTags)},searchTags:function(e){var t=this;if(e){var n=e&&e.length==this.selectedTags.length&&e.every((function(e,n){return e===t.selectedTags[n]}));n||(e=e.filter((function(e){return e&&""!=e.trim()})),this.selectedTags=Array.from(new Set(e)))}else this.selectedTags=[]}},mounted:function(){this.filteredTags=this.fullLabelList},computed:Object(a["a"])({commonTags:function(){var e,t=this;return(null===(e=this.siteConfig.resource_categories.filter((function(e){return e.type===t.type}))[0])||void 0===e?void 0:e.common_tags)||[]},categories:function(){if(!this.tagCategories)return{grouped:{},other:this.fullLabelList};var e,t={},n=[],r=this.selectedTags.map((function(e){return e.toLowerCase()})),i=Object(u["a"])(this.fullLabelList);try{for(i.s();!(e=i.n()).done;){var a=e.value;if(!(r.indexOf(a.toLowerCase())>=0)){for(var o=!1,s=0,c=Object.keys(this.tagCategories);s=0}));n=r.filter((function(n){var r;r=t.matchingAll?i.length>0&&i.every((function(e){return n.allLabels.includes(e.toLowerCase())})):i.length>0&&i.some((function(e){return n.allLabels.includes(e.toLowerCase())}));var a=function(e){return e=e.replace(/-/g,"").toLowerCase(),n.name.replace(/-/g,"").toLowerCase().includes(e)||n.description&&n.description.replace(/-/g,"").toLowerCase().split(/[ .:;?!~,`"&|()<>{}[\]\r\n/\\]+/).includes(e)||n.authors&&n.authors.some((function(t){return t.name.toLowerCase().includes(e)}))||n.apps&&n.apps.some((function(t){return t.name&&t.name.toLowerCase().includes(e)}))};return(!t.type||n.type===t.type)&&(r||t.freeTextMode&&e.every(a))}))}t.$emit("selection-changed",n),t.loading=!1,t.$forceUpdate()}),400)())},switchDisplayMode:function(e){this.displayMode!==e&&(this.displayMode=e,this.$emit("display-mode-change",e))},updateSelectedTags:function(){var e=this;this.$emit("input-change"),this.filteredTags=this.fullLabelList.filter((function(t){return e.selectedTags.indexOf(t)<0}))},getFilteredTags:function(e){this.filteredTags=this.fullLabelList.filter((function(t){return t.toLowerCase().indexOf(e.toLowerCase())>=0}))},addTagSelection:function(e){this.selectedTags.indexOf(e)<0&&this.selectedTags.push(e)}}}),F=U,z=(n("e88b"),Object(C["a"])(F,L,A,!1,null,"1f19381b",null)),W=z.exports,B=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"resource-item-list"},[n("div",{staticClass:"container content-wrapper"},["card"===e.displayMode?n("div",{staticClass:"columns is-multiline"},[e._l(e.allItems.slice((e.currentPage-1)*e.itemsPerPage,e.currentPage*e.itemsPerPage),(function(t){return n("div",{key:t.id,staticClass:"column is-4-desktop is-3-widescreen is-half-tablet resource-card"},[n("resource-item-card",{attrs:{resourceItem:t,bioEngineReady:e.bioEngineReady},on:{"show-info":e.showResourceItemInfo,"select-tag":function(t){return e.$emit("select-tag",t)}}})],1)})),e.allItems&&0===e.allItems.length?n("span",{staticClass:"column",staticStyle:{"text-align":"center"}},[e._v("The list is empty.")]):e._e()],2):n("b-table",{attrs:{data:e.allItems,detailed:!0,"show-detail-icon":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[e.siteConfig.table_view.columns.includes("name")?n("b-table-column",{attrs:{label:"Name",width:"20",field:"name",sortable:""}},[n("a",{on:{click:function(n){return e.showResourceItemInfo(t.row)}}},[e._v(" "+e._s(t.row.name)+" ")]),n("p",[e._v(" "+e._s(t.row.description.slice(0,100)+(t.row.description.length>100?"...":""))+" ")])]):e._e(),e.siteConfig.table_view.columns.includes("authors")?n("b-table-column",{attrs:{label:"Author(s)",width:"20",sortable:"",field:"authors"}},e._l(t.row.authors,(function(t){return n("b-tooltip",{key:t.name,attrs:{label:t.affiliation,position:"is-bottom"}},[n("span",[e._v(e._s(t.name))])])})),1):e._e(),e.siteConfig.table_view.columns.includes("badges")?n("b-table-column",{attrs:{label:"Badges",width:"50",field:"badges",sortable:""}},[t.row.badges?n("div",{staticClass:"badges"},e._l(t.row.badges,(function(t){return n("a",{key:t.label,staticClass:"badge",attrs:{href:t.url,target:"_blank"},on:{click:function(e){!t.url&&t.run&&t.run()}}},[t.icon?n("img",{attrs:{alt:t.label,src:t.icon}}):n("b-taglist",{attrs:{attached:"",rounded:""}},[n("b-tag",{attrs:{type:t.label_type||"is-dark"}},[e._v(e._s(t.label))]),t.ext?n("b-tag",{attrs:{type:t.ext_type||"is-success"}},[e._v(e._s(t.ext))]):e._e()],1)],1)})),0):e._e()]):e._e(),e.siteConfig.table_view.columns.includes("apps")?n("b-table-column",{attrs:{label:"Apps",width:"30",field:"apps",sortable:"",disabled:!e.bioEngineReady}},[n("app-icons",{attrs:{apps:t.row.apps}})],1):e._e(),n("b-table-column",{attrs:{label:"Created",width:"30",field:"created",sortable:""}},[n("span",[e._v(e._s(t.row.created))])])]}},{key:"detail",fn:function(t){return[n("resource-item-card",{attrs:{resourceItem:t.row},on:{"show-info":e.showResourceItemInfo,"select-tag":function(t){return e.$emit("select-tag",t)}}})]}}])}),n("b-pagination",{staticClass:"resource-pagination",attrs:{total:e.totalItems,current:e.currentPage,"range-before":3,"range-after":1,"per-page":e.itemsPerPage,"icon-prev":"arrow-left","icon-next":"arrow-right","aria-next-label":"Next page","aria-previous-label":"Previous page","aria-page-label":"Page","aria-current-label":"Current page"},on:{"update:current":function(t){e.currentPage=t}}})],1)])},q=[],$=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.apps?n("div",{staticClass:"app-icons"},[e._l(e.apps,(function(t){return[n("b-tooltip",{directives:[{name:"show",rawName:"v-show",value:!e.onlyLinked||t.isLinkedApp,expression:"!onlyLinked || app.isLinkedApp"}],key:t.name,class:{"hover-show":t.show_on_hover&&e.enableHover},attrs:{label:t.name,position:"is-bottom"}},[n("b-button",{staticClass:"is-small action-btn",attrs:{rounded:"",tag:"a",href:t.url,target:"_blank",disabled:e.disabled},on:{click:function(e){!t.url&&t.run&&t.run()}}},[t.icon?t.icon.startsWith("http")?n("img",{staticClass:"app-icon",attrs:{src:t.icon,alt:t.name}}):n("b-icon",{attrs:{icon:t.icon,size:"is-small"}}):n("b-icon",{attrs:{icon:"puzzle",size:"is-small"}})],1)],1)]}))],2):e._e()},K=[],N={name:"AppIcons",props:{apps:{type:Array,default:null},enableHover:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},onlyLinked:{type:Boolean,default:!1}}},J=N,H=(n("132b"),Object(C["a"])(J,$,K,!1,null,"e10eb140",null)),V=H.exports,G=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"resource-item-card"},[n("div",{staticClass:"card is-shady",style:{"box-shadow":e.boxShadow}},[n("div",{staticClass:"card-image"},[e.resourceItem.covers&&e.resourceItem.covers.length>0?n("b-carousel",{attrs:{indicator:e.resourceItem.covers.length>1,arrow:e.resourceItem.covers.length>1,"pause-info":!1}},e._l(e.resourceItem.covers,(function(t){return n("b-carousel-item",{key:t,staticClass:"carousel-image"},[n("img",{staticClass:"cover-image",attrs:{loading:"lazy",src:t,alt:e.resourceItem.name}})])})),1):n("img",{staticClass:"cover-image",staticStyle:{"background-color":"black",width:"100%",height:"160px"}})],1),n("div",{staticClass:"card-content"},[n("div",{staticClass:"content"},[n("h4",{staticClass:"resource-item-title truncated",on:{click:e.showResourceItemInfo}},["img"===e.icon.type?n("img",{staticClass:"item-icon",staticStyle:{"border-radius":"4px",background:"#ffffffd0"},attrs:{src:e.icon.src}}):"emoji"===e.icon.type?n("span",{staticClass:"icon"},[e._v(" "+e._s(e.icon.src)+" ")]):"animal"===e.icon.type?n("img",{staticClass:"item-icon",staticStyle:{"border-radius":"50%",background:"#167cf0b8"},attrs:{src:"/static/anonymousAnimals/"+e.icon.src+".png"}}):n("b-icon",{staticClass:"item-icon",attrs:{icon:e.icon.src}}),e._v(" "+e._s(e.resourceItem.name)+" ")],1),n("div",{staticClass:"buttons floating-buttons"},[n("dev-menu",{attrs:{resourceItem:e.resourceItem}}),n("app-icons",{attrs:{apps:e.resourceItem.apps,enableHover:!e.isTouchDevice,disabled:!e.bioEngineReady}})],1),e.resourceItem.description?n("p",{staticClass:"resource-item-description"},[e._v(" "+e._s(e.resourceItem.description.slice(0,64)+(e.resourceItem.description.length>64?"...":""))+" ")]):e._e(),n("span",{staticStyle:{"margin-top":"3px",display:"block"}},[e._l(e.resourceItem.tags.slice(0,4),(function(t){return n("span",{key:t},[n("b-tag",{staticStyle:{cursor:"pointer"},attrs:{rounded:""},nativeOn:{click:function(n){return e.selectTag(t)}}},[e._v(e._s(t))])],1)})),e.resourceItem.tags.length>4?n("span",[n("b-tag",{staticStyle:{cursor:"pointer"},attrs:{rounded:""},nativeOn:{click:function(t){return e.showResourceItemInfo(t)}}},[e._v("...")])],1):e._e()],2),n("badges",{staticClass:"badges",attrs:{badges:e.resourceItem.badges}})],1)])])])},Z=[],Y=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.badges?n("div",{staticClass:"badges"},e._l(e.badges,(function(t){return n("a",{key:t.label+t.ext,staticClass:"badge",attrs:{href:t.url,target:"_blank"},on:{click:function(e){!t.url&&t.run&&t.run()}}},[t.icon?n("img",{staticClass:"badge-img",attrs:{alt:t.label,src:t.icon}}):n("b-taglist",{attrs:{attached:"",rounded:""}},[t.label_short&&e.badges.length>3?n("b-tag",{attrs:{type:t.label_type||"is-dark"}},[e._v(e._s(t.label_short))]):n("b-tag",{attrs:{type:t.label_type||"is-dark"}},[e._v(e._s(t.label))]),void 0!==t.ext?n("b-tag",{attrs:{type:t.ext_type||"is-success"}},[e._v(e._s(t.ext))]):e._e()],1)],1)})),0):e._e()},Q=[],X={name:"Badges",props:{badges:{type:Array,default:null}}},ee=X,te=(n("94f5"),Object(C["a"])(ee,Y,Q,!1,null,"68bfc2b0",null)),ne=te.exports,re=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.devPlugins&&e.devPlugins.length>0?n("b-dropdown",{attrs:{triggers:["hover"],"aria-role":"list"},scopedSlots:e._u([{key:"trigger",fn:function(){return[n("b-button",{staticClass:"is-small action-btn",attrs:{rounded:""}},[n("b-icon",{attrs:{icon:"dev-to",size:"is-small"}})],1)]},proxy:!0}],null,!1,64769206)},e._l(e.devPlugins,(function(t){return n("b-dropdown-item",{key:t.id,attrs:{"aria-role":"listitem"},on:{click:function(n){return e.runPlugin(t)}}},[e._v(e._s(t.name))])})),1):e._e()},ie=[],ae={name:"dev-menu",props:["resourceItem"],computed:Object(a["a"])({},Object(l["b"])({devPlugins:function(e){return e.devPlugins},resourceItems:function(e){return e.resourceItems}})),methods:{runPlugin:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!t.resourceItem){n.next=5;break}return n.next=3,e.api.run({config:{referer:window.location.href,mode:"one",type:"bioengine"},data:t.resourceItem});case 3:n.next=7;break;case 5:return n.next=7,e.api.run({config:{referer:window.location.href,mode:"all",type:"bioengine"},data:t.resourceItems});case 7:case"end":return n.stop()}}),n)})))()},showLoader:function(e){e?this.loadingComponent=this.$buefy.loading.open({canCancel:!0,container:this.$el}):this.loadingComponent&&(this.loadingComponent.close(),this.loadingComponent=null)}}},oe=ae,se=(n("d7c4"),Object(C["a"])(oe,re,ie,!1,null,"3ba6a4a2",null)),ce=se.exports,le=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}(),ue={name:"ResourceItemCard",props:{resourceItem:{type:Object,default:null},bioEngineReady:{type:Boolean,default:!1}},data:function(){return{isTouchDevice:le}},components:{badges:ne,"app-icons":V,"dev-menu":ce},computed:Object(a["a"])({boxShadow:function(){var e=this.colorMap[this.resourceItem.type]||"rgba(0,0,0,.2)";return"0 3px 1px -2px ".concat(e,", 0 2px 2px 0 ").concat(e,", 0 1px 5px 0 rgba(0,0,0,.12)")},icon:function(){return this.resourceItem.icon?this.resourceItem.icon.startsWith("http")?{type:"img",src:this.resourceItem.icon}:{type:"material",src:this.resourceItem.icon}:this.resourceItem.nickname_icon?{type:"emoji",src:this.resourceItem.nickname_icon}:{type:"none"}}},Object(l["b"])({siteConfig:function(e){return e.siteConfig}})),created:function(){this.colorMap={};var e,t=Object(u["a"])(this.siteConfig.resource_categories);try{for(t.s();!(e=t.n()).done;){var n=e.value;this.colorMap[n.type]=n.outline_color}}catch(r){t.e(r)}finally{t.f()}},methods:{etAl:function(e){return e=e.map((function(e){return e.name.split(";")[0]})),e.length<3?e.join(", "):e.slice(0,3).join(", ")+" et al."},affil:function(e){var t=e.map((function(e){return e.affiliation}));return Array.from(new Set(t)).join("; ")},showResourceItemInfo:function(){this.$emit("show-info",this.resourceItem)},selectTag:function(e){this.$emit("select-tag",e)}}},de=ue,pe=(n("ebec"),Object(C["a"])(de,G,Z,!1,null,"19aa8d02",null)),fe=pe.exports,_e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);o["default"].component("label-selector",{props:["all-labels"],template:document.getElementById("label-selector")});var me={name:"ResourceItemList",components:{"resource-item-card":fe,"app-icons":V},props:{allItems:{type:Array,default:null},displayMode:{type:String,default:"card"},bioEngineReady:{type:Boolean,default:!1}},computed:Object(a["a"])({totalItems:function(){return this.allItems?this.allItems.length:0},filteredItems:function(){var e=this,t=this.allItems.filter((function(e){return e.cover_image})),n=t.concat(this.allItems.filter((function(e){return!e.cover_image})));return n.filter((function(t){return e.filters.every((function(e){return t.allLabels.includes(e)}))}))}},Object(l["b"])({siteConfig:function(e){return e.siteConfig}})),data:function(){return{isSafari:_e,currentPage:1,itemsPerPage:16}},mounted:function(){},beforeDestroy:function(){},methods:{showResourceItemInfo:function(e){this.$emit("show-resource-item-info",e)}}},he=me,ge=(n("c1ab"),Object(C["a"])(he,B,q,!1,null,"af27f312",null)),be=ge.exports,ve=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.resourceItem?n("div",{staticClass:"resource-item-info"},[n("section",{staticStyle:{"margin-bottom":"10px"}},[n("app-icons",{attrs:{apps:e.resourceItem.apps}}),e._v(" "),n("badges",{attrs:{badges:e.resourceItem.badges}})],1),n("section",[n("pre",{staticClass:"resource-id"},[e._v("๐Ÿ†”")]),n("pre",{ref:"resourceId",staticClass:"resource-id"},[e._v(e._s(e.resourceItem.id))]),n("b-button",{attrs:{size:"is-small","icon-left":"content-copy"},on:{click:function(t){return e.copyText(e.resourceItem.id)}}}),e.resourceItem.nickname_icon?n("pre",{staticClass:"resource-id",staticStyle:{"margin-left":"20px"}},[e._v(e._s(e.resourceItem.nickname_icon))]):e._e(),e.resourceItem.nickname?n("pre",{ref:"resourceNickname",staticClass:"resource-id"},[e._v(e._s(e.resourceItem.nickname))]):e._e(),e.resourceItem.nickname?n("b-button",{attrs:{size:"is-small","icon-left":"content-copy"},on:{click:function(t){return e.copyText(e.resourceItem.nickname)}}}):e._e()],1),e.resourceItem.covers&&e.resourceItem.covers.length>0?n("b-carousel",{staticStyle:{"max-width":"1024px"},attrs:{indicator:e.resourceItem.covers.length>1,arrow:e.resourceItem.covers.length>1,"pause-info":!1}},e._l(e.resourceItem.covers,(function(t){return n("b-carousel-item",{key:t},[n("figure",{staticClass:"image is-16by9"},[n("img",{staticClass:"cover-image",attrs:{loading:"lazy",src:t,alt:e.resourceItem.name,"data-target":"modal-image2"}})])])})),1):e._e(),e.resourceItem.authors&&e.resourceItem.authors.length>0?n("p",{staticClass:"authors"},[e._v(" "+e._s(e.resourceItem.authors.length>1?"Contributors: ":"Contributor: ")+" "),e._l(e.resourceItem.authors,(function(t){return n("b-tooltip",{key:t.name,attrs:{label:t.affiliation,position:"is-bottom"}},[n("span",{staticClass:"authors"},[e._v(e._s(t.name||t))])])}))],2):e._e(),n("br"),n("span",{staticStyle:{"margin-top":"3px",display:"block"}},e._l(e.resourceItem.tags,(function(t){return n("span",{key:t},[n("b-tag",{staticStyle:{cursor:"pointer"},attrs:{rounded:""}},[e._v(e._s(t))])],1)})),0),n("br"),e.resourceItem.description?n("p",[e._v(" "+e._s(e.resourceItem.description.slice(0,e.maxDescriptionLetters))+" "),e.resourceItem.description.length>e.maxDescriptionLetters?n("a",{on:{click:function(t){e.maxDescriptionLetters=e.resourceItem.description.length}}},[e._v("...show all.")]):e._e()]):e._e(),n("attachments",{attrs:{attachments:e.resourceItem.attachments,focusTarget:e.resourceItem._focus}}),n("div",{staticClass:"markdown-body"},[e.resourceItem.docs?n("markdown",{attrs:{"enable-run-buttons":!0,"run-button-context":e.runButtonContext,baseUrl:e.resourceItem.baseUrl,content:e.resourceItem.docs.slice(0,e.maxDocsLetters)}}):e._e(),e.resourceItem.docs&&e.resourceItem.docs.length>e.maxDocsLetters?n("a",{staticStyle:{color:"#0366d6"},on:{click:function(t){e.maxDocsLetters=e.resourceItem.docs.length}}},[e._v("+ click here to see the full documentation")]):e._e(),n("br"),"model"===e.resourceItem.type&&e.modelAvailable?n("test-run-form",{attrs:{resourceItem:e.resourceItem}}):e._e(),"model"!==e.resourceItem.type||e.modelAvailable?e._e():n("div",{staticClass:"not-available"},[e._v(" This model is not available for testing. ")]),n("br"),e.resourceItem.training_data_item?n("div",[n("h2",[e._v("Training Data")]),n("resource-item-card",{attrs:{resourceItem:e.resourceItem.training_data_item},on:{"show-info":function(t){return e.showResourceItemInfo(e.resourceItem.training_data_item)}}})],1):e._e(),n("h2",[e._v(" Test Summary ")]),"model"==e.resourceItem.type?n("span",[e._v(" This "+e._s(e.resourceItem.type)+" can be used in: "),n("app-icons",{attrs:{onlyLinked:!0,apps:e.resourceItem.apps}}),n("br"),n("br")],1):e._e(),e.resourceItem.test_summary&&Object.keys(e.resourceItem.test_summary).length>0?n("test-summary",{attrs:{summary:e.resourceItem.test_summary}}):e._e(),e.formatedCitation?n("h2",{attrs:{id:"citation"}},[e._v("How to cite")]):e._e(),e.formatedCitation?n("ul",{staticClass:"citation"},e._l(e.formatedCitation,(function(t){return n("li",{key:t.text},[e._v(" "+e._s(t.text)+" "),t.url?n("a",{attrs:{href:t.url,target:"_blank"}},[e._v("["+e._s(t.url_text)+"]")]):e._e()])})),0):e._e()],1),n("comment-box",{attrs:{title:e.resourceItem.name}})],1):n("h2",[e._v("Resource not found: "+e._s(e.resourceId))])},ye=[],we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"attachments"},[e._l(e.normalizedAttachments,(function(t,r){return[t?n("h2",{key:r+"_title",staticStyle:{"font-size":"1.5rem","font-weight":"600","margin-top":"24px","margin-bottom":"16px","text-transform":"capitalize"},attrs:{id:r}},[e._v(" "+e._s(r)+" ")]):e._e(),t?n("b-table",{key:r+"_table",attrs:{data:e.convert2Array(t),detailed:!!t.type,"show-detail-icon":!!t.type},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.availableColumns,(function(r){return n("b-table-column",{key:r.field,attrs:{field:r.field,label:r.label,width:r.width||40,sortable:r.sortable}},[t.row[r.field]?["url"===r.type?n("a",{class:r.class,attrs:{href:t.row[r.field],target:"_blank"}},[e._v(" "+e._s(r.text)+" ")]):n("span",{class:r.class},[e._v(" "+e._s(t.row[r.field]&&t.row[r.field].slice(0,r.max_length)+(t.row[r.field].length>r.max_length?"...":""))+" ")])]:e._e()],2)}))}},{key:"detail",fn:function(e){return[n("resource-item-card",{attrs:{resourceItem:e.row}})]}}],null,!0)}):e._e()]}))],2)},xe=[],ke=n("53ca"),Ie={name:"Attachments",props:{attachments:{type:Object,default:null},focusTarget:{type:String,default:null}},components:{"resource-item-card":fe},data:function(){return{columns:[]}},mounted:function(){var e=this;setTimeout((function(){e.focus(e.focusTarget)}),100)},watch:{focusTarget:function(e){this.focus(e)}},computed:Object(a["a"])({availableColumns:function(){var e=this;return this.siteConfig.attachment_table.columns.filter((function(t){return e.columns.includes(t.field)}))},normalizedAttachments:function(){var e={};if(this.attachments)for(var t=0,n=Object.keys(this.attachments);t1&&void 0!==arguments[1]?arguments[1]:"bcz";if(2===e.length)return"yx";if(e.length<=5){var n=e.indexOf(Math.min.apply(Math,Object(Ze["a"])(e))),r=e.slice();r.splice(n,1);var i=et(r,t.slice(1)),a=t[0];return nt(i,a,n)}throw new Error("Image shape [".concat(e.join(", "),"] is not supported."))}function tt(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r)if(2===e.length)n="yx";else if(3===e.length)n="yxc";else{if(4!==e.length)throw new Error("Image shape [".concat(e.join(", "),"] is not supported."));n=t.includes("z")?"zyxc":"cyxb"}else{var i="bcz";t.includes("c")?t.includes("z")?t.includes("b")||(i="cz"):i="bc":i="bz",n=et(e,i)}return n}function nt(e,t,n){return e.substring(0,n)+t+e.substring(n)}function rt(e){var t;if("uint8"==e)t=Uint8Array;else if("int8"==e)t=Int8Array;else if("uint16"==e)t=Uint16Array;else if("int16"==e)t=Int16Array;else if("uint32"==e)t=Uint32Array;else if("int32"==e)t=Int32Array;else if("float32"==e)t=Float32Array;else if("float64"==e)t=Float64Array;else{if("bool"!=e)throw new Error("Unsupported dtype: "+e);t=Uint8Array}return t}function it(e,t){for(var n=new Uint8Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=e.dataSync(),r=rt(e._rdtype),i=new r(n.length),a=0;a2&&t.includes("b")?lt(e,"b",t):[e],n.map((function(t){return t._rdtype=e._rdtype,ot(t)}))}function pt(e){var t=new DataView(e.slice(8,10)).getUint8(0),n=new TextDecoder("utf-8").decode(new Uint8Array(e.slice(10,10+t))),r=JSON.parse(n.toLowerCase().replace(/'/g,'"').replace("(","[").replace(/,*\),*/g,"]"));return r.descr}function ft(e){return _t.apply(this,arguments)}function _t(){return _t=Object(d["a"])(regeneratorRuntime.mark((function e(t){var n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:{Range:"bytes=0-999"}});case 2:if(n=e.sent,n.ok){e.next=6;break}return console.error(n),e.abrupt("return",null);case 6:return e.next=8,n.arrayBuffer();case 8:return r=e.sent,i=pt(r),e.abrupt("return",i[0]);case 11:case"end":return e.stop()}}),e)}))),_t.apply(this,arguments)}var mt=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Object(Ve["a"])(this,e),this.fixedPaddedShape=t,this.padMin=n,this.padStep=r,this.padValue=i}return Object(Ge["a"])(e,[{key:"getPaddedShape",value:function(e){var t=[];if(this.fixedPaddedShape)t=this.fixedPaddedShape;else for(var n=this.padMin,r=this.padStep,i=0;i1&&void 0!==arguments[1]?arguments[1]:"center",n=this.getPaddedShape(e.shape),r=[],i=0;i2&&void 0!==arguments[2]?arguments[2]:void 0;return n=r?Ye["Gd"](e,t.map((function(e,t){return e[0]+r[t]})),e.shape.map((function(e,n){return e-t[n][0]-t[n][1]-2*r[n]}))):Ye["Gd"](e,t.map((function(e){return e[0]})),e.shape.map((function(e,n){return e-t[n][0]-t[n][1]}))),n._rdtype=e._rdtype,n}}]),e}(),ht=function(){function e(t,n,r){var i=this;Object(Ve["a"])(this,e),this.starts=t,this.ends=n,this.indexes=r,this.shape=n.map((function(e,t){return e-i.starts[t]})),this.data=null}return Object(Ge["a"])(e,[{key:"slice",value:function(e){this.data=Ye["Gd"](e,this.starts,this.shape),this.data._rdtype=e._rdtype}},{key:"merge",value:function(t,n){var r=this.starts.slice(),i=this.ends.slice();i[n]=t.ends[n];var a,o=this.ends[n]-t.starts[n];if(o<0)throw new Error("Cannot merge tiles with negative overlap.");if(null===this.data||null===t.data)a=null;else{if(0===o)a=Ye["yd"]([this.data,t.data],n);else{var s=this.data.shape.slice();s[n]-=Math.ceil(o/2);var c=s.map((function(){return 0})),l=Ye["Gd"](this.data,c,s),u=t.data.shape.slice();u[n]-=Math.floor(o/2);var d=u.map((function(){return 0}));d[n]+=Math.floor(o/2);var p=Ye["Gd"](t.data,d,u);a=Ye["yd"]([l,p],n)}a._rdtype=this.data._rdtype}var f=new e(r,i,this.indexes);return f.data=a,f}},{key:"mergeMean",value:function(t){var n=this.starts.slice(),r=this.ends.slice(),i=Ye["td"](this.data,t.data).div(2);i._rdtype=this.data._rdtype;var a=new e(n,r,this.indexes);return a.data=i,a}}]),e}(),gt=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:void 0;Object(Ve["a"])(this,e),this.imgShape=t,this.tileShape=n,void 0===r&&(r=n.map((function(){return 0}))),this.overlap=r}return Object(Ge["a"])(e,[{key:"getNTiles",value:function(){var e=this.overlap,t=this.tileShape,n=this.imgShape,r=t.map((function(t,r){var i=Math.ceil(n[r]/(t-e[r]));return i}));return r}},{key:"getTiles",value:function(){var e=this.overlap,t=this.tileShape,n=this.imgShape,r=this.getNTiles(),i=gt.apply(void 0,Object(Ze["a"])(r.map((function(e){return Array.from(Array(e).keys())})))),a=i.map((function(n){return n.map((function(n,r){return n*(t[r]-e[r])}))})),o=a.map((function(e){return e.map((function(e,r){return Math.min(e+t[r],n[r])}))})),s=a.map((function(e,t){return new ht(e,o[t],i[t])}));return s}}]),e}(),vt=function(){function e(t){Object(Ve["a"])(this,e),this.imgShape=t}return Object(Ge["a"])(e,[{key:"mergeTiles",value:function(e){for(var t=function(t){var n=[],r=function(e){var n=[];return e.indexes.map((function(e,r){r!==t&&n.push(e)})),n.join("-")},i=Xe.a.groupBy(e,r);for(var a in i){var o=i[a];if(o.sort((function(e,n){return e.indexes[t]-n.indexes[t]})),o.length>1){for(var s=o[0],c=1;c0}var xt={name:"TestRunForm",props:{resourceItem:{type:Object,default:null}},data:function(){return{switch:!1,waiting:!1,error:!1,rdf:null,info:"",triton:null,ij:null,api:null,buttonEnabledRun:!1,buttonEnabledInput:!1,buttonEnabledOutput:!1,inputEndianness:null,tileSizes:{x:0,y:0,z:0},tileOverlap:{x:0,y:0,z:0}}},computed:{infoColor:function(){return this.error?"red":"black"},fixedTileSize:function(){if(this.rdf){var e=this.rdf.inputs[0],t=this.tritonConfig.input[0]["dims"];return void 0===t||t.includes(-1)?e.shape instanceof Array&&e.shape:t}return!1},inputMinShape:function(){if(this.rdf){var e,t=this.rdf.inputs[0].axes;e=!1===this.fixedTileSize?this.rdf.inputs[0].shape.min:this.fixedTileSize;var n=t.split("").reduce((function(t,n,r){return t[n]=e[r],t}),{});return n}return{}},inputMaxShape:function(){if(this.rdf){var e,t=this.rdf.inputs[0].axes;return e=!1!==this.fixedTileSize?this.fixedTileSize:this.rdf.inputs[0].shape.min.map((function(){})),t.split("").reduce((function(t,n,r){return t[n]=e[r],t}),{})}return{}}},watch:{tileSizes:{handler:function(e,t){t.y!==t.x&&(this.tileSizes.y=t.x),console.log(e,t)},deep:!0},tileOverlap:{handler:function(e,t){t.y!==t.x&&(this.tileOverlap.y=t.x),console.log(e,t)},deep:!0}},methods:{turnOn:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.switch=!0,e.setInfoPanel("Initializing...",!0),t.next=4,e.loadImJoy();case 4:return t.next=6,e.loadTritonClient();case 6:return t.next=8,e.loadRdf();case 8:return t.next=10,e.loadTritonConfig();case 10:return e.setDefaultTileSize(),e.setDefaultOverlap(),t.next=14,e.detectInputEndianness();case 14:return e.setInfoPanel("Loading ImageJ.JS ...",!0),t.next=17,e.loadImageJ();case 17:e.setInfoPanel(""),e.buttonEnabledRun=!0,(wt(e.rdf,"test_inputs")||wt(e.rdf,"sample_inputs"))&&(e.buttonEnabledInput=!0),(wt(e.rdf,"test_outputs")||wt(e.rdf,"sample_outputs"))&&(e.buttonEnabledOutput=!0);case 21:case"end":return t.stop()}}),t)})))()},setDefaultTileSize:function(){var e=this,t=Object.assign({},this.inputMinShape),n=this.rdf.inputs[0].axes;if(!1===this.fixedTileSize){var r=4;t.x=r*this.inputMinShape.x,t.y=r*this.inputMinShape.y}else n.split("").map((function(n,r){t[n]=e.fixedTileSize[r]}));this.tileSizes=t},setDefaultOverlap:function(){var e=this.rdf.inputs[0],t=this.rdf.outputs[0],n=e.axes,r={};t.halo&&!1===this.fixedTileSize?n.split("").map((function(e,n){t.axes.includes(e)&&"z"!==e?r[e]=2*t.halo[n]:r[e]=0})):r=n.split("").reduce((function(e,t){return e[t]=0,e}),{}),this.tileOverlap=r},setInfoPanel:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.info=e,this.waiting=t,this.error=n},bioengineExecute:function(e){var t=arguments,n=this;return Object(d["a"])(regeneratorRuntime.mark((function r(){var i,a,o,s;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return i=t.length>1&&void 0!==t[1]?t[1]:null,a=t.length>2&&void 0!==t[2]&&t[2],o=t.length>3&&void 0!==t[3]?t[3]:null,r.next=5,n.triton.execute({_rkwargs:!0,inputs:[{model_id:e,inputs:i,return_rdf:a,weight_format:o}],model_name:"bioengine-model-runner",serialization:"imjoy"});case 5:return s=r.sent,r.abrupt("return",s);case 7:case"end":return r.stop()}}),r)})))()},submitTensor:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i,a,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r="<"===t.inputEndianness,i=ot(e,r),n.next=4,t.bioengineExecute(t.resourceItem.id,[i]);case 4:if(a=n.sent,a.result.success){n.next=7;break}throw new Error(a.result.error);case 7:return o=a.result.outputs[0],n.abrupt("return",o);case 9:case"end":return n.stop()}}),n)})))()},runOneTensor:function(e,t){var n=this;return Object(d["a"])(regeneratorRuntime.mark((function r(){var i,a,o,s,c,l,u,d,p;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,n.api.log("Input tile shape: "+e.shape);case 2:return i=t.pad(e),a=Object($e["a"])(i,2),o=a[0],s=a[1],r.next=5,n.api.log("Padded tile shape: "+o.shape);case 5:return r.next=7,n.submitTensor(o);case 7:return c=r.sent,r.next=10,n.api.log("Output tile shape: "+c._rshape);case 10:return l=at(c),u=n.rdf.outputs[0].axes.includes("x")&&n.rdf.outputs[0].axes.includes("y"),d=l,u&&(p=t.crop(l,s),d=p),r.abrupt("return",d);case 15:case"end":return r.stop()}}),r)})))()},runTiles:function(e,t,n){var r=this;return Object(d["a"])(regeneratorRuntime.mark((function i(){var a,o,s,c,l,u,d,p,f,_,m,h,g,b;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return a=!1===r.fixedTileSize?new mt(void 0,t.shape.min,t.shape.step,0):new mt(r.fixedTileSize,void 0,void 0,0),o=t.axes.split("").map((function(e){return r.tileSizes[e]})),s=t.axes.split("").map((function(e){return r.tileOverlap[e]})),console.log("tile size:",o,"overlap:",s),c=new bt(e.shape,o,s),l=c.getNTiles(),i.next=8,r.api.log("Number of tiles in each dimension: "+l);case 8:return u=c.getTiles(),i.next=11,r.api.log("Number of tiles: "+u.length);case 11:d=[],p=0;case 13:if(!(p1&&void 0!==t[1]?t[1]:"output",a=0;case 2:if(!(a0&&void 0!==arguments[0]?arguments[0]:1e4;return new Promise((function(t,n){var r=setInterval((function(){window.app&&void 0!==window.app.imjoy&&(clearInterval(r),t(window.app.imjoy))}),100);setTimeout((function(){clearInterval(r),n(new Error("Timeout waiting for window.app.imjoy"))}),e)}))},t.next=3,n();case 3:r=t.sent,console.log("ImJoy is ready:",r),i=window.app.imjoy.api,e.api=i;case 7:case"end":return t.stop()}}),t)})))()},loadImageJ:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.api.log("Loading IJ...");case 2:return t.next=4,e.api.createWindow({src:"https://ij.imjoy.io/",name:"ImageJ.JS",fullscreen:!1,window_id:"ij-container"});case 4:e.ij=t.sent;case 5:case"end":return t.stop()}}),t)})))()},viewFromUrl:function(e){var t=arguments,n=this;return Object(d["a"])(regeneratorRuntime.mark((function r(){var i,a,o,s,c,l,u,d,p,f,_,m,h,g,b;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return i=t.length>1&&void 0!==t[1]?t[1]:"input",r.next=3,n.api.log("View image from url: "+e);case 3:if(a=e.endsWith("/content")?e.split("/")[e.split("/").length-2]:e.split("/")[e.split("/").length-1],!a.endsWith(".npy")){r.next=29;break}return o=new Ne["a"],r.next=8,fetch(e).then((function(e){return e.arrayBuffer()}));case 8:return s=r.sent,r.next=11,o.load(s);case 11:if(c=r.sent,l=new Uint8Array(c.data.buffer.slice(c.data.byteOffset)),u={_rtype:"ndarray",_rdtype:c.dtype,_rshape:c.shape,_rvalue:l},d=n.rdf.inputs[0],p=tt(u._rshape,d.axes),f=at(u),"output"!==i){r.next=24;break}if(_=n.rdf.outputs[0],m=_.axes.includes("x")&&_.axes.includes("y"),m){r.next=24;break}return r.next=23,n.showTableFromTensor(f,a);case 23:return r.abrupt("return");case 24:return h=dt(f,p),r.next=27,n.showImgs(h,a);case 27:r.next=40;break;case 29:return r.next=31,fetch(e);case 31:if(g=r.sent,g.ok){r.next=36;break}return n.setInfoPanel("Failed to load the image.",!1,!0),console.error(g),r.abrupt("return");case 36:return r.next=38,g.arrayBuffer();case 38:b=r.sent,n.ij.viewImage(b,{name:a}).catch((function(e){console.error(e),n.setInfoPanel("Failed to view the image.",!1,!0)}));case 40:case"end":return r.stop()}}),r)})))()},showTableFromTensor:function(e,t){var n=this;return Object(d["a"])(regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:i=e.arraySync(),i.map(function(){var e=Object(d["a"])(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n.showTable(r,"Probability",t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return r.stop()}}),r)})))()},showTable:function(e,t,n){var r=this;return Object(d["a"])(regeneratorRuntime.mark((function i(){var a,o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:a=e.map((function(e,t){return t})),o='\nTable.create("'.concat(n,'")\nTable.setColumn("Index", newArray(').concat(a.join(","),'))\nTable.setColumn("').concat(t,'", newArray(').concat(e.join(","),"))\n "),r.ij.runMacro(o);case 3:case"end":return i.stop()}}),i)})))()},detectInputEndianness:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.rdf.test_inputs[0],n){t.next=5;break}e.inputEndianness=null,t.next=8;break;case 5:return t.next=7,ft(n);case 7:e.inputEndianness=t.sent;case 8:return t.next=10,e.api.log("Input endianness: "+e.inputEndianness);case 10:case"end":return t.stop()}}),t)})))()},loadTestInput:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.setInfoPanel("Loading test input...",!0),!wt(e.rdf,"test_inputs")){t.next=18;break}return t.prev=2,t.next=5,e.viewFromUrl(e.rdf.test_inputs[0]);case 5:t.next=16;break;case 7:return t.prev=7,t.t0=t["catch"](2),t.next=11,e.api.log("Failed to load the test input, see console for details.");case 11:return console.error(t.t0),t.next=14,e.api.log("Loading sample input instead...");case 14:return t.next=16,e.viewFromUrl(e.rdf.sample_inputs[0]);case 16:t.next=25;break;case 18:if(!wt(e.rdf,"sample_inputs")){t.next=23;break}return t.next=21,e.viewFromUrl(e.rdf.sample_inputs[0]);case 21:t.next=25;break;case 23:return t.next=25,e.api.alert("No test input found.");case 25:e.setInfoPanel("");case 26:case"end":return t.stop()}}),t,null,[[2,7]])})))()},loadTestOutput:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.setInfoPanel("Loading test output...",!0),!wt(e.rdf,"test_outputs")){t.next=18;break}return t.prev=2,t.next=5,e.viewFromUrl(e.rdf.test_outputs[0],"output");case 5:t.next=16;break;case 7:return t.prev=7,t.t0=t["catch"](2),t.next=11,e.api.log("Failed to load the test output.");case 11:return console.error(t.t0),t.next=14,e.api.log("Loading sample output instead...");case 14:return t.next=16,e.viewFromUrl(e.rdf.sample_outputs[0],"output");case 16:t.next=25;break;case 18:if(!wt(e.rdf,"sample_outputs")){t.next=23;break}return t.next=21,e.viewFromUrl(e.rdf.sample_outputs[0],"output");case 21:t.next=25;break;case 23:return t.next=25,e.api.alert("No test output found.");case 25:e.setInfoPanel("");case 26:case"end":return t.stop()}}),t,null,[[2,7]])})))()}}},kt=xt,It=(n("76cc"),Object(C["a"])(kt,Be,qe,!1,null,"59a6b4b1",null)),Ct=It.exports;function Ot(e){return Et.apply(this,arguments)}function Et(){return Et=Object(d["a"])(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:if(n=e.sent,!n.ok){e.next=10;break}return e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",P["a"].load(r));case 10:throw new Error("Oops, failed to fetch test summary.");case 11:case"end":return e.stop()}}),e)}))),Et.apply(this,arguments)}var Rt={name:"ResourceItemInfo",props:{resourceItem:{type:Object,default:null},showResourceItemInfo:{type:Function,default:null}},components:{markdown:Re["a"],"test-summary":Se,badges:ne,attachments:Ee,"app-icons":V,"comment-box":We,"resource-item-card":fe,"test-run-form":Ct},data:function(){return{maxDescriptionLetters:100,maxDocsLetters:500,showSource:!1,modelAvailable:!1}},mounted:function(){var e=this,t=function(){if(e.resourceItem._focus){var t=document.getElementById(e.resourceItem._focus);t&&(t.parentNode.scrollTop=t.offsetTop-40)}};if(this.resourceItem.documentation&&this.getDocs(this.resourceItem).then(t),!this.resourceItem.test_summary){var n=this.resourceItem.source.replace(/rdf\.yaml$/,"test_summary.yaml");Ot(n).then((function(t){e.resourceItem.test_summary=t,e.$forceUpdate()}))}this.getManifestList()},computed:Object(a["a"])({runButtonContext:function(){return{config:{referer:window.location.href,mode:"one",type:"bioengine"},data:this.resourceItem}},formatedCitation:function(){var e=this.resourceItem.cite;if(!e||e.length<=0)return null;this.resourceItem.cite&&!Array.isArray(this.resourceItem.cite)&&(e=[this.resourceItem.cite]);var t,n=[],r=Object(u["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if("string"===typeof i)n.push({text:i});else{var a=i.url,o="link";i.doi&&(a=i.doi.startsWith("http")?i.doi:"https://doi.org/"+i.doi,o="doi"),n.push({text:i.text,url:a,url_text:o})}}}catch(s){r.e(s)}finally{r.f()}return n}},Object(l["b"])({resourceItems:function(e){return e.resourceItems},siteConfig:function(e){return e.siteConfig}})),methods:{copyText:function(e){var t=document.createElement("input");t.style="position: absolute; left: -1000px; top: -1000px",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t);var n={message:"Copied to your clipboard!",duration:1e3,queue:!1};this.$buefy.snackbar.open(n)},getDocs:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i,a,o,s,c;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.docs="@loading...",n.prev=1,r=e.documentation.startsWith("http")?e.documentation:Object(p["c"])(e.root_url,e.documentation),r.includes("github.")&&(r=r+"?"+Object(p["f"])()),n.next=6,fetch(r);case 6:if(i=n.sent,200!=i.status){n.next=15;break}return n.next=10,i.text();case 10:a=n.sent,e.documentation.startsWith("http")?(c=e.documentation.split("/"),o=c.slice(0,c.length-1).join("/")):(s=(e.root_url+"/"+e.documentation).split("/"),o=s.slice(0,s.length-1).join("/")),e.documentation.endsWith(".md")?(e.baseUrl=o,e.docs=a):e.documentation&&(e.docs="### [Documentation](".concat(e.documentation,")")),n.next=16;break;case 15:e.docs=null;case 16:t.$forceUpdate(),n.next=23;break;case 19:n.prev=19,n.t0=n["catch"](1),e.docs=null,t.$forceUpdate();case 23:return n.prev=23,e.docs&&(t.maxDocsLetters=e.docs.split("\n").slice(0,5).join("\n").length),n.finish(23);case 26:case"end":return n.stop()}}),n,null,[[1,19,23,26]])})))()},getManifestList:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){var n,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n="https://raw.githubusercontent.com/bioimage-io/bioengine-model-runner/gh-pages/manifest.bioengine.json",t.next=3,fetch(n).then((function(e){return e.json()}));case 3:r=t.sent,i=r.collection.map((function(e){return e.id})),e.modelAvailable=i.includes(e.resourceItem.id);case 6:case"end":return t.stop()}}),t)})))()}}},jt=Rt,Dt=(n("f28a"),Object(C["a"])(jt,ve,ye,!1,null,"76b9a4d2",null)),Tt=Dt.exports,Pt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"container partners"},[n("h2",[e._v("Community Partners")]),n("b-carousel-list",{attrs:{data:e.partners,arrow:!0,"arrow-hover":!0,"items-to-list":1,"items-to-show":e.items2Show,repeat:!1,"has-drag":!0,"has-grayscale":!1,"has-opacity":!1,"icon-size":"is-large"},scopedSlots:e._u([{key:"item",fn:function(t){return[n("figure",{staticClass:"image"},[n("b-tooltip",{attrs:{label:t.list.name,position:"is-right"}},[n("a",{on:{click:function(n){return e.switchPartner(t.list)}}},[n("img",{staticClass:"partner-logo",attrs:{src:t.list.icon}})])])],1)]}}]),model:{value:e.selectedPartnerIndex,callback:function(t){e.selectedPartnerIndex=t},expression:"selectedPartnerIndex"}})],1)},Mt=[],St={name:"Partners",props:{partners:{type:Array,default:null}},data:function(){return{icon_width:140,selectedPartnerIndex:0,items2Show:window.innerWidth/140}},mounted:function(){window.addEventListener("resize",this.updateSize),window.dispatchEvent(new Event("resize"))},beforeDestroy:function(){window.removeEventListener("resize",this.updateSize)},methods:{updateSize:function(){window.innerWidth<512?this.icon_width=80:this.icon_width=140,this.items2Show=window.innerWidth/this.icon_width,this.$forceUpdate()},switchPartner:function(e){this.$emit("switchPartner",e)}}},Lt=St,At=(n("17ec"),Object(C["a"])(Lt,Pt,Mt,!1,null,"a2e6d4aa",null)),Ut=At.exports,Ft={notebook:"notebook-outline",dataset:"database",application:"puzzle",model:"hubspot"};function zt(e){return e.replace(/_/g," ").replace(/(^|\s)\S/g,(function(e){return e.toUpperCase()}))}var Wt=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}();function Bt(e,t,n){var r,i;if(t=Object.assign({},t),t.covers=t.covers||[],t.authors=t.authors||[],t.description=t.description||"",t.covers&&!Array.isArray(t.covers)&&(t.covers=[t.covers]),"extension"===t.icon&&(t.icon="puzzle"),"dataset"===t.type&&!t.download_url&&t.source&&(t.download_url=t.source),t.covers=t.covers.map((function(e){return!e.startsWith("http")&&t.root_url?encodeURI(Object(p["c"])(t.root_url,e)):e.includes(" ")?encodeURI(e):e})),t.covers.length<=0&&(null===(r=t)||void 0===r||null===(i=r.icon)||void 0===i?void 0:i.startsWith("http"))&&t.covers.push(t.icon),t.allLabels=t.labels||[],t.license&&t.allLabels.push(t.license),t.allLabels.push(t.id),t.applications&&(t.allLabels=t.allLabels.concat(t.applications)),t.nickname&&t.allLabels.push(t.nickname),t.tags&&(t.tags=t.tags.filter((function(t){return"string"===typeof t&&!e.siteConfig.excluded_tags.includes(t)})),t.allLabels=t.allLabels.concat(t.tags.filter((function(e){return"string"===typeof e})).map((function(e){return e.toLowerCase()})))),t.allLabels=Array.from(new Set(t.allLabels.map((function(e){return e.toLowerCase()})))),t.apps=[],t.owners&&t.owners.includes(e.userId)&&t.apps.unshift({name:"Edit",icon:"pencil",show_on_hover:!0,run:function(){e.$router.push({name:"Update",params:{updateDepositId:t.id}})}}),t.apps.unshift({name:"Share",icon:"share-variant",show_on_hover:!0,run:function(){var n=Object.assign({},e.$route.query);n.id=t.id,e.$router.replace({query:n}).catch((function(){})),e.$buefy.dialog.alert({title:"Sharing "+t.type,hasIcon:!0,icon:"share",message:"Here is the URL for sharing ".concat(t.name,":
").concat(window.location.href,""),confirmText:"OK"})}}),t.config&&t.rdf_source&&t.apps.unshift({name:"Source",icon:"code-tags",show_on_hover:!0,run:function(){e.showSource(t)}}),t.download_url&&t.apps.unshift({name:"Download",icon:"download",url:t.download_url,show_on_hover:!0}),t.git_repo&&t.apps.unshift({name:"Git Repository",icon:"github",url:t.git_repo,show_on_hover:!0}),"application"===t.type)if(e.allApps[t.id])t.apps.unshift({name:"Run",icon:"play",run:function(){v(e,e.allApps[t.id],e.resourceItems)}});else if(t.tags.includes("colab")&&t.source&&t.source.endsWith(".ipynb"))if(t.config=t.config||{},t.source&&t.source.startsWith("https://raw.githubusercontent.com/")){var a=t.source.split("/");t.config._colab_url="https://colab.research.google.com/github/".concat(a[3],"/").concat(a[4],"/blob/").concat(a[5],"/").concat(a.slice(6).join("/")),t.apps.unshift({name:"Run",icon:"play",run:function(){window.open(t.config._colab_url)}})}else console.warn("Invalid colab source URL: "+t.source+" (the URL must be a raw github URL starts with https://raw.githubusercontent.com/)");t.links=t.links||[],t.id in n&&t.links.push("imjoy/imjoy"),t.training_data&&t.links.push(t.training_data.id);var o,s=Object(u["a"])(t.links);try{var c=function(){var n=o.value;if(["imjoy/bioimageio-packager","imjoy/genericbioengineapp"].includes(n))return"continue";var r,i=e.resourceItems.filter((function(e){return e.id.toLowerCase()===n.toLowerCase()})),a=Object(u["a"])(i);try{var s=function(){var i=r.value;t.apps.unshift({name:i.name,icon:i.icon||Ft[i.type],isLinkedApp:e.allApps[n],run:function(){return Object(d["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(!e.allApps[n]){r.next=7;break}return r.next=3,e.updateFullRDF(t);case 3:return r.next=5,w(e,e.allApps[n],t);case 5:r.next=8;break;case 7:e.showResourceItemInfo(i);case 8:case"end":return r.stop()}}),r)})))()}})};for(a.s();!(r=a.n()).done;)s()}catch(c){a.e(c)}finally{a.f()}};for(s.s();!(o=s.n()).done;)c()}catch(y){s.e(y)}finally{s.f()}t.badges=t.badges||[],t.attachments=t.attachments||{};var l,f=e.resourceItems.filter((function(e){return e.links&&e.links.includes(t.id)})),_=Object(u["a"])(f);try{for(_.s();!(l=_.n()).done;){var m=l.value;t.attachments[m.type]?t.attachments[m.type].push(m):t.attachments[m.type]=[m]}}catch(y){_.e(y)}finally{_.f()}for(var h=function(){var n=b[g];Array.isArray(t.attachments[n])&&"files"!==n&&t.badges.unshift({label:n,label_type:"is-dark",ext:t.attachments[n].length,ext_type:"is-primary",run:function(){e.showAttachmentsDialog(t,n)}})},g=0,b=Object.keys(t.attachments);g0?this.currentTags=e:this.currentTags=null);var t=Object.assign({},this.$route.query);this.selectedCategory?"model"===this.selectedCategory.type&&Object.keys(t).length<=1?delete t.type:t.type=this.selectedCategory.type:t.type="all",this.currentTags?t.tags=this.currentTags.join(","):delete t.tags,this.selectedPartner?this.selectedPartner.tags&&JSON.stringify(this.selectedPartner.tags)==JSON.stringify(this.currentTags)&&delete t.tags:delete t.partner,this.$router.replace({query:t}).catch((function(){}))}},displayModeChanged:function(e){this.displayMode=e},addWindow:function(e){this.selectedDialogWindow&&this.selectedWindowsStack.push(this.selectedDialogWindow),this.selectWindow(e),this.dialogWindows.push(e),this.screenWidth<700&&(this.dialogWindowConfig.fullscreen=!0),this.$modal.show("window-modal-dialog"),this.$forceUpdate()},selectWindow:function(e){e.closing||(this.selectedDialogWindow=e)},updateSize:function(){var e=this;Object(p["d"])((function(){e.screenWidth=window.innerWidth,e.screenWidth<700&&(e.infoDialogFullscreen=!0),e.$forceUpdate()}),250)()},showLoader:function(e){e?this.loadingComponent=this.$buefy.loading.open({canCancel:!0}):this.loadingComponent&&(this.loadingComponent.close(),this.loadingComponent=null)},showAboutPartner:function(e){e.about_url.startsWith("http")?e.about_url.endsWith(".md")?(this.infoDialogTitle="About "+e.name,this.infoMarkdownUrl=e.about_url,this.showInfoDialogMode="markdown",this.screenWidth<700&&(this.infoDialogFullscreen=!0),this.$modal.show("info-dialog")):window.open(e.about_url):e.description?this.$buefy.dialog.alert({title:"About "+e.name,message:e.description,confirmText:"OK"}):this.$buefy.dialog.alert({title:"Oops, no details about "+e.name,message:"This partner is did not provide any details!",confirmText:"OK"})},showSource:function(e){e.rdf_source.endsWith(".yaml")||e.rdf_source.endsWith(".yml")?(this.infoDialogTitle="Source: "+e.name,this.infoMarkdownUrl=e.rdf_source,this.infoCommentBoxTitle=e.name,this.showInfoDialogMode="markdown",this.screenWidth<700&&(this.infoDialogFullscreen=!0),this.$modal.show("info-dialog")):e.rdf_source.startsWith("http")?window.open(e.rdf_source):this.$buefy.dialog.alert({title:"Source: "+e.name,hasIcon:!0,icon:"code-tags",message:e.rdf_source,confirmText:"OK"})},showResourceItemInfo:function(e,t){var n=this;return Object(d["a"])(regeneratorRuntime.mark((function r(){var i;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n.showInfoDialogMode="model",r.next=3,n.updateFullRDF(e);case 3:e._focus=t,n.selectedResourceItem=e,n.infoDialogTitle=n.selectedResourceItem.name,n.screenWidth<700&&(n.infoDialogFullscreen=!0),n.$modal.show("info-dialog"),e.id&&!window.location.href.includes("#/r/")&&(i=Object.assign({},n.$route.query),i.id=e.id,n.initialized&&n.$router.replace({query:i}).catch((function(){})));case 9:case"end":return r.stop()}}),r)})))()},updateStatus:function(e){!0===e.loading&&this.showMessage("Loading..."),!1===e.loading&&this.showMessage("Loading done.")},closeInfoWindow:function(){this.selectedResourceItem=null,this.showInfoDialogMode=null,this.infoMarkdownUrl=null,this.infoMarkdownContent=null,this.infoCommentBoxTitle=null,this.$modal.hide("info-dialog");var e=Object.assign({},this.$route.query);delete e.id,delete e.show,this.initialized&&this.$router.replace({query:e}).catch((function(){}))},maximizeInfoWindow:function(){this.infoDialogFullscreen=!this.infoDialogFullscreen},closeDialogWindow:function(e){if(this.selectedDialogWindow.id===e.id){var t=this.dialogWindows.indexOf(e);t>=0&&this.dialogWindows.splice(t,1),this.selectedDialogWindow=this.selectedWindowsStack.pop(),this.selectedDialogWindow||this.$modal.hide("window-modal-dialog")}else console.warn("ignore close window: "+e.id)},minimizeDialogWindow:function(){this.$modal.hide("window-modal-dialog")},maximizeDialogWindow:function(){this.dialogWindowConfig.fullscreen=!this.dialogWindowConfig.fullscreen},enter:function(){this.$refs.search_anchor.scrollIntoView()},updateResourceItemList:function(e){this.selectedItems=e},updateViewByUrlQuery:function(){var e=this,t=!1;if(this.$route.query.show&&("about"===this.$route.query.show?this.showAboutDialog():"contribute"===this.$route.query.show?this.showContributeDialog():"join"===this.$route.query.show&&this.showJoinDialog()),this.$route.query.id){var n=this.resourceItems.filter((function(t){return t.id===e.$route.query.id}))[0];n?(this.showResourceItemInfo(n),t=!0):alert("Oops, resource item not found: "+this.$route.query.id+". Possibly because it has not been approved yet.")}else if(this.$route.query.nickname){var r=this.resourceItems.filter((function(t){return t.nickname===e.$route.query.nickname}))[0];r?(this.showResourceItemInfo(r),t=!0):alert("Oops, resource item not found: "+this.$route.query.nickname)}if(this.$route.query.tags){var i=null;i="string"===typeof this.$route.query.tags?this.$route.query.tags.split(","):this.$route.query.tags,setTimeout((function(){e.searchTags=i}),0),t=!0}this.$route.query.type&&("all"===this.$route.query.type?this.selectedCategory=null:this.selectedCategory=this.resourceCategories.filter((function(t){return t.type===e.$route.query.type}))[0],t=!0),this.$route.query.partner&&this.siteConfig.partners&&(this.selectedPartner=this.siteConfig.partners.filter((function(t){return t.id===e.$route.query.partner}))[0],this.selectedPartner&&(this.$nextTick((function(){e.searchTags?e.searchTags=e.searchTags.concat(e.selectedPartner.tags):e.searchTags=e.selectedPartner.tags})),t=!1)),t&&this.enter(),this.initialized=!0},showProgress:function(e){this.progress=e,this.$forceUpdate()},showMessage:function(e,t){t=t||5e3;var n={message:e.slice(0,200),onAction:function(){},actionText:"Close",duration:t,queue:!1};this.$buefy.snackbar.open(n)},showWindowDialog:function(){},closeWindowDialog:function(){},getLabelCount:function(e){return this.filteredModels.filter((function(t){return t.allLabels.includes(e)})).length},getModelsCount:function(){return this.filteredModels.length}}},$t=qt,Kt=(n("cccb"),Object(C["a"])($t,D,T,!1,null,null,null)),Nt=Kt.exports,Jt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"upload width-limited",style:{height:e.client.credential?"":"calc(100vh - 70px)","background-image":e.client.credential?null:"url("+e.siteConfig.background_image+")"}},[n("b-notification",{attrs:{type:"is-warning","has-icon":"","aria-close-label":"Close notification",role:"alert"}},[e._v(" Due to a significant API change in Zenodo (https://zenodo.org), you can only upload the model by login directly to "),n("a",{attrs:{href:"https://zenodo.org"}},[e._v("Zenodo")]),e._v(" by following the tutorial: "),n("br"),n("b-button",{on:{click:function(t){return e.openUrl("https://bioimage.io/docs/#/contribute_models/contribute_zenodo.md")}}},[e._v("Upload models via Zenodo")])],1),e.client.isSandbox?n("b-notification",{attrs:{type:"is-warning","has-icon":"","aria-close-label":"Close notification",role:"alert"}},[e._v(" You are using the development mode of the upload feature, this means files will be uploaded to the sandbox version of Zenodo (https://sandbox.zenodo.org). The uploaded files can be removed from Zenodo at any time without notice. This is temporary. In the future, the upload feature will connect to the main Zenodo storage and allow permanent storage of your data. ")]):e._e(),n("b-steps",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticStyle:{"margin-top":"20px"},attrs:{position:"left","has-navigation":!1,"label-position":"right"},model:{value:e.stepIndex,callback:function(t){e.stepIndex=t},expression:"stepIndex"}},[n("b-step-item",{attrs:{disabled:e.rdfYaml,label:"Start",icon:"file"}},[e.client.credential?n("b-field",{attrs:{label:"You have already logged in via Zenodo",message:"BioImage.IO uses https://zenodo.org as storage service, you will need to sign up or login to Zenodo, and allow BioImage.IO to upload files to zenodo on your behalf.",expanded:""}},[n("b-button",{staticClass:"button is-small",staticStyle:{"text-transform":"none"},attrs:{"icon-left":"logout"},on:{click:function(t){return e.client.logout()}}},[e._v("Logout")])],1):n("b-field",{attrs:{label:"Please login or signup to Zenodo.org",message:"BioImage.IO uses https://zenodo.org as storage service, you will need to sign up or login to Zenodo, and allow BioImage.IO to upload files to zenodo on your behalf.",expanded:""}},[n("b-button",{staticClass:"button is-fullwidth is-primary",staticStyle:{"text-transform":"none"},attrs:{expanded:"","icon-left":"login"},on:{click:function(t){return e.login()}}},[e._v("Login to Zenodo")])],1),e.client.credential?n("b-field",{attrs:{label:"Option 1: Select a local file",expanded:""}},[n("b-upload",{attrs:{"drag-drop":"",expanded:""},on:{input:function(t){return e.fileSelected(e.dropFile)}},model:{value:e.dropFile,callback:function(t){e.dropFile=t},expression:"dropFile"}},[n("section",{staticClass:"section"},[n("div",{staticClass:"content has-text-centered"},[n("p",[n("b-icon",{attrs:{icon:"upload",size:"is-large"}})],1),n("p",[e._v(" Please select the zip package (*.zip) or the RDF file (*.yaml) ")]),n("p",[e._v("Drop your files here or click to upload")])])])])],1):e._e(),e.client.credential?n("b-field",{attrs:{label:"Option 2: Input RDF fields manually"}},[n("b-button",{staticClass:"button is-fullwidth",staticStyle:{"text-transform":"none"},attrs:{expanded:""},on:{click:function(t){return e.initializeRdfForm()}}},[e._v("Fill the RDF form")])],1):e._e(),e.client.credential?n("b-field",{attrs:{label:"Option 3: Load from DOI or URL",message:"A URI can be a Zenodo DOI, Zenodo URL or Github URL to the RDF file"}},[n("b-input",{attrs:{type:"url",placeholder:"Type a DOI or URL here"},model:{value:e.URI4Load,callback:function(t){e.URI4Load=t},expression:"URI4Load"}})],1):e._e(),e.client.credential?n("b-button",{staticClass:"button is-fullwidth",staticStyle:{"text-transform":"none"},attrs:{expanded:""},on:{click:function(t){return e.loadRdfFromURL(e.URI4Load)}}},[e._v("Load")]):e._e()],1),n("b-step-item",{attrs:{label:"Edit",icon:"pencil",disabled:!e.rdfYaml}},[n("section",{staticStyle:{padding:"20px"}},[e.jsonFields&&e.jsonFields.length>0?n("form-json",{attrs:{btnReset:{value:"Reset"},btnSubmit:{value:"OK"},camelizePayloadKeys:!1,formFields:e.jsonFields,formName:"metadata",components:e.components},on:{formSubmitted:e.formSubmitted}}):e._e(),n("br"),n("b-field",{attrs:{label:"Optionally, you can update the form with values from an local RDF file",message:"Note: This operation will overwrite the values in the above RDF form, if you have further changes to make, please load the local RDF file first, then make changes in the form.",expanded:""}},[n("b-upload",{staticClass:"file-label",on:{input:function(t){return e.updateFormWithLocalFile(e.newRDFFile)}},model:{value:e.newRDFFile,callback:function(t){e.newRDFFile=t},expression:"newRDFFile"}},[n("span",{staticClass:"file-cta"},[n("b-icon",{staticClass:"file-icon",attrs:{icon:"upload"}}),n("span",{staticClass:"file-label"},[e._v("Load a local RDF file ["+e._s(e.newRDFFile?e.newRDFFile.name:"")+"]")])],1)])],1)],1)]),n("b-step-item",{attrs:{label:"Review & Upload",icon:"upload"}},[e.rdfYaml?n("b-field",{staticStyle:{height:"260px",overflow:"auto"},attrs:{label:"RDF content"}},[e.rdfYaml?n("markdown",{attrs:{baseUrl:"",content:e.formatedModelYaml}}):e._e()],1):e._e(),e.zipPackage?n("b-field",{attrs:{label:"Files",message:"These files will be uploaded"}},[n("b-taglist",{attrs:{attached:"",rounded:""}},e._l(e.zipPackage.files,(function(t,r){return n("b-tag",{key:r,attrs:{rounded:""}},[e._v(e._s(r))])})),1)],1):e.editedFiles?n("b-field",{attrs:{label:"Files",message:"The following files will be updated"}},[n("b-taglist",{attrs:{attached:"",rounded:""}},e._l(e.editedFiles,(function(t){return n("b-tag",{key:t.name,attrs:{rounded:""}},[e._v(e._s(t.name))])})),1)],1):e._e(),n("div",{staticClass:"column"},[e.zipPackage||e.editedFiles?n("b-button",{staticClass:"button is-fullwidth",staticStyle:{"text-transform":"none"},attrs:{expanded:"","icon-left":"download"},on:{click:function(t){return e.exportPackage()}}},[e._v("Export package locally")]):e._e()],1),n("br"),e.similarDeposits&&e.similarDeposits.length>0?n("div",[n("label",{staticClass:"label"},[e._v("Similar Existing Items")]),n("p",[e._v(" The following published deposit(s) are similar to yours (matched by name), please make sure you are using distinctive names to avoid confusion to the users. ")]),e._l(e.similarDeposits,(function(t){return n("b-notification",{key:t.id,attrs:{type:t.name===e.rdf.name?"is-danger":null,"aria-close-label":"Close notification"}},[n("h1",[n("a",{attrs:{href:t.config._deposit.links.html,target:"_blank"}},[e._v(e._s(t.name))])]),n("p",[e._v(e._s(t.description.slice(0,200)))]),n("p",[e._v(" Authors: "+e._s(t.authors.map((function(e){return e.name.split(";")[0]})).join(","))+" ")]),n("p",[e._v("Uploaded: "+e._s(t.config._deposit.updated))]),n("br"),n("div",{staticClass:"columns"},[e.userId&&t.config._deposit&&t.config._deposit.owners.includes(e.userId)?n("b-button",{staticClass:"column button is-primary is-light is-fullwidth",attrs:{expanded:"","icon-left":"autorenew"},on:{click:function(n){return e.createOrUpdateDeposit(t.config._deposit.id,!1)}}},[n("span",[e._v("Update as a new version")])]):e._e()],1)])})),n("b-button",{staticClass:"button is-fullwidth",class:{"is-primary":e.sameNameDeposits&&e.sameNameDeposits.length>0},staticStyle:{"text-transform":"none"},attrs:{expanded:"","icon-left":"arrow-left"},on:{click:function(t){e.stepIndex=1}}},[e._v("Go back to rename")])],2):e._e(),n("br"),n("b-field",[n("b-switch",{model:{value:e.requestedJoinCommunity,callback:function(t){e.requestedJoinCommunity=t},expression:"requestedJoinCommunity"}},[e._v(" Apply for listing in the "),n("a",{attrs:{href:e.client.baseURL+"/communities/"+e.siteConfig.zenodo_config.community,target:"_blank"}},[e._v("bioimage.io community list")])])],1),e.uploadStatus?n("p",[e._v(e._s(e.uploadStatus))]):e._e(),e.uploadProgress?n("b-progress",{attrs:{type:"is-primary",value:e.uploadProgress,size:"is-small",expanded:""}}):e._e(),n("div",{staticClass:"columns"},[e.client&&(e.zipPackage||e.editedFiles)?n("div",{staticClass:"column"},[n("b-button",{staticClass:"button is-primary is-light is-fullwidth",attrs:{disabled:e.uploadProgress||e.sameNameDeposits&&e.sameNameDeposits.length>0,expanded:"","icon-left":"plus"},on:{click:function(t){return e.createOrUpdateDeposit()}}},[n("span",[e._v("Upload as new deposit")])])],1):e._e(),e.client&&(e.zipPackage||e.editedFiles)&&e.depositId?n("div",{staticClass:"column"},[n("b-button",{staticClass:"button is-primary is-light is-fullwidth",attrs:{disabled:e.uploadProgress,expanded:"","icon-left":"autorenew"},on:{click:function(t){return e.createOrUpdateDeposit(e.depositId,!1)}}},[n("span",[e._v("Add new version to deposit")])])],1):e._e()])],1),n("b-step-item",{attrs:{label:"Publish",icon:"share-variant",disabled:""}},[e.publishedUrl?n("b-notification",{attrs:{type:"is-success","has-icon":"","aria-close-label":"Close notification"}},[n("h1",[e._v("Published on Zenodo")]),n("h2",[e._v("DOI: "+e._s(e.publishedDOI))]),n("h2",[n("a",{attrs:{href:e.publishedUrl,target:"_blank"}},[e._v(e._s(e.publishedUrl))])]),n("p",[e._v(" Note: Newly uploaded item may not appear immediately in the resource list. ")]),e.requestedJoinCommunity?n("p",[e._v(" To be listed as part of the verified bioimage.io community list, a notification will be sent to the admin team and we will review request soon. ")]):e._e()]):e.prereserveDOI?n("b-notification",{attrs:{"has-icon":"","aria-close-label":"Close notification"}},[n("h1",[e._v("Ready to publish")]),n("h2",[e._v("Preserved DOI: "+e._s(e.prereserveDOI.doi))]),n("h2",[e._v(" You can also review and add additional information on Zenodo: "),n("a",{attrs:{href:e.prereserveUrl,target:"_blank"}},[e._v(e._s(e.prereserveUrl))])]),n("p",[e._v(" Note: Please check carefully before publishing. It is generally not possible to remove items after they have been published. Changes will be added as a new version, but will not erase the previous version. ")])]):e._e(),e.notifyCIStatus?n("b-notification",{ref:"ci_status",attrs:{"has-icon":"","aria-close-label":"Close notification"}},[n("h3",[e._v(" "+e._s(e.notifyCIStatus)+" ")]),e.notifyCIFailed?n("b-button",{staticClass:"button is-fullwidth",staticStyle:{"text-transform":"none"},attrs:{expanded:""},on:{click:function(t){return e.notifyBot()}}},[e._v("Try Again")]):e._e()],1):e._e(),"update"===e.uploadMode?n("b-notification",{attrs:{"has-icon":"",type:"is-info","aria-close-label":"Close notification"}},[n("p",[e._v(" Note: After publishing the updated deposit, you may see the item disappear from the website, this is normal because Zenodo need some time to index the new version. It should combe back in a while. ")])]):e._e(),e.client&&e.client.credential&&e.uploaded&&!e.publishedUrl?n("b-button",{staticClass:"button is-primary is-fullwidth",attrs:{expanded:""},on:{click:function(t){return e.publishDeposition()}}},[n("b-icon",{attrs:{icon:"upload"}}),n("span",[e._v("Publish")])],1):e._e()],1)],1),n("section",{staticStyle:{padding:"10px"}})],1)},Ht=[],Vt=(n("07ac"),n("466d"),n("21a6")),Gt=(n("fb5f"),n("0df0")),Zt=n.n(Gt),Yt=n("c4e3"),Qt=n.n(Yt),Xt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("label",{staticClass:"label",attrs:{for:e.item.label}},[e._v(" "+e._s(e.item.label)+" "),!1!==e.item.isRequired?n("sup",{staticClass:"has-text-grey-light is-size-7"},[e._v("*")]):e._e()]),n("div",{staticClass:"control"},[n("b-taginput",{attrs:{id:e.item.label,data:e.filteredTags,"allow-new":!1!==e.item.allow_new,"open-on-focus":e.item.options&&e.item.options.length>0,autocomplete:"",icon:e.item.icon||"label",placeholder:e.item.placeholder},on:{input:function(t){return e.$emit("input",e.value)},typing:e.getFilteredTags},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}}),e.error?n("p",{staticClass:"help is-danger"},[e._v(" "+e._s(e.error)+" ")]):e._e()],1)])},en=[],tn={name:"tags",props:{error:{type:String,default:null},item:{type:Object,required:!0}},data:function(){return{value:void 0,filteredTags:[]}},mounted:function(){this.filteredTags=this.item.options},created:function(){this.value=this.item.value,this.item.value&&this.$emit("input",this.item.value)},methods:{getFilteredTags:function(e){this.filteredTags=this.item.options&&this.item.options.filter((function(t){return t.toString().toLowerCase().indexOf(e.toLowerCase())>=0}))}}},nn=tn,rn=(n("106f"),Object(C["a"])(nn,Xt,en,!1,null,null,null)),an=rn.exports,on=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.item.showLabel?n("label",{staticClass:"label",attrs:{for:e.item.label}},[e._v(" "+e._s(e.item.label)+" "),e.item.help?n("span",{staticClass:"helpLabel has-text-grey-light is-size-7 is-italic",staticStyle:{"margin-left":"0.5rem","font-weight":"400"}},[e._v(" "+e._s(e.item.help)+" ")]):e._e(),!1!==e.item.isRequired?n("sup",{staticClass:"has-text-grey-light is-size-7"},[e._v("*")]):e._e()]):e._e(),n("div",{staticClass:"control"},[n("b-button",{staticClass:"select-button",style:e.item.style,attrs:{expanded:"",type:e.callbackError?"is-danger":e.item.value?"is-success":"is-warning is-light",id:e.item.label,"icon-left":e.item.icon},on:{click:function(t){return e.resolveCallback(e.item)}}},[e._v(" "+e._s(e.item.label)+" ")]),e.callbackError?n("pre",[e._v(e._s(e.callbackError))]):e._e(),n("p",{staticClass:"help is-info"},[e._v(e._s(e.trimEllip(e.item.value,20)))]),e.error?n("p",{staticClass:"help is-danger"},[e._v(" "+e._s(e.error)+" ")]):e._e()],1)])},sn=[],cn={name:"button",props:{error:{type:String,default:null},item:{type:Object,required:!0}},data:function(){return{value:void 0,callbackError:null}},created:function(){this.value=this.item.value,this.item.value&&this.$emit("input",this.item.value)},methods:{trimEllip:function(e,t){return e?("object"===Object(ke["a"])(e)&&(e=e.toString()),e.length>t?e.substring(0,t)+"...":e):e},syntaxHighlight:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,void 0,2)),e=e.replace(/&/g,"&").replace(//g,">"),e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,(function(e){var t="number";return/^"/.test(e)?t=/:$/.test(e)?"key":"string":/true|false/.test(e)?t="boolean":/null/.test(e)&&(t="null"),''+e+""}))},resolveCallback:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Promise.resolve(e.callback());case 3:t.item.value=n.sent,t.$emit("input",t.item.value),n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](0),t.callbackError="".concat(n.t0);case 10:t.$forceUpdate();case 11:case"end":return n.stop()}}),n,null,[[0,7]])})))()}}},ln=cn,un=Object(C["a"])(ln,on,sn,!1,null,null,null),dn=un.exports,pn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("label",{staticClass:"label",attrs:{for:e.item.label}},[e._v(" "+e._s(e.item.label)+" "),!1!==e.item.isRequired?n("sup",{staticClass:"has-text-grey-light is-size-7"},[e._v("*")]):e._e()]),n("div",{staticClass:"control"},[n("section",[n("b-field",[n("b-upload",{attrs:{id:e.item.label,multiple:"","drag-drop":"",expanded:""},on:{input:function(t){return e.updateFiles()}},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}},[n("section",{staticClass:"section"},[n("div",{staticClass:"content has-text-centered"},[n("b-icon",{attrs:{icon:"upload",size:"is-large"}}),e._v(" Drop additional files here "),n("br"),e._l(e.value,(function(t,r){return n("span",{key:r,staticClass:"tag is-primary"},[e._v(" "+e._s(t.name.slice(0,20)+(t.name.length>20?"...":""))+" "),n("button",{staticClass:"delete is-small",attrs:{type:"button"},on:{click:function(t){return t.preventDefault(),e.removeFile(e.item.label,r)}}})])})),n("br"),e.value&&e.value.length>0?n("b-button",{staticClass:"is-small",on:{click:function(t){return t.preventDefault(),e.clearFiles()}}},[e._v("Clear files")]):e._e()],2)])])],1)],1),e.error?n("p",{staticClass:"help is-danger"},[e._v(" "+e._s(e.error)+" ")]):e._e()])])},fn=[],_n={name:"files",props:{error:{type:String,default:null},item:{type:Object,required:!0}},data:function(){return{value:void 0}},created:function(){this.value=this.item.value,this.item.value&&this.$emit("input",this.item.value)},methods:{removeFile:function(e,t){this.value.splice(t,1),this.$forceUpdate()},clearFiles:function(){this.value=null,this.$emit("input",null),this.$forceUpdate()},updateFiles:function(){this.$emit("input",this.value),this.$forceUpdate()},trimEllip:function(e,t){return e?("object"===Object(ke["a"])(e)&&(e=e.toString()),e.length>t?e.substring(0,t)+"...":e):e}}},mn=_n,hn=Object(C["a"])(mn,pn,fn,!1,null,null,null),gn=hn.exports,bn=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("label",{staticClass:"label",attrs:{for:e.item.label}},[e._v(" "+e._s(e.item.label)+" "),n("span",{staticClass:"helpLabel has-text-grey-light is-size-7 is-italic",staticStyle:{"margin-left":".5rem","font-weight":"400"}},[e._v(e._s(e.item.help))]),!1!==e.item.isRequired?n("sup",{staticClass:"has-text-grey-light is-size-7"},[e._v("*")]):e._e()]),n("div",{staticClass:"control"},[e._l(e.value,(function(t,r){return n("div",{key:r},[n("b-field",[n("b-input",{attrs:{type:"text",placeholder:"Citation text",maxlength:"1000"},on:{input:e.commitValue},model:{value:t.text,callback:function(n){e.$set(t,"text",n)},expression:"citation.text"}}),n("b-input",{attrs:{type:"text",placeholder:"DOI (optional)",maxlength:"100"},on:{input:e.commitValue},model:{value:t.doi,callback:function(n){e.$set(t,"doi",n)},expression:"citation.doi"}}),n("b-input",{attrs:{type:"text",placeholder:"URL (optional)",maxlength:"1000"},on:{input:e.commitValue},model:{value:t.url,callback:function(n){e.$set(t,"url",n)},expression:"citation.url"}}),e.value.length>1?n("b-button",{staticClass:"button",staticStyle:{"text-transform":"none"},attrs:{"icon-left":"delete"},on:{click:function(n){return e.removeCitation(t)}}}):e._e(),r===e.value.length-1&&t.text&&""!==t.text?n("b-button",{staticClass:"button",staticStyle:{"text-transform":"none"},attrs:{"icon-left":"plus"},on:{click:e.addNewCitation}}):e._e()],1)],1)})),e.error?n("p",{staticClass:"help is-danger"},[e._v(" "+e._s(e.error)+" ")]):e._e()],2)])},vn=[],yn={name:"citation",props:{error:{type:String,default:null},item:{type:Object,required:!0}},data:function(){return{value:void 0,filteredTags:[]}},mounted:function(){this.filteredTags=this.item.options},created:function(){this.value=this.item.value,"string"===typeof this.value&&(this.value=[{text:this.value}]),this.value&&!Array.isArray(this.value)&&(this.value=[this.value]),this.value=this.value||[],this.value.length<=0&&this.value.push({text:"",doi:"",url:""}),this.commitValue()},methods:{commitValue:function(){this.value.length<=0?this.$emit("input",null):""===this.value[this.value.length-1].text?this.$emit("input",this.value.slice(0,this.value.length-1)):this.$emit("input",this.value)},addNewCitation:function(){""!==this.value[this.value.length-1].text&&this.value.push({}),this.commitValue()},removeCitation:function(e){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.commitValue()}}},wn=yn,xn=(n("fff7"),Object(C["a"])(wn,bn,vn,!1,null,null,null)),kn=xn.exports,In=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("label",{staticClass:"label",attrs:{for:e.item.label}},[e._v(" "+e._s(e.item.label)+" "),n("span",{staticClass:"helpLabel has-text-grey-light is-size-7 is-italic",staticStyle:{"margin-left":".5rem","font-weight":"400"}},[e._v(e._s(e.item.help))]),!1!==e.item.isRequired?n("sup",{staticClass:"has-text-grey-light is-size-7"},[e._v("*")]):e._e()]),n("div",{staticClass:"control"},[e._l(e.value,(function(t,r){return n("div",{key:r},[n("b-field",[n("b-input",{attrs:{type:"text",placeholder:"Full Name (required)",maxlength:"1000"},on:{input:e.commitValue},model:{value:t.name,callback:function(n){e.$set(t,"name",n)},expression:"author.name"}}),e.item.options.includes("affiliation")?n("b-input",{attrs:{type:"text",placeholder:"Affiliation (optional)",maxlength:"100"},on:{input:e.commitValue},model:{value:t.affiliation,callback:function(n){e.$set(t,"affiliation",n)},expression:"author.affiliation"}}):e._e(),e.item.options.includes("orcid")?n("b-input",{attrs:{type:"text",placeholder:"ORCID (optional)",maxlength:"1000"},on:{input:e.commitValue},model:{value:t.orcid,callback:function(n){e.$set(t,"orcid",n)},expression:"author.orcid"}}):e._e(),e.item.options.includes("github_user")?n("b-input",{attrs:{type:"text",placeholder:"Github User (required)",maxlength:"100"},on:{input:e.commitValue},model:{value:t.github_user,callback:function(n){e.$set(t,"github_user",n)},expression:"author.github_user"}}):e._e(),e.item.options.includes("email")?n("b-input",{attrs:{type:"text",placeholder:"Email (optional)",maxlength:"1000"},on:{input:e.commitValue},model:{value:t.email,callback:function(n){e.$set(t,"email",n)},expression:"author.email"}}):e._e(),e.value.length>1?n("b-button",{staticClass:"button",staticStyle:{"text-transform":"none"},attrs:{"icon-left":"delete"},on:{click:function(n){return e.removeAuthor(t)}}}):e._e(),r===e.value.length-1&&t.name&&""!==t.name?n("b-button",{staticClass:"button",staticStyle:{"text-transform":"none"},attrs:{"icon-left":"plus"},on:{click:e.addNewAuthor}}):e._e()],1)],1)})),e.error?n("p",{staticClass:"help is-danger"},[e._v(" "+e._s(e.error)+" ")]):e._e()],2)])},Cn=[],On={name:"author",props:{error:{type:String,default:null},item:{type:Object,required:!0}},data:function(){return{value:void 0,filteredTags:[]}},mounted:function(){this.filteredTags=this.item.options},created:function(){this.value=this.item.value,this.value&&!Array.isArray(this.value)&&(this.value=[this.value]),this.value=this.value||[],this.value.forEach((function(e){return e.name=e.name||e.github_user})),this.value=this.value.filter((function(e){return e.name&&""!=e.name})),this.commitValue(),this.value.length<=0&&this.value.push({})},methods:{commitValue:function(){this.value.length<=0?this.$emit("input",null):""===this.value[this.value.length-1].name?this.$emit("input",this.value.slice(0,this.value.length-1)):this.$emit("input",this.value)},addNewAuthor:function(){""!==this.value[this.value.length-1].name&&this.value.push({}),this.commitValue()},removeAuthor:function(e){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.commitValue()}}},En=On,Rn=(n("e067"),Object(C["a"])(En,In,Cn,!1,null,null,null)),jn=Rn.exports,Dn=n("67be"),Tn=n.n(Dn),Pn=n("0e54"),Mn=n.n(Pn),Sn=n("c0c4"),Ln=n.n(Sn),An={name:"upload",props:["updateDepositId"],components:{"form-json":Zt.a,markdown:Re["a"],TagInputField:an,SelectButtonField:dn,DropFilesField:gn,AuthorInputField:jn,CitationInputField:kn},mounted:function(){this.dropFile=null,this.uploadStatus="",this.uploadProgress=0,this.$root.$on("formSubmitted",this.formSubmitted),this.updateDepositId&&this.startFromDepositURL().catch((function(e){alert("Failed to load from deposit URL: ".concat(e))}))},computed:Object(a["a"])({sameNameDeposits:function(){var e=this;return this.similarDeposits&&this.similarDeposits.filter((function(t){return t.name===e.rdf.name}))},formatedModelYaml:function(){return this.rdfYaml&&"```yaml\n"+this.rdfYaml+"\n```\n"},prereserveUrl:function(){return this.prereserveDOI?"".concat(this.$store.state.zenodoBaseURL,"/deposit/").concat(this.prereserveDOI.recid):null},userId:function(){return this.client&&this.client.getUserId()},components:function(){return{TagInputField:an,SelectButtonField:dn,DropFilesField:gn,AuthorInputField:jn,CitationInputField:kn}}},Object(l["b"])({allTags:function(e){return e.allTags},resourceItems:function(e){return e.resourceItems},client:function(e){return e.zenodoClient},zenodoBaseURL:function(e){return e.zenodoBaseURL},siteConfig:function(e){return e.siteConfig}})),data:function(){return{dropFile:null,uploadProgress:0,uploadStatus:"",uploaded:!1,jsonFields:null,zipFiles:null,rdfYaml:null,rdf:null,stepIndex:0,publishedUrl:null,publishedDOI:null,notifyCIStatus:null,notifyCIFailed:!1,requestedJoinCommunity:!0,rdfType:"model",zipPackage:null,editedFiles:null,prereserveDOI:null,URI4Load:null,similarDeposits:null,depositId:null,newRDFFile:null,uploadMode:null}},methods:{openUrl:function(e){window.open(e)},startFromDepositURL:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.$buefy.loading.open({container:e.$el}),t.prev=1,e.client.credential){t.next=5;break}return t.next=5,e.login();case 5:return e.URI4Load="".concat(e.zenodoBaseURL,"/record/").concat(e.updateDepositId.split("zenodo.")[1]),t.next=8,e.loadRdfFromURL(e.URI4Load);case 8:t.next=13;break;case 10:t.prev=10,t.t0=t["catch"](1),alert("Failed to load resource: "+e.updateDepositId);case 13:return t.prev=13,n.close(),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[1,10,13,16]])})))()},fileSelected:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i,a,o;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=t.$buefy.loading.open({container:t.$el}),n.prev=1,!e.name.endsWith(".yaml")){n.next=11;break}return n.next=5,new Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(e)}));case 5:t.rdfYaml=n.sent,i=e,t.zipPackage=new Qt.a,t.zipPackage.file(e.name,e),n.next=28;break;case 11:if(e.name.endsWith(".zip")){n.next=16;break}throw alert("Only .zip and .yaml file are supported."),new Error("Only zip and .yaml file are supported");case 16:return a=new Qt.a,n.next=19,a.loadAsync(e);case 19:if(t.zipPackage=n.sent,console.log(t.zipPackage.files),t.zipPackage.files["model.yaml"]||t.zipPackage.files["rdf.yaml"]){n.next=24;break}throw alert("Invalid file: no model.yaml or rdf.yaml found in the model package."),new Error("Invalid file: no rdf file found in the package");case 24:return i=t.zipPackage.files["rdf.yaml"]||t.zipPackage.files["model.yaml"],n.next=27,i.async("string");case 27:t.rdfYaml=n.sent;case 28:if(o=P["a"].load(t.rdfYaml),"model.yaml"===i.name&&(o.type="model"),o.type){n.next=33;break}throw alert("Invalid rdf file: type key is not found"),new Error("Invalid rdf file: type key is not found");case 33:o.config=o.config||{},o.rdf_source="./"+i.name,"model"===o.type&&(o.links=o.links||[],o.links.push("imjoy/BioImageIO-Packager")),t.initializeRdfForm(o,Object.values(t.zipPackage.files)),n.next=42;break;case 39:n.prev=39,n.t0=n["catch"](1),console.error(n.t0);case 42:return n.prev=42,r.close(),n.finish(42);case 45:case"end":return n.stop()}}),n,null,[[1,39,42,45]])})))()},loadRdfFromURL:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i,a,o,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(n.prev=0,r=Tn.a.resolvePath(),!r.test(e)){n.next=8;break}return n.next=5,Object(p["i"])(e.match(r)[4]);case 5:e=n.sent,n.next=12;break;case 8:if(!Tn()().test(e)){n.next=12;break}return n.next=11,Object(p["i"])(e);case 11:e=n.sent;case 12:if(i=/zenodo.org\/(record|deposit)\/([0-9]+)/g,a=i.exec(e),!a){n.next=33;break}if(t.depositId=parseInt(a[2]),!e.includes("/record/")){n.next=22;break}return n.next=19,t.client.getDeposit(t.depositId);case 19:o=n.sent,n.next=27;break;case 22:return n.next=24,t.client.getCredential(!0);case 24:return n.next=26,t.client.retrieve(t.depositId);case 26:o=n.sent;case 27:return console.log("orcid matched: "+t.depositId,o),n.next=30,Object(p["e"])(o);case 30:s=n.sent,t.zipPackage=null,t.initializeRdfForm(s,o.files.map((function(e){return{type:"remote",name:e.filename||e.key,size:e.filesize||e.size,url:e.links.self,checksum:e.checksum}})));case 33:n.next=38;break;case 35:n.prev=35,n.t0=n["catch"](0),alert("Oops, failed to fetch RDF from ".concat(e,", error: ").concat(n.t0));case 38:case"end":return n.stop()}}),n,null,[[0,35]])})))()},updateFormWithLocalFile:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,new Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=n,r.readAsText(e)}));case 2:r=n.sent,i=P["a"].load(r),i.config=i.config||{},i.rdf_source="./"+e.name,t.jsonFields=null,setTimeout((function(){t.initializeRdfForm(i)}),10);case 8:case"end":return n.stop()}}),n)})))()},initializeRdfForm:function(e,t){var n=this;this.stepIndex=1,this.rdf=e||{},delete this.rdf.id,this.rdf.links=this.rdf.links||[],t=t||this.files||[];var r=this.siteConfig.resource_categories.map((function(e){return e.type}));this.rdf.tags=this.rdf.tags||[],this.rdf.tags=this.rdf.tags.map((function(e){return e.toLowerCase().replace(/ /g,"-")})),this.jsonFields=this.transformFields([{label:"Type",type:"select",placeholder:"Select resource type",options:r.map((function(e){return{text:e,value:e,selected:n.rdf.type===e}}))},{label:"Name",placeholder:"name",value:this.rdf.name,help:"The name of your deposit (note: / is not allowed in the name)"},{label:"Description",placeholder:"description",value:this.rdf.description},{label:"Authors",type:"author",options:["name","orcid","affiliation"],value:this.rdf.authors,help:"The authors who contributed to this resource item"},{label:"Maintainers",type:"author",options:["name","email","github_user"],value:this.rdf.maintainers,help:"The maintainers who maintain this resource item. Importantly, the first maintainer will be contacted for the approval process to the BioImage.IO"},{label:"Version",placeholder:"Version in MAJOR.MINOR.PATCH format(e.g. 0.1.0)",isRequired:!1,value:this.rdf.version||"0.1.0"},{html:'

LicenseChoose the license that fits you most, we recommend to use CC-BY-4.0 (free to share and adapt under the condition of attribution). For other license options, please visit here https://spdx.org/licenses *

'},{label:"License",showLabel:!1,type:"select",placeholder:"Select your license",options:Object.keys(S.a).map((function(e){return{text:e,value:e,selected:n.rdf.license===e}})),help:"A short description in one sentence"},{label:"Git repository",placeholder:"Git repository URL",value:this.rdf.git_repo,isRequired:!1},{label:"Tags",type:"tags",value:this.rdf.tags,help:"Tags should contain only lower case letters with numbers, or the following characters: +*#;./%@, but no space",placeholder:"Add a tag and press ENTER to confirm (lower case, numbers, or any of +*#;./%@, but no space)",options:this.allTags.map((function(e){return e.toLowerCase().replace(/ /g,"-")})),pattern:/^[-0-9a-z+*#;./%@:]*$/,allow_new:!0,icon:"label",isRequired:!1},{label:"Citation",type:"citation",value:this.rdf.cite,help:"How this resource item should be cited",isRequired:!1},{label:"Source",placeholder:"source",value:this.rdf.source,isRequired:!1,help:"The source url of your deposit (optional)"},{label:"Links",type:"tags",value:this.rdf.links,placeholder:"Add a link (resource item ID)",options:this.resourceItems.map((function(e){return e.id})),allow_new:!0,icon:"vector-link",isRequired:!1},{label:"Files",type:"files",value:t,isRequired:!1},{html:'

ValidationValidate the RDF fields against the bioimageio RDF specification using the python module, see Specifications for BioImage.IO.
Note: It may take a while to load for the first time. *

'},{type:"button",showLabel:!1,label:"Validate",callback:function(){var e=Object(d["a"])(regeneratorRuntime.mark((function e(){var t,r,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n.showLoader(!0),e.prev=1,r=P["a"].load(P["a"].dump(n.rdf)),delete r._metadata,(null===r||void 0===r||null===(t=r.config)||void 0===t?void 0:t._deposit)&&delete r.config._deposit,console.log("RDF: ",r),e.next=8,window.api.getPlugin("https://raw.githubusercontent.com/bioimage-io/spec-bioimage-io/main/scripts/bio-rdf-validator.imjoy.html");case 8:return i=e.sent,e.next=11,i.validate(r);case 11:if(a=e.sent,a.error){e.next=16;break}return e.abrupt("return","Validation passed!");case 16:throw new Error(JSON.stringify(a,null," "));case 17:e.next=22;break;case 19:throw e.prev=19,e.t0=e["catch"](1),e.t0;case 22:return e.prev=22,n.showLoader(!1),e.finish(22);case 25:case"end":return e.stop()}}),e,null,[[1,19,22,25]])})));function t(){return e.apply(this,arguments)}return t}()}]),this.files=t},transformFields:function(e){var t={};for(var n in this.components)t[this.components[n].name]=n;var r,i=Object(u["a"])(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;t[a.type]&&(a.is=t[a.type],delete a.type)}}catch(o){i.e(o)}finally{i.f()}return e},formSubmitted:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var r,i,a,o,s,c,l,d,f,_,m,h,g,b,v,y;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:for(s in a={type:"Type",name:"Name",description:"Description",version:"Version",license:"License",source:"Source",git_repo:"Git Repository",tags:"Tags",links:"Links",cite:"Citation",authors:"Authors",maintainers:"Maintainers"},o=e.values,a)t.rdf[s]=o[a[s]];if(!t.rdf.name.includes("/")){n.next=6;break}return alert("RDF name should not contain '/'"),n.abrupt("return");case 6:if(!t.zipPackage){n.next=29;break}c=Object.values(t.zipPackage.files),l=Object(u["a"])(o["Files"]),n.prev=9,l.s();case 11:if((d=l.n()).done){n.next=18;break}if(f=d.value,!c.includes(f)){n.next=15;break}return n.abrupt("continue",16);case 15:f instanceof Blob?t.zipPackage.file(f.name,f):console.error("Invalid file type",f);case 16:n.next=11;break;case 18:n.next=23;break;case 20:n.prev=20,n.t0=n["catch"](9),l.e(n.t0);case 23:return n.prev=23,l.f(),n.finish(23);case 26:for(_=0,m=c;_0)){n.next=47;break}return n.next=47,t.client.getCredential(!0);case 47:t.stepIndex=2;case 48:case"end":return n.stop()}}),n,null,[[9,20,23,26]])})))()},notifyBot:function(){var e=this,t="https://bioimage.netlify.app/.netlify/functions/bioimageiobot?action=notify&source=".concat(this.client.baseURL,"/record/").concat(this.depositId,"/files/rdf.yaml");this.notifyCIStatus="โŒ› Trying to notify bioimage-bot for the new item...",this.notifyCIFailed=!1;var n=this.$buefy.loading.open({container:this.$refs.ci_status});fetch(t).then(function(){var t=Object(d["a"])(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(200!==n.status){t.next=8;break}return t.next=3,n.json();case 3:t.t0=t.sent["message"],e.notifyCIStatus="๐ŸŽ‰ bioimage-bot has successfully detected the item: "+t.t0,e.notifyCIFailed=!1,t.next=13;break;case 8:return e.notifyCIFailed=!0,t.next=11,n.text();case 11:t.t1=t.sent,e.notifyCIStatus="๐Ÿ˜ฌ bioimage-bot failed to detected the new item, please report the issue to the admin team of bioimage.io: "+t.t1;case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.notifyCIStatus="๐Ÿ˜ฌ Failed to reach to the bioimageio-bot, please report the issue to the admin team of bioimage.io: ".concat(t),e.notifyCIFailed=!0})).finally((function(){n.close()}))},publishDeposition:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){var n,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.$buefy.loading.open({container:e.$el}),t.prev=1,t.next=4,e.client.publish(e.depositId);case 4:r=t.sent,console.log("Published",r),e.publishedDOI=r.doi,e.publishedUrl="".concat(e.$store.state.zenodoBaseURL,"/record/").concat(e.depositId),e.notifyBot(),t.next=15;break;case 11:t.prev=11,t.t0=t["catch"](1),console.error(t.t0),alert("Failed to publish: ".concat(t.t0));case 15:return t.prev=15,n.close(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[1,11,15,18]])})))()},exportPackage:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){var n,r,i,a,o,s,c,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.zipPackage,n){t.next=37;break}n=new Qt.a,r=0,i=Object(u["a"])(e.editedFiles),t.prev=5,i.s();case 7:if((a=i.n()).done){t.next=29;break}if(o=a.value,e.uploadProgress=r/e.editedFiles.length*100,r++,"remote"!==o.type){t.next=26;break}return e.uploadStatus="Download fille "+o.name,t.next=15,fetch(o.url);case 15:if(s=t.sent,!s.ok){t.next=23;break}return t.next=19,s.blob();case 19:c=t.sent,n.file(o.name,c),t.next=24;break;case 23:throw new Error("Failed to download file: "+o.url);case 24:t.next=27;break;case 26:o instanceof Blob&&n.file(o.name,o);case 27:t.next=7;break;case 29:t.next=34;break;case 31:t.prev=31,t.t0=t["catch"](5),i.e(t.t0);case 34:return t.prev=34,i.f(),t.finish(34);case 37:return console.log("downloading",n),t.next=40,n.generateAsync({type:"blob",compression:"DEFLATE",compressionOptions:{level:9}},(function(t){e.uploadProgress=t.percent,e.uploadStatus="Zipping package..."}));case 40:l=t.sent,e.uploadStatus="Exporting zip package...",Object(Vt["saveAs"])(l,e.rdf.name+".bioimage.io.zip"),e.uploadStatus="Done!";case 44:case"end":return t.stop()}}),t,null,[[5,31,34,37]])})))()},showLoader:function(e){e?this.loadingComponent=this.$buefy.loading.open({canCancel:!0}):this.loadingComponent&&(this.loadingComponent.close(),this.loadingComponent=null)},login:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.client.getCredential(!0);case 3:e.$forceUpdate(),t.next=9;break;case 6:t.prev=6,t.t0=t["catch"](0),alert("Failed to login: ".concat(t.t0));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))()},createOrUpdateDeposit:function(e,t){var n=this;return Object(d["a"])(regeneratorRuntime.mark((function r(){var i,a;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,n.client.getCredential(!0);case 3:n.$forceUpdate(),r.next=10;break;case 6:return r.prev=6,r.t0=r["catch"](0),alert("Failed to login: ".concat(r.t0)),r.abrupt("return");case 10:return i=n.$buefy.loading.open({container:n.$el}),r.prev=11,r.delegateYield(regeneratorRuntime.mark((function r(){var i,a,o,s,c,l,u,d,f,_,m,h;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(n.uploadProgress=1,n.uploadMode="new",!e){r.next=29;break}return r.prev=3,r.next=6,n.client.retrieve(e);case 6:if(i=r.sent,t){r.next=16;break}return r.next=10,n.client.createNewVersion(i);case 10:return a=r.sent,o=a.links.latest_draft.split("/"),e=parseInt(o[o.length-1]),r.next=15,n.client.retrieve(e);case 15:i=r.sent;case 16:if("inprogress"===i.state||"unsubmitted"===i.state){r.next=19;break}return r.next=19,n.client.edit(e);case 19:n.uploadMode="update",r.next=27;break;case 22:if(r.prev=22,r.t0=r["catch"](3),console.error(r.t0),confirm("Failed to retrieve existing deposit (id: ".concat(e,"), would you like to create a new deposit instead?"))){r.next=27;break}return r.abrupt("return",{v:void 0});case 27:r.next=32;break;case 29:return r.next=31,n.client.createDeposition();case 31:i=r.sent;case 32:if(n.depositId=i.id,s="".concat(n.client.baseURL,"/record/").concat(n.depositId,"/files/"),c=null,!n.rdf.documentation||n.rdf.documentation.startsWith("http")||!n.rdf.documentation.endsWith(".md")){r.next=42;break}if(l=n.zipPackage.files[n.rdf.documentation.replace("./","")],!l){r.next=42;break}return r.next=40,l.async("string");case 40:c=r.sent,c=Ln.a.sanitize(Mn()(c));case 42:return n.rdf.config=n.rdf.config||{},n.rdf.config._deposit=i,n.rdf.rdf_source=n.rdf.rdf_source||"rdf.yaml",u=Object(p["g"])(n.rdf,s,c),n.requestedJoinCommunity&&u.communities.push({identifier:n.siteConfig.zenodo_config.community}),u.prereserve_doi=!0,r.next=50,n.client.updateMetadata(i,u);case 50:if(i=r.sent,n.prereserveDOI=i.metadata.prereserve_doi,n.rdf.id=n.prereserveDOI.doi,n.rdf.config._doi=i.metadata.prereserve_doi.doi,n.rdf.config._conceptdoi=i.conceptdoi,!t){r.next=58;break}return n.stepIndex=3,r.abrupt("return",{v:i});case 58:d=Object.values(n.zipPackage.files),n.rdf.covers&&n.rdf.covers.length>0&&(f=n.rdf.covers,d.sort((function(e,t){return f.includes("./"+e.name)&&!f.includes("./"+t.name)?1:!f.includes("./"+e.name)&&f.includes("./"+t.name)?-1:0}))),_=regeneratorRuntime.mark((function e(t){var r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!d[t].dir){e.next=3;break}return console.warn("Skipping directory: "+d[t].name),e.abrupt("return","continue");case 3:return e.next=5,d[t].async("blob");case 5:return r=e.sent,a=new File([r],d[t].name),e.next=9,n.client.uploadFile(i,a,a.name,(function(e){n.uploadProgress=Math.round(e/a.size*100),n.uploadStatus="Uploading ".concat(t+1,"/").concat(d.length,"(").concat(n.uploadProgress,"%): ").concat(a.name.slice(0,40),"... "),n.$forceUpdate()}));case 9:case"end":return e.stop()}}),e)})),m=0;case 62:if(!(m=0&&e.resourceItems.splice(n,1)},normalizeItems:function(e,t){e.resourceItems=e.resourceItems.map((function(e){return e.id=e.id||Object(p["f"])(),e.id=e.id.toLowerCase(),e.links=e.links||[],e.tags=e.tags||[],e.links=e.links.map((function(e){return e.toLowerCase()})),e.links=Object(Ze["a"])(new Set(e.links)),e.tags=e.tags||[],e.tags=e.tags.map((function(e){return e.toLowerCase()})),e.links=Object(Ze["a"])(new Set(e.links)),t?t(e):e}))},setBioEngineReady:function(e,t){e.bioEngineReady=!!t}}}),er=(n("f935"),n("1881")),tr=n.n(er),nr=(n("5363"),n("7bb1")),rr=n("4c93"),ir=n("2593");o["default"].component("ValidationProvider",nr["a"]),Object.keys(rr).forEach((function(e){Object(nr["b"])(e,Object(a["a"])(Object(a["a"])({},rr[e]),{},{message:ir["a"][e]}))})),o["default"].use(tr.a),o["default"].use($n["a"]),o["default"].config.productionTip=!1,new o["default"]({router:qn,render:function(e){return e(E)},store:Xn}).$mount("#app")},"5ced":function(e,t,n){},"6a05":function(e,t,n){},7411:function(e,t,n){},"74ab":function(e,t,n){},"76cc":function(e,t,n){"use strict";var r=n("e54d"),i=n.n(r);i.a},"85ec":function(e,t,n){},"89db":function(e,t,n){},"8cd4":function(e,t,n){},"944d":function(e,t,n){},"94f5":function(e,t,n){"use strict";var r=n("423d"),i=n.n(r);i.a},c1ab:function(e,t,n){"use strict";var r=n("74ab"),i=n.n(r);i.a},c9e7:function(e,t,n){},cccb:function(e,t,n){"use strict";var r=n("5ced"),i=n.n(r);i.a},ccd0:function(e,t,n){},d7c4:function(e,t,n){"use strict";var r=n("89db"),i=n.n(r);i.a},dd68:function(e,t,n){},e067:function(e,t,n){"use strict";var r=n("4871"),i=n.n(r);i.a},e1af:function(e,t,n){},e54d:function(e,t,n){},e6e0:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"markdown-body"},[n("b-loading",{attrs:{"is-full-page":!1,active:e.loading,"can-cancel":!1},on:{"update:active":function(t){e.loading=t}}}),e.docs?n("div",{domProps:{innerHTML:e._s(e.docs)}}):e._e()],1)},i=[],a=(n("a15b"),n("fb6a"),n("d3b7"),n("ac1f"),n("8a79"),n("5319"),n("1276"),n("9911"),n("96cf"),n("1da1")),o=(n("e4cb"),n("2c43"),n("0e54")),s=n.n(o),c=n("c0c4"),l=n.n(c),u=n("1487"),d=n.n(u),p=(n("a4d3"),n("e01a"),n("99af"),n("4160"),n("caad"),n("b0c0"),n("b64b"),n("25f0"),n("2532"),n("2ca0"),n("498a"),n("159b"),n("b85c")),f=n("025e"),_={runButtonText:"Run",editButtonText:"Edit",errorText:"Error",successText:"Done"};function m(e,t,n){return h.apply(this,arguments)}function h(){return h=Object(a["a"])(regeneratorRuntime.mark((function e(t,n,r){var i,o,s,c,l,u,d,p,_=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("js"===n.lang&&(n.lang="javascript"),"py"===n.lang&&(n.lang="python"),"ijm"===n.lang&&(n.lang="javascript"),i=function(e,t){if(t.type&&!t._parsed){"macro"===t.type&&(t.passive=!1,e="\n async function setup(){\n const source = `".concat(e,'`;\n let ij = await api.getWindow("ImageJ.JS-').concat(t.namespace,'")\n if(!ij){\n ij = await api.createWindow({src:"https://ij.imjoy.io", name:"ImageJ.JS-').concat(t.namespace,'"})\n }\n await ij.runMacro(source)\n }\n api.export({setup}); \n '),t.type="web-worker");var n=Object.assign({},t);n.api_version=n.api_version||"0.1.8",n.name=n.name||t.id&&"Plugin-"+t.id||"Plugin-"+Object(f["f"])(),n.description=n.description||"[TODO: describe this plugin with one sentence.]",n.tags=n.tags||[],n.version=n.version||"0.1.0",n.ui=n.ui||"",n.cover=n.cover||"",n.icon=n.icon||"extension",n.inputs=n.inputs||null,n.outputs=n.outputs||null,n.env=n.env||"",n.permissions=n.permissions||[],n.requirements=n.requirements||[],n.dependencies=n.dependencies||[],"window"===t.type&&(n.defaults={}),t.lang||(n.type.includes("python")?t.lang="python":n.type.includes("javascript")?t.lang="javascript":console.error('"lang" is not specified, please make sure decorate the code block with the name of the language.')),e="html"!==t.lang?'\n'.concat(JSON.stringify(n,null,1),'\n\n