From ef54e9cf9a0414f0d75cc8bc788e94f93d00f813 Mon Sep 17 00:00:00 2001
From: t11r <1674104+t11r@users.noreply.github.com>
Date: Thu, 2 May 2024 00:37:55 +0200
Subject: [PATCH] 0.30.2
---
README.md | 10 +++++-----
dist/tify.css | 2 +-
dist/tify.js | 6 +++---
package-lock.json | 4 ++--
package.json | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index 2e6f3a19..38632a8e 100644
--- a/README.md
+++ b/README.md
@@ -23,17 +23,17 @@ Embed TIFY into your website in three easy steps:
- Either download TIFY and copy the contents of the `dist` directory to your server:
``` html
-
-
+
+
```
- > To avoid issues with browser caching, add a query parameter with the current version, e.g. `?v0.30.1`.
+ > To avoid issues with browser caching, add a query parameter with the current version, e.g. `?v0.30.2`.
- Or use [jsDelivr](https://www.jsdelivr.com/):
``` html
-
-
+
+
```
- Or `import` TIFY into your web application:
diff --git a/dist/tify.css b/dist/tify.css
index 27dc6d85..72c2ba0d 100644
--- a/dist/tify.css
+++ b/dist/tify.css
@@ -1,5 +1,5 @@
/*!
-TIFY v0.30.0
+TIFY v0.30.1
(c) 2017-2024 Göttingen State and University Library (https://www.sub.uni-goettingen.de/)
AGPL-3.0
https://tify.rocks/
diff --git a/dist/tify.js b/dist/tify.js
index 1466a025..d54320c5 100644
--- a/dist/tify.js
+++ b/dist/tify.js
@@ -1,5 +1,5 @@
/*!
-TIFY v0.30.0
+TIFY v0.30.1
(c) 2017-2024 Göttingen State and University Library (https://www.sub.uni-goettingen.de/)
AGPL-3.0
https://tify.rocks/
@@ -20,8 +20,8 @@ https://tify.rocks/
* @vue/runtime-dom v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
-**/const Ga="http://www.w3.org/2000/svg",qa="http://www.w3.org/1998/Math/MathML",ut=typeof document<"u"?document:null,ns=ut&&ut.createElement("template"),Za={insert:(t,n,e)=>{n.insertBefore(t,e||null)},remove:t=>{const n=t.parentNode;n&&n.removeChild(t)},createElement:(t,n,e,i)=>{const s=n==="svg"?ut.createElementNS(Ga,t):n==="mathml"?ut.createElementNS(qa,t):ut.createElement(t,e?{is:e}:void 0);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>ut.createTextNode(t),createComment:t=>ut.createComment(t),setText:(t,n)=>{t.nodeValue=n},setElementText:(t,n)=>{t.textContent=n},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ut.querySelector(t),setScopeId(t,n){t.setAttribute(n,"")},insertStaticContent(t,n,e,i,s,r){const a=e?e.previousSibling:n.lastChild;if(s&&(s===r||s.nextSibling))for(;n.insertBefore(s.cloneNode(!0),e),!(s===r||!(s=s.nextSibling)););else{ns.innerHTML=i==="svg"?``:i==="mathml"?``:t;const l=ns.content;if(i==="svg"||i==="mathml"){const o=l.firstChild;for(;o.firstChild;)l.appendChild(o.firstChild);l.removeChild(o)}n.insertBefore(l,e)}return[a?a.nextSibling:n.firstChild,e?e.previousSibling:n.lastChild]}},Ka=Symbol("_vtc");function Xa(t,n,e){const i=t[Ka];i&&(n=(n?[n,...i]:[...i]).join(" ")),n==null?t.removeAttribute("class"):e?t.setAttribute("class",n):t.className=n}const di=Symbol("_vod"),mr=Symbol("_vsh"),Ze={beforeMount(t,{value:n},{transition:e}){t[di]=t.style.display==="none"?"":t.style.display,e&&n?e.beforeEnter(t):Nt(t,n)},mounted(t,{value:n},{transition:e}){e&&n&&e.enter(t)},updated(t,{value:n,oldValue:e},{transition:i}){!n!=!e&&(i?n?(i.beforeEnter(t),Nt(t,!0),i.enter(t)):i.leave(t,()=>{Nt(t,!1)}):Nt(t,n))},beforeUnmount(t,{value:n}){Nt(t,n)}};function Nt(t,n){t.style.display=n?t[di]:"none",t[mr]=!n}const Ya=Symbol(""),Ja=/(^|;)\s*display\s*:/;function Qa(t,n,e){const i=t.style,s=Se(e);let r=!1;if(e&&!s){if(n)if(Se(n))for(const a of n.split(";")){const l=a.slice(0,a.indexOf(":")).trim();e[l]==null&&li(i,l,"")}else for(const a in n)e[a]==null&&li(i,a,"");for(const a in e)a==="display"&&(r=!0),li(i,a,e[a])}else if(s){if(n!==e){const a=i[Ya];a&&(e+=";"+a),i.cssText=e,r=Ja.test(e)}}else n&&t.removeAttribute("style");di in t&&(t[di]=r?i.display:"",t[mr]&&(i.display="none"))}const ss=/\s*!important$/;function li(t,n,e){if(ue(e))e.forEach(i=>li(t,n,i));else if(e==null&&(e=""),n.startsWith("--"))t.setProperty(n,e);else{const i=$a(t,n);ss.test(e)?t.setProperty(Pt(i),e.replace(ss,""),"important"):t[i]=e}}const rs=["Webkit","Moz","ms"],Ii={};function $a(t,n){const e=Ii[n];if(e)return e;let i=Ye(n);if(i!=="filter"&&i in t)return Ii[n]=i;i=wi(i);for(let s=0;sBi||(rl.then(()=>Bi=0),Bi=Date.now());function al(t,n){const e=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=e.attached)return;Ge(ll(i,e.value),n,5,[i])};return e.value=t,e.attached=ol(),e}function ll(t,n){if(ue(n)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},n.map(i=>s=>!s._stopped&&i&&i(s))}else return n}const cs=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,cl=(t,n,e,i,s,r,a,l,o)=>{const c=s==="svg";n==="class"?Xa(t,i,c):n==="style"?Qa(t,e,i):mi(n)?an(n)||nl(t,n,e,i,a):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):ul(t,n,i,c))?tl(t,n,i,r,a,l,o):(n==="true-value"?t._trueValue=i:n==="false-value"&&(t._falseValue=i),el(t,n,i,c))};function ul(t,n,e,i){if(i)return!!(n==="innerHTML"||n==="textContent"||n in t&&cs(n)&&de(e));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="form"||n==="list"&&t.tagName==="INPUT"||n==="type"&&t.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return cs(n)&&Se(e)?!1:n in t}const us=t=>{const n=t.props["onUpdate:modelValue"]||!1;return ue(n)?e=>si(n,e):n};function hl(t){t.target.composing=!0}function hs(t){const n=t.target;n.composing&&(n.composing=!1,n.dispatchEvent(new Event("input")))}const zi=Symbol("_assign"),vr={created(t,{modifiers:{lazy:n,trim:e,number:i}},s){t[zi]=us(s);const r=i||s.props&&s.props.type==="number";Mt(t,n?"change":"input",a=>{if(a.target.composing)return;let l=t.value;e&&(l=l.trim()),r&&(l=Ni(l)),t[zi](l)}),e&&Mt(t,"change",()=>{t.value=t.value.trim()}),n||(Mt(t,"compositionstart",hl),Mt(t,"compositionend",hs),Mt(t,"change",hs))},mounted(t,{value:n}){t.value=n??""},beforeUpdate(t,{value:n,modifiers:{lazy:e,trim:i,number:s}},r){if(t[zi]=us(r),t.composing)return;const a=s||t.type==="number"?Ni(t.value):t.value,l=n??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(e||i&&t.value.trim()===l)||(t.value=l))}},fl=["ctrl","shift","alt","meta"],dl={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,n)=>fl.some(e=>t[`${e}Key`]&&!n.includes(e))},_t=(t,n)=>{const e=t._withMods||(t._withMods={}),i=n.join(".");return e[i]||(e[i]=(s,...r)=>{for(let a=0;a{const e=t._withKeys||(t._withKeys={}),i=n.join(".");return e[i]||(e[i]=s=>{if(!("key"in s))return;const r=Pt(s.key);if(n.some(a=>a===r||pl[a]===r))return t(s)})},gl=Oe({patchProp:cl},Za);let fs;function ml(){return fs||(fs=Ea(gl))}const vl=(...t)=>{const n=ml().createApp(...t),{mount:e}=n;return n.mount=i=>{const s=wl(i);if(!s)return;const r=n._component;!de(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.innerHTML="";const a=e(s,!1,yl(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},n};function yl(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function wl(t){return Se(t)?document.querySelector(t):t}const ae=(t,n)=>{const e=t.__vccOpts||t;for(const[i,s]of n)e[i]=s;return e},_l={},Tl={class:"tify-icon",viewBox:"0 0 24 24"},xl=k("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},null,-1),bl=[xl];function Sl(t,n){return A(),F("svg",Tl,bl)}const yr=ae(_l,[["render",Sl]]);var El={version:"0.30.0",license:"AGPL-3.0",bugsUrl:"https://github.com/tify-iiif-viewer/tify/issues",contributorsUrl:"https://github.com/tify-iiif-viewer/tify/blob/v0.30.0/CONTRIBUTORS.md",docsUrl:"https://github.com/tify-iiif-viewer/tify/blob/v0.30.0/doc",docsLanguages:["de","en"],repositoryUrl:"https://github.com/tify-iiif-viewer/tify"};const Pl={computed:{copyrightHtml(){return'Copyright © 2017–2022 Göttingen University / Göttingen State and University Library'},env(){return El},infoHtml(){return'TIFY is a slim and mobile-friendly IIIF document viewer, released under the GNU Affero General Public License 3.0.'},userGuideUrl(){const t=this.env.docsLanguages.includes(this.$store.options.language)?this.$store.options.language:"en";return`${this.env.docsUrl}/user-guide.${t}.md`}}},Cl={class:"tify-help",tabindex:"0"},Rl={class:"tify-sr-only"},Ll=["innerHTML"],Hl={class:"tify-list"},Ol=["href"],Ml=["href"],Dl=["href"],Al=["href"],kl={class:"tify-help-footer"},Fl=["innerHTML"];function Il(t,n,e,i,s,r){return A(),F("section",Cl,[k("h2",Rl,Z(t.$translate("Help")),1),k("h3",null,Z(t.$translate("About TIFY")),1),k("p",{innerHTML:t.$translate("$info",r.infoHtml)},null,8,Ll),k("ul",Hl,[k("li",null,[k("a",{href:r.userGuideUrl},Z(t.$translate("User guide")),9,Ol)]),k("li",null,[k("a",{href:r.env.repositoryUrl},Z(t.$translate("Source code")),9,Ml)]),k("li",null,[k("a",{href:r.env.contributorsUrl},Z(t.$translate("Contributors")),9,Dl)]),k("li",null,[k("a",{href:r.env.bugsUrl},Z(t.$translate("Report a bug")),9,Al)])]),k("footer",kl,[k("p",null,[be(Z(t.$translate("Version"))+" ",1),k("b",null,Z(r.env.version),1),be(" · "),k("span",{innerHTML:t.$translate("$copyright",r.copyrightHtml)},null,8,Fl)])])])}const Bl=ae(Pl,[["render",Il]]),zl={},Nl={class:"tify-icon",viewBox:"0 0 24 24"},Vl=k("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"},null,-1),Ul=[Vl];function jl(t,n){return A(),F("svg",Nl,Ul)}const wr=ae(zl,[["render",jl]]),Wl={},Gl={class:"tify-icon",viewBox:"0 0 24 24"},ql=k("path",{d:"M19,13H5V11H19V13Z"},null,-1),Zl=[ql];function Kl(t,n){return A(),F("svg",Gl,Zl)}const _r=ae(Wl,[["render",Kl]]),Xl={name:"CollectionNode",props:{item:{type:Object,default:()=>{}}},data(){return{children:null,expanded:!1,id:this.$store.getId(`collection-node-${Math.floor(Math.random()*1e12)}`)}},methods:{toggleChildren(){if(this.expanded){this.expanded=!1;return}if(this.children){this.expanded=!0;return}if(this.item.children){this.children=this.item.children,this.expanded=!0;return}this.$store.fetchJson(this.item.id).then(t=>{this.children=t.collections||t.items||t.manifests||[],this.expanded=!0},t=>{const n=t.response&&(t.response.statusText||t.response.data)||t.message;this.$store.addError(`Error loading IIIF manifest: ${n}`),this.children=!1})}}},Yl=["aria-controls","aria-expanded"],Jl={class:"tify-sr-only"},Ql={class:"tify-sr-only"},$l=["id"],ec={key:1,class:"tify-collection-error"};function tc(t,n,e,i,s,r){const a=_r,l=wr,o=Ys("collection-node",!0);return A(),F("li",{class:Te(["tify-collection-item",{"-current":t.$store.manifest&&t.$store.manifest.id===e.item.id}])},[e.item.type==="Collection"?(A(),F("button",{key:0,type:"button","aria-controls":s.id,"aria-expanded":s.expanded?"true":"false",class:"tify-collection-link -has-children",onClick:n[0]||(n[0]=c=>r.toggleChildren())},[s.expanded?(A(),F(ve,{key:0},[ie(a),k("span",Jl,Z(t.$translate("Collapse")),1)],64)):(A(),F(ve,{key:1},[ie(l),k("span",Ql,Z(t.$translate("Expand")),1)],64)),be(" "+Z(t.$store.localize(e.item.label)),1)],8,Yl)):(A(),F("a",{key:1,href:"javascript:;",class:"tify-collection-link",onClick:n[1]||(n[1]=c=>t.$store.loadManifest(e.item["@id"]||e.item.id,{expectedType:e.item.type,reset:!0}))},Z(t.$store.localize(e.item.label)),1)),s.expanded?(A(),F(ve,{key:2},[s.expanded?(A(),F("ol",{key:0,id:s.id,class:"tify-collection-list"},[(A(!0),F(ve,null,Be(s.children,c=>(A(),Ce(o,{key:c.id,item:c},null,8,["item"]))),128))],8,$l)):s.children===!1?(A(),F("p",ec,Z(t.$translate("Could not load child manifest")),1)):se("",!0)],64)):se("",!0)],2)}const ic=ae(Xl,[["render",tc]]),nc={data(){return{filter:""}},computed:{filteredItems(){const t=this.filter.trim().toLowerCase().split(/\s+/);return this.$store.collection.items.filter(n=>{const e=(this.$store.localize(n.label)||"").toLowerCase();return t.every(i=>e.includes(i))})}}},sc={class:"tify-collection",tabindex:"0"},rc={class:"tify-sr-only"},oc={key:0,class:"tify-collection-controls"},ac=["aria-label","placeholder"],lc=["disabled"],cc={key:1,class:"tify-collection-list"},uc={key:2,class:"tify-collection-no-results"};function hc(t,n,e,i,s,r){const a=ic;return A(),F("section",sc,[k("h2",rc,Z(t.$translate("Collection")),1),t.$store.collection.items.length>5?(A(),F("p",oc,[De(k("input",{"onUpdate:modelValue":n[0]||(n[0]=l=>s.filter=l),"aria-label":t.$translate("Filter collection"),class:"tify-collection-filter",placeholder:t.$translate("Filter collection"),type:"text",onKeydown:[n[1]||(n[1]=Ut(_t(l=>s.filter?s.filter="":l.target.blur(),["prevent"]),["esc"])),n[2]||(n[2]=_t(()=>{},["stop"]))]},null,40,ac),[[vr,s.filter]]),k("button",{type:"button",class:"tify-collection-reset",disabled:!s.filter,onClick:n[3]||(n[3]=l=>s.filter="")},Z(t.$translate("Reset")),9,lc)])):se("",!0),r.filteredItems.length?(A(),F("ol",cc,[(A(!0),F(ve,null,Be(r.filteredItems,l=>(A(),Ce(a,{key:l.id,item:l},null,8,["item"]))),128))])):(A(),F("p",uc,Z(t.$translate("No results")),1))])}const fc=ae(nc,[["render",hc]]),dc={},pc={class:"tify-icon",viewBox:"0 0 24 24"},gc=k("path",{d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},null,-1),mc=[gc];function vc(t,n){return A(),F("svg",pc,mc)}const yc=ae(dc,[["render",vc]]),wc={},_c={class:"tify-icon",viewBox:"0 0 24 24"},Tc=k("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1),xc=[Tc];function bc(t,n){return A(),F("svg",_c,xc)}const Sc=ae(wc,[["render",bc]]);var En=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tr={exports:{}};(function(t){(function(n){if(typeof e!="function"){var e=function(x){return x};e.nonNative=!0}const i=e("plaintext"),s=e("html"),r=e("comment"),a=/<(\w*)>/g,l=/<\/?([^\s\/>]+)/;function o(x,E,P){x=x||"",E=E||[],P=P||"";let M=h(E,P);return g(x,M)}function c(x,E){x=x||[],E=E||"";let P=h(x,E);return function(f){return g(f||"",P)}}o.init_streaming_mode=c;function h(x,E){return x=m(x),{allowable_tags:x,tag_replacement:E,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function g(x,E){if(typeof x!="string")throw new TypeError("'html' parameter must be a string");let P=E.allowable_tags,M=E.tag_replacement,f=E.state,_=E.tag_buffer,H=E.depth,L=E.in_quote_char,O="";for(let N=0,G=x.length;N":if(L)break;if(H){H--;break}L="",f=i,_+=">",P.has(T(_))?O+=_:O+=M,_="";break;case'"':case"'":q===L?L="":L=L||q,_+=q;break;case"-":_==="":_.slice(-2)=="--"&&(f=i),_="";break;default:_+=q;break}}return E.state=f,E.tag_buffer=_,E.depth=H,E.in_quote_char=L,O}function m(x){let E=new Set;if(typeof x=="string"){let P;for(;P=a.exec(x);)E.add(P[1])}else!e.nonNative&&typeof x[e.iterator]=="function"?E=new Set(x):typeof x.forEach=="function"&&x.forEach(E.add,E);return E}function T(x){let E=l.exec(x);return E?E[1].toLowerCase():null}t.exports?t.exports=o:n.striptags=o})(En)})(Tr);var Ec=Tr.exports;const Pc=Pn(Ec);function pi(t){const n=["a","b","br","i","img","p","span"],e={a:["href"],img:["alt","src"]};let i=Pc(t,n);const s=/<(\w+)((\s+.+?(\s*=\s*(?:".*?"|'.*?'|.*?|[\^'">\s]+))?)+\s*|\s*)>/g;return i=i.replace(s,(r,a,l)=>{if(!l)return`<${a}>`;const o=/(?:([^\s]+)=(?:"(.*?)"|'(.*?)'))|([^\s]+)/g,c=[];return l.replace(o,(h,g)=>{h!==g&&e[a]&&e[a].includes(g)&&c.push(h)}),c.length>0?`<${a} ${c.join(" ")}>`:`<${a}>`}),i}function ds(t,n){if(!(t instanceof Array)||!n||new Set(t).size!==t.length)return!1;for(let e=0,i=t.length;e0&&t[e]>0&&t[e]<=t[e-1]||t[e]<0||t[e]>n)return!1;return!0}function Cn(t,n=["https:","http:"]){let e;try{e=new URL(t)}catch{return!1}return n.includes(e.protocol)}const Cc={props:{metadata:{type:Array,default:()=>[]}},data(){return{infoItems:[]}},watch:{metadata(){this.updateInfoItems()}},mounted(){this.updateInfoItems()},methods:{cleanLabel(t){const n=t.replace("_"," ");return n.charAt(0).toUpperCase()+n.substr(1)},updateInfoItems(){this.$nextTick(()=>{this.$refs.contents&&this.$refs.contents.forEach((t,n)=>{const e=t.offsetHeight;this.infoItems[n]={collapsed:!0,exceedsHeight:!0},this.$nextTick(()=>{const i=t.offsetHeight,s=e>=i;this.infoItems[n]={collapsed:s,exceedsHeight:s}})})})},filterHtml:pi,isValidUrl:Cn}},Rc={class:"tify-info-metadata"},Lc={class:"tify-info-value"},Hc=["href"],Oc=["innerHTML"],Mc=["onClick"];function Dc(t,n,e,i,s,r){const a=Sc,l=yc;return A(),F("div",Rc,[(A(!0),F(ve,null,Be(e.metadata,(o,c)=>(A(),F("div",{key:c},[k("h4",null,Z(r.cleanLabel(t.$store.localize(o.label))),1),k("div",{ref_for:!0,ref:"contents",class:Te(["tify-info-content",{"-collapsed":s.infoItems[c]&&s.infoItems[c].collapsed}])},[k("div",Lc,[r.isValidUrl(o.value)?(A(),F("p",{key:`url-${c}`},[k("a",{href:o.value},Z(o.value),9,Hc)])):(A(),F("p",{key:`html-${c}`,innerHTML:r.filterHtml(t.$store.localize(o.value))},null,8,Oc))]),s.infoItems[c]&&s.infoItems[c].exceedsHeight?(A(),F("button",{key:0,type:"button",class:"tify-info-toggle",onClick:h=>s.infoItems[c].collapsed=!s.infoItems[c].collapsed},[s.infoItems[c].collapsed?(A(),F(ve,{key:0},[ie(a),be(" "+Z(t.$translate("Expand")),1)],64)):(A(),F(ve,{key:1},[ie(l),be(" "+Z(t.$translate("Collapse")),1)],64))],8,Mc)):se("",!0)],2)]))),128))])}const Ac=ae(Cc,[["render",Dc]]),kc={data(){return{collectionDataShown:!1}},computed:{manifestOrCollection(){return this.collectionDataShown?this.$store.collection:this.$store.manifest||this.$store.collection||{}},homepages(){return this.manifestOrCollection.homepage?[].concat(this.manifestOrCollection.homepage):[]},logos(){var n;let t=this.manifestOrCollection.logo?[].concat(this.manifestOrCollection.logo):[];return(n=this.manifestOrCollection.provider)==null||n.forEach(e=>{e.logo&&(t=t.concat(e.logo))}),t=t.map(e=>{var i,s,r,a;return{id:e.id,link:((s=(i=e.service)==null?void 0:i[0])==null?void 0:s.id)||((a=(r=e.service)==null?void 0:r[0])==null?void 0:a["@id"])}}),t}},methods:{filterHtml:pi,isValidUrl:Cn}},Fc={class:"tify-info",tabindex:"0"},Ic={class:"tify-sr-only"},Bc={key:0,class:"tify-info-header"},zc={key:1,class:"tify-info-section -title"},Nc={key:2,class:"tify-info-section -metadata"},Vc={key:3,class:"tify-info-section -description"},Uc={key:4,class:"tify-info-section -metadata -structure"},jc={key:0,class:"tify-info-structure"},Wc={key:5,class:"tify-info-section -related"},Gc={class:"tify-list"},qc=["href"],Zc=["href"],Kc={key:6,class:"tify-info-section -attribution"},Xc=["innerHTML"],Yc={key:7,class:"tify-info-section -license"},Jc=["href"],Qc={key:8,class:"tify-info-section -logo"},$c=["href"],eu=["src","alt"],tu=["src","alt"];function iu(t,n,e,i,s,r){const a=Ac;return A(),F("section",Fc,[k("h2",Ic,Z(t.$translate("Info")),1),t.$store.collection&&t.$store.manifest?(A(),F("div",Bc,[k("button",{type:"button",class:Te(["tify-info-button",{"-active":!s.collectionDataShown}]),onClick:n[0]||(n[0]=l=>s.collectionDataShown=!1)},Z(t.$translate("Document")),3),k("button",{type:"button",class:Te(["tify-info-button",{"-active":s.collectionDataShown}]),onClick:n[1]||(n[1]=l=>s.collectionDataShown=!0)},Z(t.$translate("Collection")),3)])):se("",!0),r.manifestOrCollection.label?(A(),F("div",zc,[k("h3",null,Z(t.$translate("Title")),1),k("p",null,Z(t.$store.localize(r.manifestOrCollection.label)),1)])):se("",!0),r.manifestOrCollection.metadata&&r.manifestOrCollection.metadata.length?(A(),F("div",Nc,[k("h3",null,Z(t.$translate("Metadata")),1),t.$store.options.view==="info"?(A(),Ce(a,{key:0,metadata:r.manifestOrCollection.metadata},null,8,["metadata"])):se("",!0)])):se("",!0),r.manifestOrCollection.summary?(A(),F("div",Vc,[k("h3",null,Z(t.$translate("Description")),1),t.$store.options.view==="info"?(A(),Ce(a,{key:0,metadata:[{value:r.manifestOrCollection.summary}]},null,8,["metadata"])):se("",!0)])):se("",!0),r.manifestOrCollection.structures&&(t.$store.currentStructure.label||t.$store.currentStructure.metadata)?(A(),F("div",Uc,[k("h3",null,Z(t.$translate("Current Element")),1),t.$store.currentStructure.label?(A(),F("p",jc,Z(t.$store.localize(t.$store.currentStructure.label)),1)):se("",!0),t.$store.options.view==="info"&&t.$store.currentStructure.metadata?(A(),Ce(a,{key:1,class:"tify-info-section -metadata",metadata:t.$store.currentStructure.metadata},null,8,["metadata"])):se("",!0)])):se("",!0),r.homepages.length?(A(),F("div",Wc,[k("h3",null,Z(t.$translate("Related Resources")),1),k("ul",Gc,[(A(!0),F(ve,null,Be(r.homepages,(l,o)=>(A(),F("li",{key:o},[typeof l=="string"?(A(),F("a",{key:0,href:l},Z(l),9,qc)):(A(),F("a",{key:1,href:l.id},Z(t.$store.localize(l.label)||l.id),9,Zc))]))),128))])])):se("",!0),r.manifestOrCollection.requiredStatement?(A(),F("div",Kc,[k("h3",null,Z(t.$store.localize(r.manifestOrCollection.requiredStatement.label)),1),k("p",{innerHTML:r.filterHtml(t.$store.localize(r.manifestOrCollection.requiredStatement.value))},null,8,Xc)])):se("",!0),r.manifestOrCollection.rights?(A(),F("div",Yc,[k("h3",null,Z(t.$translate("License")),1),k("p",null,[k("a",{href:r.manifestOrCollection.rights},Z(r.manifestOrCollection.rights),9,Jc)])])):se("",!0),r.logos.length?(A(),F("div",Qc,[(A(!0),F(ve,null,Be(r.logos,(l,o)=>(A(),F("p",{key:o},[l.link?(A(),F("a",{key:0,href:l.link},[k("img",{class:"tify-info-logo",src:l.id,alt:t.$translate("Logo")},null,8,eu)],8,$c)):(A(),F("img",{key:1,class:"tify-info-logo",src:l.id,alt:t.$translate("Logo")},null,8,tu))]))),128))])):se("",!0)])}const nu=ae(kc,[["render",iu]]),su={name:"TocList",props:{level:{type:Number,default:0},structures:{type:Array,default:()=>[]},purpose:{type:String,default:""}},data(){return{expandedStructures:[],id:this.$store.getId(`toc-list-${Math.floor(Math.random()*1e12)}`)}},methods:{getPageLabel(t){var e;const n=this.getFirstPage(t);return(e=this.$store.manifest.items[n-1])==null?void 0:e.label},getFirstPage(t){if(t.items)return this.getFirstPage(t.items[0]);const n=this.$store.manifest.items.findIndex(e=>e.id===t.id);return n<0?1:n+1},getLastPage(t){if(t.items)return this.getLastPage(t.items.at(-1));const n=this.$store.manifest.items.findLastIndex(e=>e.id===t.id);return n<0?this.$store.manifest.items.length:n+1},isCurrentPageInStructure(t){if(this.$store.manifest.items.filter((s,r)=>this.$store.options.pages.includes(r+1)).map(s=>s.id).some(s=>{var r;return(r=t.items)==null?void 0:r.some(a=>a.id===s)}))return!0;const e=t.firstPage||this.getFirstPage(t),i=t.lastPage||this.getLastPage(t);return this.$store.options.pages.some(s=>s>=e&&s<=i)},setPage(t){this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},toggleAllChildren(t=null){if(this.$refs.children){for(let n=this.structures.length-1;n>=0;n-=1)this.toggleChildren(n,t);this.$refs.children.forEach(n=>{n.toggleAllChildren(t)})}},toggleChildren(t,n=null){var i;(i=this.structures[t].items)!=null&&i.some(s=>s.items)&&(this.expandedStructures[t]=n!==null?n:!this.expandedStructures[t])}}},ru={class:"tify-toc-list"},ou=["data-level"],au=["title","aria-controls","aria-expanded","onClick"],lu=["href"],cu=["onClick"],uu={class:"tify-toc-label"},hu={class:"tify-toc-page"},fu=["onClick"],du={class:"tify-toc-label"};function pu(t,n,e,i,s,r){const a=_r,l=wr,o=Ys("toc-list",!0);return A(),F("ul",ru,[(A(!0),F(ve,null,Be(e.structures,(c,h)=>{var g,m;return A(),F("li",{key:h,class:Te(["tify-toc-structure",{"-current":r.isCurrentPageInStructure(c),"-expanded":s.expandedStructures[h]}]),"data-level":e.level},[(g=c.items)!=null&&g.some(T=>T.items)?(A(),F("button",{key:0,type:"button",class:"tify-toc-toggle",title:t.$translate(s.expandedStructures[h]?"Collapse":"Expand"),"aria-controls":`${s.id}-${h}`,"aria-expanded":s.expandedStructures[h]?"true":"false",onClick:T=>r.toggleChildren(h)},[s.expandedStructures[h]?(A(),Ce(a,{key:0})):(A(),Ce(l,{key:1}))],8,au)):se("",!0),e.purpose==="pdf"&&c.pageCount?(A(),F("a",{key:1,class:"tify-toc-link",href:c.rendering[0].id,download:""},Z(t.$store.localize(c.label))+" ("+Z(c.pageCount)+" "+Z(t.$translate(c.pageCount===1?"page":"pages"))+") ",9,lu)):t.$store.localize(c.label)!==t.$store.localize(r.getPageLabel(c))?(A(),F("a",{key:2,class:"tify-toc-link -dots",href:"javascript:;",onClick:T=>t.$store.setPage(c.firstPage||r.getFirstPage(c))},[k("span",uu,Z(t.$store.localize(c.label)),1),k("span",hu,Z(t.$store.localize(r.getPageLabel(c))||"—"),1)],8,cu)):(A(),F("a",{key:3,class:"tify-toc-link",href:"javascript:;",onClick:T=>t.$store.setPage(c.firstPage||r.getFirstPage(c))},[k("span",du,Z(t.$store.localize(c.label)),1)],8,fu)),(m=c.items)!=null&&m.some(T=>T.items)?De((A(),Ce(o,{key:4,id:`${s.id}-${h}`,ref_for:!0,ref:"children",level:e.level+1,purpose:e.purpose,structures:c.items},null,8,["id","level","purpose","structures"])),[[Ze,s.expandedStructures[h]]]):se("",!0)],10,ou)}),128))])}const xr=ae(su,[["render",pu]]),gu={data(){return{otherItems:[],perElementPdfLinksVisible:!1}},computed:{hasElementPdfLinks(){return!(this.$store.manifest.structures instanceof Array)||!this.$store.manifest.structures[0]||!this.$store.manifest.structures[0].rendering?!1:this.$store.manifest.structures[0].rendering.some(n=>n.format&&n.format==="application/pdf")},imageUrls(){const t={};return this.$store.options.pages.forEach(n=>{var i,s;if(!n)return;const e=(s=(i=this.$store.manifest.items[n-1].items)==null?void 0:i[0].items)==null?void 0:s[0].body;if(e!=null&&e.service){const r=e.service instanceof Array?e.service[0]:e.service,a=["ImageService2","ImageService3"].includes(r.type)?"default":"native",l=r.id||r["@id"];t[n]=`${l}${l.at(-1)==="/"?"":"/"}full/full/0/${a}.jpg`}else t[n]=e.id}),t},pages(){return this.$store.options.pages.filter(t=>t>0)},renderings(){return this.$store.manifest.rendering?[].concat(this.$store.manifest.rendering):[]}}},mu={class:"tify-export",tabindex:"0"},vu={class:"tify-sr-only"},yu={class:"tify-export-section -links"},wu={class:"tify-list"},_u=["href","download"],Tu={key:0,class:"tify-export-section -renderings"},xu={class:"tify-list"},bu=["href"],Su={key:0,class:"tify-export-container"},Eu=["aria-controls","aria-expanded"],Pu={class:"tify-sr-only"},Cu=["id"],Ru={class:"tify-export-section -iiif"},Lu=k("h3",null,"IIIF",-1),Hu={class:"tify-list"},Ou={key:0},Mu=["href"],Du=["href"],Au={key:1,class:"tify-export-section -other"},ku={class:"tify-list"},Fu=["href"];function Iu(t,n,e,i,s,r){var o;const a=yr,l=xr;return A(),F("section",mu,[k("h2",vu,Z(t.$translate("Export")),1),k("div",yu,[k("h3",null,Z(t.$translate("Download Individual Images")),1),k("ul",wu,[(A(!0),F(ve,null,Be(r.pages,c=>(A(),F("li",{key:c},[k("a",{href:r.imageUrls[c],download:`${c}.jpg`},Z(t.$translate("Page"))+" "+Z(t.$store.getPageLabel(c,t.$store.localize(t.$store.manifest.items[c-1].label))),9,_u)]))),128))])]),t.$store.manifest.rendering?(A(),F("div",Tu,[k("h3",null,Z(t.$translate("Renderings")),1),k("ul",xu,[(A(!0),F(ve,null,Be(r.renderings,c=>(A(),F("li",{key:c.id},[k("a",{href:c.id},Z(t.$store.localize(c.label)),9,bu)]))),128))]),r.hasElementPdfLinks?(A(),F("div",Su,[k("button",{type:"button",class:Te(["tify-export-toggle",{"-close":s.perElementPdfLinksVisible}]),"aria-controls":t.$store.getId("export-pdf-list"),"aria-expanded":s.perElementPdfLinksVisible?"true":"false",onClick:n[0]||(n[0]=c=>s.perElementPdfLinksVisible=!s.perElementPdfLinksVisible)},[s.perElementPdfLinksVisible?(A(),F(ve,{key:1},[ie(a),k("span",Pu,Z(t.$translate("Close PDF list")),1)],64)):(A(),F(ve,{key:0},[be(Z(t.$translate("PDFs for each element")),1)],64))],10,Eu),s.perElementPdfLinksVisible?(A(),F("div",{key:0,id:t.$store.getId("export-pdf-list"),class:"tify-export-toc"},[k("h4",null,Z(t.$translate("PDFs for each element")),1),ie(l,{ref:"children",purpose:"pdf",level:0,structures:t.$store.structures},null,8,["structures"])],8,Cu)):se("",!0)])):se("",!0)])):se("",!0),k("div",Ru,[Lu,k("ul",Hu,[t.$store.options.childManifestUrl?(A(),F("li",Ou,[k("a",{href:t.$store.options.childManifestUrl,download:"manifest.json"},Z(t.$translate("IIIF manifest (current document)")),9,Mu)])):se("",!0),k("li",null,[k("a",{href:t.$store.options.manifestUrl,download:"manifest.json"},Z(t.$translate(t.$store.collection?"IIIF manifest (collection)":"IIIF manifest")),9,Du)])])]),(o=t.$store.manifest.seeAlso)!=null&&o.length?(A(),F("div",Au,[k("h3",null,Z(t.$translate("Other Formats")),1),k("ul",ku,[(A(!0),F(ve,null,Be(t.$store.manifest.seeAlso,c=>(A(),F("li",{key:c.id},[k("a",{href:c.id,download:""},Z(c.label?t.$store.localize(c.label):c.id),9,Fu)]))),128))])])):se("",!0)])}const Bu=ae(gu,[["render",Iu]]);function gi(t,n,e=120){const i=t,s=e===!0?120:e;if(!s||s<0){i.scrollTop=n;return}const a=(n-t.scrollTop)/s/.1;setTimeout(()=>{i.scrollTop+=a,i.scrollTop!==n&&gi(i,n,s-10)},10)}function en(t,n,e=!0){const i=n.querySelectorAll(t);if(!i.length)return;let s=i[0];const r=i[i.length-1];Array.prototype.forEach.call(i,c=>{c.dataset.level>=s.dataset.level&&(s=c)});const a=n.getBoundingClientRect(),l=s.getBoundingClientRect(),o=r.getBoundingClientRect();if(l.topa.bottom){const c=o.bottom-a.bottom+n.scrollTop;gi(n,c+50,e)}}const ps=".tify-toc-structure.-current",zu={data(){return{isInited:!1}},computed:{isNested(){return this.tocStructures.some(t=>{var n;return(n=t.items)==null?void 0:n.some(e=>e.items)})},tocStructures(){return this.$store.structures.filter(t=>{var n;return!((n=t.behavior)!=null&&n.includes("top"))})}},watch:{"$store.options.pages":function(){this.$nextTick(()=>en(ps,this.$el))},"$store.options.view":{handler(t){t==="toc"&&this.$nextTick(this.init)},immediate:!0}},methods:{init(){this.isInited=!0,this.$nextTick(()=>en(ps,this.$el,!1))}}},Nu={class:"tify-toc",tabindex:"0"},Vu={class:"tify-sr-only"},Uu={key:0,class:"tify-toc-header"};function ju(t,n,e,i,s,r){const a=xr;return A(),F("section",Nu,[k("h2",Vu,Z(t.$translate("Table of Contents")),1),r.isNested?(A(),F("div",Uu,[k("button",{type:"button",class:"tify-toc-toggle-all",onClick:n[0]||(n[0]=l=>t.$refs.children.toggleAllChildren(!0))},Z(t.$translate("Expand all")),1),k("button",{type:"button",class:"tify-toc-toggle-all",onClick:n[1]||(n[1]=l=>t.$refs.children.toggleAllChildren(!1))},Z(t.$translate("Collapse all")),1)])):se("",!0),s.isInited?(A(),Ce(a,{key:1,ref:"children",level:0,structures:r.tocStructures},null,8,["structures"])):se("",!0)])}const Wu=ae(zu,[["render",ju]]),Gu=750,qu={data(){return{itemHeight:0,itemVMargin:0,items:[{label:""}],itemsPerRow:0,knownImages:[],lastScrollTop:0,resizeTimeout:null,style:{},thumbnailWidth:0,touchTimeout:null}},watch:{"$store.options.pages":function(t){this.$nextTick(()=>{const n=".tify-thumbnails-item.-current";t.length>2||t.length>1&&t[1]!==t[0]+1||(this.$refs.container.querySelector(n)?en(n,this.$el):this.scrollToCurrentPage())})},"$store.options.view":{handler(t){t==="thumbnails"&&this.$nextTick(this.init)},immediate:!0}},mounted(){this.style.flex=this.$el.style.flex},methods:{init(){this.updateDimensions(),this.scrollToCurrentPage(!1),new ResizeObserver(this.onResize).observe(this.$el)},onResize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.$store.options.view==="thumbnails"&&this.updateDimensions()},200)},updateDimensions(){const t=this.$refs.container.querySelector(".tify-thumbnails-item"),n=t.currentStyle||window.getComputedStyle(t),e=parseInt(n.marginTop,10)+parseFloat(n.marginBottom,10);this.itemHeight=t.offsetHeight+e,this.itemVerticalMargin=e;const i=parseInt(n.marginLeft,10)+parseFloat(n.marginRight,10),s=t.offsetWidth+i;this.thumbnailWidth=t.offsetWidth,this.itemsPerRow=Math.floor(this.$refs.container.clientWidth/s);const a=Math.ceil(this.$store.manifest.items.length/this.itemsPerRow)*this.itemHeight;this.$refs.container.style.height=`${a}px`,this.redrawThumbnails(),this.scrollToCurrentPage(!1)},redrawThumbnails(){const t=this.$el.scrollTop,n=Math.floor(t/this.itemHeight)*this.itemsPerRow+1,i=Math.ceil(this.$el.offsetHeight/this.itemHeight)*this.itemsPerRow,s=n+this.itemsPerRow+i,r=Math.min(this.$store.manifest.items.length,s),a=[];for(let l=n-1;l{const l=Math.floor(n/this.itemsPerRow);this.$refs.container.style.paddingTop=`${l*this.itemHeight}px`})},scrollToCurrentPage(t=!0){const e=Math.floor((this.$store.options.pages[0]-1)/this.itemsPerRow)*this.itemHeight+(this.itemVMargin-50);t?gi(this.$el,e):this.$el.scrollTop=e},setPageAndSwitchView(t,n=!1){if(n){const e=this.$store.options.pages.slice(0),i=e.indexOf(t);i<0?(e.push(t),e.sort((s,r)=>s-r),e[0]===0&&e.shift()):e.length>1&&e.splice(i,1),this.$store.updateOptions({pages:e});return}this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},touchStartTogglePage(t){this.lastScrollTop=this.$el.scrollTop,this.touchTimeout=setTimeout(()=>{this.$el.scrollTop===this.lastScrollTop&&this.setPageAndSwitchView(t,!0)},Gu)},touchEnd(){clearTimeout(this.touchTimeout)}}},Zu={class:"tify-sr-only"},Ku={ref:"container",class:"tify-thumbnails-list"},Xu=["onClick","onTouchstart"],Yu=["src"],Ju={class:"tify-thumbnails-page"};function Qu(t,n,e,i,s,r){return A(),F("section",{class:"tify-thumbnails",tabindex:"0",onScroll:n[1]||(n[1]=(...a)=>r.redrawThumbnails&&r.redrawThumbnails(...a))},[k("h2",Zu,Z(t.$translate("Pages")),1),k("div",Ku,[(A(!0),F(ve,null,Be(s.items,a=>(A(),F("a",{key:a.page,class:Te(["tify-thumbnails-item",{"-current":t.$store.options.pages.includes(a.page)}]),href:"javascript:;",onClick:_t(l=>r.setPageAndSwitchView(a.page,l.ctrlKey),["prevent"]),onTouchstart:l=>r.touchStartTogglePage(a.page),onTouchend:n[0]||(n[0]=(...l)=>r.touchEnd&&r.touchEnd(...l))},[k("img",{alt:"",src:a.imgUrl},null,8,Yu),k("span",Ju,Z(t.$store.getPageLabel(a.page,a.label)),1)],42,Xu))),128))],512)],32)}const $u=ae(qu,[["render",Qu]]),eh={data(){return{fulltextAvailable:null,fulltexts:[]}},computed:{pages(){return this.$store.options.pages.filter(t=>!!t)}},watch:{"$store.options.pages":function(){this.loadFulltexts()}},mounted(){this.loadFulltexts()},methods:{loadFulltexts(){this.fulltextAvailable=null,this.fulltexts=[],this.$store.options.pages.forEach(t=>{if(t<1||this.fulltexts[t])return;const n=this.$store.manifest.items[t-1];if(!("annotations"in n)){this.fulltextAvailable=!1;return}const e=n.annotations[0].id;this.$store.fetchJson(e).then(i=>{const{resources:s}=i;s instanceof Array&&s.forEach((r,a)=>{const l=r.resource;if(l)if(this.fulltexts[t]||(this.fulltexts[t]=[]),l&&l.chars){const o=pi(l.chars);o&&(this.fulltextAvailable=!0),this.fulltexts[t][a]=o}else(l.id||l["@id"])&&this.loadRemoteFulltext(t,a,l.id||l["@id"])})},i=>{const s=i.response?i.response.statusText:i.message;console.warn(`Could not load annotations: ${s}`),this.fulltextAvailable=!1})})},loadRemoteFulltext(t,n,e){Cn(e)&&this.$store.fetchText(e).then(i=>{const s=pi(i);s&&(this.fulltextAvailable=!0),this.fulltexts[t]||(this.fulltexts[t]=[]),this.fulltexts[t][n]=s},i=>{const s=i.response?i.response.statusText:i.message;console.warn(`Could not load fulltext: ${s}`)})}}},th={class:"tify-fulltext",tabindex:"0"},ih={class:"tify-sr-only"},nh={key:0,class:"tify-fulltext-texts"},sh=["innerHTML"],rh={key:1,class:"tify-fulltext-none"};function oh(t,n,e,i,s,r){return A(),F("section",th,[k("h2",ih,Z(t.$translate("Fulltext")),1),s.fulltextAvailable!==!1?(A(),F("div",nh,[(A(!0),F(ve,null,Be(r.pages,a=>(A(),F("div",{key:a,class:"tify-fulltext-page"},[k("h3",null,Z(t.$translate("Page"))+" "+Z(t.$store.getPageLabel(a,t.$store.localize(t.$store.manifest.items[a-1].label))),1),(A(!0),F(ve,null,Be(s.fulltexts[a],(l,o)=>(A(),F("div",{key:`${a}-${o}`,class:"tify-fulltext-text",innerHTML:l},null,8,sh))),128))]))),128))])):(A(),F("p",rh,Z(t.$translate("Fulltext not available for this page")),1))])}const ah=ae(eh,[["render",oh]]),lh={},ch={class:"tify-icon",viewBox:"0 0 24 24"},uh=k("path",{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"},null,-1),hh=[uh];function fh(t,n){return A(),F("svg",ch,hh)}const dh=ae(lh,[["render",fh]]),ph={},gh={class:"tify-icon",viewBox:"0 0 24 24"},mh=k("path",{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"},null,-1),vh=[mh];function yh(t,n){return A(),F("svg",gh,vh)}const wh=ae(ph,[["render",yh]]),_h={},Th={class:"tify-icon",viewBox:"0 0 24 24"},xh=k("path",{d:"M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"},null,-1),bh=[xh];function Sh(t,n){return A(),F("svg",Th,bh)}const Eh=ae(_h,[["render",Sh]]),Ph={},Ch={class:"tify-icon",viewBox:"0 0 24 24"},Rh=k("path",{d:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"},null,-1),Lh=[Rh];function Hh(t,n){return A(),F("svg",Ch,Lh)}const Oh=ae(Ph,[["render",Hh]]),Mh={},Dh={class:"tify-icon",viewBox:"0 0 24 24"},Ah=k("path",{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"},null,-1),kh=[Ah];function Fh(t,n){return A(),F("svg",Dh,kh)}const Ih=ae(Mh,[["render",Fh]]),Bh={},zh={class:"tify-icon",viewBox:"0 0 24 24"},Nh=k("path",{d:"M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z"},null,-1),Vh=[Nh];function Uh(t,n){return A(),F("svg",zh,Vh)}const jh=ae(Bh,[["render",Uh]]),Wh={},Gh={class:"tify-icon",viewBox:"0 0 24 24"},qh=k("path",{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M5,8V10H13V8H5Z"},null,-1),Zh=[qh];function Kh(t,n){return A(),F("svg",Gh,Zh)}const Xh=ae(Wh,[["render",Kh]]),Yh={},Jh={class:"tify-icon",viewBox:"0 0 24 24"},Qh=k("path",{d:"M19,12H17V15H14V17H19V12M7,9H10V7H5V12H7V9M21,3H3A2,2 0 0,0 1,5V19A2,2 0 0,0 3,21H21A2,2 0 0,0 23,19V5A2,2 0 0,0 21,3M21,19H3V5H21V19Z"},null,-1),$h=[Qh];function ef(t,n){return A(),F("svg",Jh,$h)}const tf=ae(Yh,[["render",ef]]),nf={},sf={class:"tify-icon",viewBox:"0 0 24 24"},rf=k("path",{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M8,5V8H5V10H8V13H10V10H13V8H10V5H8Z"},null,-1),of=[rf];function af(t,n){return A(),F("svg",sf,of)}const lf=ae(nf,[["render",af]]),cf={},uf={class:"tify-icon",viewBox:"0 0 24 24"},hf=k("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},null,-1),ff=[hf];function df(t,n){return A(),F("svg",uf,ff)}const br=ae(cf,[["render",df]]),pf={},gf={class:"tify-icon",viewBox:"0 0 24 24"},mf=k("path",{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},null,-1),vf=[mf];function yf(t,n){return A(),F("svg",gf,vf)}const Sr=ae(pf,[["render",yf]]);var Er={exports:{}};(function(t,n){(function(e,i){t.exports=i()})(En,function(){var e="__v-click-outside",i=typeof window<"u",s=typeof navigator<"u",r=i&&("ontouchstart"in window||s&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],a=function(h){var g=h.event,m=h.handler;(0,h.middleware)(g)&&m(g)},l=function(h,g){var m=function(f){var _=typeof f=="function";if(!_&&typeof f!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:_?f:f.handler,middleware:f.middleware||function(H){return H},events:f.events||r,isActive:f.isActive!==!1,detectIframe:f.detectIframe!==!1,capture:!!f.capture}}(g.value),T=m.handler,x=m.middleware,E=m.detectIframe,P=m.capture;if(m.isActive){if(h[e]=m.events.map(function(f){return{event:f,srcTarget:document.documentElement,handler:function(_){return function(H){var L=H.el,O=H.event,N=H.handler,G=H.middleware,q=O.path||O.composedPath&&O.composedPath();(q?q.indexOf(L)<0:!L.contains(O.target))&&a({event:O,handler:N,middleware:G})}({el:h,event:_,handler:T,middleware:x})},capture:P}}),E){var M={event:"blur",srcTarget:window,handler:function(f){return function(_){var H=_.el,L=_.event,O=_.handler,N=_.middleware;setTimeout(function(){var G=document.activeElement;G&&G.tagName==="IFRAME"&&!H.contains(G)&&a({event:L,handler:O,middleware:N})},0)}({el:h,event:f,handler:T,middleware:x})},capture:P};h[e]=[].concat(h[e],[M])}h[e].forEach(function(f){var _=f.event,H=f.srcTarget,L=f.handler;return setTimeout(function(){h[e]&&H.addEventListener(_,L,P)},0)})}},o=function(h){(h[e]||[]).forEach(function(g){return g.srcTarget.removeEventListener(g.event,g.handler,g.capture)}),delete h[e]},c=i?{beforeMount:l,updated:function(h,g){var m=g.value,T=g.oldValue;JSON.stringify(m)!==JSON.stringify(T)&&(o(h),l(h,{value:m}))},unmounted:o}:{};return{install:function(h){h.directive("click-outside",c)},directive:c}})})(Er);var wf=Er.exports;const Rn=Pn(wf);var Pr={exports:{}};(function(t){//! openseadragon 3.0.0
+**/const Ga="http://www.w3.org/2000/svg",qa="http://www.w3.org/1998/Math/MathML",ut=typeof document<"u"?document:null,ns=ut&&ut.createElement("template"),Za={insert:(t,n,e)=>{n.insertBefore(t,e||null)},remove:t=>{const n=t.parentNode;n&&n.removeChild(t)},createElement:(t,n,e,i)=>{const s=n==="svg"?ut.createElementNS(Ga,t):n==="mathml"?ut.createElementNS(qa,t):ut.createElement(t,e?{is:e}:void 0);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>ut.createTextNode(t),createComment:t=>ut.createComment(t),setText:(t,n)=>{t.nodeValue=n},setElementText:(t,n)=>{t.textContent=n},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ut.querySelector(t),setScopeId(t,n){t.setAttribute(n,"")},insertStaticContent(t,n,e,i,s,r){const a=e?e.previousSibling:n.lastChild;if(s&&(s===r||s.nextSibling))for(;n.insertBefore(s.cloneNode(!0),e),!(s===r||!(s=s.nextSibling)););else{ns.innerHTML=i==="svg"?``:i==="mathml"?``:t;const l=ns.content;if(i==="svg"||i==="mathml"){const o=l.firstChild;for(;o.firstChild;)l.appendChild(o.firstChild);l.removeChild(o)}n.insertBefore(l,e)}return[a?a.nextSibling:n.firstChild,e?e.previousSibling:n.lastChild]}},Ka=Symbol("_vtc");function Xa(t,n,e){const i=t[Ka];i&&(n=(n?[n,...i]:[...i]).join(" ")),n==null?t.removeAttribute("class"):e?t.setAttribute("class",n):t.className=n}const di=Symbol("_vod"),mr=Symbol("_vsh"),Ze={beforeMount(t,{value:n},{transition:e}){t[di]=t.style.display==="none"?"":t.style.display,e&&n?e.beforeEnter(t):Nt(t,n)},mounted(t,{value:n},{transition:e}){e&&n&&e.enter(t)},updated(t,{value:n,oldValue:e},{transition:i}){!n!=!e&&(i?n?(i.beforeEnter(t),Nt(t,!0),i.enter(t)):i.leave(t,()=>{Nt(t,!1)}):Nt(t,n))},beforeUnmount(t,{value:n}){Nt(t,n)}};function Nt(t,n){t.style.display=n?t[di]:"none",t[mr]=!n}const Ya=Symbol(""),Ja=/(^|;)\s*display\s*:/;function Qa(t,n,e){const i=t.style,s=Se(e);let r=!1;if(e&&!s){if(n)if(Se(n))for(const a of n.split(";")){const l=a.slice(0,a.indexOf(":")).trim();e[l]==null&&li(i,l,"")}else for(const a in n)e[a]==null&&li(i,a,"");for(const a in e)a==="display"&&(r=!0),li(i,a,e[a])}else if(s){if(n!==e){const a=i[Ya];a&&(e+=";"+a),i.cssText=e,r=Ja.test(e)}}else n&&t.removeAttribute("style");di in t&&(t[di]=r?i.display:"",t[mr]&&(i.display="none"))}const ss=/\s*!important$/;function li(t,n,e){if(ue(e))e.forEach(i=>li(t,n,i));else if(e==null&&(e=""),n.startsWith("--"))t.setProperty(n,e);else{const i=$a(t,n);ss.test(e)?t.setProperty(Pt(i),e.replace(ss,""),"important"):t[i]=e}}const rs=["Webkit","Moz","ms"],Ii={};function $a(t,n){const e=Ii[n];if(e)return e;let i=Ye(n);if(i!=="filter"&&i in t)return Ii[n]=i;i=wi(i);for(let s=0;sBi||(rl.then(()=>Bi=0),Bi=Date.now());function al(t,n){const e=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=e.attached)return;Ge(ll(i,e.value),n,5,[i])};return e.value=t,e.attached=ol(),e}function ll(t,n){if(ue(n)){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{e.call(t),t._stopped=!0},n.map(i=>s=>!s._stopped&&i&&i(s))}else return n}const cs=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,cl=(t,n,e,i,s,r,a,l,o)=>{const c=s==="svg";n==="class"?Xa(t,i,c):n==="style"?Qa(t,e,i):mi(n)?an(n)||nl(t,n,e,i,a):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):ul(t,n,i,c))?tl(t,n,i,r,a,l,o):(n==="true-value"?t._trueValue=i:n==="false-value"&&(t._falseValue=i),el(t,n,i,c))};function ul(t,n,e,i){if(i)return!!(n==="innerHTML"||n==="textContent"||n in t&&cs(n)&&de(e));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="form"||n==="list"&&t.tagName==="INPUT"||n==="type"&&t.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return cs(n)&&Se(e)?!1:n in t}const us=t=>{const n=t.props["onUpdate:modelValue"]||!1;return ue(n)?e=>si(n,e):n};function hl(t){t.target.composing=!0}function hs(t){const n=t.target;n.composing&&(n.composing=!1,n.dispatchEvent(new Event("input")))}const zi=Symbol("_assign"),vr={created(t,{modifiers:{lazy:n,trim:e,number:i}},s){t[zi]=us(s);const r=i||s.props&&s.props.type==="number";Mt(t,n?"change":"input",a=>{if(a.target.composing)return;let l=t.value;e&&(l=l.trim()),r&&(l=Ni(l)),t[zi](l)}),e&&Mt(t,"change",()=>{t.value=t.value.trim()}),n||(Mt(t,"compositionstart",hl),Mt(t,"compositionend",hs),Mt(t,"change",hs))},mounted(t,{value:n}){t.value=n??""},beforeUpdate(t,{value:n,modifiers:{lazy:e,trim:i,number:s}},r){if(t[zi]=us(r),t.composing)return;const a=s||t.type==="number"?Ni(t.value):t.value,l=n??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(e||i&&t.value.trim()===l)||(t.value=l))}},fl=["ctrl","shift","alt","meta"],dl={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,n)=>fl.some(e=>t[`${e}Key`]&&!n.includes(e))},_t=(t,n)=>{const e=t._withMods||(t._withMods={}),i=n.join(".");return e[i]||(e[i]=(s,...r)=>{for(let a=0;a{const e=t._withKeys||(t._withKeys={}),i=n.join(".");return e[i]||(e[i]=s=>{if(!("key"in s))return;const r=Pt(s.key);if(n.some(a=>a===r||pl[a]===r))return t(s)})},gl=Oe({patchProp:cl},Za);let fs;function ml(){return fs||(fs=Ea(gl))}const vl=(...t)=>{const n=ml().createApp(...t),{mount:e}=n;return n.mount=i=>{const s=wl(i);if(!s)return;const r=n._component;!de(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.innerHTML="";const a=e(s,!1,yl(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),a},n};function yl(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function wl(t){return Se(t)?document.querySelector(t):t}const ae=(t,n)=>{const e=t.__vccOpts||t;for(const[i,s]of n)e[i]=s;return e},_l={},Tl={class:"tify-icon",viewBox:"0 0 24 24"},xl=k("path",{d:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},null,-1),bl=[xl];function Sl(t,n){return A(),F("svg",Tl,bl)}const yr=ae(_l,[["render",Sl]]);var El={version:"0.30.1",license:"AGPL-3.0",bugsUrl:"https://github.com/tify-iiif-viewer/tify/issues",contributorsUrl:"https://github.com/tify-iiif-viewer/tify/blob/v0.30.1/CONTRIBUTORS.md",docsUrl:"https://github.com/tify-iiif-viewer/tify/blob/v0.30.1/doc",docsLanguages:["de","en"],repositoryUrl:"https://github.com/tify-iiif-viewer/tify"};const Pl={computed:{copyrightHtml(){return'Copyright © 2017–2022 Göttingen University / Göttingen State and University Library'},env(){return El},infoHtml(){return'TIFY is a slim and mobile-friendly IIIF document viewer, released under the GNU Affero General Public License 3.0.'},userGuideUrl(){const t=this.env.docsLanguages.includes(this.$store.options.language)?this.$store.options.language:"en";return`${this.env.docsUrl}/user-guide.${t}.md`}}},Cl={class:"tify-help",tabindex:"0"},Rl={class:"tify-sr-only"},Ll=["innerHTML"],Hl={class:"tify-list"},Ol=["href"],Ml=["href"],Dl=["href"],Al=["href"],kl={class:"tify-help-footer"},Fl=["innerHTML"];function Il(t,n,e,i,s,r){return A(),F("section",Cl,[k("h2",Rl,Z(t.$translate("Help")),1),k("h3",null,Z(t.$translate("About TIFY")),1),k("p",{innerHTML:t.$translate("$info",r.infoHtml)},null,8,Ll),k("ul",Hl,[k("li",null,[k("a",{href:r.userGuideUrl},Z(t.$translate("User guide")),9,Ol)]),k("li",null,[k("a",{href:r.env.repositoryUrl},Z(t.$translate("Source code")),9,Ml)]),k("li",null,[k("a",{href:r.env.contributorsUrl},Z(t.$translate("Contributors")),9,Dl)]),k("li",null,[k("a",{href:r.env.bugsUrl},Z(t.$translate("Report a bug")),9,Al)])]),k("footer",kl,[k("p",null,[be(Z(t.$translate("Version"))+" ",1),k("b",null,Z(r.env.version),1),be(" · "),k("span",{innerHTML:t.$translate("$copyright",r.copyrightHtml)},null,8,Fl)])])])}const Bl=ae(Pl,[["render",Il]]),zl={},Nl={class:"tify-icon",viewBox:"0 0 24 24"},Vl=k("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"},null,-1),Ul=[Vl];function jl(t,n){return A(),F("svg",Nl,Ul)}const wr=ae(zl,[["render",jl]]),Wl={},Gl={class:"tify-icon",viewBox:"0 0 24 24"},ql=k("path",{d:"M19,13H5V11H19V13Z"},null,-1),Zl=[ql];function Kl(t,n){return A(),F("svg",Gl,Zl)}const _r=ae(Wl,[["render",Kl]]),Xl={name:"CollectionNode",props:{item:{type:Object,default:()=>{}}},data(){return{children:null,expanded:!1,id:this.$store.getId(`collection-node-${Math.floor(Math.random()*1e12)}`)}},methods:{toggleChildren(){if(this.expanded){this.expanded=!1;return}if(this.children){this.expanded=!0;return}if(this.item.children){this.children=this.item.children,this.expanded=!0;return}this.$store.fetchJson(this.item.id).then(t=>{this.children=t.collections||t.items||t.manifests||[],this.expanded=!0},t=>{const n=t.response&&(t.response.statusText||t.response.data)||t.message;this.$store.addError(`Error loading IIIF manifest: ${n}`),this.children=!1})}}},Yl=["aria-controls","aria-expanded"],Jl={class:"tify-sr-only"},Ql={class:"tify-sr-only"},$l=["id"],ec={key:1,class:"tify-collection-error"};function tc(t,n,e,i,s,r){const a=_r,l=wr,o=Ys("collection-node",!0);return A(),F("li",{class:Te(["tify-collection-item",{"-current":t.$store.manifest&&t.$store.manifest.id===e.item.id}])},[e.item.type==="Collection"?(A(),F("button",{key:0,type:"button","aria-controls":s.id,"aria-expanded":s.expanded?"true":"false",class:"tify-collection-link -has-children",onClick:n[0]||(n[0]=c=>r.toggleChildren())},[s.expanded?(A(),F(ve,{key:0},[ie(a),k("span",Jl,Z(t.$translate("Collapse")),1)],64)):(A(),F(ve,{key:1},[ie(l),k("span",Ql,Z(t.$translate("Expand")),1)],64)),be(" "+Z(t.$store.localize(e.item.label)),1)],8,Yl)):(A(),F("a",{key:1,href:"javascript:;",class:"tify-collection-link",onClick:n[1]||(n[1]=c=>t.$store.loadManifest(e.item["@id"]||e.item.id,{expectedType:e.item.type,reset:!0}))},Z(t.$store.localize(e.item.label)),1)),s.expanded?(A(),F(ve,{key:2},[s.expanded?(A(),F("ol",{key:0,id:s.id,class:"tify-collection-list"},[(A(!0),F(ve,null,Be(s.children,c=>(A(),Ce(o,{key:c.id,item:c},null,8,["item"]))),128))],8,$l)):s.children===!1?(A(),F("p",ec,Z(t.$translate("Could not load child manifest")),1)):se("",!0)],64)):se("",!0)],2)}const ic=ae(Xl,[["render",tc]]),nc={data(){return{filter:""}},computed:{filteredItems(){const t=this.filter.trim().toLowerCase().split(/\s+/);return this.$store.collection.items.filter(n=>{const e=(this.$store.localize(n.label)||"").toLowerCase();return t.every(i=>e.includes(i))})}}},sc={class:"tify-collection",tabindex:"0"},rc={class:"tify-sr-only"},oc={key:0,class:"tify-collection-controls"},ac=["aria-label","placeholder"],lc=["disabled"],cc={key:1,class:"tify-collection-list"},uc={key:2,class:"tify-collection-no-results"};function hc(t,n,e,i,s,r){const a=ic;return A(),F("section",sc,[k("h2",rc,Z(t.$translate("Collection")),1),t.$store.collection.items.length>5?(A(),F("p",oc,[De(k("input",{"onUpdate:modelValue":n[0]||(n[0]=l=>s.filter=l),"aria-label":t.$translate("Filter collection"),class:"tify-collection-filter",placeholder:t.$translate("Filter collection"),type:"text",onKeydown:[n[1]||(n[1]=Ut(_t(l=>s.filter?s.filter="":l.target.blur(),["prevent"]),["esc"])),n[2]||(n[2]=_t(()=>{},["stop"]))]},null,40,ac),[[vr,s.filter]]),k("button",{type:"button",class:"tify-collection-reset",disabled:!s.filter,onClick:n[3]||(n[3]=l=>s.filter="")},Z(t.$translate("Reset")),9,lc)])):se("",!0),r.filteredItems.length?(A(),F("ol",cc,[(A(!0),F(ve,null,Be(r.filteredItems,l=>(A(),Ce(a,{key:l.id,item:l},null,8,["item"]))),128))])):(A(),F("p",uc,Z(t.$translate("No results")),1))])}const fc=ae(nc,[["render",hc]]),dc={},pc={class:"tify-icon",viewBox:"0 0 24 24"},gc=k("path",{d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},null,-1),mc=[gc];function vc(t,n){return A(),F("svg",pc,mc)}const yc=ae(dc,[["render",vc]]),wc={},_c={class:"tify-icon",viewBox:"0 0 24 24"},Tc=k("path",{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},null,-1),xc=[Tc];function bc(t,n){return A(),F("svg",_c,xc)}const Sc=ae(wc,[["render",bc]]);var En=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tr={exports:{}};(function(t){(function(n){if(typeof e!="function"){var e=function(x){return x};e.nonNative=!0}const i=e("plaintext"),s=e("html"),r=e("comment"),a=/<(\w*)>/g,l=/<\/?([^\s\/>]+)/;function o(x,E,P){x=x||"",E=E||[],P=P||"";let M=h(E,P);return g(x,M)}function c(x,E){x=x||[],E=E||"";let P=h(x,E);return function(f){return g(f||"",P)}}o.init_streaming_mode=c;function h(x,E){return x=m(x),{allowable_tags:x,tag_replacement:E,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function g(x,E){if(typeof x!="string")throw new TypeError("'html' parameter must be a string");let P=E.allowable_tags,M=E.tag_replacement,f=E.state,_=E.tag_buffer,H=E.depth,L=E.in_quote_char,O="";for(let N=0,G=x.length;N":if(L)break;if(H){H--;break}L="",f=i,_+=">",P.has(T(_))?O+=_:O+=M,_="";break;case'"':case"'":q===L?L="":L=L||q,_+=q;break;case"-":_==="":_.slice(-2)=="--"&&(f=i),_="";break;default:_+=q;break}}return E.state=f,E.tag_buffer=_,E.depth=H,E.in_quote_char=L,O}function m(x){let E=new Set;if(typeof x=="string"){let P;for(;P=a.exec(x);)E.add(P[1])}else!e.nonNative&&typeof x[e.iterator]=="function"?E=new Set(x):typeof x.forEach=="function"&&x.forEach(E.add,E);return E}function T(x){let E=l.exec(x);return E?E[1].toLowerCase():null}t.exports?t.exports=o:n.striptags=o})(En)})(Tr);var Ec=Tr.exports;const Pc=Pn(Ec);function pi(t){const n=["a","b","br","i","img","p","span"],e={a:["href"],img:["alt","src"]};let i=Pc(t,n);const s=/<(\w+)((\s+.+?(\s*=\s*(?:".*?"|'.*?'|.*?|[\^'">\s]+))?)+\s*|\s*)>/g;return i=i.replace(s,(r,a,l)=>{if(!l)return`<${a}>`;const o=/(?:([^\s]+)=(?:"(.*?)"|'(.*?)'))|([^\s]+)/g,c=[];return l.replace(o,(h,g)=>{h!==g&&e[a]&&e[a].includes(g)&&c.push(h)}),c.length>0?`<${a} ${c.join(" ")}>`:`<${a}>`}),i}function ds(t,n){if(!(t instanceof Array)||!n||new Set(t).size!==t.length)return!1;for(let e=0,i=t.length;e0&&t[e]>0&&t[e]<=t[e-1]||t[e]<0||t[e]>n)return!1;return!0}function Cn(t,n=["https:","http:"]){let e;try{e=new URL(t)}catch{return!1}return n.includes(e.protocol)}const Cc={props:{metadata:{type:Array,default:()=>[]}},data(){return{infoItems:[]}},watch:{metadata(){this.updateInfoItems()}},mounted(){this.updateInfoItems()},methods:{cleanLabel(t){const n=t.replace("_"," ");return n.charAt(0).toUpperCase()+n.substr(1)},updateInfoItems(){this.$nextTick(()=>{this.$refs.contents&&this.$refs.contents.forEach((t,n)=>{const e=t.offsetHeight;this.infoItems[n]={collapsed:!0,exceedsHeight:!0},this.$nextTick(()=>{const i=t.offsetHeight,s=e>=i;this.infoItems[n]={collapsed:s,exceedsHeight:s}})})})},filterHtml:pi,isValidUrl:Cn}},Rc={class:"tify-info-metadata"},Lc={class:"tify-info-value"},Hc=["href"],Oc=["innerHTML"],Mc=["onClick"];function Dc(t,n,e,i,s,r){const a=Sc,l=yc;return A(),F("div",Rc,[(A(!0),F(ve,null,Be(e.metadata,(o,c)=>(A(),F("div",{key:c},[k("h4",null,Z(r.cleanLabel(t.$store.localize(o.label))),1),k("div",{ref_for:!0,ref:"contents",class:Te(["tify-info-content",{"-collapsed":s.infoItems[c]&&s.infoItems[c].collapsed}])},[k("div",Lc,[r.isValidUrl(o.value)?(A(),F("p",{key:`url-${c}`},[k("a",{href:o.value},Z(o.value),9,Hc)])):(A(),F("p",{key:`html-${c}`,innerHTML:r.filterHtml(t.$store.localize(o.value))},null,8,Oc))]),s.infoItems[c]&&s.infoItems[c].exceedsHeight?(A(),F("button",{key:0,type:"button",class:"tify-info-toggle",onClick:h=>s.infoItems[c].collapsed=!s.infoItems[c].collapsed},[s.infoItems[c].collapsed?(A(),F(ve,{key:0},[ie(a),be(" "+Z(t.$translate("Expand")),1)],64)):(A(),F(ve,{key:1},[ie(l),be(" "+Z(t.$translate("Collapse")),1)],64))],8,Mc)):se("",!0)],2)]))),128))])}const Ac=ae(Cc,[["render",Dc]]),kc={data(){return{collectionDataShown:!1}},computed:{manifestOrCollection(){return this.collectionDataShown?this.$store.collection:this.$store.manifest||this.$store.collection||{}},homepages(){return this.manifestOrCollection.homepage?[].concat(this.manifestOrCollection.homepage):[]},logos(){var n;let t=this.manifestOrCollection.logo?[].concat(this.manifestOrCollection.logo):[];return(n=this.manifestOrCollection.provider)==null||n.forEach(e=>{e.logo&&(t=t.concat(e.logo))}),t=t.map(e=>{var i,s,r,a;return{id:e.id,link:((s=(i=e.service)==null?void 0:i[0])==null?void 0:s.id)||((a=(r=e.service)==null?void 0:r[0])==null?void 0:a["@id"])}}),t}},methods:{filterHtml:pi,isValidUrl:Cn}},Fc={class:"tify-info",tabindex:"0"},Ic={class:"tify-sr-only"},Bc={key:0,class:"tify-info-header"},zc={key:1,class:"tify-info-section -title"},Nc={key:2,class:"tify-info-section -metadata"},Vc={key:3,class:"tify-info-section -description"},Uc={key:4,class:"tify-info-section -metadata -structure"},jc={key:0,class:"tify-info-structure"},Wc={key:5,class:"tify-info-section -related"},Gc={class:"tify-list"},qc=["href"],Zc=["href"],Kc={key:6,class:"tify-info-section -attribution"},Xc=["innerHTML"],Yc={key:7,class:"tify-info-section -license"},Jc=["href"],Qc={key:8,class:"tify-info-section -logo"},$c=["href"],eu=["src","alt"],tu=["src","alt"];function iu(t,n,e,i,s,r){const a=Ac;return A(),F("section",Fc,[k("h2",Ic,Z(t.$translate("Info")),1),t.$store.collection&&t.$store.manifest?(A(),F("div",Bc,[k("button",{type:"button",class:Te(["tify-info-button",{"-active":!s.collectionDataShown}]),onClick:n[0]||(n[0]=l=>s.collectionDataShown=!1)},Z(t.$translate("Document")),3),k("button",{type:"button",class:Te(["tify-info-button",{"-active":s.collectionDataShown}]),onClick:n[1]||(n[1]=l=>s.collectionDataShown=!0)},Z(t.$translate("Collection")),3)])):se("",!0),r.manifestOrCollection.label?(A(),F("div",zc,[k("h3",null,Z(t.$translate("Title")),1),k("p",null,Z(t.$store.localize(r.manifestOrCollection.label)),1)])):se("",!0),r.manifestOrCollection.metadata&&r.manifestOrCollection.metadata.length?(A(),F("div",Nc,[k("h3",null,Z(t.$translate("Metadata")),1),t.$store.options.view==="info"?(A(),Ce(a,{key:0,metadata:r.manifestOrCollection.metadata},null,8,["metadata"])):se("",!0)])):se("",!0),r.manifestOrCollection.summary?(A(),F("div",Vc,[k("h3",null,Z(t.$translate("Description")),1),t.$store.options.view==="info"?(A(),Ce(a,{key:0,metadata:[{value:r.manifestOrCollection.summary}]},null,8,["metadata"])):se("",!0)])):se("",!0),r.manifestOrCollection.structures&&(t.$store.currentStructure.label||t.$store.currentStructure.metadata)?(A(),F("div",Uc,[k("h3",null,Z(t.$translate("Current Element")),1),t.$store.currentStructure.label?(A(),F("p",jc,Z(t.$store.localize(t.$store.currentStructure.label)),1)):se("",!0),t.$store.options.view==="info"&&t.$store.currentStructure.metadata?(A(),Ce(a,{key:1,class:"tify-info-section -metadata",metadata:t.$store.currentStructure.metadata},null,8,["metadata"])):se("",!0)])):se("",!0),r.homepages.length?(A(),F("div",Wc,[k("h3",null,Z(t.$translate("Related Resources")),1),k("ul",Gc,[(A(!0),F(ve,null,Be(r.homepages,(l,o)=>(A(),F("li",{key:o},[typeof l=="string"?(A(),F("a",{key:0,href:l},Z(l),9,qc)):(A(),F("a",{key:1,href:l.id},Z(t.$store.localize(l.label)||l.id),9,Zc))]))),128))])])):se("",!0),r.manifestOrCollection.requiredStatement?(A(),F("div",Kc,[k("h3",null,Z(t.$store.localize(r.manifestOrCollection.requiredStatement.label)),1),k("p",{innerHTML:r.filterHtml(t.$store.localize(r.manifestOrCollection.requiredStatement.value))},null,8,Xc)])):se("",!0),r.manifestOrCollection.rights?(A(),F("div",Yc,[k("h3",null,Z(t.$translate("License")),1),k("p",null,[k("a",{href:r.manifestOrCollection.rights},Z(r.manifestOrCollection.rights),9,Jc)])])):se("",!0),r.logos.length?(A(),F("div",Qc,[(A(!0),F(ve,null,Be(r.logos,(l,o)=>(A(),F("p",{key:o},[l.link?(A(),F("a",{key:0,href:l.link},[k("img",{class:"tify-info-logo",src:l.id,alt:t.$translate("Logo")},null,8,eu)],8,$c)):(A(),F("img",{key:1,class:"tify-info-logo",src:l.id,alt:t.$translate("Logo")},null,8,tu))]))),128))])):se("",!0)])}const nu=ae(kc,[["render",iu]]),su={name:"TocList",props:{level:{type:Number,default:0},structures:{type:Array,default:()=>[]},purpose:{type:String,default:""}},data(){return{expandedStructures:[],id:this.$store.getId(`toc-list-${Math.floor(Math.random()*1e12)}`)}},methods:{getPageLabel(t){var e;const n=this.getFirstPage(t);return(e=this.$store.manifest.items[n-1])==null?void 0:e.label},getFirstPage(t){if(t.items)return this.getFirstPage(t.items[0]);const n=this.$store.manifest.items.findIndex(e=>e.id===t.id);return n<0?1:n+1},getLastPage(t){if(t.items)return this.getLastPage(t.items.at(-1));const n=this.$store.manifest.items.findLastIndex(e=>e.id===t.id);return n<0?this.$store.manifest.items.length:n+1},isCurrentPageInStructure(t){if(this.$store.manifest.items.filter((s,r)=>this.$store.options.pages.includes(r+1)).map(s=>s.id).some(s=>{var r;return(r=t.items)==null?void 0:r.some(a=>a.id===s)}))return!0;const e=t.firstPage||this.getFirstPage(t),i=t.lastPage||this.getLastPage(t);return this.$store.options.pages.some(s=>s>=e&&s<=i)},setPage(t){this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},toggleAllChildren(t=null){if(this.$refs.children){for(let n=this.structures.length-1;n>=0;n-=1)this.toggleChildren(n,t);this.$refs.children.forEach(n=>{n.toggleAllChildren(t)})}},toggleChildren(t,n=null){var i;(i=this.structures[t].items)!=null&&i.some(s=>s.items)&&(this.expandedStructures[t]=n!==null?n:!this.expandedStructures[t])}}},ru={class:"tify-toc-list"},ou=["data-level"],au=["title","aria-controls","aria-expanded","onClick"],lu=["href"],cu=["onClick"],uu={class:"tify-toc-label"},hu={class:"tify-toc-page"},fu=["onClick"],du={class:"tify-toc-label"};function pu(t,n,e,i,s,r){const a=_r,l=wr,o=Ys("toc-list",!0);return A(),F("ul",ru,[(A(!0),F(ve,null,Be(e.structures,(c,h)=>{var g,m;return A(),F("li",{key:h,class:Te(["tify-toc-structure",{"-current":r.isCurrentPageInStructure(c),"-expanded":s.expandedStructures[h]}]),"data-level":e.level},[(g=c.items)!=null&&g.some(T=>T.items)?(A(),F("button",{key:0,type:"button",class:"tify-toc-toggle",title:t.$translate(s.expandedStructures[h]?"Collapse":"Expand"),"aria-controls":`${s.id}-${h}`,"aria-expanded":s.expandedStructures[h]?"true":"false",onClick:T=>r.toggleChildren(h)},[s.expandedStructures[h]?(A(),Ce(a,{key:0})):(A(),Ce(l,{key:1}))],8,au)):se("",!0),e.purpose==="pdf"&&c.pageCount?(A(),F("a",{key:1,class:"tify-toc-link",href:c.rendering[0].id,download:""},Z(t.$store.localize(c.label))+" ("+Z(c.pageCount)+" "+Z(t.$translate(c.pageCount===1?"page":"pages"))+") ",9,lu)):t.$store.localize(c.label)!==t.$store.localize(r.getPageLabel(c))?(A(),F("a",{key:2,class:"tify-toc-link -dots",href:"javascript:;",onClick:T=>t.$store.setPage(c.firstPage||r.getFirstPage(c))},[k("span",uu,Z(t.$store.localize(c.label)),1),k("span",hu,Z(t.$store.localize(r.getPageLabel(c))||"—"),1)],8,cu)):(A(),F("a",{key:3,class:"tify-toc-link",href:"javascript:;",onClick:T=>t.$store.setPage(c.firstPage||r.getFirstPage(c))},[k("span",du,Z(t.$store.localize(c.label)),1)],8,fu)),(m=c.items)!=null&&m.some(T=>T.items)?De((A(),Ce(o,{key:4,id:`${s.id}-${h}`,ref_for:!0,ref:"children",level:e.level+1,purpose:e.purpose,structures:c.items},null,8,["id","level","purpose","structures"])),[[Ze,s.expandedStructures[h]]]):se("",!0)],10,ou)}),128))])}const xr=ae(su,[["render",pu]]),gu={data(){return{otherItems:[],perElementPdfLinksVisible:!1}},computed:{hasElementPdfLinks(){return!(this.$store.manifest.structures instanceof Array)||!this.$store.manifest.structures[0]||!this.$store.manifest.structures[0].rendering?!1:this.$store.manifest.structures[0].rendering.some(n=>n.format&&n.format==="application/pdf")},imageUrls(){const t={};return this.$store.options.pages.forEach(n=>{var i,s;if(!n)return;const e=(s=(i=this.$store.manifest.items[n-1].items)==null?void 0:i[0].items)==null?void 0:s[0].body;if(e!=null&&e.service){const r=e.service instanceof Array?e.service[0]:e.service,a=["ImageService2","ImageService3"].includes(r.type||r["@type"])?"default":"native",l=r.type==="ImageService3"?"max":"full",o=r.id||r["@id"];t[n]=`${o}${o.at(-1)==="/"?"":"/"}full/${l}/0/${a}.jpg`}else t[n]=e.id}),t},pages(){return this.$store.options.pages.filter(t=>t>0)},renderings(){return this.$store.manifest.rendering?[].concat(this.$store.manifest.rendering):[]}}},mu={class:"tify-export",tabindex:"0"},vu={class:"tify-sr-only"},yu={class:"tify-export-section -links"},wu={class:"tify-list"},_u=["href","download"],Tu={key:0,class:"tify-export-section -renderings"},xu={class:"tify-list"},bu=["href"],Su={key:0,class:"tify-export-container"},Eu=["aria-controls","aria-expanded"],Pu={class:"tify-sr-only"},Cu=["id"],Ru={class:"tify-export-section -iiif"},Lu=k("h3",null,"IIIF",-1),Hu={class:"tify-list"},Ou={key:0},Mu=["href"],Du=["href"],Au={key:1,class:"tify-export-section -other"},ku={class:"tify-list"},Fu=["href"];function Iu(t,n,e,i,s,r){var o;const a=yr,l=xr;return A(),F("section",mu,[k("h2",vu,Z(t.$translate("Export")),1),k("div",yu,[k("h3",null,Z(t.$translate("Download Individual Images")),1),k("ul",wu,[(A(!0),F(ve,null,Be(r.pages,c=>(A(),F("li",{key:c},[k("a",{href:r.imageUrls[c],download:`${c}.jpg`},Z(t.$translate("Page"))+" "+Z(t.$store.getPageLabel(c,t.$store.localize(t.$store.manifest.items[c-1].label))),9,_u)]))),128))])]),t.$store.manifest.rendering?(A(),F("div",Tu,[k("h3",null,Z(t.$translate("Renderings")),1),k("ul",xu,[(A(!0),F(ve,null,Be(r.renderings,c=>(A(),F("li",{key:c.id},[k("a",{href:c.id},Z(t.$store.localize(c.label)),9,bu)]))),128))]),r.hasElementPdfLinks?(A(),F("div",Su,[k("button",{type:"button",class:Te(["tify-export-toggle",{"-close":s.perElementPdfLinksVisible}]),"aria-controls":t.$store.getId("export-pdf-list"),"aria-expanded":s.perElementPdfLinksVisible?"true":"false",onClick:n[0]||(n[0]=c=>s.perElementPdfLinksVisible=!s.perElementPdfLinksVisible)},[s.perElementPdfLinksVisible?(A(),F(ve,{key:1},[ie(a),k("span",Pu,Z(t.$translate("Close PDF list")),1)],64)):(A(),F(ve,{key:0},[be(Z(t.$translate("PDFs for each element")),1)],64))],10,Eu),s.perElementPdfLinksVisible?(A(),F("div",{key:0,id:t.$store.getId("export-pdf-list"),class:"tify-export-toc"},[k("h4",null,Z(t.$translate("PDFs for each element")),1),ie(l,{ref:"children",purpose:"pdf",level:0,structures:t.$store.structures},null,8,["structures"])],8,Cu)):se("",!0)])):se("",!0)])):se("",!0),k("div",Ru,[Lu,k("ul",Hu,[t.$store.options.childManifestUrl?(A(),F("li",Ou,[k("a",{href:t.$store.options.childManifestUrl,download:"manifest.json"},Z(t.$translate("IIIF manifest (current document)")),9,Mu)])):se("",!0),k("li",null,[k("a",{href:t.$store.options.manifestUrl,download:"manifest.json"},Z(t.$translate(t.$store.collection?"IIIF manifest (collection)":"IIIF manifest")),9,Du)])])]),(o=t.$store.manifest.seeAlso)!=null&&o.length?(A(),F("div",Au,[k("h3",null,Z(t.$translate("Other Formats")),1),k("ul",ku,[(A(!0),F(ve,null,Be(t.$store.manifest.seeAlso,c=>(A(),F("li",{key:c.id},[k("a",{href:c.id,download:""},Z(c.label?t.$store.localize(c.label):c.id),9,Fu)]))),128))])])):se("",!0)])}const Bu=ae(gu,[["render",Iu]]);function gi(t,n,e=120){const i=t,s=e===!0?120:e;if(!s||s<0){i.scrollTop=n;return}const a=(n-t.scrollTop)/s/.1;setTimeout(()=>{i.scrollTop+=a,i.scrollTop!==n&&gi(i,n,s-10)},10)}function en(t,n,e=!0){const i=n.querySelectorAll(t);if(!i.length)return;let s=i[0];const r=i[i.length-1];Array.prototype.forEach.call(i,c=>{c.dataset.level>=s.dataset.level&&(s=c)});const a=n.getBoundingClientRect(),l=s.getBoundingClientRect(),o=r.getBoundingClientRect();if(l.topa.bottom){const c=o.bottom-a.bottom+n.scrollTop;gi(n,c+50,e)}}const ps=".tify-toc-structure.-current",zu={data(){return{isInited:!1}},computed:{isNested(){return this.tocStructures.some(t=>{var n;return(n=t.items)==null?void 0:n.some(e=>e.items)})},tocStructures(){return this.$store.structures.filter(t=>{var n;return!((n=t.behavior)!=null&&n.includes("top"))})}},watch:{"$store.options.pages":function(){this.$nextTick(()=>en(ps,this.$el))},"$store.options.view":{handler(t){t==="toc"&&this.$nextTick(this.init)},immediate:!0}},methods:{init(){this.isInited=!0,this.$nextTick(()=>en(ps,this.$el,!1))}}},Nu={class:"tify-toc",tabindex:"0"},Vu={class:"tify-sr-only"},Uu={key:0,class:"tify-toc-header"};function ju(t,n,e,i,s,r){const a=xr;return A(),F("section",Nu,[k("h2",Vu,Z(t.$translate("Table of Contents")),1),r.isNested?(A(),F("div",Uu,[k("button",{type:"button",class:"tify-toc-toggle-all",onClick:n[0]||(n[0]=l=>t.$refs.children.toggleAllChildren(!0))},Z(t.$translate("Expand all")),1),k("button",{type:"button",class:"tify-toc-toggle-all",onClick:n[1]||(n[1]=l=>t.$refs.children.toggleAllChildren(!1))},Z(t.$translate("Collapse all")),1)])):se("",!0),s.isInited?(A(),Ce(a,{key:1,ref:"children",level:0,structures:r.tocStructures},null,8,["structures"])):se("",!0)])}const Wu=ae(zu,[["render",ju]]),Gu=750,qu={data(){return{itemHeight:0,itemVMargin:0,items:[{label:""}],itemsPerRow:0,knownImages:[],lastScrollTop:0,resizeTimeout:null,style:{},thumbnailWidth:0,touchTimeout:null}},watch:{"$store.options.pages":function(t){this.$nextTick(()=>{const n=".tify-thumbnails-item.-current";t.length>2||t.length>1&&t[1]!==t[0]+1||(this.$refs.container.querySelector(n)?en(n,this.$el):this.scrollToCurrentPage())})},"$store.options.view":{handler(t){t==="thumbnails"&&this.$nextTick(this.init)},immediate:!0}},mounted(){this.style.flex=this.$el.style.flex},methods:{init(){this.updateDimensions(),this.scrollToCurrentPage(!1),new ResizeObserver(this.onResize).observe(this.$el)},onResize(){clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.$store.options.view==="thumbnails"&&this.updateDimensions()},200)},updateDimensions(){const t=this.$refs.container.querySelector(".tify-thumbnails-item"),n=t.currentStyle||window.getComputedStyle(t),e=parseInt(n.marginTop,10)+parseFloat(n.marginBottom,10);this.itemHeight=t.offsetHeight+e,this.itemVerticalMargin=e;const i=parseInt(n.marginLeft,10)+parseFloat(n.marginRight,10),s=t.offsetWidth+i;this.thumbnailWidth=t.offsetWidth,this.itemsPerRow=Math.floor(this.$refs.container.clientWidth/s);const a=Math.ceil(this.$store.manifest.items.length/this.itemsPerRow)*this.itemHeight;this.$refs.container.style.height=`${a}px`,this.redrawThumbnails(),this.scrollToCurrentPage(!1)},redrawThumbnails(){const t=this.$el.scrollTop,n=Math.floor(t/this.itemHeight)*this.itemsPerRow+1,i=Math.ceil(this.$el.offsetHeight/this.itemHeight)*this.itemsPerRow,s=n+this.itemsPerRow+i,r=Math.min(this.$store.manifest.items.length,s),a=[];for(let l=n-1;l{const l=Math.floor(n/this.itemsPerRow);this.$refs.container.style.paddingTop=`${l*this.itemHeight}px`})},scrollToCurrentPage(t=!0){const e=Math.floor((this.$store.options.pages[0]-1)/this.itemsPerRow)*this.itemHeight+(this.itemVMargin-50);t?gi(this.$el,e):this.$el.scrollTop=e},setPageAndSwitchView(t,n=!1){if(n){const e=this.$store.options.pages.slice(0),i=e.indexOf(t);i<0?(e.push(t),e.sort((s,r)=>s-r),e[0]===0&&e.shift()):e.length>1&&e.splice(i,1),this.$store.updateOptions({pages:e});return}this.$store.setPage(t),this.$store.isMobile()&&this.$store.updateOptions({view:"scan"})},touchStartTogglePage(t){this.lastScrollTop=this.$el.scrollTop,this.touchTimeout=setTimeout(()=>{this.$el.scrollTop===this.lastScrollTop&&this.setPageAndSwitchView(t,!0)},Gu)},touchEnd(){clearTimeout(this.touchTimeout)}}},Zu={class:"tify-sr-only"},Ku={ref:"container",class:"tify-thumbnails-list"},Xu=["onClick","onTouchstart"],Yu=["src"],Ju={class:"tify-thumbnails-page"};function Qu(t,n,e,i,s,r){return A(),F("section",{class:"tify-thumbnails",tabindex:"0",onScroll:n[1]||(n[1]=(...a)=>r.redrawThumbnails&&r.redrawThumbnails(...a))},[k("h2",Zu,Z(t.$translate("Pages")),1),k("div",Ku,[(A(!0),F(ve,null,Be(s.items,a=>(A(),F("a",{key:a.page,class:Te(["tify-thumbnails-item",{"-current":t.$store.options.pages.includes(a.page)}]),href:"javascript:;",onClick:_t(l=>r.setPageAndSwitchView(a.page,l.ctrlKey),["prevent"]),onTouchstart:l=>r.touchStartTogglePage(a.page),onTouchend:n[0]||(n[0]=(...l)=>r.touchEnd&&r.touchEnd(...l))},[k("img",{alt:"",src:a.imgUrl},null,8,Yu),k("span",Ju,Z(t.$store.getPageLabel(a.page,a.label)),1)],42,Xu))),128))],512)],32)}const $u=ae(qu,[["render",Qu]]),eh={data(){return{fulltextAvailable:null,fulltexts:[]}},computed:{pages(){return this.$store.options.pages.filter(t=>!!t)}},watch:{"$store.options.pages":function(){this.loadFulltexts()}},mounted(){this.loadFulltexts()},methods:{loadFulltexts(){this.fulltextAvailable=null,this.fulltexts=[],this.$store.options.pages.forEach(t=>{if(t<1||this.fulltexts[t])return;const n=this.$store.manifest.items[t-1];if(!("annotations"in n)){this.fulltextAvailable=!1;return}const e=n.annotations[0].id;this.$store.fetchJson(e).then(i=>{const{resources:s}=i;s instanceof Array&&s.forEach((r,a)=>{const l=r.resource;if(l)if(this.fulltexts[t]||(this.fulltexts[t]=[]),l&&l.chars){const o=pi(l.chars);o&&(this.fulltextAvailable=!0),this.fulltexts[t][a]=o}else(l.id||l["@id"])&&this.loadRemoteFulltext(t,a,l.id||l["@id"])})},i=>{const s=i.response?i.response.statusText:i.message;console.warn(`Could not load annotations: ${s}`),this.fulltextAvailable=!1})})},loadRemoteFulltext(t,n,e){Cn(e)&&this.$store.fetchText(e).then(i=>{const s=pi(i);s&&(this.fulltextAvailable=!0),this.fulltexts[t]||(this.fulltexts[t]=[]),this.fulltexts[t][n]=s},i=>{const s=i.response?i.response.statusText:i.message;console.warn(`Could not load fulltext: ${s}`)})}}},th={class:"tify-fulltext",tabindex:"0"},ih={class:"tify-sr-only"},nh={key:0,class:"tify-fulltext-texts"},sh=["innerHTML"],rh={key:1,class:"tify-fulltext-none"};function oh(t,n,e,i,s,r){return A(),F("section",th,[k("h2",ih,Z(t.$translate("Fulltext")),1),s.fulltextAvailable!==!1?(A(),F("div",nh,[(A(!0),F(ve,null,Be(r.pages,a=>(A(),F("div",{key:a,class:"tify-fulltext-page"},[k("h3",null,Z(t.$translate("Page"))+" "+Z(t.$store.getPageLabel(a,t.$store.localize(t.$store.manifest.items[a-1].label))),1),(A(!0),F(ve,null,Be(s.fulltexts[a],(l,o)=>(A(),F("div",{key:`${a}-${o}`,class:"tify-fulltext-text",innerHTML:l},null,8,sh))),128))]))),128))])):(A(),F("p",rh,Z(t.$translate("Fulltext not available for this page")),1))])}const ah=ae(eh,[["render",oh]]),lh={},ch={class:"tify-icon",viewBox:"0 0 24 24"},uh=k("path",{d:"M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z"},null,-1),hh=[uh];function fh(t,n){return A(),F("svg",ch,hh)}const dh=ae(lh,[["render",fh]]),ph={},gh={class:"tify-icon",viewBox:"0 0 24 24"},mh=k("path",{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z"},null,-1),vh=[mh];function yh(t,n){return A(),F("svg",gh,vh)}const wh=ae(ph,[["render",yh]]),_h={},Th={class:"tify-icon",viewBox:"0 0 24 24"},xh=k("path",{d:"M12,18V6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z"},null,-1),bh=[xh];function Sh(t,n){return A(),F("svg",Th,bh)}const Eh=ae(_h,[["render",Sh]]),Ph={},Ch={class:"tify-icon",viewBox:"0 0 24 24"},Rh=k("path",{d:"M3.55 19.09L4.96 20.5L6.76 18.71L5.34 17.29M12 6C8.69 6 6 8.69 6 12S8.69 18 12 18 18 15.31 18 12C18 8.68 15.31 6 12 6M20 13H23V11H20M17.24 18.71L19.04 20.5L20.45 19.09L18.66 17.29M20.45 5L19.04 3.6L17.24 5.39L18.66 6.81M13 1H11V4H13M6.76 5.39L4.96 3.6L3.55 5L5.34 6.81L6.76 5.39M1 13H4V11H1M13 20H11V23H13"},null,-1),Lh=[Rh];function Hh(t,n){return A(),F("svg",Ch,Lh)}const Oh=ae(Ph,[["render",Hh]]),Mh={},Dh={class:"tify-icon",viewBox:"0 0 24 24"},Ah=k("path",{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"},null,-1),kh=[Ah];function Fh(t,n){return A(),F("svg",Dh,kh)}const Ih=ae(Mh,[["render",Fh]]),Bh={},zh={class:"tify-icon",viewBox:"0 0 24 24"},Nh=k("path",{d:"M16.89,15.5L18.31,16.89C19.21,15.73 19.76,14.39 19.93,13H17.91C17.77,13.87 17.43,14.72 16.89,15.5M13,17.9V19.92C14.39,19.75 15.74,19.21 16.9,18.31L15.46,16.87C14.71,17.41 13.87,17.76 13,17.9M19.93,11C19.76,9.61 19.21,8.27 18.31,7.11L16.89,8.53C17.43,9.28 17.77,10.13 17.91,11M15.55,5.55L11,1V4.07C7.06,4.56 4,7.92 4,12C4,16.08 7.05,19.44 11,19.93V17.91C8.16,17.43 6,14.97 6,12C6,9.03 8.16,6.57 11,6.09V10L15.55,5.55Z"},null,-1),Vh=[Nh];function Uh(t,n){return A(),F("svg",zh,Vh)}const jh=ae(Bh,[["render",Uh]]),Wh={},Gh={class:"tify-icon",viewBox:"0 0 24 24"},qh=k("path",{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M5,8V10H13V8H5Z"},null,-1),Zh=[qh];function Kh(t,n){return A(),F("svg",Gh,Zh)}const Xh=ae(Wh,[["render",Kh]]),Yh={},Jh={class:"tify-icon",viewBox:"0 0 24 24"},Qh=k("path",{d:"M19,12H17V15H14V17H19V12M7,9H10V7H5V12H7V9M21,3H3A2,2 0 0,0 1,5V19A2,2 0 0,0 3,21H21A2,2 0 0,0 23,19V5A2,2 0 0,0 21,3M21,19H3V5H21V19Z"},null,-1),$h=[Qh];function ef(t,n){return A(),F("svg",Jh,$h)}const tf=ae(Yh,[["render",ef]]),nf={},sf={class:"tify-icon",viewBox:"0 0 24 24"},rf=k("path",{d:"M9,2A7,7 0 0,1 16,9C16,10.57 15.5,12 14.61,13.19L15.41,14H16L22,20L20,22L14,16V15.41L13.19,14.61C12,15.5 10.57,16 9,16A7,7 0 0,1 2,9A7,7 0 0,1 9,2M8,5V8H5V10H8V13H10V10H13V8H10V5H8Z"},null,-1),of=[rf];function af(t,n){return A(),F("svg",sf,of)}const lf=ae(nf,[["render",af]]),cf={},uf={class:"tify-icon",viewBox:"0 0 24 24"},hf=k("path",{d:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},null,-1),ff=[hf];function df(t,n){return A(),F("svg",uf,ff)}const br=ae(cf,[["render",df]]),pf={},gf={class:"tify-icon",viewBox:"0 0 24 24"},mf=k("path",{d:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},null,-1),vf=[mf];function yf(t,n){return A(),F("svg",gf,vf)}const Sr=ae(pf,[["render",yf]]);var Er={exports:{}};(function(t,n){(function(e,i){t.exports=i()})(En,function(){var e="__v-click-outside",i=typeof window<"u",s=typeof navigator<"u",r=i&&("ontouchstart"in window||s&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],a=function(h){var g=h.event,m=h.handler;(0,h.middleware)(g)&&m(g)},l=function(h,g){var m=function(f){var _=typeof f=="function";if(!_&&typeof f!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:_?f:f.handler,middleware:f.middleware||function(H){return H},events:f.events||r,isActive:f.isActive!==!1,detectIframe:f.detectIframe!==!1,capture:!!f.capture}}(g.value),T=m.handler,x=m.middleware,E=m.detectIframe,P=m.capture;if(m.isActive){if(h[e]=m.events.map(function(f){return{event:f,srcTarget:document.documentElement,handler:function(_){return function(H){var L=H.el,O=H.event,N=H.handler,G=H.middleware,q=O.path||O.composedPath&&O.composedPath();(q?q.indexOf(L)<0:!L.contains(O.target))&&a({event:O,handler:N,middleware:G})}({el:h,event:_,handler:T,middleware:x})},capture:P}}),E){var M={event:"blur",srcTarget:window,handler:function(f){return function(_){var H=_.el,L=_.event,O=_.handler,N=_.middleware;setTimeout(function(){var G=document.activeElement;G&&G.tagName==="IFRAME"&&!H.contains(G)&&a({event:L,handler:O,middleware:N})},0)}({el:h,event:f,handler:T,middleware:x})},capture:P};h[e]=[].concat(h[e],[M])}h[e].forEach(function(f){var _=f.event,H=f.srcTarget,L=f.handler;return setTimeout(function(){h[e]&&H.addEventListener(_,L,P)},0)})}},o=function(h){(h[e]||[]).forEach(function(g){return g.srcTarget.removeEventListener(g.event,g.handler,g.capture)}),delete h[e]},c=i?{beforeMount:l,updated:function(h,g){var m=g.value,T=g.oldValue;JSON.stringify(m)!==JSON.stringify(T)&&(o(h),l(h,{value:m}))},unmounted:o}:{};return{install:function(h){h.directive("click-outside",c)},directive:c}})})(Er);var wf=Er.exports;const Rn=Pn(wf);var Pr={exports:{}};(function(t){//! openseadragon 3.0.0
//! Built on 2021-12-15
//! Git commit: v3.0.0-0-3eded36
//! http://openseadragon.github.io
diff --git a/package-lock.json b/package-lock.json
index c3a06ed4..cb8ca43b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "tify",
- "version": "0.30.1",
+ "version": "0.30.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "tify",
- "version": "0.30.1",
+ "version": "0.30.2",
"hasInstallScript": true,
"license": "AGPL-3.0",
"devDependencies": {
diff --git a/package.json b/package.json
index 6475118c..e5f0e8b5 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "tify",
- "version": "0.30.1",
+ "version": "0.30.2",
"description": "A slim and mobile-friendly IIIF document viewer",
"homepage": "https://tify.rocks/",
"repository": {