diff --git a/404.html b/404.html index 6c727760..bc10a4f0 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/chunks/129.499c06b712a0ec36.js b/_next/static/chunks/129.499c06b712a0ec36.js new file mode 100644 index 00000000..88481fd9 --- /dev/null +++ b/_next/static/chunks/129.499c06b712a0ec36.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[129],{515:function(e,t,o){o.d(t,{c:function(){return i}});let i=(0,o(5455).zo)("button",{display:"flex",height:"2rem",width:"2rem",borderRadius:"2rem",padding:"0",margin:"0",fontFamily:"inherit",background:"none",backgroundColor:"$primary",border:"none",color:"white",cursor:"pointer",marginLeft:"0.618rem",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"content-box !important","&:first-child":{marginLeft:"0"},"@xs":{marginBottom:"0.618rem",marginLeft:"0","&:last-child":{marginBottom:"0"}},svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"inherit"},"&:hover, &:focus":{backgroundColor:"$accent"},"&[data-button=rotate-right]":{"&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=rotate-left]":{transform:"scaleX(-1)","&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=reset]":{"&:hover, &:focus":{svg:{rotate:"-15deg"}}}})},5129:function(e,t,o){o.r(t),o.d(t,{default:function(){return I}});var i=o(1527),n=o(6543),r=o(8448),a=o(2196),l=o(5455);let s=(0,l.zo)("div",{position:"absolute !important",zIndex:"1",top:"1rem",left:"1rem",width:"161.8px",height:"100px",backgroundColor:"#000D",boxShadow:"5px 5px 5px #0002",borderRadius:"3px",".displayregion":{border:" 3px solid $accent !important",boxShadow:"0 0 3px #0006"},"@sm":{width:"123px",height:"76px"},"@xs":{width:"100px",height:"61.8px"}}),c=(0,l.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"}),d=(0,l.zo)("div",{width:"100%",height:"100%",maxHeight:"100vh",background:"transparent",backgroundSize:"contain",color:"white",position:"relative",zIndex:"0",overflow:"hidden",variants:{hasNavigator:{true:{["".concat(s)]:{display:"block"}},false:{["".concat(s)]:{display:"none"}}}}});var h=o(9212),u=o.n(h),g=o(959),v=o(515),f=e=>{let{className:t,id:o,label:n,children:r}=e,a=n.toLowerCase().replace(/\s/g,"-");return(0,i.jsx)(v.c,{id:o,className:t,"data-testid":"openseadragon-button","data-button":a,children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"".concat(o,"-svg-title"),"data-testid":"openseadragon-button-svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{id:"".concat(o,"-svg-title"),children:n}),r]})})};let p=(0,l.zo)("div",{position:"absolute",zIndex:"1",top:"1rem",right:"1rem",display:"flex","@xs":{flexDirection:"column",zIndex:"2"},variants:{hasPlaceholder:{true:{right:"3.618rem","@xs":{top:"3.618rem",right:"1rem"}},false:{right:"1rem","@xs":{top:"1rem",right:"1rem"}}}}}),m=()=>(0,i.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),w=()=>(0,i.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),x=()=>(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),y=()=>(0,i.jsx)("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),b=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),(0,i.jsx)("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]});var _=e=>{let{_cloverViewerHasPlaceholder:t,config:o}=e;return(0,i.jsxs)(p,{"data-testid":"clover-iiif-image-openseadragon-controls",hasPlaceholder:t,children:[o.showZoomControl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{id:o.zoomInButton,label:"zoom in",children:(0,i.jsx)(m,{})}),(0,i.jsx)(f,{id:o.zoomOutButton,label:"zoom out",children:(0,i.jsx)(w,{})})]}),o.showFullPageControl&&(0,i.jsx)(f,{id:o.fullPageButton,label:"full page",children:(0,i.jsx)(x,{})}),o.showRotationControl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{id:o.rotateRightButton,label:"rotate right",children:(0,i.jsx)(b,{})}),(0,i.jsx)(f,{id:o.rotateLeftButton,label:"rotate left",children:(0,i.jsx)(b,{})})]}),o.showHomeControl&&(0,i.jsx)(f,{id:o.homeButton,label:"reset",children:(0,i.jsx)(y,{})})]})},k=o(2103),j=e=>{let{ariaLabel:t,config:o,uri:n,_cloverViewerHasPlaceholder:r,imageType:a,openSeadragonCallback:l}=e,[h,v]=(0,g.useState)(),[f,p]=(0,g.useState)();return(0,g.useEffect)(()=>(f||p(u()(o)),()=>null==f?void 0:f.destroy()),[]),(0,g.useEffect)(()=>{f&&l&&l(f)},[f,l]),(0,g.useEffect)(()=>{f&&n!==h&&(f.forceRedraw(),v(n))},[f,h,n]),(0,g.useEffect)(()=>{if(h&&f)switch(a){case"simpleImage":f.addSimpleImage({url:h});break;case"tiledImage":(0,k.Er)(h).then(e=>{try{if(!e)throw Error("No tile source found for ".concat(h));f.addTiledImage({tileSource:e})}catch(e){console.error(e)}});break;default:f.close(),console.warn("Unable to render ".concat(h,' in OpenSeadragon as type: "').concat(a,'"'))}},[a,h,f]),(0,i.jsxs)(d,{className:"clover-iiif-image-openseadragon","data-testid":"clover-iiif-image-openseadragon","data-openseadragon-instance":o.id,hasNavigator:o.showNavigator,children:[(0,i.jsx)(_,{_cloverViewerHasPlaceholder:r,config:o}),o.showNavigator&&(0,i.jsx)(s,{id:o.navigatorId,"data-testid":"clover-iiif-image-openseadragon-navigator"}),(0,i.jsx)(c,{id:o.id,"data-testid":"clover-iiif-image-openseadragon-viewport",role:"img",...t&&{"aria-label":t}})]})},z=o(5593),C=o(2950),I=e=>{let{_cloverViewerHasPlaceholder:t=!1,body:o,instanceId:l,isTiledImage:s=!1,label:c,src:d="",openSeadragonCallback:h,openSeadragonConfig:u={}}=e,g=l||(0,C.Z)(),v="string"==typeof c?c:(0,z.M)(c),f={id:"openseadragon-".concat(g),navigatorId:"openseadragon-navigator-".concat(g),loadTilesWithAjax:!0,fullPageButton:"fullPage-".concat(g),homeButton:"reset-".concat(g),rotateLeftButton:"rotateLeft-".concat(g),rotateRightButton:"rotateRight-".concat(g),zoomInButton:"zoomIn-".concat(g),zoomOutButton:"zoomOut-".concat(g),showNavigator:!0,showFullPageControl:!0,showHomeControl:!0,showRotationControl:!0,showZoomControl:!0,navigatorBorderColor:"transparent",gestureSettingsMouse:{clickToZoom:!0,dblClickToZoom:!0,pinchToZoom:!0,scrollToZoom:!1},...u},{imageType:p,uri:m}=o?(0,n.z9)(o):(0,n.D1)(d,s);return m?(0,i.jsx)(r.SV,{FallbackComponent:a.Z,children:(0,i.jsx)(j,{_cloverViewerHasPlaceholder:t,ariaLabel:v,config:f,imageType:p,uri:m,openSeadragonCallback:h},g)}):null}},2196:function(e,t,o){o.d(t,{Z:function(){return s}});var i=o(1527),n=o(5455);let r=(0,n.zo)("div",{display:"flex",flexDirection:"column",alignItems:"center"}),a=(0,n.zo)("p",{fontWeight:"bold",fontSize:"x-large"}),l=(0,n.zo)("span",{fontSize:"medium"});o(959);var s=e=>{let{error:t}=e,{message:o}=t;return(0,i.jsxs)(r,{role:"alert",children:[(0,i.jsx)(a,{"data-testid":"headline",children:"Something went wrong"}),o&&(0,i.jsxs)(l,{children:["Error message: ".concat(o)," "]})]})}},5500:function(e,t,o){o.d(t,{L:function(){return i}});let i=e=>{let t={id:"string"==typeof e?e:e.source};if("string"==typeof e){if(e.includes("#xywh=")){let o=e.split("#xywh=");if(o&&o[1]){let[e,i,n,r]=o[1].split(",").map(e=>Number(e));t={id:o[0],rect:{x:e,y:i,w:n,h:r}}}}else if(e.includes("#t=")){let o=e.split("#t=");o&&o[1]&&(t={id:o[0],t:o[1]})}}else if("object"==typeof e){var o,i;(null===(o=e.selector)||void 0===o?void 0:o.type)==="PointSelector"?t={id:e.source,point:{x:e.selector.x,y:e.selector.y}}:(null===(i=e.selector)||void 0===i?void 0:i.type)==="SvgSelector"&&(t={id:e.source,svg:e.selector.value})}return t}},2103:function(e,t,o){o.d(t,{AG:function(){return r},Er:function(){return n},FO:function(){return s},Mx:function(){return c},Vu:function(){return l}});var i=o(1921);let n=e=>fetch("".concat(e.replace(/\/$/,""),"/info.json")).then(e=>e.json()).then(e=>e).catch(t=>{console.error("The IIIF tilesource ".concat(e.replace(/\/$/,""),"/info.json failed to load: ").concat(t))}),r=e=>{let t,o;return Array.isArray(e)&&(t=e[0])&&(o="@id"in t?t["@id"]:t.id),o},a=e=>{let t,o;if(d(e))t=e,o={};else{let r=JSON.parse((0,i.o0)(e));switch(null==r?void 0:r.type){case"SpecificResource":case"Range":case"Annotation":o={manifest:t=null==r?void 0:r.target.partOf[0].id,canvas:null==r?void 0:r.target.id};break;case"Canvas":o={manifest:t=null==r?void 0:r.partOf[0].id,canvas:null==r?void 0:r.id};break;case"Manifest":var n;t=null==r?void 0:r.id,o={collection:null==r?void 0:null===(n=r.partOf[0])||void 0===n?void 0:n.id,manifest:null==r?void 0:r.id};break;case"Collection":o={collection:t=null==r?void 0:r.id}}}return{resourceId:t,active:o}},l=e=>{let{resourceId:t,active:o}=a(e);return o.collection||o.manifest||t},s=(e,t)=>{let o=t.items.map(e=>e.id),{active:i}=a(e),n=i.canvas;return o.includes(n)?n:o[0]},c=(e,t)=>{let{active:o}=a(e),i=o.manifest,n=t.items.filter(e=>"Manifest"===e.type).map(e=>e.id);return 0==n.length?null:n.includes(i)?i:n[0]},d=e=>{try{new URL(e)}catch(e){return!1}return!0}},6543:function(e,t,o){o.d(t,{zG:function(){return g},cW:function(){return v},z9:function(){return p},D1:function(){return m}});var i,n,r=o(9212),a=o.n(r);let l=window.OpenSeadragon;if(!l&&!(l=a()))throw Error("OpenSeadragon is missing.");let s="http://www.w3.org/2000/svg";l.Viewer&&(l.Viewer.prototype.svgOverlay=function(){return this._svgOverlayInfo||(this._svgOverlayInfo=new c(this)),this._svgOverlayInfo});let c=function(e){let t=this;this._viewer=e,this._containerWidth=0,this._containerHeight=0,this._svg=document.createElementNS(s,"svg"),this._svg.style.position="absolute",this._svg.style.left=0,this._svg.style.top=0,this._svg.style.width="100%",this._svg.style.height="100%",this._viewer.canvas.appendChild(this._svg),this._node=document.createElementNS(s,"g"),this._svg.appendChild(this._node),this._viewer.addHandler("animation",function(){t.resize()}),this._viewer.addHandler("open",function(){t.resize()}),this._viewer.addHandler("rotate",function(){t.resize()}),this._viewer.addHandler("flip",function(){t.resize()}),this._viewer.addHandler("resize",function(){t.resize()}),this.resize()};c.prototype={node:function(){return this._node},resize:function(){this._containerWidth!==this._viewer.container.clientWidth&&(this._containerWidth=this._viewer.container.clientWidth,this._svg.setAttribute("width",this._containerWidth)),this._containerHeight!==this._viewer.container.clientHeight&&(this._containerHeight=this._viewer.container.clientHeight,this._svg.setAttribute("height",this._containerHeight));let e=this._viewer.viewport.pixelFromPoint(new l.Point(0,0),!0),t=this._viewer.viewport.getZoom(!0),o=this._viewer.viewport.getRotation(),i=this._viewer.viewport.getFlip(),n=this._viewer.viewport._containerInnerSize.x,r=n*t,a=r;i&&(r=-r,e.x=-e.x+n),this._node.setAttribute("transform","translate("+e.x+","+e.y+") scale("+r+","+a+") rotate("+o+")")},onClick:function(e,t){new l.MouseTracker({element:e,clickHandler:t}).setTracking(!0)}};let d=e=>new c(e);var h=o(5500),u=o(2103);function g(e,t,o,i){if(!e)return;let n=1/t.width;i.forEach(t=>{if(!t.target)return;let{point:i,rect:r,svg:l}=(0,h.L)(t.target);if(r){let{x:t,y:i,w:l,h:s}=r;!function(e,t,o,i,n,r){let l=new(a()).Rect(t,o,i,n),s=document.createElement("div");if(r.annotationOverlays){let{backgroundColor:e,opacity:t,borderType:o,borderColor:i,borderWidth:n}=r.annotationOverlays;s.style.backgroundColor=e,s.style.opacity=t,s.style.border="".concat(o," ").concat(n," ").concat(i),s.className="annotation-overlay"}e.addOverlay(s,l)}(e,t*n,i*n,l*n,s*n,o)}if(i){let{x:t,y:r}=i;f(e,'\n \n \n \n '),o,n)}l&&f(e,l,o,n)})}function v(e,t,o){let i,n,r=40,l=40;t.rect&&(i=t.rect.x,n=t.rect.y,r=t.rect.w,l=t.rect.h),t.point&&(i=t.point.x,n=t.point.y),h.L.svg;let s=1/e.width;return new(a()).Rect(i*s-r*s/2*(o-1),n*s-l*s/2*(o-1),r*s*o,l*s*o)}function f(e,t,o,i){let n=function(e){if(!e)return null;let t=document.createElement("template");return t.innerHTML=e.trim(),t.content.children[0]}(t);if(n)for(let t of n.children)!function e(t,o,i,n){var r;if("#text"===o.nodeName)!o.textContent||o.textContent.includes("\n")||console.log("nodeName:",o.nodeName,", textContent:",o.textContent,", childNodes.length",o.childNodes.length);else{let a=function(e,t,o){var i,n,r,a;let l=!1,s=!1,c=!1,d=!1,h=document.createElementNS("http://www.w3.org/2000/svg",e.nodeName);if(e.attributes.length>0)for(let t=0;t{e(t,o,i,n)})}}(e,t,o,i)}(i=n||(n={})).TiledImage="tiledImage",i.SimpleImage="simpleImage";let p=e=>{let t=Array.isArray(null==e?void 0:e.service)&&(null==e?void 0:e.service.length)>0;return{uri:t?(0,u.AG)(null==e?void 0:e.service):null==e?void 0:e.id,imageType:t?n.TiledImage:n.SimpleImage}},m=(e,t)=>({uri:e,imageType:t?n.TiledImage:n.SimpleImage})}}]); \ No newline at end of file diff --git a/_next/static/chunks/129.4ae054dc40cc6ef4.js b/_next/static/chunks/129.4ae054dc40cc6ef4.js deleted file mode 100644 index 03c1bfef..00000000 --- a/_next/static/chunks/129.4ae054dc40cc6ef4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[129],{515:function(e,t,o){o.d(t,{c:function(){return i}});let i=(0,o(5455).zo)("button",{display:"flex",height:"2rem",width:"2rem",borderRadius:"2rem",padding:"0",margin:"0",fontFamily:"inherit",background:"none",backgroundColor:"$primary",border:"none",color:"white",cursor:"pointer",marginLeft:"0.618rem",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"content-box !important","&:first-child":{marginLeft:"0"},"@xs":{marginBottom:"0.618rem",marginLeft:"0","&:last-child":{marginBottom:"0"}},svg:{height:"60%",width:"60%",padding:"20%",fill:"$secondary",stroke:"$secondary",filter:"drop-shadow(2px 2px 5px #0003)",transition:"$all",boxSizing:"inherit"},"&:hover, &:focus":{backgroundColor:"$accent"},"&[data-button=rotate-right]":{"&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=rotate-left]":{transform:"scaleX(-1)","&:hover, &:focus":{svg:{rotate:"45deg"}}},"&[data-button=reset]":{"&:hover, &:focus":{svg:{rotate:"-15deg"}}}})},5129:function(e,t,o){o.r(t),o.d(t,{default:function(){return I}});var i=o(1527),n=o(6543),r=o(8448),a=o(2196),l=o(5455);let s=(0,l.zo)("div",{position:"absolute !important",zIndex:"1",top:"1rem",left:"1rem",width:"161.8px",height:"100px",backgroundColor:"#000D",boxShadow:"5px 5px 5px #0002",borderRadius:"3px",".displayregion":{border:" 3px solid $accent !important",boxShadow:"0 0 3px #0006"},"@sm":{width:"123px",height:"76px"},"@xs":{width:"100px",height:"61.8px"}}),c=(0,l.zo)("div",{position:"relative",width:"100%",height:"100%",zIndex:"0"}),d=(0,l.zo)("div",{width:"100%",height:"100%",maxHeight:"100vh",background:"transparent",backgroundSize:"contain",color:"white",position:"relative",zIndex:"0",overflow:"hidden",variants:{hasNavigator:{true:{["".concat(s)]:{display:"block"}},false:{["".concat(s)]:{display:"none"}}}}});var h=o(2929),u=o.n(h),g=o(959),v=o(515),f=e=>{let{className:t,id:o,label:n,children:r}=e,a=n.toLowerCase().replace(/\s/g,"-");return(0,i.jsx)(v.c,{id:o,className:t,"data-testid":"openseadragon-button","data-button":a,children:(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"".concat(o,"-svg-title"),"data-testid":"openseadragon-button-svg",focusable:"false",viewBox:"0 0 512 512",role:"img",children:[(0,i.jsx)("title",{id:"".concat(o,"-svg-title"),children:n}),r]})})};let p=(0,l.zo)("div",{position:"absolute",zIndex:"1",top:"1rem",right:"1rem",display:"flex","@xs":{flexDirection:"column",zIndex:"2"},variants:{hasPlaceholder:{true:{right:"3.618rem","@xs":{top:"3.618rem",right:"1rem"}},false:{right:"1rem","@xs":{top:"1rem",right:"1rem"}}}}}),m=()=>(0,i.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M256 112v288M400 256H112"}),x=()=>(0,i.jsx)("path",{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 256H112"}),w=()=>(0,i.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 320v112H320M421.8 421.77L304 304M80 192V80h112M90.2 90.23L208 208M320 80h112v112M421.77 90.2L304 208M192 432H80V320M90.23 421.8L208 304"}),y=()=>(0,i.jsx)("path",{d:"M448 440a16 16 0 01-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 01-27 11.57l-176-168a16 16 0 010-23.14l176-168A16 16 0 01256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 01-16 16z"}),b=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"45",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}),(0,i.jsx)("path",{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"})]});var _=e=>{let{_cloverViewerHasPlaceholder:t,config:o}=e;return(0,i.jsxs)(p,{"data-testid":"clover-iiif-image-openseadragon-controls",hasPlaceholder:t,children:[o.showZoomControl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{id:o.zoomInButton,label:"zoom in",children:(0,i.jsx)(m,{})}),(0,i.jsx)(f,{id:o.zoomOutButton,label:"zoom out",children:(0,i.jsx)(x,{})})]}),o.showFullPageControl&&(0,i.jsx)(f,{id:o.fullPageButton,label:"full page",children:(0,i.jsx)(w,{})}),o.showRotationControl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{id:o.rotateRightButton,label:"rotate right",children:(0,i.jsx)(b,{})}),(0,i.jsx)(f,{id:o.rotateLeftButton,label:"rotate left",children:(0,i.jsx)(b,{})})]}),o.showHomeControl&&(0,i.jsx)(f,{id:o.homeButton,label:"reset",children:(0,i.jsx)(y,{})})]})},k=o(2103),j=e=>{let{ariaLabel:t,config:o,uri:n,_cloverViewerHasPlaceholder:r,imageType:a,openSeadragonCallback:l}=e,[h,v]=(0,g.useState)(),[f,p]=(0,g.useState)();return(0,g.useEffect)(()=>(f||p(u()(o)),()=>null==f?void 0:f.destroy()),[]),(0,g.useEffect)(()=>{f&&l&&l(f)},[f,l]),(0,g.useEffect)(()=>{n!==h&&v(n)},[h,n]),(0,g.useEffect)(()=>{if(h&&f)switch(a){case"simpleImage":f.addSimpleImage({url:h});break;case"tiledImage":(0,k.Er)(h).then(e=>{try{if(!e)throw Error("No tile source found for ".concat(h));f.addTiledImage({tileSource:e})}catch(e){console.error(e)}});break;default:f.close(),console.warn("Unable to render ".concat(h,' in OpenSeadragon as type: "').concat(a,'"'))}},[a,h,f]),(0,i.jsxs)(d,{className:"clover-iiif-image-openseadragon","data-testid":"clover-iiif-image-openseadragon","data-openseadragon-instance":o.id,hasNavigator:o.showNavigator,children:[(0,i.jsx)(_,{_cloverViewerHasPlaceholder:r,config:o}),o.showNavigator&&(0,i.jsx)(s,{id:o.navigatorId,"data-testid":"clover-iiif-image-openseadragon-navigator"}),(0,i.jsx)(c,{id:o.id,"data-testid":"clover-iiif-image-openseadragon-viewport",role:"img",...t&&{"aria-label":t}})]})},z=o(5593),C=o(2950),I=e=>{let{_cloverViewerHasPlaceholder:t=!1,body:o,instanceId:l,isTiledImage:s=!1,label:c,src:d="",openSeadragonCallback:h,openSeadragonConfig:u={}}=e,g=l||(0,C.Z)(),v="string"==typeof c?c:(0,z.M)(c),f={id:"openseadragon-".concat(g),navigatorId:"openseadragon-navigator-".concat(g),loadTilesWithAjax:!0,fullPageButton:"fullPage-".concat(g),homeButton:"reset-".concat(g),rotateLeftButton:"rotateLeft-".concat(g),rotateRightButton:"rotateRight-".concat(g),zoomInButton:"zoomIn-".concat(g),zoomOutButton:"zoomOut-".concat(g),showNavigator:!0,showFullPageControl:!0,showHomeControl:!0,showRotationControl:!0,showZoomControl:!0,navigatorBorderColor:"transparent",gestureSettingsMouse:{clickToZoom:!0,dblClickToZoom:!0,pinchToZoom:!0,scrollToZoom:!1},...u},{imageType:p,uri:m}=o?(0,n.z9)(o):(0,n.D1)(d,s);return m?(0,i.jsx)(r.SV,{FallbackComponent:a.Z,children:(0,i.jsx)(j,{_cloverViewerHasPlaceholder:t,ariaLabel:v,config:f,imageType:p,uri:m,openSeadragonCallback:h},g)}):null}},2196:function(e,t,o){o.d(t,{Z:function(){return s}});var i=o(1527),n=o(5455);let r=(0,n.zo)("div",{display:"flex",flexDirection:"column",alignItems:"center"}),a=(0,n.zo)("p",{fontWeight:"bold",fontSize:"x-large"}),l=(0,n.zo)("span",{fontSize:"medium"});o(959);var s=e=>{let{error:t}=e,{message:o}=t;return(0,i.jsxs)(r,{role:"alert",children:[(0,i.jsx)(a,{"data-testid":"headline",children:"Something went wrong"}),o&&(0,i.jsxs)(l,{children:["Error message: ".concat(o)," "]})]})}},5500:function(e,t,o){o.d(t,{L:function(){return i}});let i=e=>{let t={id:"string"==typeof e?e:e.source};if("string"==typeof e){if(e.includes("#xywh=")){let o=e.split("#xywh=");if(o&&o[1]){let[e,i,n,r]=o[1].split(",").map(e=>Number(e));t={id:o[0],rect:{x:e,y:i,w:n,h:r}}}}else if(e.includes("#t=")){let o=e.split("#t=");o&&o[1]&&(t={id:o[0],t:o[1]})}}else if("object"==typeof e){var o,i;(null===(o=e.selector)||void 0===o?void 0:o.type)==="PointSelector"?t={id:e.source,point:{x:e.selector.x,y:e.selector.y}}:(null===(i=e.selector)||void 0===i?void 0:i.type)==="SvgSelector"&&(t={id:e.source,svg:e.selector.value})}return t}},2103:function(e,t,o){o.d(t,{AG:function(){return r},Er:function(){return n},FO:function(){return s},Mx:function(){return c},Vu:function(){return l}});var i=o(1921);let n=e=>fetch("".concat(e.replace(/\/$/,""),"/info.json")).then(e=>e.json()).then(e=>e).catch(t=>{console.error("The IIIF tilesource ".concat(e.replace(/\/$/,""),"/info.json failed to load: ").concat(t))}),r=e=>{let t,o;return Array.isArray(e)&&(t=e[0])&&(o="@id"in t?t["@id"]:t.id),o},a=e=>{let t,o;if(d(e))t=e,o={};else{let r=JSON.parse((0,i.o0)(e));switch(null==r?void 0:r.type){case"SpecificResource":case"Range":case"Annotation":o={manifest:t=null==r?void 0:r.target.partOf[0].id,canvas:null==r?void 0:r.target.id};break;case"Canvas":o={manifest:t=null==r?void 0:r.partOf[0].id,canvas:null==r?void 0:r.id};break;case"Manifest":var n;t=null==r?void 0:r.id,o={collection:null==r?void 0:null===(n=r.partOf[0])||void 0===n?void 0:n.id,manifest:null==r?void 0:r.id};break;case"Collection":o={collection:t=null==r?void 0:r.id}}}return{resourceId:t,active:o}},l=e=>{let{resourceId:t,active:o}=a(e);return o.collection||o.manifest||t},s=(e,t)=>{let o=t.items.map(e=>e.id),{active:i}=a(e),n=i.canvas;return o.includes(n)?n:o[0]},c=(e,t)=>{let{active:o}=a(e),i=o.manifest,n=t.items.filter(e=>"Manifest"===e.type).map(e=>e.id);return 0==n.length?null:n.includes(i)?i:n[0]},d=e=>{try{new URL(e)}catch(e){return!1}return!0}},6543:function(e,t,o){o.d(t,{zG:function(){return g},cW:function(){return v},z9:function(){return p},D1:function(){return m}});var i,n,r=o(2929),a=o.n(r);let l=window.OpenSeadragon;if(!l&&!(l=a()))throw Error("OpenSeadragon is missing.");let s="http://www.w3.org/2000/svg";l.Viewer&&(l.Viewer.prototype.svgOverlay=function(){return this._svgOverlayInfo||(this._svgOverlayInfo=new c(this)),this._svgOverlayInfo});let c=function(e){let t=this;this._viewer=e,this._containerWidth=0,this._containerHeight=0,this._svg=document.createElementNS(s,"svg"),this._svg.style.position="absolute",this._svg.style.left=0,this._svg.style.top=0,this._svg.style.width="100%",this._svg.style.height="100%",this._viewer.canvas.appendChild(this._svg),this._node=document.createElementNS(s,"g"),this._svg.appendChild(this._node),this._viewer.addHandler("animation",function(){t.resize()}),this._viewer.addHandler("open",function(){t.resize()}),this._viewer.addHandler("rotate",function(){t.resize()}),this._viewer.addHandler("flip",function(){t.resize()}),this._viewer.addHandler("resize",function(){t.resize()}),this.resize()};c.prototype={node:function(){return this._node},resize:function(){this._containerWidth!==this._viewer.container.clientWidth&&(this._containerWidth=this._viewer.container.clientWidth,this._svg.setAttribute("width",this._containerWidth)),this._containerHeight!==this._viewer.container.clientHeight&&(this._containerHeight=this._viewer.container.clientHeight,this._svg.setAttribute("height",this._containerHeight));let e=this._viewer.viewport.pixelFromPoint(new l.Point(0,0),!0),t=this._viewer.viewport.getZoom(!0),o=this._viewer.viewport.getRotation(),i=this._viewer.viewport.getFlip(),n=this._viewer.viewport._containerInnerSize.x,r=n*t,a=r;i&&(r=-r,e.x=-e.x+n),this._node.setAttribute("transform","translate("+e.x+","+e.y+") scale("+r+","+a+") rotate("+o+")")},onClick:function(e,t){new l.MouseTracker({element:e,clickHandler:t}).setTracking(!0)}};let d=e=>new c(e);var h=o(5500),u=o(2103);function g(e,t,o,i){if(!e)return;let n=1/t.width;i.forEach(t=>{if(!t.target)return;let{point:i,rect:r,svg:l}=(0,h.L)(t.target);if(r){let{x:t,y:i,w:l,h:s}=r;!function(e,t,o,i,n,r){let l=new(a()).Rect(t,o,i,n),s=document.createElement("div");if(r.annotationOverlays){let{backgroundColor:e,opacity:t,borderType:o,borderColor:i,borderWidth:n}=r.annotationOverlays;s.style.backgroundColor=e,s.style.opacity=t,s.style.border="".concat(o," ").concat(n," ").concat(i),s.className="annotation-overlay"}e.addOverlay(s,l)}(e,t*n,i*n,l*n,s*n,o)}if(i){let{x:t,y:r}=i;f(e,'\n \n \n \n '),o,n)}l&&f(e,l,o,n)})}function v(e,t,o){let i,n,r=40,l=40;t.rect&&(i=t.rect.x,n=t.rect.y,r=t.rect.w,l=t.rect.h),t.point&&(i=t.point.x,n=t.point.y),h.L.svg;let s=1/e.width;return new(a()).Rect(i*s-r*s/2*(o-1),n*s-l*s/2*(o-1),r*s*o,l*s*o)}function f(e,t,o,i){let n=function(e){if(!e)return null;let t=document.createElement("template");return t.innerHTML=e.trim(),t.content.children[0]}(t);if(n)for(let t of n.children)!function e(t,o,i,n){var r;if("#text"===o.nodeName)!o.textContent||o.textContent.includes("\n")||console.log("nodeName:",o.nodeName,", textContent:",o.textContent,", childNodes.length",o.childNodes.length);else{let a=function(e,t,o){var i,n,r,a;let l=!1,s=!1,c=!1,d=!1,h=document.createElementNS("http://www.w3.org/2000/svg",e.nodeName);if(e.attributes.length>0)for(let t=0;t{e(t,o,i,n)})}}(e,t,o,i)}(i=n||(n={})).TiledImage="tiledImage",i.SimpleImage="simpleImage";let p=e=>{let t=Array.isArray(null==e?void 0:e.service)&&(null==e?void 0:e.service.length)>0;return{uri:t?(0,u.AG)(null==e?void 0:e.service):null==e?void 0:e.id,imageType:t?n.TiledImage:n.SimpleImage}},m=(e,t)=>({uri:e,imageType:t?n.TiledImage:n.SimpleImage})}}]); \ No newline at end of file diff --git a/_next/static/chunks/338a7a71.69656c3aef329717.js b/_next/static/chunks/338a7a71.69656c3aef329717.js new file mode 100644 index 00000000..544c5aca --- /dev/null +++ b/_next/static/chunks/338a7a71.69656c3aef329717.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[668],{9212:function(e,t){var i,n,o,r,s,a,l,h,c;function u(e){return new u.Viewer(e)}u.version={versionStr:"4.1.1",major:parseInt("4",10),minor:parseInt("1",10),revision:parseInt("1",10)},o={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Promise]":"promise","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object"},r=Object.prototype.toString,s=Object.prototype.hasOwnProperty,u.isFunction=function(e){return"function"===u.type(e)},u.isArray=Array.isArray||function(e){return"array"===u.type(e)},u.isWindow=function(e){return e&&"object"==typeof e&&"setInterval"in e},u.type=function(e){return null==e?String(e):o[r.call(e)]||"object"},u.isPlainObject=function(e){var t;if(!e||"object"!==u.type(e)||e.nodeType||u.isWindow(e)||e.constructor&&!s.call(e,"constructor")&&!s.call(e.constructor.prototype,"isPrototypeOf"))return!1;for(var i in e)t=i;return void 0===t||s.call(e,t)},u.isEmptyObject=function(e){for(var t in e)return!1;return!0},u.freezeObject=function(e){return Object.freeze?u.freezeObject=Object.freeze:u.freezeObject=function(e){return e},u.freezeObject(e)},u.supportsCanvas=(a=document.createElement("canvas"),!!(u.isFunction(a.getContext)&&a.getContext("2d"))),u.isCanvasTainted=function(e){var t=!1;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=!0}return t},u.supportsAddEventListener=!!(document.documentElement.addEventListener&&document.addEventListener),u.supportsRemoveEventListener=!!(document.documentElement.removeEventListener&&document.removeEventListener),u.supportsEventListenerOptions=function(){var e=0;if(u.supportsAddEventListener)try{var t={get capture(){return e++,!1},get once(){return e++,!1},get passive(){return e++,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=0}return e>=3}(),u.getCurrentPixelDensityRatio=function(){if(!u.supportsCanvas)return 1;var e=document.createElement("canvas").getContext("2d");return Math.max(window.devicePixelRatio||1,1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},u.pixelDensityRatio=u.getCurrentPixelDensityRatio(),function(e){e.extend=function(){var t,i,n,o,r,s,a=arguments[0]||{},l=arguments.length,h=!1,c=1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},c=2),"object"==typeof a||u.isFunction(a)||(a={}),l===c&&(a=this,--c);c=n.x&&i.x=n.y},getMousePosition:function(t){if("number"==typeof t.pageX)e.getMousePosition=function(t){var i=new e.Point;return i.x=t.pageX,i.y=t.pageY,i};else if("number"==typeof t.clientX)e.getMousePosition=function(t){var i=new e.Point;return i.x=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i.y=t.clientY+document.body.scrollTop+document.documentElement.scrollTop,i};else throw Error("Unknown event mouse position, no known technique.");return e.getMousePosition(t)},getPageScroll:function(){var t=document.documentElement||{},i=document.body||{};if("number"==typeof window.pageXOffset)e.getPageScroll=function(){return new e.Point(window.pageXOffset,window.pageYOffset)};else if(i.scrollLeft||i.scrollTop)e.getPageScroll=function(){return new e.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!t.scrollLeft&&!t.scrollTop)return new e.Point(0,0);e.getPageScroll=function(){return new e.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return e.getPageScroll()},setPageScroll:function(t){if(void 0!==window.scrollTo)e.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var i=e.getPageScroll();if(i.x===t.x&&i.y===t.y)return;document.body.scrollLeft=t.x,document.body.scrollTop=t.y;var n=e.getPageScroll();if(n.x!==i.x&&n.y!==i.y){e.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y};return}if(document.documentElement.scrollLeft=t.x,document.documentElement.scrollTop=t.y,(n=e.getPageScroll()).x!==i.x&&n.y!==i.y){e.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y};return}e.setPageScroll=function(e){}}e.setPageScroll(t)},getWindowSize:function(){var t=document.documentElement||{},i=document.body||{};if("number"==typeof window.innerWidth)e.getWindowSize=function(){return new e.Point(window.innerWidth,window.innerHeight)};else if(t.clientWidth||t.clientHeight)e.getWindowSize=function(){return new e.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(i.clientWidth||i.clientHeight)e.getWindowSize=function(){return new e.Point(document.body.clientWidth,document.body.clientHeight)};else throw Error("Unknown window size, no known technique.");return e.getWindowSize()},makeCenteredNode:function(t){t=e.getElement(t);var i=[e.makeNeutralElement("div"),e.makeNeutralElement("div"),e.makeNeutralElement("div")];return e.extend(i[0].style,{display:"table",height:"100%",width:"100%"}),e.extend(i[1].style,{display:"table-row"}),e.extend(i[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),i[0].appendChild(i[1]),i[1].appendChild(i[2]),i[2].appendChild(t),i[0]},makeNeutralElement:function(e){var t=document.createElement(e),i=t.style;return i.background="transparent none",i.border="none",i.margin="0px",i.padding="0px",i.position="static",t},now:function(){return Date.now?e.now=Date.now:e.now=function(){return new Date().getTime()},e.now()},makeTransparentImage:function(t){var i=e.makeNeutralElement("img");return i.src=t,i},setElementOpacity:function(t,i,n){var o;(t=e.getElement(t),n&&!e.Browser.alpha&&(i=Math.round(i)),e.Browser.opacity)?t.style.opacity=i<1?i:"":i<1?(o=Math.round(100*i),t.style.filter="alpha(opacity="+o+")"):t.style.filter=""},setElementTouchActionNone:function(t){void 0!==(t=e.getElement(t)).style.touchAction?t.style.touchAction="none":void 0!==t.style.msTouchAction&&(t.style.msTouchAction="none")},setElementPointerEvents:function(t,i){void 0!==(t=e.getElement(t)).style&&void 0!==t.style.pointerEvents&&(t.style.pointerEvents=i)},setElementPointerEventsNone:function(t){e.setElementPointerEvents(t,"none")},addClass:function(t,i){(t=e.getElement(t)).className?-1===(" "+t.className+" ").indexOf(" "+i+" ")&&(t.className+=" "+i):t.className=i},indexOf:function(e,t,i){return Array.prototype.indexOf?this.indexOf=function(e,t,i){return e.indexOf(t,i)}:this.indexOf=function(e,t,i){var n,o,r=i||0;if(!e)throw TypeError();if(0===(o=e.length)||r>=o)return -1;for(r<0&&(r=o-Math.abs(r)),n=r;n=200&&h.status<300||0===h.status&&"http:"!==l&&"https:"!==l?i(h):e.isFunction(n)?n(h):e.console.error("AJAX request returned %d: %s",h.status,t))};var c=a?"POST":"GET";try{if(h.open(c,t,!0),s&&(h.responseType=s),r)for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&r[u]&&h.setRequestHeader(u,r[u]);o&&(h.withCredentials=!0),h.send(a)}catch(t){e.console.error("%s while making AJAX request: %s",t.name,t.message),h.onreadystatechange=function(){},e.isFunction(n)&&n(h,t)}return h},jsonp:function(t){var i,n=t.url,o=document.head||document.getElementsByTagName("head")[0]||document.documentElement,r=t.callbackName||"openseadragon"+e.now(),s=window[r],a=t.param||"callback",l=t.callback;n=n.replace(/(=)\?(&|$)|\?\?/i,"$1"+r+"$2"),n+=(/\?/.test(n)?"&":"?")+a+"="+r,window[r]=function(t){if(s)window[r]=s;else try{delete window[r]}catch(e){}l&&e.isFunction(l)&&l(t)},i=document.createElement("script"),(void 0!==t.async||!1!==t.async)&&(i.async="async"),t.scriptCharset&&(i.charset=t.scriptCharset),i.src=n,i.onload=i.onreadystatechange=function(e,t){(t||!i.readyState||/loaded|complete/.test(i.readyState))&&(i.onload=i.onreadystatechange=null,o&&i.parentNode&&o.removeChild(i),i=void 0)},o.insertBefore(i,o.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(t){if(window.DOMParser)e.parseXml=function(e){return new DOMParser().parseFromString(e,"text/xml")};else if(window.ActiveXObject)e.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t};else throw Error("Browser doesn't support XML DOM.");return e.parseXml(t)},parseJSON:function(t){return e.parseJSON=window.JSON.parse,e.parseJSON(t)},imageFormatSupported:function(e){return!!i[(e=e||"").toLowerCase()]},setImageFormatsSupported:function(t){e.extend(i,t)}});var t=function(e){};e.console=window.console||{log:t,debug:t,info:t,warn:t,error:t,assert:t},e.Browser={vendor:e.BROWSERS.UNKNOWN,version:0,alpha:!0};var i={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},n={};function o(e,t){return t&&e!==document.body?document.body:e.offsetParent}(function(){var t=navigator.appVersion,i=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(i.substring(i.indexOf("MSIE")+5,i.indexOf(";",i.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(i.indexOf("Edge")>=0?(e.Browser.vendor=e.BROWSERS.EDGE,e.Browser.version=parseFloat(i.substring(i.indexOf("Edge")+5))):i.indexOf("Edg")>=0?(e.Browser.vendor=e.BROWSERS.CHROMEEDGE,e.Browser.version=parseFloat(i.substring(i.indexOf("Edg")+4))):i.indexOf("Firefox")>=0?(e.Browser.vendor=e.BROWSERS.FIREFOX,e.Browser.version=parseFloat(i.substring(i.indexOf("Firefox")+8))):i.indexOf("Safari")>=0?(e.Browser.vendor=i.indexOf("Chrome")>=0?e.BROWSERS.CHROME:e.BROWSERS.SAFARI,e.Browser.version=parseFloat(i.substring(i.substring(0,i.indexOf("Safari")).lastIndexOf("/")+1,i.indexOf("Safari")))):null!==RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(i)&&(e.Browser.vendor=e.BROWSERS.IE,e.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":e.Browser.vendor=e.BROWSERS.OPERA,e.Browser.version=parseFloat(t)}var o,r,s,a=window.location.search.substring(1).split("&");for(s=0;s0){var l=o.substring(0,r),h=o.substring(r+1);try{n[l]=decodeURIComponent(h)}catch(t){e.console.error("Ignoring malformed URL parameter: %s=%s",l,h)}}e.Browser.alpha=!(e.Browser.vendor===e.BROWSERS.CHROME&&e.Browser.version<2),e.Browser.opacity=!0,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<11&&e.console.error("Internet Explorer versions < 11 are not supported by OpenSeadragon")})(),function(t){var i=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame,n=t.cancelAnimationFrame||t.mozCancelAnimationFrame||t.webkitCancelAnimationFrame||t.msCancelAnimationFrame;if(i&&n)e.requestAnimationFrame=function(){return i.apply(t,arguments)},e.cancelAnimationFrame=function(){return n.apply(t,arguments)};else{var o,r=[],s=[],a=0;e.requestAnimationFrame=function(t){return r.push([++a,t]),o||(o=setInterval(function(){if(r.length){var t=e.now(),i=s;for(s=r,r=i;s.length;)s.shift()[1](t)}else clearInterval(o),o=void 0},20)),a},e.cancelAnimationFrame=function(e){var t,i;for(t=0,i=r.length;t0&&o[r-1].priorityi.touches.length-s&&e.console.warn("Tracked touch contact count doesn't match event.touches.length");var l={originalEvent:i,eventType:"pointerdown",pointerType:"touch",isEmulated:!1};for(H(t,l),o=0;o0){for(i=0,r=[],o=n.asArray();i8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur","contextmenu",e.MouseTracker.wheelEventName],"DOMMouseScroll"===e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent)?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerenter","pointerleave","pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.havePointerCapture=(s=document.createElement("div"),e.isFunction(s.setPointerCapture)&&e.isFunction(s.releasePointerCapture)),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("gotpointercapture","lostpointercapture")):(e.MouseTracker.havePointerEvents=!1,e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave","mouseover","mouseout","mousedown","mouseup","mousemove"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.havePointerCapture=(a=document.createElement("div"),e.isFunction(a.setCapture)&&e.isFunction(a.releaseCapture)),e.MouseTracker.havePointerCapture&&e.MouseTracker.subscribeEvents.push("losecapture"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange")),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,i=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(e.console.warn("GesturePointList.addContact() Implausible contacts value"),this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}}}(u),u.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},u.Control=function(e,t,i){var n=e.parentNode;"number"==typeof t&&(u.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),t={anchor:t}),t.attachToViewer=void 0===t.attachToViewer||t.attachToViewer,this.autoFade=void 0===t.autoFade||t.autoFade,this.element=e,this.anchor=t.anchor,this.container=i,this.anchor===u.ControlAnchor.ABSOLUTE?(this.wrapper=u.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof t.top?t.top+"px":t.top,this.wrapper.style.left="number"==typeof t.left?t.left+"px":t.left,this.wrapper.style.height="number"==typeof t.height?t.height+"px":t.height,this.wrapper.style.width="number"==typeof t.width?t.width+"px":t.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=u.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor===u.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),t.attachToViewer?this.anchor===u.ControlAnchor.TOP_RIGHT||this.anchor===u.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):n.appendChild(this.wrapper)},u.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.anchor!==u.ControlAnchor.NONE&&this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!==this.wrapper.style.display},setVisible:function(e){this.wrapper.style.display=e?this.anchor===u.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(e){this.element[u.SIGNAL]&&u.Browser.vendor===u.BROWSERS.IE?u.setElementOpacity(this.element,e,!0):u.setElementOpacity(this.wrapper,e,!0)}},function(e){function t(e,t){var i,n=e.controls;for(i=n.length-1;i>=0;i--)if(n[i].element===t)return i;return -1}e.ControlDock=function(t){var i,n,o=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),n=0;n=0)){switch(n.anchor){case e.ControlAnchor.TOP_RIGHT:o=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:o=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:o=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:o=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:default:case e.ControlAnchor.NONE:o=this.container,i.style.margin="0px",i.style.padding="0px"}this.controls.push(new e.Control(i,n,o)),i.style.display="inline-block"}},removeControl:function(i){var n=t(this,i=e.getElement(i));return n>=0&&(this.controls[n].destroy(),this.controls.splice(n,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(u),u.Placement=u.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}}),function(e){var t={},i=1;function n(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function o(t,i){if(i instanceof e.Overlay)return i;var n=null;if(i.element)n=e.getElement(i.element);else{var o=i.id?i.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(n=e.getElement(i.id))||((n=document.createElement("a")).href="#/overlay/"+o),n.id=o,e.addClass(n,i.className?i.className:"openseadragon-overlay")}var r=i.location,s=i.width,a=i.height;if(!r){var l=i.x,h=i.y;if(void 0!==i.px){var c=t.viewport.imageToViewportRectangle(new e.Rect(i.px,i.py,s||0,a||0));l=c.x,h=c.y,s=void 0!==s?c.width:void 0,a=void 0!==a?c.height:void 0}r=new e.Point(l,h)}var u=i.placement;return u&&"string"===e.type(u)&&(u=e.Placement[i.placement.toUpperCase()]),new e.Overlay({element:n,location:r,placement:u,onDraw:i.onDraw,checkResize:i.checkResize,width:s,height:a,rotationMode:i.rotationMode})}function r(e,t){var i;for(i=e.length-1;i>=0;i--)if(e[i].element===t)return i;return -1}function s(t,i){return e.requestAnimationFrame(function(){i(t)})}function a(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout(function(){(function t(i){e.requestAnimationFrame(function(){(function(i){var n,o;if(i.controlsShouldFade){for(n=Math.max(0,n=Math.min(1,n=1-(e.now()-i.controlsFadeBeginTime)/i.controlsFadeLength)),o=i.controls.length-1;o>=0;o--)i.controls[o].autoFade&&i.controls[o].setOpacity(n);n>0&&t(i)}})(i)})})(t)},t.controlsFadeDelay))}function l(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function h(){l(this)}function c(){a(this)}function u(e){var t={tracker:e.eventSource,position:e.position,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.raiseEvent("canvas-contextmenu",t),e.preventDefault=t.preventDefault}function d(t){var i={originalEvent:t.originalEvent,preventDefaultAction:!1,preventVerticalPan:t.preventVerticalPan||!this.panVertical,preventHorizontalPan:t.preventHorizontalPan||!this.panHorizontal};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)t.preventDefault=!1;else switch(t.keyCode){case 38:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 40:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 37:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 39:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 187:this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 189:this.viewport.zoomBy(.9),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 48:this.viewport.goHome(),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 87:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 83:i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 65:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 68:i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),t.preventDefault=!0;break;case 82:t.shift?this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.flipped?this.viewport.setRotation(this.viewport.getRotation()-this.rotationIncrement):this.viewport.setRotation(this.viewport.getRotation()+this.rotationIncrement),this.viewport.applyConstraints(),t.preventDefault=!0;break;case 70:this.viewport.toggleFlip(),t.preventDefault=!0;break;case 74:this.goToPreviousPage();break;case 75:this.goToNextPage();break;default:t.preventDefault=!1}}function p(e){var t={originalEvent:e.originalEvent};this.raiseEvent("canvas-key-press",t)}function g(i){document.activeElement!==this.canvas&&this.canvas.focus(),this.viewport.flipped&&(i.position.x=this.viewport.getContainerSize().x-i.position.x);var n,o={tracker:i.eventSource,position:i.position,quick:i.quick,shift:i.shift,originalEvent:i.originalEvent,originalTarget:i.originalTarget,preventDefaultAction:!1};this.raiseEvent("canvas-click",o),!o.preventDefaultAction&&this.viewport&&i.quick&&(!0===(n=this.gestureSettingsByDeviceType(i.pointerType)).clickToZoom&&(this.viewport.zoomBy(i.shift?1/this.zoomPerClick:this.zoomPerClick,n.zoomToRefPoint?this.viewport.pointFromPixel(i.position,!0):null),this.viewport.applyConstraints()),n.dblClickDragToZoom&&(!0===t[this.hash].draggingToZoom?(t[this.hash].lastClickTime=null,t[this.hash].draggingToZoom=!1):t[this.hash].lastClickTime=e.now()))}function m(e){var t,i={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.raiseEvent("canvas-double-click",i),!i.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function v(e){var i,n={tracker:e.eventSource,pointerType:e.pointerType,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag",n),i=this.gestureSettingsByDeviceType(e.pointerType),!n.preventDefaultAction&&this.viewport){if(i.dblClickDragToZoom&&t[this.hash].draggingToZoom){var o=Math.pow(this.zoomPerDblClickDrag,e.delta.y/50);this.viewport.zoomBy(o)}else if(i.dragToPan&&!t[this.hash].draggingToZoom){if(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var r=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=r.x,this.viewport.centerSpringY.target.value+=r.y;var s=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=r.x,this.viewport.centerSpringY.target.value-=r.y,s.xConstrained&&(e.delta.x=0),s.yConstrained&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),i.flickEnabled&&!this.constrainDuringPan)}}}function f(i){var n,o={tracker:i.eventSource,pointerType:i.pointerType,position:i.position,speed:i.speed,direction:i.direction,shift:i.shift,originalEvent:i.originalEvent,preventDefaultAction:!1};if(this.raiseEvent("canvas-drag-end",o),n=this.gestureSettingsByDeviceType(i.pointerType),!o.preventDefaultAction&&this.viewport){if(!t[this.hash].draggingToZoom&&n.flickEnabled&&i.speed>=n.flickMinSpeed){var r=0;this.panHorizontal&&(r=n.flickMomentum*i.speed*Math.cos(i.direction));var s=0;this.panVertical&&(s=n.flickMomentum*i.speed*Math.sin(i.direction));var a=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),l=this.viewport.pointFromPixel(new e.Point(a.x-r,a.y-s));this.viewport.panTo(l,!1)}this.viewport.applyConstraints()}n.dblClickDragToZoom&&!0===t[this.hash].draggingToZoom&&(t[this.hash].draggingToZoom=!1)}function y(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function w(e){this.raiseEvent("canvas-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function T(i){if(this.raiseEvent("canvas-press",{tracker:i.eventSource,pointerType:i.pointerType,position:i.position,insideElementPressed:i.insideElementPressed,insideElementReleased:i.insideElementReleased,originalEvent:i.originalEvent}),this.gestureSettingsByDeviceType(i.pointerType).dblClickDragToZoom){var n=t[this.hash].lastClickTime,o=e.now();null!==n&&(o-nthis.minScrollDeltaTime?(this._lastScrollTime=r,i={tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent,preventDefaultAction:!1,preventDefault:!0},this.raiseEvent("canvas-scroll",i),!i.preventDefaultAction&&this.viewport&&(this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),(n=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(o=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(o,n.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints())),t.preventDefault=i.preventDefault):t.preventDefault=!0}function b(e){t[this.hash].mouseInside=!0,l(this),this.raiseEvent("container-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function D(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||a(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function I(i){(function(i){if(!i._opening&&t[i.hash]){if(i.autoResize||t[i.hash].forceResize){if(i._autoResizePolling){o=n(i.container);var o,r=t[i.hash].prevContainerSize;o.equals(r)||(t[i.hash].needsResize=!0)}t[i.hash].needsResize&&function(i,n){var o,r=i.viewport,s=r.getZoom(),a=r.getCenter();if(r.resize(n,i.preserveImageSizeOnResize),r.panTo(a,!0),i.preserveImageSizeOnResize)o=t[i.hash].prevContainerSize.x/n.x;else{var l=new e.Point(0,0),h=new e.Point(t[i.hash].prevContainerSize.x,t[i.hash].prevContainerSize.y).distanceTo(l);o=new e.Point(n.x,n.y).distanceTo(l)/h*t[i.hash].prevContainerSize.x/n.x}r.zoomTo(s*o,null,!0),t[i.hash].prevContainerSize=n,t[i.hash].forceRedraw=!0,t[i.hash].needsResize=!1,t[i.hash].forceResize=!1}(i,o||n(i.container))}var s=i.viewport.update(),h=i.world.update()||s;s&&i.raiseEvent("viewport-change"),i.referenceStrip&&(h=i.referenceStrip.update(i.viewport)||h);var c=t[i.hash].animating;!c&&h&&(i.raiseEvent("animation-start"),l(i));var u=c&&!h;u&&(t[i.hash].animating=!1),(h||u||t[i.hash].forceRedraw||i.world.needsDraw())&&(i.imageLoader.clear(),i.drawer.clear(),i.world.draw(),i.raiseEvent("update-viewport",{}),i._drawOverlays(),i.navigator&&i.navigator.update(i.viewport),t[i.hash].forceRedraw=!1,h&&i.raiseEvent("animation")),u&&(i.raiseEvent("animation-finish"),t[i.hash].mouseInside||a(i)),t[i.hash].animating=h}})(i),i.isOpen()?i._updateRequestId=s(i,I):i._updateRequestId=!1}function k(e,t){return e?e+t:t}function O(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,B(this)}function H(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,B(this)}function z(){t[this.hash].zooming=!1}function B(t){e.requestAnimationFrame(e.delegate(t,L))}function L(){var i,n,o;t[this.hash].zooming&&this.viewport&&(n=(i=e.now())-t[this.hash].lastZoomTime,o=Math.pow(t[this.hash].zoomFactor,n/1e3),this.viewport.zoomBy(o),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=i,B(this))}function F(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function M(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function N(){this.buttonGroup&&(this.buttonGroup.emulateEnter(),this.buttonGroup.emulateLeave())}function A(){this.viewport&&this.viewport.goHome()}function W(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttonGroup&&this.buttonGroup.emulateLeave(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function U(){if(this.viewport){var e=this.viewport.getRotation();this.viewport.flipped?e+=this.rotationIncrement:e-=this.rotationIncrement,this.viewport.setRotation(e)}}function V(){if(this.viewport){var e=this.viewport.getRotation();this.viewport.flipped?e-=this.rotationIncrement:e+=this.rotationIncrement,this.viewport.setRotation(e)}}function j(){this.viewport.toggleFlip()}e.Viewer=function(o){var r,l,h,c=arguments,k=this;if(e.isPlainObject(o)||(o={id:c[0],xmlPath:c.length>1?c[1]:void 0,prefixUrl:c.length>2?c[2]:void 0,controls:c.length>3?c[3]:void 0,overlays:c.length>4?c[4]:void 0}),o.config&&(e.extend(!0,o,o.config),delete o.config),e.extend(!0,this,{id:o.id,hash:o.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttonGroup:null,profiler:null},e.DEFAULT_SETTINGS,o),void 0===this.hash)throw Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,needsResize:!1,forceResize:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null,lastClickTime:null,draggingToZoom:!1},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._updatePixelDensityRatioBind=null,this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",function(t){var i=e.getString("Errors.OpenFailed",t.eventSource,t.message);k._showMessage(i)}),e.ControlDock.call(this,o),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",(r=this.canvas.style).width="100%",r.height="100%",r.overflow="hidden",r.position="absolute",r.top="0px",r.left="0px",e.setElementTouchActionNone(this.canvas),""!==o.tabIndex&&(this.canvas.tabIndex=void 0===o.tabIndex?0:o.tabIndex),this.container.className="openseadragon-container",(l=this.container.style).width="100%",l.height="100%",l.position="relative",l.overflow="hidden",l.left="0px",l.top="0px",l.textAlign="left",e.setElementTouchActionNone(this.container),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({userData:"Viewer.innerTracker",element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,contextMenuHandler:e.delegate(this,u),keyDownHandler:e.delegate(this,d),keyHandler:e.delegate(this,p),clickHandler:e.delegate(this,g),dblClickHandler:e.delegate(this,m),dragHandler:e.delegate(this,v),dragEndHandler:e.delegate(this,f),enterHandler:e.delegate(this,y),leaveHandler:e.delegate(this,w),pressHandler:e.delegate(this,T),releaseHandler:e.delegate(this,x),nonPrimaryPressHandler:e.delegate(this,S),nonPrimaryReleaseHandler:e.delegate(this,E),scrollHandler:e.delegate(this,C),pinchHandler:e.delegate(this,P),focusHandler:e.delegate(this,_),blurHandler:e.delegate(this,R)}),this.outerTracker=new e.MouseTracker({userData:"Viewer.outerTracker",element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,b),leaveHandler:e.delegate(this,D)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=n(this.container),window.ResizeObserver?(this._autoResizePolling=!1,this._resizeObserver=new ResizeObserver(function(){t[k.hash].needsResize=!0}),this._resizeObserver.observe(this.container,{})):this._autoResizePolling=!0,this.world=new e.World({viewer:this}),this.world.addHandler("add-item",function(e){k.source=k.world.getItemAt(0).source,t[k.hash].forceRedraw=!0,k._updateRequestId||(k._updateRequestId=s(k,I))}),this.world.addHandler("remove-item",function(e){k.world.getItemCount()?k.source=k.world.getItemAt(0).source:k.source=null,t[k.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(e){k.viewport&&k.viewport._setContentBounds(k.world.getHomeBounds(),k.world.getContentFactor())}),this.world.addHandler("item-index-change",function(e){k.source=k.world.getItemAt(0).source}),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins,silenceMultiImageWarnings:this.silenceMultiImageWarnings}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:o.timeout,tileRetryMax:this.tileRetryMax,tileRetryDelay:this.tileRetryDelay}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),!this.drawer.canRotate()&&(this.rotateLeft&&(h=this.buttonGroup.buttons.indexOf(this.rotateLeft),this.buttonGroup.buttons.splice(h,1),this.buttonGroup.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(h=this.buttonGroup.buttons.indexOf(this.rotateRight),this.buttonGroup.buttons.splice(h,1),this.buttonGroup.element.removeChild(this.rotateRight.element))),this._addUpdatePixelDensityRatioEvent(),this.showNavigator&&(this.navigator=new e.Navigator({element:this.navigatorElement,id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy,animationTime:this.animationTime})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),h=0;h-1&&t.index\s*$/))i=e.parseXml(i);else if(i.match(/^\s*[{[].*[}\]]\s*$/))try{i=e.parseJSON(i)}catch(e){}}function s(e,t){e.ready?o(e):(e.addHandler("ready",function(){o(e)}),e.addHandler("open-failed",function(e){r({message:e.message,source:t})}))}setTimeout(function(){if("string"===e.type(i))(i=new e.TileSource({url:i,crossOriginPolicy:void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:n.ajaxHeaders?n.ajaxHeaders:t.ajaxHeaders,splitHashDataForPost:t.splitHashDataForPost,useCanvas:t.useCanvas,success:function(e){o(e.tileSource)}})).addHandler("open-failed",function(e){r(e)});else if(e.isPlainObject(i)||i.nodeType){if(void 0===i.crossOriginPolicy&&(void 0!==n.crossOriginPolicy||void 0!==t.crossOriginPolicy)&&(i.crossOriginPolicy=void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy),void 0===i.ajaxWithCredentials&&(i.ajaxWithCredentials=t.ajaxWithCredentials),void 0===i.useCanvas&&(i.useCanvas=t.useCanvas),e.isFunction(i.getTileUrl)){var a=new e.TileSource(i);a.getTileUrl=i.getTileUrl,o(a)}else{var l=e.TileSource.determineType(t,i);if(!l){r({message:"Unable to load TileSource",source:i});return}var h=l.prototype.configure.apply(t,[i]);s(new l(h),i)}}else s(i,i)})}(this,t.tileSource,t,function(e){n.tileSource=e,s()},function(e){e.options=t,o(e),s()})},addSimpleImage:function(t){e.console.assert(t,"[Viewer.addSimpleImage] options is required"),e.console.assert(t.url,"[Viewer.addSimpleImage] options.url is required");var i=e.extend({},t,{tileSource:{type:"image",url:t.url}});delete i.url,this.addTiledImage(i)},addLayer:function(t){var i=this;e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");var n=e.extend({},t,{success:function(e){i.raiseEvent("add-layer",{options:t,drawer:e.item})},error:function(e){i.raiseEvent("add-layer-failed",e)}});return this.addTiledImage(n),this},getLayerAtLevel:function(t){return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."),this.world.getItemAt(t)},getLevelOfLayer:function(t){return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."),this.world.getIndexOfItem(t)},getLayersCount:function(){return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."),this.world.getItemCount()},setLayerLevel:function(t,i){return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."),this.world.setItemIndex(t,i)},removeLayer:function(t){return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."),this.world.removeItem(t)},forceRedraw:function(){return t[this.hash].forceRedraw=!0,this},forceResize:function(){t[this.hash].needsResize=!0,t[this.hash].forceResize=!0},bindSequenceControls:function(){var t=e.delegate(this,h),i=e.delegate(this,c),n=e.delegate(this,this.goToNextPage),o=e.delegate(this,this.goToPreviousPage),r=this.navImages,s=!0;return this.showSequenceControl&&((this.previousButton||this.nextButton)&&(s=!1),this.previousButton=new e.Button({element:this.previousButton?e.getElement(this.previousButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.PreviousPage"),srcRest:k(this.prefixUrl,r.previous.REST),srcGroup:k(this.prefixUrl,r.previous.GROUP),srcHover:k(this.prefixUrl,r.previous.HOVER),srcDown:k(this.prefixUrl,r.previous.DOWN),onRelease:o,onFocus:t,onBlur:i}),this.nextButton=new e.Button({element:this.nextButton?e.getElement(this.nextButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.NextPage"),srcRest:k(this.prefixUrl,r.next.REST),srcGroup:k(this.prefixUrl,r.next.GROUP),srcHover:k(this.prefixUrl,r.next.HOVER),srcDown:k(this.prefixUrl,r.next.DOWN),onRelease:n,onFocus:t,onBlur:i}),this.navPrevNextWrap||this.previousButton.disable(),this.tileSources&&this.tileSources.length||this.nextButton.disable(),s&&(this.paging=new e.ButtonGroup({buttons:[this.previousButton,this.nextButton],clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.pagingControl=this.paging.element,this.toolbar?this.toolbar.addControl(this.pagingControl,{anchor:e.ControlAnchor.BOTTOM_RIGHT}):this.addControl(this.pagingControl,{anchor:this.sequenceControlAnchor||e.ControlAnchor.TOP_LEFT}))),this},bindStandardControls:function(){var t=e.delegate(this,O),i=e.delegate(this,z),n=e.delegate(this,F),o=e.delegate(this,H),r=e.delegate(this,M),s=e.delegate(this,A),a=e.delegate(this,W),l=e.delegate(this,U),u=e.delegate(this,V),d=e.delegate(this,j),p=e.delegate(this,h),g=e.delegate(this,c),m=this.navImages,v=[],f=!0;return this.showNavigationControl&&((this.zoomInButton||this.zoomOutButton||this.homeButton||this.fullPageButton||this.rotateLeftButton||this.rotateRightButton||this.flipButton)&&(f=!1),this.showZoomControl&&(v.push(this.zoomInButton=new e.Button({element:this.zoomInButton?e.getElement(this.zoomInButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomIn"),srcRest:k(this.prefixUrl,m.zoomIn.REST),srcGroup:k(this.prefixUrl,m.zoomIn.GROUP),srcHover:k(this.prefixUrl,m.zoomIn.HOVER),srcDown:k(this.prefixUrl,m.zoomIn.DOWN),onPress:t,onRelease:i,onClick:n,onEnter:t,onExit:i,onFocus:p,onBlur:g})),v.push(this.zoomOutButton=new e.Button({element:this.zoomOutButton?e.getElement(this.zoomOutButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.ZoomOut"),srcRest:k(this.prefixUrl,m.zoomOut.REST),srcGroup:k(this.prefixUrl,m.zoomOut.GROUP),srcHover:k(this.prefixUrl,m.zoomOut.HOVER),srcDown:k(this.prefixUrl,m.zoomOut.DOWN),onPress:o,onRelease:i,onClick:r,onEnter:o,onExit:i,onFocus:p,onBlur:g}))),this.showHomeControl&&v.push(this.homeButton=new e.Button({element:this.homeButton?e.getElement(this.homeButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Home"),srcRest:k(this.prefixUrl,m.home.REST),srcGroup:k(this.prefixUrl,m.home.GROUP),srcHover:k(this.prefixUrl,m.home.HOVER),srcDown:k(this.prefixUrl,m.home.DOWN),onRelease:s,onFocus:p,onBlur:g})),this.showFullPageControl&&v.push(this.fullPageButton=new e.Button({element:this.fullPageButton?e.getElement(this.fullPageButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.FullPage"),srcRest:k(this.prefixUrl,m.fullpage.REST),srcGroup:k(this.prefixUrl,m.fullpage.GROUP),srcHover:k(this.prefixUrl,m.fullpage.HOVER),srcDown:k(this.prefixUrl,m.fullpage.DOWN),onRelease:a,onFocus:p,onBlur:g})),this.showRotationControl&&(v.push(this.rotateLeftButton=new e.Button({element:this.rotateLeftButton?e.getElement(this.rotateLeftButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateLeft"),srcRest:k(this.prefixUrl,m.rotateleft.REST),srcGroup:k(this.prefixUrl,m.rotateleft.GROUP),srcHover:k(this.prefixUrl,m.rotateleft.HOVER),srcDown:k(this.prefixUrl,m.rotateleft.DOWN),onRelease:l,onFocus:p,onBlur:g})),v.push(this.rotateRightButton=new e.Button({element:this.rotateRightButton?e.getElement(this.rotateRightButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.RotateRight"),srcRest:k(this.prefixUrl,m.rotateright.REST),srcGroup:k(this.prefixUrl,m.rotateright.GROUP),srcHover:k(this.prefixUrl,m.rotateright.HOVER),srcDown:k(this.prefixUrl,m.rotateright.DOWN),onRelease:u,onFocus:p,onBlur:g}))),this.showFlipControl&&v.push(this.flipButton=new e.Button({element:this.flipButton?e.getElement(this.flipButton):null,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,tooltip:e.getString("Tooltips.Flip"),srcRest:k(this.prefixUrl,m.flip.REST),srcGroup:k(this.prefixUrl,m.flip.GROUP),srcHover:k(this.prefixUrl,m.flip.HOVER),srcDown:k(this.prefixUrl,m.flip.DOWN),onRelease:d,onFocus:p,onBlur:g})),f?(this.buttonGroup=new e.ButtonGroup({buttons:v,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold}),this.navControl=this.buttonGroup.element,this.addHandler("open",e.delegate(this,N)),this.toolbar?this.toolbar.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT}):this.addControl(this.navControl,{anchor:this.navigationControlAnchor||e.ControlAnchor.TOP_LEFT})):this.customButtons=v),this},currentPage:function(){return this._sequenceIndex},goToPage:function(e){return this.tileSources&&e>=0&&e=0)return this;var a,l=o(this,a);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:a.location,placement:a.placement}),this},updateOverlay:function(i,n,o){var s;return i=e.getElement(i),(s=r(this.currentOverlays,i))>=0&&(this.currentOverlays[s].update(n,o),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:i,location:n,placement:o})),this},removeOverlay:function(i){var n;return i=e.getElement(i),(n=r(this.currentOverlays,i))>=0&&(this.currentOverlays[n].destroy(),this.currentOverlays.splice(n,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:i})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var i;return(t=e.getElement(t),(i=r(this.currentOverlays,t))>=0)?this.currentOverlays[i]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var i=e.makeNeutralElement("div");i.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(i),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex)):e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')},_addUpdatePixelDensityRatioEvent:function(){this._updatePixelDensityRatioBind=this._updatePixelDensityRatio.bind(this),e.addEvent(window,"resize",this._updatePixelDensityRatioBind)},_removeUpdatePixelDensityRatioEvent:function(){e.removeEvent(window,"resize",this._updatePixelDensityRatioBind)},_updatePixelDensityRatio:function(){var t=e.pixelDensityRatio,i=e.getCurrentPixelDensityRatio();t!==i&&(e.pixelDensityRatio=i,this.world.resetItems(),this.forceRedraw())},goToPreviousPage:function(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)},goToNextPage:function(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)},isAnimating:function(){return t[this.hash].animating}})}(u),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var i=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(i.x=this.viewer.viewport.getCenter(!0).x):i.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(i),this.viewer.viewport.applyConstraints()}}function i(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:!1};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function n(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function o(e){var t={tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent,preventDefault:e.preventDefault};this.viewer.raiseEvent("navigator-scroll",t),e.preventDefault=t.preventDefault}function r(e,t){s(e,"rotate("+t+"deg)")}function s(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(s){var a,l,h,c,u,d,p=s.viewer,g=this;function m(e,t){r(g.displayRegionContainer,e),r(g.displayRegion,-e),g.viewport.setRotation(e,t)}s.element||s.id?(s.element?(s.id&&e.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."),s.element.id?s.id=s.element.id:s.id="navigator-"+e.now(),this.element=s.element):this.element=document.getElementById(s.id),s.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(s.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),s.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:s.autoFade},s.position&&("BOTTOM_RIGHT"===s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"===s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"===s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"===s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"===s.position&&(s.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,s.controlOptions.top=s.top,s.controlOptions.left=s.left,s.controlOptions.height=s.height,s.controlOptions.width=s.width))),this.element.id=s.id,this.element.className+=" navigator",(s=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},s,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:s.animationTime,autoResize:!1,minZoomImageRatio:1,background:s.background,opacity:s.opacity,borderColor:s.borderColor,displayRegionColor:s.displayRegionColor})).minPixelRatio=this.minPixelRatio=p.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),s.controlOptions.anchor!==e.ControlAnchor.NONE&&(a=this.element.style,l=this.borderWidth,a.margin="0px",a.border=l+"px solid "+s.borderColor,a.padding="0px",a.background=s.background,a.opacity=s.opacity,a.overflow="hidden"),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",h=this.displayRegion.style,c=this.borderWidth,h.position="relative",h.top="0px",h.left="0px",h.fontSize="0px",h.overflow="hidden",h.border=c+"px solid "+s.displayRegionColor,h.margin="0px",h.padding="0px",h.background="transparent",h.float="left",h.cssFloat="left",h.styleFloat="left",h.zIndex=999999999,h.cursor="default",h.boxSizing="content-box",e.setElementPointerEventsNone(this.displayRegion),e.setElementTouchActionNone(this.displayRegion),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",e.setElementPointerEventsNone(this.displayRegionContainer),e.setElementTouchActionNone(this.displayRegionContainer),p.addControl(this.element,s.controlOptions),this._resizeWithViewer=s.controlOptions.anchor!==e.ControlAnchor.ABSOLUTE&&s.controlOptions.anchor!==e.ControlAnchor.NONE,s.width&&s.height?(this.setWidth(s.width),this.setHeight(s.height)):this._resizeWithViewer&&(u=e.getElementSize(p.element),this.element.style.height=Math.round(u.y*s.sizeRatio)+"px",this.element.style.width=Math.round(u.x*s.sizeRatio)+"px",this.oldViewerSize=u,d=e.getElementSize(this.element),this.elementArea=d.x*d.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[s]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),s.navigatorRotate&&(m(s.viewer.viewport?s.viewer.viewport.getRotation():s.viewer.degrees||0,!0),s.viewer.addHandler("rotate",function(e){m(e.degrees,e.immediately)})),this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({userData:"Navigator.innerTracker",element:this.element,dragHandler:e.delegate(this,i),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,n),scrollHandler:e.delegate(this,o),preProcessEventHandler:function(e){"wheel"===e.eventType&&(e.preventDefault=!0)}}),this.outerTracker.userData="Navigator.outerTracker",e.setElementPointerEventsNone(this.canvas),e.setElementPointerEventsNone(this.container),this.addHandler("reset-size",function(){g.viewport&&g.viewport.goHome(!0)}),p.world.addHandler("item-index-change",function(e){window.setTimeout(function(){var t=g.world.getItemAt(e.previousIndex);g.world.setItemIndex(t,e.newIndex)},1)}),p.world.addHandler("remove-item",function(e){var t=e.item,i=g._getMatchingItem(t);i&&g.world.removeItem(i)}),this.update(p.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"==typeof e?e+"px":e,this._resizeWithViewer=!1,this.updateSize()},setHeight:function(e){this.height=e,this.element.style.height="number"==typeof e?e+"px":e,this._resizeWithViewer=!1,this.updateSize()},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){s(this.displayRegion,e),s(this.canvas,e),s(this.element,e)},update:function(t){var i,n,o,s,a,l;if(i=e.getElementSize(this.viewer.element),this._resizeWithViewer&&i.x&&i.y&&!i.equals(this.oldViewerSize)&&(this.oldViewerSize=i,this.maintainSizeRatio||!this.elementArea?(n=i.x*this.sizeRatio,o=i.y*this.sizeRatio):(n=Math.sqrt(this.elementArea*(i.x/i.y)),o=this.elementArea/n),this.element.style.width=Math.round(n)+"px",this.element.style.height=Math.round(o)+"px",this.elementArea||(this.elementArea=n*o),this.updateSize()),t&&this.viewport){if(s=t.getBoundsNoRotate(!0),a=this.viewport.pixelFromPointNoRotate(s.getTopLeft(),!1),l=this.viewport.pixelFromPointNoRotate(s.getBottomRight(),!1).minus(this.totalBorderWidths),!this.navigatorRotate){var h=t.getRotation(!0);r(this.displayRegion,-h)}var c=this.displayRegion.style;c.display=this.world.getItemCount()?"block":"none",c.top=a.y.toFixed(2)+"px",c.left=a.x.toFixed(2)+"px";var u=l.x-a.x,d=l.y-a.y;c.width=Math.round(Math.max(u,0))+"px",c.height=Math.round(Math.max(d,0))+"px"}},addTiledImage:function(t){var i=this,n=t.originalTiledImage;delete t.original;var o=e.extend({},t,{success:function(e){var t=e.item;function o(){i._matchBounds(t,n)}t._originalForNavigator=n,i._matchBounds(t,n,!0),i._matchOpacity(t,n),i._matchCompositeOperation(t,n),n.addHandler("bounds-change",o),n.addHandler("clip-change",o),n.addHandler("opacity-change",function(){i._matchOpacity(t,n)}),n.addHandler("composite-operation-change",function(){i._matchCompositeOperation(t,n)})}});return e.Viewer.prototype.addTiledImage.apply(this,[o])},destroy:function(){return e.Viewer.prototype.destroy.apply(this)},_getMatchingItem:function(e){for(var t,i=this.world.getItemCount(),n=0;n1)&&!(t.y>1);e++);return e-1},getTileAtPoint:function(e,t){var i=t.x>=0&&t.x<=1&&t.y>=0&&t.y<=1/this.aspectRatio;u.console.assert(i,"[TileSource.getTileAtPoint] must be called with a valid point.");var n=this.dimensions.x*this.getLevelScale(e),o=t.x*n,r=t.y*n,s=Math.floor(o/this.getTileWidth(e)),a=Math.floor(r/this.getTileHeight(e));return t.x>=1&&(s=this.getNumTiles(e).x-1),t.y>=1/this.aspectRatio-1e-15&&(a=this.getNumTiles(e).y-1),new u.Point(s,a)},getTileBounds:function(e,t,i,n){var o=this.dimensions.times(this.getLevelScale(e)),r=this.getTileWidth(e),s=this.getTileHeight(e),a=0===t?0:r*t-this.tileOverlap,l=0===i?0:s*i-this.tileOverlap,h=r+(0===t?1:2)*this.tileOverlap,c=s+(0===i?1:2)*this.tileOverlap,d=1/o.x;return(h=Math.min(h,o.x-a),c=Math.min(c,o.y-l),n)?new u.Rect(0,0,h,c):new u.Rect(a*d,l*d,h*d,c*d)},getImageInfo:function(e){var t,i,n,o,r,s,a,l=this;e&&(a=(s=(r=e.split("/"))[r.length-1]).lastIndexOf("."))>-1&&(r[r.length-1]=s.slice(0,a));var h=null;if(this.splitHashDataForPost){var c=e.indexOf("#");-1!==c&&(h=e.substring(c+1),e=e.substr(0,c))}i=function(t){"string"==typeof t&&(t=u.parseXml(t));var i=u.TileSource.determineType(l,t,e);if(!i){l.raiseEvent("open-failed",{message:"Unable to load TileSource",source:e});return}void 0===(o=i.prototype.configure.apply(l,[t,e,h])).ajaxWithCredentials&&(o.ajaxWithCredentials=l.ajaxWithCredentials),n=new i(o),l.ready=!0,l.raiseEvent("ready",{tileSource:n})},e.match(/\.js$/)?(t=e.split("/").pop().replace(".js",""),u.jsonp({url:e,async:!1,callbackName:t,callback:i})):u.makeAjaxRequest({url:e,postData:h,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(e){i(function(e){var t,i,n=e.responseText,o=e.status;if(e){if(200!==e.status&&0!==e.status)throw t=404===(o=e.status)?"Not Found":e.statusText,Error(u.getString("Errors.Status",o,t))}else throw Error(u.getString("Errors.Security"));if(n.match(/^\s*<.*/))try{i=e.responseXML&&e.responseXML.documentElement?e.responseXML:u.parseXml(n)}catch(t){i=e.responseText}else if(n.match(/\s*[{[].*/))try{i=u.parseJSON(n)}catch(e){i=n}else i=n;return i}(e))},error:function(t,i){var n;try{n="HTTP "+t.status+" attempting to load TileSource: "+e}catch(t){n=(void 0!==i&&i.toString?i.toString():"Unknown error")+" attempting to load TileSource: "+e}u.console.error(n),l.raiseEvent("open-failed",{message:n,source:e,postData:h})}})},supports:function(e,t){return!1},configure:function(e,t,i){throw Error("Method not implemented.")},getTileUrl:function(e,t,i){throw Error("Method not implemented.")},getTilePostData:function(e,t,i){return null},getTileAjaxHeaders:function(e,t,i){return{}},getTileHashKey:function(e,t,i,n,o,r){var s;return s="string"!=typeof n?e+"/"+t+"_"+i:n,o?s+"+"+JSON.stringify(o):s},tileExists:function(e,t,i){var n=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&i>=0&&t=0;c--)for(d=(u=this.displayRects[c]).minLevel;d<=u.maxLevel;d++)this._levelRects[d]||(this._levelRects[d]=[]),this._levelRects[d].push(u);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var i;return e.Image?i=e.Image.xmlns:e.documentElement&&("Image"===e.documentElement.localName||"Image"===e.documentElement.tagName)&&(i=e.documentElement.namespaceURI),-1!==(i=(i||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==i.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(i,n,o){var r;return r=e.isPlainObject(i)?t(this,i):function(i,n){if(!n||!n.documentElement)throw Error(e.getString("Errors.Xml"));var o,r,s,a,l,h=n.documentElement,c=h.localName||h.tagName,u=n.documentElement.namespaceURI,d=null,p=[];if("Image"===c)try{if(a=h.getElementsByTagName("Size")[0],void 0===a&&(a=h.getElementsByTagNameNS(u,"Size")[0]),d={Image:{xmlns:"http://schemas.microsoft.com/deepzoom/2008",Url:h.getAttribute("Url"),Format:h.getAttribute("Format"),DisplayRect:null,Overlap:parseInt(h.getAttribute("Overlap"),10),TileSize:parseInt(h.getAttribute("TileSize"),10),Size:{Height:parseInt(a.getAttribute("Height"),10),Width:parseInt(a.getAttribute("Width"),10)}}},!e.imageFormatSupported(d.Image.Format))throw Error(e.getString("Errors.ImageFormat",d.Image.Format.toUpperCase()));for(o=h.getElementsByTagName("DisplayRect"),void 0===o&&(o=h.getElementsByTagNameNS(u,"DisplayRect")[0]),l=0;lthis.maxLevel)return!1;if(!c||!c.length)return!0;for(h=c.length-1;h>=0;h--)if(!(e<(n=c[h]).minLevel)&&!(e>n.maxLevel)&&(o=this.getLevelScale(e),r=n.x*o,s=n.y*o,a=r+n.width*o,l=s+n.height*o,r=Math.floor(r/this._tileWidth),s=Math.floor(s/this._tileWidth),a=Math.ceil(a/this._tileWidth),l=Math.ceil(l/this._tileWidth),r<=t&&t1&&e.profile[1].supports&&(i=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(i=-1!==e.extraFeatures.indexOf("sizeByWh")),!t||i}function i(e){for(var t=[],i=0;i0?n.tileSize=Math.max.apply(null,h):n.tileSize=a}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,n.levels=i(this),e.extend(!0,n,{width:n.levels[n.levels.length-1].width,height:n.levels[n.levels.length-1].height,tileSize:Math.max(n.height,n.width),tileOverlap:0,minLevel:0,maxLevel:n.levels.length-1}),this.levels=n.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!n.maxLevel&&!this.emulateLegacyImagePyramid){if(this.scale_factors){var u=Math.max.apply(null,this.scale_factors);n.maxLevel=Math.round(Math.log(u)*Math.LOG2E)}else n.maxLevel=Number(Math.round(Math.log(Math.max(this.width,this.height),2)))}if(this.sizes){var d=this.sizes.length;(d===n.maxLevel||d===n.maxLevel+1)&&(this.levelSizes=this.sizes.slice().sort(function(e,t){return e.width-t.width}),d===n.maxLevel&&this.levelSizes.push({width:this.width,height:this.height}))}e.TileSource.apply(this,[n])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!!e.protocol&&"http://iiif.io/api/image"===e.protocol||!!e["@context"]&&("http://library.stanford.edu/iiif/image-api/1.1/context.json"===e["@context"]||"http://iiif.io/api/image/1/context.json"===e["@context"])||!!e.profile&&0===e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")||!!e.identifier&&!!e.width&&!!e.height||!!e.documentElement&&"info"===e.documentElement.tagName&&"http://library.stanford.edu/iiif/image-api/ns/"===e.documentElement.namespaceURI},configure:function(t,i,n){if(e.isPlainObject(t)){if(t["@context"]){var o=t["@context"];if(Array.isArray(o)){for(var r=0;r0&&t>=this.minLevel&&t<=this.maxLevel&&(i=this.levels[t].width/this.levels[this.maxLevel].width),i}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){if(this.emulateLegacyImagePyramid)return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0);if(!this.levelSizes)return e.TileSource.prototype.getNumTiles.call(this,t);var i=this.levelSizes[t],n=Math.ceil(i.width/this.getTileWidth(t)),o=Math.ceil(i.height/this.getTileHeight(t));return new e.Point(n,o)},getTileAtPoint:function(t,i){if(this.emulateLegacyImagePyramid)return new e.Point(0,0);if(this.levelSizes){var n=i.x>=0&&i.x<=1&&i.y>=0&&i.y<=1/this.aspectRatio;e.console.assert(n,"[TileSource.getTileAtPoint] must be called with a valid point.");var o=this.levelSizes[t].width,r=i.x*o,s=i.y*o,a=Math.floor(r/this.getTileWidth(t)),l=Math.floor(s/this.getTileHeight(t));return i.x>=1&&(a=this.getNumTiles(t).x-1),i.y>=1/this.aspectRatio-1e-15&&(l=this.getNumTiles(t).y-1),new e.Point(a,l)}return e.TileSource.prototype.getTileAtPoint.call(this,t,i)},getTileUrl:function(e,t,i){if(this.emulateLegacyImagePyramid){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}var o,r,s,a,l,h,c,u,d,p,g,m,v,f,y,w=Math.pow(.5,this.maxLevel-e);return this.levelSizes?(o=this.levelSizes[e].width,r=this.levelSizes[e].height):(o=Math.ceil(this.width*w),r=Math.ceil(this.height*w)),s=this.getTileWidth(e),a=this.getTileHeight(e),l=Math.round(s/w),h=Math.round(a/w),y=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,oa?s/256:a/256)/Math.log(2))-1,r.tileSize=256,r.width=s,r.height=a,u.TileSource.apply(this,[r])},u.extend(u.TmsTileSource.prototype,u.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"===e.type},configure:function(e,t,i){return e},getTileUrl:function(e,t,i){var n=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(n-i)+".png"}}),u.ZoomifyTileSource=function(e){void 0===e.tileSize&&(e.tileSize=256),void 0===e.fileFormat&&(e.fileFormat="jpg",this.fileFormat=e.fileFormat);var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,u.TileSource.apply(this,[e])},u.extend(u.ZoomifyTileSource.prototype,u.TileSource.prototype,{_getGridSize:function(e,t,i){return{x:Math.ceil(e/i),y:Math.ceil(t/i)}},_calculateAbsoluteTileNumber:function(e,t,i){for(var n=0,o={},r=0;r");return n.sort(function(e,t){return e.height-t.height})}(t.levels),t.levels.length>0?(i=t.levels[t.levels.length-1].width,n=t.levels[t.levels.length-1].height):(i=0,n=0,u.console.error("No supported image formats found")),u.extend(!0,t,{width:i,height:n,tileSize:Math.max(n,i),tileOverlap:0,minLevel:0,maxLevel:t.levels.length>0?t.levels.length-1:0}),u.TileSource.apply(this,[t]),this.levels=t.levels},u.extend(u.LegacyTileSource.prototype,u.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"===e.type||e.documentElement&&"legacy-image-pyramid"===e.documentElement.getAttribute("type")},configure:function(e,t,i){return u.isPlainObject(e)?e.levels:function(e,t){if(!t||!t.documentElement)throw Error(u.getString("Errors.Xml"));var i,n,o,r=t.documentElement,s=r.tagName,a=null,l=[];if("image"===s)try{for(o=0,a={type:r.getAttribute("type"),levels:[]},l=r.getElementsByTagName("level");o0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(e){return this.getLevelScale(e)?new u.Point(1,1):new u.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}}),u.ImageTileSource=function(e){e=u.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},e),u.TileSource.apply(this,[e])},u.extend(u.ImageTileSource.prototype,u.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t,i){return e},getImageInfo:function(e){var t=this._image=new Image,i=this;this.crossOriginPolicy&&(t.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(t.useCredentials=this.ajaxWithCredentials),u.addEvent(t,"load",function(){i.width=t.naturalWidth,i.height=t.naturalHeight,i.aspectRatio=i.width/i.height,i.dimensions=new u.Point(i.width,i.height),i._tileWidth=i.width,i._tileHeight=i.height,i.tileOverlap=0,i.minLevel=0,i.levels=i._buildLevels(),i.maxLevel=i.levels.length-1,i.ready=!0,i.raiseEvent("ready",{tileSource:i})}),u.addEvent(t,"error",function(){i.raiseEvent("open-failed",{message:"Error loading image at "+e,source:e})}),t.src=e},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(e){return this.getLevelScale(e)?new u.Point(1,1):new u.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n},getContext2D:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].context2D),n},destroy:function(){this._freeupCanvasMemory()},_buildLevels:function(){var e=[{url:this._image.src,width:this._image.naturalWidth,height:this._image.naturalHeight}];if(!this.buildPyramid||!u.supportsCanvas||!this.useCanvas)return delete this._image,e;var t=this._image.naturalWidth,i=this._image.naturalHeight,n=document.createElement("canvas"),o=n.getContext("2d");if(n.width=t,n.height=i,o.drawImage(this._image,0,0,t,i),e[0].context2D=o,delete this._image,u.isCanvasTainted(n))return e;for(;t>=2&&i>=2;){t=Math.floor(t/2),i=Math.floor(i/2);var r=document.createElement("canvas"),s=r.getContext("2d");r.width=t,r.height=i,s.drawImage(n,0,0,t,i),e.splice(0,0,{context2D:s,width:t,height:i}),n=r,o=s}return e},_freeupCanvasMemory:function(){for(var e=0;e=e.ButtonState.GROUP&&t.currentState===e.ButtonState.REST&&(t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0),t.currentState=e.ButtonState.GROUP),i>=e.ButtonState.HOVER&&t.currentState===e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),i>=e.ButtonState.DOWN&&t.currentState===e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function i(t,i){!t.element.disabled&&(i<=e.ButtonState.HOVER&&t.currentState===e.ButtonState.DOWN&&(t.imgDown&&(t.imgDown.style.visibility="hidden"),t.currentState=e.ButtonState.HOVER),i<=e.ButtonState.GROUP&&t.currentState===e.ButtonState.HOVER&&(t.imgHover&&(t.imgHover.style.visibility="hidden"),t.currentState=e.ButtonState.GROUP),i<=e.ButtonState.REST&&t.currentState===e.ButtonState.GROUP)&&(t.shouldFade=!0,t.fadeBeginTime=e.now()+t.fadeDelay,window.setTimeout(function(){(function t(i){e.requestAnimationFrame(function(){var n;i.shouldFade&&(n=Math.max(0,n=Math.min(1,n=1-(e.now()-i.fadeBeginTime)/i.fadeLength)),i.imgGroup&&e.setElementOpacity(i.imgGroup,n,!0),n>0&&t(i))})})(t)},t.fadeDelay),t.currentState=e.ButtonState.REST)}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(n){var o=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null,userData:null},n),this.element=n.element||e.makeNeutralElement("div"),n.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,e.setElementPointerEventsNone(this.imgRest),e.setElementPointerEventsNone(this.imgGroup),e.setElementPointerEventsNone(this.imgHover),e.setElementPointerEventsNone(this.imgDown),this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor===e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({userData:"Button.tracker",element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(i){i.insideElementPressed?(t(o,e.ButtonState.DOWN),o.raiseEvent("enter",{originalEvent:i.originalEvent})):i.buttonDownAny||t(o,e.ButtonState.HOVER)},focusHandler:function(e){o.tracker.enterHandler(e),o.raiseEvent("focus",{originalEvent:e.originalEvent})},leaveHandler:function(t){i(o,e.ButtonState.GROUP),t.insideElementPressed&&o.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){o.tracker.leaveHandler(e),o.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(i){t(o,e.ButtonState.DOWN),o.raiseEvent("press",{originalEvent:i.originalEvent})},releaseHandler:function(n){n.insideElementPressed&&n.insideElementReleased?(i(o,e.ButtonState.HOVER),o.raiseEvent("release",{originalEvent:n.originalEvent})):n.insideElementPressed?i(o,e.ButtonState.GROUP):t(o,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&o.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){13===e.keyCode?(o.raiseEvent("click",{originalEvent:e.originalEvent}),o.raiseEvent("release",{originalEvent:e.originalEvent}),e.preventDefault=!0):e.preventDefault=!1}}),i(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){t(this,e.ButtonState.GROUP)},notifyGroupExit:function(){i(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,this.tracker.setTracking(!1),e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,this.tracker.setTracking(!0),e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()},destroy:function(){this.imgRest&&(this.element.removeChild(this.imgRest),this.imgRest=null),this.imgGroup&&(this.element.removeChild(this.imgGroup),this.imgGroup=null),this.imgHover&&(this.element.removeChild(this.imgHover),this.imgHover=null),this.imgDown&&(this.element.removeChild(this.imgDown),this.imgDown=null),this.removeAllHandlers(),this.tracker.destroy(),this.element=null}})}(u),u.ButtonGroup=function(e){u.extend(!0,this,{buttons:[],clickTimeThreshold:u.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:u.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},e);var t,i=this.buttons.concat([]),n=this;if(this.element=e.element||u.makeNeutralElement("div"),!e.group)for(t=0,this.element.style.display="inline-block";t=270?(r=this.getTopRight(),this.x=r.x,this.y=r.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=270):this.degrees>=180?(r=this.getBottomRight(),this.x=r.x,this.y=r.y,this.degrees-=180):this.degrees>=90&&(r=this.getBottomLeft(),this.x=r.x,this.y=r.y,s=this.height,this.height=this.width,this.width=s,this.degrees-=90)},u.Rect.fromSummits=function(e,t,i){var n=e.distanceTo(t),o=e.distanceTo(i),r=t.minus(e),s=Math.atan(r.y/r.x);return r.x<0?s+=Math.PI:r.y<0&&(s+=2*Math.PI),new u.Rect(e.x,e.y,n,o,s/Math.PI*180)},u.Rect.prototype={clone:function(){return new u.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new u.Point(this.x,this.y)},getBottomRight:function(){return new u.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new u.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new u.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new u.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new u.Point(this.width,this.height)},equals:function(e){return e instanceof u.Rect&&this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height&&this.degrees===e.degrees},times:function(e){return new u.Rect(this.x*e,this.y*e,this.width*e,this.height*e,this.degrees)},translate:function(e){return new u.Rect(this.x+e.x,this.y+e.y,this.width,this.height,this.degrees)},union:function(e){var t=this.getBoundingBox(),i=e.getBoundingBox(),n=Math.min(t.x,i.x),o=Math.min(t.y,i.y),r=Math.max(t.x+t.width,i.x+i.width),s=Math.max(t.y+t.height,i.y+i.height);return new u.Rect(n,o,r-n,s-o)},intersection:function(e){var t=[],i=this.getTopLeft();e.containsPoint(i,1e-10)&&t.push(i);var n=this.getTopRight();e.containsPoint(n,1e-10)&&t.push(n);var o=this.getBottomLeft();e.containsPoint(o,1e-10)&&t.push(o);var r=this.getBottomRight();e.containsPoint(r,1e-10)&&t.push(r);var s=e.getTopLeft();this.containsPoint(s,1e-10)&&t.push(s);var a=e.getTopRight();this.containsPoint(a,1e-10)&&t.push(a);var l=e.getBottomLeft();this.containsPoint(l,1e-10)&&t.push(l);var h=e.getBottomRight();this.containsPoint(h,1e-10)&&t.push(h);for(var c=this._getSegments(),d=e._getSegments(),p=0;pw&&(w=E.x),E.yx&&(x=E.y)}return new u.Rect(y,T,w-y,x-T)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),i=this.getBottomLeft(),n=this.getBottomRight();return[[e,t],[t,n],[n,i],[i,e]]},rotate:function(e,t){if(0===(e=u.positiveModulo(e,360)))return this.clone();t=t||this.getCenter();var i=this.getTopLeft().rotate(e,t),n=this.getTopRight().rotate(e,t).minus(i),o=Math.atan((n=n.apply(function(e){return 1e-15>Math.abs(e)?0:e})).y/n.x);return n.x<0?o+=Math.PI:n.y<0&&(o+=2*Math.PI),new u.Rect(i.x,i.y,this.width,this.height,o/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var e=this.getTopLeft(),t=this.getTopRight(),i=this.getBottomLeft(),n=this.getBottomRight(),o=Math.min(e.x,t.x,i.x,n.x),r=Math.max(e.x,t.x,i.x,n.x),s=Math.min(e.y,t.y,i.y,n.y),a=Math.max(e.y,t.y,i.y,n.y);return new u.Rect(o,s,r-o,a-s)},getIntegerBoundingBox:function(){var e=this.getBoundingBox(),t=Math.floor(e.x),i=Math.floor(e.y),n=Math.ceil(e.width+e.x-t),o=Math.ceil(e.height+e.y-i);return new u.Rect(t,i,n,o)},containsPoint:function(e,t){t=t||0;var i=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),r=n.minus(i),s=o.minus(i);return(e.x-i.x)*r.x+(e.y-i.y)*r.y>=-t&&(e.x-n.x)*r.x+(e.y-n.y)*r.y<=t&&(e.x-i.x)*s.x+(e.y-i.y)*s.y>=-t&&(e.x-o.x)*s.x+(e.y-o.y)*s.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}},function(e){var t={};function i(e){if(e.quick){var t;t="horizontal"===this.scroll?Math.floor(e.position.x/(this.panelWidth+4)):Math.floor(e.position.y/this.panelHeight),this.viewer.goToPage(t)}this.element.focus()}function n(t){if(this.dragging=!0,this.element){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?-t.delta.x>0?i>-(o-a.x)&&(this.element.style.marginLeft=i+2*t.delta.x+"px",r(this,a.x,i+2*t.delta.x)):0>-t.delta.x&&i<0&&(this.element.style.marginLeft=i+2*t.delta.x+"px",r(this,a.x,i+2*t.delta.x)):-t.delta.y>0?n>-(s-a.y)&&(this.element.style.marginTop=n+2*t.delta.y+"px",r(this,a.y,n+2*t.delta.y)):0>-t.delta.y&&n<0&&(this.element.style.marginTop=n+2*t.delta.y+"px",r(this,a.y,n+2*t.delta.y))}}function o(t){if(this.element){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),o=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);"horizontal"===this.scroll?t.scroll>0?i>-(o-a.x)&&(this.element.style.marginLeft=i-60*t.scroll+"px",r(this,a.x,i-60*t.scroll)):t.scroll<0&&i<0&&(this.element.style.marginLeft=i-60*t.scroll+"px",r(this,a.x,i-60*t.scroll)):t.scroll<0?n>a.y-s&&(this.element.style.marginTop=n+60*t.scroll+"px",r(this,a.y,n+60*t.scroll)):t.scroll>0&&n<0&&(this.element.style.marginTop=n+60*t.scroll+"px",r(this,a.y,n+60*t.scroll)),t.preventDefault=!0}}function r(t,i,n){var o,r,s,a,l,h;for(r=Math.ceil(i/(o="horizontal"===t.scroll?t.panelWidth:t.panelHeight))+5,l=r=(r=(s=Math.ceil((Math.abs(n)+i)/o)+1)-r)<0?0:r;lh+o.x-this.panelWidth?(i=Math.min(i,a-o.x),this.element.style.marginLeft=-i+"px",r(this,o.x,-i)):ic+o.y-this.panelHeight?(i=Math.min(i,l-o.y),this.element.style.marginTop=-i+"px",r(this,o.y,-i)):i1?t[1].springStiffness:5,animationTime:t.length>1?t[1].animationTime:1.5}),u.console.assert("number"==typeof e.springStiffness&&0!==e.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),u.console.assert("number"==typeof e.animationTime&&e.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),e.exponential&&(this._exponential=!0,delete e.exponential),u.extend(!0,this,e),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:u.now()},u.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},u.Spring.prototype={resetTo:function(e){u.console.assert(!this._exponential||0!==e,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=e,this.start.time=this.target.time=this.current.time=u.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(e){u.console.assert(!this._exponential||0!==e,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=e,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(e){this.start.value+=e,this.target.value+=e,this._exponential&&(u.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(e){this._exponential=e,this._exponential&&(u.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=u.now(),this._exponential?(t=this.start._logValue,i=this.target._logValue):(t=this.start.value,i=this.target.value);var e,t,i,n=this.current.time>=this.target.time?i:t+(i-t)*(e=this.springStiffness,(1-Math.exp(-((this.current.time-this.start.time)/(this.target.time-this.start.time)*e)))/(1-Math.exp(-e))),o=this.current.value;return this._exponential?this.current.value=Math.exp(n):this.current.value=n,o!==this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}},u.ImageJob=function(e){u.extend(!0,this,{timeout:u.DEFAULT_SETTINGS.timeout,jobId:null,tries:0},e),this.data=null,this.userData={},this.errorMsg=null},u.ImageJob.prototype={start:function(){this.tries++;var e=this,t=this.abort;this.jobId=window.setTimeout(function(){e.finish(null,null,"Image load exceeded timeout ("+e.timeout+" ms)")},this.timeout),this.abort=function(){e.source.downloadTileAbort(e),"function"==typeof t&&t()},this.source.downloadTileStart(this)},finish:function(e,t,i){this.data=e,this.request=t,this.errorMsg=i,this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},u.ImageLoader=function(e){u.extend(!0,this,{jobLimit:u.DEFAULT_SETTINGS.imageLoaderLimit,timeout:u.DEFAULT_SETTINGS.timeout,jobQueue:[],failedTiles:[],jobsInProgress:0},e)},u.ImageLoader.prototype={addJob:function(e){if(!e.source){u.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");var t=u.TileSource.prototype;e.source={downloadTileStart:t.downloadTileStart,downloadTileAbort:t.downloadTileAbort}}var i=this,n={src:e.src,tile:e.tile||{},source:e.source,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,postData:e.postData,callback:function(t){var n,o;n=e.callback,""!==t.errorMsg&&(null===t.data||void 0===t.data)&&t.tries<1+i.tileRetryMax&&i.failedTiles.push(t),i.jobsInProgress--,(!i.jobLimit||i.jobsInProgress0&&((o=i.jobQueue.shift()).start(),i.jobsInProgress++),i.tileRetryMax>0&&0===i.jobQueue.length&&(!i.jobLimit||i.jobsInProgress0&&(o=i.failedTiles.shift(),setTimeout(function(){o.start()},i.tileRetryDelay),i.jobsInProgress++),n(t.data,t.errorMsg,t.request)},abort:e.abort,timeout:this.timeout},o=new u.ImageJob(n);!this.jobLimit||this.jobsInProgresst&&(t=n)}return t},needsUpdate:function(){return u.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return u.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return u.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return u.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!==e.x||this.canvas.height!==e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var i=this._getContext(e);if(t)i.clearRect(t.x,t.y,t.width,t.height);else{var n=i.canvas;i.clearRect(0,0,n.width,n.height)}}},viewportToDrawerRectangle:function(e){var t=this.viewport.pixelFromPointNoRotate(e.getTopLeft(),!0),i=this.viewport.deltaPixelsFromPointsNoRotate(e.getSize(),!0);return new u.Rect(t.x*u.pixelDensityRatio,t.y*u.pixelDensityRatio,i.x*u.pixelDensityRatio,i.y*u.pixelDensityRatio)},drawTile:function(e,t,i,n,o,r,s){if(u.console.assert(e,"[Drawer.drawTile] tile is required"),u.console.assert(t,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var a=this._getContext(i);n=n||1,e.drawCanvas(a,t,n,o,r,s)}else e.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var i=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=i.x,this.sketchCanvas.height=i.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var n=this;this.viewer.addHandler("rotate",function e(){if(0!==n.viewport.getRotation()){n.viewer.removeHandler("rotate",e);var t=n._calculateSketchCanvasSize();n.sketchCanvas.width=t.x,n.sketchCanvas.height=t.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var i=this._getContext(t);i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()}},drawRectangle:function(e,t,i){if(this.useCanvas){var n=this._getContext(i);n.save(),n.fillStyle=t,n.fillRect(e.x,e.y,e.width,e.height),n.restore()}},blendSketch:function(e,t,i,n){var o=e;if(u.isPlainObject(o)||(o={opacity:e,scale:t,translate:i,compositeOperation:n}),this.useCanvas&&this.sketchCanvas){e=o.opacity,n=o.compositeOperation;var r=o.bounds;if(this.context.save(),this.context.globalAlpha=e,n&&(this.context.globalCompositeOperation=n),r)r.x<0&&(r.width+=r.x,r.x=0),r.x+r.width>this.canvas.width&&(r.width=this.canvas.width-r.x),r.y<0&&(r.height+=r.y,r.y=0),r.y+r.height>this.canvas.height&&(r.height=this.canvas.height-r.y),this.context.drawImage(this.sketchCanvas,r.x,r.y,r.width,r.height,r.x,r.y,r.width,r.height);else{t=o.scale||1;var s=(i=o.translate)instanceof u.Point?i:new u.Point(0,0),a=0,l=0;if(i){var h=this.sketchCanvas.width-this.canvas.width,c=this.sketchCanvas.height-this.canvas.height;a=Math.round(h/2),l=Math.round(c/2)}this.context.drawImage(this.sketchCanvas,s.x-a*t,s.y-l*t,(this.canvas.width+2*a)*t,(this.canvas.height+2*l)*t,-a,-l,this.canvas.width+2*a,this.canvas.height+2*l)}this.context.restore()}},drawDebugInfo:function(e,t,i,n){if(this.useCanvas){var o=this.viewer.world.getIndexOfItem(n)%this.debugGridColor.length,r=this.context;r.save(),r.lineWidth=2*u.pixelDensityRatio,r.font="small-caps bold "+13*u.pixelDensityRatio+"px arial",r.strokeStyle=this.debugGridColor[o],r.fillStyle=this.debugGridColor[o],this.viewport.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:this.viewport.getRotation(!0)}),n.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:n.getRotation(!0),point:n.viewport.pixelFromPointNoRotate(n._getRotationPoint(!0),!0)}),n.viewport.getRotation(!0)%360==0&&n.getRotation(!0)%360==0&&n._drawer.viewer.viewport.getFlip()&&n._drawer._flip(),r.strokeRect(e.position.x*u.pixelDensityRatio,e.position.y*u.pixelDensityRatio,e.size.x*u.pixelDensityRatio,e.size.y*u.pixelDensityRatio);var s=(e.position.x+e.size.x/2)*u.pixelDensityRatio,a=(e.position.y+e.size.y/2)*u.pixelDensityRatio;r.translate(s,a),r.rotate(-(Math.PI/180*this.viewport.getRotation(!0))),r.translate(-s,-a),0===e.x&&0===e.y&&(r.fillText("Zoom: "+this.viewport.getZoom(),e.position.x*u.pixelDensityRatio,(e.position.y-30)*u.pixelDensityRatio),r.fillText("Pan: "+this.viewport.getBounds().toString(),e.position.x*u.pixelDensityRatio,(e.position.y-20)*u.pixelDensityRatio)),r.fillText("Level: "+e.level,(e.position.x+10)*u.pixelDensityRatio,(e.position.y+20)*u.pixelDensityRatio),r.fillText("Column: "+e.x,(e.position.x+10)*u.pixelDensityRatio,(e.position.y+30)*u.pixelDensityRatio),r.fillText("Row: "+e.y,(e.position.x+10)*u.pixelDensityRatio,(e.position.y+40)*u.pixelDensityRatio),r.fillText("Order: "+i+" of "+t,(e.position.x+10)*u.pixelDensityRatio,(e.position.y+50)*u.pixelDensityRatio),r.fillText("Size: "+e.size.toString(),(e.position.x+10)*u.pixelDensityRatio,(e.position.y+60)*u.pixelDensityRatio),r.fillText("Position: "+e.position.toString(),(e.position.x+10)*u.pixelDensityRatio,(e.position.y+70)*u.pixelDensityRatio),this.viewport.getRotation(!0)%360!=0&&this._restoreRotationChanges(),n.getRotation(!0)%360!=0&&this._restoreRotationChanges(),n.viewport.getRotation(!0)%360==0&&n.getRotation(!0)%360==0&&n._drawer.viewer.viewport.getFlip()&&n._drawer._flip(),r.restore()}},debugRect:function(e){if(this.useCanvas){var t=this.context;t.save(),t.lineWidth=2*u.pixelDensityRatio,t.strokeStyle=this.debugGridColor[0],t.fillStyle=this.debugGridColor[0],t.strokeRect(e.x*u.pixelDensityRatio,e.y*u.pixelDensityRatio,e.width*u.pixelDensityRatio,e.height*u.pixelDensityRatio),t.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(e){var t=this._getContext(e).canvas;return new u.Point(t.width,t.height)},getCanvasCenter:function(){return new u.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(e){var t=e.point?e.point.times(u.pixelDensityRatio):this.getCanvasCenter(),i=this._getContext(e.useSketch);i.save(),i.translate(t.x,t.y),this.viewer.viewport.flipped?(i.rotate(-(Math.PI/180*e.degrees)),i.scale(-1,1)):i.rotate(Math.PI/180*e.degrees),i.translate(-t.x,-t.y)},_flip:function(e){var t=(e=e||{}).point?e.point.times(u.pixelDensityRatio):this.getCanvasCenter(),i=this._getContext(e.useSketch);i.translate(t.x,0),i.scale(-1,1),i.translate(-t.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var e=u.pixelDensityRatio,t=this.viewport.getContainerSize();return{x:Math.round(t.x*e),y:Math.round(t.y*e)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}},u.Viewport=function(e){var t=arguments;t.length&&t[0]instanceof u.Point&&(e={containerSize:t[0],contentSize:t[1],config:t[2]}),e.config&&(u.extend(!0,e,e.config),delete e.config),this._margins=u.extend({left:0,top:0,right:0,bottom:0},e.margins||{}),delete e.margins,e.initialDegrees=e.degrees,delete e.degrees,u.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,rotationPivot:null,viewer:null,springStiffness:u.DEFAULT_SETTINGS.springStiffness,animationTime:u.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:u.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:u.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:u.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:u.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:u.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:u.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:u.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:u.DEFAULT_SETTINGS.maxZoomLevel,initialDegrees:u.DEFAULT_SETTINGS.degrees,flipped:u.DEFAULT_SETTINGS.flipped,homeFillsViewer:u.DEFAULT_SETTINGS.homeFillsViewer,silenceMultiImageWarnings:u.DEFAULT_SETTINGS.silenceMultiImageWarnings},e),this._updateContainerInnerSize(),this.centerSpringX=new u.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new u.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new u.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.degreesSpring=new u.Spring({initial:e.initialDegrees,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,this._setContentBounds(new u.Rect(0,0,1,1),1),this.goHome(!0),this.update()},u.Viewport.prototype={get degrees(){return u.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."),this.getRotation()},set degrees(degrees){u.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."),this.rotateTo(degrees)},resetContentSize:function(e){return u.console.assert(e,"[Viewport.resetContentSize] contentSize is required"),u.console.assert(e instanceof u.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),u.console.assert(e.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),u.console.assert(e.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new u.Rect(0,0,1,e.y/e.x),e.x),this},setHomeBounds:function(e,t){u.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(e,t)},_setContentBounds:function(e,t){u.console.assert(e,"[Viewport._setContentBounds] bounds is required"),u.console.assert(e instanceof u.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),u.console.assert(e.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),u.console.assert(e.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=e.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(t),this._contentBounds=e.rotate(this.getRotation()).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(t),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:t,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e=this._contentAspectRatio/this.getAspectRatio();return(this.homeFillsViewer?e>=1?e:1:e>=1?1:e)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var e=this._contentBounds.getCenter(),t=1/this.getHomeZoom(),i=t/this.getAspectRatio();return new u.Rect(e.x-t/2,e.y-i/2,t,i)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x/this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new u.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return u.extend({},this._margins)},setMargins:function(e){u.console.assert("object"===u.type(e),"[Viewport.setMargins] margins must be an object"),this._margins=u.extend({left:0,top:0,right:0,bottom:0},e),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation(e))},getBoundsNoRotate:function(e){var t=this.getCenter(e),i=1/this.getZoom(e),n=i/this.getAspectRatio();return new u.Rect(t.x-i/2,t.y-n/2,i,n)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(e),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),i=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/i,t.y-=this._margins.top/i,t.width+=(this._margins.left+this._margins.right)/i,t.height+=(this._margins.top+this._margins.bottom)/i,t},getCenter:function(e){var t,i,n,o,r,s,a=new u.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),l=new u.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return e?a:this.zoomPoint?(t=this.pixelFromPoint(this.zoomPoint,!0),o=(n=1/(i=this.getZoom()))/this.getAspectRatio(),r=new u.Rect(a.x-n/2,a.y-o/2,n,o),s=this._pixelFromPoint(this.zoomPoint,r).minus(t).rotate(-this.getRotation(!0)).divide(this._containerInnerSize.x*i),l.plus(s)):l},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(e){var t=this.viewportToViewerElementRectangle(e).getBoundingBox(),i=this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(),n=!1,o=!1;if(this.wrapHorizontal);else{var r,s,a,l=t.x+t.width,h=i.x+i.width;r=t.width>i.width?this.visibilityRatio*i.width:this.visibilityRatio*t.width,s=i.x-l+r,a=h-t.x-r,r>i.width?(t.x+=(s+a)/2,n=!0):a<0?(t.x+=a,n=!0):s>0&&(t.x+=s,n=!0)}if(this.wrapVertical);else{var c,u,d,p=t.y+t.height,g=i.y+i.height;c=t.height>i.height?this.visibilityRatio*i.height:this.visibilityRatio*t.height,u=i.y-p+c,d=g-t.y-c,c>i.height?(t.y+=(u+d)/2,o=!0):d<0?(t.y+=d,o=!0):u>0&&(t.y+=u,o=!0)}var m=n||o,v=m?this.viewerElementToViewportRectangle(t):e.clone();return v.xConstrained=n,v.yConstrained=o,v.constraintApplied=m,v},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),i=this._applyZoomConstraints(t);t!==i&&this.zoomTo(i,this.zoomPoint,e);var n=this.getConstrainedBounds(!1);return n.constraintApplied&&(this.fitBounds(n,e),this._raiseConstraintsEvent(e)),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(e,t){var i=(t=t||{}).immediately||!1,n=t.constraints||!1,o=this.getAspectRatio(),r=e.getCenter(),s=new u.Rect(e.x,e.y,e.width,e.height,e.degrees+this.getRotation()).getBoundingBox();s.getAspectRatio()>=o?s.height=s.width/o:s.width=s.height*o,s.x=r.x-s.width/2,s.y=r.y-s.height/2;var a=1/s.width;if(i)return this.panTo(r,!0),this.zoomTo(a,null,!0),n&&this.applyConstraints(!0),this;var l=this.getCenter(!0),h=this.getZoom(!0);this.panTo(l,!0),this.zoomTo(h,null,!0);var c=this.getBounds(),d=this.getZoom();if(0===d||1e-8>Math.abs(a/d-1))return this.zoomTo(a,null,!0),this.panTo(r,i),n&&this.applyConstraints(!1),this;if(n){this.panTo(r,!1),a=this._applyZoomConstraints(a),this.zoomTo(a,null,!1);var p=this.getConstrainedBounds();this.panTo(l,!0),this.zoomTo(h,null,!0),this.fitBounds(p)}else{var g=s.rotate(-this.getRotation()).getTopLeft().times(a).minus(c.getTopLeft().times(d)).divide(a-d);this.zoomTo(a,g,i)}return this},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(e){var t=new u.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(t,e)},fitHorizontally:function(e){var t=new u.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(t,e)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(e,t){var i=new u.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(i.plus(e),t)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,i){return this.zoomTo(this.zoomSpring.target.value*e,t,i)},zoomTo:function(e,t,i){var n=this;return this.zoomPoint=t instanceof u.Point&&!isNaN(t.x)&&!isNaN(t.y)?t:null,i?this._adjustCenterSpringsForZoomPoint(function(){n.zoomSpring.resetTo(e)}):this.zoomSpring.springTo(e),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:e,refPoint:t,immediately:i}),this},setRotation:function(e,t){return this.rotateTo(e,null,t)},getRotation:function(e){return e?this.degreesSpring.current.value:this.degreesSpring.target.value},setRotationWithPivot:function(e,t,i){return this.rotateTo(e,t,i)},rotateTo:function(e,t,i){if(!this.viewer||!this.viewer.drawer.canRotate()||this.degreesSpring.target.value===e&&this.degreesSpring.isAtTargetValue())return this;if(this.rotationPivot=t instanceof u.Point&&!isNaN(t.x)&&!isNaN(t.y)?t:null,i){if(this.rotationPivot){if(!(e-this._oldDegrees))return this.rotationPivot=null,this;this._rotateAboutPivot(e)}else this.degreesSpring.resetTo(e)}else{var n=u.positiveModulo(this.degreesSpring.current.value,360),o=u.positiveModulo(e,360),r=o-n;r>180?o-=360:r<-180&&(o+=360);var s=n-o;this.degreesSpring.resetTo(e+s),this.degreesSpring.springTo(e)}return this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:e,immediately:!!i,pivot:this.rotationPivot||this.getCenter()}),this},rotateBy:function(e,t,i){return this.rotateTo(this.degreesSpring.target.value+e,t,i)},resize:function(e,t){var i,n=this.getBoundsNoRotate();this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(i=e.x/this.containerSize.x,n.width=n.width*i,n.height=n.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t});var o=this.fitBounds(n,!0);return this.viewer&&this.viewer.raiseEvent("after-resize",{newContainerSize:e,maintain:t}),o},_updateContainerInnerSize:function(){this._containerInnerSize=new u.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint(function(){e.zoomSpring.update()}),this.degreesSpring.isAtTargetValue()&&(this.rotationPivot=null),this.centerSpringX.update(),this.centerSpringY.update(),this.rotationPivot?this._rotateAboutPivot(!0):this.degreesSpring.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom||this.degreesSpring.current.value!==this._oldDegrees;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._oldDegrees=this.degreesSpring.current.value,t},_rotateAboutPivot:function(e){var t=!0===e,i=this.rotationPivot.minus(this.getCenter());this.centerSpringX.shiftBy(i.x),this.centerSpringY.shiftBy(i.y),t?this.degreesSpring.update():this.degreesSpring.resetTo(e);var n=this.degreesSpring.current.value-this._oldDegrees,o=i.rotate(-1*n).times(-1);this.centerSpringX.shiftBy(o.x),this.centerSpringY.shiftBy(o.y)},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var i=this.pixelFromPoint(this.zoomPoint,!0).minus(t),n=this.deltaPointsFromPixels(i,!0);this.centerSpringX.shiftBy(n.x),this.centerSpringY.shiftBy(n.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation(t)),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation(t))},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(e,t){return e.minus(t.getTopLeft()).times(this._containerInnerSize.x/t.width).plus(new u.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(!0),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(e,t){var i=this.getBoundsNoRotate(t);return e.minus(new u.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/i.width).plus(i.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(t),this.getCenter(t))},_viewportToImageDelta:function(e,t){var i=this._contentBoundsNoRotate.width;return new u.Point(e*this._contentSizeNoRotate.x/i,t*this._contentSizeNoRotate.x/i)},viewportToImageCoordinates:function(e,t){if(e instanceof u.Point)return this.viewportToImageCoordinates(e.x,e.y);if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)this.silenceMultiImageWarnings||u.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===i)return this.viewer.world.getItemAt(0).viewportToImageCoordinates(e,t,!0)}return this._viewportToImageDelta(e-this._contentBoundsNoRotate.x,t-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(e,t){var i=this._contentBoundsNoRotate.width;return new u.Point(e/this._contentSizeNoRotate.x*i,t/this._contentSizeNoRotate.x*i)},imageToViewportCoordinates:function(e,t){if(e instanceof u.Point)return this.imageToViewportCoordinates(e.x,e.y);if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)this.silenceMultiImageWarnings||u.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===i)return this.viewer.world.getItemAt(0).imageToViewportCoordinates(e,t,!0)}var n=this._imageToViewportDelta(e,t);return n.x+=this._contentBoundsNoRotate.x,n.y+=this._contentBoundsNoRotate.y,n},imageToViewportRectangle:function(e,t,i,n){var o=e;if(o instanceof u.Rect||(o=new u.Rect(e,t,i,n)),this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||u.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===r)return this.viewer.world.getItemAt(0).imageToViewportRectangle(e,t,i,n,!0)}var s=this.imageToViewportCoordinates(o.x,o.y),a=this._imageToViewportDelta(o.width,o.height);return new u.Rect(s.x,s.y,a.x,a.y,o.degrees)},viewportToImageRectangle:function(e,t,i,n){var o=e;if(o instanceof u.Rect||(o=new u.Rect(e,t,i,n)),this.viewer){var r=this.viewer.world.getItemCount();if(r>1)this.silenceMultiImageWarnings||u.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===r)return this.viewer.world.getItemAt(0).viewportToImageRectangle(e,t,i,n,!0)}var s=this.viewportToImageCoordinates(o.x,o.y),a=this._viewportToImageDelta(o.width,o.height);return new u.Rect(s.x,s.y,a.x,a.y,o.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){u.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var t=e.minus(u.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){return u.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(e).plus(u.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(e){return u.Rect.fromSummits(this.pointFromPixel(e.getTopLeft(),!0),this.pointFromPixel(e.getTopRight(),!0),this.pointFromPixel(e.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(e){return u.Rect.fromSummits(this.pixelFromPoint(e.getTopLeft(),!0),this.pixelFromPoint(e.getTopRight(),!0),this.pixelFromPoint(e.getBottomLeft(),!0))},windowToViewportCoordinates:function(e){u.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var t=e.minus(u.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(t)},viewportToWindowCoordinates:function(e){return u.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(e).plus(u.getElementPosition(this.viewer.element))},viewportToImageZoom:function(e){if(this.viewer){var t=this.viewer.world.getItemCount();if(t>1)this.silenceMultiImageWarnings||u.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===t)return this.viewer.world.getItemAt(0).viewportToImageZoom(e)}var i=this._contentSizeNoRotate.x;return this._containerInnerSize.x/i*this._contentBoundsNoRotate.width*e},imageToViewportZoom:function(e){if(this.viewer){var t=this.viewer.world.getItemCount();if(t>1)this.silenceMultiImageWarnings||u.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===t)return this.viewer.world.getItemAt(0).imageToViewportZoom(e)}return this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width*e},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}},function(e){e.TiledImage=function(t){var i=this;e.console.assert(t.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(t.drawer,"[TiledImage] options.drawer is required"),e.console.assert(t.viewer,"[TiledImage] options.viewer is required"),e.console.assert(t.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(t.source,"[TiledImage] options.source is required"),e.console.assert(!t.clip||t.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=t.tileCache,delete t.tileCache,this._drawer=t.drawer,delete t.drawer,this._imageLoader=t.imageLoader,delete t.imageLoader,t.clip instanceof e.Rect&&(this._clip=t.clip.clone()),delete t.clip;var n=t.x||0;delete t.x;var o=t.y||0;delete t.y,this.normHeight=t.source.dimensions.y/t.source.dimensions.x,this.contentAspectX=t.source.dimensions.x/t.source.dimensions.y;var r=1;t.width?(r=t.width,delete t.width,t.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete t.height)):t.height&&(r=t.height/this.normHeight,delete t.height);var s=t.fitBounds;delete t.fitBounds;var a=t.fitBoundsPlacement||u.Placement.CENTER;delete t.fitBoundsPlacement;var l=t.degrees||0;delete t.degrees;var h=t.ajaxHeaders;delete t.ajaxHeaders,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation,subPixelRoundingForTransparency:e.DEFAULT_SETTINGS.subPixelRoundingForTransparency},t),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:n,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:l,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),s&&this.fitBounds(s,a,!0),this._drawingHandler=function(t){i.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:i},t))},this._ownAjaxHeaders={},this.setAjaxHeaders(h,!1)},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),i=this._scaleSpring.update(),n=this._degreesSpring.update();return(!!e||!!t||!!i||!!n)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset(),this.source.destroy&&this.source.destroy()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(t){var i=this.getBoundsNoRotate(t);if(this._clip){var n=(t?this._worldWidthCurrent:this._worldWidthTarget)/this.source.dimensions.x,o=this._clip.times(n);i=new e.Rect(i.x+o.x,i.y+o.y,o.width,o.height)}return i.rotate(this.getRotation(t),this._getRotationPoint(t))},getTileBounds:function(e,t,i){var n=this.source.getNumTiles(e),o=(n.x+t%n.x)%n.x,r=(n.y+i%n.y)%n.y,s=this.source.getTileBounds(e,o,r);return this.getFlip()&&(s.x=1-s.x-s.width),s.x+=(t-o)/n.x,s.y+=this._worldHeightCurrent/this._worldWidthCurrent*((i-r)/n.y),s},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},getSizeInWindowCoordinates:function(){var t=this.imageToWindowCoordinates(new e.Point(0,0)),i=this.imageToWindowCoordinates(this.getContentSize());return new e.Point(i.x-t.x,i.y-t.y)},_viewportToImageDelta:function(t,i,n){var o=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(this.source.dimensions.x/o*t,this.source.dimensions.y*this.contentAspectX/o*i)},viewportToImageCoordinates:function(t,i,n){var o;return t instanceof e.Point?(n=i,o=t):o=new e.Point(t,i),o=o.rotate(-this.getRotation(n),this._getRotationPoint(n)),n?this._viewportToImageDelta(o.x-this._xSpring.current.value,o.y-this._ySpring.current.value):this._viewportToImageDelta(o.x-this._xSpring.target.value,o.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,i,n){var o=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*o,i/this.source.dimensions.y/this.contentAspectX*o)},imageToViewportCoordinates:function(t,i,n){t instanceof e.Point&&(n=i,i=t.y,t=t.x);var o=this._imageToViewportDelta(t,i);return n?(o.x+=this._xSpring.current.value,o.y+=this._ySpring.current.value):(o.x+=this._xSpring.target.value,o.y+=this._ySpring.target.value),o.rotate(this.getRotation(n),this._getRotationPoint(n))},imageToViewportRectangle:function(t,i,n,o,r){var s=t;s instanceof e.Rect?r=i:s=new e.Rect(t,i,n,o);var a=this.imageToViewportCoordinates(s.getTopLeft(),r),l=this._imageToViewportDelta(s.width,s.height,r);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees+this.getRotation(r))},viewportToImageRectangle:function(t,i,n,o,r){var s=t;t instanceof e.Rect?r=i:s=new e.Rect(t,i,n,o);var a=this.viewportToImageCoordinates(s.getTopLeft(),r),l=this._viewportToImageDelta(s.width,s.height,r);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees-this.getRotation(r))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var t=e.minus(u.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){return this.imageToViewerElementCoordinates(e).plus(u.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var i=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/i,(t.y-this._ySpring.current.value)/i,t.width/i,t.height/i,t.degrees)},viewportToImageZoom:function(e){return this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x*e},imageToViewportZoom:function(e){return e/(this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x)},setPosition:function(e,t){var i=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(i&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(i)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}i||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){try{if(!e.isArray(t))throw Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map(function(t){return t.map(function(t){try{if(t instanceof e.Point||"number"==typeof t.x&&"number"==typeof t.y)return{x:t.x,y:t.y};throw Error()}catch(e){throw Error("A Provided cropping polygon point is not supported")}})})}catch(t){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(t),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,i,n){i=i||e.Placement.CENTER;var o=e.Placement.properties[i],r=this.contentAspectX,s=0,a=0,l=1,h=1;if(this._clip&&(r=this._clip.getAspectRatio(),l=this._clip.width/this.source.dimensions.x,h=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>r?(s=this._clip.x/this._clip.height*t.height,a=this._clip.y/this._clip.height*t.height):(s=this._clip.x/this._clip.width*t.width,a=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>r){var c=t.height/h,u=0;o.isHorizontallyCentered?u=(t.width-t.height*r)/2:o.isRight&&(u=t.width-t.height*r),this.setPosition(new e.Point(t.x-s+u,t.y-a),n),this.setHeight(c,n)}else{var d=t.width/l,p=0;o.isVerticallyCentered?p=(t.height-t.width/r)/2:o.isBottom&&(p=t.height-t.width/r),this.setPosition(new e.Point(t.x-s,t.y-a+p),n),this.setWidth(d,n)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getFlip:function(){return!!this.flipped},setFlip:function(e){this.flipped=!!e,this._needsDraw=!0,this._raiseBoundsChange()},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},setAjaxHeaders:function(t,i){if(null===t&&(t={}),!e.isPlainObject(t)){console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object");return}this._ownAjaxHeaders=t,this._updateAjaxHeaders(i)},_updateAjaxHeaders:function(t){if(void 0===t&&(t=!0),e.isPlainObject(this.viewer.ajaxHeaders)?this.ajaxHeaders=e.extend({},this.viewer.ajaxHeaders,this._ownAjaxHeaders):this.ajaxHeaders=this._ownAjaxHeaders,t){var i,n,o,r;for(var s in this.tilesMatrix)for(var a in i=this.source.getNumTiles(s),this.tilesMatrix[s])for(var l in n=(i.x+a%i.x)%i.x,this.tilesMatrix[s][a])if(o=(i.y+l%i.y)%i.y,(r=this.tilesMatrix[s][a][l]).loadWithAjax=this.loadTilesWithAjax,r.loadWithAjax){var h=this.source.getTileAjaxHeaders(s,n,o);r.ajaxHeaders=e.extend({},this.ajaxHeaders,h)}else r.ajaxHeaders=null;for(var c=0;c0;)this.lastDrawn.pop().beingDrawn=!1;var t=this.viewport,i=this._viewportToTiledImageRectangle(t.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var n=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(i=i.intersection(n)))return}for(var o=this._getLevelsInterval(),r=o.lowestLevel,s=o.highestLevel,a=null,l=!1,h=e.now(),c=s;c>=r;c--){var u=!1,d=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(c),!0).x*this._scaleSpring.current.value;if(c===r||!l&&d>=this.minPixelRatio)u=!0,l=!0;else if(!l)continue;var p=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(c),!1).x*this._scaleSpring.current.value,g=t.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,m=this.immediateRender?1:g,v=Math.min(1,(d-.5)/.5),f=m/Math.abs(m-p);if(a=this._updateLevel(l,u,c,v,f,i,h,a),this._providesCoverage(this.coverage,c))break}this._drawTiles(this.lastDrawn),a&&!a.context2D?(this._loadTile(a,h),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,i,n){this.wrapHorizontal?(o=e.positiveModulo(i.x,1),r=e.positiveModulo(n.x,1)):(o=Math.max(0,i.x),r=Math.min(1,n.x));var o,r,s,a,l=1/this.source.aspectRatio;this.wrapVertical?(s=e.positiveModulo(i.y,l),a=e.positiveModulo(n.y,l)):(s=Math.max(0,i.y),a=Math.min(l,n.y));var h=this.source.getTileAtPoint(t,new e.Point(o,s)),c=this.source.getTileAtPoint(t,new e.Point(r,a)),u=this.source.getNumTiles(t);return this.wrapHorizontal&&(h.x+=u.x*Math.floor(i.x),c.x+=u.x*Math.floor(n.x)),this.wrapVertical&&(h.y+=u.y*Math.floor(i.y/l),c.y+=u.y*Math.floor(n.y/l)),{topLeft:h,bottomRight:c}},_updateLevel:function(e,t,i,n,o,r,s,a){var l=r.getBoundingBox().getTopLeft(),h=r.getBoundingBox().getBottomRight();this.viewer&&this.viewer.raiseEvent("update-level",{tiledImage:this,havedrawn:e,level:i,opacity:n,visibility:o,drawArea:r,topleft:l,bottomright:h,currenttime:s,best:a}),this._resetCoverage(this.coverage,i),this._resetCoverage(this.loadingCoverage,i);var c=this._getCornerTiles(i,l,h),u=c.topLeft,d=c.bottomRight,p=this.source.getNumTiles(i),g=this.viewport.pixelFromPoint(this.viewport.getCenter());this.getFlip()&&(d.x+=1,this.wrapHorizontal||(d.x=Math.min(d.x,p.x-1)));for(var m=u.x;m<=d.x;m++)for(var v,f=u.y;f<=d.y;f++){if(this.getFlip()){var y=(p.x+m%p.x)%p.x;v=m+p.x-y-y-1}else v=m;null!==r.intersection(this.getTileBounds(i,v,f))&&(a=this._updateTile(t,e,v,f,i,n,o,g,p,s,a))}return a},_updateTile:function(e,t,i,n,o,r,s,a,l,h,c){var u=this._getTile(i,n,o,h,l,this._worldWidthCurrent,this._worldHeightCurrent),d=t;this.viewer&&this.viewer.raiseEvent("update-tile",{tiledImage:this,tile:u}),this._setCoverage(this.coverage,o,i,n,!1);var p=u.loaded||u.loading||this._isCovered(this.loadingCoverage,o,i,n);if(this._setCoverage(this.loadingCoverage,o,i,n,p),!u.exists||(e&&!d&&(this._isCovered(this.coverage,o,i,n)?this._setCoverage(this.coverage,o,i,n,!0):d=!0),!d))return c;if(this._positionTile(u,this.source.tileOverlap,this.viewport,a,s),!u.loaded){if(u.context2D)this._setTileLoaded(u);else{var g=this._tileCache.getImageRecord(u.cacheKey);g&&this._setTileLoaded(u,g.getData())}}return u.loaded?this._blendTile(u,i,n,o,r,h)&&(this._needsDraw=!0):u.loading?this._tilesLoading++:p||(c=this._compareTiles(c,u)),c},_getTile:function(t,i,n,o,r,s,a){var l,h,c,u,d,p,g,m,v,f,y=this.tilesMatrix,w=this.source;return y[n]||(y[n]={}),y[n][t]||(y[n][t]={}),y[n][t][i]&&!y[n][t][i].flipped==!this.flipped||(l=(r.x+t%r.x)%r.x,h=(r.y+i%r.y)%r.y,c=this.getTileBounds(n,t,i),u=w.getTileBounds(n,l,h,!0),d=w.tileExists(n,l,h),p=w.getTileUrl(n,l,h),g=w.getTilePostData(n,l,h),this.loadTilesWithAjax?(m=w.getTileAjaxHeaders(n,l,h),e.isPlainObject(this.ajaxHeaders)&&(m=e.extend({},this.ajaxHeaders,m))):m=null,v=w.getContext2D?w.getContext2D(n,l,h):void 0,f=new e.Tile(n,t,i,c,d,p,v,this.loadTilesWithAjax,m,u,g,w.getTileHashKey(n,l,h,p,m,g)),this.getFlip()?0===l&&(f.isRightMost=!0):l===r.x-1&&(f.isRightMost=!0),h===r.y-1&&(f.isBottomMost=!0),f.flipped=this.flipped,y[n][t][i]=f),(f=y[n][t][i]).lastTouchTime=o,f},_loadTile:function(e,t){var i=this;e.loading=!0,this._imageLoader.addJob({src:e.getUrl(),tile:e,source:this.source,postData:e.postData,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.ajaxHeaders,crossOriginPolicy:this.crossOriginPolicy,ajaxWithCredentials:this.ajaxWithCredentials,callback:function(n,o,r){i._onTileLoad(e,t,n,o,r)},abort:function(){e.loading=!1}})},_onTileLoad:function(t,i,n,o,r){if(n)t.exists=!0;else{e.console.error("Tile %s failed to load: %s - error: %s",t,t.getUrl(),o),this.viewer.raiseEvent("tile-load-failed",{tile:t,tiledImage:this,time:i,message:o,tileRequest:r}),t.loading=!1,t.exists=!1;return}if(ie.visibility?t:t.visibility===e.visibility&&t.squaredDistance1&&c>this.smoothTileEdgesMinZoom&&!this.iOSDevice&&this.getRotation(!0)%360==0&&e.supportsCanvas&&this.viewer.useCanvas&&(o=!0,r=l.getScaleForEdgeSmoothing(),s=l.getTranslationForEdgeSmoothing(r,this._drawer.getCanvasSize(!1),this._drawer.getCanvasSize(!0))),o&&(r||(a=this.viewport.viewportToViewerElementRectangle(this.getClippedBounds(!0)).getIntegerBoundingBox(),this._drawer.viewer.viewport.getFlip()&&(this.viewport.getRotation(!0)%360!=0||this.getRotation(!0)%360!=0)&&(a.x=this._drawer.viewer.container.clientWidth-(a.x+a.width)),a=a.times(e.pixelDensityRatio)),this._drawer._clear(!0,a)),!r&&(this.viewport.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:o}),this.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:o}),this.viewport.getRotation(!0)%360==0&&this.getRotation(!0)%360==0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip());var u=!1;if(this._clip){this._drawer.saveContext(o);var d=this.imageToViewportRectangle(this._clip,!0);d=d.rotate(-this.getRotation(!0),this._getRotationPoint(!0));var p=this._drawer.viewportToDrawerRectangle(d);r&&(p=p.times(r)),s&&(p=p.translate(s)),this._drawer.setClip(p,o),u=!0}if(this._croppingPolygons){var g=this;this._drawer.saveContext(o);try{var m=this._croppingPolygons.map(function(e){return e.map(function(e){var t=g.imageToViewportCoordinates(e.x,e.y,!0).rotate(-g.getRotation(!0),g._getRotationPoint(!0)),i=g._drawer.viewportCoordToDrawerCoord(t);return r&&(i=i.times(r)),s&&(i=i.plus(s)),i})});this._drawer.clipWithPolygons(m,o)}catch(t){e.console.error(t)}u=!0}if(this.placeholderFillStyle&&!1===this._hasOpaqueTile){var v=this._drawer.viewportToDrawerRectangle(this.getBounds(!0));r&&(v=v.times(r)),s&&(v=v.translate(s));var f=null;f="function"==typeof this.placeholderFillStyle?this.placeholderFillStyle(this,this._drawer.context):this.placeholderFillStyle,this._drawer.drawRectangle(v,f,o)}var y=function(n){if("number"==typeof n){return i(o=n)?t:o}if(!n||!e.Browser)return t;var o,r,s=n[e.Browser.vendor];return i(s)&&(s=n["*"]),i(r=s)?t:r}(this.subPixelRoundingForTransparency),w=!1;y===e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS?w=!0:y===e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&(w=!(this.viewer&&this.viewer.isAnimating()));for(var T=n.length-1;T>=0;T--)l=n[T],this._drawer.drawTile(l,this._drawingHandler,o,r,s,w,this.source),l.beingDrawn=!0,this.viewer&&this.viewer.raiseEvent("tile-drawn",{tiledImage:this,tile:l});u&&this._drawer.restoreContext(o),r||(this.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(o),this.viewport.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(o)),o&&(r&&(this.viewport.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.viewport.getRotation(!0),useSketch:!1}),this.getRotation(!0)%360!=0&&this._drawer._offsetForRotation({degrees:this.getRotation(!0),point:this.viewport.pixelFromPointNoRotate(this._getRotationPoint(!0),!0),useSketch:!1})),this._drawer.blendSketch({opacity:this.opacity,scale:r,translate:s,compositeOperation:this.compositeOperation,bounds:a}),r&&(this.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(!1),this.viewport.getRotation(!0)%360!=0&&this._drawer._restoreRotationChanges(!1))),!r&&this.viewport.getRotation(!0)%360==0&&this.getRotation(!0)%360==0&&this._drawer.viewer.viewport.getFlip()&&this._drawer._flip(),this._drawDebugInfo(n)}},_drawDebugInfo:function(t){if(this.debugMode)for(var i=t.length-1;i>=0;i--){var n=t[i];try{this._drawer.drawDebugInfo(n,t.length,i,this)}catch(t){e.console.error(t)}}},_providesCoverage:function(e,t,i,n){var o,r,s,a;if(!e[t])return!1;if(void 0===i||void 0===n){for(s in o=e[t])if(Object.prototype.hasOwnProperty.call(o,s)){for(a in r=o[s])if(Object.prototype.hasOwnProperty.call(r,a)&&!r[a])return!1}return!0}return void 0===e[t][i]||void 0===e[t][i][n]||!0===e[t][i][n]},_isCovered:function(e,t,i,n){return void 0===i||void 0===n?this._providesCoverage(e,t+1):this._providesCoverage(e,t+1,2*i,2*n)&&this._providesCoverage(e,t+1,2*i,2*n+1)&&this._providesCoverage(e,t+1,2*i+1,2*n)&&this._providesCoverage(e,t+1,2*i+1,2*n+1)},_setCoverage:function(t,i,n,o,r){if(!t[i]){e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s",i);return}t[i][n]||(t[i][n]={}),t[i][n][o]=r},_resetCoverage:function(e,t){e[t]={}}});var t=e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;function i(t){return t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS&&t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST&&t!==e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER}}(u),h=function(e){u.console.assert(e,"[TileCache.cacheTile] options is required"),u.console.assert(e.tile,"[TileCache.cacheTile] options.tile is required"),u.console.assert(e.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=e.tile,this.tiledImage=e.tiledImage},(c=function(e){u.console.assert(e,"[ImageRecord] options is required"),u.console.assert(e.data,"[ImageRecord] options.data is required"),this._tiles=[],e.create.apply(null,[this,e.data,e.ownerTile]),this._destroyImplementation=e.destroy.bind(null,this),this.getImage=e.getImage.bind(null,this),this.getData=e.getData.bind(null,this),this.getRenderedContext=e.getRenderedContext.bind(null,this)}).prototype={destroy:function(){this._destroyImplementation(),this._tiles=null},addTile:function(e){u.console.assert(e,"[ImageRecord.addTile] tile is required"),this._tiles.push(e)},removeTile:function(e){for(var t=0;tthis._maxImageCacheCount){for(var o,r,s,a,l,d,p=null,g=-1,m=null,v=this._tilesLoaded.length-1;v>=0;v--)if(!((o=(d=this._tilesLoaded[v]).tile).level<=t)&&!o.beingDrawn){if(!p){p=o,g=v,m=d;continue}a=o.lastTouchTime,r=p.lastTouchTime,l=o.level,s=p.level,(as)&&(p=o,g=v,m=d)}p&&g>=0&&(this._unloadTile(m),i=g)}this._tilesLoaded[i]=new h({tile:e.tile,tiledImage:e.tiledImage})},clearTilesFor:function(e){u.console.assert(e,"[TileCache.clearTilesFor] tiledImage is required");for(var t,i=0;i=this._items.length)throw Error("Index bigger than number of layers.");t!==i&&-1!==i&&(this._items.splice(i,1),this._items.splice(t,0,e),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:e,previousIndex:i,newIndex:t}))},removeItem:function(e){u.console.assert(e,"[World.removeItem] item is required");var t=u.indexOf(this._items,e);-1!==t&&(e.removeHandler("bounds-change",this._delegatedFigureSizes),e.removeHandler("clip-change",this._delegatedFigureSizes),e.destroy(),this._items.splice(t,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(e))},removeAll:function(){for(this.viewer._cancelPendingImages(),t=0;tn.height?d:n.width/n.height*d,r=n.height/n.width*o,s=new u.Point(g+(d-o)/2,m+(d-r)/2),i.setPosition(s,a),i.setWidth(o,a),"horizontal"===l?g+=p:m+=p;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var e=this._homeBounds?this._homeBounds.clone():null,t=this._contentSize?this._contentSize.clone():null,i=this._contentFactor||0;if(this._items.length){var n=this._items[0],o=n.getBounds();this._contentFactor=n.getContentSize().x/o.width;for(var r=n.getClippedBounds().getBoundingBox(),s=r.x,a=r.y,l=r.x+r.width,h=r.y+r.height,c=1;c=i.x&&t.x=i.y},getEvent:function(e){return e?$.getEvent=function(e){return e}:$.getEvent=function(){return window.event},$.getEvent(e)},getMousePosition:function(e){if("number"==typeof e.pageX)$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.pageX,t.y=e.pageY,t};else if("number"==typeof e.clientX)$.getMousePosition=function(e){var t=new $.Point;return e=$.getEvent(e),t.x=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,t.y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop,t};else throw Error("Unknown event mouse position, no known technique.");return $.getMousePosition(e)},getPageScroll:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.pageXOffset)$.getPageScroll=function(){return new $.Point(window.pageXOffset,window.pageYOffset)};else if(t.scrollLeft||t.scrollTop)$.getPageScroll=function(){return new $.Point(document.body.scrollLeft,document.body.scrollTop)};else{if(!e.scrollLeft&&!e.scrollTop)return new $.Point(0,0);$.getPageScroll=function(){return new $.Point(document.documentElement.scrollLeft,document.documentElement.scrollTop)}}return $.getPageScroll()},setPageScroll:function(e){if(void 0!==window.scrollTo)$.setPageScroll=function(e){window.scrollTo(e.x,e.y)};else{var t=$.getPageScroll();if(t.x===e.x&&t.y===e.y)return;document.body.scrollLeft=e.x,document.body.scrollTop=e.y;var i=$.getPageScroll();if(i.x!==t.x&&i.y!==t.y){$.setPageScroll=function(e){document.body.scrollLeft=e.x,document.body.scrollTop=e.y};return}if(document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y,(i=$.getPageScroll()).x!==t.x&&i.y!==t.y){$.setPageScroll=function(e){document.documentElement.scrollLeft=e.x,document.documentElement.scrollTop=e.y};return}$.setPageScroll=function(e){}}return $.setPageScroll(e)},getWindowSize:function(){var e=document.documentElement||{},t=document.body||{};if("number"==typeof window.innerWidth)$.getWindowSize=function(){return new $.Point(window.innerWidth,window.innerHeight)};else if(e.clientWidth||e.clientHeight)$.getWindowSize=function(){return new $.Point(document.documentElement.clientWidth,document.documentElement.clientHeight)};else if(t.clientWidth||t.clientHeight)$.getWindowSize=function(){return new $.Point(document.body.clientWidth,document.body.clientHeight)};else throw Error("Unknown window size, no known technique.");return $.getWindowSize()},makeCenteredNode:function(e){e=$.getElement(e);var t=[$.makeNeutralElement("div"),$.makeNeutralElement("div"),$.makeNeutralElement("div")];return $.extend(t[0].style,{display:"table",height:"100%",width:"100%"}),$.extend(t[1].style,{display:"table-row"}),$.extend(t[2].style,{display:"table-cell",verticalAlign:"middle",textAlign:"center"}),t[0].appendChild(t[1]),t[1].appendChild(t[2]),t[2].appendChild(e),t[0]},makeNeutralElement:function(e){var t=document.createElement(e),i=t.style;return i.background="transparent none",i.border="none",i.margin="0px",i.padding="0px",i.position="static",t},now:function(){return Date.now?$.now=Date.now:$.now=function(){return new Date().getTime()},$.now()},makeTransparentImage:function(e){return $.makeTransparentImage=function(e){var t=$.makeNeutralElement("img");return t.src=e,t},$.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<7&&($.makeTransparentImage=function(e){var t=$.makeNeutralElement("img"),i=null;return(i=$.makeNeutralElement("span")).style.display="inline-block",t.onload=function(){i.style.width=i.style.width||t.width+"px",i.style.height=i.style.height||t.height+"px",t.onload=null,t=null},t.src=e,i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale')",i}),$.makeTransparentImage(e)},setElementOpacity:function(e,t,i){var n;e=$.getElement(e),i&&!$.Browser.alpha&&(t=Math.round(t)),$.Browser.opacity?e.style.opacity=t<1?t:"":t<1?(n="alpha(opacity="+Math.round(100*t)+")",e.style.filter=n):e.style.filter=""},setElementTouchActionNone:function(e){void 0!==(e=$.getElement(e)).style.touchAction?e.style.touchAction="none":void 0!==e.style.msTouchAction&&(e.style.msTouchAction="none")},addClass:function(e,t){(e=$.getElement(e)).className?-1===(" "+e.className+" ").indexOf(" "+t+" ")&&(e.className+=" "+t):e.className=t},indexOf:function(e,t,i){return Array.prototype.indexOf?this.indexOf=function(e,t,i){return e.indexOf(t,i)}:this.indexOf=function(e,t,i){var n,o,r=i||0;if(!e)throw TypeError();if(0===(o=e.length)||r>=o)return -1;for(r<0&&(r=o-Math.abs(r)),n=r;n=200&&a.status<300||0===a.status&&"http:"!==s&&"https:"!==s?t(a):($.console.log("AJAX request returned %d: %s",a.status,e),$.isFunction(i)&&i(a)))};try{if(a.open("GET",e,!0),r&&(a.responseType=r),o)for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&a.setRequestHeader(l,o[l]);n&&(a.withCredentials=!0),a.send(null)}catch(n){var h=n.message;if($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<10&&void 0!==n.number&&-2147024891==n.number&&(h+="\nSee http://msdn.microsoft.com/en-us/library/ms537505(v=vs.85).aspx#xdomain"),$.console.log("%s while making AJAX request: %s",n.name,h),a.onreadystatechange=function(){},window.XDomainRequest){var c=new window.XDomainRequest;if(c){c.onload=function(e){$.isFunction(t)&&t({responseText:c.responseText,status:200,statusText:"OK"})},c.onerror=function(e){$.isFunction(i)&&i({responseText:c.responseText,status:444,statusText:"An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser."})};try{c.open("GET",e),c.send()}catch(e){$.isFunction(i)&&i(a,n)}}}else $.isFunction(i)&&i(a,n)}return a},jsonp:function(e){var t,i=e.url,n=document.head||document.getElementsByTagName("head")[0]||document.documentElement,o=e.callbackName||"openseadragon"+$.now(),r=window[o],s="$1"+o+"$2",a=e.param||"callback",l=e.callback;i=i.replace(/(\=)\?(&|$)|\?\?/i,s),i+=(/\?/.test(i)?"&":"?")+a+"="+o,window[o]=function(e){if(r)window[o]=r;else try{delete window[o]}catch(e){}l&&$.isFunction(l)&&l(e)},t=document.createElement("script"),(void 0!==e.async||!1!==e.async)&&(t.async="async"),e.scriptCharset&&(t.charset=e.scriptCharset),t.src=i,t.onload=t.onreadystatechange=function(e,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,n&&t.parentNode&&n.removeChild(t),t=void 0)},n.insertBefore(t,n.firstChild)},createFromDZI:function(){throw"OpenSeadragon.createFromDZI is deprecated, use Viewer.open."},parseXml:function(e){if(window.DOMParser)$.parseXml=function(e){return new DOMParser().parseFromString(e,"text/xml")};else if(window.ActiveXObject)$.parseXml=function(e){var t=null;return(t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t};else throw Error("Browser doesn't support XML DOM.");return $.parseXml(e)},parseJSON:function(string){return window.JSON&&window.JSON.parse?$.parseJSON=window.JSON.parse:$.parseJSON=function(string){return eval("("+string+")")},$.parseJSON(string)},imageFormatSupported:function(e){return!!FILEFORMATS[(e=e||"").toLowerCase()]}});var nullfunction=function(e){};$.console=window.console||{log:nullfunction,debug:nullfunction,info:nullfunction,warn:nullfunction,error:nullfunction,assert:nullfunction},$.Browser={vendor:$.BROWSERS.UNKNOWN,version:0,alpha:!0};var FILEFORMATS={bmp:!1,jpeg:!0,jpg:!0,png:!0,tif:!1,wdp:!1},URLPARAMS={};function getOffsetParent(e,t){return t&&e!=document.body?document.body:e.offsetParent}(function(){var e=navigator.appVersion,t=navigator.userAgent;switch(navigator.appName){case"Microsoft Internet Explorer":window.attachEvent&&window.ActiveXObject&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(t.substring(t.indexOf("MSIE")+5,t.indexOf(";",t.indexOf("MSIE")))));break;case"Netscape":window.addEventListener&&(t.indexOf("Firefox")>=0?($.Browser.vendor=$.BROWSERS.FIREFOX,$.Browser.version=parseFloat(t.substring(t.indexOf("Firefox")+8))):t.indexOf("Safari")>=0?($.Browser.vendor=t.indexOf("Chrome")>=0?$.BROWSERS.CHROME:$.BROWSERS.SAFARI,$.Browser.version=parseFloat(t.substring(t.substring(0,t.indexOf("Safari")).lastIndexOf("/")+1,t.indexOf("Safari")))):null!==RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})").exec(t)&&($.Browser.vendor=$.BROWSERS.IE,$.Browser.version=parseFloat(RegExp.$1)));break;case"Opera":$.Browser.vendor=$.BROWSERS.OPERA,$.Browser.version=parseFloat(e)}var i,n,o,r=window.location.search.substring(1).split("&");for(o=0;o0){var s=i.substring(0,n),a=i.substring(n+1);try{URLPARAMS[s]=decodeURIComponent(a)}catch(e){$.console.error("Ignoring malformed URL parameter: %s=%s",s,a)}}$.Browser.alpha=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9||$.Browser.vendor==$.BROWSERS.CHROME&&$.Browser.version<2),$.Browser.opacity=!($.Browser.vendor==$.BROWSERS.IE&&$.Browser.version<9)})(),function(e){var t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame,i=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||e.msCancelAnimationFrame;if(t&&i)$.requestAnimationFrame=function(){return t.apply(e,arguments)},$.cancelAnimationFrame=function(){return i.apply(e,arguments)};else{var n,o=[],r=[],s=0;$.requestAnimationFrame=function(e){return o.push([++s,e]),n||(n=setInterval(function(){if(o.length){var e=$.now(),t=r;for(r=o,o=t;r.length;)r.shift()[1](e)}else clearInterval(n),n=void 0},20)),s},$.cancelAnimationFrame=function(e){var t,i;for(t=0,i=o.length;t0&&(e.removeEvent(e.MouseTracker.captureElement,"mousemove",o.mousemovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"mouseup",o.mouseupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointermove":"MSPointerMove",o.pointermovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,e.MouseTracker.unprefixedPointerEvents?"pointerup":"MSPointerUp",o.pointerupcaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchmove",o.touchmovecaptured,!0),e.removeEvent(e.MouseTracker.captureElement,"touchend",o.touchendcaptured,!0),o.activePointersLists[n].captureCount=0);for(n=0;n0){for(n=0;n0&&(eu(e,t,r,0),i.captureCount=1,l(e,i.type),eh(e,t,r))}}function A(i,n){var o,r,s,l,h=n.changedTouches.length,u=[],d=i.getActivePointersListByType("touch");for(o=e.now(),d.getLength()>n.touches.length-h&&(e.console.warn("Tracked touch contact count doesn't match event.touches.length. Removing all tracked touch pointers."),N(i,n,d)),r=0;r8||"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",e.MouseTracker.supportsMouseCapture=function(){var t=document.createElement("div");return e.isFunction(t.setCapture)&&e.isFunction(t.releaseCapture)}(),e.MouseTracker.subscribeEvents=["click","dblclick","keydown","keyup","keypress","focus","blur",e.MouseTracker.wheelEventName],"DOMMouseScroll"==e.MouseTracker.wheelEventName&&e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"),window.PointerEvent&&(window.navigator.pointerEnabled||e.Browser.vendor!==e.BROWSERS.IE)?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("pointerover","pointerout","pointerdown","pointerup","pointermove","pointercancel"),e.MouseTracker.unprefixedPointerEvents=!0,navigator.maxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.maxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):window.MSPointerEvent&&window.navigator.msPointerEnabled?(e.MouseTracker.havePointerEvents=!0,e.MouseTracker.subscribeEvents.push("MSPointerOver","MSPointerOut","MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"),e.MouseTracker.unprefixedPointerEvents=!1,navigator.msMaxTouchPoints?e.MouseTracker.maxTouchPoints=navigator.msMaxTouchPoints:e.MouseTracker.maxTouchPoints=0,e.MouseTracker.haveMouseEnter=!1):(e.MouseTracker.havePointerEvents=!1,e.Browser.vendor===e.BROWSERS.IE&&e.Browser.version<9?(e.MouseTracker.subscribeEvents.push("mouseenter","mouseleave"),e.MouseTracker.haveMouseEnter=!0):(e.MouseTracker.subscribeEvents.push("mouseover","mouseout"),e.MouseTracker.haveMouseEnter=!1),e.MouseTracker.subscribeEvents.push("mousedown","mouseup","mousemove"),"ontouchstart"in window&&e.MouseTracker.subscribeEvents.push("touchstart","touchend","touchmove","touchcancel"),"ongesturestart"in window&&e.MouseTracker.subscribeEvents.push("gesturestart","gesturechange"),e.MouseTracker.mousePointerId="legacy-mouse",e.MouseTracker.maxTouchPoints=10),e.MouseTracker.GesturePointList=function(e){this._gPoints=[],this.type=e,this.buttons=0,this.contacts=0,this.clicks=0,this.captureCount=0},e.MouseTracker.GesturePointList.prototype={getLength:function(){return this._gPoints.length},asArray:function(){return this._gPoints},add:function(e){return this._gPoints.push(e)},removeById:function(e){var t,i=this._gPoints.length;for(t=0;t1&&("mouse"===this.type||"pen"===this.type)&&(this.contacts=1)},removeContact:function(){--this.contacts,this.contacts<0&&(this.contacts=0)}};var em=function(){try{return window.self!==window.top}catch(e){return!0}}();function ev(e){try{return e.addEventListener&&e.removeEventListener}catch(e){return!1}}}(OpenSeadragon),function(e){e.ControlAnchor={NONE:0,TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,ABSOLUTE:5},e.Control=function(t,i,n){var o=t.parentNode;"number"==typeof i&&(e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead. Support for this deprecated variant is scheduled for removal in December 2013"),i={anchor:i}),i.attachToViewer=void 0===i.attachToViewer||i.attachToViewer,this.autoFade=void 0===i.autoFade||i.autoFade,this.element=t,this.anchor=i.anchor,this.container=n,this.anchor==e.ControlAnchor.ABSOLUTE?(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.position="absolute",this.wrapper.style.top="number"==typeof i.top?i.top+"px":i.top,this.wrapper.style.left="number"==typeof i.left?i.left+"px":i.left,this.wrapper.style.height="number"==typeof i.height?i.height+"px":i.height,this.wrapper.style.width="number"==typeof i.width?i.width+"px":i.width,this.wrapper.style.margin="0px",this.wrapper.style.padding="0px",this.element.style.position="relative",this.element.style.top="0px",this.element.style.left="0px",this.element.style.height="100%",this.element.style.width="100%"):(this.wrapper=e.makeNeutralElement("div"),this.wrapper.style.display="inline-block",this.anchor==e.ControlAnchor.NONE&&(this.wrapper.style.width=this.wrapper.style.height="100%")),this.wrapper.appendChild(this.element),i.attachToViewer?this.anchor==e.ControlAnchor.TOP_RIGHT||this.anchor==e.ControlAnchor.BOTTOM_RIGHT?this.container.insertBefore(this.wrapper,this.container.firstChild):this.container.appendChild(this.wrapper):o.appendChild(this.wrapper)},e.Control.prototype={destroy:function(){this.wrapper.removeChild(this.element),this.container.removeChild(this.wrapper)},isVisible:function(){return"none"!=this.wrapper.style.display},setVisible:function(t){this.wrapper.style.display=t?this.anchor==e.ControlAnchor.ABSOLUTE?"block":"inline-block":"none"},setOpacity:function(t){this.element[e.SIGNAL]&&e.Browser.vendor==e.BROWSERS.IE?e.setElementOpacity(this.element,t,!0):e.setElementOpacity(this.wrapper,t,!0)}}}(OpenSeadragon),function(e){function t(e,t){var i,n=e.controls;for(i=n.length-1;i>=0;i--)if(n[i].element==t)return i;return -1}e.ControlDock=function(t){var i,n,o=["topleft","topright","bottomright","bottomleft"];for(e.extend(!0,this,{id:"controldock-"+e.now()+"-"+Math.floor(1e6*Math.random()),container:e.makeNeutralElement("div"),controls:[]},t),this.container.onsubmit=function(){return!1},this.element&&(this.element=e.getElement(this.element),this.element.appendChild(this.container),this.element.style.position="relative",this.container.style.width="100%",this.container.style.height="100%"),n=0;n=0)){switch(n.anchor){case e.ControlAnchor.TOP_RIGHT:o=this.controls.topright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.BOTTOM_RIGHT:o=this.controls.bottomright,i.style.position="relative",i.style.paddingRight="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.BOTTOM_LEFT:o=this.controls.bottomleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingBottom="0px";break;case e.ControlAnchor.TOP_LEFT:o=this.controls.topleft,i.style.position="relative",i.style.paddingLeft="0px",i.style.paddingTop="0px";break;case e.ControlAnchor.ABSOLUTE:default:case e.ControlAnchor.NONE:o=this.container,i.style.margin="0px",i.style.padding="0px"}this.controls.push(new e.Control(i,n,o)),i.style.display="inline-block"}},removeControl:function(i){var n=t(this,i=e.getElement(i));return n>=0&&(this.controls[n].destroy(),this.controls.splice(n,1)),this},clearControls:function(){for(;this.controls.length>0;)this.controls.pop().destroy();return this},areControlsEnabled:function(){var e;for(e=this.controls.length-1;e>=0;e--)if(this.controls[e].isVisible())return!0;return!1},setControlsEnabled:function(e){var t;for(t=this.controls.length-1;t>=0;t--)this.controls[t].setVisible(e);return this}}}(OpenSeadragon),function(e){e.Placement=e.freezeObject({CENTER:0,TOP_LEFT:1,TOP:2,TOP_RIGHT:3,RIGHT:4,BOTTOM_RIGHT:5,BOTTOM:6,BOTTOM_LEFT:7,LEFT:8,properties:{0:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1},1:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},2:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!0,isVerticallyCentered:!1,isBottom:!1},3:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!0,isVerticallyCentered:!1,isBottom:!1},4:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!0,isBottom:!1},5:{isLeft:!1,isHorizontallyCentered:!1,isRight:!0,isTop:!1,isVerticallyCentered:!1,isBottom:!0},6:{isLeft:!1,isHorizontallyCentered:!0,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},7:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!1,isBottom:!0},8:{isLeft:!0,isHorizontallyCentered:!1,isRight:!1,isTop:!1,isVerticallyCentered:!0,isBottom:!1}}})}(OpenSeadragon),function(e){var t={},i=1;function n(t){return t=e.getElement(t),new e.Point(0===t.clientWidth?1:t.clientWidth,0===t.clientHeight?1:t.clientHeight)}function o(t,i,n,o,r){var s=t;if("string"==e.type(i)){if(i.match(/^\s*<.*>\s*$/))i=e.parseXml(i);else if(i.match(/^\s*[\{\[].*[\}\]]\s*$/))try{i=e.parseJSON(i)}catch(e){}}function a(e,t){e.ready?o(e):(e.addHandler("ready",function(){o(e)}),e.addHandler("open-failed",function(e){r({message:e.message,source:t})}))}setTimeout(function(){if("string"==e.type(i))(i=new e.TileSource({url:i,crossOriginPolicy:void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy,ajaxWithCredentials:t.ajaxWithCredentials,ajaxHeaders:t.ajaxHeaders,useCanvas:t.useCanvas,success:function(e){o(e.tileSource)}})).addHandler("open-failed",function(e){r(e)});else if(e.isPlainObject(i)||i.nodeType){if(void 0===i.crossOriginPolicy&&(void 0!==n.crossOriginPolicy||void 0!==t.crossOriginPolicy)&&(i.crossOriginPolicy=void 0!==n.crossOriginPolicy?n.crossOriginPolicy:t.crossOriginPolicy),void 0===i.ajaxWithCredentials&&(i.ajaxWithCredentials=t.ajaxWithCredentials),void 0===i.useCanvas&&(i.useCanvas=t.useCanvas),e.isFunction(i.getTileUrl)){var l=new e.TileSource(i);l.getTileUrl=i.getTileUrl,o(l)}else{var h=e.TileSource.determineType(s,i);if(!h){r({message:"Unable to load TileSource",source:i});return}var c=h.prototype.configure.apply(s,[i]);a(new h(c),i)}}else a(i,i)})}function r(t,i){if(i instanceof e.Overlay)return i;var n=null;if(i.element)n=e.getElement(i.element);else{var o=i.id?i.id:"openseadragon-overlay-"+Math.floor(1e7*Math.random());(n=e.getElement(i.id))||((n=document.createElement("a")).href="#/overlay/"+o),n.id=o,e.addClass(n,i.className?i.className:"openseadragon-overlay")}var r=i.location,s=i.width,a=i.height;if(!r){var l=i.x,h=i.y;if(void 0!==i.px){var c=t.viewport.imageToViewportRectangle(new e.Rect(i.px,i.py,s||0,a||0));l=c.x,h=c.y,s=void 0!==s?c.width:void 0,a=void 0!==a?c.height:void 0}r=new e.Point(l,h)}var u=i.placement;return u&&"string"===e.type(u)&&(u=e.Placement[i.placement.toUpperCase()]),new e.Overlay({element:n,location:r,placement:u,onDraw:i.onDraw,checkResize:i.checkResize,width:s,height:a,rotationMode:i.rotationMode})}function s(e,t){var i;for(i=e.length-1;i>=0;i--)if(e[i].element===t)return i;return -1}function a(t,i){return e.requestAnimationFrame(function(){i(t)})}function l(t){e.requestAnimationFrame(function(){c(t)})}function h(t){t.autoHideControls&&(t.controlsShouldFade=!0,t.controlsFadeBeginTime=e.now()+t.controlsFadeDelay,window.setTimeout(function(){l(t)},t.controlsFadeDelay))}function c(t){var i,n;if(t.controlsShouldFade){for(i=Math.max(0,i=Math.min(1,i=1-(e.now()-t.controlsFadeBeginTime)/t.controlsFadeLength)),n=t.controls.length-1;n>=0;n--)t.controls[n].autoFade&&t.controls[n].setOpacity(i);i>0&&l(t)}}function u(e){var t;for(e.controlsShouldFade=!1,t=e.controls.length-1;t>=0;t--)e.controls[t].setOpacity(1)}function d(){u(this)}function p(){h(this)}function g(t){var i={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 38:return i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 40:return i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,this.pixelsPerArrowPress))),this.viewport.applyConstraints()),!1;case 37:return i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;case 39:return i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress,0))),this.viewport.applyConstraints()),!1;default:return!0}}function m(t){var i={originalEvent:t.originalEvent,preventDefaultAction:t.preventDefaultAction,preventVerticalPan:t.preventVerticalPan,preventHorizontalPan:t.preventHorizontalPan};if(this.raiseEvent("canvas-key",i),i.preventDefaultAction||t.ctrl||t.alt||t.meta)return!0;switch(t.keyCode){case 43:case 61:return this.viewport.zoomBy(1.1),this.viewport.applyConstraints(),!1;case 45:return this.viewport.zoomBy(.9),this.viewport.applyConstraints(),!1;case 48:return this.viewport.goHome(),this.viewport.applyConstraints(),!1;case 119:case 87:return i.preventVerticalPan||(t.shift?this.viewport.zoomBy(1.1):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,-40))),this.viewport.applyConstraints()),!1;case 115:case 83:return i.preventVerticalPan||(t.shift?this.viewport.zoomBy(.9):this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0,40))),this.viewport.applyConstraints()),!1;case 97:return i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40,0))),this.viewport.applyConstraints()),!1;case 100:return i.preventHorizontalPan||(this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40,0))),this.viewport.applyConstraints()),!1;case 114:return this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 82:return this.viewport.flipped?this.viewport.setRotation(e.positiveModulo(this.viewport.degrees+this.rotationIncrement,360)):this.viewport.setRotation(e.positiveModulo(this.viewport.degrees-this.rotationIncrement,360)),this.viewport.applyConstraints(),!1;case 102:return this.viewport.toggleFlip(),!1;default:return!0}}function v(e){document.activeElement!=this.canvas&&this.canvas.focus(),this.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var t,i={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-click",i),!i.preventDefaultAction&&this.viewport&&e.quick&&(t=this.gestureSettingsByDeviceType(e.pointerType)).clickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function f(e){var t,i={tracker:e.eventSource,position:e.position,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.raiseEvent("canvas-double-click",i),!i.preventDefaultAction&&this.viewport&&(t=this.gestureSettingsByDeviceType(e.pointerType)).dblClickToZoom&&(this.viewport.zoomBy(e.shift?1/this.zoomPerClick:this.zoomPerClick,t.zoomToRefPoint?this.viewport.pointFromPixel(e.position,!0):null),this.viewport.applyConstraints())}function w(e){var t,i={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.raiseEvent("canvas-drag",i),!i.preventDefaultAction&&this.viewport){if(t=this.gestureSettingsByDeviceType(e.pointerType),this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewport.flipped&&(e.delta.x=-e.delta.x),this.constrainDuringPan){var n=this.viewport.deltaPointsFromPixels(e.delta.negate());this.viewport.centerSpringX.target.value+=n.x,this.viewport.centerSpringY.target.value+=n.y;var o=this.viewport.getBounds(),r=this.viewport.getConstrainedBounds();this.viewport.centerSpringX.target.value-=n.x,this.viewport.centerSpringY.target.value-=n.y,o.x!=r.x&&(e.delta.x=0),o.y!=r.y&&(e.delta.y=0)}this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()),t.flickEnabled&&!this.constrainDuringPan)}}function y(t){if(!t.preventDefaultAction&&this.viewport){var i=this.gestureSettingsByDeviceType(t.pointerType);if(i.flickEnabled&&t.speed>=i.flickMinSpeed){var n=0;this.panHorizontal&&(n=i.flickMomentum*t.speed*Math.cos(t.direction));var o=0;this.panVertical&&(o=i.flickMomentum*t.speed*Math.sin(t.direction));var r=this.viewport.pixelFromPoint(this.viewport.getCenter(!0)),s=this.viewport.pointFromPixel(new e.Point(r.x-n,r.y-o));this.viewport.panTo(s,!1)}this.viewport.applyConstraints()}this.raiseEvent("canvas-drag-end",{tracker:t.eventSource,position:t.position,speed:t.speed,direction:t.direction,shift:t.shift,originalEvent:t.originalEvent})}function T(e){this.raiseEvent("canvas-enter",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function x(t){window.location!=window.parent.location&&e.MouseTracker.resetAllMouseTrackers(),this.raiseEvent("canvas-exit",{tracker:t.eventSource,pointerType:t.pointerType,position:t.position,buttons:t.buttons,pointers:t.pointers,insideElementPressed:t.insideElementPressed,buttonDownAny:t.buttonDownAny,originalEvent:t.originalEvent})}function S(e){this.raiseEvent("canvas-press",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function E(e){this.raiseEvent("canvas-release",{tracker:e.eventSource,pointerType:e.pointerType,position:e.position,insideElementPressed:e.insideElementPressed,insideElementReleased:e.insideElementReleased,originalEvent:e.originalEvent})}function P(e){this.raiseEvent("canvas-nonprimary-press",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function _(e){this.raiseEvent("canvas-nonprimary-release",{tracker:e.eventSource,position:e.position,pointerType:e.pointerType,button:e.button,buttons:e.buttons,originalEvent:e.originalEvent})}function R(e){var t,i,n;if(!e.preventDefaultAction&&this.viewport&&((t=this.gestureSettingsByDeviceType(e.pointerType)).pinchToZoom&&(i=this.viewport.pointFromPixel(e.center,!0),n=this.viewport.pointFromPixel(e.lastCenter,!0).minus(i),this.panHorizontal||(n.x=0),this.panVertical||(n.y=0),this.viewport.zoomBy(e.distance/e.lastDistance,i,!0),t.zoomToRefPoint&&this.viewport.panBy(n,!0),this.viewport.applyConstraints()),t.pinchRotate)){var o=Math.atan2(e.gesturePoints[0].currentPos.y-e.gesturePoints[1].currentPos.y,e.gesturePoints[0].currentPos.x-e.gesturePoints[1].currentPos.x),r=Math.atan2(e.gesturePoints[0].lastPos.y-e.gesturePoints[1].lastPos.y,e.gesturePoints[0].lastPos.x-e.gesturePoints[1].lastPos.x);this.viewport.setRotation(this.viewport.getRotation()+180/Math.PI*(o-r))}return this.raiseEvent("canvas-pinch",{tracker:e.eventSource,gesturePoints:e.gesturePoints,lastCenter:e.lastCenter,center:e.center,lastDistance:e.lastDistance,distance:e.distance,shift:e.shift,originalEvent:e.originalEvent}),!1}function b(t){var i,n,o;if((o=e.now())-this._lastScrollTime>this.minScrollDeltaTime){if(this._lastScrollTime=o,this.viewport.flipped&&(t.position.x=this.viewport.getContainerSize().x-t.position.x),!t.preventDefaultAction&&this.viewport&&(i=this.gestureSettingsByDeviceType(t.pointerType)).scrollToZoom&&(n=Math.pow(this.zoomPerScroll,t.scroll),this.viewport.zoomBy(n,i.zoomToRefPoint?this.viewport.pointFromPixel(t.position,!0):null),this.viewport.applyConstraints()),this.raiseEvent("canvas-scroll",{tracker:t.eventSource,position:t.position,scroll:t.scroll,shift:t.shift,originalEvent:t.originalEvent}),i&&i.scrollToZoom)return!1}else if((i=this.gestureSettingsByDeviceType(t.pointerType))&&i.scrollToZoom)return!1}function C(e){t[this.hash].mouseInside=!0,u(this),this.raiseEvent("container-enter",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function I(e){e.pointers<1&&(t[this.hash].mouseInside=!1,t[this.hash].animating||h(this)),this.raiseEvent("container-exit",{tracker:e.eventSource,position:e.position,buttons:e.buttons,pointers:e.pointers,insideElementPressed:e.insideElementPressed,buttonDownAny:e.buttonDownAny,originalEvent:e.originalEvent})}function k(e){O(e),e.isOpen()?e._updateRequestId=a(e,k):e._updateRequestId=!1}function O(e){if(!e._opening){if(e.autoResize){var i=n(e.container),o=t[e.hash].prevContainerSize;if(!i.equals(o)){var r=e.viewport;if(e.preserveImageSizeOnResize){var s=o.x/i.x,a=r.getZoom()*s,l=r.getCenter();r.resize(i,!1),r.zoomTo(a,null,!0),r.panTo(l,!0)}else{var c=r.getBounds();r.resize(i,!0),r.fitBoundsWithConstraints(c,!0)}t[e.hash].prevContainerSize=i,t[e.hash].forceRedraw=!0}}var d=e.viewport.update(),p=e.world.update()||d;d&&e.raiseEvent("viewport-change"),e.referenceStrip&&(p=e.referenceStrip.update(e.viewport)||p),!t[e.hash].animating&&p&&(e.raiseEvent("animation-start"),u(e)),(p||t[e.hash].forceRedraw||e.world.needsDraw())&&(B(e),e._drawOverlays(),e.navigator&&e.navigator.update(e.viewport),t[e.hash].forceRedraw=!1,p&&e.raiseEvent("animation")),!t[e.hash].animating||p||(e.raiseEvent("animation-finish"),t[e.hash].mouseInside||h(e)),t[e.hash].animating=p}}function B(e){e.imageLoader.clear(),e.drawer.clear(),e.world.draw(),e.raiseEvent("update-viewport",{})}function D(e,t){return e?e+t:t}function z(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function M(){t[this.hash].lastZoomTime=e.now(),t[this.hash].zoomFactor=1/this.zoomPerSecond,t[this.hash].zooming=!0,F(this)}function H(){t[this.hash].zooming=!1}function F(t){e.requestAnimationFrame(e.delegate(t,L))}function L(){var i,n,o;t[this.hash].zooming&&this.viewport&&(n=(i=e.now())-t[this.hash].lastZoomTime,o=Math.pow(t[this.hash].zoomFactor,n/1e3),this.viewport.zoomBy(o),this.viewport.applyConstraints(),t[this.hash].lastZoomTime=i,F(this))}function N(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(this.zoomPerClick/1),this.viewport.applyConstraints())}function A(){this.viewport&&(t[this.hash].zooming=!1,this.viewport.zoomBy(1/this.zoomPerClick),this.viewport.applyConstraints())}function W(){this.buttons.emulateEnter(),this.buttons.emulateExit()}function V(){this.viewport&&this.viewport.goHome()}function U(){this.isFullPage()&&!e.isFullScreen()?this.setFullPage(!1):this.setFullScreen(!this.isFullPage()),this.buttons&&this.buttons.emulateExit(),this.fullPageButton.element.focus(),this.viewport&&this.viewport.applyConstraints()}function j(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t+this.rotationIncrement,360):e.positiveModulo(t-this.rotationIncrement,360),this.viewport.setRotation(t)}}function G(){if(this.viewport){var t=this.viewport.getRotation();t=this.viewport.flipped?e.positiveModulo(t-this.rotationIncrement,360):e.positiveModulo(t+this.rotationIncrement,360),this.viewport.setRotation(t)}}function q(){this.viewport.toggleFlip()}function Z(){var e=this._sequenceIndex-1;this.navPrevNextWrap&&e<0&&(e+=this.tileSources.length),this.goToPage(e)}function X(){var e=this._sequenceIndex+1;this.navPrevNextWrap&&e>=this.tileSources.length&&(e=0),this.goToPage(e)}e.Viewer=function(o){var r,s=arguments,l=this;if(e.isPlainObject(o)||(o={id:s[0],xmlPath:s.length>1?s[1]:void 0,prefixUrl:s.length>2?s[2]:void 0,controls:s.length>3?s[3]:void 0,overlays:s.length>4?s[4]:void 0}),o.config&&(e.extend(!0,o,o.config),delete o.config),e.extend(!0,this,{id:o.id,hash:o.hash||i++,initialPage:0,element:null,container:null,canvas:null,overlays:[],overlaysContainer:null,previousBody:[],customControls:[],source:null,drawer:null,world:null,viewport:null,navigator:null,collectionViewport:null,collectionDrawer:null,navImages:null,buttons:null,profiler:null},e.DEFAULT_SETTINGS,o),void 0===this.hash)throw Error("A hash must be defined, either by specifying options.id or options.hash.");for(void 0!==t[this.hash]&&e.console.warn("Hash "+this.hash+" has already been used."),t[this.hash]={fsBoundsDelta:new e.Point(1,1),prevContainerSize:null,animating:!1,forceRedraw:!1,mouseInside:!1,group:null,zooming:!1,zoomFactor:null,lastZoomTime:null,fullPage:!1,onfullscreenchange:null},this._sequenceIndex=0,this._firstOpen=!0,this._updateRequestId=null,this._loadQueue=[],this.currentOverlays=[],this._lastScrollTime=e.now(),e.EventSource.call(this),this.addHandler("open-failed",function(t){var i=e.getString("Errors.OpenFailed",t.eventSource,t.message);l._showMessage(i)}),e.ControlDock.call(this,o),this.xmlPath&&(this.tileSources=[this.xmlPath]),this.element=this.element||document.getElementById(this.id),this.canvas=e.makeNeutralElement("div"),this.canvas.className="openseadragon-canvas",function(e){e.width="100%",e.height="100%",e.overflow="hidden",e.position="absolute",e.top="0px",e.left="0px"}(this.canvas.style),e.setElementTouchActionNone(this.canvas),""!==o.tabIndex&&(this.canvas.tabIndex=void 0===o.tabIndex?0:o.tabIndex),this.container.className="openseadragon-container",function(e){e.width="100%",e.height="100%",e.position="relative",e.overflow="hidden",e.left="0px",e.top="0px",e.textAlign="left"}(this.container.style),this.container.insertBefore(this.canvas,this.container.firstChild),this.element.appendChild(this.container),this.bodyWidth=document.body.style.width,this.bodyHeight=document.body.style.height,this.bodyOverflow=document.body.style.overflow,this.docOverflow=document.documentElement.style.overflow,this.innerTracker=new e.MouseTracker({element:this.canvas,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,keyDownHandler:e.delegate(this,g),keyHandler:e.delegate(this,m),clickHandler:e.delegate(this,v),dblClickHandler:e.delegate(this,f),dragHandler:e.delegate(this,w),dragEndHandler:e.delegate(this,y),enterHandler:e.delegate(this,T),exitHandler:e.delegate(this,x),pressHandler:e.delegate(this,S),releaseHandler:e.delegate(this,E),nonPrimaryPressHandler:e.delegate(this,P),nonPrimaryReleaseHandler:e.delegate(this,_),scrollHandler:e.delegate(this,b),pinchHandler:e.delegate(this,R)}),this.outerTracker=new e.MouseTracker({element:this.container,startDisabled:!this.mouseNavEnabled,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,dblClickTimeThreshold:this.dblClickTimeThreshold,dblClickDistThreshold:this.dblClickDistThreshold,enterHandler:e.delegate(this,C),exitHandler:e.delegate(this,I)}),this.toolbar&&(this.toolbar=new e.ControlDock({element:this.toolbar})),this.bindStandardControls(),t[this.hash].prevContainerSize=n(this.container),this.world=new e.World({viewer:this}),this.world.addHandler("add-item",function(e){l.source=l.world.getItemAt(0).source,t[l.hash].forceRedraw=!0,l._updateRequestId||(l._updateRequestId=a(l,k))}),this.world.addHandler("remove-item",function(e){l.world.getItemCount()?l.source=l.world.getItemAt(0).source:l.source=null,t[l.hash].forceRedraw=!0}),this.world.addHandler("metrics-change",function(e){l.viewport&&l.viewport._setContentBounds(l.world.getHomeBounds(),l.world.getContentFactor())}),this.world.addHandler("item-index-change",function(e){l.source=l.world.getItemAt(0).source}),this.viewport=new e.Viewport({containerSize:t[this.hash].prevContainerSize,springStiffness:this.springStiffness,animationTime:this.animationTime,minZoomImageRatio:this.minZoomImageRatio,maxZoomPixelRatio:this.maxZoomPixelRatio,visibilityRatio:this.visibilityRatio,wrapHorizontal:this.wrapHorizontal,wrapVertical:this.wrapVertical,defaultZoomLevel:this.defaultZoomLevel,minZoomLevel:this.minZoomLevel,maxZoomLevel:this.maxZoomLevel,viewer:this,degrees:this.degrees,flipped:this.flipped,navigatorRotate:this.navigatorRotate,homeFillsViewer:this.homeFillsViewer,margins:this.viewportMargins}),this.viewport._setContentBounds(this.world.getHomeBounds(),this.world.getContentFactor()),this.imageLoader=new e.ImageLoader({jobLimit:this.imageLoaderLimit,timeout:o.timeout}),this.tileCache=new e.TileCache({maxImageCacheCount:this.maxImageCacheCount}),this.drawer=new e.Drawer({viewer:this,viewport:this.viewport,element:this.canvas,debugGridColor:this.debugGridColor}),this.overlaysContainer=e.makeNeutralElement("div"),this.canvas.appendChild(this.overlaysContainer),!this.drawer.canRotate()&&(this.rotateLeft&&(r=this.buttons.buttons.indexOf(this.rotateLeft),this.buttons.buttons.splice(r,1),this.buttons.element.removeChild(this.rotateLeft.element)),this.rotateRight&&(r=this.buttons.buttons.indexOf(this.rotateRight),this.buttons.buttons.splice(r,1),this.buttons.element.removeChild(this.rotateRight.element))),this.showNavigator&&(this.navigator=new e.Navigator({id:this.navigatorId,position:this.navigatorPosition,sizeRatio:this.navigatorSizeRatio,maintainSizeRatio:this.navigatorMaintainSizeRatio,top:this.navigatorTop,left:this.navigatorLeft,width:this.navigatorWidth,height:this.navigatorHeight,autoResize:this.navigatorAutoResize,autoFade:this.navigatorAutoFade,prefixUrl:this.prefixUrl,viewer:this,navigatorRotate:this.navigatorRotate,background:this.navigatorBackground,opacity:this.navigatorOpacity,borderColor:this.navigatorBorderColor,displayRegionColor:this.navigatorDisplayRegionColor,crossOriginPolicy:this.crossOriginPolicy})),this.sequenceMode&&this.bindSequenceControls(),this.tileSources&&this.open(this.tileSources),r=0;r-1&&t.index=0&&e=0)return this;var a,l=r(this,a);return this.currentOverlays.push(l),l.drawHTML(this.overlaysContainer,this.viewport),this.raiseEvent("add-overlay",{element:t,location:a.location,placement:a.placement}),this},updateOverlay:function(i,n,o){var r;return i=e.getElement(i),(r=s(this.currentOverlays,i))>=0&&(this.currentOverlays[r].update(n,o),t[this.hash].forceRedraw=!0,this.raiseEvent("update-overlay",{element:i,location:n,placement:o})),this},removeOverlay:function(i){var n;return i=e.getElement(i),(n=s(this.currentOverlays,i))>=0&&(this.currentOverlays[n].destroy(),this.currentOverlays.splice(n,1),t[this.hash].forceRedraw=!0,this.raiseEvent("remove-overlay",{element:i})),this},clearOverlays:function(){for(;this.currentOverlays.length>0;)this.currentOverlays.pop().destroy();return t[this.hash].forceRedraw=!0,this.raiseEvent("clear-overlay",{}),this},getOverlayById:function(t){var i;return(t=e.getElement(t),(i=s(this.currentOverlays,t))>=0)?this.currentOverlays[i]:null},_updateSequenceButtons:function(e){this.nextButton&&(this.tileSources&&this.tileSources.length-1!==e?this.nextButton.enable():this.navPrevNextWrap||this.nextButton.disable()),this.previousButton&&(e>0?this.previousButton.enable():this.navPrevNextWrap||this.previousButton.disable())},_showMessage:function(t){this._hideMessage();var i=e.makeNeutralElement("div");i.appendChild(document.createTextNode(t)),this.messageDiv=e.makeCenteredNode(i),e.addClass(this.messageDiv,"openseadragon-message"),this.container.appendChild(this.messageDiv)},_hideMessage:function(){var e=this.messageDiv;e&&(e.parentNode.removeChild(e),delete this.messageDiv)},gestureSettingsByDeviceType:function(e){switch(e){case"mouse":return this.gestureSettingsMouse;case"touch":return this.gestureSettingsTouch;case"pen":return this.gestureSettingsPen;default:return this.gestureSettingsUnknown}},_drawOverlays:function(){var e,t=this.currentOverlays.length;for(e=0;e1&&(this.referenceStrip=new e.ReferenceStrip({id:this.referenceStripElement,position:this.referenceStripPosition,sizeRatio:this.referenceStripSizeRatio,scroll:this.referenceStripScroll,height:this.referenceStripHeight,width:this.referenceStripWidth,tileSources:this.tileSources,prefixUrl:this.prefixUrl,useCanvas:this.useCanvas,viewer:this}),this.referenceStrip.setFocus(this._sequenceIndex)):e.console.warn('Attempting to display a reference strip while "sequenceMode" is off.')}})}(OpenSeadragon),function(e){function t(e){var t={tracker:e.eventSource,position:e.position,quick:e.quick,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};if(this.viewer.raiseEvent("navigator-click",t),!t.preventDefaultAction&&e.quick&&this.viewer.viewport&&(this.panVertical||this.panHorizontal)){this.viewer.viewport.flipped&&(e.position.x=this.viewport.getContainerSize().x-e.position.x);var i=this.viewport.pointFromPixel(e.position);this.panVertical?this.panHorizontal||(i.x=this.viewer.viewport.getCenter(!0).x):i.y=this.viewer.viewport.getCenter(!0).y,this.viewer.viewport.panTo(i),this.viewer.viewport.applyConstraints()}}function i(e){var t={tracker:e.eventSource,position:e.position,delta:e.delta,speed:e.speed,direction:e.direction,shift:e.shift,originalEvent:e.originalEvent,preventDefaultAction:e.preventDefaultAction};this.viewer.raiseEvent("navigator-drag",t),!t.preventDefaultAction&&this.viewer.viewport&&(this.panHorizontal||(e.delta.x=0),this.panVertical||(e.delta.y=0),this.viewer.viewport.flipped&&(e.delta.x=-e.delta.x),this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)),this.viewer.constrainDuringPan&&this.viewer.viewport.applyConstraints())}function n(e){e.insideElementPressed&&this.viewer.viewport&&this.viewer.viewport.applyConstraints()}function o(e){return this.viewer.raiseEvent("navigator-scroll",{tracker:e.eventSource,position:e.position,scroll:e.scroll,shift:e.shift,originalEvent:e.originalEvent}),!1}function r(e,t){s(e,"rotate("+t+"deg)")}function s(e,t){e.style.webkitTransform=t,e.style.mozTransform=t,e.style.msTransform=t,e.style.oTransform=t,e.style.transform=t}e.Navigator=function(s){var a,l,h=s.viewer,c=this;function u(e){r(c.displayRegionContainer,e),r(c.displayRegion,-e),c.viewport.setRotation(e)}s.id?(this.element=document.getElementById(s.id),s.controlOptions={anchor:e.ControlAnchor.NONE,attachToViewer:!1,autoFade:!1}):(s.id="navigator-"+e.now(),this.element=e.makeNeutralElement("div"),s.controlOptions={anchor:e.ControlAnchor.TOP_RIGHT,attachToViewer:!0,autoFade:s.autoFade},s.position&&("BOTTOM_RIGHT"==s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_RIGHT:"BOTTOM_LEFT"==s.position?s.controlOptions.anchor=e.ControlAnchor.BOTTOM_LEFT:"TOP_RIGHT"==s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_RIGHT:"TOP_LEFT"==s.position?s.controlOptions.anchor=e.ControlAnchor.TOP_LEFT:"ABSOLUTE"==s.position&&(s.controlOptions.anchor=e.ControlAnchor.ABSOLUTE,s.controlOptions.top=s.top,s.controlOptions.left=s.left,s.controlOptions.height=s.height,s.controlOptions.width=s.width))),this.element.id=s.id,this.element.className+=" navigator",(s=e.extend(!0,{sizeRatio:e.DEFAULT_SETTINGS.navigatorSizeRatio},s,{element:this.element,tabIndex:-1,showNavigator:!1,mouseNavEnabled:!1,showNavigationControl:!1,showSequenceControl:!1,immediateRender:!0,blendTime:0,animationTime:0,autoResize:s.autoResize,minZoomImageRatio:1,background:s.background,opacity:s.opacity,borderColor:s.borderColor,displayRegionColor:s.displayRegionColor})).minPixelRatio=this.minPixelRatio=h.minPixelRatio,e.setElementTouchActionNone(this.element),this.borderWidth=2,this.fudge=new e.Point(1,1),this.totalBorderWidths=new e.Point(2*this.borderWidth,2*this.borderWidth).minus(this.fudge),s.controlOptions.anchor!=e.ControlAnchor.NONE&&function(e,t){e.margin="0px",e.border=t+"px solid "+s.borderColor,e.padding="0px",e.background=s.background,e.opacity=s.opacity,e.overflow="hidden"}(this.element.style,this.borderWidth),this.displayRegion=e.makeNeutralElement("div"),this.displayRegion.id=this.element.id+"-displayregion",this.displayRegion.className="displayregion",function(e,t){e.position="relative",e.top="0px",e.left="0px",e.fontSize="0px",e.overflow="hidden",e.border=t+"px solid "+s.displayRegionColor,e.margin="0px",e.padding="0px",e.background="transparent",e.float="left",e.cssFloat="left",e.styleFloat="left",e.zIndex=999999999,e.cursor="default"}(this.displayRegion.style,this.borderWidth),this.displayRegionContainer=e.makeNeutralElement("div"),this.displayRegionContainer.id=this.element.id+"-displayregioncontainer",this.displayRegionContainer.className="displayregioncontainer",this.displayRegionContainer.style.width="100%",this.displayRegionContainer.style.height="100%",h.addControl(this.element,s.controlOptions),this._resizeWithViewer=s.controlOptions.anchor!=e.ControlAnchor.ABSOLUTE&&s.controlOptions.anchor!=e.ControlAnchor.NONE,s.width&&s.height?(this.setWidth(s.width),this.setHeight(s.height)):this._resizeWithViewer&&(a=e.getElementSize(h.element),this.element.style.height=Math.round(a.y*s.sizeRatio)+"px",this.element.style.width=Math.round(a.x*s.sizeRatio)+"px",this.oldViewerSize=a,l=e.getElementSize(this.element),this.elementArea=l.x*l.y),this.oldContainerSize=new e.Point(0,0),e.Viewer.apply(this,[s]),this.displayRegionContainer.appendChild(this.displayRegion),this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer),s.navigatorRotate&&(u(s.viewer.viewport?s.viewer.viewport.getRotation():s.viewer.degrees||0),s.viewer.addHandler("rotate",function(e){u(e.degrees)})),this.innerTracker.destroy(),this.innerTracker=new e.MouseTracker({element:this.element,dragHandler:e.delegate(this,i),clickHandler:e.delegate(this,t),releaseHandler:e.delegate(this,n),scrollHandler:e.delegate(this,o)}),this.addHandler("reset-size",function(){c.viewport&&c.viewport.goHome(!0)}),h.world.addHandler("item-index-change",function(e){window.setTimeout(function(){var t=c.world.getItemAt(e.previousIndex);c.world.setItemIndex(t,e.newIndex)},1)}),h.world.addHandler("remove-item",function(e){var t=e.item,i=c._getMatchingItem(t);i&&c.world.removeItem(i)}),this.update(h.viewport)},e.extend(e.Navigator.prototype,e.EventSource.prototype,e.Viewer.prototype,{updateSize:function(){if(this.viewport){var t=new e.Point(0===this.container.clientWidth?1:this.container.clientWidth,0===this.container.clientHeight?1:this.container.clientHeight);t.equals(this.oldContainerSize)||(this.viewport.resize(t,!0),this.viewport.goHome(!0),this.oldContainerSize=t,this.drawer.clear(),this.world.draw())}},setWidth:function(e){this.width=e,this.element.style.width="number"==typeof e?e+"px":e,this._resizeWithViewer=!1},setHeight:function(e){this.height=e,this.element.style.height="number"==typeof e?e+"px":e,this._resizeWithViewer=!1},setFlip:function(e){return this.viewport.setFlip(e),this.setDisplayTransform(this.viewer.viewport.getFlip()?"scale(-1,1)":"scale(1,1)"),this},setDisplayTransform:function(e){s(this.displayRegion,e),s(this.canvas,e),s(this.element,e)},update:function(t){var i,n,o,r,s,a;if(i=e.getElementSize(this.viewer.element),this._resizeWithViewer&&i.x&&i.y&&!i.equals(this.oldViewerSize)&&(this.oldViewerSize=i,this.maintainSizeRatio||!this.elementArea?(n=i.x*this.sizeRatio,o=i.y*this.sizeRatio):(n=Math.sqrt(this.elementArea*(i.x/i.y)),o=this.elementArea/n),this.element.style.width=Math.round(n)+"px",this.element.style.height=Math.round(o)+"px",this.elementArea||(this.elementArea=n*o),this.updateSize()),t&&this.viewport){r=t.getBoundsNoRotate(!0),s=this.viewport.pixelFromPointNoRotate(r.getTopLeft(),!1),a=this.viewport.pixelFromPointNoRotate(r.getBottomRight(),!1).minus(this.totalBorderWidths);var l=this.displayRegion.style;l.display=this.world.getItemCount()?"block":"none",l.top=Math.round(s.y)+"px",l.left=Math.round(s.x)+"px";var h=Math.abs(s.x-a.x),c=Math.abs(s.y-a.y);l.width=Math.round(Math.max(h,0))+"px",l.height=Math.round(Math.max(c,0))+"px"}},addTiledImage:function(t){var i=this,n=t.originalTiledImage;delete t.original;var o=e.extend({},t,{success:function(e){var t=e.item;function o(){i._matchBounds(t,n)}function r(){i._matchOpacity(t,n)}function s(){i._matchCompositeOperation(t,n)}t._originalForNavigator=n,i._matchBounds(t,n,!0),n.addHandler("bounds-change",o),n.addHandler("clip-change",o),n.addHandler("opacity-change",r),n.addHandler("composite-operation-change",s)}});return e.Viewer.prototype.addTiledImage.apply(this,[o])},_getMatchingItem:function(e){for(var t,i=this.world.getItemCount(),n=0;n1)&&!(t.y>1);e++);return e-1},getTileAtPoint:function(t,i){var n=i.x>=0&&i.x<=1&&i.y>=0&&i.y<=1/this.aspectRatio;e.console.assert(n,"[TileSource.getTileAtPoint] must be called with a valid point.");var o=this.dimensions.x*this.getLevelScale(t),r=i.x*o,s=i.y*o,a=Math.floor(r/this.getTileWidth(t)),l=Math.floor(s/this.getTileHeight(t));i.x>=1&&(a=this.getNumTiles(t).x-1);var h=1e-15;return i.y>=1/this.aspectRatio-h&&(l=this.getNumTiles(t).y-1),new e.Point(a,l)},getTileBounds:function(t,i,n,o){var r=this.dimensions.times(this.getLevelScale(t)),s=this.getTileWidth(t),a=this.getTileHeight(t),l=0===i?0:s*i-this.tileOverlap,h=0===n?0:a*n-this.tileOverlap,c=s+(0===i?1:2)*this.tileOverlap,u=a+(0===n?1:2)*this.tileOverlap,d=1/r.x;return(c=Math.min(c,r.x-l),u=Math.min(u,r.y-h),o)?new e.Rect(0,0,c,u):new e.Rect(l*d,h*d,c*d,u*d)},getImageInfo:function(i){var n,o,r,s,a,l,h,c=this;i&&(h=(l=(a=i.split("/"))[a.length-1]).lastIndexOf("."))>-1&&(a[a.length-1]=l.slice(0,h)),o=function(t){"string"==typeof t&&(t=e.parseXml(t));var n=e.TileSource.determineType(c,t,i);if(!n){c.raiseEvent("open-failed",{message:"Unable to load TileSource",source:i});return}void 0===(s=n.prototype.configure.apply(c,[t,i])).ajaxWithCredentials&&(s.ajaxWithCredentials=c.ajaxWithCredentials),r=new n(s),c.ready=!0,c.raiseEvent("ready",{tileSource:r})},i.match(/\.js$/)?(n=i.split("/").pop().replace(".js",""),e.jsonp({url:i,async:!1,callbackName:n,callback:o})):e.makeAjaxRequest({url:i,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,success:function(e){o(t(e))},error:function(e,t){var n,o;try{n="HTTP "+e.status+" attempting to load TileSource"}catch(e){n=(o=void 0!==t&&t.toString?t.toString():"Unknown error")+" attempting to load TileSource"}c.raiseEvent("open-failed",{message:n,source:i})}})},supports:function(e,t){return!1},configure:function(e,t){throw Error("Method not implemented.")},getTileUrl:function(e,t,i){throw Error("Method not implemented.")},getTileAjaxHeaders:function(e,t,i){return{}},tileExists:function(e,t,i){var n=this.getNumTiles(e);return e>=this.minLevel&&e<=this.maxLevel&&t>=0&&i>=0&&t=0;c--)for(d=(u=this.displayRects[c]).minLevel;d<=u.maxLevel;d++)this._levelRects[d]||(this._levelRects[d]=[]),this._levelRects[d].push(u);e.TileSource.apply(this,[p])},e.extend(e.DziTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){var i;return e.Image?i=e.Image.xmlns:e.documentElement&&("Image"==e.documentElement.localName||"Image"==e.documentElement.tagName)&&(i=e.documentElement.namespaceURI),-1!==(i=(i||"").toLowerCase()).indexOf("schemas.microsoft.com/deepzoom/2008")||-1!==i.indexOf("schemas.microsoft.com/deepzoom/2009")},configure:function(n,o){var r;return r=e.isPlainObject(n)?i(this,n):t(this,n),o&&!r.tilesUrl&&(r.tilesUrl=o.replace(/([^\/]+?)(\.(dzi|xml|js)?(\?[^\/]*)?)?\/?$/,"$1_files/"),-1!=o.search(/\.(dzi|xml|js)\?/)?r.queryParams=o.match(/\?.*/):r.queryParams=""),r},getTileUrl:function(e,t,i){return[this.tilesUrl,e,"/",t,"_",i,".",this.fileFormat,this.queryParams].join("")},tileExists:function(e,t,i){var n,o,r,s,a,l,h,c=this._levelRects[e];if(this.minLevel&&ethis.maxLevel)return!1;if(!c||!c.length)return!0;for(h=c.length-1;h>=0;h--)if(!(e<(n=c[h]).minLevel)&&!(e>n.maxLevel)&&(o=this.getLevelScale(e),r=n.x*o,s=n.y*o,a=r+n.width*o,l=s+n.height*o,r=Math.floor(r/this._tileWidth),s=Math.floor(s/this._tileWidth),a=Math.ceil(a/this._tileWidth),l=Math.ceil(l/this._tileWidth),r<=t&&t1&&e.profile[1].supports&&(i=-1!==e.profile[1].supports.indexOf("sizeByW")),3===e.version&&e.extraFeatures&&(i=-1!==e.extraFeatures.indexOf("sizeByWh")),!t||i}function i(e){for(var t=[],i=0;i0?n.tileSize=Math.max.apply(null,h):n.tileSize=a}else this.sizes&&this.sizes.length>0?(this.emulateLegacyImagePyramid=!0,n.levels=i(this),e.extend(!0,n,{width:n.levels[n.levels.length-1].width,height:n.levels[n.levels.length-1].height,tileSize:Math.max(n.height,n.width),tileOverlap:0,minLevel:0,maxLevel:n.levels.length-1}),this.levels=n.levels):e.console.error("Nothing in the info.json to construct image pyramids from");if(!n.maxLevel&&!this.emulateLegacyImagePyramid){if(this.scale_factors){var u=Math.max.apply(null,this.scale_factors);n.maxLevel=Math.round(Math.log(u)*Math.LOG2E)}else n.maxLevel=Number(Math.ceil(Math.log(Math.max(this.width,this.height),2)))}e.TileSource.apply(this,[n])},e.extend(e.IIIFTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return!!e.protocol&&"http://iiif.io/api/image"==e.protocol||!!e["@context"]&&("http://library.stanford.edu/iiif/image-api/1.1/context.json"==e["@context"]||"http://iiif.io/api/image/1/context.json"==e["@context"])||!!e.profile&&0===e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html")||!!e.identifier&&!!e.width&&!!e.height||!!e.documentElement&&"info"==e.documentElement.tagName&&"http://library.stanford.edu/iiif/image-api/ns/"==e.documentElement.namespaceURI},configure:function(t,i){if(e.isPlainObject(t)){if(t["@context"]){var o=t["@context"];if(Array.isArray(o)){for(var r=0;r0&&t>=this.minLevel&&t<=this.maxLevel&&(i=this.levels[t].width/this.levels[this.maxLevel].width),i}return e.TileSource.prototype.getLevelScale.call(this,t)},getNumTiles:function(t){return this.emulateLegacyImagePyramid?this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0):e.TileSource.prototype.getNumTiles.call(this,t)},getTileAtPoint:function(t,i){return this.emulateLegacyImagePyramid?new e.Point(0,0):e.TileSource.prototype.getTileAtPoint.call(this,t,i)},getTileUrl:function(e,t,i){if(this.emulateLegacyImagePyramid){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}var o,r,s,a,l,h,c,u,d,p,g,m,v,f="0",w=Math.pow(.5,this.maxLevel-e),y=Math.ceil(this.width*w),T=Math.ceil(this.height*w);return o=this.getTileWidth(e),r=this.getTileHeight(e),s=Math.ceil(o/w),a=Math.ceil(r/w),v=1===this.version?"native."+this.tileFormat:"default."+this.tileFormat,yh?l/256:h/256,s.maxLevel=Math.ceil(Math.log(a)/Math.log(2))-1,s.tileSize=256,s.width=l,s.height=h,e.TileSource.apply(this,[s])},e.extend(e.TmsTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"tiledmapservice"==e.type},configure:function(e,t){return e},getTileUrl:function(e,t,i){var n=this.getNumTiles(e).y-1;return this.tilesUrl+e+"/"+t+"/"+(n-i)+".png"}})}(OpenSeadragon),function(e){e.ZoomifyTileSource=function(e){e.tileSize=256;var t={x:e.width,y:e.height};for(e.imageSizes=[{x:e.width,y:e.height}],e.gridSize=[this._getGridSize(e.width,e.height,e.tileSize)];parseInt(t.x,10)>e.tileSize||parseInt(t.y,10)>e.tileSize;)t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),e.imageSizes.push({x:t.x,y:t.y}),e.gridSize.push(this._getGridSize(t.x,t.y,e.tileSize));e.imageSizes.reverse(),e.gridSize.reverse(),e.minLevel=0,e.maxLevel=e.gridSize.length-1,OpenSeadragon.TileSource.apply(this,[e])},e.extend(e.ZoomifyTileSource.prototype,e.TileSource.prototype,{_getGridSize:function(e,t,i){return{x:Math.ceil(e/i),y:Math.ceil(t/i)}},_calculateAbsoluteTileNumber:function(e,t,i){for(var n=0,o={},r=0;r");return o.sort(function(e,t){return e.height-t.height})}function i(t,i){if(!i||!i.documentElement)throw Error(e.getString("Errors.Xml"));var o,r,s=i.documentElement,a=s.tagName,l=null,h=[];if("image"==a)try{for(r=0,l={type:s.getAttribute("type"),levels:[]},h=s.getElementsByTagName("level");r0?(o=n.levels[n.levels.length-1].width,r=n.levels[n.levels.length-1].height):(o=0,r=0,e.console.error("No supported image formats found")),e.extend(!0,n,{width:o,height:r,tileSize:Math.max(r,o),tileOverlap:0,minLevel:0,maxLevel:n.levels.length>0?n.levels.length-1:0}),e.TileSource.apply(this,[n]),this.levels=n.levels},e.extend(e.LegacyTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"legacy-image-pyramid"==e.type||e.documentElement&&"legacy-image-pyramid"==e.documentElement.getAttribute("type")},configure:function(t,o){return e.isPlainObject(t)?n(this,t):i(this,t)},getLevelScale:function(e){var t=NaN;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return this.levels.length>0&&e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n}})}(OpenSeadragon),function(e){e.ImageTileSource=function(t){t=e.extend({buildPyramid:!0,crossOriginPolicy:!1,ajaxWithCredentials:!1,useCanvas:!0},t),e.TileSource.apply(this,[t])},e.extend(e.ImageTileSource.prototype,e.TileSource.prototype,{supports:function(e,t){return e.type&&"image"===e.type},configure:function(e,t){return e},getImageInfo:function(t){var i=this._image=new Image,n=this;this.crossOriginPolicy&&(i.crossOrigin=this.crossOriginPolicy),this.ajaxWithCredentials&&(i.useCredentials=this.ajaxWithCredentials),e.addEvent(i,"load",function(){n.width=Object.prototype.hasOwnProperty.call(i,"naturalWidth")?i.naturalWidth:i.width,n.height=Object.prototype.hasOwnProperty.call(i,"naturalHeight")?i.naturalHeight:i.height,n.aspectRatio=n.width/n.height,n.dimensions=new e.Point(n.width,n.height),n._tileWidth=n.width,n._tileHeight=n.height,n.tileOverlap=0,n.minLevel=0,n.levels=n._buildLevels(),n.maxLevel=n.levels.length-1,n.ready=!0,n.raiseEvent("ready",{tileSource:n})}),e.addEvent(i,"error",function(){n.raiseEvent("open-failed",{message:"Error loading image at "+t,source:t})}),i.src=t},getLevelScale:function(e){var t=NaN;return e>=this.minLevel&&e<=this.maxLevel&&(t=this.levels[e].width/this.levels[this.maxLevel].width),t},getNumTiles:function(t){return this.getLevelScale(t)?new e.Point(1,1):new e.Point(0,0)},getTileUrl:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].url),n},getContext2D:function(e,t,i){var n=null;return e>=this.minLevel&&e<=this.maxLevel&&(n=this.levels[e].context2D),n},_buildLevels:function(){var t=[{url:this._image.src,width:Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,height:Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height}];if(!this.buildPyramid||!e.supportsCanvas||!this.useCanvas)return delete this._image,t;var i=Object.prototype.hasOwnProperty.call(this._image,"naturalWidth")?this._image.naturalWidth:this._image.width,n=Object.prototype.hasOwnProperty.call(this._image,"naturalHeight")?this._image.naturalHeight:this._image.height,o=document.createElement("canvas"),r=o.getContext("2d");if(o.width=i,o.height=n,r.drawImage(this._image,0,0,i,n),t[0].context2D=r,delete this._image,e.isCanvasTainted(o))return t;for(;i>=2&&n>=2;){i=Math.floor(i/2),n=Math.floor(n/2);var s=document.createElement("canvas"),a=s.getContext("2d");s.width=i,s.height=n,a.drawImage(o,0,0,i,n),t.splice(0,0,{context2D:a,width:i,height:n}),o=s,r=a}return t}})}(OpenSeadragon),function(e){e.TileSourceCollection=function(t,i,n,o){e.console.error("TileSourceCollection is deprecated; use World instead")}}(OpenSeadragon),function(e){function t(t){e.requestAnimationFrame(function(){i(t)})}function i(i){var n;i.shouldFade&&(n=Math.max(0,n=Math.min(1,n=1-(e.now()-i.fadeBeginTime)/i.fadeLength)),i.imgGroup&&e.setElementOpacity(i.imgGroup,n,!0),n>0&&t(i))}function n(i){i.shouldFade=!0,i.fadeBeginTime=e.now()+i.fadeDelay,window.setTimeout(function(){t(i)},i.fadeDelay)}function o(t){t.shouldFade=!1,t.imgGroup&&e.setElementOpacity(t.imgGroup,1,!0)}function r(t,i){!t.element.disabled&&(i>=e.ButtonState.GROUP&&t.currentState==e.ButtonState.REST&&(o(t),t.currentState=e.ButtonState.GROUP),i>=e.ButtonState.HOVER&&t.currentState==e.ButtonState.GROUP&&(t.imgHover&&(t.imgHover.style.visibility=""),t.currentState=e.ButtonState.HOVER),i>=e.ButtonState.DOWN&&t.currentState==e.ButtonState.HOVER&&(t.imgDown&&(t.imgDown.style.visibility=""),t.currentState=e.ButtonState.DOWN))}function s(t,i){!t.element.disabled&&(i<=e.ButtonState.HOVER&&t.currentState==e.ButtonState.DOWN&&(t.imgDown&&(t.imgDown.style.visibility="hidden"),t.currentState=e.ButtonState.HOVER),i<=e.ButtonState.GROUP&&t.currentState==e.ButtonState.HOVER&&(t.imgHover&&(t.imgHover.style.visibility="hidden"),t.currentState=e.ButtonState.GROUP),i<=e.ButtonState.REST&&t.currentState==e.ButtonState.GROUP&&(n(t),t.currentState=e.ButtonState.REST))}e.ButtonState={REST:0,GROUP:1,HOVER:2,DOWN:3},e.Button=function(t){var i=this;e.EventSource.call(this),e.extend(!0,this,{tooltip:null,srcRest:null,srcGroup:null,srcHover:null,srcDown:null,clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,fadeDelay:0,fadeLength:2e3,onPress:null,onRelease:null,onClick:null,onEnter:null,onExit:null,onFocus:null,onBlur:null},t),this.element=t.element||e.makeNeutralElement("div"),t.element||(this.imgRest=e.makeTransparentImage(this.srcRest),this.imgGroup=e.makeTransparentImage(this.srcGroup),this.imgHover=e.makeTransparentImage(this.srcHover),this.imgDown=e.makeTransparentImage(this.srcDown),this.imgRest.alt=this.imgGroup.alt=this.imgHover.alt=this.imgDown.alt=this.tooltip,this.element.style.position="relative",e.setElementTouchActionNone(this.element),this.imgGroup.style.position=this.imgHover.style.position=this.imgDown.style.position="absolute",this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top="0px",this.imgGroup.style.left=this.imgHover.style.left=this.imgDown.style.left="0px",this.imgHover.style.visibility=this.imgDown.style.visibility="hidden",e.Browser.vendor==e.BROWSERS.FIREFOX&&e.Browser.version<3&&(this.imgGroup.style.top=this.imgHover.style.top=this.imgDown.style.top=""),this.element.appendChild(this.imgRest),this.element.appendChild(this.imgGroup),this.element.appendChild(this.imgHover),this.element.appendChild(this.imgDown)),this.addHandler("press",this.onPress),this.addHandler("release",this.onRelease),this.addHandler("click",this.onClick),this.addHandler("enter",this.onEnter),this.addHandler("exit",this.onExit),this.addHandler("focus",this.onFocus),this.addHandler("blur",this.onBlur),this.currentState=e.ButtonState.GROUP,this.fadeBeginTime=null,this.shouldFade=!1,this.element.style.display="inline-block",this.element.style.position="relative",this.element.title=this.tooltip,this.tracker=new e.MouseTracker({element:this.element,clickTimeThreshold:this.clickTimeThreshold,clickDistThreshold:this.clickDistThreshold,enterHandler:function(t){t.insideElementPressed?(r(i,e.ButtonState.DOWN),i.raiseEvent("enter",{originalEvent:t.originalEvent})):t.buttonDownAny||r(i,e.ButtonState.HOVER)},focusHandler:function(e){this.enterHandler(e),i.raiseEvent("focus",{originalEvent:e.originalEvent})},exitHandler:function(t){s(i,e.ButtonState.GROUP),t.insideElementPressed&&i.raiseEvent("exit",{originalEvent:t.originalEvent})},blurHandler:function(e){this.exitHandler(e),i.raiseEvent("blur",{originalEvent:e.originalEvent})},pressHandler:function(t){r(i,e.ButtonState.DOWN),i.raiseEvent("press",{originalEvent:t.originalEvent})},releaseHandler:function(t){t.insideElementPressed&&t.insideElementReleased?(s(i,e.ButtonState.HOVER),i.raiseEvent("release",{originalEvent:t.originalEvent})):t.insideElementPressed?s(i,e.ButtonState.GROUP):r(i,e.ButtonState.HOVER)},clickHandler:function(e){e.quick&&i.raiseEvent("click",{originalEvent:e.originalEvent})},keyHandler:function(e){return 13!==e.keyCode||(i.raiseEvent("click",{originalEvent:e.originalEvent}),i.raiseEvent("release",{originalEvent:e.originalEvent}),!1)}}),s(this,e.ButtonState.REST)},e.extend(e.Button.prototype,e.EventSource.prototype,{notifyGroupEnter:function(){r(this,e.ButtonState.GROUP)},notifyGroupExit:function(){s(this,e.ButtonState.REST)},disable:function(){this.notifyGroupExit(),this.element.disabled=!0,e.setElementOpacity(this.element,.2,!0)},enable:function(){this.element.disabled=!1,e.setElementOpacity(this.element,1,!0),this.notifyGroupEnter()}})}(OpenSeadragon),function(e){e.ButtonGroup=function(t){e.extend(!0,this,{buttons:[],clickTimeThreshold:e.DEFAULT_SETTINGS.clickTimeThreshold,clickDistThreshold:e.DEFAULT_SETTINGS.clickDistThreshold,labelText:""},t);var i,n=this.buttons.concat([]),o=this;if(this.element=t.element||e.makeNeutralElement("div"),!t.group)for(i=0,this.element.style.display="inline-block";i=270?(s=this.getTopRight(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=270):this.degrees>=180?(s=this.getBottomRight(),this.x=s.x,this.y=s.y,this.degrees-=180):this.degrees>=90&&(s=this.getBottomLeft(),this.x=s.x,this.y=s.y,a=this.height,this.height=this.width,this.width=a,this.degrees-=90)},e.Rect.fromSummits=function(t,i,n){var o=t.distanceTo(i),r=t.distanceTo(n),s=i.minus(t),a=Math.atan(s.y/s.x);return s.x<0?a+=Math.PI:s.y<0&&(a+=2*Math.PI),new e.Rect(t.x,t.y,o,r,a/Math.PI*180)},e.Rect.prototype={clone:function(){return new e.Rect(this.x,this.y,this.width,this.height,this.degrees)},getAspectRatio:function(){return this.width/this.height},getTopLeft:function(){return new e.Point(this.x,this.y)},getBottomRight:function(){return new e.Point(this.x+this.width,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getTopRight:function(){return new e.Point(this.x+this.width,this.y).rotate(this.degrees,this.getTopLeft())},getBottomLeft:function(){return new e.Point(this.x,this.y+this.height).rotate(this.degrees,this.getTopLeft())},getCenter:function(){return new e.Point(this.x+this.width/2,this.y+this.height/2).rotate(this.degrees,this.getTopLeft())},getSize:function(){return new e.Point(this.width,this.height)},equals:function(t){return t instanceof e.Rect&&this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height&&this.degrees===t.degrees},times:function(t){return new e.Rect(this.x*t,this.y*t,this.width*t,this.height*t,this.degrees)},translate:function(t){return new e.Rect(this.x+t.x,this.y+t.y,this.width,this.height,this.degrees)},union:function(t){var i=this.getBoundingBox(),n=t.getBoundingBox(),o=Math.min(i.x,n.x),r=Math.min(i.y,n.y),s=Math.max(i.x+i.width,n.x+n.width),a=Math.max(i.y+i.height,n.y+n.height);return new e.Rect(o,r,s-o,a-r)},intersection:function(t){var i=1e-10,n=[],o=this.getTopLeft();t.containsPoint(o,i)&&n.push(o);var r=this.getTopRight();t.containsPoint(r,i)&&n.push(r);var s=this.getBottomLeft();t.containsPoint(s,i)&&n.push(s);var a=this.getBottomRight();t.containsPoint(a,i)&&n.push(a);var l=t.getTopLeft();this.containsPoint(l,i)&&n.push(l);var h=t.getTopRight();this.containsPoint(h,i)&&n.push(h);var c=t.getBottomLeft();this.containsPoint(c,i)&&n.push(c);var u=t.getBottomRight();this.containsPoint(u,i)&&n.push(u);for(var d=this._getSegments(),p=t._getSegments(),g=0;gx&&(x=_.x),_.yE&&(E=_.y)}return new e.Rect(T,S,x-T,E-S)},_getSegments:function(){var e=this.getTopLeft(),t=this.getTopRight(),i=this.getBottomLeft(),n=this.getBottomRight();return[[e,t],[t,n],[n,i],[i,e]]},rotate:function(t,i){if(0===(t=e.positiveModulo(t,360)))return this.clone();i=i||this.getCenter();var n=this.getTopLeft().rotate(t,i),o=this.getTopRight().rotate(t,i).minus(n),r=Math.atan((o=o.apply(function(e){return 1e-15>Math.abs(e)?0:e})).y/o.x);return o.x<0?r+=Math.PI:o.y<0&&(r+=2*Math.PI),new e.Rect(n.x,n.y,this.width,this.height,r/Math.PI*180)},getBoundingBox:function(){if(0===this.degrees)return this.clone();var t=this.getTopLeft(),i=this.getTopRight(),n=this.getBottomLeft(),o=this.getBottomRight(),r=Math.min(t.x,i.x,n.x,o.x),s=Math.max(t.x,i.x,n.x,o.x),a=Math.min(t.y,i.y,n.y,o.y),l=Math.max(t.y,i.y,n.y,o.y);return new e.Rect(r,a,s-r,l-a)},getIntegerBoundingBox:function(){var t=this.getBoundingBox(),i=Math.floor(t.x),n=Math.floor(t.y),o=Math.ceil(t.width+t.x-i),r=Math.ceil(t.height+t.y-n);return new e.Rect(i,n,o,r)},containsPoint:function(e,t){t=t||0;var i=this.getTopLeft(),n=this.getTopRight(),o=this.getBottomLeft(),r=n.minus(i),s=o.minus(i);return(e.x-i.x)*r.x+(e.y-i.y)*r.y>=-t&&(e.x-n.x)*r.x+(e.y-n.y)*r.y<=t&&(e.x-i.x)*s.x+(e.y-i.y)*s.y>=-t&&(e.x-o.x)*s.x+(e.y-o.y)*s.y<=t},toString:function(){return"["+Math.round(100*this.x)/100+", "+Math.round(100*this.y)/100+", "+Math.round(100*this.width)/100+"x"+Math.round(100*this.height)/100+", "+Math.round(100*this.degrees)/100+"deg]"}}}(OpenSeadragon),function(e){var t={};function i(t){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);return this.dragging=!0,this.element&&("horizontal"==this.scroll?-t.delta.x>0?i>-(r-a.x)&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):0>-t.delta.x&&i<0&&(this.element.style.marginLeft=i+2*t.delta.x+"px",o(this,a.x,i+2*t.delta.x)):-t.delta.y>0?n>-(s-a.y)&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y)):0>-t.delta.y&&n<0&&(this.element.style.marginTop=n+2*t.delta.y+"px",o(this,a.y,n+2*t.delta.y))),!1}function n(t){var i=Number(this.element.style.marginLeft.replace("px","")),n=Number(this.element.style.marginTop.replace("px","")),r=Number(this.element.style.width.replace("px","")),s=Number(this.element.style.height.replace("px","")),a=e.getElementSize(this.viewer.canvas);return this.element&&("horizontal"==this.scroll?t.scroll>0?i>-(r-a.x)&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0&&i<0&&(this.element.style.marginLeft=i-60*t.scroll+"px",o(this,a.x,i-60*t.scroll)):t.scroll<0?n>a.y-s&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll)):t.scroll>0&&n<0&&(this.element.style.marginTop=n+60*t.scroll+"px",o(this,a.y,n+60*t.scroll))),!1}function o(t,i,n){var o,r,s,a,l,h,c;for(r=Math.ceil(i/(o="horizontal"==t.scroll?t.panelWidth:t.panelHeight))+5,h=r=(r=(s=Math.ceil((Math.abs(n)+i)/o)+1)-r)<0?0:r;hh+s.x-this.panelWidth?(i=Math.min(i,a-s.x),this.element.style.marginLeft=-i+"px",o(this,s.x,-i)):ic+s.y-this.panelHeight?(i=Math.min(i,l-s.y),this.element.style.marginTop=-i+"px",o(this,s.y,-i)):i1?i[1].springStiffness:5,animationTime:i.length>1?i[1].animationTime:1.5}),e.console.assert("number"==typeof t.springStiffness&&0!==t.springStiffness,"[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"),e.console.assert("number"==typeof t.animationTime&&t.animationTime>=0,"[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"),t.exponential&&(this._exponential=!0,delete t.exponential),e.extend(!0,this,t),this.current={value:"number"==typeof this.initial?this.initial:this._exponential?0:1,time:e.now()},e.console.assert(!this._exponential||0!==this.current.value,"[OpenSeadragon.Spring] value must be non-zero for exponential springs"),this.start={value:this.current.value,time:this.current.time},this.target={value:this.current.value,time:this.current.time},this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},e.Spring.prototype={resetTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"),this.start.value=this.target.value=this.current.value=t,this.start.time=this.target.time=this.current.time=e.now(),this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},springTo:function(t){e.console.assert(!this._exponential||0!==t,"[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"),this.start.value=this.current.value,this.start.time=this.current.time,this.target.value=t,this.target.time=this.start.time+1e3*this.animationTime,this._exponential&&(this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},shiftBy:function(t){this.start.value+=t,this.target.value+=t,this._exponential&&(e.console.assert(0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value))},setExponential:function(t){this._exponential=t,this._exponential&&(e.console.assert(0!==this.current.value&&0!==this.target.value&&0!==this.start.value,"[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"),this.start._logValue=Math.log(this.start.value),this.target._logValue=Math.log(this.target.value),this.current._logValue=Math.log(this.current.value))},update:function(){this.current.time=e.now(),this._exponential?(i=this.start._logValue,n=this.target._logValue):(i=this.start.value,n=this.target.value);var i,n,o=this.current.time>=this.target.time?n:i+(n-i)*t(this.springStiffness,(this.current.time-this.start.time)/(this.target.time-this.start.time)),r=this.current.value;return this._exponential?this.current.value=Math.exp(o):this.current.value=o,r!=this.current.value},isAtTargetValue:function(){return this.current.value===this.target.value}}}(OpenSeadragon),function(e){function t(t){e.extend(!0,this,{timeout:e.DEFAULT_SETTINGS.timeout,jobId:null},t),this.image=null}function i(e,t,i){e.jobsInProgress--,(!e.jobLimit||e.jobsInProgress0&&(e.jobQueue.shift().start(),e.jobsInProgress++),i(t.image,t.errorMsg,t.request)}t.prototype={errorMsg:null,start:function(){var t=this,i=this.abort;this.image=new Image,this.image.onload=function(){t.finish(!0)},this.image.onabort=this.image.onerror=function(){t.errorMsg="Image load aborted",t.finish(!1)},this.jobId=window.setTimeout(function(){t.errorMsg="Image load exceeded timeout ("+t.timeout+" ms)",t.finish(!1)},this.timeout),this.loadWithAjax?(this.request=e.makeAjaxRequest({url:this.src,withCredentials:this.ajaxWithCredentials,headers:this.ajaxHeaders,responseType:"arraybuffer",success:function(e){try{i=new window.Blob([e.response])}catch(t){var i,n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if("TypeError"===t.name&&n){var o=new n;o.append(e.response),i=o.getBlob()}}0===i.size&&(t.errorMsg="Empty image response.",t.finish(!1));var r=(window.URL||window.webkitURL).createObjectURL(i);t.image.src=r},error:function(e){t.errorMsg="Image load aborted - XHR error",t.finish(!1)}}),this.abort=function(){t.request.abort(),"function"==typeof i&&i()}):(!1!==this.crossOriginPolicy&&(this.image.crossOrigin=this.crossOriginPolicy),this.image.src=this.src)},finish:function(e){this.image.onload=this.image.onerror=this.image.onabort=null,e||(this.image=null),this.jobId&&window.clearTimeout(this.jobId),this.callback(this)}},e.ImageLoader=function(t){e.extend(!0,this,{jobLimit:e.DEFAULT_SETTINGS.imageLoaderLimit,timeout:e.DEFAULT_SETTINGS.timeout,jobQueue:[],jobsInProgress:0},t)},e.ImageLoader.prototype={addJob:function(e){var n=this,o=function(t){i(n,t,e.callback)},r=new t({src:e.src,loadWithAjax:e.loadWithAjax,ajaxHeaders:e.loadWithAjax?e.ajaxHeaders:null,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:o,abort:e.abort,timeout:this.timeout});!this.jobLimit||this.jobsInProgressi&&(i=o)}return i},needsUpdate:function(){return e.console.error("[Drawer.needsUpdate] this function is deprecated. Use World.needsDraw instead."),this.viewer.world.needsDraw()},numTilesLoaded:function(){return e.console.error("[Drawer.numTilesLoaded] this function is deprecated. Use TileCache.numTilesLoaded instead."),this.viewer.tileCache.numTilesLoaded()},reset:function(){return e.console.error("[Drawer.reset] this function is deprecated. Use World.resetItems instead."),this.viewer.world.resetItems(),this},update:function(){return e.console.error("[Drawer.update] this function is deprecated. Use Drawer.clear and World.draw instead."),this.clear(),this.viewer.world.draw(),this},canRotate:function(){return this.useCanvas},destroy:function(){this.canvas.width=1,this.canvas.height=1,this.sketchCanvas=null,this.sketchContext=null},clear:function(){if(this.canvas.innerHTML="",this.useCanvas){var e=this._calculateCanvasSize();if((this.canvas.width!=e.x||this.canvas.height!=e.y)&&(this.canvas.width=e.x,this.canvas.height=e.y,this._updateImageSmoothingEnabled(this.context),null!==this.sketchCanvas)){var t=this._calculateSketchCanvasSize();this.sketchCanvas.width=t.x,this.sketchCanvas.height=t.y,this._updateImageSmoothingEnabled(this.sketchContext)}this._clear()}},_clear:function(e,t){if(this.useCanvas){var i=this._getContext(e);if(t)i.clearRect(t.x,t.y,t.width,t.height);else{var n=i.canvas;i.clearRect(0,0,n.width,n.height)}}},viewportToDrawerRectangle:function(t){var i=this.viewport.pixelFromPointNoRotate(t.getTopLeft(),!0),n=this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(),!0);return new e.Rect(i.x*e.pixelDensityRatio,i.y*e.pixelDensityRatio,n.x*e.pixelDensityRatio,n.y*e.pixelDensityRatio)},drawTile:function(t,i,n,o,r){if(e.console.assert(t,"[Drawer.drawTile] tile is required"),e.console.assert(i,"[Drawer.drawTile] drawingHandler is required"),this.useCanvas){var s=this._getContext(n);o=o||1,t.drawCanvas(s,i,o,r)}else t.drawHTML(this.canvas)},_getContext:function(e){var t=this.context;if(e){if(null===this.sketchCanvas){this.sketchCanvas=document.createElement("canvas");var i=this._calculateSketchCanvasSize();if(this.sketchCanvas.width=i.x,this.sketchCanvas.height=i.y,this.sketchContext=this.sketchCanvas.getContext("2d"),0===this.viewport.getRotation()){var n=this;this.viewer.addHandler("rotate",function e(){if(0!==n.viewport.getRotation()){n.viewer.removeHandler("rotate",e);var t=n._calculateSketchCanvasSize();n.sketchCanvas.width=t.x,n.sketchCanvas.height=t.y}})}this._updateImageSmoothingEnabled(this.sketchContext)}t=this.sketchContext}return t},saveContext:function(e){this.useCanvas&&this._getContext(e).save()},restoreContext:function(e){this.useCanvas&&this._getContext(e).restore()},setClip:function(e,t){if(this.useCanvas){var i=this._getContext(t);i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()}},drawRectangle:function(e,t,i){if(this.useCanvas){var n=this._getContext(i);n.save(),n.fillStyle=t,n.fillRect(e.x,e.y,e.width,e.height),n.restore()}},blendSketch:function(t,i,n,o){var r=t;if(e.isPlainObject(r)||(r={opacity:t,scale:i,translate:n,compositeOperation:o}),this.useCanvas&&this.sketchCanvas){t=r.opacity,o=r.compositeOperation;var s=r.bounds;if(this.context.save(),this.context.globalAlpha=t,o&&(this.context.globalCompositeOperation=o),s)s.x<0&&(s.width+=s.x,s.x=0),s.x+s.width>this.canvas.width&&(s.width=this.canvas.width-s.x),s.y<0&&(s.height+=s.y,s.y=0),s.y+s.height>this.canvas.height&&(s.height=this.canvas.height-s.y),this.context.drawImage(this.sketchCanvas,s.x,s.y,s.width,s.height,s.x,s.y,s.width,s.height);else{i=r.scale||1;var a=(n=r.translate)instanceof e.Point?n:new e.Point(0,0),l=0,h=0;if(n){var c=this.sketchCanvas.width-this.canvas.width,u=this.sketchCanvas.height-this.canvas.height;l=Math.round(c/2),h=Math.round(u/2)}this.context.drawImage(this.sketchCanvas,a.x-l*i,a.y-h*i,(this.canvas.width+2*l)*i,(this.canvas.height+2*h)*i,-l,-h,this.canvas.width+2*l,this.canvas.height+2*h)}this.context.restore()}},drawDebugInfo:function(t,i,n,o){if(this.useCanvas){var r=this.viewer.world.getIndexOfItem(o)%this.debugGridColor.length,s=this.context;s.save(),s.lineWidth=2*e.pixelDensityRatio,s.font="small-caps bold "+13*e.pixelDensityRatio+"px arial",s.strokeStyle=this.debugGridColor[r],s.fillStyle=this.debugGridColor[r],0!==this.viewport.degrees&&this._offsetForRotation({degrees:this.viewport.degrees}),o.getRotation(!0)%360!=0&&this._offsetForRotation({degrees:o.getRotation(!0),point:o.viewport.pixelFromPointNoRotate(o._getRotationPoint(!0),!0)}),0===o.viewport.degrees&&o.getRotation(!0)%360==0&&o._drawer.viewer.viewport.getFlip()&&o._drawer._flip(),s.strokeRect(t.position.x*e.pixelDensityRatio,t.position.y*e.pixelDensityRatio,t.size.x*e.pixelDensityRatio,t.size.y*e.pixelDensityRatio);var a=(t.position.x+t.size.x/2)*e.pixelDensityRatio,l=(t.position.y+t.size.y/2)*e.pixelDensityRatio;s.translate(a,l),s.rotate(-(Math.PI/180*this.viewport.degrees)),s.translate(-a,-l),0===t.x&&0===t.y&&(s.fillText("Zoom: "+this.viewport.getZoom(),t.position.x*e.pixelDensityRatio,(t.position.y-30)*e.pixelDensityRatio),s.fillText("Pan: "+this.viewport.getBounds().toString(),t.position.x*e.pixelDensityRatio,(t.position.y-20)*e.pixelDensityRatio)),s.fillText("Level: "+t.level,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+20)*e.pixelDensityRatio),s.fillText("Column: "+t.x,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+30)*e.pixelDensityRatio),s.fillText("Row: "+t.y,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+40)*e.pixelDensityRatio),s.fillText("Order: "+n+" of "+i,(t.position.x+10)*e.pixelDensityRatio,(t.position.y+50)*e.pixelDensityRatio),s.fillText("Size: "+t.size.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+60)*e.pixelDensityRatio),s.fillText("Position: "+t.position.toString(),(t.position.x+10)*e.pixelDensityRatio,(t.position.y+70)*e.pixelDensityRatio),0!==this.viewport.degrees&&this._restoreRotationChanges(),o.getRotation(!0)%360!=0&&this._restoreRotationChanges(),0===o.viewport.degrees&&o.getRotation(!0)%360==0&&o._drawer.viewer.viewport.getFlip()&&o._drawer._flip(),s.restore()}},debugRect:function(t){if(this.useCanvas){var i=this.context;i.save(),i.lineWidth=2*e.pixelDensityRatio,i.strokeStyle=this.debugGridColor[0],i.fillStyle=this.debugGridColor[0],i.strokeRect(t.x*e.pixelDensityRatio,t.y*e.pixelDensityRatio,t.width*e.pixelDensityRatio,t.height*e.pixelDensityRatio),i.restore()}},setImageSmoothingEnabled:function(e){this.useCanvas&&(this._imageSmoothingEnabled=e,this._updateImageSmoothingEnabled(this.context),this.viewer.forceRedraw())},_updateImageSmoothingEnabled:function(e){e.msImageSmoothingEnabled=this._imageSmoothingEnabled,e.imageSmoothingEnabled=this._imageSmoothingEnabled},getCanvasSize:function(t){var i=this._getContext(t).canvas;return new e.Point(i.width,i.height)},getCanvasCenter:function(){return new e.Point(this.canvas.width/2,this.canvas.height/2)},_offsetForRotation:function(t){var i=t.point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.save(),n.translate(i.x,i.y),this.viewer.viewport.flipped?(n.rotate(-(Math.PI/180*t.degrees)),n.scale(-1,1)):n.rotate(Math.PI/180*t.degrees),n.translate(-i.x,-i.y)},_flip:function(t){var i=(t=t||{}).point?t.point.times(e.pixelDensityRatio):this.getCanvasCenter(),n=this._getContext(t.useSketch);n.translate(i.x,0),n.scale(-1,1),n.translate(-i.x,0)},_restoreRotationChanges:function(e){this._getContext(e).restore()},_calculateCanvasSize:function(){var t=e.pixelDensityRatio,i=this.viewport.getContainerSize();return{x:Math.round(i.x*t),y:Math.round(i.y*t)}},_calculateSketchCanvasSize:function(){var e=this._calculateCanvasSize();if(0===this.viewport.getRotation())return e;var t=Math.ceil(Math.sqrt(e.x*e.x+e.y*e.y));return{x:t,y:t}}}}(OpenSeadragon),function(e){e.Viewport=function(t){var i=arguments;i.length&&i[0]instanceof e.Point&&(t={containerSize:i[0],contentSize:i[1],config:i[2]}),t.config&&(e.extend(!0,t,t.config),delete t.config),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t.margins||{}),delete t.margins,e.extend(!0,this,{containerSize:null,contentSize:null,zoomPoint:null,viewer:null,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,maxZoomPixelRatio:e.DEFAULT_SETTINGS.maxZoomPixelRatio,visibilityRatio:e.DEFAULT_SETTINGS.visibilityRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,defaultZoomLevel:e.DEFAULT_SETTINGS.defaultZoomLevel,minZoomLevel:e.DEFAULT_SETTINGS.minZoomLevel,maxZoomLevel:e.DEFAULT_SETTINGS.maxZoomLevel,degrees:e.DEFAULT_SETTINGS.degrees,flipped:e.DEFAULT_SETTINGS.flipped,homeFillsViewer:e.DEFAULT_SETTINGS.homeFillsViewer},t),this._updateContainerInnerSize(),this.centerSpringX=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.centerSpringY=new e.Spring({initial:0,springStiffness:this.springStiffness,animationTime:this.animationTime}),this.zoomSpring=new e.Spring({exponential:!0,initial:1,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,this._setContentBounds(new e.Rect(0,0,1,1),1),this.goHome(!0),this.update()},e.Viewport.prototype={resetContentSize:function(t){return e.console.assert(t,"[Viewport.resetContentSize] contentSize is required"),e.console.assert(t instanceof e.Point,"[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"),e.console.assert(t.x>0,"[Viewport.resetContentSize] contentSize.x must be greater than 0"),e.console.assert(t.y>0,"[Viewport.resetContentSize] contentSize.y must be greater than 0"),this._setContentBounds(new e.Rect(0,0,1,t.y/t.x),t.x),this},setHomeBounds:function(t,i){e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."),this._setContentBounds(t,i)},_setContentBounds:function(t,i){e.console.assert(t,"[Viewport._setContentBounds] bounds is required"),e.console.assert(t instanceof e.Rect,"[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"),e.console.assert(t.width>0,"[Viewport._setContentBounds] bounds.width must be greater than 0"),e.console.assert(t.height>0,"[Viewport._setContentBounds] bounds.height must be greater than 0"),this._contentBoundsNoRotate=t.clone(),this._contentSizeNoRotate=this._contentBoundsNoRotate.getSize().times(i),this._contentBounds=t.rotate(this.degrees).getBoundingBox(),this._contentSize=this._contentBounds.getSize().times(i),this._contentAspectRatio=this._contentSize.x/this._contentSize.y,this.viewer&&this.viewer.raiseEvent("reset-size",{contentSize:this._contentSizeNoRotate.clone(),contentFactor:i,homeBounds:this._contentBoundsNoRotate.clone(),contentBounds:this._contentBounds.clone()})},getHomeZoom:function(){if(this.defaultZoomLevel)return this.defaultZoomLevel;var e,t=this._contentAspectRatio/this.getAspectRatio();return(e=this.homeFillsViewer?t>=1?t:1:t>=1?1:t)/this._contentBounds.width},getHomeBounds:function(){return this.getHomeBoundsNoRotate().rotate(-this.getRotation())},getHomeBoundsNoRotate:function(){var t=this._contentBounds.getCenter(),i=1/this.getHomeZoom(),n=i/this.getAspectRatio();return new e.Rect(t.x-i/2,t.y-n/2,i,n)},goHome:function(e){return this.viewer&&this.viewer.raiseEvent("home",{immediately:e}),this.fitBounds(this.getHomeBounds(),e)},getMinZoom:function(){var e=this.getHomeZoom();return this.minZoomLevel?this.minZoomLevel:this.minZoomImageRatio*e},getMaxZoom:function(){var e=this.maxZoomLevel;return e||(e=this._contentSize.x*this.maxZoomPixelRatio/this._containerInnerSize.x/this._contentBounds.width),Math.max(e,this.getHomeZoom())},getAspectRatio:function(){return this._containerInnerSize.x/this._containerInnerSize.y},getContainerSize:function(){return new e.Point(this.containerSize.x,this.containerSize.y)},getMargins:function(){return e.extend({},this._margins)},setMargins:function(t){e.console.assert("object"===e.type(t),"[Viewport.setMargins] margins must be an object"),this._margins=e.extend({left:0,top:0,right:0,bottom:0},t),this._updateContainerInnerSize(),this.viewer&&this.viewer.forceRedraw()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(-this.getRotation())},getBoundsNoRotate:function(t){var i=this.getCenter(t),n=1/this.getZoom(t),o=n/this.getAspectRatio();return new e.Rect(i.x-n/2,i.y-o/2,n,o)},getBoundsWithMargins:function(e){return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(),this.getCenter(e))},getBoundsNoRotateWithMargins:function(e){var t=this.getBoundsNoRotate(e),i=this._containerInnerSize.x*this.getZoom(e);return t.x-=this._margins.left/i,t.y-=this._margins.top/i,t.width+=(this._margins.left+this._margins.right)/i,t.height+=(this._margins.top+this._margins.bottom)/i,t},getCenter:function(t){var i,n,o,r,s,a,l=new e.Point(this.centerSpringX.current.value,this.centerSpringY.current.value),h=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return t?l:this.zoomPoint?(i=this.pixelFromPoint(this.zoomPoint,!0),r=(o=1/(n=this.getZoom()))/this.getAspectRatio(),s=new e.Rect(l.x-o/2,l.y-r/2,o,r),a=this._pixelFromPoint(this.zoomPoint,s).minus(i).divide(this._containerInnerSize.x*n),h.plus(a)):h},getZoom:function(e){return e?this.zoomSpring.current.value:this.zoomSpring.target.value},_applyZoomConstraints:function(e){return Math.max(Math.min(e,this.getMaxZoom()),this.getMinZoom())},_applyBoundaryConstraints:function(t){var i=new e.Rect(t.x,t.y,t.width,t.height);if(this.wrapHorizontal);else{var n=this.visibilityRatio*i.width,o=i.x+i.width,r=this._contentBoundsNoRotate.x+this._contentBoundsNoRotate.width,s=this._contentBoundsNoRotate.x-o+n,a=r-i.x-n;n>this._contentBoundsNoRotate.width?i.x+=(s+a)/2:a<0?i.x+=a:s>0&&(i.x+=s)}if(this.wrapVertical);else{var l=this.visibilityRatio*i.height,h=i.y+i.height,c=this._contentBoundsNoRotate.y+this._contentBoundsNoRotate.height,u=this._contentBoundsNoRotate.y-h+l,d=c-i.y-l;l>this._contentBoundsNoRotate.height?i.y+=(u+d)/2:d<0?i.y+=d:u>0&&(i.y+=u)}return i},_raiseConstraintsEvent:function(e){this.viewer&&this.viewer.raiseEvent("constrain",{immediately:e})},applyConstraints:function(e){var t=this.getZoom(),i=this._applyZoomConstraints(t);t!==i&&this.zoomTo(i,this.zoomPoint,e);var n=this.getBoundsNoRotate(),o=this._applyBoundaryConstraints(n);return this._raiseConstraintsEvent(e),(n.x!==o.x||n.y!==o.y||e)&&this.fitBounds(o.rotate(-this.getRotation()),e),this},ensureVisible:function(e){return this.applyConstraints(e)},_fitBounds:function(t,i){var n=(i=i||{}).immediately||!1,o=i.constraints||!1,r=this.getAspectRatio(),s=t.getCenter(),a=new e.Rect(t.x,t.y,t.width,t.height,t.degrees+this.getRotation()).getBoundingBox();a.getAspectRatio()>=r?a.height=a.width/r:a.width=a.height*r,a.x=s.x-a.width/2,a.y=s.y-a.height/2;var l=1/a.width;if(o){var h=a.getAspectRatio(),c=this._applyZoomConstraints(l);l!==c&&(l=c,a.width=1/l,a.x=s.x-a.width/2,a.height=a.width/h,a.y=s.y-a.height/2),s=(a=this._applyBoundaryConstraints(a)).getCenter(),this._raiseConstraintsEvent(n)}if(n)return this.panTo(s,!0),this.zoomTo(l,null,!0);this.panTo(this.getCenter(!0),!0),this.zoomTo(this.getZoom(!0),null,!0);var u=this.getBounds(),d=this.getZoom();if(0===d||1e-8>Math.abs(l/d-1))return this.zoomTo(l,!0),this.panTo(s,n);var p=(a=a.rotate(-this.getRotation())).getTopLeft().times(l).minus(u.getTopLeft().times(d)).divide(l-d);return this.zoomTo(l,p,n)},fitBounds:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!1})},fitBoundsWithConstraints:function(e,t){return this._fitBounds(e,{immediately:t,constraints:!0})},fitVertically:function(t){var i=new e.Rect(this._contentBounds.x+this._contentBounds.width/2,this._contentBounds.y,0,this._contentBounds.height);return this.fitBounds(i,t)},fitHorizontally:function(t){var i=new e.Rect(this._contentBounds.x,this._contentBounds.y+this._contentBounds.height/2,this._contentBounds.width,0);return this.fitBounds(i,t)},getConstrainedBounds:function(e){var t;return t=this.getBounds(e),this._applyBoundaryConstraints(t)},panBy:function(t,i){var n=new e.Point(this.centerSpringX.target.value,this.centerSpringY.target.value);return this.panTo(n.plus(t),i)},panTo:function(e,t){return t?(this.centerSpringX.resetTo(e.x),this.centerSpringY.resetTo(e.y)):(this.centerSpringX.springTo(e.x),this.centerSpringY.springTo(e.y)),this.viewer&&this.viewer.raiseEvent("pan",{center:e,immediately:t}),this},zoomBy:function(e,t,i){return this.zoomTo(this.zoomSpring.target.value*e,t,i)},zoomTo:function(t,i,n){var o=this;return this.zoomPoint=i instanceof e.Point&&!isNaN(i.x)&&!isNaN(i.y)?i:null,n?this._adjustCenterSpringsForZoomPoint(function(){o.zoomSpring.resetTo(t)}):this.zoomSpring.springTo(t),this.viewer&&this.viewer.raiseEvent("zoom",{zoom:t,refPoint:i,immediately:n}),this},setRotation:function(t){return this.viewer&&this.viewer.drawer.canRotate()&&(this.degrees=e.positiveModulo(t,360),this._setContentBounds(this.viewer.world.getHomeBounds(),this.viewer.world.getContentFactor()),this.viewer.forceRedraw(),this.viewer.raiseEvent("rotate",{degrees:t})),this},getRotation:function(){return this.degrees},resize:function(e,t){var i,n=this.getBoundsNoRotate(),o=n;return this.containerSize.x=e.x,this.containerSize.y=e.y,this._updateContainerInnerSize(),t&&(i=e.x/this.containerSize.x,o.width=n.width*i,o.height=o.width/this.getAspectRatio()),this.viewer&&this.viewer.raiseEvent("resize",{newContainerSize:e,maintain:t}),this.fitBounds(o,!0)},_updateContainerInnerSize:function(){this._containerInnerSize=new e.Point(Math.max(1,this.containerSize.x-(this._margins.left+this._margins.right)),Math.max(1,this.containerSize.y-(this._margins.top+this._margins.bottom)))},update:function(){var e=this;this._adjustCenterSpringsForZoomPoint(function(){e.zoomSpring.update()}),this.centerSpringX.update(),this.centerSpringY.update();var t=this.centerSpringX.current.value!==this._oldCenterX||this.centerSpringY.current.value!==this._oldCenterY||this.zoomSpring.current.value!==this._oldZoom;return this._oldCenterX=this.centerSpringX.current.value,this._oldCenterY=this.centerSpringY.current.value,this._oldZoom=this.zoomSpring.current.value,t},_adjustCenterSpringsForZoomPoint:function(e){if(this.zoomPoint){var t=this.pixelFromPoint(this.zoomPoint,!0);e();var i=this.pixelFromPoint(this.zoomPoint,!0).minus(t),n=this.deltaPointsFromPixels(i,!0);this.centerSpringX.shiftBy(n.x),this.centerSpringY.shiftBy(n.y),this.zoomSpring.isAtTargetValue()&&(this.zoomPoint=null)}else e()},deltaPixelsFromPointsNoRotate:function(e,t){return e.times(this._containerInnerSize.x*this.getZoom(t))},deltaPixelsFromPoints:function(e,t){return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation()),t)},deltaPointsFromPixelsNoRotate:function(e,t){return e.divide(this._containerInnerSize.x*this.getZoom(t))},deltaPointsFromPixels:function(e,t){return this.deltaPointsFromPixelsNoRotate(e,t).rotate(-this.getRotation())},pixelFromPointNoRotate:function(e,t){return this._pixelFromPointNoRotate(e,this.getBoundsNoRotate(t))},pixelFromPoint:function(e,t){return this._pixelFromPoint(e,this.getBoundsNoRotate(t))},_pixelFromPointNoRotate:function(t,i){return t.minus(i.getTopLeft()).times(this._containerInnerSize.x/i.width).plus(new e.Point(this._margins.left,this._margins.top))},_pixelFromPoint:function(e,t){return this._pixelFromPointNoRotate(e.rotate(this.getRotation(),this.getCenter(!0)),t)},pointFromPixelNoRotate:function(t,i){var n=this.getBoundsNoRotate(i);return t.minus(new e.Point(this._margins.left,this._margins.top)).divide(this._containerInnerSize.x/n.width).plus(n.getTopLeft())},pointFromPixel:function(e,t){return this.pointFromPixelNoRotate(e,t).rotate(-this.getRotation(),this.getCenter(!0))},_viewportToImageDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t*this._contentSizeNoRotate.x/n,i*this._contentSizeNoRotate.x/n)},viewportToImageCoordinates:function(t,i){if(t instanceof e.Point)return this.viewportToImageCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");else if(1===n)return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t,i,!0)}return this._viewportToImageDelta(t-this._contentBoundsNoRotate.x,i-this._contentBoundsNoRotate.y)},_imageToViewportDelta:function(t,i){var n=this._contentBoundsNoRotate.width;return new e.Point(t/this._contentSizeNoRotate.x*n,i/this._contentSizeNoRotate.x*n)},imageToViewportCoordinates:function(t,i){if(t instanceof e.Point)return this.imageToViewportCoordinates(t.x,t.y);if(this.viewer){var n=this.viewer.world.getItemCount();if(n>1)e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");else if(1===n)return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t,i,!0)}var o=this._imageToViewportDelta(t,i);return o.x+=this._contentBoundsNoRotate.x,o.y+=this._contentBoundsNoRotate.y,o},imageToViewportRectangle:function(t,i,n,o){var r=t;if(r instanceof e.Rect||(r=new e.Rect(t,i,n,o)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");else if(1===s)return this.viewer.world.getItemAt(0).imageToViewportRectangle(t,i,n,o,!0)}var a=this.imageToViewportCoordinates(r.x,r.y),l=this._imageToViewportDelta(r.width,r.height);return new e.Rect(a.x,a.y,l.x,l.y,r.degrees)},viewportToImageRectangle:function(t,i,n,o){var r=t;if(r instanceof e.Rect||(r=new e.Rect(t,i,n,o)),this.viewer){var s=this.viewer.world.getItemCount();if(s>1)e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");else if(1===s)return this.viewer.world.getItemAt(0).viewportToImageRectangle(t,i,n,o,!0)}var a=this.viewportToImageCoordinates(r.x,r.y),l=this._viewportToImageDelta(r.width,r.height);return new e.Rect(a.x,a.y,l.x,l.y,r.degrees)},viewerElementToImageCoordinates:function(e){var t=this.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.pixelFromPoint(t,!0)},windowToImageCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToImageCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(i)},imageToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.imageToWindowCoordinates] the viewport must have a viewer."),this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewerElementToViewportCoordinates:function(e){return this.pointFromPixel(e,!0)},viewportToViewerElementCoordinates:function(e){return this.pixelFromPoint(e,!0)},viewerElementToViewportRectangle:function(t){return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(),!0),this.pointFromPixel(t.getTopRight(),!0),this.pointFromPixel(t.getBottomLeft(),!0))},viewportToViewerElementRectangle:function(t){return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(),!0),this.pixelFromPoint(t.getTopRight(),!0),this.pixelFromPoint(t.getBottomLeft(),!0))},windowToViewportCoordinates:function(t){e.console.assert(this.viewer,"[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");var i=t.minus(e.getElementPosition(this.viewer.element));return this.viewerElementToViewportCoordinates(i)},viewportToWindowCoordinates:function(t){return e.console.assert(this.viewer,"[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."),this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element))},viewportToImageZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");else if(1===i)return this.viewer.world.getItemAt(0).viewportToImageZoom(t)}var n=this._contentSizeNoRotate.x;return this._containerInnerSize.x/n*this._contentBoundsNoRotate.width*t},imageToViewportZoom:function(t){if(this.viewer){var i=this.viewer.world.getItemCount();if(i>1)e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image.");else if(1===i)return this.viewer.world.getItemAt(0).imageToViewportZoom(t)}return this._contentSizeNoRotate.x/this._containerInnerSize.x/this._contentBoundsNoRotate.width*t},toggleFlip:function(){return this.setFlip(!this.getFlip()),this},getFlip:function(){return this.flipped},setFlip:function(e){return this.flipped===e||(this.flipped=e,this.viewer.navigator&&this.viewer.navigator.setFlip(this.getFlip()),this.viewer.forceRedraw(),this.viewer.raiseEvent("flip",{flipped:e})),this}}}(OpenSeadragon),function(e){function t(e,t,n,o,r,s,a,l,h){var c=a.getBoundingBox().getTopLeft(),u=a.getBoundingBox().getBottomRight();e.viewer&&e.viewer.raiseEvent("update-level",{tiledImage:e,havedrawn:t,level:o,opacity:r,visibility:s,drawArea:a,topleft:c,bottomright:u,currenttime:l,best:h}),d(e.coverage,o),d(e.loadingCoverage,o);for(var p=e._getCornerTiles(o,c,u),g=p.topLeft,m=p.bottomRight,v=e.source.getNumTiles(o),f=e.viewport.pixelFromPoint(e.viewport.getCenter()),w=g.x;w<=m.x;w++)for(var y=g.y;y<=m.y;y++){if(!e.wrapHorizontal&&!e.wrapVertical){var T=e.source.getTileBounds(o,w,y);if(null===a.intersection(T))continue}h=i(e,n,t,w,y,o,r,s,f,v,l,h)}return h}function i(e,t,i,o,r,h,d,g,m,v,f,w){var y=n(o,r,h,e,e.source,e.tilesMatrix,f,v,e._worldWidthCurrent,e._worldHeightCurrent),T=i;e.viewer&&e.viewer.raiseEvent("update-tile",{tiledImage:e,tile:y}),u(e.coverage,h,o,r,!1);var x=y.loaded||y.loading||c(e.loadingCoverage,h,o,r);if(u(e.loadingCoverage,h,o,r,x),!y.exists||(t&&!T&&(c(e.coverage,h,o,r)?u(e.coverage,h,o,r,!0):T=!0),!T))return w;if(a(y,e.source.tileOverlap,e.viewport,m,g,e),!y.loaded){if(y.context2D)s(e,y);else{var S=e._tileCache.getImageRecord(y.cacheKey);S&&s(e,y,S.getImage())}}return y.loaded?l(e,y,o,r,h,d,f)&&(e._needsDraw=!0):y.loading?e._tilesLoading++:x||(w=p(w,y)),w}function n(t,i,n,o,r,s,a,l,h,c){var u,d,p,g,m,v,f,w,y;return s[n]||(s[n]={}),s[n][t]||(s[n][t]={}),s[n][t][i]||(u=(l.x+t%l.x)%l.x,d=(l.y+i%l.y)%l.y,p=r.getTileBounds(n,u,d),g=r.getTileBounds(n,u,d,!0),m=r.tileExists(n,u,d),v=r.getTileUrl(n,u,d),o.loadTilesWithAjax?(f=r.getTileAjaxHeaders(n,u,d),e.isPlainObject(o.ajaxHeaders)&&(f=e.extend({},o.ajaxHeaders,f))):f=null,w=r.getContext2D?r.getContext2D(n,u,d):void 0,p.x+=(t-u)/l.x,p.y+=c/h*((i-d)/l.y),y=new e.Tile(n,t,i,p,m,v,w,o.loadTilesWithAjax,f,g),u===l.x-1&&(y.isRightMost=!0),d===l.y-1&&(y.isBottomMost=!0),s[n][t][i]=y),(y=s[n][t][i]).lastTouchTime=a,y}function o(e,t,i){t.loading=!0,e._imageLoader.addJob({src:t.url,loadWithAjax:t.loadWithAjax,ajaxHeaders:t.ajaxHeaders,crossOriginPolicy:e.crossOriginPolicy,ajaxWithCredentials:e.ajaxWithCredentials,callback:function(n,o,s){r(e,t,i,n,o,s)},abort:function(){t.loading=!1}})}function r(t,i,n,o,r,a){if(!o){e.console.log("Tile %s failed to load: %s - error: %s",i,i.url,r),t.viewer.raiseEvent("tile-load-failed",{tile:i,tiledImage:t,time:n,message:r,tileRequest:a}),i.loading=!1,i.exists=!1;return}if(ne.visibility?t:t.visibility==e.visibility&&t.squaredDistance1&&h>t.smoothTileEdgesMinZoom&&!t.iOSDevice&&t.getRotation(!0)%360==0&&e.supportsCanvas&&(n=!0,o=a.getScaleForEdgeSmoothing(),r=a.getTranslationForEdgeSmoothing(o,t._drawer.getCanvasSize(!1),t._drawer.getCanvasSize(!0))),n&&(o||(s=t.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox(),t._drawer.viewer.viewport.getFlip()&&(0!==t.viewport.degrees||t.getRotation(!0)%360!=0)&&(s.x=t._drawer.viewer.container.clientWidth-(s.x+s.width)),s=s.times(e.pixelDensityRatio)),t._drawer._clear(!0,s)),!o&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:n}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:n}),0===t.viewport.degrees&&t.getRotation(!0)%360==0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip());var c=!1;if(t._clip){t._drawer.saveContext(n);var u=t.imageToViewportRectangle(t._clip,!0);u=u.rotate(-t.getRotation(!0),t._getRotationPoint(!0));var d=t._drawer.viewportToDrawerRectangle(u);o&&(d=d.times(o)),r&&(d=d.translate(r)),t._drawer.setClip(d,n),c=!0}if(t._croppingPolygons){t._drawer.saveContext(n);try{var p=t._croppingPolygons.map(function(e){return e.map(function(e){var i=t.imageToViewportCoordinates(e.x,e.y,!0).rotate(-t.getRotation(!0),t._getRotationPoint(!0)),n=t._drawer.viewportCoordToDrawerCoord(i);return o&&(n=n.times(o)),n})});t._drawer.clipWithPolygons(p,n)}catch(t){e.console.error(t)}c=!0}if(t.placeholderFillStyle&&!1===t._hasOpaqueTile){var g=t._drawer.viewportToDrawerRectangle(t.getBounds(!0));o&&(g=g.times(o)),r&&(g=g.translate(r));var v=null;v="function"==typeof t.placeholderFillStyle?t.placeholderFillStyle(t,t._drawer.context):t.placeholderFillStyle,t._drawer.drawRectangle(g,v,n)}for(var f=i.length-1;f>=0;f--)a=i[f],t._drawer.drawTile(a,t._drawingHandler,n,o,r),a.beingDrawn=!0,t.viewer&&t.viewer.raiseEvent("tile-drawn",{tiledImage:t,tile:a});c&&t._drawer.restoreContext(n),o||(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(n),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(n)),n&&(o&&(0!==t.viewport.degrees&&t._drawer._offsetForRotation({degrees:t.viewport.degrees,useSketch:!1}),t.getRotation(!0)%360!=0&&t._drawer._offsetForRotation({degrees:t.getRotation(!0),point:t.viewport.pixelFromPointNoRotate(t._getRotationPoint(!0),!0),useSketch:!1})),t._drawer.blendSketch({opacity:t.opacity,scale:o,translate:r,compositeOperation:t.compositeOperation,bounds:s}),o&&(t.getRotation(!0)%360!=0&&t._drawer._restoreRotationChanges(!1),0!==t.viewport.degrees&&t._drawer._restoreRotationChanges(!1))),!o&&0===t.viewport.degrees&&t.getRotation(!0)%360==0&&t._drawer.viewer.viewport.getFlip()&&t._drawer._flip(),m(t,i)}}function m(t,i){if(t.debugMode)for(var n=i.length-1;n>=0;n--){var o=i[n];try{t._drawer.drawDebugInfo(o,i.length,n,t)}catch(t){e.console.error(t)}}}e.TiledImage=function(t){var i=this;e.console.assert(t.tileCache,"[TiledImage] options.tileCache is required"),e.console.assert(t.drawer,"[TiledImage] options.drawer is required"),e.console.assert(t.viewer,"[TiledImage] options.viewer is required"),e.console.assert(t.imageLoader,"[TiledImage] options.imageLoader is required"),e.console.assert(t.source,"[TiledImage] options.source is required"),e.console.assert(!t.clip||t.clip instanceof e.Rect,"[TiledImage] options.clip must be an OpenSeadragon.Rect if present"),e.EventSource.call(this),this._tileCache=t.tileCache,delete t.tileCache,this._drawer=t.drawer,delete t.drawer,this._imageLoader=t.imageLoader,delete t.imageLoader,t.clip instanceof e.Rect&&(this._clip=t.clip.clone()),delete t.clip;var n=t.x||0;delete t.x;var o=t.y||0;delete t.y,this.normHeight=t.source.dimensions.y/t.source.dimensions.x,this.contentAspectX=t.source.dimensions.x/t.source.dimensions.y;var r=1;t.width?(r=t.width,delete t.width,t.height&&(e.console.error("specifying both width and height to a tiledImage is not supported"),delete t.height)):t.height&&(r=t.height/this.normHeight,delete t.height);var s=t.fitBounds;delete t.fitBounds;var a=t.fitBoundsPlacement||OpenSeadragon.Placement.CENTER;delete t.fitBoundsPlacement;var l=t.degrees||0;delete t.degrees,e.extend(!0,this,{viewer:null,tilesMatrix:{},coverage:{},loadingCoverage:{},lastDrawn:[],lastResetTime:0,_midDraw:!1,_needsDraw:!0,_hasOpaqueTile:!1,_tilesLoading:0,springStiffness:e.DEFAULT_SETTINGS.springStiffness,animationTime:e.DEFAULT_SETTINGS.animationTime,minZoomImageRatio:e.DEFAULT_SETTINGS.minZoomImageRatio,wrapHorizontal:e.DEFAULT_SETTINGS.wrapHorizontal,wrapVertical:e.DEFAULT_SETTINGS.wrapVertical,immediateRender:e.DEFAULT_SETTINGS.immediateRender,blendTime:e.DEFAULT_SETTINGS.blendTime,alwaysBlend:e.DEFAULT_SETTINGS.alwaysBlend,minPixelRatio:e.DEFAULT_SETTINGS.minPixelRatio,smoothTileEdgesMinZoom:e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,iOSDevice:e.DEFAULT_SETTINGS.iOSDevice,debugMode:e.DEFAULT_SETTINGS.debugMode,crossOriginPolicy:e.DEFAULT_SETTINGS.crossOriginPolicy,ajaxWithCredentials:e.DEFAULT_SETTINGS.ajaxWithCredentials,placeholderFillStyle:e.DEFAULT_SETTINGS.placeholderFillStyle,opacity:e.DEFAULT_SETTINGS.opacity,preload:e.DEFAULT_SETTINGS.preload,compositeOperation:e.DEFAULT_SETTINGS.compositeOperation},t),this._preload=this.preload,delete this.preload,this._fullyLoaded=!1,this._xSpring=new e.Spring({initial:n,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._ySpring=new e.Spring({initial:o,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._scaleSpring=new e.Spring({initial:r,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._degreesSpring=new e.Spring({initial:l,springStiffness:this.springStiffness,animationTime:this.animationTime}),this._updateForScale(),s&&this.fitBounds(s,a,!0),this._drawingHandler=function(t){i.viewer.raiseEvent("tile-drawing",e.extend({tiledImage:i},t))}},e.extend(e.TiledImage.prototype,e.EventSource.prototype,{needsDraw:function(){return this._needsDraw},getFullyLoaded:function(){return this._fullyLoaded},_setFullyLoaded:function(e){e!==this._fullyLoaded&&(this._fullyLoaded=e,this.raiseEvent("fully-loaded-change",{fullyLoaded:this._fullyLoaded}))},reset:function(){this._tileCache.clearTilesFor(this),this.lastResetTime=e.now(),this._needsDraw=!0},update:function(){var e=this._xSpring.update(),t=this._ySpring.update(),i=this._scaleSpring.update(),n=this._degreesSpring.update();return(!!e||!!t||!!i||!!n)&&(this._updateForScale(),this._needsDraw=!0,!0)},draw:function(){0!==this.opacity||this._preload?(this._midDraw=!0,this._updateViewport(),this._midDraw=!1):this._needsDraw=!1},destroy:function(){this.reset()},getBounds:function(e){return this.getBoundsNoRotate(e).rotate(this.getRotation(e),this._getRotationPoint(e))},getBoundsNoRotate:function(t){return t?new e.Rect(this._xSpring.current.value,this._ySpring.current.value,this._worldWidthCurrent,this._worldHeightCurrent):new e.Rect(this._xSpring.target.value,this._ySpring.target.value,this._worldWidthTarget,this._worldHeightTarget)},getWorldBounds:function(){return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"),this.getBounds()},getClippedBounds:function(t){var i=this.getBoundsNoRotate(t);if(this._clip){var n=(t?this._worldWidthCurrent:this._worldWidthTarget)/this.source.dimensions.x,o=this._clip.times(n);i=new e.Rect(i.x+o.x,i.y+o.y,o.width,o.height)}return i.rotate(this.getRotation(t),this._getRotationPoint(t))},getContentSize:function(){return new e.Point(this.source.dimensions.x,this.source.dimensions.y)},_viewportToImageDelta:function(t,i,n){var o=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(this.source.dimensions.x/o*t,this.source.dimensions.y*this.contentAspectX/o*i)},viewportToImageCoordinates:function(t,i,n){var o;return t instanceof e.Point?(n=i,o=t):o=new e.Point(t,i),o=o.rotate(-this.getRotation(n),this._getRotationPoint(n)),n?this._viewportToImageDelta(o.x-this._xSpring.current.value,o.y-this._ySpring.current.value):this._viewportToImageDelta(o.x-this._xSpring.target.value,o.y-this._ySpring.target.value)},_imageToViewportDelta:function(t,i,n){var o=n?this._scaleSpring.current.value:this._scaleSpring.target.value;return new e.Point(t/this.source.dimensions.x*o,i/this.source.dimensions.y/this.contentAspectX*o)},imageToViewportCoordinates:function(t,i,n){t instanceof e.Point&&(n=i,i=t.y,t=t.x);var o=this._imageToViewportDelta(t,i);return n?(o.x+=this._xSpring.current.value,o.y+=this._ySpring.current.value):(o.x+=this._xSpring.target.value,o.y+=this._ySpring.target.value),o.rotate(this.getRotation(n),this._getRotationPoint(n))},imageToViewportRectangle:function(t,i,n,o,r){var s=t;s instanceof e.Rect?r=i:s=new e.Rect(t,i,n,o);var a=this.imageToViewportCoordinates(s.getTopLeft(),r),l=this._imageToViewportDelta(s.width,s.height,r);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees+this.getRotation(r))},viewportToImageRectangle:function(t,i,n,o,r){var s=t;t instanceof e.Rect?r=i:s=new e.Rect(t,i,n,o);var a=this.viewportToImageCoordinates(s.getTopLeft(),r),l=this._viewportToImageDelta(s.width,s.height,r);return new e.Rect(a.x,a.y,l.x,l.y,s.degrees-this.getRotation(r))},viewerElementToImageCoordinates:function(e){var t=this.viewport.pointFromPixel(e,!0);return this.viewportToImageCoordinates(t)},imageToViewerElementCoordinates:function(e){var t=this.imageToViewportCoordinates(e);return this.viewport.pixelFromPoint(t,!0)},windowToImageCoordinates:function(e){var t=e.minus(OpenSeadragon.getElementPosition(this.viewer.element));return this.viewerElementToImageCoordinates(t)},imageToWindowCoordinates:function(e){return this.imageToViewerElementCoordinates(e).plus(OpenSeadragon.getElementPosition(this.viewer.element))},_viewportToTiledImageRectangle:function(t){var i=this._scaleSpring.current.value;return t=t.rotate(-this.getRotation(!0),this._getRotationPoint(!0)),new e.Rect((t.x-this._xSpring.current.value)/i,(t.y-this._ySpring.current.value)/i,t.width/i,t.height/i,t.degrees)},viewportToImageZoom:function(e){return this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x*e},imageToViewportZoom:function(e){return e/(this._scaleSpring.current.value*this.viewport._containerInnerSize.x/this.source.dimensions.x)},setPosition:function(e,t){var i=this._xSpring.target.value===e.x&&this._ySpring.target.value===e.y;if(t){if(i&&this._xSpring.current.value===e.x&&this._ySpring.current.value===e.y)return;this._xSpring.resetTo(e.x),this._ySpring.resetTo(e.y),this._needsDraw=!0}else{if(i)return;this._xSpring.springTo(e.x),this._ySpring.springTo(e.y),this._needsDraw=!0}i||this._raiseBoundsChange()},setWidth:function(e,t){this._setScale(e,t)},setHeight:function(e,t){this._setScale(e/this.normHeight,t)},setCroppingPolygons:function(t){var i=function(t){return t instanceof e.Point||"number"==typeof t.x&&"number"==typeof t.y},n=function(e){return e.map(function(e){try{if(i(e))return{x:e.x,y:e.y};throw Error()}catch(e){throw Error("A Provided cropping polygon point is not supported")}})};try{if(!e.isArray(t))throw Error("Provided cropping polygon is not an array");this._croppingPolygons=t.map(function(e){return n(e)})}catch(t){e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"),e.console.error(t),this._croppingPolygons=null}},resetCroppingPolygons:function(){this._croppingPolygons=null},fitBounds:function(t,i,n){i=i||e.Placement.CENTER;var o=e.Placement.properties[i],r=this.contentAspectX,s=0,a=0,l=1,h=1;if(this._clip&&(r=this._clip.getAspectRatio(),l=this._clip.width/this.source.dimensions.x,h=this._clip.height/this.source.dimensions.y,t.getAspectRatio()>r?(s=this._clip.x/this._clip.height*t.height,a=this._clip.y/this._clip.height*t.height):(s=this._clip.x/this._clip.width*t.width,a=this._clip.y/this._clip.width*t.width)),t.getAspectRatio()>r){var c=t.height/h,u=0;o.isHorizontallyCentered?u=(t.width-t.height*r)/2:o.isRight&&(u=t.width-t.height*r),this.setPosition(new e.Point(t.x-s+u,t.y-a),n),this.setHeight(c,n)}else{var d=t.width/l,p=0;o.isVerticallyCentered?p=(t.height-t.width/r)/2:o.isBottom&&(p=t.height-t.width/r),this.setPosition(new e.Point(t.x-s,t.y-a+p),n),this.setWidth(d,n)}},getClip:function(){return this._clip?this._clip.clone():null},setClip:function(t){e.console.assert(!t||t instanceof e.Rect,"[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"),t instanceof e.Rect?this._clip=t.clone():this._clip=null,this._needsDraw=!0,this.raiseEvent("clip-change")},getOpacity:function(){return this.opacity},setOpacity:function(e){e!==this.opacity&&(this.opacity=e,this._needsDraw=!0,this.raiseEvent("opacity-change",{opacity:this.opacity}))},getPreload:function(){return this._preload},setPreload:function(e){this._preload=!!e,this._needsDraw=!0},getRotation:function(e){return e?this._degreesSpring.current.value:this._degreesSpring.target.value},setRotation:function(e,t){this._degreesSpring.target.value===e&&this._degreesSpring.isAtTargetValue()||(t?this._degreesSpring.resetTo(e):this._degreesSpring.springTo(e),this._needsDraw=!0,this._raiseBoundsChange())},_getRotationPoint:function(e){return this.getBoundsNoRotate(e).getCenter()},getCompositeOperation:function(){return this.compositeOperation},setCompositeOperation:function(e){e!==this.compositeOperation&&(this.compositeOperation=e,this._needsDraw=!0,this.raiseEvent("composite-operation-change",{compositeOperation:this.compositeOperation}))},_setScale:function(e,t){var i=this._scaleSpring.target.value===e;if(t){if(i&&this._scaleSpring.current.value===e)return;this._scaleSpring.resetTo(e),this._updateForScale(),this._needsDraw=!0}else{if(i)return;this._scaleSpring.springTo(e),this._updateForScale(),this._needsDraw=!0}i||this._raiseBoundsChange()},_updateForScale:function(){this._worldWidthTarget=this._scaleSpring.target.value,this._worldHeightTarget=this.normHeight*this._scaleSpring.target.value,this._worldWidthCurrent=this._scaleSpring.current.value,this._worldHeightCurrent=this.normHeight*this._scaleSpring.current.value},_raiseBoundsChange:function(){this.raiseEvent("bounds-change")},_isBottomItem:function(){return this.viewer.world.getItemAt(0)===this},_getLevelsInterval:function(){var e=Math.max(this.source.minLevel,Math.floor(Math.log(this.minZoomImageRatio)/Math.log(2))),t=this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0),!0).x*this._scaleSpring.current.value,i=Math.min(Math.abs(this.source.maxLevel),Math.abs(Math.floor(Math.log(t/this.minPixelRatio)/Math.log(2))));return{lowestLevel:e=Math.min(e,i=Math.max(i,this.source.minLevel||0)),highestLevel:i}},_updateViewport:function(){for(this._needsDraw=!1,this._tilesLoading=0,this.loadingCoverage={};this.lastDrawn.length>0;)this.lastDrawn.pop().beingDrawn=!1;var i=this.viewport,n=this._viewportToTiledImageRectangle(i.getBoundsWithMargins(!0));if(!this.wrapHorizontal&&!this.wrapVertical){var r=this._viewportToTiledImageRectangle(this.getClippedBounds(!0));if(null===(n=n.intersection(r)))return}for(var s=this._getLevelsInterval(),a=s.lowestLevel,l=s.highestLevel,c=null,u=!1,d=e.now(),p=l;p>=a;p--){var m=!1,v=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!0).x*this._scaleSpring.current.value;if(p===a||!u&&v>=this.minPixelRatio)m=!0,u=!0;else if(!u)continue;var f=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(p),!1).x*this._scaleSpring.current.value,w=i.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(),0)),!1).x*this._scaleSpring.current.value,y=this.immediateRender?1:w;if(c=t(this,u,m,p,Math.min(1,(v-.5)/.5),y/Math.abs(y-f),n,d,c),h(this.coverage,p))break}g(this,this.lastDrawn),c&&!c.context2D?(o(this,c,d),this._needsDraw=!0,this._setFullyLoaded(!1)):this._setFullyLoaded(0===this._tilesLoading)},_getCornerTiles:function(t,i,n){this.wrapHorizontal?(o=e.positiveModulo(i.x,1),r=e.positiveModulo(n.x,1)):(o=Math.max(0,i.x),r=Math.min(1,n.x));var o,r,s,a,l=1/this.source.aspectRatio;this.wrapVertical?(s=e.positiveModulo(i.y,l),a=e.positiveModulo(n.y,l)):(s=Math.max(0,i.y),a=Math.min(l,n.y));var h=this.source.getTileAtPoint(t,new e.Point(o,s)),c=this.source.getTileAtPoint(t,new e.Point(r,a)),u=this.source.getNumTiles(t);return this.wrapHorizontal&&(h.x+=u.x*Math.floor(i.x),c.x+=u.x*Math.floor(n.x)),this.wrapVertical&&(h.y+=u.y*Math.floor(i.y/l),c.y+=u.y*Math.floor(n.y/l)),{topLeft:h,bottomRight:c}}})}(OpenSeadragon),function(e){var t=function(t){e.console.assert(t,"[TileCache.cacheTile] options is required"),e.console.assert(t.tile,"[TileCache.cacheTile] options.tile is required"),e.console.assert(t.tiledImage,"[TileCache.cacheTile] options.tiledImage is required"),this.tile=t.tile,this.tiledImage=t.tiledImage},i=function(t){e.console.assert(t,"[ImageRecord] options is required"),e.console.assert(t.image,"[ImageRecord] options.image is required"),this._image=t.image,this._tiles=[]};i.prototype={destroy:function(){this._image=null,this._renderedContext=null,this._tiles=null},getImage:function(){return this._image},getRenderedContext:function(){if(!this._renderedContext){var e=document.createElement("canvas");e.width=this._image.width,e.height=this._image.height,this._renderedContext=e.getContext("2d"),this._renderedContext.drawImage(this._image,0,0),this._image=null}return this._renderedContext},setRenderedContext:function(t){e.console.error("ImageRecord.setRenderedContext is deprecated. The rendered context should be created by the ImageRecord itself when calling ImageRecord.getRenderedContext."),this._renderedContext=t},addTile:function(t){e.console.assert(t,"[ImageRecord.addTile] tile is required"),this._tiles.push(t)},removeTile:function(t){for(var i=0;ithis._maxImageCacheCount){for(var a,l,h,c,u,d,p=null,g=-1,m=null,v=this._tilesLoaded.length-1;v>=0;v--)if(!((a=(d=this._tilesLoaded[v]).tile).level<=o)&&!a.beingDrawn){if(!p){p=a,g=v,m=d;continue}c=a.lastTouchTime,l=p.lastTouchTime,u=a.level,h=p.level,(ch)&&(p=a,g=v,m=d)}p&&g>=0&&(this._unloadTile(m),r=g)}this._tilesLoaded[r]=new t({tile:n.tile,tiledImage:n.tiledImage})},clearTilesFor:function(t){e.console.assert(t,"[TileCache.clearTilesFor] tiledImage is required");for(var i,n=0;n=this._items.length)throw Error("Index bigger than number of layers.");i!==n&&-1!==n&&(this._items.splice(n,1),this._items.splice(i,0,t),this._needsDraw=!0,this.raiseEvent("item-index-change",{item:t,previousIndex:n,newIndex:i}))},removeItem:function(t){e.console.assert(t,"[World.removeItem] item is required");var i=e.indexOf(this._items,t);-1!==i&&(t.removeHandler("bounds-change",this._delegatedFigureSizes),t.removeHandler("clip-change",this._delegatedFigureSizes),t.destroy(),this._items.splice(i,1),this._figureSizes(),this._needsDraw=!0,this._raiseRemoveItem(t))},removeAll:function(){for(this.viewer._cancelPendingImages(),t=0;to.height?d:o.width/o.height*d,s=o.height/o.width*r,a=new e.Point(g+(d-r)/2,m+(d-s)/2),n.setPosition(a,l),n.setWidth(r,l),"horizontal"===h?g+=p:m+=p;this.setAutoRefigureSizes(!0)},_figureSizes:function(){var t=this._homeBounds?this._homeBounds.clone():null,i=this._contentSize?this._contentSize.clone():null,n=this._contentFactor||0;if(this._items.length){var o=this._items[0],r=o.getBounds();this._contentFactor=o.getContentSize().x/r.width;for(var s=o.getClippedBounds().getBoundingBox(),a=s.x,l=s.y,h=s.x+s.width,c=s.y+s.height,u=1;u{},x=[{depth:2,value:"Features",id:"features"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Usage",id:"usage"},{depth:3,value:"React",id:"react"},{depth:4,value:"Using src and isTiledImage props",id:"using-src-and-istiledimage-props"},{depth:4,value:"Using the IIIF annotation body",id:"using-the-iiif-annotation-body"},{depth:3,value:"Vanilla JavaScript",id:"vanilla-javascript"},{depth:3,value:"Next.js",id:"nextjs"},{depth:2,value:"API Reference",id:"api-reference"},{depth:2,value:"OpenSeadragon",id:"openseadragon"},{depth:3,value:"OpenSeadragon Callback",id:"openseadragon-callback"},{depth:3,value:"OpenSeadragon Configuration",id:"openseadragon-configuration"},{depth:2,value:"Label and ARIA",id:"label-and-aria"},{depth:2,value:"Instance ID",id:"instance-id"}];function p(e){let s=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",code:"code",ul:"ul",li:"li",pre:"pre",span:"span",h3:"h3",h4:"h4",strong:"strong",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Image"}),"\n",(0,r.jsxs)(s.p,{children:["A UI component the renders a pan and deep-zoom Image viewer using ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"}),"."]}),"\n",(0,r.jsx)(t.Z,{href:"https://iiif.io/api/image/3.0",text:["Image"]}),"\n",(0,r.jsx)("div",{style:{height:"38.2vh",minHeight:"450px"},children:(0,r.jsx)(c.Z,{body:{id:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/600,/0/default.jpg",type:"Image",format:"image/tiff",height:5709,width:8949,service:[{"@id":"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace","@type":"ImageService2",profile:"http://iiif.io/api/image/2/level2.json"}]}})}),"\n",(0,r.jsx)(s.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(s.p,{children:["Provide a IIIF Annotation body with the ",(0,r.jsx)(s.code,{children:"type"})," of ",(0,r.jsx)(s.code,{children:"Image"})," and the component:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Renders a single ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"})," instance."]}),"\n",(0,r.jsxs)(s.li,{children:["Returns OpenSeadragon's ",(0,r.jsx)(s.code,{children:"Viewer"})," instance for programmatic control."]}),"\n",(0,r.jsxs)(s.li,{children:["Provides configuration options for OpenSeadragon's ",(0,r.jsx)(s.code,{children:"Viewer"})," instance."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(h.mQ,{items:["npm","yarn","pnpm"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})})]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(s.h3,{id:"react",children:"React"}),"\n",(0,r.jsxs)(s.p,{children:["Add the ",(0,r.jsx)(s.code,{children:"Image"})," component to your ",(0,r.jsx)(s.code,{children:"jsx"})," or ",(0,r.jsx)(s.code,{children:"tsx"})," code."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,r.jsxs)(s.h4,{id:"using-src-and-istiledimage-props",children:["Using ",(0,r.jsx)(s.code,{children:"src"})," and ",(0,r.jsx)(s.code,{children:"isTiledImage"})," props"]}),"\n",(0,r.jsxs)(s.p,{children:["For ",(0,r.jsx)(s.strong,{children:"Tiled Images"}),", render ",(0,r.jsx)(s.code,{children:"Image"})," with a ",(0,r.jsx)(s.code,{children:"src"})," attribute of the IIIF Image service ",(0,r.jsx)(s.code,{children:"id"}),". The ",(0,r.jsx)(s.code,{children:"isTiledImage"})," prop is optional and defaults to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"400px"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}>"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"CloverImage"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isTiledImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)("div",{style:{height:"400px"},children:(0,r.jsx)(c.Z,{src:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace",isTiledImage:!0})})})]}),"\n",(0,r.jsxs)(s.p,{children:["For ",(0,r.jsx)(s.strong,{children:"Simple Images"}),", render ",(0,r.jsx)(s.code,{children:"Image"})," with a ",(0,r.jsx)(s.code,{children:"src"})," attribute of the image, ex: ",(0,r.jsx)(s.code,{children:"https://example.org/image.jpg"}),". The ",(0,r.jsx)(s.code,{children:"isTiledImage"})," must be omitted or set to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"400px"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}>"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"CloverImage"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/1000,/0/default.jpg"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)("div",{style:{height:"400px"},children:(0,r.jsx)(c.Z,{src:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/1000,/0/default.jpg"})})})]}),"\n",(0,r.jsxs)(s.h4,{id:"using-the-iiif-annotation-body",children:["Using the IIIF annotation ",(0,r.jsx)(s.code,{children:"body"})]}),"\n",(0,r.jsxs)(s.p,{children:["When using the IIIF annotation ",(0,r.jsx)(s.code,{children:"body"})," from IIIF Manifest, the ",(0,r.jsx)(s.code,{children:"Image"})," component will render the image based on the IIIF Image service ",(0,r.jsx)(s.code,{children:"id"})," and other properties."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"400px"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}>"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"CloverImage"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/600,/0/default.jpg"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" format"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"image/tiff"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5709"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" width"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"8949"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" service"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@type"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ImageService2"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" profile"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"http://iiif.io/api/image/2/level2.json"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)("div",{style:{height:"400px"},children:(0,r.jsx)(c.Z,{body:{id:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/600,/0/default.jpg",type:"Image",format:"image/tiff",height:5709,width:8949,service:[{"@id":"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace","@type":"ImageService2",profile:"http://iiif.io/api/image/2/level2.json"}]}})})})]}),"\n",(0,r.jsx)(s.h3,{id:"vanilla-javascript",children:"Vanilla JavaScript"}),"\n",(0,r.jsxs)(s.p,{children:["The Viewer can also be implemented in Vanilla Javascript by use of a web component. This web component example sources a registered ",(0,r.jsx)(s.code,{children:""})," web component."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"html","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"html","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"html"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"head"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"title"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">Clover IIIF - Image - Web Component"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"meta"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"charset"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"UTF-8"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"script"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://www.unpkg.com/@samvera/clover-iiif@latest/dist/web-components/index.umd.js"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"height: 400px;"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"clover-image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/7192086f-fbe3-4939-b58a-6a63cddea42f"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"is-tiled-image"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"true"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"aria-label"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"A IIIF Image"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)(c.Z,{})})]}),"\n",(0,r.jsx)(s.h3,{id:"nextjs",children:"Next.js"}),"\n",(0,r.jsxs)(s.p,{children:["Implementation with Next.js requires a ",(0,r.jsx)(s.a,{href:"https://nextjs.org/docs/advanced-features/dynamic-import",children:"dynamic import"})," utilizing ",(0,r.jsx)(s.code,{children:"next/dynamic"}),". This is due to Next's node compilation method creating issue with an ",(0,r.jsx)(s.code,{children:"OpenSeadragon"})," (a dependency of Clover IIIF) assumption of a browser ",(0,r.jsx)(s.code,{children:"document"})," object."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamic "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"next/dynamic"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"dynamic"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((Clover) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Clover"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".Image)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ssr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"api-reference",children:"API Reference"}),"\n",(0,r.jsxs)(s.p,{children:["Note that while that ",(0,r.jsx)(s.code,{children:"src"})," and ",(0,r.jsx)(s.code,{children:"body"})," are both optional, at least one of them must be provided."]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Prop"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Required"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"body"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/#57-content-resources",children:"IIIF Content Resource"})}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"instanceId"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"string"})}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"label"})}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/#label",children:"IIIF Label"})]}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"src"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"string"})}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"openSeadragonCallback"})}),(0,r.jsx)(s.td,{children:"function"}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"openSeadragonConfig"})}),(0,r.jsx)(s.td,{children:"OpenSeadragon.Options"}),(0,r.jsx)(s.td,{children:"No"})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"openseadragon",children:"OpenSeadragon"}),"\n",(0,r.jsx)(s.h3,{id:"openseadragon-callback",children:"OpenSeadragon Callback"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"Image"})," component uses ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"})," to render the image. The ",(0,r.jsx)(s.code,{children:"openSeadragonCallback"})," prop provides a callback function that returns the OpenSeadragon ",(0,r.jsx)(s.code,{children:"Viewer"})," instance. This can be used to programmatically control the viewer from the consuming application."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"handleOpenSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (viewer) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"OpenSeadragon instance is ready"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(viewer);"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{handleOpenSeadragonCallback}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"openseadragon-configuration",children:"OpenSeadragon Configuration"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"openSeadragonConfig"})," prop provides a way to configure the OpenSeadragon ",(0,r.jsx)(s.code,{children:"Viewer"})," instance. This prop accepts an object of ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/docs/OpenSeadragon.html#.Options",children:"OpenSeadragon.Options"}),"."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"openSeadragonConfig"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" showNavigator"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" showRotationControl"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ... other OpenSeadragon options"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openSeadragonConfig"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{openSeadragonConfig}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"label-and-aria",children:"Label and ARIA"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"label"})," prop is used to provide an accessible name for the OpenSeadragon. This is used as the ",(0,r.jsx)(s.code,{children:"aria-label"})," attribute on the viewport element wrapping the OpenSeadragon canvas."]}),"\n",(0,r.jsxs)(s.p,{children:["The label can be a ",(0,r.jsx)(s.code,{children:"string"})," or a valid IIIF Presentation API 3.0 ",(0,r.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/#label",children:"label"}),"."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"label"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Self-Portrait at Eleven Years Old"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"label"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ en"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Self-Portrait at Eleven Years Old"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] }}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"instance-id",children:"Instance ID"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"instanceId"})," prop is used to provide an identifier defined from the consuming application for the OpenSeadragon instance. This is used as the ",(0,r.jsx)(s.code,{children:"id"})," attribute on the viewport element wrapping the OpenSeadragon canvas. ",(0,r.jsx)(s.code,{children:"instanceId"})," is optional and by default the ",(0,r.jsx)(s.code,{children:"Image"})," component will generate a unique identifier."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"instanceId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"my-defined-instance-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"handleOpenSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (viewer) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"viewer"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.id);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// openseadragon-my-defined-instance-id"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"instanceId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{instanceId}"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{handleOpenSeadragonCallback}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})})]})}let k={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(p,{...e})}):p(e)},pageOpts:{filePath:"pages/docs/image.mdx",route:"/docs/image",frontMatter:{title:"Image"},pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Clover IIIF",display:"hidden",theme:{layout:"raw"}},docs:{title:"Documentation",type:"page"},contact:{title:"IIIF Presentation API ↗",type:"page",href:"https://iiif.io/api/presentation",newWindow:!0}}},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Overview",composing:"Composing","--components":{type:"separator",title:"IIIF Components"},image:"Image",scroll:{title:"Scroll",type:"doc"},slider:"Slider",viewer:"Viewer","--primitives":{type:"separator",title:"IIIF Primitives"},homepage:"Homepage",label:"Label",metadata:"Metadata",partOf:"PartOf",requiredStatement:"RequiredStatement",seeAlso:"SeeAlso",summary:"Summary",thumbnail:"Thumbnail",rendering:"Rendering"}},{kind:"MdxPage",name:"composing",route:"/docs/composing",frontMatter:{title:"Getting Started"}},{kind:"MdxPage",name:"homepage",route:"/docs/homepage",frontMatter:{title:"Homepage"}},{kind:"MdxPage",name:"image",route:"/docs/image",frontMatter:{title:"Image"}},{kind:"MdxPage",name:"index",route:"/docs",frontMatter:{title:"Docs"}},{kind:"MdxPage",name:"label",route:"/docs/label",frontMatter:{title:"Label"}},{kind:"MdxPage",name:"metadata",route:"/docs/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"partOf",route:"/docs/partOf",frontMatter:{title:"PartOf"}},{kind:"MdxPage",name:"rendering",route:"/docs/rendering",frontMatter:{title:"Rendering"}},{kind:"MdxPage",name:"requiredStatement",route:"/docs/requiredStatement",frontMatter:{title:"RequiredStatement"}},{kind:"Folder",name:"scroll",route:"/docs/scroll",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/scroll/demo"}]},{kind:"MdxPage",name:"scroll",route:"/docs/scroll",frontMatter:{title:"Scroll"}},{kind:"MdxPage",name:"seeAlso",route:"/docs/seeAlso",frontMatter:{title:"SeeAlso"}},{kind:"Folder",name:"slider",route:"/docs/slider",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/slider/demo"}]},{kind:"MdxPage",name:"slider",route:"/docs/slider",frontMatter:{title:"Slider"}},{kind:"MdxPage",name:"summary",route:"/docs/summary",frontMatter:{title:"Summary"}},{kind:"MdxPage",name:"thumbnail",route:"/docs/thumbnail",frontMatter:{title:"Thumbnail"}},{kind:"Folder",name:"viewer",route:"/docs/viewer",children:[{kind:"Meta",data:{demo:{theme:{layout:"full",sidebar:!1},title:"Demo"}}},{kind:"MdxPage",name:"demo",route:"/docs/viewer/demo"}]},{kind:"MdxPage",name:"viewer",route:"/docs/viewer",frontMatter:{title:"Viewer"}}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Image",headings:x},pageNextRoute:"/docs/image",nextraLayout:l.ZP,themeConfig:o.Z};s.default=(0,i.j)(k)},8398:function(e,s,n){"use strict";var r=n(1527),i=n(5047);let l=n.n(i)()(()=>Promise.all([n.e(104),n.e(196),n.e(829),n.e(129),n.e(593)]).then(n.bind(n,5129)),{loadableGenerated:{webpack:()=>[5129]},ssr:!1});s.Z=e=>(0,r.jsx)(l,{...e})},1762:function(e,s,n){"use strict";var r=n(1527),i=n(1890),l=n.n(i);n(959);var o=n(5455);let a=()=>{let e="#ed1d33",s="#2873ab";return(0,r.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",style:{height:"1rem"},children:[(0,r.jsx)("title",{children:"IIIF Logo"}),(0,r.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,r.jsxs)("g",{transform:"scale(0.1)",children:[(0,r.jsx)("path",{style:{fill:s},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:s},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,r.jsx)("path",{style:{fill:s},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:s},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},t=(0,o.zo)(l(),{display:"inline-flex",flexDirection:"column",textDecoration:"none",alignItems:"center",padding:"0.5rem 0"}),c=(0,o.zo)("span",{display:"inline-flex",alignItems:"center",justifyContent:"center"});s.Z=e=>{let{children:s,href:n,text:i=["Presentation API"]}=e;return(0,r.jsx)(t,{href:n,target:"_blank",className:"nx-flex-col",children:(0,r.jsxs)(c,{className:"nx-gap-2 nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-sm nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",children:[(0,r.jsx)(a,{})," ",i.join(" or ")," ↗"]})})}},5455:function(e,s,n){"use strict";n.d(s,{BC:function(){return i},F4:function(){return a},zo:function(){return l}});var r=n(458);let i={xxs:"(max-width: 349px)",xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 991px)",lg:"(max-width: 90rem)",xl:"(min-width: calc(90rem + 1px))"},{styled:l,css:o,keyframes:a,createTheme:t}=(0,r.Th)({theme:{colors:{primary:"#1a1d1e",primaryMuted:"#26292b",primaryAlt:"#151718",accent:"hsl(".concat(209," 100% 38.2%)"),accentMuted:"hsl(".concat(209," 80% 61.8%)"),accentAlt:"hsl(".concat(209," 80% 30%)"),secondary:"#FFFFFF",secondaryMuted:"#e6e8eb",secondaryAlt:"#c1c8cd"},fontSizes:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},lineHeights:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},sizes:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},space:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},radii:{1:"4px",2:"6px",3:"8px",4:"12px",round:"50%",pill:"9999px"},transitions:{all:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"},zIndices:{1:"100",2:"200",3:"300",4:"400",max:"999"}},media:i})},2188:function(e,s,n){"use strict";n.d(s,{Z:function(){return k}});var r=n(1527),i=n(635),l=n.n(i),o=n(959);let a={position:"relative",top:"-1px",right:"0",backgroundColor:"hsl(var(--nextra-primary-hue), var(--nextra-primary-saturation), 32%)",color:"white",borderRadius:"6px",padding:"2px 4px",fontSize:"0.7222rem",fontWeight:"700",marginLeft:"10px"},t=["Scroll"];var c=e=>{let{title:s}=e;return t.includes(s)?(0,r.jsxs)("span",{children:[s,(0,r.jsx)("span",{style:a,children:"Beta"})]}):(0,r.jsx)("span",{children:s})},h=n(2610),d=n(4750);let x="Clover IIIF",p="Showcase IIIF Manifests as interoperable web content.";var k={darkMode:!0,nextThemes:{defaultTheme:"system"},docsRepositoryBase:"https://github.com/samvera-labs/clover-iiif",footer:{text:"Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source."},useNextSeoProps(){let e=(0,h.ZR)(),s=e.frontMatter.title?"".concat(e.frontMatter.title," – ").concat(x):"".concat(x," – ").concat(p),n=e.frontMatter.description?e.frontMatter.description:p,{route:r}=(0,d.useRouter)(),i=(0,o.useMemo)(()=>new URL(r.endsWith("/")?r:"".concat(r,"/"),"https://samvera-labs.github.io/clover-iiif/").href,[r]);return{defaultTitle:"".concat(x," - ").concat(p),title:s,description:n,canonical:i,openGraph:{url:i,title:s,siteName:"".concat(x," - ").concat(p),images:[{url:"",type:"image/png",width:1200,height:675}]},twitter:{cardType:"summary_large_image"}}},logo:(0,r.jsx)(()=>(0,r.jsxs)("span",{className:"jsx-64174b446b45575f",children:[(0,r.jsxs)("svg",{id:"clover-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.11 8.15",fill:"none",className:"jsx-64174b446b45575f",children:[(0,r.jsx)("path",{fill:"currentColor",d:"m5.66,6.02c-.21.11-.43.21-.65.3s-.51.13-.83.13c-.63,0-1.13-.18-1.48-.55-.36-.37-.53-.9-.53-1.61,0-.46.07-.85.22-1.17.15-.32.36-.57.65-.74.28-.17.63-.26,1.04-.26.31,0,.59.05.83.14.24.1.46.21.66.35.14-.09.26-.21.36-.37.1-.16.16-.33.16-.53,0-.25-.09-.47-.28-.66s-.45-.34-.79-.46c-.34-.11-.76-.17-1.25-.17-.69,0-1.32.15-1.89.45-.57.3-1.03.74-1.36,1.31-.34.57-.5,1.27-.5,2.11,0,.89.17,1.62.52,2.18.35.57.82.99,1.4,1.26.59.27,1.24.41,1.96.41.38,0,.7-.03.96-.1.26-.06.47-.13.61-.19.23-.1.4-.23.49-.38.1-.15.14-.32.14-.5,0-.21-.04-.39-.11-.55-.08-.16-.18-.29-.32-.4Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m7.55,0c-.19,0-.37.01-.53.04s-.29.05-.38.07v6.96c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V.96c0-.38-.09-.63-.26-.76-.18-.13-.46-.2-.86-.2Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m13.93,2.3c-.47-.26-1.02-.38-1.65-.38s-1.17.13-1.64.38c-.47.25-.84.61-1.1,1.07-.26.46-.4,1.01-.4,1.64s.13,1.2.39,1.67c.26.46.63.82,1.1,1.07.47.25,1.02.37,1.66.37s1.19-.13,1.66-.38c.47-.25.83-.61,1.09-1.07.26-.46.39-1.02.39-1.66s-.13-1.17-.4-1.63c-.26-.46-.63-.82-1.1-1.08Zm-.87,3.83c-.18.26-.44.39-.78.39s-.6-.13-.78-.38c-.18-.26-.28-.63-.28-1.13s.09-.85.28-1.11c.19-.26.45-.39.77-.39s.59.13.77.4.28.63.28,1.1-.09.86-.28,1.12Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m20.29,1.98c-.35,0-.67.08-.96.23-.14.69-.29,1.39-.46,2.12s-.33,1.38-.48,1.97h-.06c-.02-.11-.06-.25-.1-.42-.04-.17-.09-.36-.15-.57s-.12-.43-.18-.67l-.47-1.84c-.08-.32-.21-.54-.4-.65-.18-.12-.42-.17-.7-.17-.22,0-.43.04-.62.13s-.34.18-.45.29c.06.29.15.62.27,1.01.12.38.24.78.38,1.19.14.41.27.81.41,1.2.14.39.27.73.4,1.04.12.3.23.54.32.71.09.18.25.3.47.38.23.08.5.12.81.12.27,0,.52-.03.74-.09.22-.06.38-.13.49-.21.12-.22.26-.5.41-.85.15-.35.31-.73.46-1.15.16-.41.3-.82.43-1.21s.23-.75.31-1.06.12-.54.12-.7c0-.3-.1-.5-.29-.62s-.43-.18-.71-.18Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m25.91,2.25c-.42-.22-.92-.33-1.49-.33-.38,0-.74.06-1.1.17-.36.12-.68.29-.97.53-.29.24-.52.55-.69.94-.17.38-.26.84-.26,1.37,0,.71.15,1.3.44,1.78.29.47.69.83,1.19,1.06.5.24,1.06.35,1.69.35.45,0,.84-.04,1.19-.12.34-.08.61-.21.81-.38.2-.17.29-.39.29-.65,0-.16-.04-.31-.13-.46-.09-.14-.2-.26-.32-.34-.18.1-.43.2-.73.29-.3.09-.62.13-.96.13s-.67-.07-.95-.22c-.23-.11-.37-.32-.47-.58l2.96-.44c.27-.04.48-.13.64-.28.15-.14.23-.35.23-.62,0-.5-.12-.93-.36-1.31-.24-.38-.57-.68-1-.9Zm-2.59,2.21c.04-.31.13-.56.31-.74.21-.21.48-.31.8-.31s.53.08.67.24c.14.16.22.32.24.48l-2.02.33Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m30.59,1.93c-.4,0-.79.04-1.16.13-.38.09-.7.22-.98.38-.2.13-.36.28-.49.45-.12.17-.19.37-.19.61v3.56c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V3.82c.17-.1.36-.17.59-.22.22-.05.44-.07.64-.07.14,0,.26,0,.37.01.11,0,.21.02.29.04.06-.09.1-.19.14-.32s.06-.26.06-.4c0-.62-.44-.92-1.31-.92Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m33.91.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m36.24.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m38.57.56c-.12,0-.24.01-.35.03s-.2.04-.25.05v6.76c0,.22.06.37.17.46s.29.14.53.14c.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47s-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m44.63,1.7c.15,0,.27-.05.35-.14.08-.1.13-.23.13-.41,0-.1-.02-.2-.05-.29-.03-.09-.06-.16-.1-.21h-3.98c-.21,0-.38.06-.5.19-.13.12-.19.29-.19.5v6.08c0,.21.06.36.17.45.12.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.05v-2.98h2.64c.15,0,.27-.05.35-.14.08-.1.12-.23.12-.41,0-.1-.01-.2-.04-.29-.03-.09-.06-.16-.09-.22h-2.98s-.01-.01-.01-.01V1.7h3.06Z",className:"jsx-64174b446b45575f"})]}),(0,r.jsx)(l(),{id:"64174b446b45575f",children:"svg.jsx-64174b446b45575f{height:1rem}span.jsx-64174b446b45575f{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-64174b446b45575f:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]}),{}),project:{link:"https://github.com/samvera-labs/clover-iiif"},primaryHue:209,sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1,titleComponent:e=>(0,r.jsx)(c,{...e}),toggleButton:!0}}},5184:function(){}},function(e){e.O(0,[356,101,888,774,179],function(){return e(e.s=37)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[451],{37:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/image",function(){return n(2834)}])},2834:function(e,s,n){"use strict";n.r(s),n.d(s,{__toc:function(){return x},handleOpenSeadragonCallback:function(){return d}});var r=n(1527),i=n(8567),l=n(2610),o=n(2188);n(2897);var a=n(7088),t=n(1762),c=n(8398),h=n(2416);let d=()=>{},x=[{depth:2,value:"Features",id:"features"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Usage",id:"usage"},{depth:3,value:"React",id:"react"},{depth:4,value:"Using src and isTiledImage props",id:"using-src-and-istiledimage-props"},{depth:4,value:"Using the IIIF annotation body",id:"using-the-iiif-annotation-body"},{depth:3,value:"Vanilla JavaScript",id:"vanilla-javascript"},{depth:3,value:"Next.js",id:"nextjs"},{depth:2,value:"API Reference",id:"api-reference"},{depth:2,value:"OpenSeadragon",id:"openseadragon"},{depth:3,value:"OpenSeadragon Callback",id:"openseadragon-callback"},{depth:3,value:"OpenSeadragon Configuration",id:"openseadragon-configuration"},{depth:2,value:"Label and ARIA",id:"label-and-aria"},{depth:2,value:"Instance ID",id:"instance-id"}];function p(e){let s=Object.assign({h1:"h1",p:"p",a:"a",h2:"h2",code:"code",ul:"ul",li:"li",pre:"pre",span:"span",h3:"h3",h4:"h4",strong:"strong",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,a.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h1,{children:"Image"}),"\n",(0,r.jsxs)(s.p,{children:["A UI component the renders a pan and deep-zoom Image viewer using ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"}),"."]}),"\n",(0,r.jsx)(t.Z,{href:"https://iiif.io/api/image/3.0",text:["Image"]}),"\n",(0,r.jsx)("div",{style:{height:"38.2vh",minHeight:"450px"},children:(0,r.jsx)(c.Z,{body:{id:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/600,/0/default.jpg",type:"Image",format:"image/tiff",height:5709,width:8949,service:[{"@id":"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace","@type":"ImageService2",profile:"http://iiif.io/api/image/2/level2.json"}]}})}),"\n",(0,r.jsx)(s.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(s.p,{children:["Provide a IIIF Annotation body with the ",(0,r.jsx)(s.code,{children:"type"})," of ",(0,r.jsx)(s.code,{children:"Image"})," and the component:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Renders a single ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"})," instance."]}),"\n",(0,r.jsxs)(s.li,{children:["Returns OpenSeadragon's ",(0,r.jsx)(s.code,{children:"Viewer"})," instance for programmatic control."]}),"\n",(0,r.jsxs)(s.li,{children:["Provides configuration options for OpenSeadragon's ",(0,r.jsx)(s.code,{children:"Viewer"})," instance."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsxs)(h.mQ,{items:["npm","yarn","pnpm"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})})]}),"\n",(0,r.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,r.jsx)(s.h3,{id:"react",children:"React"}),"\n",(0,r.jsxs)(s.p,{children:["Add the ",(0,r.jsx)(s.code,{children:"Image"})," component to your ",(0,r.jsx)(s.code,{children:"jsx"})," or ",(0,r.jsx)(s.code,{children:"tsx"})," code."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsx)(s.code,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,r.jsxs)(s.h4,{id:"using-src-and-istiledimage-props",children:["Using ",(0,r.jsx)(s.code,{children:"src"})," and ",(0,r.jsx)(s.code,{children:"isTiledImage"})," props"]}),"\n",(0,r.jsxs)(s.p,{children:["For ",(0,r.jsx)(s.strong,{children:"Tiled Images"}),", render ",(0,r.jsx)(s.code,{children:"Image"})," with a ",(0,r.jsx)(s.code,{children:"src"})," attribute of the IIIF Image service ",(0,r.jsx)(s.code,{children:"id"}),". The ",(0,r.jsx)(s.code,{children:"isTiledImage"})," prop is optional and defaults to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"400px"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}>"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"CloverImage"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"isTiledImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)("div",{style:{height:"400px"},children:(0,r.jsx)(c.Z,{src:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace",isTiledImage:!0})})})]}),"\n",(0,r.jsxs)(s.p,{children:["For ",(0,r.jsx)(s.strong,{children:"Simple Images"}),", render ",(0,r.jsx)(s.code,{children:"Image"})," with a ",(0,r.jsx)(s.code,{children:"src"})," attribute of the image, ex: ",(0,r.jsx)(s.code,{children:"https://example.org/image.jpg"}),". The ",(0,r.jsx)(s.code,{children:"isTiledImage"})," must be omitted or set to ",(0,r.jsx)(s.code,{children:"false"}),"."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"400px"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}>"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"CloverImage"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/1000,/0/default.jpg"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)("div",{style:{height:"400px"},children:(0,r.jsx)(c.Z,{src:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/1000,/0/default.jpg"})})})]}),"\n",(0,r.jsxs)(s.h4,{id:"using-the-iiif-annotation-body",children:["Using the IIIF annotation ",(0,r.jsx)(s.code,{children:"body"})]}),"\n",(0,r.jsxs)(s.p,{children:["When using the IIIF annotation ",(0,r.jsx)(s.code,{children:"body"})," from IIIF Manifest, the ",(0,r.jsx)(s.code,{children:"Image"})," component will render the image based on the IIIF Image service ",(0,r.jsx)(s.code,{children:"id"})," and other properties."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"400px"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}>"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"CloverImage"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" id"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/600,/0/default.jpg"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" type"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" format"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"image/tiff"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" height"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"5709"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" width"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"8949"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" service"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@type"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"ImageService2"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" profile"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"http://iiif.io/api/image/2/level2.json"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ]"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)("div",{style:{height:"400px"},children:(0,r.jsx)(c.Z,{body:{id:"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace/full/600,/0/default.jpg",type:"Image",format:"image/tiff",height:5709,width:8949,service:[{"@id":"https://iiif.dc.library.northwestern.edu/iiif/2/6ca016c5-de7f-4373-ae8f-7047fecf6ace","@type":"ImageService2",profile:"http://iiif.io/api/image/2/level2.json"}]}})})})]}),"\n",(0,r.jsx)(s.h3,{id:"vanilla-javascript",children:"Vanilla JavaScript"}),"\n",(0,r.jsxs)(s.p,{children:["The Viewer can also be implemented in Vanilla Javascript by use of a web component. This web component example sources a registered ",(0,r.jsx)(s.code,{children:""})," web component."]}),"\n",(0,r.jsxs)(h.mQ,{items:["Code","Preview"],children:[(0,r.jsx)(h.OK,{children:(0,r.jsx)(s.pre,{"data-language":"html","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"html","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"html"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"head"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"title"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">Clover IIIF - Image - Web Component"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"meta"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"charset"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"UTF-8"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"body"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"script"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://www.unpkg.com/@samvera/clover-iiif@latest/dist/web-components/index.umd.js"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"div"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"style"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"height: 400px;"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:">"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:"clover-image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://iiif.dc.library.northwestern.edu/iiif/2/7192086f-fbe3-4939-b58a-6a63cddea42f"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"is-tiled-image"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"true"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"aria-label"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"A IIIF Image"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:""})]})]})})}),(0,r.jsx)(h.OK,{children:(0,r.jsx)(c.Z,{})})]}),"\n",(0,r.jsx)(s.h3,{id:"nextjs",children:"Next.js"}),"\n",(0,r.jsxs)(s.p,{children:["Implementation with Next.js requires a ",(0,r.jsx)(s.a,{href:"https://nextjs.org/docs/advanced-features/dynamic-import",children:"dynamic import"})," utilizing ",(0,r.jsx)(s.code,{children:"next/dynamic"}),". This is due to Next's node compilation method creating issue with an ",(0,r.jsx)(s.code,{children:"OpenSeadragon"})," (a dependency of Clover IIIF) assumption of a browser ",(0,r.jsx)(s.code,{children:"document"})," object."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamic "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"next/dynamic"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"dynamic"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((Clover) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Clover"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".Image)"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ssr"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"api-reference",children:"API Reference"}),"\n",(0,r.jsxs)(s.p,{children:["Note that while that ",(0,r.jsx)(s.code,{children:"src"})," and ",(0,r.jsx)(s.code,{children:"body"})," are both optional, at least one of them must be provided."]}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Prop"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Required"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"body"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/#57-content-resources",children:"IIIF Content Resource"})}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"instanceId"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"string"})}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"label"})}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:"string"})," or ",(0,r.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/#label",children:"IIIF Label"})]}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"src"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"string"})}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"openSeadragonCallback"})}),(0,r.jsx)(s.td,{children:"function"}),(0,r.jsx)(s.td,{children:"No"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"openSeadragonConfig"})}),(0,r.jsx)(s.td,{children:"OpenSeadragon.Options"}),(0,r.jsx)(s.td,{children:"No"})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"openseadragon",children:"OpenSeadragon"}),"\n",(0,r.jsx)(s.h3,{id:"openseadragon-callback",children:"OpenSeadragon Callback"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"Image"})," component uses ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"})," to render the image. The ",(0,r.jsx)(s.code,{children:"openSeadragonCallback"})," prop provides a callback function that returns the OpenSeadragon ",(0,r.jsx)(s.code,{children:"Viewer"})," instance. This can be used to programmatically control the viewer from the consuming application."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"export"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"handleOpenSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (viewer) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"OpenSeadragon instance is ready"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"(viewer);"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{handleOpenSeadragonCallback}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h3,{id:"openseadragon-configuration",children:"OpenSeadragon Configuration"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"openSeadragonConfig"})," prop provides a way to configure the OpenSeadragon ",(0,r.jsx)(s.code,{children:"Viewer"})," instance. This prop accepts an object of ",(0,r.jsx)(s.a,{href:"https://openseadragon.github.io/docs/OpenSeadragon.html#.Options",children:"OpenSeadragon.Options"}),"."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"openSeadragonConfig"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" showNavigator"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" showRotationControl"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"true"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// ... other OpenSeadragon options"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openSeadragonConfig"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{openSeadragonConfig}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"label-and-aria",children:"Label and ARIA"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"label"})," prop is used to provide an accessible name for the OpenSeadragon. This is used as the ",(0,r.jsx)(s.code,{children:"aria-label"})," attribute on the viewport element wrapping the OpenSeadragon canvas."]}),"\n",(0,r.jsxs)(s.p,{children:["The label can be a ",(0,r.jsx)(s.code,{children:"string"})," or a valid IIIF Presentation API 3.0 ",(0,r.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/#label",children:"label"}),"."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"label"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Self-Portrait at Eleven Years Old"'})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"label"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ en"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ["}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"Self-Portrait at Eleven Years Old"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"] }}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,r.jsx)(s.h2,{id:"instance-id",children:"Instance ID"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"instanceId"})," prop is used to provide an identifier defined from the consuming application for the OpenSeadragon instance. This is used as the ",(0,r.jsx)(s.code,{children:"id"})," attribute on the viewport element wrapping the OpenSeadragon canvas. ",(0,r.jsx)(s.code,{children:"instanceId"})," is optional and by default the ",(0,r.jsx)(s.code,{children:"Image"})," component will generate a unique identifier."]}),"\n",(0,r.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,r.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Image "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/image"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomImage"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"instanceId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"my-defined-instance-id"'}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"handleOpenSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" (viewer) "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"console"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".log"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"viewer"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"?.id);"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-comment)"},children:"// openseadragon-my-defined-instance-id"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" };"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:" "}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Image"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"src"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://ids.lib.harvard.edu/ids/iiif/18772291/full/full/0/default.jpg"'})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"instanceId"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{instanceId}"})]}),"\n",(0,r.jsxs)(s.span,{className:"line",children:[(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"openSeadragonCallback"}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{handleOpenSeadragonCallback}"})]}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" );"})}),"\n",(0,r.jsx)(s.span,{className:"line",children:(0,r.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})})]})}let k={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(p,{...e})}):p(e)},pageOpts:{filePath:"pages/docs/image.mdx",route:"/docs/image",frontMatter:{title:"Image"},pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Clover IIIF",display:"hidden",theme:{layout:"raw"}},docs:{title:"Documentation",type:"page"},contact:{title:"IIIF Presentation API ↗",type:"page",href:"https://iiif.io/api/presentation",newWindow:!0}}},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Overview",composing:"Composing","--components":{type:"separator",title:"IIIF Components"},image:"Image",scroll:{title:"Scroll",type:"doc"},slider:"Slider",viewer:"Viewer","--primitives":{type:"separator",title:"IIIF Primitives"},homepage:"Homepage",label:"Label",metadata:"Metadata",partOf:"PartOf",requiredStatement:"RequiredStatement",seeAlso:"SeeAlso",summary:"Summary",thumbnail:"Thumbnail",rendering:"Rendering"}},{kind:"MdxPage",name:"composing",route:"/docs/composing",frontMatter:{title:"Getting Started"}},{kind:"MdxPage",name:"homepage",route:"/docs/homepage",frontMatter:{title:"Homepage"}},{kind:"MdxPage",name:"image",route:"/docs/image",frontMatter:{title:"Image"}},{kind:"MdxPage",name:"index",route:"/docs",frontMatter:{title:"Docs"}},{kind:"MdxPage",name:"label",route:"/docs/label",frontMatter:{title:"Label"}},{kind:"MdxPage",name:"metadata",route:"/docs/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"partOf",route:"/docs/partOf",frontMatter:{title:"PartOf"}},{kind:"MdxPage",name:"rendering",route:"/docs/rendering",frontMatter:{title:"Rendering"}},{kind:"MdxPage",name:"requiredStatement",route:"/docs/requiredStatement",frontMatter:{title:"RequiredStatement"}},{kind:"Folder",name:"scroll",route:"/docs/scroll",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/scroll/demo"}]},{kind:"MdxPage",name:"scroll",route:"/docs/scroll",frontMatter:{title:"Scroll"}},{kind:"MdxPage",name:"seeAlso",route:"/docs/seeAlso",frontMatter:{title:"SeeAlso"}},{kind:"Folder",name:"slider",route:"/docs/slider",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/slider/demo"}]},{kind:"MdxPage",name:"slider",route:"/docs/slider",frontMatter:{title:"Slider"}},{kind:"MdxPage",name:"summary",route:"/docs/summary",frontMatter:{title:"Summary"}},{kind:"MdxPage",name:"thumbnail",route:"/docs/thumbnail",frontMatter:{title:"Thumbnail"}},{kind:"Folder",name:"viewer",route:"/docs/viewer",children:[{kind:"Meta",data:{demo:{theme:{layout:"full",sidebar:!1},title:"Demo"}}},{kind:"MdxPage",name:"demo",route:"/docs/viewer/demo"}]},{kind:"MdxPage",name:"viewer",route:"/docs/viewer",frontMatter:{title:"Viewer"}}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Image",headings:x},pageNextRoute:"/docs/image",nextraLayout:l.ZP,themeConfig:o.Z};s.default=(0,i.j)(k)},8398:function(e,s,n){"use strict";var r=n(1527),i=n(5047);let l=n.n(i)()(()=>Promise.all([n.e(668),n.e(196),n.e(829),n.e(129),n.e(593)]).then(n.bind(n,5129)),{loadableGenerated:{webpack:()=>[5129]},ssr:!1});s.Z=e=>(0,r.jsx)(l,{...e})},1762:function(e,s,n){"use strict";var r=n(1527),i=n(1890),l=n.n(i);n(959);var o=n(5455);let a=()=>{let e="#ed1d33",s="#2873ab";return(0,r.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",style:{height:"1rem"},children:[(0,r.jsx)("title",{children:"IIIF Logo"}),(0,r.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,r.jsxs)("g",{transform:"scale(0.1)",children:[(0,r.jsx)("path",{style:{fill:s},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:s},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,r.jsx)("path",{style:{fill:s},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:s},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},t=(0,o.zo)(l(),{display:"inline-flex",flexDirection:"column",textDecoration:"none",alignItems:"center",padding:"0.5rem 0"}),c=(0,o.zo)("span",{display:"inline-flex",alignItems:"center",justifyContent:"center"});s.Z=e=>{let{children:s,href:n,text:i=["Presentation API"]}=e;return(0,r.jsx)(t,{href:n,target:"_blank",className:"nx-flex-col",children:(0,r.jsxs)(c,{className:"nx-gap-2 nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-sm nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",children:[(0,r.jsx)(a,{})," ",i.join(" or ")," ↗"]})})}},5455:function(e,s,n){"use strict";n.d(s,{BC:function(){return i},F4:function(){return a},zo:function(){return l}});var r=n(458);let i={xxs:"(max-width: 349px)",xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 991px)",lg:"(max-width: 90rem)",xl:"(min-width: calc(90rem + 1px))"},{styled:l,css:o,keyframes:a,createTheme:t}=(0,r.Th)({theme:{colors:{primary:"#1a1d1e",primaryMuted:"#26292b",primaryAlt:"#151718",accent:"hsl(".concat(209," 100% 38.2%)"),accentMuted:"hsl(".concat(209," 80% 61.8%)"),accentAlt:"hsl(".concat(209," 80% 30%)"),secondary:"#FFFFFF",secondaryMuted:"#e6e8eb",secondaryAlt:"#c1c8cd"},fontSizes:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},lineHeights:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},sizes:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},space:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},radii:{1:"4px",2:"6px",3:"8px",4:"12px",round:"50%",pill:"9999px"},transitions:{all:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"},zIndices:{1:"100",2:"200",3:"300",4:"400",max:"999"}},media:i})},2188:function(e,s,n){"use strict";n.d(s,{Z:function(){return k}});var r=n(1527),i=n(635),l=n.n(i),o=n(959);let a={position:"relative",top:"-1px",right:"0",backgroundColor:"hsl(var(--nextra-primary-hue), var(--nextra-primary-saturation), 32%)",color:"white",borderRadius:"6px",padding:"2px 4px",fontSize:"0.7222rem",fontWeight:"700",marginLeft:"10px"},t=["Scroll"];var c=e=>{let{title:s}=e;return t.includes(s)?(0,r.jsxs)("span",{children:[s,(0,r.jsx)("span",{style:a,children:"Beta"})]}):(0,r.jsx)("span",{children:s})},h=n(2610),d=n(4750);let x="Clover IIIF",p="Showcase IIIF Manifests as interoperable web content.";var k={darkMode:!0,nextThemes:{defaultTheme:"system"},docsRepositoryBase:"https://github.com/samvera-labs/clover-iiif",footer:{text:"Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source."},useNextSeoProps(){let e=(0,h.ZR)(),s=e.frontMatter.title?"".concat(e.frontMatter.title," – ").concat(x):"".concat(x," – ").concat(p),n=e.frontMatter.description?e.frontMatter.description:p,{route:r}=(0,d.useRouter)(),i=(0,o.useMemo)(()=>new URL(r.endsWith("/")?r:"".concat(r,"/"),"https://samvera-labs.github.io/clover-iiif/").href,[r]);return{defaultTitle:"".concat(x," - ").concat(p),title:s,description:n,canonical:i,openGraph:{url:i,title:s,siteName:"".concat(x," - ").concat(p),images:[{url:"",type:"image/png",width:1200,height:675}]},twitter:{cardType:"summary_large_image"}}},logo:(0,r.jsx)(()=>(0,r.jsxs)("span",{className:"jsx-64174b446b45575f",children:[(0,r.jsxs)("svg",{id:"clover-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.11 8.15",fill:"none",className:"jsx-64174b446b45575f",children:[(0,r.jsx)("path",{fill:"currentColor",d:"m5.66,6.02c-.21.11-.43.21-.65.3s-.51.13-.83.13c-.63,0-1.13-.18-1.48-.55-.36-.37-.53-.9-.53-1.61,0-.46.07-.85.22-1.17.15-.32.36-.57.65-.74.28-.17.63-.26,1.04-.26.31,0,.59.05.83.14.24.1.46.21.66.35.14-.09.26-.21.36-.37.1-.16.16-.33.16-.53,0-.25-.09-.47-.28-.66s-.45-.34-.79-.46c-.34-.11-.76-.17-1.25-.17-.69,0-1.32.15-1.89.45-.57.3-1.03.74-1.36,1.31-.34.57-.5,1.27-.5,2.11,0,.89.17,1.62.52,2.18.35.57.82.99,1.4,1.26.59.27,1.24.41,1.96.41.38,0,.7-.03.96-.1.26-.06.47-.13.61-.19.23-.1.4-.23.49-.38.1-.15.14-.32.14-.5,0-.21-.04-.39-.11-.55-.08-.16-.18-.29-.32-.4Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m7.55,0c-.19,0-.37.01-.53.04s-.29.05-.38.07v6.96c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V.96c0-.38-.09-.63-.26-.76-.18-.13-.46-.2-.86-.2Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m13.93,2.3c-.47-.26-1.02-.38-1.65-.38s-1.17.13-1.64.38c-.47.25-.84.61-1.1,1.07-.26.46-.4,1.01-.4,1.64s.13,1.2.39,1.67c.26.46.63.82,1.1,1.07.47.25,1.02.37,1.66.37s1.19-.13,1.66-.38c.47-.25.83-.61,1.09-1.07.26-.46.39-1.02.39-1.66s-.13-1.17-.4-1.63c-.26-.46-.63-.82-1.1-1.08Zm-.87,3.83c-.18.26-.44.39-.78.39s-.6-.13-.78-.38c-.18-.26-.28-.63-.28-1.13s.09-.85.28-1.11c.19-.26.45-.39.77-.39s.59.13.77.4.28.63.28,1.1-.09.86-.28,1.12Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m20.29,1.98c-.35,0-.67.08-.96.23-.14.69-.29,1.39-.46,2.12s-.33,1.38-.48,1.97h-.06c-.02-.11-.06-.25-.1-.42-.04-.17-.09-.36-.15-.57s-.12-.43-.18-.67l-.47-1.84c-.08-.32-.21-.54-.4-.65-.18-.12-.42-.17-.7-.17-.22,0-.43.04-.62.13s-.34.18-.45.29c.06.29.15.62.27,1.01.12.38.24.78.38,1.19.14.41.27.81.41,1.2.14.39.27.73.4,1.04.12.3.23.54.32.71.09.18.25.3.47.38.23.08.5.12.81.12.27,0,.52-.03.74-.09.22-.06.38-.13.49-.21.12-.22.26-.5.41-.85.15-.35.31-.73.46-1.15.16-.41.3-.82.43-1.21s.23-.75.31-1.06.12-.54.12-.7c0-.3-.1-.5-.29-.62s-.43-.18-.71-.18Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m25.91,2.25c-.42-.22-.92-.33-1.49-.33-.38,0-.74.06-1.1.17-.36.12-.68.29-.97.53-.29.24-.52.55-.69.94-.17.38-.26.84-.26,1.37,0,.71.15,1.3.44,1.78.29.47.69.83,1.19,1.06.5.24,1.06.35,1.69.35.45,0,.84-.04,1.19-.12.34-.08.61-.21.81-.38.2-.17.29-.39.29-.65,0-.16-.04-.31-.13-.46-.09-.14-.2-.26-.32-.34-.18.1-.43.2-.73.29-.3.09-.62.13-.96.13s-.67-.07-.95-.22c-.23-.11-.37-.32-.47-.58l2.96-.44c.27-.04.48-.13.64-.28.15-.14.23-.35.23-.62,0-.5-.12-.93-.36-1.31-.24-.38-.57-.68-1-.9Zm-2.59,2.21c.04-.31.13-.56.31-.74.21-.21.48-.31.8-.31s.53.08.67.24c.14.16.22.32.24.48l-2.02.33Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m30.59,1.93c-.4,0-.79.04-1.16.13-.38.09-.7.22-.98.38-.2.13-.36.28-.49.45-.12.17-.19.37-.19.61v3.56c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V3.82c.17-.1.36-.17.59-.22.22-.05.44-.07.64-.07.14,0,.26,0,.37.01.11,0,.21.02.29.04.06-.09.1-.19.14-.32s.06-.26.06-.4c0-.62-.44-.92-1.31-.92Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m33.91.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m36.24.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m38.57.56c-.12,0-.24.01-.35.03s-.2.04-.25.05v6.76c0,.22.06.37.17.46s.29.14.53.14c.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47s-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m44.63,1.7c.15,0,.27-.05.35-.14.08-.1.13-.23.13-.41,0-.1-.02-.2-.05-.29-.03-.09-.06-.16-.1-.21h-3.98c-.21,0-.38.06-.5.19-.13.12-.19.29-.19.5v6.08c0,.21.06.36.17.45.12.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.05v-2.98h2.64c.15,0,.27-.05.35-.14.08-.1.12-.23.12-.41,0-.1-.01-.2-.04-.29-.03-.09-.06-.16-.09-.22h-2.98s-.01-.01-.01-.01V1.7h3.06Z",className:"jsx-64174b446b45575f"})]}),(0,r.jsx)(l(),{id:"64174b446b45575f",children:"svg.jsx-64174b446b45575f{height:1rem}span.jsx-64174b446b45575f{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-64174b446b45575f:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]}),{}),project:{link:"https://github.com/samvera-labs/clover-iiif"},primaryHue:209,sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1,titleComponent:e=>(0,r.jsx)(c,{...e}),toggleButton:!0}}},5184:function(){}},function(e){e.O(0,[356,101,888,774,179],function(){return e(e.s=37)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/docs/scroll-ce2fbc54ac8ca551.js b/_next/static/chunks/pages/docs/scroll-9c77e1abf5a42831.js similarity index 99% rename from _next/static/chunks/pages/docs/scroll-ce2fbc54ac8ca551.js rename to _next/static/chunks/pages/docs/scroll-9c77e1abf5a42831.js index d0a763c0..0395f3b1 100644 --- a/_next/static/chunks/pages/docs/scroll-ce2fbc54ac8ca551.js +++ b/_next/static/chunks/pages/docs/scroll-9c77e1abf5a42831.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[671],{5537:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/scroll",function(){return t(6822)}])},6822:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return h}});var i=t(1527),n=t(8567),r=t(2610),l=t(2188);t(2897);var a=t(7088),o=t(3907),c=t(1762),d=t(2416);let h=[{depth:2,value:"Features",id:"features"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Usage",id:"usage"},{depth:3,value:"React",id:"react"},{depth:3,value:"Next.js",id:"nextjs"},{depth:2,value:"API Reference",id:"api-reference"},{depth:3,value:"Offset",id:"offset"}];function x(e){let s=Object.assign({h1:"h1",p:"p",code:"code",hr:"hr",h2:"h2",a:"a",ul:"ul",li:"li",strong:"strong",pre:"pre",span:"span",h3:"h3",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,a.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"Scroll"}),"\n",(0,i.jsxs)(s.p,{children:["A UI component rendering a vertical scrolling articles that output individual Canvases, basic descriptive properties, and Annotations with ",(0,i.jsx)(s.code,{children:"commenting"})," motivations with support for ",(0,i.jsx)(s.code,{children:"transcribing"})," and ",(0,i.jsx)(s.code,{children:"translating"})," motivations."]}),"\n",(0,i.jsx)(c.Z,{href:"https://iiif.io/api/presentation/3.0/#21-defined-types",text:["Manifest"]}),"\n",(0,i.jsx)(s.hr,{}),"\n",(0,i.jsx)(o.Z,{iiifContent:"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390",options:{offset:90}}),"\n",(0,i.jsx)(s.h2,{id:"features",children:"Features"}),"\n",(0,i.jsxs)(s.p,{children:["Provide a ",(0,i.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/",children:"IIIF Presentation API"})," Manifest and the component:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Renders the Canvases of a IIIF Manifest as HTML5 ",(0,i.jsx)(s.code,{children:"article"})," elements"]}),"\n",(0,i.jsxs)(s.li,{children:["Outputs ",(0,i.jsx)(s.code,{children:"Annotation"})," textual content along with ",(0,i.jsx)(s.code,{children:"OpenSeadragon"})," for images"]}),"\n",(0,i.jsx)(s.li,{children:"Automatically creates a client-side search index for full-text search of Annotations"}),"\n",(0,i.jsxs)(s.li,{children:["Supports vertical scrolling and textual discovery with a fixed ",(0,i.jsx)(s.strong,{children:"Search..."})," input"]}),"\n",(0,i.jsxs)(s.li,{children:["Supports ",(0,i.jsx)(s.code,{children:"commenting"}),", ",(0,i.jsx)(s.code,{children:"transcribing"}),", and ",(0,i.jsx)(s.code,{children:"translating"})," motivations"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsxs)(d.mQ,{items:["npm","yarn","pnpm"],children:[(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})})]}),"\n",(0,i.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsx)(s.h3,{id:"react",children:"React"}),"\n",(0,i.jsxs)(s.p,{children:["Add the ",(0,i.jsx)(s.code,{children:"Scroll"})," component to your ",(0,i.jsx)(s.code,{children:"jsx"})," or ",(0,i.jsx)(s.code,{children:"tsx"})," code."]}),"\n",(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Viewer "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/scroll"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,i.jsxs)(s.p,{children:["Render ",(0,i.jsx)(s.code,{children:"Scroll"})," with a IIIF Manifest URI. The only required prop is the ",(0,i.jsx)(s.code,{children:"iiifContent"}),", which is the URI of the IIIF Manifest."]}),"\n",(0,i.jsxs)(d.mQ,{items:["Code","Preview"],children:[(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})]})})})}),(0,i.jsx)(d.OK,{children:(0,i.jsx)(o.Z,{iiifContent:"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"})})]}),"\n",(0,i.jsx)(s.h3,{id:"nextjs",children:"Next.js"}),"\n",(0,i.jsxs)(s.p,{children:["Implementation with Next.js requires a ",(0,i.jsx)(s.a,{href:"https://nextjs.org/docs/advanced-features/dynamic-import",children:"dynamic import"})," utilizing ",(0,i.jsx)(s.code,{children:"next/dynamic"}),". This is due to Next's node compilation method creating issue with an ",(0,i.jsx)(s.code,{children:"OpenSeadragon"})," (a dependency of Clover IIIF) assumption of a browser ",(0,i.jsx)(s.code,{children:"document"})," object."]}),"\n",(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamic "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"next/dynamic"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"dynamic"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((Clover) "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Clover"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".Scroll)"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ssr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomScroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{iiifContent} />;"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,i.jsx)(s.h2,{id:"api-reference",children:"API Reference"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Scroll"})," can configured through an ",(0,i.jsx)(s.code,{children:"options"})," prop, which will serve as a object for common options."]}),"\n",(0,i.jsxs)(s.table,{children:[(0,i.jsx)(s.thead,{children:(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.th,{children:"Prop"}),(0,i.jsx)(s.th,{children:"Type"}),(0,i.jsx)(s.th,{children:"Required"}),(0,i.jsx)(s.th,{children:"Default"})]})}),(0,i.jsxs)(s.tbody,{children:[(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"iiifContent"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"string"})}),(0,i.jsx)(s.td,{children:"Yes"}),(0,i.jsx)(s.td,{})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"options"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"object"})}),(0,i.jsx)(s.td,{children:"No"}),(0,i.jsx)(s.td,{})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"options.offset"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"number"})}),(0,i.jsx)(s.td,{children:"No"}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"0"})})]})]})]}),"\n",(0,i.jsx)(s.h3,{id:"offset",children:"Offset"}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"options.offset"})," refers to the number of pixels to offset the fixed ",(0,i.jsx)(s.strong,{children:"Search..."})," input when scrolling vertically. This is useful when the ",(0,i.jsx)(s.code,{children:"Scroll"})," is rendered within a page with a fixed header."]}),"\n",(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"'})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"options"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ offset"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"90"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"/>"})})]})})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(x,{...e})}):x(e)},pageOpts:{filePath:"pages/docs/scroll.mdx",route:"/docs/scroll",frontMatter:{title:"Scroll"},pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Clover IIIF",display:"hidden",theme:{layout:"raw"}},docs:{title:"Documentation",type:"page"},contact:{title:"IIIF Presentation API ↗",type:"page",href:"https://iiif.io/api/presentation",newWindow:!0}}},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Overview",composing:"Composing","--components":{type:"separator",title:"IIIF Components"},image:"Image",scroll:{title:"Scroll",type:"doc"},slider:"Slider",viewer:"Viewer","--primitives":{type:"separator",title:"IIIF Primitives"},homepage:"Homepage",label:"Label",metadata:"Metadata",partOf:"PartOf",requiredStatement:"RequiredStatement",seeAlso:"SeeAlso",summary:"Summary",thumbnail:"Thumbnail",rendering:"Rendering"}},{kind:"MdxPage",name:"composing",route:"/docs/composing",frontMatter:{title:"Getting Started"}},{kind:"MdxPage",name:"homepage",route:"/docs/homepage",frontMatter:{title:"Homepage"}},{kind:"MdxPage",name:"image",route:"/docs/image",frontMatter:{title:"Image"}},{kind:"MdxPage",name:"index",route:"/docs",frontMatter:{title:"Docs"}},{kind:"MdxPage",name:"label",route:"/docs/label",frontMatter:{title:"Label"}},{kind:"MdxPage",name:"metadata",route:"/docs/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"partOf",route:"/docs/partOf",frontMatter:{title:"PartOf"}},{kind:"MdxPage",name:"rendering",route:"/docs/rendering",frontMatter:{title:"Rendering"}},{kind:"MdxPage",name:"requiredStatement",route:"/docs/requiredStatement",frontMatter:{title:"RequiredStatement"}},{kind:"Folder",name:"scroll",route:"/docs/scroll",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/scroll/demo"}]},{kind:"MdxPage",name:"scroll",route:"/docs/scroll",frontMatter:{title:"Scroll"}},{kind:"MdxPage",name:"seeAlso",route:"/docs/seeAlso",frontMatter:{title:"SeeAlso"}},{kind:"Folder",name:"slider",route:"/docs/slider",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/slider/demo"}]},{kind:"MdxPage",name:"slider",route:"/docs/slider",frontMatter:{title:"Slider"}},{kind:"MdxPage",name:"summary",route:"/docs/summary",frontMatter:{title:"Summary"}},{kind:"MdxPage",name:"thumbnail",route:"/docs/thumbnail",frontMatter:{title:"Thumbnail"}},{kind:"Folder",name:"viewer",route:"/docs/viewer",children:[{kind:"Meta",data:{demo:{theme:{layout:"full",sidebar:!1},title:"Demo"}}},{kind:"MdxPage",name:"demo",route:"/docs/viewer/demo"}]},{kind:"MdxPage",name:"viewer",route:"/docs/viewer",frontMatter:{title:"Viewer"}}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Scroll",headings:h},pageNextRoute:"/docs/scroll",nextraLayout:r.ZP,themeConfig:l.Z};s.default=(0,n.j)(p)},3907:function(e,s,t){"use strict";var i=t(1527),n=t(959),r=t(5047),l=t.n(r),a=t(4750);let o=l()(()=>Promise.all([t.e(178),t.e(104),t.e(196),t.e(646),t.e(829),t.e(832),t.e(861),t.e(792),t.e(129),t.e(58)]).then(t.bind(t,9058)),{loadableGenerated:{webpack:()=>[9058]},ssr:!1});s.Z=e=>{let{iiifContent:s="http://localhost:3000/manifest/annotations/commenting.json",options:t}=e,[r,l]=(0,n.useState)(),{"iiif-content":c}=(0,a.useRouter)().query;return((0,n.useEffect)(()=>{r?l(c):l(s)},[c]),r)?(0,i.jsx)(o,{iiifContent:r,options:t}):null}},1762:function(e,s,t){"use strict";var i=t(1527),n=t(1890),r=t.n(n);t(959);var l=t(5455);let a=()=>{let e="#ed1d33",s="#2873ab";return(0,i.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",style:{height:"1rem"},children:[(0,i.jsx)("title",{children:"IIIF Logo"}),(0,i.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,i.jsxs)("g",{transform:"scale(0.1)",children:[(0,i.jsx)("path",{style:{fill:s},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:s},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,i.jsx)("path",{style:{fill:s},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:s},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},o=(0,l.zo)(r(),{display:"inline-flex",flexDirection:"column",textDecoration:"none",alignItems:"center",padding:"0.5rem 0"}),c=(0,l.zo)("span",{display:"inline-flex",alignItems:"center",justifyContent:"center"});s.Z=e=>{let{children:s,href:t,text:n=["Presentation API"]}=e;return(0,i.jsx)(o,{href:t,target:"_blank",className:"nx-flex-col",children:(0,i.jsxs)(c,{className:"nx-gap-2 nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-sm nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",children:[(0,i.jsx)(a,{})," ",n.join(" or ")," ↗"]})})}},5455:function(e,s,t){"use strict";t.d(s,{BC:function(){return n},F4:function(){return a},zo:function(){return r}});var i=t(458);let n={xxs:"(max-width: 349px)",xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 991px)",lg:"(max-width: 90rem)",xl:"(min-width: calc(90rem + 1px))"},{styled:r,css:l,keyframes:a,createTheme:o}=(0,i.Th)({theme:{colors:{primary:"#1a1d1e",primaryMuted:"#26292b",primaryAlt:"#151718",accent:"hsl(".concat(209," 100% 38.2%)"),accentMuted:"hsl(".concat(209," 80% 61.8%)"),accentAlt:"hsl(".concat(209," 80% 30%)"),secondary:"#FFFFFF",secondaryMuted:"#e6e8eb",secondaryAlt:"#c1c8cd"},fontSizes:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},lineHeights:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},sizes:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},space:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},radii:{1:"4px",2:"6px",3:"8px",4:"12px",round:"50%",pill:"9999px"},transitions:{all:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"},zIndices:{1:"100",2:"200",3:"300",4:"400",max:"999"}},media:n})},2188:function(e,s,t){"use strict";t.d(s,{Z:function(){return j}});var i=t(1527),n=t(635),r=t.n(n),l=t(959);let a={position:"relative",top:"-1px",right:"0",backgroundColor:"hsl(var(--nextra-primary-hue), var(--nextra-primary-saturation), 32%)",color:"white",borderRadius:"6px",padding:"2px 4px",fontSize:"0.7222rem",fontWeight:"700",marginLeft:"10px"},o=["Scroll"];var c=e=>{let{title:s}=e;return o.includes(s)?(0,i.jsxs)("span",{children:[s,(0,i.jsx)("span",{style:a,children:"Beta"})]}):(0,i.jsx)("span",{children:s})},d=t(2610),h=t(4750);let x="Clover IIIF",p="Showcase IIIF Manifests as interoperable web content.";var j={darkMode:!0,nextThemes:{defaultTheme:"system"},docsRepositoryBase:"https://github.com/samvera-labs/clover-iiif",footer:{text:"Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source."},useNextSeoProps(){let e=(0,d.ZR)(),s=e.frontMatter.title?"".concat(e.frontMatter.title," – ").concat(x):"".concat(x," – ").concat(p),t=e.frontMatter.description?e.frontMatter.description:p,{route:i}=(0,h.useRouter)(),n=(0,l.useMemo)(()=>new URL(i.endsWith("/")?i:"".concat(i,"/"),"https://samvera-labs.github.io/clover-iiif/").href,[i]);return{defaultTitle:"".concat(x," - ").concat(p),title:s,description:t,canonical:n,openGraph:{url:n,title:s,siteName:"".concat(x," - ").concat(p),images:[{url:"",type:"image/png",width:1200,height:675}]},twitter:{cardType:"summary_large_image"}}},logo:(0,i.jsx)(()=>(0,i.jsxs)("span",{className:"jsx-64174b446b45575f",children:[(0,i.jsxs)("svg",{id:"clover-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.11 8.15",fill:"none",className:"jsx-64174b446b45575f",children:[(0,i.jsx)("path",{fill:"currentColor",d:"m5.66,6.02c-.21.11-.43.21-.65.3s-.51.13-.83.13c-.63,0-1.13-.18-1.48-.55-.36-.37-.53-.9-.53-1.61,0-.46.07-.85.22-1.17.15-.32.36-.57.65-.74.28-.17.63-.26,1.04-.26.31,0,.59.05.83.14.24.1.46.21.66.35.14-.09.26-.21.36-.37.1-.16.16-.33.16-.53,0-.25-.09-.47-.28-.66s-.45-.34-.79-.46c-.34-.11-.76-.17-1.25-.17-.69,0-1.32.15-1.89.45-.57.3-1.03.74-1.36,1.31-.34.57-.5,1.27-.5,2.11,0,.89.17,1.62.52,2.18.35.57.82.99,1.4,1.26.59.27,1.24.41,1.96.41.38,0,.7-.03.96-.1.26-.06.47-.13.61-.19.23-.1.4-.23.49-.38.1-.15.14-.32.14-.5,0-.21-.04-.39-.11-.55-.08-.16-.18-.29-.32-.4Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m7.55,0c-.19,0-.37.01-.53.04s-.29.05-.38.07v6.96c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V.96c0-.38-.09-.63-.26-.76-.18-.13-.46-.2-.86-.2Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m13.93,2.3c-.47-.26-1.02-.38-1.65-.38s-1.17.13-1.64.38c-.47.25-.84.61-1.1,1.07-.26.46-.4,1.01-.4,1.64s.13,1.2.39,1.67c.26.46.63.82,1.1,1.07.47.25,1.02.37,1.66.37s1.19-.13,1.66-.38c.47-.25.83-.61,1.09-1.07.26-.46.39-1.02.39-1.66s-.13-1.17-.4-1.63c-.26-.46-.63-.82-1.1-1.08Zm-.87,3.83c-.18.26-.44.39-.78.39s-.6-.13-.78-.38c-.18-.26-.28-.63-.28-1.13s.09-.85.28-1.11c.19-.26.45-.39.77-.39s.59.13.77.4.28.63.28,1.1-.09.86-.28,1.12Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m20.29,1.98c-.35,0-.67.08-.96.23-.14.69-.29,1.39-.46,2.12s-.33,1.38-.48,1.97h-.06c-.02-.11-.06-.25-.1-.42-.04-.17-.09-.36-.15-.57s-.12-.43-.18-.67l-.47-1.84c-.08-.32-.21-.54-.4-.65-.18-.12-.42-.17-.7-.17-.22,0-.43.04-.62.13s-.34.18-.45.29c.06.29.15.62.27,1.01.12.38.24.78.38,1.19.14.41.27.81.41,1.2.14.39.27.73.4,1.04.12.3.23.54.32.71.09.18.25.3.47.38.23.08.5.12.81.12.27,0,.52-.03.74-.09.22-.06.38-.13.49-.21.12-.22.26-.5.41-.85.15-.35.31-.73.46-1.15.16-.41.3-.82.43-1.21s.23-.75.31-1.06.12-.54.12-.7c0-.3-.1-.5-.29-.62s-.43-.18-.71-.18Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m25.91,2.25c-.42-.22-.92-.33-1.49-.33-.38,0-.74.06-1.1.17-.36.12-.68.29-.97.53-.29.24-.52.55-.69.94-.17.38-.26.84-.26,1.37,0,.71.15,1.3.44,1.78.29.47.69.83,1.19,1.06.5.24,1.06.35,1.69.35.45,0,.84-.04,1.19-.12.34-.08.61-.21.81-.38.2-.17.29-.39.29-.65,0-.16-.04-.31-.13-.46-.09-.14-.2-.26-.32-.34-.18.1-.43.2-.73.29-.3.09-.62.13-.96.13s-.67-.07-.95-.22c-.23-.11-.37-.32-.47-.58l2.96-.44c.27-.04.48-.13.64-.28.15-.14.23-.35.23-.62,0-.5-.12-.93-.36-1.31-.24-.38-.57-.68-1-.9Zm-2.59,2.21c.04-.31.13-.56.31-.74.21-.21.48-.31.8-.31s.53.08.67.24c.14.16.22.32.24.48l-2.02.33Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m30.59,1.93c-.4,0-.79.04-1.16.13-.38.09-.7.22-.98.38-.2.13-.36.28-.49.45-.12.17-.19.37-.19.61v3.56c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V3.82c.17-.1.36-.17.59-.22.22-.05.44-.07.64-.07.14,0,.26,0,.37.01.11,0,.21.02.29.04.06-.09.1-.19.14-.32s.06-.26.06-.4c0-.62-.44-.92-1.31-.92Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m33.91.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m36.24.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m38.57.56c-.12,0-.24.01-.35.03s-.2.04-.25.05v6.76c0,.22.06.37.17.46s.29.14.53.14c.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47s-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m44.63,1.7c.15,0,.27-.05.35-.14.08-.1.13-.23.13-.41,0-.1-.02-.2-.05-.29-.03-.09-.06-.16-.1-.21h-3.98c-.21,0-.38.06-.5.19-.13.12-.19.29-.19.5v6.08c0,.21.06.36.17.45.12.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.05v-2.98h2.64c.15,0,.27-.05.35-.14.08-.1.12-.23.12-.41,0-.1-.01-.2-.04-.29-.03-.09-.06-.16-.09-.22h-2.98s-.01-.01-.01-.01V1.7h3.06Z",className:"jsx-64174b446b45575f"})]}),(0,i.jsx)(r(),{id:"64174b446b45575f",children:"svg.jsx-64174b446b45575f{height:1rem}span.jsx-64174b446b45575f{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-64174b446b45575f:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]}),{}),project:{link:"https://github.com/samvera-labs/clover-iiif"},primaryHue:209,sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1,titleComponent:e=>(0,i.jsx)(c,{...e}),toggleButton:!0}}},5184:function(){}},function(e){e.O(0,[356,101,888,774,179],function(){return e(e.s=5537)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[671],{5537:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/scroll",function(){return t(6822)}])},6822:function(e,s,t){"use strict";t.r(s),t.d(s,{__toc:function(){return h}});var i=t(1527),n=t(8567),r=t(2610),l=t(2188);t(2897);var a=t(7088),o=t(3907),c=t(1762),d=t(2416);let h=[{depth:2,value:"Features",id:"features"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Usage",id:"usage"},{depth:3,value:"React",id:"react"},{depth:3,value:"Next.js",id:"nextjs"},{depth:2,value:"API Reference",id:"api-reference"},{depth:3,value:"Offset",id:"offset"}];function x(e){let s=Object.assign({h1:"h1",p:"p",code:"code",hr:"hr",h2:"h2",a:"a",ul:"ul",li:"li",strong:"strong",pre:"pre",span:"span",h3:"h3",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,a.a)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h1,{children:"Scroll"}),"\n",(0,i.jsxs)(s.p,{children:["A UI component rendering a vertical scrolling articles that output individual Canvases, basic descriptive properties, and Annotations with ",(0,i.jsx)(s.code,{children:"commenting"})," motivations with support for ",(0,i.jsx)(s.code,{children:"transcribing"})," and ",(0,i.jsx)(s.code,{children:"translating"})," motivations."]}),"\n",(0,i.jsx)(c.Z,{href:"https://iiif.io/api/presentation/3.0/#21-defined-types",text:["Manifest"]}),"\n",(0,i.jsx)(s.hr,{}),"\n",(0,i.jsx)(o.Z,{iiifContent:"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390",options:{offset:90}}),"\n",(0,i.jsx)(s.h2,{id:"features",children:"Features"}),"\n",(0,i.jsxs)(s.p,{children:["Provide a ",(0,i.jsx)(s.a,{href:"https://iiif.io/api/presentation/3.0/",children:"IIIF Presentation API"})," Manifest and the component:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Renders the Canvases of a IIIF Manifest as HTML5 ",(0,i.jsx)(s.code,{children:"article"})," elements"]}),"\n",(0,i.jsxs)(s.li,{children:["Outputs ",(0,i.jsx)(s.code,{children:"Annotation"})," textual content along with ",(0,i.jsx)(s.code,{children:"OpenSeadragon"})," for images"]}),"\n",(0,i.jsx)(s.li,{children:"Automatically creates a client-side search index for full-text search of Annotations"}),"\n",(0,i.jsxs)(s.li,{children:["Supports vertical scrolling and textual discovery with a fixed ",(0,i.jsx)(s.strong,{children:"Search..."})," input"]}),"\n",(0,i.jsxs)(s.li,{children:["Supports ",(0,i.jsx)(s.code,{children:"commenting"}),", ",(0,i.jsx)(s.code,{children:"transcribing"}),", and ",(0,i.jsx)(s.code,{children:"translating"})," motivations"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsxs)(d.mQ,{items:["npm","yarn","pnpm"],children:[(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"npm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"yarn"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"add"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})}),(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"shell","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"shell","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"pnpm"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"install"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string)"},children:"@samvera/clover-iiif"})]})})})})]}),"\n",(0,i.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,i.jsx)(s.h3,{id:"react",children:"React"}),"\n",(0,i.jsxs)(s.p,{children:["Add the ",(0,i.jsx)(s.code,{children:"Scroll"})," component to your ",(0,i.jsx)(s.code,{children:"jsx"})," or ",(0,i.jsx)(s.code,{children:"tsx"})," code."]}),"\n",(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" Viewer "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif/scroll"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]})})}),"\n",(0,i.jsxs)(s.p,{children:["Render ",(0,i.jsx)(s.code,{children:"Scroll"})," with a IIIF Manifest URI. The only required prop is the ",(0,i.jsx)(s.code,{children:"iiifContent"}),", which is the URI of the IIIF Manifest."]}),"\n",(0,i.jsxs)(d.mQ,{items:["Code","Preview"],children:[(0,i.jsx)(d.OK,{children:(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsx)(s.code,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" />"})]})})})}),(0,i.jsx)(d.OK,{children:(0,i.jsx)(o.Z,{iiifContent:"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"})})]}),"\n",(0,i.jsx)(s.h3,{id:"nextjs",children:"Next.js"}),"\n",(0,i.jsxs)(s.p,{children:["Implementation with Next.js requires a ",(0,i.jsx)(s.a,{href:"https://nextjs.org/docs/advanced-features/dynamic-import",children:"dynamic import"})," utilizing ",(0,i.jsx)(s.code,{children:"next/dynamic"}),". This is due to Next's node compilation method creating issue with an ",(0,i.jsx)(s.code,{children:"OpenSeadragon"})," (a dependency of Clover IIIF) assumption of a browser ",(0,i.jsx)(s.code,{children:"document"})," object."]}),"\n",(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" dynamic "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"from"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"next/dynamic"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"dynamic"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"import"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"@samvera/clover-iiif"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:")"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:".then"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"((Clover) "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Clover"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:".Scroll)"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" ssr"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"false"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-punctuation)"},children:","})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"MyCustomScroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" () "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"=>"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" {"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"const"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"'}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:" "}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"return"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" <"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{iiifContent} />;"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"};"})})]})}),"\n",(0,i.jsx)(s.h2,{id:"api-reference",children:"API Reference"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"Scroll"})," can configured through an ",(0,i.jsx)(s.code,{children:"options"})," prop, which will serve as a object for common options."]}),"\n",(0,i.jsxs)(s.table,{children:[(0,i.jsx)(s.thead,{children:(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.th,{children:"Prop"}),(0,i.jsx)(s.th,{children:"Type"}),(0,i.jsx)(s.th,{children:"Required"}),(0,i.jsx)(s.th,{children:"Default"})]})}),(0,i.jsxs)(s.tbody,{children:[(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"iiifContent"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"string"})}),(0,i.jsx)(s.td,{children:"Yes"}),(0,i.jsx)(s.td,{})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"options"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"object"})}),(0,i.jsx)(s.td,{children:"No"}),(0,i.jsx)(s.td,{})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"options.offset"})}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"number"})}),(0,i.jsx)(s.td,{children:"No"}),(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"0"})})]})]})]}),"\n",(0,i.jsx)(s.h3,{id:"offset",children:"Offset"}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"options.offset"})," refers to the number of pixels to offset the fixed ",(0,i.jsx)(s.strong,{children:"Search..."})," input when scrolling vertically. This is useful when the ",(0,i.jsx)(s.code,{children:"Scroll"})," is rendered within a page with a fixed header."]}),"\n",(0,i.jsx)(s.pre,{"data-language":"jsx","data-theme":"default",children:(0,i.jsxs)(s.code,{"data-language":"jsx","data-theme":"default",children:[(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"<"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"Scroll"})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"iiifContent"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-string-expression)"},children:'"https://digital.lib.utk.edu/assemble/manifest/civilwar/5390"'})]}),"\n",(0,i.jsxs)(s.span,{className:"line",children:[(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-function)"},children:"options"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:"="}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"{{ offset"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-keyword)"},children:":"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-token-constant)"},children:"90"}),(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:" }}"})]}),"\n",(0,i.jsx)(s.span,{className:"line",children:(0,i.jsx)(s.span,{style:{color:"var(--shiki-color-text)"},children:"/>"})})]})})]})}let p={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,a.a)(),e.components);return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(x,{...e})}):x(e)},pageOpts:{filePath:"pages/docs/scroll.mdx",route:"/docs/scroll",frontMatter:{title:"Scroll"},pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Clover IIIF",display:"hidden",theme:{layout:"raw"}},docs:{title:"Documentation",type:"page"},contact:{title:"IIIF Presentation API ↗",type:"page",href:"https://iiif.io/api/presentation",newWindow:!0}}},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Overview",composing:"Composing","--components":{type:"separator",title:"IIIF Components"},image:"Image",scroll:{title:"Scroll",type:"doc"},slider:"Slider",viewer:"Viewer","--primitives":{type:"separator",title:"IIIF Primitives"},homepage:"Homepage",label:"Label",metadata:"Metadata",partOf:"PartOf",requiredStatement:"RequiredStatement",seeAlso:"SeeAlso",summary:"Summary",thumbnail:"Thumbnail",rendering:"Rendering"}},{kind:"MdxPage",name:"composing",route:"/docs/composing",frontMatter:{title:"Getting Started"}},{kind:"MdxPage",name:"homepage",route:"/docs/homepage",frontMatter:{title:"Homepage"}},{kind:"MdxPage",name:"image",route:"/docs/image",frontMatter:{title:"Image"}},{kind:"MdxPage",name:"index",route:"/docs",frontMatter:{title:"Docs"}},{kind:"MdxPage",name:"label",route:"/docs/label",frontMatter:{title:"Label"}},{kind:"MdxPage",name:"metadata",route:"/docs/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"partOf",route:"/docs/partOf",frontMatter:{title:"PartOf"}},{kind:"MdxPage",name:"rendering",route:"/docs/rendering",frontMatter:{title:"Rendering"}},{kind:"MdxPage",name:"requiredStatement",route:"/docs/requiredStatement",frontMatter:{title:"RequiredStatement"}},{kind:"Folder",name:"scroll",route:"/docs/scroll",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/scroll/demo"}]},{kind:"MdxPage",name:"scroll",route:"/docs/scroll",frontMatter:{title:"Scroll"}},{kind:"MdxPage",name:"seeAlso",route:"/docs/seeAlso",frontMatter:{title:"SeeAlso"}},{kind:"Folder",name:"slider",route:"/docs/slider",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/slider/demo"}]},{kind:"MdxPage",name:"slider",route:"/docs/slider",frontMatter:{title:"Slider"}},{kind:"MdxPage",name:"summary",route:"/docs/summary",frontMatter:{title:"Summary"}},{kind:"MdxPage",name:"thumbnail",route:"/docs/thumbnail",frontMatter:{title:"Thumbnail"}},{kind:"Folder",name:"viewer",route:"/docs/viewer",children:[{kind:"Meta",data:{demo:{theme:{layout:"full",sidebar:!1},title:"Demo"}}},{kind:"MdxPage",name:"demo",route:"/docs/viewer/demo"}]},{kind:"MdxPage",name:"viewer",route:"/docs/viewer",frontMatter:{title:"Viewer"}}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Scroll",headings:h},pageNextRoute:"/docs/scroll",nextraLayout:r.ZP,themeConfig:l.Z};s.default=(0,n.j)(p)},3907:function(e,s,t){"use strict";var i=t(1527),n=t(959),r=t(5047),l=t.n(r),a=t(4750);let o=l()(()=>Promise.all([t.e(178),t.e(668),t.e(196),t.e(646),t.e(829),t.e(832),t.e(861),t.e(792),t.e(129),t.e(58)]).then(t.bind(t,9058)),{loadableGenerated:{webpack:()=>[9058]},ssr:!1});s.Z=e=>{let{iiifContent:s="http://localhost:3000/manifest/annotations/commenting.json",options:t}=e,[r,l]=(0,n.useState)(),{"iiif-content":c}=(0,a.useRouter)().query;return((0,n.useEffect)(()=>{r?l(c):l(s)},[c]),r)?(0,i.jsx)(o,{iiifContent:r,options:t}):null}},1762:function(e,s,t){"use strict";var i=t(1527),n=t(1890),r=t.n(n);t(959);var l=t(5455);let a=()=>{let e="#ed1d33",s="#2873ab";return(0,i.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",style:{height:"1rem"},children:[(0,i.jsx)("title",{children:"IIIF Logo"}),(0,i.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,i.jsxs)("g",{transform:"scale(0.1)",children:[(0,i.jsx)("path",{style:{fill:s},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:s},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,i.jsx)("path",{style:{fill:s},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,i.jsx)("path",{style:{fill:s},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,i.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},o=(0,l.zo)(r(),{display:"inline-flex",flexDirection:"column",textDecoration:"none",alignItems:"center",padding:"0.5rem 0"}),c=(0,l.zo)("span",{display:"inline-flex",alignItems:"center",justifyContent:"center"});s.Z=e=>{let{children:s,href:t,text:n=["Presentation API"]}=e;return(0,i.jsx)(o,{href:t,target:"_blank",className:"nx-flex-col",children:(0,i.jsxs)(c,{className:"nx-gap-2 nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-sm nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",children:[(0,i.jsx)(a,{})," ",n.join(" or ")," ↗"]})})}},5455:function(e,s,t){"use strict";t.d(s,{BC:function(){return n},F4:function(){return a},zo:function(){return r}});var i=t(458);let n={xxs:"(max-width: 349px)",xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 991px)",lg:"(max-width: 90rem)",xl:"(min-width: calc(90rem + 1px))"},{styled:r,css:l,keyframes:a,createTheme:o}=(0,i.Th)({theme:{colors:{primary:"#1a1d1e",primaryMuted:"#26292b",primaryAlt:"#151718",accent:"hsl(".concat(209," 100% 38.2%)"),accentMuted:"hsl(".concat(209," 80% 61.8%)"),accentAlt:"hsl(".concat(209," 80% 30%)"),secondary:"#FFFFFF",secondaryMuted:"#e6e8eb",secondaryAlt:"#c1c8cd"},fontSizes:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},lineHeights:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},sizes:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},space:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},radii:{1:"4px",2:"6px",3:"8px",4:"12px",round:"50%",pill:"9999px"},transitions:{all:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"},zIndices:{1:"100",2:"200",3:"300",4:"400",max:"999"}},media:n})},2188:function(e,s,t){"use strict";t.d(s,{Z:function(){return j}});var i=t(1527),n=t(635),r=t.n(n),l=t(959);let a={position:"relative",top:"-1px",right:"0",backgroundColor:"hsl(var(--nextra-primary-hue), var(--nextra-primary-saturation), 32%)",color:"white",borderRadius:"6px",padding:"2px 4px",fontSize:"0.7222rem",fontWeight:"700",marginLeft:"10px"},o=["Scroll"];var c=e=>{let{title:s}=e;return o.includes(s)?(0,i.jsxs)("span",{children:[s,(0,i.jsx)("span",{style:a,children:"Beta"})]}):(0,i.jsx)("span",{children:s})},d=t(2610),h=t(4750);let x="Clover IIIF",p="Showcase IIIF Manifests as interoperable web content.";var j={darkMode:!0,nextThemes:{defaultTheme:"system"},docsRepositoryBase:"https://github.com/samvera-labs/clover-iiif",footer:{text:"Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source."},useNextSeoProps(){let e=(0,d.ZR)(),s=e.frontMatter.title?"".concat(e.frontMatter.title," – ").concat(x):"".concat(x," – ").concat(p),t=e.frontMatter.description?e.frontMatter.description:p,{route:i}=(0,h.useRouter)(),n=(0,l.useMemo)(()=>new URL(i.endsWith("/")?i:"".concat(i,"/"),"https://samvera-labs.github.io/clover-iiif/").href,[i]);return{defaultTitle:"".concat(x," - ").concat(p),title:s,description:t,canonical:n,openGraph:{url:n,title:s,siteName:"".concat(x," - ").concat(p),images:[{url:"",type:"image/png",width:1200,height:675}]},twitter:{cardType:"summary_large_image"}}},logo:(0,i.jsx)(()=>(0,i.jsxs)("span",{className:"jsx-64174b446b45575f",children:[(0,i.jsxs)("svg",{id:"clover-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.11 8.15",fill:"none",className:"jsx-64174b446b45575f",children:[(0,i.jsx)("path",{fill:"currentColor",d:"m5.66,6.02c-.21.11-.43.21-.65.3s-.51.13-.83.13c-.63,0-1.13-.18-1.48-.55-.36-.37-.53-.9-.53-1.61,0-.46.07-.85.22-1.17.15-.32.36-.57.65-.74.28-.17.63-.26,1.04-.26.31,0,.59.05.83.14.24.1.46.21.66.35.14-.09.26-.21.36-.37.1-.16.16-.33.16-.53,0-.25-.09-.47-.28-.66s-.45-.34-.79-.46c-.34-.11-.76-.17-1.25-.17-.69,0-1.32.15-1.89.45-.57.3-1.03.74-1.36,1.31-.34.57-.5,1.27-.5,2.11,0,.89.17,1.62.52,2.18.35.57.82.99,1.4,1.26.59.27,1.24.41,1.96.41.38,0,.7-.03.96-.1.26-.06.47-.13.61-.19.23-.1.4-.23.49-.38.1-.15.14-.32.14-.5,0-.21-.04-.39-.11-.55-.08-.16-.18-.29-.32-.4Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m7.55,0c-.19,0-.37.01-.53.04s-.29.05-.38.07v6.96c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V.96c0-.38-.09-.63-.26-.76-.18-.13-.46-.2-.86-.2Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m13.93,2.3c-.47-.26-1.02-.38-1.65-.38s-1.17.13-1.64.38c-.47.25-.84.61-1.1,1.07-.26.46-.4,1.01-.4,1.64s.13,1.2.39,1.67c.26.46.63.82,1.1,1.07.47.25,1.02.37,1.66.37s1.19-.13,1.66-.38c.47-.25.83-.61,1.09-1.07.26-.46.39-1.02.39-1.66s-.13-1.17-.4-1.63c-.26-.46-.63-.82-1.1-1.08Zm-.87,3.83c-.18.26-.44.39-.78.39s-.6-.13-.78-.38c-.18-.26-.28-.63-.28-1.13s.09-.85.28-1.11c.19-.26.45-.39.77-.39s.59.13.77.4.28.63.28,1.1-.09.86-.28,1.12Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m20.29,1.98c-.35,0-.67.08-.96.23-.14.69-.29,1.39-.46,2.12s-.33,1.38-.48,1.97h-.06c-.02-.11-.06-.25-.1-.42-.04-.17-.09-.36-.15-.57s-.12-.43-.18-.67l-.47-1.84c-.08-.32-.21-.54-.4-.65-.18-.12-.42-.17-.7-.17-.22,0-.43.04-.62.13s-.34.18-.45.29c.06.29.15.62.27,1.01.12.38.24.78.38,1.19.14.41.27.81.41,1.2.14.39.27.73.4,1.04.12.3.23.54.32.71.09.18.25.3.47.38.23.08.5.12.81.12.27,0,.52-.03.74-.09.22-.06.38-.13.49-.21.12-.22.26-.5.41-.85.15-.35.31-.73.46-1.15.16-.41.3-.82.43-1.21s.23-.75.31-1.06.12-.54.12-.7c0-.3-.1-.5-.29-.62s-.43-.18-.71-.18Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m25.91,2.25c-.42-.22-.92-.33-1.49-.33-.38,0-.74.06-1.1.17-.36.12-.68.29-.97.53-.29.24-.52.55-.69.94-.17.38-.26.84-.26,1.37,0,.71.15,1.3.44,1.78.29.47.69.83,1.19,1.06.5.24,1.06.35,1.69.35.45,0,.84-.04,1.19-.12.34-.08.61-.21.81-.38.2-.17.29-.39.29-.65,0-.16-.04-.31-.13-.46-.09-.14-.2-.26-.32-.34-.18.1-.43.2-.73.29-.3.09-.62.13-.96.13s-.67-.07-.95-.22c-.23-.11-.37-.32-.47-.58l2.96-.44c.27-.04.48-.13.64-.28.15-.14.23-.35.23-.62,0-.5-.12-.93-.36-1.31-.24-.38-.57-.68-1-.9Zm-2.59,2.21c.04-.31.13-.56.31-.74.21-.21.48-.31.8-.31s.53.08.67.24c.14.16.22.32.24.48l-2.02.33Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m30.59,1.93c-.4,0-.79.04-1.16.13-.38.09-.7.22-.98.38-.2.13-.36.28-.49.45-.12.17-.19.37-.19.61v3.56c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V3.82c.17-.1.36-.17.59-.22.22-.05.44-.07.64-.07.14,0,.26,0,.37.01.11,0,.21.02.29.04.06-.09.1-.19.14-.32s.06-.26.06-.4c0-.62-.44-.92-1.31-.92Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m33.91.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m36.24.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m38.57.56c-.12,0-.24.01-.35.03s-.2.04-.25.05v6.76c0,.22.06.37.17.46s.29.14.53.14c.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47s-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,i.jsx)("path",{fill:"currentColor",d:"m44.63,1.7c.15,0,.27-.05.35-.14.08-.1.13-.23.13-.41,0-.1-.02-.2-.05-.29-.03-.09-.06-.16-.1-.21h-3.98c-.21,0-.38.06-.5.19-.13.12-.19.29-.19.5v6.08c0,.21.06.36.17.45.12.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.05v-2.98h2.64c.15,0,.27-.05.35-.14.08-.1.12-.23.12-.41,0-.1-.01-.2-.04-.29-.03-.09-.06-.16-.09-.22h-2.98s-.01-.01-.01-.01V1.7h3.06Z",className:"jsx-64174b446b45575f"})]}),(0,i.jsx)(r(),{id:"64174b446b45575f",children:"svg.jsx-64174b446b45575f{height:1rem}span.jsx-64174b446b45575f{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-64174b446b45575f:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]}),{}),project:{link:"https://github.com/samvera-labs/clover-iiif"},primaryHue:209,sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1,titleComponent:e=>(0,i.jsx)(c,{...e}),toggleButton:!0}}},5184:function(){}},function(e){e.O(0,[356,101,888,774,179],function(){return e(e.s=5537)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/docs/scroll/demo-c2b52171da9488f4.js b/_next/static/chunks/pages/docs/scroll/demo-40a111ab9ca160d2.js similarity index 99% rename from _next/static/chunks/pages/docs/scroll/demo-c2b52171da9488f4.js rename to _next/static/chunks/pages/docs/scroll/demo-40a111ab9ca160d2.js index 295fa27b..e878f16e 100644 --- a/_next/static/chunks/pages/docs/scroll/demo-c2b52171da9488f4.js +++ b/_next/static/chunks/pages/docs/scroll/demo-40a111ab9ca160d2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70],{4687:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/scroll/demo",function(){return n(5221)}])},5221:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return m}});var r=n(1527),a=n(8567),i=n(2610),s=n(2188);n(2897);var o=n(7088),l=n(3907);n(1762);var c=n(1405),d=n(3111);let m=[{depth:2,value:"Scroll",id:"scroll"}];function p(e){let t=Object.assign({h2:"h2",p:"p",code:"code",hr:"hr"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"scroll",children:"Scroll"}),"\n",(0,r.jsx)("br",{}),"\n",(0,r.jsx)(c.Z,{href:"/docs/scroll",text:"Docs",size:"small"}),"\n",(0,r.jsx)(d.Z,{placeholder:"IIIF Manifest"}),"\n",(0,r.jsxs)(t.p,{children:["A UI component rendering vertical scrolling articles that output individual Canvases, basic descriptive properties, and Annotations with ",(0,r.jsx)(t.code,{children:"commenting"})," motivations with support for ",(0,r.jsx)(t.code,{children:"transcribing"})," and ",(0,r.jsx)(t.code,{children:"translating"})," motivations."]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(l.Z,{iiifContent:"https://digital.lib.utk.edu/assemble/manifest/civilwar/5756",options:{offset:90}})]})}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)},pageOpts:{filePath:"pages/docs/scroll/demo.mdx",route:"/docs/scroll/demo",pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Clover IIIF",display:"hidden",theme:{layout:"raw"}},docs:{title:"Documentation",type:"page"},contact:{title:"IIIF Presentation API ↗",type:"page",href:"https://iiif.io/api/presentation",newWindow:!0}}},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Overview",composing:"Composing","--components":{type:"separator",title:"IIIF Components"},image:"Image",scroll:{title:"Scroll",type:"doc"},slider:"Slider",viewer:"Viewer","--primitives":{type:"separator",title:"IIIF Primitives"},homepage:"Homepage",label:"Label",metadata:"Metadata",partOf:"PartOf",requiredStatement:"RequiredStatement",seeAlso:"SeeAlso",summary:"Summary",thumbnail:"Thumbnail",rendering:"Rendering"}},{kind:"MdxPage",name:"composing",route:"/docs/composing",frontMatter:{title:"Getting Started"}},{kind:"MdxPage",name:"homepage",route:"/docs/homepage",frontMatter:{title:"Homepage"}},{kind:"MdxPage",name:"image",route:"/docs/image",frontMatter:{title:"Image"}},{kind:"MdxPage",name:"index",route:"/docs",frontMatter:{title:"Docs"}},{kind:"MdxPage",name:"label",route:"/docs/label",frontMatter:{title:"Label"}},{kind:"MdxPage",name:"metadata",route:"/docs/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"partOf",route:"/docs/partOf",frontMatter:{title:"PartOf"}},{kind:"MdxPage",name:"rendering",route:"/docs/rendering",frontMatter:{title:"Rendering"}},{kind:"MdxPage",name:"requiredStatement",route:"/docs/requiredStatement",frontMatter:{title:"RequiredStatement"}},{kind:"Folder",name:"scroll",route:"/docs/scroll",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/scroll/demo"}]},{kind:"MdxPage",name:"scroll",route:"/docs/scroll",frontMatter:{title:"Scroll"}},{kind:"MdxPage",name:"seeAlso",route:"/docs/seeAlso",frontMatter:{title:"SeeAlso"}},{kind:"Folder",name:"slider",route:"/docs/slider",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/slider/demo"}]},{kind:"MdxPage",name:"slider",route:"/docs/slider",frontMatter:{title:"Slider"}},{kind:"MdxPage",name:"summary",route:"/docs/summary",frontMatter:{title:"Summary"}},{kind:"MdxPage",name:"thumbnail",route:"/docs/thumbnail",frontMatter:{title:"Thumbnail"}},{kind:"Folder",name:"viewer",route:"/docs/viewer",children:[{kind:"Meta",data:{demo:{theme:{layout:"full",sidebar:!1},title:"Demo"}}},{kind:"MdxPage",name:"demo",route:"/docs/viewer/demo"}]},{kind:"MdxPage",name:"viewer",route:"/docs/viewer",frontMatter:{title:"Viewer"}}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Demo",headings:m},pageNextRoute:"/docs/scroll/demo",nextraLayout:i.ZP,themeConfig:s.Z};t.default=(0,a.j)(x)},1405:function(e,t,n){"use strict";var r=n(1527),a=n(5455),i=n(1890),s=n.n(i);n(959);let o=(0,a.zo)(s(),{display:"inline-flex",fontSize:"1.47rem",fontWeight:"400",lineHeight:"1.6",borderRadius:"6px",color:"#fff",background:"linear-gradient(130deg, hsl(var(--nextra-primary-hue), 100%, 45%) 0%, hsl(calc(var(--nextra-primary-hue) + 50deg), 100%, 38.2%) 100%)",padding:"0.75rem 1.5rem",gap:"0.5rem",boxShadow:"-15px 0 30px -15px hsl(var(--nextra-primary-hue) 100% 45%), 0 0 30px -15px hsl(235 100% 38.2%), 15px 0 30px -15px hsl(calc(var(--nextra-primary-hue) + 50deg), 100%, 45%)",textShadow:"-1px -1px 2px hsl(var(--nextra-primary-hue), 100%, 10%, 10%)",transition:"all 200ms ease-in-out","&:hover, &:focus":{boxShadow:"-15px 0 30px -15px hsla(var(--nextra-primary-hue), 100%, 45%, 100%), 0 0 30px -15px hsla(235, 100%, 38.2%, 38.2%), 15px 0 30px -15px hsla(calc(var(--nextra-primary-hue) + 10deg), 100%, 85%, 25%)"},variants:{size:{small:{fontSize:"1rem",padding:"0.25rem .75rem"}}},span:{display:"inline-flex",color:"hsla(var(--nextra-primary-hue), 100%, 75%, 61.8%)"}});t.Z=e=>{let{href:t,size:n,text:a}=e;return(0,r.jsxs)(o,{className:"nx-bg-primary-400/10",href:t,size:n,children:[a," ",(0,r.jsx)("span",{children:"→"})]})}},3111:function(e,t,n){"use strict";var r=n(1527),a=n(1332),i=n(959),s=n(5455),o=n(4750);let l=(0,s.zo)("div",{margin:"2rem auto 0",input:{padding:"0.75rem 1.25rem"},label:{display:"none",opacity:"0.5",fontFamily:"inherit"}});t.Z=e=>{var t;let{placeholder:n}=e,[s,c]=(0,i.useState)(""),d=(0,o.useRouter)();return(0,r.jsx)(l,{className:"nextra-search nx-relative",children:(0,r.jsxs)(a.fC,{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),d.push({query:{"iiif-content":s}})},children:[(0,r.jsxs)(a.gN,{name:"iiifContent",onChange:e=>{e.preventDefault(),e.stopPropagation(),c(e.target.value)},children:[(0,r.jsx)(a.__,{children:"IIIF Manifest or Collection"}),(0,r.jsx)(a.oT,{placeholder:n,defaultValue:null==d?void 0:null===(t=d.query)||void 0===t?void 0:t["iiif-content"],className:"nx-block nx-w-full nx-appearance-none nx-rounded-lg nx-px-3 nx-py-2 nx-transition-colors nx-text-base nx-leading-tight md:nx-text-sm nx-bg-black/[.05] dark:nx-bg-gray-50/10 focus:nx-bg-white dark:focus:nx-bg-dark placeholder:nx-text-gray-500 dark:placeholder:nx-text-gray-400 contrast-more:nx-border contrast-more:nx-border-current"})]}),(0,r.jsx)(a.k4,{})]})})}},3907:function(e,t,n){"use strict";var r=n(1527),a=n(959),i=n(5047),s=n.n(i),o=n(4750);let l=s()(()=>Promise.all([n.e(178),n.e(104),n.e(196),n.e(646),n.e(829),n.e(832),n.e(861),n.e(792),n.e(129),n.e(58)]).then(n.bind(n,9058)),{loadableGenerated:{webpack:()=>[9058]},ssr:!1});t.Z=e=>{let{iiifContent:t="http://localhost:3000/manifest/annotations/commenting.json",options:n}=e,[i,s]=(0,a.useState)(),{"iiif-content":c}=(0,o.useRouter)().query;return((0,a.useEffect)(()=>{i?s(c):s(t)},[c]),i)?(0,r.jsx)(l,{iiifContent:i,options:n}):null}},1762:function(e,t,n){"use strict";var r=n(1527),a=n(1890),i=n.n(a);n(959);var s=n(5455);let o=()=>{let e="#ed1d33",t="#2873ab";return(0,r.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",style:{height:"1rem"},children:[(0,r.jsx)("title",{children:"IIIF Logo"}),(0,r.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,r.jsxs)("g",{transform:"scale(0.1)",children:[(0,r.jsx)("path",{style:{fill:t},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:t},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,r.jsx)("path",{style:{fill:t},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:t},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},l=(0,s.zo)(i(),{display:"inline-flex",flexDirection:"column",textDecoration:"none",alignItems:"center",padding:"0.5rem 0"}),c=(0,s.zo)("span",{display:"inline-flex",alignItems:"center",justifyContent:"center"});t.Z=e=>{let{children:t,href:n,text:a=["Presentation API"]}=e;return(0,r.jsx)(l,{href:n,target:"_blank",className:"nx-flex-col",children:(0,r.jsxs)(c,{className:"nx-gap-2 nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-sm nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",children:[(0,r.jsx)(o,{})," ",a.join(" or ")," ↗"]})})}},5455:function(e,t,n){"use strict";n.d(t,{BC:function(){return a},F4:function(){return o},zo:function(){return i}});var r=n(458);let a={xxs:"(max-width: 349px)",xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 991px)",lg:"(max-width: 90rem)",xl:"(min-width: calc(90rem + 1px))"},{styled:i,css:s,keyframes:o,createTheme:l}=(0,r.Th)({theme:{colors:{primary:"#1a1d1e",primaryMuted:"#26292b",primaryAlt:"#151718",accent:"hsl(".concat(209," 100% 38.2%)"),accentMuted:"hsl(".concat(209," 80% 61.8%)"),accentAlt:"hsl(".concat(209," 80% 30%)"),secondary:"#FFFFFF",secondaryMuted:"#e6e8eb",secondaryAlt:"#c1c8cd"},fontSizes:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},lineHeights:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},sizes:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},space:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},radii:{1:"4px",2:"6px",3:"8px",4:"12px",round:"50%",pill:"9999px"},transitions:{all:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"},zIndices:{1:"100",2:"200",3:"300",4:"400",max:"999"}},media:a})},2188:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(1527),a=n(635),i=n.n(a),s=n(959);let o={position:"relative",top:"-1px",right:"0",backgroundColor:"hsl(var(--nextra-primary-hue), var(--nextra-primary-saturation), 32%)",color:"white",borderRadius:"6px",padding:"2px 4px",fontSize:"0.7222rem",fontWeight:"700",marginLeft:"10px"},l=["Scroll"];var c=e=>{let{title:t}=e;return l.includes(t)?(0,r.jsxs)("span",{children:[t,(0,r.jsx)("span",{style:o,children:"Beta"})]}):(0,r.jsx)("span",{children:t})},d=n(2610),m=n(4750);let p="Clover IIIF",x="Showcase IIIF Manifests as interoperable web content.";var u={darkMode:!0,nextThemes:{defaultTheme:"system"},docsRepositoryBase:"https://github.com/samvera-labs/clover-iiif",footer:{text:"Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source."},useNextSeoProps(){let e=(0,d.ZR)(),t=e.frontMatter.title?"".concat(e.frontMatter.title," – ").concat(p):"".concat(p," – ").concat(x),n=e.frontMatter.description?e.frontMatter.description:x,{route:r}=(0,m.useRouter)(),a=(0,s.useMemo)(()=>new URL(r.endsWith("/")?r:"".concat(r,"/"),"https://samvera-labs.github.io/clover-iiif/").href,[r]);return{defaultTitle:"".concat(p," - ").concat(x),title:t,description:n,canonical:a,openGraph:{url:a,title:t,siteName:"".concat(p," - ").concat(x),images:[{url:"",type:"image/png",width:1200,height:675}]},twitter:{cardType:"summary_large_image"}}},logo:(0,r.jsx)(()=>(0,r.jsxs)("span",{className:"jsx-64174b446b45575f",children:[(0,r.jsxs)("svg",{id:"clover-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.11 8.15",fill:"none",className:"jsx-64174b446b45575f",children:[(0,r.jsx)("path",{fill:"currentColor",d:"m5.66,6.02c-.21.11-.43.21-.65.3s-.51.13-.83.13c-.63,0-1.13-.18-1.48-.55-.36-.37-.53-.9-.53-1.61,0-.46.07-.85.22-1.17.15-.32.36-.57.65-.74.28-.17.63-.26,1.04-.26.31,0,.59.05.83.14.24.1.46.21.66.35.14-.09.26-.21.36-.37.1-.16.16-.33.16-.53,0-.25-.09-.47-.28-.66s-.45-.34-.79-.46c-.34-.11-.76-.17-1.25-.17-.69,0-1.32.15-1.89.45-.57.3-1.03.74-1.36,1.31-.34.57-.5,1.27-.5,2.11,0,.89.17,1.62.52,2.18.35.57.82.99,1.4,1.26.59.27,1.24.41,1.96.41.38,0,.7-.03.96-.1.26-.06.47-.13.61-.19.23-.1.4-.23.49-.38.1-.15.14-.32.14-.5,0-.21-.04-.39-.11-.55-.08-.16-.18-.29-.32-.4Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m7.55,0c-.19,0-.37.01-.53.04s-.29.05-.38.07v6.96c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V.96c0-.38-.09-.63-.26-.76-.18-.13-.46-.2-.86-.2Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m13.93,2.3c-.47-.26-1.02-.38-1.65-.38s-1.17.13-1.64.38c-.47.25-.84.61-1.1,1.07-.26.46-.4,1.01-.4,1.64s.13,1.2.39,1.67c.26.46.63.82,1.1,1.07.47.25,1.02.37,1.66.37s1.19-.13,1.66-.38c.47-.25.83-.61,1.09-1.07.26-.46.39-1.02.39-1.66s-.13-1.17-.4-1.63c-.26-.46-.63-.82-1.1-1.08Zm-.87,3.83c-.18.26-.44.39-.78.39s-.6-.13-.78-.38c-.18-.26-.28-.63-.28-1.13s.09-.85.28-1.11c.19-.26.45-.39.77-.39s.59.13.77.4.28.63.28,1.1-.09.86-.28,1.12Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m20.29,1.98c-.35,0-.67.08-.96.23-.14.69-.29,1.39-.46,2.12s-.33,1.38-.48,1.97h-.06c-.02-.11-.06-.25-.1-.42-.04-.17-.09-.36-.15-.57s-.12-.43-.18-.67l-.47-1.84c-.08-.32-.21-.54-.4-.65-.18-.12-.42-.17-.7-.17-.22,0-.43.04-.62.13s-.34.18-.45.29c.06.29.15.62.27,1.01.12.38.24.78.38,1.19.14.41.27.81.41,1.2.14.39.27.73.4,1.04.12.3.23.54.32.71.09.18.25.3.47.38.23.08.5.12.81.12.27,0,.52-.03.74-.09.22-.06.38-.13.49-.21.12-.22.26-.5.41-.85.15-.35.31-.73.46-1.15.16-.41.3-.82.43-1.21s.23-.75.31-1.06.12-.54.12-.7c0-.3-.1-.5-.29-.62s-.43-.18-.71-.18Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m25.91,2.25c-.42-.22-.92-.33-1.49-.33-.38,0-.74.06-1.1.17-.36.12-.68.29-.97.53-.29.24-.52.55-.69.94-.17.38-.26.84-.26,1.37,0,.71.15,1.3.44,1.78.29.47.69.83,1.19,1.06.5.24,1.06.35,1.69.35.45,0,.84-.04,1.19-.12.34-.08.61-.21.81-.38.2-.17.29-.39.29-.65,0-.16-.04-.31-.13-.46-.09-.14-.2-.26-.32-.34-.18.1-.43.2-.73.29-.3.09-.62.13-.96.13s-.67-.07-.95-.22c-.23-.11-.37-.32-.47-.58l2.96-.44c.27-.04.48-.13.64-.28.15-.14.23-.35.23-.62,0-.5-.12-.93-.36-1.31-.24-.38-.57-.68-1-.9Zm-2.59,2.21c.04-.31.13-.56.31-.74.21-.21.48-.31.8-.31s.53.08.67.24c.14.16.22.32.24.48l-2.02.33Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m30.59,1.93c-.4,0-.79.04-1.16.13-.38.09-.7.22-.98.38-.2.13-.36.28-.49.45-.12.17-.19.37-.19.61v3.56c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V3.82c.17-.1.36-.17.59-.22.22-.05.44-.07.64-.07.14,0,.26,0,.37.01.11,0,.21.02.29.04.06-.09.1-.19.14-.32s.06-.26.06-.4c0-.62-.44-.92-1.31-.92Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m33.91.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m36.24.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m38.57.56c-.12,0-.24.01-.35.03s-.2.04-.25.05v6.76c0,.22.06.37.17.46s.29.14.53.14c.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47s-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m44.63,1.7c.15,0,.27-.05.35-.14.08-.1.13-.23.13-.41,0-.1-.02-.2-.05-.29-.03-.09-.06-.16-.1-.21h-3.98c-.21,0-.38.06-.5.19-.13.12-.19.29-.19.5v6.08c0,.21.06.36.17.45.12.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.05v-2.98h2.64c.15,0,.27-.05.35-.14.08-.1.12-.23.12-.41,0-.1-.01-.2-.04-.29-.03-.09-.06-.16-.09-.22h-2.98s-.01-.01-.01-.01V1.7h3.06Z",className:"jsx-64174b446b45575f"})]}),(0,r.jsx)(i(),{id:"64174b446b45575f",children:"svg.jsx-64174b446b45575f{height:1rem}span.jsx-64174b446b45575f{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-64174b446b45575f:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]}),{}),project:{link:"https://github.com/samvera-labs/clover-iiif"},primaryHue:209,sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1,titleComponent:e=>(0,r.jsx)(c,{...e}),toggleButton:!0}}},5184:function(){},525:function(e,t,n){"use strict";n.d(t,{F:function(){return a},e:function(){return i}});var r=n(959);function a(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function i(...e){return(0,r.useCallback)(a(...e),e)}},9474:function(e,t,n){"use strict";n.d(t,{WV:function(){return o},jH:function(){return l}});var r=n(7263),a=n(959),i=n(422),s=n(4092);let o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,a.forwardRef)((e,n)=>{let{asChild:i,...o}=e,l=i?s.g7:t;return(0,a.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,a.createElement)(l,(0,r.Z)({},o,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function l(e,t){e&&(0,i.flushSync)(()=>e.dispatchEvent(t))}},4092:function(e,t,n){"use strict";n.d(t,{g7:function(){return s}});var r=n(7263),a=n(959),i=n(525);let s=(0,a.forwardRef)((e,t)=>{let{children:n,...i}=e,s=a.Children.toArray(n),l=s.find(c);if(l){let e=l.props.children,n=s.map(t=>t!==l?t:a.Children.count(e)>1?a.Children.only(null):(0,a.isValidElement)(e)?e.props.children:null);return(0,a.createElement)(o,(0,r.Z)({},i,{ref:t}),(0,a.isValidElement)(e)?(0,a.cloneElement)(e,void 0,n):null)}return(0,a.createElement)(o,(0,r.Z)({},i,{ref:t}),n)});s.displayName="Slot";let o=(0,a.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,a.isValidElement)(n)?(0,a.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{i(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?(0,i.F)(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});o.displayName="SlotClone";let l=({children:e})=>(0,a.createElement)(a.Fragment,null,e);function c(e){return(0,a.isValidElement)(e)&&e.type===l}}},function(e){e.O(0,[356,101,332,888,774,179],function(){return e(e.s=4687)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70],{4687:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/scroll/demo",function(){return n(5221)}])},5221:function(e,t,n){"use strict";n.r(t),n.d(t,{__toc:function(){return m}});var r=n(1527),a=n(8567),i=n(2610),s=n(2188);n(2897);var o=n(7088),l=n(3907);n(1762);var c=n(1405),d=n(3111);let m=[{depth:2,value:"Scroll",id:"scroll"}];function p(e){let t=Object.assign({h2:"h2",p:"p",code:"code",hr:"hr"},(0,o.a)(),e.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"scroll",children:"Scroll"}),"\n",(0,r.jsx)("br",{}),"\n",(0,r.jsx)(c.Z,{href:"/docs/scroll",text:"Docs",size:"small"}),"\n",(0,r.jsx)(d.Z,{placeholder:"IIIF Manifest"}),"\n",(0,r.jsxs)(t.p,{children:["A UI component rendering vertical scrolling articles that output individual Canvases, basic descriptive properties, and Annotations with ",(0,r.jsx)(t.code,{children:"commenting"})," motivations with support for ",(0,r.jsx)(t.code,{children:"transcribing"})," and ",(0,r.jsx)(t.code,{children:"translating"})," motivations."]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(l.Z,{iiifContent:"https://digital.lib.utk.edu/assemble/manifest/civilwar/5756",options:{offset:90}})]})}let x={MDXContent:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:t}=Object.assign({},(0,o.a)(),e.components);return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)},pageOpts:{filePath:"pages/docs/scroll/demo.mdx",route:"/docs/scroll/demo",pageMap:[{kind:"Meta",data:{index:{type:"page",title:"Clover IIIF",display:"hidden",theme:{layout:"raw"}},docs:{title:"Documentation",type:"page"},contact:{title:"IIIF Presentation API ↗",type:"page",href:"https://iiif.io/api/presentation",newWindow:!0}}},{kind:"Folder",name:"docs",route:"/docs",children:[{kind:"Meta",data:{index:"Overview",composing:"Composing","--components":{type:"separator",title:"IIIF Components"},image:"Image",scroll:{title:"Scroll",type:"doc"},slider:"Slider",viewer:"Viewer","--primitives":{type:"separator",title:"IIIF Primitives"},homepage:"Homepage",label:"Label",metadata:"Metadata",partOf:"PartOf",requiredStatement:"RequiredStatement",seeAlso:"SeeAlso",summary:"Summary",thumbnail:"Thumbnail",rendering:"Rendering"}},{kind:"MdxPage",name:"composing",route:"/docs/composing",frontMatter:{title:"Getting Started"}},{kind:"MdxPage",name:"homepage",route:"/docs/homepage",frontMatter:{title:"Homepage"}},{kind:"MdxPage",name:"image",route:"/docs/image",frontMatter:{title:"Image"}},{kind:"MdxPage",name:"index",route:"/docs",frontMatter:{title:"Docs"}},{kind:"MdxPage",name:"label",route:"/docs/label",frontMatter:{title:"Label"}},{kind:"MdxPage",name:"metadata",route:"/docs/metadata",frontMatter:{title:"Metadata"}},{kind:"MdxPage",name:"partOf",route:"/docs/partOf",frontMatter:{title:"PartOf"}},{kind:"MdxPage",name:"rendering",route:"/docs/rendering",frontMatter:{title:"Rendering"}},{kind:"MdxPage",name:"requiredStatement",route:"/docs/requiredStatement",frontMatter:{title:"RequiredStatement"}},{kind:"Folder",name:"scroll",route:"/docs/scroll",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/scroll/demo"}]},{kind:"MdxPage",name:"scroll",route:"/docs/scroll",frontMatter:{title:"Scroll"}},{kind:"MdxPage",name:"seeAlso",route:"/docs/seeAlso",frontMatter:{title:"SeeAlso"}},{kind:"Folder",name:"slider",route:"/docs/slider",children:[{kind:"Meta",data:{demo:{title:"Demo",theme:{sidebar:!1,layout:"full"}}}},{kind:"MdxPage",name:"demo",route:"/docs/slider/demo"}]},{kind:"MdxPage",name:"slider",route:"/docs/slider",frontMatter:{title:"Slider"}},{kind:"MdxPage",name:"summary",route:"/docs/summary",frontMatter:{title:"Summary"}},{kind:"MdxPage",name:"thumbnail",route:"/docs/thumbnail",frontMatter:{title:"Thumbnail"}},{kind:"Folder",name:"viewer",route:"/docs/viewer",children:[{kind:"Meta",data:{demo:{theme:{layout:"full",sidebar:!1},title:"Demo"}}},{kind:"MdxPage",name:"demo",route:"/docs/viewer/demo"}]},{kind:"MdxPage",name:"viewer",route:"/docs/viewer",frontMatter:{title:"Viewer"}}]},{kind:"MdxPage",name:"index",route:"/"}],flexsearch:{codeblocks:!0},title:"Demo",headings:m},pageNextRoute:"/docs/scroll/demo",nextraLayout:i.ZP,themeConfig:s.Z};t.default=(0,a.j)(x)},1405:function(e,t,n){"use strict";var r=n(1527),a=n(5455),i=n(1890),s=n.n(i);n(959);let o=(0,a.zo)(s(),{display:"inline-flex",fontSize:"1.47rem",fontWeight:"400",lineHeight:"1.6",borderRadius:"6px",color:"#fff",background:"linear-gradient(130deg, hsl(var(--nextra-primary-hue), 100%, 45%) 0%, hsl(calc(var(--nextra-primary-hue) + 50deg), 100%, 38.2%) 100%)",padding:"0.75rem 1.5rem",gap:"0.5rem",boxShadow:"-15px 0 30px -15px hsl(var(--nextra-primary-hue) 100% 45%), 0 0 30px -15px hsl(235 100% 38.2%), 15px 0 30px -15px hsl(calc(var(--nextra-primary-hue) + 50deg), 100%, 45%)",textShadow:"-1px -1px 2px hsl(var(--nextra-primary-hue), 100%, 10%, 10%)",transition:"all 200ms ease-in-out","&:hover, &:focus":{boxShadow:"-15px 0 30px -15px hsla(var(--nextra-primary-hue), 100%, 45%, 100%), 0 0 30px -15px hsla(235, 100%, 38.2%, 38.2%), 15px 0 30px -15px hsla(calc(var(--nextra-primary-hue) + 10deg), 100%, 85%, 25%)"},variants:{size:{small:{fontSize:"1rem",padding:"0.25rem .75rem"}}},span:{display:"inline-flex",color:"hsla(var(--nextra-primary-hue), 100%, 75%, 61.8%)"}});t.Z=e=>{let{href:t,size:n,text:a}=e;return(0,r.jsxs)(o,{className:"nx-bg-primary-400/10",href:t,size:n,children:[a," ",(0,r.jsx)("span",{children:"→"})]})}},3111:function(e,t,n){"use strict";var r=n(1527),a=n(1332),i=n(959),s=n(5455),o=n(4750);let l=(0,s.zo)("div",{margin:"2rem auto 0",input:{padding:"0.75rem 1.25rem"},label:{display:"none",opacity:"0.5",fontFamily:"inherit"}});t.Z=e=>{var t;let{placeholder:n}=e,[s,c]=(0,i.useState)(""),d=(0,o.useRouter)();return(0,r.jsx)(l,{className:"nextra-search nx-relative",children:(0,r.jsxs)(a.fC,{onSubmit:e=>{e.preventDefault(),e.stopPropagation(),d.push({query:{"iiif-content":s}})},children:[(0,r.jsxs)(a.gN,{name:"iiifContent",onChange:e=>{e.preventDefault(),e.stopPropagation(),c(e.target.value)},children:[(0,r.jsx)(a.__,{children:"IIIF Manifest or Collection"}),(0,r.jsx)(a.oT,{placeholder:n,defaultValue:null==d?void 0:null===(t=d.query)||void 0===t?void 0:t["iiif-content"],className:"nx-block nx-w-full nx-appearance-none nx-rounded-lg nx-px-3 nx-py-2 nx-transition-colors nx-text-base nx-leading-tight md:nx-text-sm nx-bg-black/[.05] dark:nx-bg-gray-50/10 focus:nx-bg-white dark:focus:nx-bg-dark placeholder:nx-text-gray-500 dark:placeholder:nx-text-gray-400 contrast-more:nx-border contrast-more:nx-border-current"})]}),(0,r.jsx)(a.k4,{})]})})}},3907:function(e,t,n){"use strict";var r=n(1527),a=n(959),i=n(5047),s=n.n(i),o=n(4750);let l=s()(()=>Promise.all([n.e(178),n.e(668),n.e(196),n.e(646),n.e(829),n.e(832),n.e(861),n.e(792),n.e(129),n.e(58)]).then(n.bind(n,9058)),{loadableGenerated:{webpack:()=>[9058]},ssr:!1});t.Z=e=>{let{iiifContent:t="http://localhost:3000/manifest/annotations/commenting.json",options:n}=e,[i,s]=(0,a.useState)(),{"iiif-content":c}=(0,o.useRouter)().query;return((0,a.useEffect)(()=>{i?s(c):s(t)},[c]),i)?(0,r.jsx)(l,{iiifContent:i,options:n}):null}},1762:function(e,t,n){"use strict";var r=n(1527),a=n(1890),i=n.n(a);n(959);var s=n(5455);let o=()=>{let e="#ed1d33",t="#2873ab";return(0,r.jsxs)("svg",{viewBox:"0 0 493.35999 441.33334",id:"iiif-logo",version:"1.1",style:{height:"1rem"},children:[(0,r.jsx)("title",{children:"IIIF Logo"}),(0,r.jsx)("g",{transform:"matrix(1.3333333,0,0,-1.3333333,0,441.33333)",children:(0,r.jsxs)("g",{transform:"scale(0.1)",children:[(0,r.jsx)("path",{style:{fill:t},d:"M 65.2422,2178.75 775.242,1915 773.992,15 65.2422,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:t},d:"m 804.145,2640.09 c 81.441,-240.91 -26.473,-436.2 -241.04,-436.2 -214.558,0 -454.511,195.29 -535.9527,436.2 -81.4335,240.89 26.4805,436.18 241.0387,436.18 214.567,0 454.512,-195.29 535.954,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"M 1678.58,2178.75 968.578,1915 969.828,15 1678.58,276.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:e},d:"m 935.082,2640.09 c -81.437,-240.91 26.477,-436.2 241.038,-436.2 214.56,0 454.51,195.29 535.96,436.2 81.43,240.89 -26.48,436.18 -241.04,436.18 -214.57,0 -454.52,-195.29 -535.958,-436.18"}),(0,r.jsx)("path",{style:{fill:t},d:"m 1860.24,2178.75 710,-263.75 -1.25,-1900 -708.75,261.25 v 1902.5"}),(0,r.jsx)("path",{style:{fill:t},d:"m 2603.74,2640.09 c 81.45,-240.91 -26.47,-436.2 -241.03,-436.2 -214.58,0 -454.52,195.29 -535.96,436.2 -81.44,240.89 26.48,436.18 241.03,436.18 214.57,0 454.51,-195.29 535.96,-436.18"}),(0,r.jsx)("path",{style:{fill:e},d:"m 3700.24,3310 v -652.5 c 0,0 -230,90 -257.5,-142.5 -2.5,-247.5 0,-336.25 0,-336.25 l 257.5,83.75 V 1690 l -258.61,-92.5 V 262.5 L 2735.24,0 v 2360 c 0,0 -15,850 965,950"})]})})]})},l=(0,s.zo)(i(),{display:"inline-flex",flexDirection:"column",textDecoration:"none",alignItems:"center",padding:"0.5rem 0"}),c=(0,s.zo)("span",{display:"inline-flex",alignItems:"center",justifyContent:"center"});t.Z=e=>{let{children:t,href:n,text:a=["Presentation API"]}=e;return(0,r.jsx)(l,{href:n,target:"_blank",className:"nx-flex-col",children:(0,r.jsxs)(c,{className:"nx-gap-2 nx-h-7 nx-rounded-md nx-px-2 nx-text-left nx-text-sm nx-font-medium nx-text-gray-600 nx-transition-colors dark:nx-text-gray-400 hover:nx-bg-gray-100 hover:nx-text-gray-900 dark:hover:nx-bg-primary-100/5 dark:hover:nx-text-gray-50",children:[(0,r.jsx)(o,{})," ",a.join(" or ")," ↗"]})})}},5455:function(e,t,n){"use strict";n.d(t,{BC:function(){return a},F4:function(){return o},zo:function(){return i}});var r=n(458);let a={xxs:"(max-width: 349px)",xs:"(max-width: 575px)",sm:"(max-width: 767px)",md:"(max-width: 991px)",lg:"(max-width: 90rem)",xl:"(min-width: calc(90rem + 1px))"},{styled:i,css:s,keyframes:o,createTheme:l}=(0,r.Th)({theme:{colors:{primary:"#1a1d1e",primaryMuted:"#26292b",primaryAlt:"#151718",accent:"hsl(".concat(209," 100% 38.2%)"),accentMuted:"hsl(".concat(209," 80% 61.8%)"),accentAlt:"hsl(".concat(209," 80% 30%)"),secondary:"#FFFFFF",secondaryMuted:"#e6e8eb",secondaryAlt:"#c1c8cd"},fontSizes:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},lineHeights:{1:"12px",2:"13px",3:"15px",4:"17px",5:"19px",6:"21px",7:"27px",8:"35px",9:"59px"},sizes:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},space:{1:"5px",2:"10px",3:"15px",4:"20px",5:"25px",6:"35px",7:"45px",8:"65px",9:"80px"},radii:{1:"4px",2:"6px",3:"8px",4:"12px",round:"50%",pill:"9999px"},transitions:{all:"all 300ms cubic-bezier(0.16, 1, 0.3, 1)"},zIndices:{1:"100",2:"200",3:"300",4:"400",max:"999"}},media:a})},2188:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(1527),a=n(635),i=n.n(a),s=n(959);let o={position:"relative",top:"-1px",right:"0",backgroundColor:"hsl(var(--nextra-primary-hue), var(--nextra-primary-saturation), 32%)",color:"white",borderRadius:"6px",padding:"2px 4px",fontSize:"0.7222rem",fontWeight:"700",marginLeft:"10px"},l=["Scroll"];var c=e=>{let{title:t}=e;return l.includes(t)?(0,r.jsxs)("span",{children:[t,(0,r.jsx)("span",{style:o,children:"Beta"})]}):(0,r.jsx)("span",{children:t})},d=n(2610),m=n(4750);let p="Clover IIIF",x="Showcase IIIF Manifests as interoperable web content.";var u={darkMode:!0,nextThemes:{defaultTheme:"system"},docsRepositoryBase:"https://github.com/samvera-labs/clover-iiif",footer:{text:"Extensible IIIF front-end toolkit and Manifest viewer. Accessible. Composable. Open Source."},useNextSeoProps(){let e=(0,d.ZR)(),t=e.frontMatter.title?"".concat(e.frontMatter.title," – ").concat(p):"".concat(p," – ").concat(x),n=e.frontMatter.description?e.frontMatter.description:x,{route:r}=(0,m.useRouter)(),a=(0,s.useMemo)(()=>new URL(r.endsWith("/")?r:"".concat(r,"/"),"https://samvera-labs.github.io/clover-iiif/").href,[r]);return{defaultTitle:"".concat(p," - ").concat(x),title:t,description:n,canonical:a,openGraph:{url:a,title:t,siteName:"".concat(p," - ").concat(x),images:[{url:"",type:"image/png",width:1200,height:675}]},twitter:{cardType:"summary_large_image"}}},logo:(0,r.jsx)(()=>(0,r.jsxs)("span",{className:"jsx-64174b446b45575f",children:[(0,r.jsxs)("svg",{id:"clover-iiif-logo",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 45.11 8.15",fill:"none",className:"jsx-64174b446b45575f",children:[(0,r.jsx)("path",{fill:"currentColor",d:"m5.66,6.02c-.21.11-.43.21-.65.3s-.51.13-.83.13c-.63,0-1.13-.18-1.48-.55-.36-.37-.53-.9-.53-1.61,0-.46.07-.85.22-1.17.15-.32.36-.57.65-.74.28-.17.63-.26,1.04-.26.31,0,.59.05.83.14.24.1.46.21.66.35.14-.09.26-.21.36-.37.1-.16.16-.33.16-.53,0-.25-.09-.47-.28-.66s-.45-.34-.79-.46c-.34-.11-.76-.17-1.25-.17-.69,0-1.32.15-1.89.45-.57.3-1.03.74-1.36,1.31-.34.57-.5,1.27-.5,2.11,0,.89.17,1.62.52,2.18.35.57.82.99,1.4,1.26.59.27,1.24.41,1.96.41.38,0,.7-.03.96-.1.26-.06.47-.13.61-.19.23-.1.4-.23.49-.38.1-.15.14-.32.14-.5,0-.21-.04-.39-.11-.55-.08-.16-.18-.29-.32-.4Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m7.55,0c-.19,0-.37.01-.53.04s-.29.05-.38.07v6.96c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V.96c0-.38-.09-.63-.26-.76-.18-.13-.46-.2-.86-.2Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m13.93,2.3c-.47-.26-1.02-.38-1.65-.38s-1.17.13-1.64.38c-.47.25-.84.61-1.1,1.07-.26.46-.4,1.01-.4,1.64s.13,1.2.39,1.67c.26.46.63.82,1.1,1.07.47.25,1.02.37,1.66.37s1.19-.13,1.66-.38c.47-.25.83-.61,1.09-1.07.26-.46.39-1.02.39-1.66s-.13-1.17-.4-1.63c-.26-.46-.63-.82-1.1-1.08Zm-.87,3.83c-.18.26-.44.39-.78.39s-.6-.13-.78-.38c-.18-.26-.28-.63-.28-1.13s.09-.85.28-1.11c.19-.26.45-.39.77-.39s.59.13.77.4.28.63.28,1.1-.09.86-.28,1.12Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m20.29,1.98c-.35,0-.67.08-.96.23-.14.69-.29,1.39-.46,2.12s-.33,1.38-.48,1.97h-.06c-.02-.11-.06-.25-.1-.42-.04-.17-.09-.36-.15-.57s-.12-.43-.18-.67l-.47-1.84c-.08-.32-.21-.54-.4-.65-.18-.12-.42-.17-.7-.17-.22,0-.43.04-.62.13s-.34.18-.45.29c.06.29.15.62.27,1.01.12.38.24.78.38,1.19.14.41.27.81.41,1.2.14.39.27.73.4,1.04.12.3.23.54.32.71.09.18.25.3.47.38.23.08.5.12.81.12.27,0,.52-.03.74-.09.22-.06.38-.13.49-.21.12-.22.26-.5.41-.85.15-.35.31-.73.46-1.15.16-.41.3-.82.43-1.21s.23-.75.31-1.06.12-.54.12-.7c0-.3-.1-.5-.29-.62s-.43-.18-.71-.18Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m25.91,2.25c-.42-.22-.92-.33-1.49-.33-.38,0-.74.06-1.1.17-.36.12-.68.29-.97.53-.29.24-.52.55-.69.94-.17.38-.26.84-.26,1.37,0,.71.15,1.3.44,1.78.29.47.69.83,1.19,1.06.5.24,1.06.35,1.69.35.45,0,.84-.04,1.19-.12.34-.08.61-.21.81-.38.2-.17.29-.39.29-.65,0-.16-.04-.31-.13-.46-.09-.14-.2-.26-.32-.34-.18.1-.43.2-.73.29-.3.09-.62.13-.96.13s-.67-.07-.95-.22c-.23-.11-.37-.32-.47-.58l2.96-.44c.27-.04.48-.13.64-.28.15-.14.23-.35.23-.62,0-.5-.12-.93-.36-1.31-.24-.38-.57-.68-1-.9Zm-2.59,2.21c.04-.31.13-.56.31-.74.21-.21.48-.31.8-.31s.53.08.67.24c.14.16.22.32.24.48l-2.02.33Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m30.59,1.93c-.4,0-.79.04-1.16.13-.38.09-.7.22-.98.38-.2.13-.36.28-.49.45-.12.17-.19.37-.19.61v3.56c0,.37.09.62.27.76.18.14.47.2.86.2.19,0,.37-.01.53-.04.16-.02.29-.05.38-.07V3.82c.17-.1.36-.17.59-.22.22-.05.44-.07.64-.07.14,0,.26,0,.37.01.11,0,.21.02.29.04.06-.09.1-.19.14-.32s.06-.26.06-.4c0-.62-.44-.92-1.31-.92Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m33.91.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m36.24.56c-.12,0-.24.01-.35.03-.11.02-.2.04-.25.05v6.76c0,.22.06.37.17.46.11.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47-.11-.09-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m38.57.56c-.12,0-.24.01-.35.03s-.2.04-.25.05v6.76c0,.22.06.37.17.46s.29.14.53.14c.12,0,.24,0,.35-.03.11-.02.19-.04.24-.07V1.16c0-.22-.05-.38-.16-.47s-.28-.13-.52-.13Z",className:"jsx-64174b446b45575f"}),(0,r.jsx)("path",{fill:"currentColor",d:"m44.63,1.7c.15,0,.27-.05.35-.14.08-.1.13-.23.13-.41,0-.1-.02-.2-.05-.29-.03-.09-.06-.16-.1-.21h-3.98c-.21,0-.38.06-.5.19-.13.12-.19.29-.19.5v6.08c0,.21.06.36.17.45.12.09.29.14.53.14.12,0,.24,0,.35-.03.11-.02.19-.04.24-.05v-2.98h2.64c.15,0,.27-.05.35-.14.08-.1.12-.23.12-.41,0-.1-.01-.2-.04-.29-.03-.09-.06-.16-.09-.22h-2.98s-.01-.01-.01-.01V1.7h3.06Z",className:"jsx-64174b446b45575f"})]}),(0,r.jsx)(i(),{id:"64174b446b45575f",children:"svg.jsx-64174b446b45575f{height:1rem}span.jsx-64174b446b45575f{padding:.5rem .5rem .5rem 0;-webkit-mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-webkit-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-moz-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:-o-linear-gradient(30deg,black 25%,rgba(0,0,0,.2)50%,black 75%);mask-image:linear-gradient(60deg,black 25%,rgba(0,0,0,.2)50%,black 75%);-webkit-mask-size:400%;mask-size:400%;-webkit-mask-position:0%;mask-position:0%}span.jsx-64174b446b45575f:hover{-webkit-mask-position:100%;mask-position:100%;-webkit-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-moz-transition:mask-position 1s ease,-webkit-mask-position 1s ease;-o-transition:mask-position 1s ease,-webkit-mask-position 1s ease;transition:mask-position 1s ease,-webkit-mask-position 1s ease}"})]}),{}),project:{link:"https://github.com/samvera-labs/clover-iiif"},primaryHue:209,sidebar:{autoCollapse:!0,defaultMenuCollapseLevel:1,titleComponent:e=>(0,r.jsx)(c,{...e}),toggleButton:!0}}},5184:function(){},525:function(e,t,n){"use strict";n.d(t,{F:function(){return a},e:function(){return i}});var r=n(959);function a(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function i(...e){return(0,r.useCallback)(a(...e),e)}},9474:function(e,t,n){"use strict";n.d(t,{WV:function(){return o},jH:function(){return l}});var r=n(7263),a=n(959),i=n(422),s=n(4092);let o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,a.forwardRef)((e,n)=>{let{asChild:i,...o}=e,l=i?s.g7:t;return(0,a.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,a.createElement)(l,(0,r.Z)({},o,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function l(e,t){e&&(0,i.flushSync)(()=>e.dispatchEvent(t))}},4092:function(e,t,n){"use strict";n.d(t,{g7:function(){return s}});var r=n(7263),a=n(959),i=n(525);let s=(0,a.forwardRef)((e,t)=>{let{children:n,...i}=e,s=a.Children.toArray(n),l=s.find(c);if(l){let e=l.props.children,n=s.map(t=>t!==l?t:a.Children.count(e)>1?a.Children.only(null):(0,a.isValidElement)(e)?e.props.children:null);return(0,a.createElement)(o,(0,r.Z)({},i,{ref:t}),(0,a.isValidElement)(e)?(0,a.cloneElement)(e,void 0,n):null)}return(0,a.createElement)(o,(0,r.Z)({},i,{ref:t}),n)});s.displayName="Slot";let o=(0,a.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,a.isValidElement)(n)?(0,a.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...e)=>{i(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...i}:"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?(0,i.F)(t,n.ref):n.ref}):a.Children.count(n)>1?a.Children.only(null):null});o.displayName="SlotClone";let l=({children:e})=>(0,a.createElement)(a.Fragment,null,e);function c(e){return(0,a.isValidElement)(e)&&e.type===l}}},function(e){e.O(0,[356,101,332,888,774,179],function(){return e(e.s=4687)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/docs/viewer-3d8cbfa96e14f7f3.js b/_next/static/chunks/pages/docs/viewer-e33304bf8fbb32bc.js similarity index 99% rename from _next/static/chunks/pages/docs/viewer-3d8cbfa96e14f7f3.js rename to _next/static/chunks/pages/docs/viewer-e33304bf8fbb32bc.js index 34158967..164b7d8b 100644 --- a/_next/static/chunks/pages/docs/viewer-3d8cbfa96e14f7f3.js +++ b/_next/static/chunks/pages/docs/viewer-e33304bf8fbb32bc.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81],{2813:function(s,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/docs/viewer",function(){return n(2731)}])},2731:function(s,e,n){"use strict";n.r(e),n.d(e,{__toc:function(){return d}});var i=n(1527),r=n(8567),l=n(2610),o=n(2188);n(2897);var t=n(7088),a=n(2712),c=n(1762),h=n(2416);let d=[{depth:2,value:"Features",id:"features"},{depth:2,value:"Installation",id:"installation"},{depth:2,value:"Usage",id:"usage"},{depth:3,value:"React",id:"react"},{depth:3,value:"Vanilla JavaScript",id:"vanilla-javascript"},{depth:3,value:"Next.js",id:"nextjs"},{depth:2,value:"API Reference",id:"api-reference"},{depth:3,value:"Canvas Height",id:"canvas-height"},{depth:4,value:"Automatic Height",id:"automatic-height"},{depth:3,value:"Information Panel",id:"information-panel"},{depth:3,value:"Auto Scroll",id:"auto-scroll"},{depth:3,value:"Custom Displays",id:"custom-displays"},{depth:3,value:"Deprecated Options",id:"deprecated-options"},{depth:3,value:"Basic Configuration",id:"basic-configuration"},{depth:3,value:"Active Canvas",id:"active-canvas"},{depth:3,value:"Captions",id:"captions"},{depth:3,value:"Custom Theme",id:"custom-theme"},{depth:4,value:"CSS Classes",id:"css-classes"},{depth:3,value:"Request Headers",id:"request-headers"},{depth:3,value:"Custom canvas displays",id:"custom-canvas-displays"}];function x(s){let e=Object.assign({h1:"h1",p:"p",code:"code",a:"a",hr:"hr",h2:"h2",ul:"ul",li:"li",em:"em",pre:"pre",span:"span",h3:"h3",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",h4:"h4",strong:"strong"},(0,t.a)(),s.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.h1,{children:"Viewer"}),"\n",(0,i.jsxs)(e.p,{children:["A UI component that renders a multicanvas IIIF item viewer with pan-zoom support for ",(0,i.jsx)(e.code,{children:"Image"})," via ",(0,i.jsx)(e.a,{href:"https://openseadragon.github.io/",children:"OpenSeadragon"})," and ",(0,i.jsx)(e.code,{children:"Video"})," and ",(0,i.jsx)(e.code,{children:"Sound"})," content resources using the ",(0,i.jsx)(e.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video",children:"HTML video element"}),"."]}),"\n",(0,i.jsx)(c.Z,{href:"https://iiif.io/api/presentation/3.0/#21-defined-types",text:["Manifest","Collection"]}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(a.Z,{iiifContent:"https://api.dc.library.northwestern.edu/api/v2/works/8a833741-74a8-40dc-bd1d-c416a3b1bb38?as=iiif",options:{showIIIFBadge:!1,informationPanel:{open:!1}}}),"\n",(0,i.jsx)(e.h2,{id:"features",children:"Features"}),"\n",(0,i.jsxs)(e.p,{children:["Provide a ",(0,i.jsx)(e.a,{href:"https://iiif.io/api/presentation/3.0/",children:"IIIF Presentation API"})," Manifest or Collection and the component:"]}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:["Renders a multi-canvas ",(0,i.jsx)(e.em,{children:"Video"}),", ",(0,i.jsx)(e.em,{children:"Sound"}),", and ",(0,i.jsx)(e.em,{children:"Image"})," viewer"]}),"\n",(0,i.jsx)(e.li,{children:"Renders thumbnails as navigation between canvases"}),"\n",(0,i.jsxs)(e.li,{children:["Renders annotations with the ",(0,i.jsx)(e.a,{href:"https://iiif.io/api/presentation/3.0/#values-for-motivation",children:"motivation"})," of ",(0,i.jsx)(e.code,{children:"supplementing"})," with a content resource having the format of ",(0,i.jsx)(e.code,{children:"text/vtt"})," for ",(0,i.jsx)(e.em,{children:"Video"})," and ",(0,i.jsx)(e.em,{children:"Sound"})]}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.em,{children:"Video"})," and ",(0,i.jsx)(e.em,{children:"Sound"})," are rendered within a HTML5 ",(0,i.jsx)(e.code,{children:"