diff --git a/css/about.7fe7bb41.css b/css/about.7fe7bb41.css new file mode 100644 index 00000000..74946d81 --- /dev/null +++ b/css/about.7fe7bb41.css @@ -0,0 +1 @@ +.about[data-v-3bc7cce4]{background-repeat:no-repeat;background-position:bottom 50px;overflow:auto;background-color:#fff;max-width:100%;overflow-x:hidden}.hero[data-v-3bc7cce4]{max-width:100%;width:600px;text-align:center;margin-left:auto;margin-right:auto}button[data-v-3bc7cce4]{margin:2px}.width-limited[data-v-3bc7cce4]{max-width:1000px;margin-left:auto!important;margin-right:auto!important;float:none!important} \ No newline at end of file diff --git a/css/about.a1c3a1f6.css b/css/about.a1c3a1f6.css deleted file mode 100644 index b1ce6477..00000000 --- a/css/about.a1c3a1f6.css +++ /dev/null @@ -1 +0,0 @@ -.about[data-v-7eb5f2ea]{background-repeat:no-repeat;background-position:bottom 50px;overflow:auto;background-color:#fff;max-width:100%;overflow-x:hidden}.hero[data-v-7eb5f2ea]{max-width:100%;width:600px;text-align:center;margin-left:auto;margin-right:auto}button[data-v-7eb5f2ea]{margin:2px}.width-limited[data-v-7eb5f2ea]{max-width:1000px;margin-left:auto!important;margin-right:auto!important;float:none!important} \ No newline at end of file diff --git a/index.html b/index.html index eb0bab8a..483189e7 100644 --- a/index.html +++ b/index.html @@ -57,6 +57,6 @@ })(); - + \ No newline at end of file diff --git a/js/about.99388672.js b/js/about.99388672.js new file mode 100644 index 00000000..a0ccad88 --- /dev/null +++ b/js/about.99388672.js @@ -0,0 +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.99388672.js.map \ No newline at end of file diff --git a/js/about.99388672.js.map b/js/about.99388672.js.map new file mode 100644 index 00000000..ad8b61cd --- /dev/null +++ b/js/about.99388672.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js/about.99388672.js","sources":["webpack:///js/about.99388672.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/js/about.a8a528c7.js b/js/about.a8a528c7.js deleted file mode 100644 index e506f285..00000000 --- a/js/about.a8a528c7.js +++ /dev/null @@ -1,2 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["about"],{"0964":function(t,e,i){},"5d6b":function(t,e,i){"use strict";var n=i("0964"),o=i.n(n);o.a},9224:function(t){t.exports=JSON.parse('{"a":"0.4.12"}')},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("Join Our 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"),a=i("9224"),c=i("e6e0"),l={name:"About",computed:Object(s["a"])({},Object(r["b"])({siteConfig:function(t){return t.siteConfig}})),components:{markdown:c["a"]},data:function(){return{version:a["a"]}},methods:{openUrl:function(t){window.open(t)}}},u=l,b=(i("5d6b"),i("2877")),f=Object(b["a"])(u,n,o,!1,null,"7eb5f2ea",null);e["default"]=f.exports}}]); -//# sourceMappingURL=about.a8a528c7.js.map \ No newline at end of file diff --git a/js/about.a8a528c7.js.map b/js/about.a8a528c7.js.map deleted file mode 100644 index d277a405..00000000 --- a/js/about.a8a528c7.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/about.a8a528c7.js","sources":["webpack:///js/about.a8a528c7.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/js/app.622fb392.js.map b/js/app.622fb392.js.map deleted file mode 100644 index a74e6cb4..00000000 --- a/js/app.622fb392.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/app.622fb392.js","sources":["webpack:///js/app.622fb392.js"],"mappings":"AAAA","sourceRoot":""} \ No newline at end of file diff --git a/js/app.622fb392.js b/js/app.db083780.js similarity index 99% rename from js/app.622fb392.js rename to js/app.db083780.js index d79d2436..c23a0061 100644 --- a/js/app.622fb392.js +++ b/js/app.db083780.js @@ -1,2 +1,2 @@ -(function(e){function t(t){for(var i,r,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 i,r=e.covers.map((function(e){return e.startsWith("http")?e:new URL(e,t).href})),o=[],a=Object(_home_runner_work_bioimage_io_bioimage_io_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_25__["a"])(r);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.includes("access_token="))throw new Error("Cover URL should not contain access token: "+s);o.push({relation:"hasPart",identifier:s,resource_type:"image-figure",scheme:"url"})}}catch(h){a.e(h)}finally{a.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);o.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),o.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");o.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}})),_='Download RDF Package
')+(n&&"

".concat(n,"

")||""),m=["bioimage.io","bioimage.io:"+e.type],f={title:e.name,description:_,access_right:"open",license:e.license,upload_type:"other",creators:p,publication_date:(new Date).toISOString().split("T")[0],keywords:m.concat(e.tags),notes:e.description+additionalNote,related_identifiers:o,communities:[]};return f}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 i,r=[],o=[],a=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();!(i=c.n()).done;){var l=i.value;if("isCompiledBy"===l.relation&&"url"===l.scheme)if(a=l.identifier,a.startsWith("file://"))a=a.replace("file://",e.links.bucket+"/");else{if(!a.includes("/files/"))throw new Error("Invalid file identifier: "+l.identifier);var u=a.includes("/api/files/")?/.*zenodo.org\/api\/files\/.*\/(.*)/:/.*zenodo.org\/.*\/files\/(.*)/,d=u.exec(a);if(!d)throw new Error("Invalid file identifier: "+l.identifier);var p=d[1];a="".concat(e.links.bucket,"/").concat(p)}else if("hasPart"===l.relation&&"image-figure"===l.resource_type&&"url"===l.scheme){var _=l.identifier;if(_.startsWith("file://"))_=_.replace("file://",e.links.bucket+"/");else if(_.includes("".concat(e.id,"/files/"))){var m=_.includes("/api/files/")?/.*zenodo.org\/api\/files\/.*\/(.*)/:/.*zenodo.org\/.*\/files\/(.*)/,f=m.exec(_);f?_="".concat(e.links.bucket,"/").concat(f[1]):console.error("Invalid cover image file identifier: "+l.identifier)}else console.error("Invalid cover image file identifier: "+l.identifier);r.push(_)}else if("references"===l.relation&&"url"===l.scheme&&l.identifier.startsWith("https://bioimage.io/#/r/")){var h=l.identifier.replace("https://bioimage.io/#/r/","");o.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(y){c.e(y)}finally{c.f()}var b=t.notes.replace(additionalNote,"");if(!a)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:r,links:o,rdf_source:a,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,i){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=i,this.lastUserId=null,this.callbackUrl=encodeURIComponent("https://imjoy.io/login-helper"),this.credential=null,this.credentialKey=i?"sandbox_zenodo_credential":"production_zenodo_credential",this.userIdKey=i?"sandbox_zenodo_user_id":"production_zenodo_user_id";try{this.lastUserId=localStorage.getItem(this.userIdKey),this.lastUserId&&(this.lastUserId=parseInt(this.lastUserId));var r=localStorage.getItem(this.credentialKey);r&&(this.credential=JSON.parse(r),this.getCredential(),this.credential&&this.lastUserId!==this.credential.user_id&&(this.lastUserId=this.credential.user_id,localStorage.setItem(this.userIdKey,this.lastUserId)))}catch(o){console.error("Failed to reset ".concat(this.credentialKey,": ").concat(o)),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(i){console.error("Failed to reset ".concat(this.credentialKey,": ").concat(i))}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,i,r,o,a,s,c,l,u,d,p,_,m,f,h;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.community,i=t.page,r=t.type,o=t.keywords,a=t.query,s=t.sort,c=t.size,i=i||1,r=r||"all",o=o||[],o.includes("bioimage.io")||o.push("bioimage.io"),c=c||20,s=s||"mostrecent",l="all"!==r?"&keywords=bioimage.io:"+r:"",u=l+(o.length>0?"&"+o.map((function(e){return"keywords="+encodeURIComponent(e)})).join("&"):"")+(a?"&q="+a:""),d="".concat(this.baseURL,"/api/records/?").concat(n?"communities="+n:"","&sort=").concat(s,"&page=").concat(i,"&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,_=e.t0.parse.call(e.t0,e.t1),!_||400!==_.status){e.next=21;break}return alert(_.message),e.abrupt("return");case 21:return _&&_.hits||(alert("Failed to find similar items, please try it again."),console.warn("Hitting rate limit, retrying in 1s")),m=_.hits.hits,f=m.map((function(e){try{return depositionToRdf(e)}catch(t){return console.warn(t),null}})),console.log("Get items from URL: ",f.map((function(e){return e.id})),d),h=f.filter((function(e){return!!e})),_.aggregations.access_right.buckets.length>0?h.total=_.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(a){console.error("Failed to reset ".concat(e.credentialKey))}var i=window.open("".concat(e.baseURL,"/logout"),"Logout");try{i.focus()}catch(a){return void n("Logout window blocked. If you have a popup blocker enabled, please add bioimage.io to your exception list.")}var r=120,o=setInterval((function(){i.closed?(clearInterval(o),t()):(r--,r<=0&&(clearInterval(o),i.close(),n("Timeout error")))}),1e3);setTimeout((function(){i.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 i=randId(),r=window.open("".concat(e.baseURL,"/oauth/authorize?scope=deposit%3Awrite+deposit%3Aactions&state=").concat(i,"&redirect_uri=").concat(e.callbackUrl,"&response_type=token&client_id=").concat(e.clientId),"Login");try{r.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 o=120,a=!1,s=setInterval((function(){a?clearInterval(s):r.closed?(clearInterval(s),n("The login window was closed unexpectedly")):(o--,o<=0&&(clearInterval(s),r.close(),n("Timeout error")))}),1e3),c=function o(c){if(r===c.source){if(window.removeEventListener("message",o),clearInterval(s),r.close(),a=!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!==i)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,i;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(i=e.sent,!i.ok){e.next=10;break}return e.next=7,i.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,i;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(i=e.sent,!i.ok){e.next=10;break}return e.next=7,i.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,i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id?t.id:t,i={"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:i});case 4:if(r=e.sent,!r.ok){e.next=11;break}return e.next=8,r.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,i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n="string"===typeof t?t:t.id,i={"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:i});case 4:if(r=e.sent,!r.ok){e.next=11;break}return e.next=8,r.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,i,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n="string"===typeof t?t:t.id,i={"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:i});case 4:if(r=e.sent,!r.ok){e.next=11;break}return e.next=8,r.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 i,r,o,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i="string"===typeof t?t:t.id,console.log("Updating deposition metadata of ".concat(i,":"),n),r={"Content-Type":"application/json"},e.next=5,fetch("".concat(this.baseURL,"/api/deposit/depositions/").concat(i,"?access_token=").concat(this.credential.access_token),{method:"PUT",body:JSON.stringify({metadata:n}),headers:r});case 5:if(o=e.sent,!o.ok){e.next=12;break}return e.next=9,o.json();case 9:return e.abrupt("return",e.sent);case 12:return e.next=14,o.json();case 14:throw a=e.sent,new Error("Failed to update metadata, error: "+JSON.stringify(a.errors||a.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,i,r){var o,a,s,c,l,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t.links.bucket,a=i||n.name,s={headers:{"Content-Type":n.type},onUploadProgress:function(e){if(r)r(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(o,"/").concat(a,"?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(o,"/").concat(a,"?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,i,r){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,i,r,o,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.id?t.id:t,i={"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:i});case 4:if(r=e.sent,!r.ok){e.next=16;break}return e.next=8,r.json();case 8:if(o=e.sent,!o.submitted||!o.doi_url){e.next=13;break}return e.abrupt("return",o);case 13:throw new Error("Failed to publish, error: "+JSON.stringify(o));case 14:e.next=20;break;case 16:return e.next=18,r.json();case 18:throw a=e.sent,new Error("Failed to publish, error: "+JSON.stringify(a.errors||a.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 i;return function(){var r=this,o=arguments,a=function(){i=null,n||e.apply(r,o)},s=n&&!i;clearTimeout(i),i=setTimeout(a,t),s&&e.apply(r,o)}}function concatAndResolveUrl(e,t){for(var n=e.split("/"),i=t.split("/"),r=[],o=0,a=n.length;o/g,"%3E"),e}function replaceAllRelByAbs(e,t){var n="[^-a-z0-9:._]";t.endsWith("/")||(t+="/");var i="(?:;|(?!\\d))",r={" ":"(?:\\s| ?|�*32"+i+"|�*20"+i+")","(":"(?:\\(|�*40"+i+"|�*28"+i+")",")":"(?:\\)|�*41"+i+"|�*29"+i+")",".":"(?:\\.|�*46"+i+"|�*2e"+i+")"},o={},a=r[" "]+"*",s="(?:[^>\"']*(?:\"[^\"]*\"|'[^']*'))*?[^>]*";function c(e){var t=e.toLowerCase();if(r[e])return r[e];for(var n=e.toUpperCase(),a="",s=0;s"+o+"]*"+a+")","gi");e=e.replace(t,(function(e){return e.replace(s,l).replace(c,l).replace(u,l)}))}function m(t,i,r,o,a,s){"string"==typeof t&&(t=new RegExp(t,"gi")),i=n+i,o="string"==typeof o?o:"gi";var c,l=new RegExp("("+i+'\\s*=\\s*")([^"]*)',"gi"),u=new RegExp("("+i+"\\s*=\\s*')([^']+)","gi"),d=new RegExp("("+r+')([^"]+)(")',o),_=new RegExp("("+r+")([^']+)(')",o);if("string"==typeof a){s="string"==typeof s?s:"";var m=new RegExp("("+r+")([^\"'][^"+a+"]*"+(s?"?)("+s+")":")()"),o);c=function(e,t,n){return t+n.replace(d,p).replace(_,p).replace(m,p)}}else c=function(e,t,n){return t+n.replace(d,p).replace(_,p)};e=e.replace(t,(function(e){return e.replace(l,c).replace(u,c)}))}return m("|'"+c("refresh")+"'"+s+">|"+c("refresh")+"(?:"+c(" ")+s+">|>))","content",c("url")+a+c("=")+a,"i"),_("<"+s+n+"href\\s*="+s+">","href"),_("<"+s+n+"src\\s*="+s+">","src"),_("","data"),_("","codebase"),_("|'"+c("movie")+"'"+s+">|"+c("movie")+"(?:"+c(" ")+s+">|>))","value"),_(/]*>(?:[^"']*(?:"[^"]*"|'[^']*'))*?[^'"]*(?:<\/style|$)/gi,"url","\\s*\\(\\s*","","\\s*\\)"),m("<"+s+n+"style\\s*="+s+">","style",c("url")+a+c("(")+a,0,a+c(")"),c(")")),e}},"034f":function(e,t,n){"use strict";var i=n("85ec"),r=n.n(i);r.a},"106f":function(e,t,n){"use strict";var i=n("944d"),r=n.n(i);r.a},1237:function(e,t,n){},"132b":function(e,t,n){"use strict";var i=n("c9e7"),r=n.n(i);r.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":"Bug Report","tooltip":"Send a bug report on Github","logo":"/static/img/bug-icon.png","url":"https://github.com/bioimage-io/bioimage.io/issues"},{"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":"BioImage.IO is funeded by the European Commission through the AI4Life project","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 Commission through the AI4Life project (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","n2v"],"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 i=n("dd68"),r=n.n(i);r.a},"3a38":function(e,t,n){},"423d":function(e,t,n){},4871:function(e,t,n){},"560e":function(e,t,n){},"56d7":function(e,t,n){"use strict";n.r(t);n("4160"),n("b64b"),n("159b");var i,r,o=n("5530"),a=(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"),_="\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",m=new Promise((function(e,t){i=e,r=t}));function f(){return h.apply(this,arguments)}function h(){return h=Object(d["a"])(regeneratorRuntime.mark((function e(){var t,n,o,a,s,c,l,m;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 i,r,o,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t&&t.config.namespace&&t.config.namespace&&(r=document.getElementById("output_"+t.config.namespace),n.dialog||n.window_id&&document.getElementById(n.window_id)||(i=document.createElement("div"),i.id=Object(p["f"])(),i.classList.add("imjoy-window"),r.style.height="600px",r.appendChild(i),n.window_id=i.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 a=e.sent,e.next=7,a.createWindow(n);case 7:o=e.sent,e.next=12;break;case 10:n.window_manager_container||(n.dialog=!0),o=window.imjoy.pm.createWindow(t,n);case 12:return e.abrupt("return",o);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),o=n.get("dev"),o&&o&&(a=document.createElement("style"),a.innerText=_,document.head.appendChild(a),s=document.createElement("div"),s.id="window-container",document.body.appendChild(s)),m={getPlugin:function(e,t,n){return Object(d["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=n||{},t&&t.namespace||(n.namespace=n.namespace||e&&e.config.namespace),i.next=4,window.imjoy.pm.getPlugin(e,t,n);case 4:return i.abrupt("return",i.sent);case 5:case"end":return i.stop()}}),i)})))()},showStatus:function(e,t){return Object(d["a"])(regeneratorRuntime.mark((function n(){var i;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 i=document.getElementById("status_"+e.config.namespace),i.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 i;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 i=document.getElementById("progress_"+e.config.namespace),t<1&&(t*=100),t>100&&(t=100),i.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 i(){var r;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:n=n||5,e&&e.config.namespace&&e.config.namespace&&(r=document.getElementById("status_"+e.config.namespace),r.innerHTML="".concat(t.slice(0,128))),window.app.showSnackbar(t,n);case 3:case"end":return i.stop()}}),i)})))()},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:o?"window-container":null,imjoy_api:m}).then(function(){var e=Object(d["a"])(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:r=t.imjoy.api,t.$on("window-size-pos-changing",(function(e){var t,n=document.querySelectorAll(".reveal iframe"),i=Object(u["a"])(n);try{for(i.s();!(t=i.n()).done;){var r=t.value;r.style.pointerEvents=e?"none":"all"}}catch(o){i.e(o)}finally{i.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(){r.createWindow({src:"https://if.imjoy.io"})}}),t.addMenuItem({label:"📓 Notebooks",callback:function(){r.createWindow({src:"https://jupyter.imjoy.io"})}}),window.api=r,window.imjoy=t.imjoy,window.app=t,i(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"),i=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:i||"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),r()}));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,i,r,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=window.location.href.split("#")[1].split("?")[1],i=new URLSearchParams(n),r=i.get("dev"),r){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,m;case 7:o=window.app,o.loadPlugin("https://if.imjoy.io").then((function(){o.imjoy.event_bus.on("plugin_loaded",(function(e){t("add",e)})),o.imjoy.event_bus.on("plugin_unloaded",(function(e){t("remove",e)})),o.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 y(e,t,n){return v.apply(this,arguments)}function v(){return v=Object(d["a"])(regeneratorRuntime.mark((function e(t,n,i){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(n,i),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 r=e.sent,e.next=12,r.run({config:{referer:window.location.href,mode:"all",type:"bioengine"},data:i});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]])}))),v.apply(this,arguments)}function w(e,t,n){return k.apply(this,arguments)}function k(){return k=Object(d["a"])(regeneratorRuntime.mark((function e(t,n,i){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(console.log(n,i),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 r=e.sent,e.next=12,r.run({config:{referer:window.location.href,mode:"one",type:"bioengine"},data:i});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]])}))),k.apply(this,arguments)}var x={name:"App",data:function(){return{showMenu:!1}},computed:Object(o["a"])({},Object(l["b"])({showNavbar:function(e){return e.showNavbar},siteConfig:function(e){return e.siteConfig}})),mounted:function(){var e=this;f().then((function(){e.$store.commit("setBioEngineReady",!0)})).catch((function(t){console.error(t),e.$store.commit("setBioEngineReady",!1)}))}},I=x,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)},P=[],T=(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")),L=n("0d52"),M=n.n(L),S=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,i){return n("a",{key:t,staticStyle:{margin:"3px"},on:{click:function(n){e.selectedTags=[t]}}},[e._v(e._s(t)+e._s(i===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,i){return n("div",{key:i,staticClass:"column"},[e._v(" "+e._s(i)+": "),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(o["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=[],i=this.selectedTags.map((function(e){return e.toLowerCase()})),r=Object(u["a"])(this.fullLabelList);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(!(i.indexOf(o.toLowerCase())>=0)){for(var a=!1,s=0,c=Object.keys(this.tagCategories);s=0}));n=i.filter((function(n){var i;i=t.matchingAll?r.length>0&&r.every((function(e){return n.allLabels.includes(e.toLowerCase())})):r.length>0&&r.some((function(e){return n.allLabels.includes(e.toLowerCase())}));var o=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)&&(i||t.freeTextMode&&e.every(o))}))}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)}}}),W=U,B=(n("e88b"),Object(C["a"])(W,S,A,!1,null,"1f19381b",null)),F=B.exports,z=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)])])])},Y=[],Z=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,Z,Q,!1,null,"68bfc2b0",null)),ne=te.exports,ie=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()},re=[],oe={name:"dev-menu",props:["resourceItem"],computed:Object(o["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)}}},ae=oe,se=(n("d7c4"),Object(C["a"])(ae,ie,re,!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(o["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(i){t.e(i)}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,Y,!1,null,"19aa8d02",null)),_e=pe.exports,me=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);a["default"].component("label-selector",{props:["all-labels"],template:document.getElementById("label-selector")});var fe={name:"ResourceItemList",components:{"resource-item-card":_e,"app-icons":V},props:{allItems:{type:Array,default:null},displayMode:{type:String,default:"card"},bioEngineReady:{type:Boolean,default:!1}},computed:Object(o["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:me,currentPage:1,itemsPerPage:16}},mounted:function(){},beforeDestroy:function(){},methods:{showResourceItemInfo:function(e){this.$emit("show-resource-item-info",e)}}},he=fe,ge=(n("c1ab"),Object(C["a"])(he,z,q,!1,null,"af27f312",null)),be=ge.exports,ye=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"),e.resourceItem.interfaceDocs?n("markdown",{attrs:{"enable-run-buttons":!0,baseUrl:e.resourceItem.baseUrl,content:e.resourceItem.interfaceDocs}}):e._e(),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))])},ve=[],we=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"attachments"},[e._l(e.normalizedAttachments,(function(t,i){return[t?n("h2",{key:i+"_title",staticStyle:{"font-size":"1.5rem","font-weight":"600","margin-top":"24px","margin-bottom":"16px","text-transform":"capitalize"},attrs:{id:i}},[e._v(" "+e._s(i)+" ")]):e._e(),t?n("b-table",{key:i+"_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(i){return n("b-table-column",{key:i.field,attrs:{field:i.field,label:i.label,width:i.width||40,sortable:i.sortable}},[t.row[i.field]?["url"===i.type?n("a",{class:i.class,attrs:{href:t.row[i.field],target:"_blank"}},[e._v(" "+e._s(i.text)+" ")]):n("span",{class:i.class},[e._v(" "+e._s(t.row[i.field]&&t.row[i.field].slice(0,i.max_length)+(t.row[i.field].length>i.max_length?"...":""))+" ")])]:e._e()],2)}))}},{key:"detail",fn:function(e){return[n("resource-item-card",{attrs:{resourceItem:e.row}})]}}],null,!0)}):e._e()]}))],2)},ke=[],xe=n("53ca"),Ie={name:"Attachments",props:{attachments:{type:Object,default:null},focusTarget:{type:String,default:null}},components:{"resource-item-card":_e},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(o["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);t\nBy clicking the `Test the model` button, you can test the model with your own data.\n\n\x3c!-- ImJoyPlugin: {"type": "web-worker", "hide_code_block": true, "minimal_ui": true, "run_button_text": "Test the model"} --\x3e\n```js\napi.createWindow({\n src: "'.concat(n,'",\n window_id: "test-run-form",\n data: {\n id: "').concat(e.id,'",\n input_window_id: "image_input_window",\n output_window_id: "image_output_window"\n }}\n )\n```\n\n\n
\n
\n
\n
\n
\n '),e.interfaceDocs=i;case 3:case"end":return t.stop()}}),t)})))()}}},Ke=$e,Ne=(n("a786"),Object(C["a"])(Ke,ye,ve,!1,null,"0081b067",null)),Je=Ne.exports,He=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)},Ve=[],Ge={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)}}},Ye=Ge,Ze=(n("17ec"),Object(C["a"])(Ye,He,Ve,!1,null,"a2e6d4aa",null)),Qe=Ze.exports,Xe={notebook:"notebook-outline",dataset:"database",application:"puzzle",model:"hubspot"};function et(e){return e.replace(/_/g," ").replace(/(^|\s)\S/g,(function(e){return e.toUpperCase()}))}var tt=function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}();function nt(e,t,n){var i,r;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===(i=t)||void 0===i||null===(r=i.icon)||void 0===r?void 0:r.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(){y(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 o=t.source.split("/");t.config._colab_url="https://colab.research.google.com/github/".concat(o[3],"/").concat(o[4],"/blob/").concat(o[5],"/").concat(o.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.training_data&&t.links.push(t.training_data.id);var a,s=Object(u["a"])(t.links);try{var c=function(){var n=a.value;if(["imjoy/bioimageio-packager","imjoy/genericbioengineapp"].includes(n))return"continue";var i,r=e.resourceItems.filter((function(e){return e.id.toLowerCase()===n.toLowerCase()})),o=Object(u["a"])(r);try{var s=function(){var r=i.value;t.apps.unshift({name:r.name,icon:r.icon||Xe[r.type],isLinkedApp:e.allApps[n],run:function(){return Object(d["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(!e.allApps[n]){i.next=7;break}return i.next=3,e.updateFullRDF(t);case 3:return i.next=5,w(e,e.allApps[n],t);case 5:i.next=8;break;case 7:e.showResourceItemInfo(r);case 8:case"end":return i.stop()}}),i)})))()}})};for(o.s();!(i=o.n()).done;)s()}catch(c){o.e(c)}finally{o.f()}};for(s.s();!(a=s.n()).done;)c()}catch(v){s.e(v)}finally{s.f()}t.badges=t.badges||[],t.attachments=t.attachments||{};var l,_=e.resourceItems.filter((function(e){return e.links&&e.links.includes(t.id)})),m=Object(u["a"])(_);try{for(m.s();!(l=m.n()).done;){var f=l.value;t.attachments[f.type]?t.attachments[f.type].push(f):t.attachments[f.type]=[f]}}catch(v){m.e(v)}finally{m.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 i(){var r;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n.showInfoDialogMode="model",i.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/")&&(r=Object.assign({},n.$route.query),r.id=e.id,n.initialized&&n.$router.replace({query:r}).catch((function(){})));case 9:case"end":return i.stop()}}),i)})))()},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 i=this.resourceItems.filter((function(t){return t.nickname===e.$route.query.nickname}))[0];i?(this.showResourceItemInfo(i),t=!0):alert("Oops, resource item not found: "+this.$route.query.nickname)}if(this.$route.query.tags){var r=null;r="string"===typeof this.$route.query.tags?this.$route.query.tags.split(","):this.$route.query.tags,setTimeout((function(){e.searchTags=r}),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}}},rt=it,ot=(n("cccb"),Object(C["a"])(rt,D,P,!1,null,null,null)),at=ot.exports,st=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+")"}},[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",{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,i){return n("b-tag",{key:i,attrs:{rounded:""}},[e._v(e._s(i))])})),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)},ct=[],lt=(n("07ac"),n("466d"),n("21a6")),ut=(n("fb5f"),n("0df0")),dt=n.n(ut),pt=n("c4e3"),_t=n.n(pt),mt=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)])},ft=[],ht={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}))}}},gt=ht,bt=(n("106f"),Object(C["a"])(gt,mt,ft,!1,null,null,null)),yt=bt.exports,vt=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)])},wt=[],kt={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(xe["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]])})))()}}},xt=kt,It=Object(C["a"])(xt,vt,wt,!1,null,null,null),Ct=It.exports,Ot=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,i){return n("span",{key:i,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,i)}}})])})),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()])])},Et=[],Rt={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(xe["a"])(e)&&(e=e.toString()),e.length>t?e.substring(0,t)+"...":e):e}}},jt=Rt,Dt=Object(C["a"])(jt,Ot,Et,!1,null,null,null),Pt=Dt.exports,Tt=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,i){return n("div",{key:i},[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(),i===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)])},Lt=[],Mt={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()}}},St=Mt,At=(n("fff7"),Object(C["a"])(St,Tt,Lt,!1,null,null,null)),Ut=At.exports,Wt=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,i){return n("div",{key:i},[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(),i===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)])},Bt=[],Ft={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()}}},zt=Ft,qt=(n("e067"),Object(C["a"])(zt,Wt,Bt,!1,null,null,null)),$t=qt.exports,Kt=n("67be"),Nt=n.n(Kt),Jt=n("0e54"),Ht=n.n(Jt),Vt=n("c0c4"),Gt=n.n(Vt),Yt={name:"upload",props:["updateDepositId"],components:{"form-json":dt.a,markdown:Re["a"],TagInputField:yt,SelectButtonField:Ct,DropFilesField:Pt,AuthorInputField:$t,CitationInputField:Ut},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(o["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:yt,SelectButtonField:Ct,DropFilesField:Pt,AuthorInputField:$t,CitationInputField:Ut}}},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:{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 i,r,o,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=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 i=new FileReader;i.onload=function(e){t(e.target.result)},i.onerror=n,i.readAsText(e)}));case 5:t.rdfYaml=n.sent,r=e,t.zipPackage=new _t.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 o=new _t.a,n.next=19,o.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 r=t.zipPackage.files["rdf.yaml"]||t.zipPackage.files["model.yaml"],n.next=27,r.async("string");case 27:t.rdfYaml=n.sent;case 28:if(a=T["a"].load(t.rdfYaml),"model.yaml"===r.name&&(a.type="model"),a.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:a.config=a.config||{},a.rdf_source="./"+r.name,"model"===a.type&&(a.links=a.links||[],a.links.push("imjoy/BioImageIO-Packager")),t.initializeRdfForm(a,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,i.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 i,r,o,a,s;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(n.prev=0,i=Nt.a.resolvePath(),!i.test(e)){n.next=8;break}return n.next=5,Object(p["i"])(e.match(i)[4]);case 5:e=n.sent,n.next=12;break;case 8:if(!Nt()().test(e)){n.next=12;break}return n.next=11,Object(p["i"])(e);case 11:e=n.sent;case 12:if(r=/zenodo.org\/(record|deposit)\/([0-9]+)/g,o=r.exec(e),!o){n.next=33;break}if(t.depositId=parseInt(o[2]),!e.includes("/record/")){n.next=22;break}return n.next=19,t.client.getDeposit(t.depositId);case 19:a=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:a=n.sent;case 27:return console.log("orcid matched: "+t.depositId,a),n.next=30,Object(p["e"])(a);case 30:s=n.sent,t.zipPackage=null,t.initializeRdfForm(s,a.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 i,r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,new Promise((function(t,n){var i=new FileReader;i.onload=function(e){t(e.target.result)},i.onerror=n,i.readAsText(e)}));case 2:i=n.sent,r=T["a"].load(i),r.config=r.config||{},r.rdf_source="./"+e.name,t.jsonFields=null,setTimeout((function(){t.initializeRdfForm(r)}),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 i=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:i.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(M.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,i,r,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n.showLoader(!0),e.prev=1,i=T["a"].load(T["a"].dump(n.rdf)),delete i._metadata,(null===i||void 0===i||null===(t=i.config)||void 0===t?void 0:t._deposit)&&delete i.config._deposit,console.log("RDF: ",i),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 r=e.sent,e.next=11,r.validate(i);case 11:if(o=e.sent,o.error){e.next=16;break}return e.abrupt("return","Validation passed!");case 16:throw new Error(JSON.stringify(o,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 i,r=Object(u["a"])(e);try{for(r.s();!(i=r.n()).done;){var o=i.value;t[o.type]&&(o.is=t[o.type],delete o.type)}}catch(a){r.e(a)}finally{r.f()}return e},formSubmitted:function(e){var t=this;return Object(d["a"])(regeneratorRuntime.mark((function n(){var i,r,o,a,s,c,l,d,_,m,f,h,g,b,y,v;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:for(s in o={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"},a=e.values,o)t.rdf[s]=a[o[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"])(a["Files"]),n.prev=9,l.s();case 11:if((d=l.n()).done){n.next=18;break}if(_=d.value,!c.includes(_)){n.next=15;break}return n.abrupt("continue",16);case 15:_ instanceof Blob?t.zipPackage.file(_.name,_):console.error("Invalid file type",_);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(m=0,f=c;m0)){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,i;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:i=t.sent,console.log("Published",i),e.publishedDOI=i.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,i,r,o,a,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 _t.a,i=0,r=Object(u["a"])(e.editedFiles),t.prev=5,r.s();case 7:if((o=r.n()).done){t.next=29;break}if(a=o.value,e.uploadProgress=i/e.editedFiles.length*100,i++,"remote"!==a.type){t.next=26;break}return e.uploadStatus="Download fille "+a.name,t.next=15,fetch(a.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(a.name,c),t.next=24;break;case 23:throw new Error("Failed to download file: "+a.url);case 24:t.next=27;break;case 26:a instanceof Blob&&n.file(a.name,a);case 27:t.next=7;break;case 29:t.next=34;break;case 31:t.prev=31,t.t0=t["catch"](5),r.e(t.t0);case 34:return t.prev=34,r.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(lt["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 i(){var r,o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,n.client.getCredential(!0);case 3:n.$forceUpdate(),i.next=10;break;case 6:return i.prev=6,i.t0=i["catch"](0),alert("Failed to login: ".concat(i.t0)),i.abrupt("return");case 10:return r=n.$buefy.loading.open({container:n.$el}),i.prev=11,i.delegateYield(regeneratorRuntime.mark((function i(){var r,o,a,s,c,l,u,d,_,m,f,h;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n.uploadProgress=1,n.uploadMode="new",!e){i.next=29;break}return i.prev=3,i.next=6,n.client.retrieve(e);case 6:if(r=i.sent,t){i.next=16;break}return i.next=10,n.client.createNewVersion(r);case 10:return o=i.sent,a=o.links.latest_draft.split("/"),e=parseInt(a[a.length-1]),i.next=15,n.client.retrieve(e);case 15:r=i.sent;case 16:if("inprogress"===r.state||"unsubmitted"===r.state){i.next=19;break}return i.next=19,n.client.edit(e);case 19:n.uploadMode="update",i.next=27;break;case 22:if(i.prev=22,i.t0=i["catch"](3),console.error(i.t0),confirm("Failed to retrieve existing deposit (id: ".concat(e,"), would you like to create a new deposit instead?"))){i.next=27;break}return i.abrupt("return",{v:void 0});case 27:i.next=32;break;case 29:return i.next=31,n.client.createDeposition();case 31:r=i.sent;case 32:if(n.depositId=r.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")){i.next=42;break}if(l=n.zipPackage.files[n.rdf.documentation.replace("./","")],!l){i.next=42;break}return i.next=40,l.async("string");case 40:c=i.sent,c=Gt.a.sanitize(Ht()(c));case 42:return n.rdf.config=n.rdf.config||{},n.rdf.config._deposit=r,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,i.next=50,n.client.updateMetadata(r,u);case 50:if(r=i.sent,n.prereserveDOI=r.metadata.prereserve_doi,n.rdf.id=n.prereserveDOI.doi,n.rdf.config._doi=r.metadata.prereserve_doi.doi,n.rdf.config._conceptdoi=r.conceptdoi,!t){i.next=58;break}return n.stepIndex=3,i.abrupt("return",{v:r});case 58:d=Object.values(n.zipPackage.files),n.rdf.covers&&n.rdf.covers.length>0&&(_=n.rdf.covers,d.sort((function(e,t){return _.includes("./"+e.name)&&!_.includes("./"+t.name)?1:!_.includes("./"+e.name)&&_.includes("./"+t.name)?-1:0}))),m=regeneratorRuntime.mark((function e(t){var i,o;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 i=e.sent,o=new File([i],d[t].name),e.next=9,n.client.uploadFile(r,o,o.name,(function(e){n.uploadProgress=Math.round(e/o.size*100),n.uploadStatus="Uploading ".concat(t+1,"/").concat(d.length,"(").concat(n.uploadProgress,"%): ").concat(o.name.slice(0,40),"... "),n.$forceUpdate()}));case 9:case"end":return e.stop()}}),e)})),f=0;case 62:if(!(f=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(on["a"])(new Set(e.links)),e.tags=e.tags||[],e.tags=e.tags.map((function(e){return e.toLowerCase()})),e.links=Object(on["a"])(new Set(e.links)),t?t(e):e}))},setBioEngineReady:function(e,t){e.bioEngineReady=!!t}}}),hn=(n("f935"),n("1881")),gn=n.n(hn),bn=(n("5363"),n("7bb1")),yn=n("4c93"),vn=n("2593");a["default"].component("ValidationProvider",bn["a"]),Object.keys(yn).forEach((function(e){Object(bn["b"])(e,Object(o["a"])(Object(o["a"])({},yn[e]),{},{message:vn["a"][e]}))})),a["default"].use(gn.a),a["default"].use(rn["a"]),a["default"].config.productionTip=!1,new a["default"]({router:nn,render:function(e){return e(E)},store:fn}).$mount("#app")},"5ced":function(e,t,n){},"6a05":function(e,t,n){},"74ab":function(e,t,n){},"85ec":function(e,t,n){},"85f6":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 i=n("423d"),r=n.n(i);r.a},a786:function(e,t,n){"use strict";var i=n("85f6"),r=n.n(i);r.a},c1ab:function(e,t,n){"use strict";var i=n("74ab"),r=n.n(i);r.a},c9e7:function(e,t,n){},ccc4:function(e,t,n){"use strict";var i=n("1237"),r=n.n(i);r.a},cccb:function(e,t,n){"use strict";var i=n("5ced"),r=n.n(i);r.a},ccd0:function(e,t,n){},d7c4:function(e,t,n){"use strict";var i=n("89db"),r=n.n(i);r.a},dd68:function(e,t,n){},e067:function(e,t,n){"use strict";var i=n("4871"),r=n.n(i);r.a},e6e0:function(e,t,n){"use strict";var i=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)},r=[],o=(n("a15b"),n("fb6a"),n("d3b7"),n("ac1f"),n("8a79"),n("5319"),n("1276"),n("9911"),n("96cf"),n("1da1")),a=(n("e4cb"),n("2c43"),n("0e54")),s=n.n(a),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")),_=n("025e"),m={runButtonText:"Run",editButtonText:"Edit",errorText:"Error",successText:"Done"};function f(e,t,n){return h.apply(this,arguments)}function h(){return h=Object(o["a"])(regeneratorRuntime.mark((function e(t,n,i){var r,a,s,c,l,u,d,p,m=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"),r=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"])(),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