diff --git a/.vscode/settings.json b/.vscode/settings.json
index b96a6379d..285d055ea 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -8,4 +8,6 @@
"**/*.js": { "when": "$(basename).ts"},
"**/*.js.map": true
}
+,
+"typescript.check.workspaceVersion": false
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 1b062f6df..7be603beb 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,10 @@
# Universal Viewer
-[![Build Status](https://travis-ci.org/UniversalViewer/universalviewer.svg?branch=master)](https://travis-ci.org/UniversalViewer/universalviewer) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/UniversalViewer/universalviewer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![Build Status](https://travis-ci.org/UniversalViewer/universalviewer.svg?branch=master)](https://travis-ci.org/UniversalViewer/universalviewer)
+
+
- npm install universalviewer
-
-or
-
- bower install uv
+ npm install universalviewer --save
[Examples](http://universalviewer.io/examples/)
@@ -16,25 +14,20 @@ or
## Contributors
-![Wellcome Library](https://raw.githubusercontent.com/UniversalViewer/assets/master/wellcome_logo.png "Wellcome Library")
-![British Library](https://raw.githubusercontent.com/UniversalViewer/assets/master/bl_logo.png "British Library")
-![National Library of Wales](https://raw.githubusercontent.com/UniversalViewer/assets/master/nlw_logo.png "National Library of Wales")
-![Villanova University, Falvey Memorial Library](https://raw.githubusercontent.com/UniversalViewer/assets/master/vufalvey_logo.png "Villanova University, Falvey Memorial Library")
-![Riksarkivet](https://raw.githubusercontent.com/Riksarkivet/assets/master/logo-en.png "Riksarkivet, The Swedish National Archives")
-
-## About
+![Contributors](https://raw.githubusercontent.com/UniversalViewer/assets/master/logos.jpg "Contributors")
-The Universal Viewer is an [open source](https://github.com/UniversalViewer/universalviewer/blob/master/LICENSE.txt) project to enable cultural heritage institutions to present their digital artifacts in an [IIIF-compliant](http://iiif.io/) and highly customisable user interface.
+## Features:
-Features:
-
-- [OpenSeadragon](https://openseadragon.github.io/) image zooming using the [IIIF image API](http://iiif.io/api/image/2.0/).
-- YouTube-style embedding with deep links to specific pages/zoom regions.
-- [Themable](https://universalviewer.gitbooks.io/custom-themes/content/), fork the [UV theme](https://github.com/UniversalViewer/uv-en-GB-theme) on github to create your own.
-- Highly [configurable](https://github.com/UniversalViewer/universalviewer/wiki/Configuration) and [extensible](http://universalviewer.gitbooks.io/custom-extensions/content/).
-- Supports "IxIF" out of the box, allowing [3D](http://universalviewer.io/examples/?manifest=http://files.universalviewer.io/manifests/nelis/ecorche.json), [audio](http://universalviewer.io/examples/?manifest=http://wellcomelibrary.org/iiif/b17307922/manifest), [video](http://universalviewer.io/examples/?manifest=http://wellcomelibrary.org/iiif/b16659090/manifest), and [pdf](http://universalviewer.io/examples/?manifest=http://wellcomelibrary.org/iiif/b17502792/manifest) viewing experiences.
-- Supports search and autocomplete service integration with overlayed search results.
-- Internationalised UI using [transifex.com](https://www.transifex.com/) (currently supports English and Welsh. Volunteers for more translations gratefully accepted!)
+- ### Zoomable
+
OpenSeadragon image zooming using the IIIF image API
+- ### Embeddable
+ YouTube-style embedding with deep links to specific pages/zoom regions.
+- ### Themable
+ Fork the UV theme on github to create your own.
+- ### Configurable
+ The UV has its own visual configuration editor allowing all settings to be customised.
+- ### Extensible
+ Supports "IxIF" out of the box, allowing 3D , audio , video , and pdf viewing experiences.
[More about the Universal Viewer](https://github.com/UniversalViewer/universalviewer/wiki/About)
@@ -89,11 +82,9 @@ To build the distribution version of the UV, just run (on the command line, in t
A versioned `uv-major.minor.patch` folder along with compressed .zip and .tar files will appear in the `/dist` folder. Use these in your website, or alternatively use:
- bower install uv --save
+ npm install universalviewer --save
-which will download the distribution folder to `bower_components`.
-
-See https://github.com/UniversalViewer/demo-site for examples.
+which will download the distribution folder to `node_modules`.
### Examples
diff --git a/bower.json b/bower.json
index 80a21cb11..8bbc30e27 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "Universal Viewer",
- "version": "1.8.38",
+ "version": "2.0.0",
"description": "The Universal Viewer is an open source project to enable cultural heritage institutions to present their digital artifacts in an IIIF-compliant and highly customisable user interface.",
"repository": {
"type": "git",
diff --git a/config.js b/config.js
index db2bc358a..08413a460 100644
--- a/config.js
+++ b/config.js
@@ -16,6 +16,8 @@ var Config = (function () {
],
typings: [
'node_modules/base-component/dist/base-component.d.ts',
+ 'node_modules/base-component/typings/corejs.d.ts',
+ 'node_modules/base-component/typings/jquery.d.ts',
'node_modules/jquery-plugins/typings/jquery-plugins.d.ts',
'node_modules/key-codes/dist/key-codes.d.ts',
'node_modules/manifold/dist/manifold.bundle.d.ts',
diff --git a/dist/uv-1.8.38/lib/app.js b/dist/uv-1.8.38/lib/app.js
deleted file mode 100644
index 4e94a24dc..000000000
--- a/dist/uv-1.8.38/lib/app.js
+++ /dev/null
@@ -1,8 +0,0 @@
-var requirejs,require,define;!function(global){function commentReplace(e,t,i,n){return n||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var i;for(i=0;i-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,o){(i||!hasProp(e,o))&&(!n||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,n){var o=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return o.requireType=e,o.requireModules=n,i&&(o.originalError=i),o}function newContext(e){function t(e){var t,i;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var o,s,r,a,l,h,u,c,p,d,g,f,m=i&&i.split("/"),v=x.map,$=v&&v["*"];if(e&&(e=e.split("/"),u=e.length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[u])&&(e[u]=e[u].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(f=m.slice(0,m.length-1),e=f.concat(e)),t(e),e=e.join("/")),n&&v&&(m||$)){r=e.split("/");e:for(a=r.length;a>0;a-=1){if(h=r.slice(0,a).join("/"),m)for(l=m.length;l>0;l-=1)if(s=getOwn(v,m.slice(0,l).join("/")),s&&(s=getOwn(s,h))){c=s,p=a;break e}!d&&$&&getOwn($,h)&&(d=getOwn($,h),g=a)}!c&&d&&(c=d,p=g),c&&(r.splice(0,p,c),e=r.join("/"))}return o=getOwn(x.pkgs,e),o?o:e}function n(e){isBrowser&&each(scripts(),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===E.contextName?(t.parentNode.removeChild(t),!0):void 0})}function o(e){var t=getOwn(x.paths,e);return t&&isArray(t)&&t.length>1?(t.shift(),E.require.undef(e),E.makeRequire(null,{skipMap:!0})([e]),!0):void 0}function s(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function r(e,t,n,o){var r,a,l,h,u=null,c=t?t.name:null,p=e,d=!0,g="";return e||(d=!1,e="_@r"+(R+=1)),h=s(e),u=h[0],e=h[1],u&&(u=i(u,c,o),a=getOwn(T,u)),e&&(u?g=a&&a.normalize?a.normalize(e,function(e){return i(e,c,o)}):-1===e.indexOf("!")?i(e,c,o):e:(g=i(e,c,o),h=s(g),u=h[0],g=h[1],n=!0,r=E.nameToUrl(g))),l=!u||a||n?"":"_unnormalized"+(P+=1),{prefix:u,name:g,parentMap:t,unnormalized:!!l,url:r,originalName:p,isDefine:d,id:(u?u+"!"+g:g)+l}}function a(e){var t=e.id,i=getOwn(S,t);return i||(i=S[t]=new E.Module(e)),i}function l(e,t,i){var n=e.id,o=getOwn(S,n);!hasProp(T,n)||o&&!o.defineEmitComplete?(o=a(e),o.error&&"error"===t?i(o.error):o.on(t,i)):"defined"===t&&i(T[n])}function h(e,t){var i=e.requireModules,n=!1;t?t(e):(each(i,function(t){var i=getOwn(S,t);i&&(i.error=e,i.events.error&&(n=!0,i.emit("error",e)))}),n||req.onError(e))}function u(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(E.defQueueMap[t]=!0),I.push(e)}),globalDefQueue=[])}function c(e){delete S[e],delete C[e]}function p(e,t,i){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,each(e.depMaps,function(n,o){var s=n.id,r=getOwn(S,s);!r||e.depMatched[o]||i[s]||(getOwn(t,s)?(e.defineDep(o,T[s]),e.check()):p(r,t,i))}),i[n]=!0)}function d(){var e,t,i=1e3*x.waitSeconds,s=i&&E.startTime+i<(new Date).getTime(),r=[],a=[],l=!1,u=!0;if(!$){if($=!0,eachProp(C,function(e){var i=e.map,h=i.id;if(e.enabled&&(i.isDefine||a.push(e),!e.error))if(!e.inited&&s)o(h)?(t=!0,l=!0):(r.push(h),n(h));else if(!e.inited&&e.fetched&&i.isDefine&&(l=!0,!i.prefix))return u=!1}),s&&r.length)return e=makeError("timeout","Load timeout for modules: "+r,null,r),e.contextName=E.contextName,h(e);u&&each(a,function(e){p(e,{},{})}),s&&!t||!l||!isBrowser&&!isWebWorker||y||(y=setTimeout(function(){y=0,d()},50)),$=!1}}function g(e){hasProp(T,e[0])||a(r(e[0],null,!0)).init(e[1],e[2])}function f(e,t,i,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(i,t,!1)}function m(e){var t=e.currentTarget||e.srcElement;return f(t,E.onScriptLoad,"load","onreadystatechange"),f(t,E.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var e;for(u();I.length;){if(e=I.shift(),null===e[0])return h(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));g(e)}E.defQueueMap={}}var $,b,E,w,y,x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},S={},C={},_={},I=[],T={},D={},O={},R=1,P=1;return w={require:function(e){return e.require?e.require:e.require=E.makeRequire(e.map)},exports:function(e){return e.usingExports=!0,e.map.isDefine?e.exports?T[e.map.id]=e.exports:e.exports=T[e.map.id]={}:void 0},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(x.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},b=function(e){this.events=getOwn(_,e.id)||{},this.map=e,this.shim=getOwn(x.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},b.prototype={init:function(e,t,i,n){n=n||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,E.startTime=(new Date).getTime();var e=this.map;return this.shim?void E.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()})):e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;D[e]||(D[e]=!0,E.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,s=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(s)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=E.execCb(i,s,n,o)}catch(r){e=r}else o=E.execCb(i,s,n,o);if(this.map.isDefine&&void 0===o&&(t=this.module,t?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",h(this.error=e)}else o=s;if(this.exports=o,this.map.isDefine&&!this.ignore&&(T[i]=o,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(E,this.map,a)}c(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(E.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,n=r(e.prefix);this.depMaps.push(n),l(n,"defined",bind(this,function(n){var o,s,u,p=getOwn(O,this.map.id),d=this.map.name,g=this.map.parentMap?this.map.parentMap.name:null,f=E.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(n.normalize&&(d=n.normalize(d,function(e){return i(e,g,!0)})||""),s=r(e.prefix+"!"+d,this.map.parentMap),l(s,"defined",bind(this,function(e){this.map.normalizedMap=s,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),u=getOwn(S,s.id),void(u&&(this.depMaps.push(s),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):p?(this.map.url=E.nameToUrl(p),void this.load()):(o=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),o.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(S,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&c(e.map.id)}),h(e)}),o.fromText=bind(this,function(i,n){var s=e.name,l=r(s),u=useInteractive;n&&(i=n),u&&(useInteractive=!1),a(l),hasProp(x.config,t)&&(x.config[s]=x.config[t]);try{req.exec(i)}catch(c){return h(makeError("fromtexteval","fromText eval for "+t+" failed: "+c,c,[t]))}u&&(useInteractive=!0),this.depMaps.push(l),E.completeLoad(s),f([s],o)}),void n.load(e.name,f,o,x))})),E.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){C[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,n,o;if("string"==typeof e){if(e=r(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(w,e.id))return void(this.depExports[t]=o(this));this.depCount+=1,l(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?l(e,"error",bind(this,this.errback)):this.events.error&&l(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,n=S[i],hasProp(w,i)||!n||n.enabled||E.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(S,e.id);t&&!t.enabled&&E.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},E={config:x,contextName:e,registry:S,defined:T,urlFetched:D,defQueue:I,defQueueMap:{},Module:b,makeModuleMap:r,nextTick:req.nextTick,onError:h,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,i){return(-1===i.indexOf("?")?"?":"&")+t}}var i=x.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(O[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=E.makeShimExports(e)),i[t]=e}),x.shim=i),e.packages&&each(e.packages,function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(x.paths[i]=e.location),x.pkgs[i]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(S,function(e,t){e.inited||e.map.unnormalized||(e.map=r(t,null,!0))}),(e.deps||e.callback)&&E.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,o){function s(i,n,l){var u,c,p;return o.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),"string"==typeof i?isFunction(n)?h(makeError("requireargs","Invalid require call"),l):t&&hasProp(w,i)?w[i](S[t.id]):req.get?req.get(E,i,t,s):(c=r(i,t,!1,!0),u=c.id,hasProp(T,u)?T[u]:h(makeError("notloaded",'Module name "'+u+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),E.nextTick(function(){v(),p=a(r(null,t)),p.skipMap=o.skipMap,p.init(i,n,l,{enabled:!0}),d()}),s)}return o=o||{},mixin(s,{isBrowser:isBrowser,toUrl:function(e){var n,o=e.lastIndexOf("."),s=e.split("/")[0],r="."===s||".."===s;return-1!==o&&(!r||o>1)&&(n=e.substring(o,e.length),e=e.substring(0,o)),E.nameToUrl(i(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(T,r(e,t,!1,!0).id)},specified:function(e){return e=r(e,t,!1,!0).id,hasProp(T,e)||hasProp(S,e)}}),t||(s.undef=function(e){u();var i=r(e,t,!0),o=getOwn(S,e);o.undefed=!0,n(e),delete T[e],delete D[i.url],delete _[e],eachReverse(I,function(t,i){t[0]===e&&I.splice(i,1)}),delete E.defQueueMap[e],o&&(o.events.defined&&(_[e]=o.events),c(e))}),s},enable:function(e){var t=getOwn(S,e.id);t&&a(e).enable()},completeLoad:function(e){var t,i,n,s=getOwn(x.shim,e)||{},r=s.exports;for(u();I.length;){if(i=I.shift(),null===i[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);g(i)}if(E.defQueueMap={},n=getOwn(S,e),!t&&!hasProp(T,e)&&n&&!n.inited){if(!(!x.enforceDefine||r&&getGlobal(r)))return o(e)?void 0:h(makeError("nodefine","No define call for "+e,null,[e]));g([e,s.deps||[],s.exportsFn])}d()},nameToUrl:function(e,t,i){var n,o,s,r,a,l,h,u=getOwn(x.pkgs,e);if(u&&(e=u),h=getOwn(O,e))return E.nameToUrl(h,t,i);if(req.jsExtRegExp.test(e))a=e+(t||"");else{for(n=x.paths,o=e.split("/"),s=o.length;s>0;s-=1)if(r=o.slice(0,s).join("/"),l=getOwn(n,r)){isArray(l)&&(l=l[0]),o.splice(0,s,l);break}a=o.join("/"),a+=t||(/^data\:|^blob\:|\?/.test(a)||i?"":".js"),a=("/"===a.charAt(0)||a.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+a}return x.urlArgs&&!/^blob\:/.test(a)?a+x.urlArgs(e,a):a},load:function(e,t){req.load(E,e,t)},execCb:function(e,t,i,n){return t.apply(n,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=m(e);E.completeLoad(t.id)}},onScriptError:function(e){var t=m(e);if(!o(t.id)){var i=[];return eachProp(S,function(e,n){0!==n.indexOf("_@r")&&each(e.depMaps,function(e){return e.id===t.id?(i.push(n),!0):void 0})}),h(makeError("scripterror",'Script error for "'+t.id+(i.length?'", needed by: '+i.join(", "):'"'),e,[t.id]))}}},E.require=E.makeRequire(),E}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){return"interactive"===e.readyState?interactiveScript=e:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.2.0",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,n){var o,s,r=defContextName;return isArray(e)||"string"==typeof e||(s=e,isArray(t)?(e=t,t=i,i=n):e=[]),s&&s.context&&(r=s.context),o=getOwn(contexts,r),o||(o=contexts[r]=req.s.newContext(r)),s&&o.configure(s),o.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return n.type=e.scriptType||"text/javascript",n.charset="utf-8",n.async=!0,n},req.load=function(e,t,i){var n,o=e&&e.config||{};if(isBrowser)return n=req.createNode(o,t,i),n.setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=i,o.onNodeCreated&&o.onNodeCreated(n,o,t,i),currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),e.completeLoad(t)}catch(s){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,s,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){return head||(head=e.parentNode),dataMain=e.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(e,t,i){var n,o;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript(),n&&(e||(e=n.getAttribute("data-requiremodule")),o=contexts[n.getAttribute("data-requirecontext")])),o?(o.defQueue.push([e,t,i]),o.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),define("requireLib",function(){}),define("modules/uv-shared-module/BaseCommands",["require","exports"],function(e,t){var i=function(){function e(){}return e.namespace="uv.",e.ACCEPT_TERMS=e.namespace+"onAcceptTerms",e.BOOKMARK=e.namespace+"onBookmark",e.CANVAS_INDEX_CHANGE_FAILED=e.namespace+"onCanvasIndexChangeFailed",e.CANVAS_INDEX_CHANGED=e.namespace+"onCanvasIndexChanged",e.CLICKTHROUGH=e.namespace+"onClickthrough",e.CLOSE_ACTIVE_DIALOGUE=e.namespace+"onCloseActiveDialogue",e.CLOSE_LEFT_PANEL=e.namespace+"onCloseLeftPanel",e.CLOSE_RIGHT_PANEL=e.namespace+"onCloseRightPanel",e.CREATED=e.namespace+"onCreated",e.DOWN_ARROW=e.namespace+"onDownArrow",e.DOWNLOAD=e.namespace+"onDownload",e.DROP=e.namespace+"onDrop",e.END=e.namespace+"onEnd",e.ESCAPE=e.namespace+"onEscape",e.EXTERNAL_LINK_CLICKED=e.namespace+"onExternalLinkClicked",e.FEEDBACK=e.namespace+"onFeedback",e.FORBIDDEN=e.namespace+"onForbidden",e.HIDE_CLICKTHROUGH_DIALOGUE=e.namespace+"onHideClickthroughDialogue",e.HIDE_DOWNLOAD_DIALOGUE=e.namespace+"onHideDownloadDialogue",e.HIDE_EMBED_DIALOGUE=e.namespace+"onHideEmbedDialogue",e.HIDE_EXTERNALCONTENT_DIALOGUE=e.namespace+"onHideExternalContentDialogue",e.HIDE_GENERIC_DIALOGUE=e.namespace+"onHideGenericDialogue",e.HIDE_HELP_DIALOGUE=e.namespace+"onHideHelpDialogue",e.HIDE_INFORMATION=e.namespace+"onHideInformation",e.HIDE_LOGIN_DIALOGUE=e.namespace+"onHideLoginDialogue",e.HIDE_MOREINFO_DIALOGUE=e.namespace+"onHideMoreInfoDialogue",e.HIDE_OVERLAY=e.namespace+"onHideOverlay",e.HIDE_RESTRICTED_DIALOGUE=e.namespace+"onHideRestrictedDialogue",e.HIDE_SETTINGS_DIALOGUE=e.namespace+"onHideSettingsDialogue",e.HIDE_SHARE_DIALOGUE=e.namespace+"onHideShareDialogue",e.HOME=e.namespace+"onHome",e.LEFT_ARROW=e.namespace+"onLeftArrow",e.LEFTPANEL_COLLAPSE_FULL_FINISH=e.namespace+"onLeftPanelCollapseFullFinish",e.LEFTPANEL_COLLAPSE_FULL_START=e.namespace+"onLeftPanelCollapseFullStart",e.LEFTPANEL_EXPAND_FULL_FINISH=e.namespace+"onLeftPanelExpandFullFinish",e.LEFTPANEL_EXPAND_FULL_START=e.namespace+"onLeftPanelExpandFullStart",e.LOAD_FAILED=e.namespace+"onLoadFailed",e.LOAD=e.namespace+"onLoad",e.LOGIN_FAILED=e.namespace+"onLoginFailed",e.LOGIN=e.namespace+"onLogin",e.LOGOUT=e.namespace+"onLogout",e.METRIC_CHANGED=e.namespace+"onMetricChanged",e.MINUS=e.namespace+"onMinus",e.NOT_FOUND=e.namespace+"onNotFound",e.OPEN_EXTERNAL_RESOURCE=e.namespace+"onOpenExternalResource",e.OPEN_LEFT_PANEL=e.namespace+"onOpenLeftPanel",e.OPEN_RIGHT_PANEL=e.namespace+"onOpenRightPanel",e.OPEN=e.namespace+"onOpen",e.PAGE_DOWN=e.namespace+"onPageDown",e.PAGE_UP=e.namespace+"onPageUp",e.PARENT_EXIT_FULLSCREEN=e.namespace+"onParentExitFullScreen",e.PLUS=e.namespace+"onPlus",e.REDIRECT=e.namespace+"onRedirect",e.REFRESH=e.namespace+"onRefresh",e.RESIZE=e.namespace+"onResize",e.RESOURCE_DEGRADED=e.namespace+"onResourceDegraded",e.RETRY=e.namespace+"onRetry",e.RETURN=e.namespace+"onReturn",e.RIGHT_ARROW=e.namespace+"onRightArrow",e.RIGHTPANEL_COLLAPSE_FULL_FINISH=e.namespace+"onRightPanelCollapseFullFinish",e.RIGHTPANEL_COLLAPSE_FULL_START=e.namespace+"onRightPanelCollapseFullStart",e.RIGHTPANEL_EXPAND_FULL_FINISH=e.namespace+"onRightPanelExpandFullFinish",e.RIGHTPANEL_EXPAND_FULL_START=e.namespace+"onRightPanelExpandFullStart",e.SEQUENCE_INDEX_CHANGED=e.namespace+"onSequenceIndexChanged",e.SETTINGS_CHANGED=e.namespace+"onSettingsChanged",e.SHOW_CLICKTHROUGH_DIALOGUE=e.namespace+"onShowClickThroughDialogue",e.SHOW_DOWNLOAD_DIALOGUE=e.namespace+"onShowDownloadDialogue",e.SHOW_EMBED_DIALOGUE=e.namespace+"onShowEmbedDialogue",e.SHOW_EXTERNALCONTENT_DIALOGUE=e.namespace+"onShowExternalContentDialogue",e.SHOW_GENERIC_DIALOGUE=e.namespace+"onShowGenericDialogue",e.SHOW_HELP_DIALOGUE=e.namespace+"onShowHelpDialogue",e.SHOW_INFORMATION=e.namespace+"onShowInformation",e.SHOW_LOGIN_DIALOGUE=e.namespace+"onShowLoginDialogue",e.SHOW_MOREINFO_DIALOGUE=e.namespace+"onShowMoreInfoDialogue",e.SHOW_OVERLAY=e.namespace+"onShowOverlay",e.SHOW_RESTRICTED_DIALOGUE=e.namespace+"onShowRestrictedDialogue",e.SHOW_SETTINGS_DIALOGUE=e.namespace+"onShowSettingsDialogue",e.SHOW_SHARE_DIALOGUE=e.namespace+"onShowShareDialogue",e.SHOW_TERMS_OF_USE=e.namespace+"onShowTermsOfUse",e.THUMB_SELECTED=e.namespace+"onThumbSelected",e.TOGGLE_EXPAND_LEFT_PANEL=e.namespace+"onToggleExpandLeftPanel",e.TOGGLE_EXPAND_RIGHT_PANEL=e.namespace+"onToggleExpandRightPanel",e.TOGGLE_FULLSCREEN=e.namespace+"onToggleFullScreen",e.UP_ARROW=e.namespace+"onUpArrow",e.UPDATE_SETTINGS=e.namespace+"onUpdateSettings",e.VIEW_FULL_TERMS=e.namespace+"onViewFullTerms",e.WINDOW_UNLOAD=e.namespace+"onWindowUnload",e}();return i}),define("Params",["require","exports"],function(e,t){var i;return function(e){e[e.collectionIndex=0]="collectionIndex",e[e.manifestIndex=1]="manifestIndex",e[e.sequenceIndex=2]="sequenceIndex",e[e.canvasIndex=3]="canvasIndex",e[e.zoom=4]="zoom",e[e.rotation=5]="rotation",e[e.highlight=6]="highlight",e[e.anchor=7]="anchor"}(i||(i={})),i}),define("BootstrapParams",["require","exports","./Params"],function(e,t,i){var n=function(){function e(){this.paramMap=["c","m","s","cv","z","r","h","a"],this.config=Utils.Urls.getQuerystringParameter("config"),this.domain=Utils.Urls.getQuerystringParameter("domain"),this.embedDomain=Utils.Urls.getQuerystringParameter("embedDomain"),this.embedScriptUri=Utils.Urls.getQuerystringParameter("embedScriptUri"),this.isHomeDomain="true"===Utils.Urls.getQuerystringParameter("isHomeDomain"),this.isLightbox="true"===Utils.Urls.getQuerystringParameter("isLightbox"),this.isOnlyInstance="true"===Utils.Urls.getQuerystringParameter("isOnlyInstance"),this.isReload="true"===Utils.Urls.getQuerystringParameter("isReload");var e=Utils.Urls.getQuerystringParameter("jsonp");this.jsonp=null===e?null:!("false"===e||"0"===e),this.manifestUri=Utils.Urls.getQuerystringParameter("manifestUri");var t=Utils.Urls.getQuerystringParameter("locale")||"en-GB";this.setLocale(t),this.collectionIndex=this.getParam(i.collectionIndex),this.manifestIndex=this.getParam(i.manifestIndex),this.sequenceIndex=this.getParam(i.sequenceIndex),this.canvasIndex=this.getParam(i.canvasIndex)}return e.prototype.getLocaleName=function(){return this.localeName},e.prototype.getParam=function(e){if(this.hashParamsAvailable()){var t=parseInt(Utils.Urls.getHashParameter(this.paramMap[e],parent.document));if(t||0===t)return t}return parseInt(Utils.Urls.getQuerystringParameter(this.paramMap[e]))||0},e.prototype.hashParamsAvailable=function(){return this.isHomeDomain&&!this.isReload&&this.isOnlyInstance},e.prototype.setLocale=function(e){this.locale=e,this.locales=[];for(var t=this.locale.split(","),i=0;i #app").data("bootstrapper"),e.call(this,t,i,n)}return __extends(t,e),t.prototype.create=function(){e.prototype.create.call(this),this.extension=this.bootstrapper.extension,this.config={},this.config.content={},this.config.options={},this.content=this.config.content,this.options=this.config.options;var t=this;t.modules.length&&(t.modules=t.modules.reverse(),_.each(t.modules,function(e){t.config=$.extend(!0,t.config,t.extension.config.modules[e])}))},t.prototype.init=function(){},t.prototype.setConfig=function(e){this.modules.push(e)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/Dialogue",["require","exports","./BaseView","./BaseCommands"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t,!1,!1),this.allowClose=!0,this.isActive=!1,this.isUnopened=!0}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("dialogue"),e.prototype.create.call(this),$.subscribe(n.CLOSE_ACTIVE_DIALOGUE,function(){t.isActive&&t.allowClose&&t.close()}),$.subscribe(n.ESCAPE,function(){t.isActive&&t.allowClose&&t.close()}),this.$top=$('
'),this.$element.append(this.$top),this.$closeButton=$(''+this.content.close+" "),this.$top.append(this.$closeButton),this.$middle=$('
'),this.$element.append(this.$middle),this.$content=$('
'),this.$middle.append(this.$content),this.$bottom=$('
'),this.$element.append(this.$bottom),this.$closeButton.on("click",function(e){e.preventDefault(),t.close()}),this.returnFunc=this.close},t.prototype.enableClose=function(){this.allowClose=!0,this.$closeButton.show()},t.prototype.disableClose=function(){this.allowClose=!1,this.$closeButton.hide()},t.prototype.setDockedPosition=function(){var e=Math.floor(this.extension.height()-this.$element.outerHeight(!0)),t=0,i=0;if(this.$triggerButton){var n=Math.normalise(this.$triggerButton.offset().left,0,this.extension.width());t=Math.floor(this.extension.width()*n-this.$element.width()*n),i=this.$element.width()*n}this.$bottom.css("backgroundPosition",i+"px 0px"),this.$element.css({top:e,left:t})},t.prototype.open=function(e){var t=this;this.$element.show(),e&&e.length?(this.$triggerButton=e,this.$bottom.show()):this.$bottom.hide(),this.isActive=!0,setTimeout(function(){var e=t.$element.find(".default");if(e.length)e.focus();else{var i=t.$element.find("input:visible").first();i.length?i.focus():t.$closeButton.focus()}},1),$.publish(n.SHOW_OVERLAY),this.isUnopened&&(this.isUnopened=!1,this.afterFirstOpen()),this.resize()},t.prototype.afterFirstOpen=function(){},t.prototype.close=function(){this.isActive&&(this.$element.hide(),this.isActive=!1,$.publish(this.closeCommand),$.publish(n.HIDE_OVERLAY))},t.prototype.resize=function(){e.prototype.resize.call(this),this.$element.css({top:Math.floor(this.extension.height()/2-this.$element.height()/2),left:Math.floor(this.extension.width()/2-this.$element.width()/2)})},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/ClickThroughDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("clickThroughDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_CLICKTHROUGH_DIALOGUE,this.closeCommand=i.HIDE_CLICKTHROUGH_DIALOGUE,
-$.subscribe(this.openCommand,function(e,i){t.acceptCallback=i.acceptCallback,t.resource=i.resource,t.open()}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$title=$(" "),this.$content.append(this.$title),this.$content.append(' '),this.$message=this.$content.find(".message"),this.$acceptTermsButton=this.$content.find(".acceptTerms"),this.$acceptTermsButton.text("Accept Terms and Open"),this.$element.hide(),this.$acceptTermsButton.on("click",function(e){e.preventDefault(),t.close(),$.publish(i.ACCEPT_TERMS),t.acceptCallback&&t.acceptCallback()})},t.prototype.open=function(){e.prototype.open.call(this),this.$title.text(this.resource.clickThroughService.getProperty("label")),this.$message.html(this.resource.clickThroughService.getProperty("description")),this.$message.targetBlank(),this.$message.find("a").on("click",function(){var e=$(this).attr("href");$.publish(i.EXTERNAL_LINK_CLICKED,[e])}),this.resize()},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return o}),define("modules/uv-shared-module/InformationArgs",["require","exports"],function(e,t){var i=function(){function e(e,t){this.informationType=e,this.param=t}return e}();return i}),define("modules/uv-shared-module/InformationType",["require","exports"],function(e,t){var i;return function(e){e[e.AUTH_CORS_ERROR=0]="AUTH_CORS_ERROR",e[e.DEGRADED_RESOURCE=1]="DEGRADED_RESOURCE"}(i||(i={})),i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/LoginDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("loginDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_LOGIN_DIALOGUE,this.closeCommand=i.HIDE_LOGIN_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.loginCallback=i.loginCallback,t.logoutCallback=i.logoutCallback,t.options=i.options,t.resource=i.resource,t.open()}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$title=$(" "),this.$content.append(this.$title),this.$content.append(' '),this.$message=this.$content.find(".message"),this.$loginButton=this.$content.find(".login"),this.$loginButton.text(this.content.login),this.$logoutButton=this.$content.find(".logout"),this.$logoutButton.text(this.content.logout),this.$cancelButton=this.$content.find(".cancel"),this.$cancelButton.text(this.content.cancel),this.$element.hide(),this.$loginButton.on("click",function(e){e.preventDefault(),t.close(),t.loginCallback&&t.loginCallback()}),this.$logoutButton.on("click",function(e){e.preventDefault(),t.close(),t.logoutCallback&&t.logoutCallback()}),this.$cancelButton.on("click",function(e){e.preventDefault(),t.close()}),this.updateLogoutButton()},t.prototype.open=function(){e.prototype.open.call(this),this.$title.text(this.resource.loginService.getProperty("label"));var t=this.resource.loginService.getProperty("description");this.options.warningMessage&&(t=''+this.extension.config.content[this.options.warningMessage]+' '+t+" "),this.updateLogoutButton(),this.$message.html(t),this.$message.targetBlank(),this.$message.find("a").on("click",function(){var e=$(this).attr("href");$.publish(i.EXTERNAL_LINK_CLICKED,[e])}),this.options.showCancelButton?this.$cancelButton.show():this.$cancelButton.hide(),this.resize()},t.prototype.updateLogoutButton=function(){this.extension.isLoggedIn?this.$logoutButton.show():this.$logoutButton.hide()},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return o}),define("modules/uv-shared-module/LoginWarningMessages",["require","exports"],function(e,t){var i=function(){function e(){}return e.FORBIDDEN="forbiddenResourceMessage",e}();return i}),define("modules/uv-shared-module/Metric",["require","exports"],function(e,t){var i=function(){function e(e,t){this.minWidth=e,this.maxWidth=t}return e}();return i}),define("modules/uv-shared-module/Metrics",["require","exports","./Metric"],function(e,t,i){var n=function(){function e(){}return e.MOBILE_LANDSCAPE=new i(0,640),e.LAPTOP=new i(640,1/0),e}();return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/RestrictedDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("restrictedDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_RESTRICTED_DIALOGUE,this.closeCommand=i.HIDE_RESTRICTED_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.acceptCallback=i.acceptCallback,t.options=i.options,t.resource=i.resource,t.open()}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$title=$(" "),this.$content.append(this.$title),this.$content.append(' '),this.$message=this.$content.find(".message"),this.$message.targetBlank(),this.$cancelButton=this.$content.find(".cancel"),this.$cancelButton.text(this.content.cancel),this.$element.hide(),this.$cancelButton.on("click",function(e){e.preventDefault(),t.close()})},t.prototype.open=function(){e.prototype.open.call(this),this.isAccepted=!1,this.$title.text(this.resource.restrictedService.getProperty("label"));var t=this.resource.restrictedService.getProperty("description");this.$message.html(t),this.$message.targetBlank(),this.$message.find("a").on("click",function(){var e=$(this).attr("href");$.publish(i.EXTERNAL_LINK_CLICKED,[e])}),this.resize()},t.prototype.close=function(){e.prototype.close.call(this),!this.isAccepted&&this.acceptCallback&&(this.isAccepted=!0,this.acceptCallback())},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/GenericDialogue",["require","exports","./BaseCommands","./Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("genericDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_GENERIC_DIALOGUE,this.closeCommand=i.HIDE_GENERIC_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.acceptCallback=i.acceptCallback,t.showMessage(i)}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$message=$("
"),this.$content.append(this.$message),this.$acceptButton=$(' '),this.$content.append(this.$acceptButton),this.$acceptButton.text(this.content.ok),this.$acceptButton.onPressed(function(){t.accept()}),this.returnFunc=function(){t.isActive&&t.accept()},this.$element.hide()},t.prototype.accept=function(){$.publish(i.CLOSE_ACTIVE_DIALOGUE),this.acceptCallback&&this.acceptCallback()},t.prototype.showMessage=function(e){this.$message.html(e.message),e.buttonText?this.$acceptButton.text(e.buttonText):this.$acceptButton.text(this.content.ok),e.allowClose===!1&&this.disableClose(),this.open()},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/Shell",["require","exports","./BaseCommands","./BaseView","./GenericDialogue"],function(e,t,i,n,o){var s=function(e){function t(i){t.$element=i,e.call(this,t.$element,!0,!0)}return __extends(t,e),t.prototype.create=function(){e.prototype.create.call(this),$.subscribe(i.SHOW_OVERLAY,function(){t.$overlays.show()}),$.subscribe(i.HIDE_OVERLAY,function(){t.$overlays.hide()}),t.$headerPanel=$(''),t.$element.append(t.$headerPanel),t.$mainPanel=$('
'),t.$element.append(t.$mainPanel),t.$centerPanel=$('
'),t.$mainPanel.append(t.$centerPanel),t.$leftPanel=$('
'),t.$mainPanel.append(t.$leftPanel),t.$rightPanel=$('
'),t.$mainPanel.append(t.$rightPanel),t.$footerPanel=$(''),t.$element.append(t.$footerPanel),t.$mobileFooterPanel=$(''),t.$element.append(t.$mobileFooterPanel),t.$overlays=$('
'),t.$element.append(t.$overlays),t.$genericDialogue=$('
'),t.$overlays.append(t.$genericDialogue),t.$overlays.on("click",function(e){$(e.target).hasClass("overlays")&&(e.preventDefault(),$.publish(i.CLOSE_ACTIVE_DIALOGUE))}),new o(t.$genericDialogue)},t.prototype.resize=function(){e.prototype.resize.call(this),t.$overlays.width(this.extension.width()),t.$overlays.height(this.extension.height());var i=this.$element.height()-parseInt(t.$mainPanel.css("marginTop"))-(t.$headerPanel.is(":visible")?t.$headerPanel.height():0)-(t.$footerPanel.is(":visible")?t.$footerPanel.height():0)-(t.$mobileFooterPanel.is(":visible")?t.$mobileFooterPanel.height():0);t.$mainPanel.height(i)},t}(n);return s}),define("modules/uv-shared-module/BaseExtension",["require","exports","./BaseCommands","../../BootstrapParams","../../modules/uv-dialogues-module/ClickThroughDialogue","./InformationArgs","./InformationType","../../modules/uv-dialogues-module/LoginDialogue","./LoginWarningMessages","../../modules/uv-shared-module/Metrics","../../Params","../../modules/uv-dialogues-module/RestrictedDialogue","./Shell"],function(e,t,i,n,o,s,r,a,l,h,u,c,p){var d=function(){function t(e){this.isCreated=!1,this.isLoggedIn=!1,this.shifted=!1,this.tabbing=!1,this.bootstrapper=e,this.config=this.bootstrapper.config,this.jsonp=this.bootstrapper.params.jsonp,this.locale=this.bootstrapper.params.getLocaleName(),this.isHomeDomain=this.bootstrapper.params.isHomeDomain,this.isReload=this.bootstrapper.params.isReload,this.embedDomain=this.bootstrapper.params.embedDomain,this.isOnlyInstance=this.bootstrapper.params.isOnlyInstance,this.embedScriptUri=this.bootstrapper.params.embedScriptUri,this.domain=this.bootstrapper.params.domain,this.isLightbox=this.bootstrapper.params.isLightbox}return t.prototype.create=function(e){var t=this,o=this;this.$element=$("#app"),this.$element.data("bootstrapper",this.bootstrapper);var s=$(window);if(this.embedWidth=s.width(),this.embedHeight=s.height(),this.$element.width(this.embedWidth),this.$element.height(this.embedHeight),!this.isReload&&Utils.Documents.isInIFrame()&&(this.bootstrapper.socket=new easyXDM.Socket({onMessage:function(e,i){e=$.parseJSON(e),t.handleParentFrameEvent(e)}})),this.triggerSocket(i.LOAD,{bootstrapper:{config:this.bootstrapper.config,params:this.bootstrapper.params},settings:this.getSettings(),preview:this.getSharePreview()}),this.$element.empty(),this.$element.removeClass(),this.$element.addClass("browser-"+window.browserDetect.browser),this.$element.addClass("browser-version-"+window.browserDetect.version),this.isHomeDomain||this.$element.addClass("embedded"),this.isLightbox&&this.$element.addClass("lightbox"),$(document).on("mousemove",function(e){t.mouseX=e.pageX,t.mouseY=e.pageY}),!this.isReload){window.onresize=function(){var e=$(window);$("body").height(e.height()),t.resize()};var r=Utils.Documents.getHiddenProp();if(r){var a=r.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(a,function(){Utils.Documents.isHidden()||t.resize()})}Utils.Bools.getBool(this.config.options.dropEnabled,!0)&&this.$element.on("drop",function(e){e.preventDefault();var o=e.originalEvent.dataTransfer.getData("URL"),s=Utils.Urls.getUrlParts(o),r=Utils.Urls.getQuerystringParameterFromString("manifest",s.search);if(r){t.triggerSocket(i.DROP,r);var a=new n;a.manifestUri=r,t.reload(a)}}),this.$element.on("dragover",function(e){e.preventDefault()}),$(document).on("keyup keydown",function(e){t.shifted=e.shiftKey,t.tabbing=e.keyCode===KeyCodes.KeyDown.Tab}),$(document).keydown(function(e){var t=null,n=!0;e.ctrlKey||e.altKey||e.shiftKey||(e.keyCode===KeyCodes.KeyDown.Enter&&(t=i.RETURN,n=!1),e.keyCode===KeyCodes.KeyDown.Escape&&(t=i.ESCAPE),e.keyCode===KeyCodes.KeyDown.PageUp&&(t=i.PAGE_UP),e.keyCode===KeyCodes.KeyDown.PageDown&&(t=i.PAGE_DOWN),e.keyCode===KeyCodes.KeyDown.End&&(t=i.END),e.keyCode===KeyCodes.KeyDown.Home&&(t=i.HOME),(e.keyCode===KeyCodes.KeyDown.NumpadPlus||171===e.keyCode||e.keyCode===KeyCodes.KeyDown.Equals)&&(t=i.PLUS,n=!1),(e.keyCode===KeyCodes.KeyDown.NumpadMinus||173===e.keyCode||e.keyCode===KeyCodes.KeyDown.Dash)&&(t=i.MINUS,n=!1),o.useArrowKeysToNavigate()&&(e.keyCode===KeyCodes.KeyDown.LeftArrow&&(t=i.LEFT_ARROW),e.keyCode===KeyCodes.KeyDown.UpArrow&&(t=i.UP_ARROW),e.keyCode===KeyCodes.KeyDown.RightArrow&&(t=i.RIGHT_ARROW),e.keyCode===KeyCodes.KeyDown.DownArrow&&(t=i.DOWN_ARROW))),t&&(n&&e.preventDefault(),$.publish(t))}),this.bootstrapper.params.isHomeDomain&&Utils.Documents.isInIFrame()&&$.subscribe(i.PARENT_EXIT_FULLSCREEN,function(){t.isOverlayActive()&&$.publish(i.ESCAPE),$.publish(i.ESCAPE),$.publish(i.RESIZE)})}this.$element.append(' '),this.$element.append(''),$.subscribe(i.ACCEPT_TERMS,function(){t.triggerSocket(i.ACCEPT_TERMS)}),$.subscribe(i.LOGIN_FAILED,function(){t.triggerSocket(i.LOGIN_FAILED),t.showMessage(t.config.content.authorisationFailedMessage)}),$.subscribe(i.LOGIN,function(){t.isLoggedIn=!0,t.triggerSocket(i.LOGIN)}),$.subscribe(i.LOGOUT,function(){t.isLoggedIn=!1,t.triggerSocket(i.LOGOUT)}),$.subscribe(i.BOOKMARK,function(){t.bookmark(),t.triggerSocket(i.BOOKMARK)}),$.subscribe(i.CANVAS_INDEX_CHANGE_FAILED,function(){t.triggerSocket(i.CANVAS_INDEX_CHANGE_FAILED)}),$.subscribe(i.CANVAS_INDEX_CHANGED,function(e,n){t.triggerSocket(i.CANVAS_INDEX_CHANGED,n)}),$.subscribe(i.CLICKTHROUGH,function(){t.triggerSocket(i.CLICKTHROUGH)}),$.subscribe(i.CLOSE_ACTIVE_DIALOGUE,function(){t.triggerSocket(i.CLOSE_ACTIVE_DIALOGUE)}),$.subscribe(i.CLOSE_LEFT_PANEL,function(){t.triggerSocket(i.CLOSE_LEFT_PANEL),t.resize()}),$.subscribe(i.CLOSE_RIGHT_PANEL,function(){t.triggerSocket(i.CLOSE_RIGHT_PANEL),t.resize()}),$.subscribe(i.CREATED,function(){t.isCreated=!0,t.triggerSocket(i.CREATED)}),$.subscribe(i.DOWN_ARROW,function(){t.triggerSocket(i.DOWN_ARROW)}),$.subscribe(i.DOWNLOAD,function(e,n){t.triggerSocket(i.DOWNLOAD,n)}),$.subscribe(i.END,function(){t.triggerSocket(i.END)}),$.subscribe(i.ESCAPE,function(){t.triggerSocket(i.ESCAPE),t.isFullScreen()&&!t.isOverlayActive()&&$.publish(i.TOGGLE_FULLSCREEN)}),$.subscribe(i.EXTERNAL_LINK_CLICKED,function(e,n){t.triggerSocket(i.EXTERNAL_LINK_CLICKED,n)}),$.subscribe(i.FEEDBACK,function(){t.feedback()}),$.subscribe(i.FORBIDDEN,function(){t.triggerSocket(i.FORBIDDEN),$.publish(i.OPEN_EXTERNAL_RESOURCE)}),$.subscribe(i.HIDE_DOWNLOAD_DIALOGUE,function(){t.triggerSocket(i.HIDE_DOWNLOAD_DIALOGUE)}),$.subscribe(i.HIDE_EMBED_DIALOGUE,function(){t.triggerSocket(i.HIDE_EMBED_DIALOGUE)}),$.subscribe(i.HIDE_EXTERNALCONTENT_DIALOGUE,function(){t.triggerSocket(i.HIDE_EXTERNALCONTENT_DIALOGUE)}),$.subscribe(i.HIDE_GENERIC_DIALOGUE,function(){t.triggerSocket(i.HIDE_GENERIC_DIALOGUE)}),$.subscribe(i.HIDE_HELP_DIALOGUE,function(){t.triggerSocket(i.HIDE_HELP_DIALOGUE)}),$.subscribe(i.HIDE_INFORMATION,function(){t.triggerSocket(i.HIDE_INFORMATION)}),$.subscribe(i.HIDE_LOGIN_DIALOGUE,function(){t.triggerSocket(i.HIDE_LOGIN_DIALOGUE)}),$.subscribe(i.HIDE_OVERLAY,function(){t.triggerSocket(i.HIDE_OVERLAY)}),$.subscribe(i.HIDE_RESTRICTED_DIALOGUE,function(){t.triggerSocket(i.HIDE_RESTRICTED_DIALOGUE)}),$.subscribe(i.HIDE_SETTINGS_DIALOGUE,function(){t.triggerSocket(i.HIDE_SETTINGS_DIALOGUE)}),$.subscribe(i.HOME,function(){t.triggerSocket(i.HOME)}),$.subscribe(i.LEFT_ARROW,function(){t.triggerSocket(i.LEFT_ARROW)}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_FINISH,function(){t.triggerSocket(i.LEFTPANEL_COLLAPSE_FULL_FINISH)}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_START,function(){t.triggerSocket(i.LEFTPANEL_COLLAPSE_FULL_START)}),$.subscribe(i.LEFTPANEL_EXPAND_FULL_FINISH,function(){t.triggerSocket(i.LEFTPANEL_EXPAND_FULL_FINISH)}),$.subscribe(i.LEFTPANEL_EXPAND_FULL_START,function(){t.triggerSocket(i.LEFTPANEL_EXPAND_FULL_START)}),$.subscribe(i.LOAD_FAILED,function(){t.triggerSocket(i.LOAD_FAILED),_.isNull(o.lastCanvasIndex)||o.lastCanvasIndex===o.helper.canvasIndex||t.viewCanvas(o.lastCanvasIndex)}),$.subscribe(i.NOT_FOUND,function(){t.triggerSocket(i.NOT_FOUND)}),$.subscribe(i.OPEN,function(){t.triggerSocket(i.OPEN);var e=String.format(t.config.options.openTemplate,t.helper.iiifResourceUri);window.open(e)}),$.subscribe(i.OPEN_LEFT_PANEL,function(){t.triggerSocket(i.OPEN_LEFT_PANEL),t.resize()}),$.subscribe(i.OPEN_EXTERNAL_RESOURCE,function(){t.triggerSocket(i.OPEN_EXTERNAL_RESOURCE)}),$.subscribe(i.OPEN_RIGHT_PANEL,function(){t.triggerSocket(i.OPEN_RIGHT_PANEL),t.resize()}),$.subscribe(i.PAGE_DOWN,function(){t.triggerSocket(i.PAGE_DOWN)}),$.subscribe(i.PAGE_UP,function(){t.triggerSocket(i.PAGE_UP)}),$.subscribe(i.RESOURCE_DEGRADED,function(e,n){t.triggerSocket(i.RESOURCE_DEGRADED),t.handleDegraded(n)}),$.subscribe(i.RETURN,function(){t.triggerSocket(i.RETURN)}),$.subscribe(i.RIGHT_ARROW,function(){t.triggerSocket(i.RIGHT_ARROW)}),$.subscribe(i.RIGHTPANEL_COLLAPSE_FULL_FINISH,function(){t.triggerSocket(i.RIGHTPANEL_COLLAPSE_FULL_FINISH)}),$.subscribe(i.RIGHTPANEL_COLLAPSE_FULL_START,function(){t.triggerSocket(i.RIGHTPANEL_COLLAPSE_FULL_START)}),$.subscribe(i.RIGHTPANEL_EXPAND_FULL_FINISH,function(){t.triggerSocket(i.RIGHTPANEL_EXPAND_FULL_FINISH)}),$.subscribe(i.RIGHTPANEL_EXPAND_FULL_START,function(){t.triggerSocket(i.RIGHTPANEL_EXPAND_FULL_START)}),$.subscribe(i.SEQUENCE_INDEX_CHANGED,function(){t.triggerSocket(i.SEQUENCE_INDEX_CHANGED)}),$.subscribe(i.SETTINGS_CHANGED,function(e,n){t.triggerSocket(i.SETTINGS_CHANGED,n)}),$.subscribe(i.SHOW_DOWNLOAD_DIALOGUE,function(){t.triggerSocket(i.SHOW_DOWNLOAD_DIALOGUE)}),$.subscribe(i.SHOW_EMBED_DIALOGUE,function(){t.triggerSocket(i.SHOW_EMBED_DIALOGUE)}),$.subscribe(i.SHOW_EXTERNALCONTENT_DIALOGUE,function(){t.triggerSocket(i.SHOW_EXTERNALCONTENT_DIALOGUE)}),$.subscribe(i.SHOW_GENERIC_DIALOGUE,function(){t.triggerSocket(i.SHOW_GENERIC_DIALOGUE)}),$.subscribe(i.SHOW_HELP_DIALOGUE,function(){t.triggerSocket(i.SHOW_HELP_DIALOGUE)}),$.subscribe(i.SHOW_INFORMATION,function(){t.triggerSocket(i.SHOW_INFORMATION)}),$.subscribe(i.SHOW_LOGIN_DIALOGUE,function(){t.triggerSocket(i.SHOW_LOGIN_DIALOGUE)}),$.subscribe(i.SHOW_CLICKTHROUGH_DIALOGUE,function(){t.triggerSocket(i.SHOW_CLICKTHROUGH_DIALOGUE)}),$.subscribe(i.SHOW_RESTRICTED_DIALOGUE,function(){t.triggerSocket(i.SHOW_RESTRICTED_DIALOGUE)}),$.subscribe(i.SHOW_OVERLAY,function(){t.triggerSocket(i.SHOW_OVERLAY)}),$.subscribe(i.SHOW_SETTINGS_DIALOGUE,function(){t.triggerSocket(i.SHOW_SETTINGS_DIALOGUE)}),$.subscribe(i.SHOW_TERMS_OF_USE,function(){t.triggerSocket(i.SHOW_TERMS_OF_USE);var e=t.helper.getAttribution();t.showMessage(e)}),$.subscribe(i.THUMB_SELECTED,function(e,n){t.triggerSocket(i.THUMB_SELECTED,n.index)}),$.subscribe(i.TOGGLE_FULLSCREEN,function(){$("#top").focus(),t.bootstrapper.isFullScreen=!t.bootstrapper.isFullScreen,t.triggerSocket(i.TOGGLE_FULLSCREEN,{isFullScreen:t.bootstrapper.isFullScreen,overrideFullScreen:t.config.options.overrideFullScreen})}),$.subscribe(i.UP_ARROW,function(){t.triggerSocket(i.UP_ARROW)}),$.subscribe(i.UPDATE_SETTINGS,function(){t.triggerSocket(i.UPDATE_SETTINGS)}),$.subscribe(i.VIEW_FULL_TERMS,function(){t.triggerSocket(i.VIEW_FULL_TERMS)}),$.subscribe(i.WINDOW_UNLOAD,function(){t.triggerSocket(i.WINDOW_UNLOAD)}),this.shell=new p(this.$element),e?this.loadDependencies(e):this.getDependencies(function(e){t.loadDependencies(e)})},t.prototype.createModules=function(){this.$clickThroughDialogue=$('
'),p.$overlays.append(this.$clickThroughDialogue),this.clickThroughDialogue=new o(this.$clickThroughDialogue),this.$restrictedDialogue=$('
'),p.$overlays.append(this.$restrictedDialogue),this.restrictedDialogue=new c(this.$restrictedDialogue),this.$loginDialogue=$('
'),p.$overlays.append(this.$loginDialogue),this.loginDialogue=new a(this.$loginDialogue)},t.prototype.modulesCreated=function(){},t.prototype.getDependencies=function(t){var i=this,n=window.DEBUG?"../../extensions/"+this.name+"/dependencies":this.name+"-dependencies",o=$("script[data-requiremodule]").filter(function(){var e=$(this).attr("data-requiremodule");return-1!=e.indexOf(i.name)&&-1!=e.indexOf("dependencies")});o.length?t(null):e([n],function(e){for(var n=window.DEBUG?"../../extensions/"+i.name+"/lib/":"",o=0;on.minWidth&&this.width()<=n.maxWidth&&this.metric!==n&&(this.metric=n,$.publish(i.METRIC_CHANGED))}},t.prototype.resize=function(){this._updateMetric(),$.publish(i.RESIZE)},t.prototype.handleParentFrameEvent=function(e){var t=this;Utils.Async.waitFor(function(){return t.isCreated},function(){switch(e.eventName){case i.TOGGLE_FULLSCREEN:$.publish(i.TOGGLE_FULLSCREEN,e.eventObject);break;case i.PARENT_EXIT_FULLSCREEN:$.publish(i.PARENT_EXIT_FULLSCREEN)}})},t.prototype.reload=function(e){var t=new n;e&&(t=$.extend(t,e)),t.isReload=!0,$.disposePubSub(),this.bootstrapper.bootstrap(t)},t.prototype.getCanvasIndexParam=function(){return this.bootstrapper.params.getParam(u.canvasIndex)},t.prototype.getSequenceIndexParam=function(){return this.bootstrapper.params.getParam(u.sequenceIndex)},t.prototype.isSeeAlsoEnabled=function(){return this.config.options.seeAlsoEnabled!==!1},t.prototype.getShareUrl=function(){if(this.isDeepLinkingEnabled())return Utils.Documents.isInIFrame()?parent.document.location.href:document.location.href;if(this.helper.hasRelatedPage()){var e=this.helper.getRelated();return e.length&&(e=e[0]),e["@id"]}return null},t.prototype.getIIIFShareUrl=function(){return this.helper.iiifResourceUri+"?manifest="+this.helper.iiifResourceUri},t.prototype.addTimestamp=function(e){return e+"?t="+Utils.Dates.getTimeStamp()},t.prototype.isDeepLinkingEnabled=function(){return this.isHomeDomain&&this.isOnlyInstance},t.prototype.isOnHomeDomain=function(){return this.isDeepLinkingEnabled()},t.prototype.getDomain=function(){var e=Utils.Urls.getUrlParts(this.helper.iiifResourceUri);return e.host},t.prototype.getEmbedDomain=function(){return this.embedDomain},t.prototype.getSettings=function(){if(Utils.Bools.getBool(this.config.options.saveUserSettings,!1)){var e=Utils.Storage.get("uv.settings",Utils.StorageType.local);if(e)return $.extend(this.config.options,e.value)}return this.config.options},t.prototype.updateSettings=function(e){if(Utils.Bools.getBool(this.config.options.saveUserSettings,!1)){var t=Utils.Storage.get("uv.settings",Utils.StorageType.local);t&&(e=$.extend(t.value,e)),Utils.Storage.set("uv.settings",e,31536e4,Utils.StorageType.local)}this.config.options=$.extend(this.config.options,e)},t.prototype.sanitize=function(e){var t=document.createElement("div"),i=$(t);i.html(e);var n=new Sanitize({elements:["a","b","br","img","p","i","span"],attributes:{a:["href"],img:["src","alt"]},protocols:{a:{href:["http","https"]}}});return i.html(n.clean_node(t)),i.html()},t.prototype.getLocales=function(){if(this.locales)return this.locales;var e=this.config.localisation.locales.clone(),t=this.bootstrapper.params.locales,i=[];_.each(t,function(t){var n=_.filter(e,function(e){return e.name===t.name});if(n.length){var o=n[0];t.label&&(o.label=t.label),o.added=!0,i.push(o)}});var n=Utils.Bools.getBool(this.config.options.limitLocales,!1);return n||_.each(e,function(e){e.added||i.push(e),delete e.added}),this.locales=i},t.prototype.getAlternateLocale=function(){for(var e,t=this.getLocales(),i=0;i0&&(t+=","),t+=n.name,n.label&&(t+=":"+n.label)}return t},t.prototype.getSerializedLocales=function(){return this.serializeLocales(this.locales)},t.prototype.getSharePreview=function(){var e={};e.title=this.helper.getLabel();var t=this.helper.getCurrentCanvas(),i=t.getProperty("thumbnail");return i&&_.isString(i)||(i=t.getCanonicalImageUri(this.config.options.bookmarkThumbWidth)),e.image=i,e},t.prototype.getPagedIndices=function(e){return"undefined"==typeof e&&(e=this.helper.canvasIndex),[e]},t.prototype.getCurrentCanvases=function(){for(var e=this.getPagedIndices(this.helper.canvasIndex),t=[],i=0;i"+this.content.title+""),this.$content.append(this.$title),this.$noneAvailable=$(''+this.content.noneAvailable+"
"),this.$content.append(this.$noneAvailable),this.$downloadOptions=$(' '),this.$content.append(this.$downloadOptions),this.$footer=$(''),this.$content.append(this.$footer),this.$termsOfUseButton=$(''+this.extension.config.content.termsOfUse+" "),this.$footer.append(this.$termsOfUseButton),this.$termsOfUseButton.onPressed(function(){$.publish(i.SHOW_TERMS_OF_USE)}),this.$element.hide(),this.updateTermsOfUseButton()},t.prototype.addEntireFileDownloadOptions=function(){var e=this;if(this.isDownloadOptionAvailable(o.entireFileAsOriginal)){this.$downloadOptions.empty();var t=this.extension.helper.getCurrentCanvas(),i=!1;_.each(t.getRenderings(),function(t){var n=t.getFormat(),o="";n&&(o=n.toString()),e.addEntireFileDownloadOption(t.id,Manifesto.TranslationCollection.getValue(t.getLabel()),o),i=!0}),i||this.addEntireFileDownloadOption(t.id,null,null)}},t.prototype.addEntireFileDownloadOption=function(e,t,i){t?t+=" ({0})":t=this.content.entireFileAsOriginal;var n;n=i?Utils.Files.simplifyMimeType(i):this.getFileExtension(e),this.$downloadOptions.append(''+String.format(t,n)+" ")},t.prototype.updateNoneAvailable=function(){this.$downloadOptions.find("li:visible").length?this.$noneAvailable.hide():this.$noneAvailable.show()},t.prototype.updateTermsOfUseButton=function(){var e=this.extension.helper.getAttribution();Utils.Bools.getBool(this.extension.config.options.termsOfUseEnabled,!1)&&e?this.$termsOfUseButton.show():this.$termsOfUseButton.hide()},t.prototype.getFileExtension=function(e){return e.split(".").pop()},t.prototype.isDownloadOptionAvailable=function(e){switch(e){case o.entireFileAsOriginal:this.extension.helper.manifest.getService(manifesto.ServiceProfile.uiExtensions());if(!this.extension.helper.isUIEnabled("mediaDownload"))return!1}return!0},t.prototype.close=function(){e.prototype.close.call(this)},t.prototype.resize=function(){this.setDockedPosition()},t}(n);return s});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-mediaelement-extension/DownloadDialogue",["require","exports","../../modules/uv-dialogues-module/DownloadDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("downloadDialogue"),e.prototype.create.call(this)},t.prototype.open=function(t){e.prototype.open.call(this,t),this.addEntireFileDownloadOptions(),this.updateNoneAvailable(),this.resize()},t.prototype.isDownloadOptionAvailable=function(t){return e.prototype.isDownloadOptionAvailable.call(this,t)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/ShareDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t),this.aspectRatio=.75,this.isEmbedViewVisible=!1,this.isShareViewVisible=!1,this.maxHeight=this.maxWidth*this.aspectRatio,this.maxWidth=8e3,this.minHeight=this.minWidth*this.aspectRatio,this.minWidth=200}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("shareDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_SHARE_DIALOGUE,this.closeCommand=i.HIDE_SHARE_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open(i),t.isShareAvailable()?t.openShareView():t.openEmbedView()}),$.subscribe(this.closeCommand,function(e){t.close()}),$.subscribe(i.SHOW_EMBED_DIALOGUE,function(e,i){t.open(i),t.openEmbedView()}),this.$tabs=$('
'),this.$content.append(this.$tabs),this.$shareButton=$(''+this.content.share+" "),this.$shareButton.prop("title",this.content.share),this.$tabs.append(this.$shareButton),this.$embedButton=$(''+this.content.embed+" "),this.$embedButton.prop("title",this.content.embed),this.$tabs.append(this.$embedButton),this.$tabsContent=$('
'),this.$content.append(this.$tabsContent),this.$footer=$(''),this.$content.append(this.$footer),this.$shareView=$('
'),this.$tabsContent.append(this.$shareView),this.$shareHeader=$(''),this.$shareView.append(this.$shareHeader),this.$shareLink=$(' '),this.$shareView.append(this.$shareLink),this.$shareInput=$(' '),this.$shareView.append(this.$shareInput),this.$shareFrame=$(''),this.$shareView.append(this.$shareFrame),this.$embedView=$('
'),this.$tabsContent.append(this.$embedView),this.$embedHeader=$(''),this.$embedView.append(this.$embedHeader),this.$code=$(' '),this.$embedView.append(this.$code),this.$customSize=$('
'),this.$embedView.append(this.$customSize),this.$size=$(''+this.content.size+" "),this.$customSize.append(this.$size),this.$customSizeDropDown=$(' '),this.$customSize.append(this.$customSizeDropDown),this.$customSizeDropDown.append('560 x 420 '),this.$customSizeDropDown.append('640 x 480 '),this.$customSizeDropDown.append('800 x 600 '),this.$customSizeDropDown.append(''+this.content.customSize+" "),this.$widthInput=$(' '),this.$customSize.append(this.$widthInput),this.$x=$('x '),this.$customSize.append(this.$x),this.$heightInput=$(' '),this.$customSize.append(this.$heightInput);var n=this.extension.getIIIFShareUrl();this.$iiifButton=$(' '),this.$footer.append(this.$iiifButton),this.$termsOfUseButton=$(''+this.extension.config.content.termsOfUse+" "),this.$footer.append(this.$termsOfUseButton),this.$widthInput.on("keydown",function(e){return Utils.Numbers.numericalInput(e)}),this.$heightInput.on("keydown",function(e){return Utils.Numbers.numericalInput(e)}),this.$shareInput.focus(function(){$(this).select()}),this.$code.focus(function(){$(this).select()}),this.$shareButton.onPressed(function(){t.openShareView()}),this.$embedButton.onPressed(function(){t.openEmbedView()}),this.$customSizeDropDown.change(function(){t.update()}),this.$widthInput.change(function(){t.updateHeightRatio(),t.update()}),this.$heightInput.change(function(){t.updateWidthRatio(),t.update()}),this.$termsOfUseButton.onPressed(function(){$.publish(i.SHOW_TERMS_OF_USE)}),this.$element.hide(),this.updateInstructions(),this.updateShareOptions(),this.updateShareFrame(),this.updateTermsOfUseButton()},t.prototype.open=function(t){e.prototype.open.call(this,t),this.update()},t.prototype.getShareUrl=function(){return this.extension.getShareUrl()},t.prototype.isShareAvailable=function(){return!!this.getShareUrl()},t.prototype.update=function(){this.isShareAvailable()?this.$shareButton.show():this.$shareButton.hide();var e=this.getSelectedSize();"custom"===e.val()?(this.$widthInput.show(),this.$x.show(),this.$heightInput.show()):(this.$widthInput.hide(),this.$x.hide(),this.$heightInput.hide(),this.currentWidth=Number(e.data("width")),this.currentHeight=Number(e.data("height")),this.$widthInput.val(String(this.currentWidth)),this.$heightInput.val(String(this.currentHeight)))},t.prototype.updateShareOptions=function(){this.$shareInput.val(this.getShareUrl()),this.$shareLink.prop("href",this.getShareUrl()),this.$shareLink.text(this.getShareUrl()),$.browser.mobile?(this.$shareInput.hide(),this.$shareLink.show()):(this.$shareInput.show(),this.$shareLink.hide())},t.prototype.updateInstructions=function(){Utils.Bools.getBool(this.options.instructionsEnabled,!1)?(this.$shareHeader.show(),this.$embedHeader.show(),this.$shareHeader.text(this.content.shareInstructions),this.$embedHeader.text(this.content.embedInstructions)):(this.$shareHeader.hide(),this.$embedHeader.hide())},t.prototype.getSelectedSize=function(){return this.$customSizeDropDown.find(":selected")},t.prototype.updateWidthRatio=function(){this.currentHeight=Number(this.$heightInput.val()),this.currentHeightthis.maxHeight&&(this.currentHeight=this.maxHeight,this.$heightInput.val(String(this.currentHeight))),this.currentWidth=Math.floor(this.currentHeight/this.aspectRatio),this.$widthInput.val(String(this.currentWidth))},t.prototype.updateHeightRatio=function(){this.currentWidth=Number(this.$widthInput.val()),this.currentWidththis.maxWidth&&(this.currentWidth=this.maxWidth,this.$widthInput.val(String(this.currentWidth))),this.currentHeight=Math.floor(this.currentWidth*this.aspectRatio),this.$heightInput.val(String(this.currentHeight))},t.prototype.updateShareFrame=function(){var e=this.extension.helper.getShareServiceUrl();Utils.Bools.getBool(this.config.options.shareFrameEnabled,!0)&&e?(this.$shareFrame.prop("src",e),this.$shareFrame.show()):this.$shareFrame.hide()},t.prototype.updateTermsOfUseButton=function(){var e=this.extension.helper.getAttribution();Utils.Bools.getBool(this.extension.config.options.termsOfUseEnabled,!1)&&e?this.$termsOfUseButton.show():this.$termsOfUseButton.hide()},t.prototype.openShareView=function(){this.isShareViewVisible=!0,this.isEmbedViewVisible=!1,this.$embedView.hide(),this.$shareView.show(),this.$shareButton.addClass("on default"),this.$embedButton.removeClass("on default"),this.resize()},t.prototype.openEmbedView=function(){this.isShareViewVisible=!1,this.isEmbedViewVisible=!0,this.$embedView.show(),this.$shareView.hide(),this.$shareButton.removeClass("on default"),this.$embedButton.addClass("on default"),this.resize()},t.prototype.close=function(){e.prototype.close.call(this)},t.prototype.getViews=function(){return this.$tabsContent.find(".view")},t.prototype.equaliseViewHeights=function(){this.getViews().equaliseHeight(!0)},t.prototype.resize=function(){this.equaliseViewHeights(),this.setDockedPosition()},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-mediaelement-extension/ShareDialogue",["require","exports","../../modules/uv-dialogues-module/ShareDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("shareDialogue"),e.prototype.create.call(this)},t.prototype.update=function(){e.prototype.update.call(this),this.code=this.extension.getEmbedScript(this.options.embedTemplate,this.currentWidth,this.currentHeight),this.$code.val(this.code)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/FooterPanel",["require","exports","./BaseCommands","./BaseView","./Metrics"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("footerPanel"),e.prototype.create.call(this),$.subscribe(i.TOGGLE_FULLSCREEN,function(){t.updateFullScreenButton()}),$.subscribe(i.METRIC_CHANGED,function(){t.updateMinimisedButtons(),t.updateMoreInfoButton()}),$.subscribe(i.SETTINGS_CHANGED,function(){t.updateDownloadButton()}),this.$options=$('
'),this.$element.append(this.$options),this.$feedbackButton=$(''+this.content.feedback+" "),this.$options.prepend(this.$feedbackButton),this.$openButton=$(''+this.content.open+" "),this.$options.prepend(this.$openButton),this.$bookmarkButton=$(''+this.content.bookmark+" "),this.$options.prepend(this.$bookmarkButton),this.$shareButton=$(''+this.content.share+" "),this.$options.append(this.$shareButton),this.$embedButton=$(''+this.content.embed+" "),this.$options.append(this.$embedButton),this.$downloadButton=$(''+this.content.download+" "),this.$options.prepend(this.$downloadButton),this.$moreInfoButton=$(''+this.content.moreInfo+" "),this.$options.prepend(this.$moreInfoButton),this.$fullScreenBtn=$(''+this.content.fullScreen+" "),this.$options.append(this.$fullScreenBtn),this.$openButton.onPressed(function(){$.publish(i.OPEN)}),this.$feedbackButton.onPressed(function(){$.publish(i.FEEDBACK)}),this.$bookmarkButton.onPressed(function(){$.publish(i.BOOKMARK)}),this.$shareButton.onPressed(function(){$.publish(i.SHOW_SHARE_DIALOGUE,[t.$shareButton])}),this.$embedButton.onPressed(function(){$.publish(i.SHOW_EMBED_DIALOGUE,[t.$embedButton])}),this.$downloadButton.onPressed(function(){$.publish(i.SHOW_DOWNLOAD_DIALOGUE,[t.$downloadButton])}),this.$moreInfoButton.onPressed(function(){$.publish(i.SHOW_MOREINFO_DIALOGUE,[t.$moreInfoButton])}),this.$fullScreenBtn.on("click",function(e){e.preventDefault(),$.publish(i.TOGGLE_FULLSCREEN)}),Utils.Bools.getBool(this.options.embedEnabled,!0)||this.$embedButton.hide(),this.updateMoreInfoButton(),this.updateOpenButton(),this.updateFeedbackButton(),this.updateBookmarkButton(),this.updateEmbedButton(),this.updateDownloadButton(),this.updateFullScreenButton(),this.updateShareButton(),this.updateMinimisedButtons()},t.prototype.updateMinimisedButtons=function(){return Utils.Bools.getBool(this.options.minimiseButtons,!1)?void this.$options.addClass("minimiseButtons"):void(this.extension.metric===o.MOBILE_LANDSCAPE?this.$options.addClass("minimiseButtons"):this.$options.removeClass("minimiseButtons"))},t.prototype.updateMoreInfoButton=function(){var e=Utils.Bools.getBool(this.options.moreInfoEnabled,!1);e&&this.extension.metric===o.MOBILE_LANDSCAPE?this.$moreInfoButton.show():this.$moreInfoButton.hide()},t.prototype.updateOpenButton=function(){var e=Utils.Bools.getBool(this.options.openEnabled,!1);e&&!this.extension.isHomeDomain?this.$openButton.show():this.$openButton.hide()},t.prototype.updateFullScreenButton=function(){Utils.Bools.getBool(this.options.fullscreenEnabled,!0)||this.$fullScreenBtn.hide(),this.extension.isLightbox&&this.$fullScreenBtn.addClass("lightbox"),this.extension.isFullScreen()?(this.$fullScreenBtn.swapClass("fullScreen","exitFullscreen"),this.$fullScreenBtn.text(this.content.exitFullScreen),this.$fullScreenBtn.attr("title",this.content.exitFullScreen)):(this.$fullScreenBtn.swapClass("exitFullscreen","fullScreen"),this.$fullScreenBtn.text(this.content.fullScreen),this.$fullScreenBtn.attr("title",this.content.fullScreen))},t.prototype.updateEmbedButton=function(){this.extension.helper.isUIEnabled("embed")&&Utils.Bools.getBool(this.options.embedEnabled,!1)?$.browser.mobile||this.$embedButton.show():this.$embedButton.hide()},t.prototype.updateShareButton=function(){this.extension.helper.isUIEnabled("share")&&Utils.Bools.getBool(this.options.shareEnabled,!0)?this.$shareButton.show():this.$shareButton.hide()},t.prototype.updateDownloadButton=function(){var e=Utils.Bools.getBool(this.options.downloadEnabled,!0);e?this.$downloadButton.show():this.$downloadButton.hide()},t.prototype.updateFeedbackButton=function(){var e=Utils.Bools.getBool(this.options.feedbackEnabled,!1);e?this.$feedbackButton.show():this.$feedbackButton.hide()},t.prototype.updateBookmarkButton=function(){var e=Utils.Bools.getBool(this.options.bookmarkEnabled,!1);e?this.$bookmarkButton.show():this.$bookmarkButton.hide()},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return s}),define("modules/uv-shared-module/Information",["require","exports"],function(e,t){var i=function(){function e(e,t){this.message=e,this.actions=t}return e}();return i}),define("modules/uv-shared-module/InformationAction",["require","exports"],function(e,t){var i=function(){function e(){}return e}();return i}),define("modules/uv-shared-module/InformationFactory",["require","exports","./BaseCommands","./Information","./InformationAction","./InformationType"],function(e,t,i,n,o,s){var r=function(){function e(e){this.extension=e}return e.prototype.Get=function(e){switch(e.informationType){case s.AUTH_CORS_ERROR:return new n(this.extension.config.content.authCORSError,[]);case s.DEGRADED_RESOURCE:var t=[],r=new o;return r.label=this.extension.config.content.degradedResourceLogin,r.action=function(){$.publish(i.HIDE_INFORMATION),$.publish(i.OPEN_EXTERNAL_RESOURCE,[[e.param]])},t.push(r),new n(this.extension.config.content.degradedResourceMessage,t)}},e}();return r});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/HeaderPanel",["require","exports","./BaseCommands","./BaseView","../uv-shared-module/InformationFactory"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t,!1,!1)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("headerPanel"),e.prototype.create.call(this),$.subscribe(i.SHOW_INFORMATION,function(e,i){t.showInformation(i)}),$.subscribe(i.HIDE_INFORMATION,function(){t.hideInformation()}),this.$options=$('
'),this.$element.append(this.$options),this.$centerOptions=$('
'),this.$options.append(this.$centerOptions),this.$rightOptions=$('
'),this.$options.append(this.$rightOptions),this.$localeToggleButton=$(' '),this.$rightOptions.append(this.$localeToggleButton),this.$settingsButton=$(' '),this.$settingsButton.attr("title",this.content.settings),this.$rightOptions.append(this.$settingsButton),this.$informationBox=$(''),this.$element.append(this.$informationBox),this.$informationBox.hide(),this.$informationBox.find(".close").attr("title",this.content.close),this.$informationBox.find(".close").on("click",function(e){e.preventDefault(),$.publish(i.HIDE_INFORMATION)}),this.$localeToggleButton.on("click",function(){t.extension.changeLocale(String(t.$localeToggleButton.data("locale")))}),this.$settingsButton.onPressed(function(){$.publish(i.SHOW_SETTINGS_DIALOGUE)}),this.updateLocaleToggle(),this.updateSettingsButton()},t.prototype.updateLocaleToggle=function(){if(!this.localeToggleIsVisible())return void this.$localeToggleButton.hide();var e=this.extension.getAlternateLocale(),t=e.name.split("-")[0].toUpperCase();this.$localeToggleButton.data("locale",e.name),this.$localeToggleButton.attr("title",e.label),this.$localeToggleButton.text(t)},t.prototype.updateSettingsButton=function(){var e=Utils.Bools.getBool(this.options.settingsButtonEnabled,!0);e?this.$settingsButton.show():this.$settingsButton.hide()},t.prototype.localeToggleIsVisible=function(){return this.extension.getLocales().length>1&&Utils.Bools.getBool(this.options.localeToggleEnabled,!1)},t.prototype.showInformation=function(e){var t=new o(this.extension);this.information=t.Get(e);var i=this.$informationBox.find(".message");i.html(this.information.message).find("a").attr("target","_top");var n=this.$informationBox.find(".actions");n.empty();for(var s=0;s'+r.label+"");a.on("click",r.action),n.append(a)}this.$informationBox.show(),this.$element.addClass("showInformation"),this.extension.resize()},t.prototype.hideInformation=function(){this.$element.removeClass("showInformation"),this.$informationBox.hide(),this.extension.resize()},t.prototype.getSettings=function(){return this.extension.getSettings()},t.prototype.updateSettings=function(e){this.extension.updateSettings(e),$.publish(i.UPDATE_SETTINGS,[e])},t.prototype.resize=function(){e.prototype.resize.call(this);var t=this.$element.width(),i=t/2,n=this.$centerOptions.outerWidth(),o=i-n/2;if(this.$centerOptions.css({left:o}),this.$informationBox.is(":visible")){var s=this.$informationBox.find(".actions"),r=this.$informationBox.find(".message");r.width(this.$element.width()-r.horizontalMargins()-s.outerWidth(!0)-this.$informationBox.find(".close").outerWidth(!0)-1),r.ellipsisFill(this.information.message)}this.extension.width()"),this.$content.append(this.$title),this.$scroll=$('
'),this.$content.append(this.$scroll),this.$message=$("
"),this.$scroll.append(this.$message),this.$title.text(this.content.title),this.$message.html(this.content.text),this.$message.targetBlank(),this.$element.hide()},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/CenterPanel",["require","exports","./Shell","./BaseView"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t,!1,!0)}return __extends(t,e),t.prototype.create=function(){var t=this;e.prototype.create.call(this),this.$title=$('
'),this.$element.append(this.$title),this.$content=$('
'),this.$element.append(this.$content),this.$attribution=$(''),this.$attribution.find(".header .title").text(this.content.attribution),this.$content.append(this.$attribution),this.$attribution.hide(),this.$closeAttributionButton=this.$attribution.find(".header .close"),this.$closeAttributionButton.on("click",function(e){e.preventDefault(),t.$attribution.hide()}),Utils.Bools.getBool(this.options.titleEnabled,!0)||this.$title.hide()},t.prototype.updateAttribution=function(){var e=this,t=this.extension.helper.getAttribution(),i=Utils.Bools.getBool(this.options.attributionEnabled,!0);if(t&&i){this.$attribution.show();var n=this.$attribution.find(".attribution-text"),o=this.$attribution.find(".license"),s=this.$attribution.find(".logo");n.html(this.extension.sanitize(t)),n.find("img").one("load",function(){e.resize()}).each(function(){this.complete&&$(this).load()}),n.targetBlank(),n.toggleExpandText(this.options.trimAttributionCount,function(){e.resize()}),o.hide(),s.hide()}},t.prototype.resize=function(){e.prototype.resize.call(this);var t=i.$leftPanel.is(":visible")?Math.floor(i.$leftPanel.width()):0,n=i.$rightPanel.is(":visible")?Math.floor(i.$rightPanel.width()):0,o=Math.floor(this.$element.parent().width()-t-n);this.$element.css({left:t,width:o});var s;s=this.options&&this.options.titleEnabled===!1?0:this.$title.height(),this.$content.height(this.$element.height()-s),this.$content.width(this.$element.width()),this.$attribution&&this.$attribution.is(":visible")&&this.$attribution.css("top",this.$content.height()-this.$attribution.outerHeight()-this.$attribution.verticalMargins())},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-mediaelementcenterpanel-module/MediaElementCenterPanel",["require","exports","../uv-shared-module/BaseCommands","../../extensions/uv-mediaelement-extension/Commands","../uv-shared-module/CenterPanel"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("mediaelementCenterPanel"),e.prototype.create.call(this);var t=this;this.extension.isVideo()&&$.subscribe(i.TOGGLE_FULLSCREEN,function(e){t.bootstrapper.isFullScreen?(t.$container.css("backgroundColor","#000"),t.player.enterFullScreen(!1)):(t.$container.css("backgroundColor","transparent"),t.player.exitFullScreen(!1))}),$.subscribe(i.OPEN_EXTERNAL_RESOURCE,function(e,i){t.openMedia(i)}),this.$container=$('
'),this.$content.append(this.$container),this.title=this.extension.helper.getLabel()},t.prototype.openMedia=function(e){var t=this,i=this;this.extension.getExternalResources(e).then(function(){t.$container.empty();var e=t.extension.helper.getCurrentCanvas();t.mediaHeight=t.config.defaultHeight,t.mediaWidth=t.config.defaultWidth,t.$container.height(t.mediaHeight),t.$container.width(t.mediaWidth);var o=Utils.Dates.getTimeStamp(),s=t.extension.getPosterImageUri(),r=s?' poster="'+s+'"':"",a=[];if(_.each(e.getRenderings(),function(e){a.push({type:e.getFormat().toString(),src:e.id})}),t.extension.isVideo())t.media=t.$container.append(' "),t.player=new MediaElementPlayer("#"+o,{type:["video/mp4","video/webm","video/flv"],plugins:["flash"],alwaysShowControls:!1,autosizeProgress:!1,success:function(e){
-e.addEventListener("canplay",function(e){i.resize()}),e.addEventListener("play",function(e){$.publish(n.MEDIA_PLAYED,[Math.floor(i.player.media.currentTime)])}),e.addEventListener("pause",function(e){Math.floor(i.player.media.currentTime)!=Math.floor(i.player.media.duration)&&$.publish(n.MEDIA_PAUSED,[Math.floor(i.player.media.currentTime)])}),e.addEventListener("ended",function(e){$.publish(n.MEDIA_ENDED,[Math.floor(i.player.media.duration)])}),e.setSrc(a);try{e.load()}catch(t){}}});else{var l=0;for(var h in a)if("audio/mp3"===a[h].type){l=h;break}t.media=t.$container.append(' "),t.player=new MediaElementPlayer("#"+o,{plugins:["flash"],alwaysShowControls:!1,autosizeProgress:!1,defaultVideoWidth:i.mediaWidth,defaultVideoHeight:i.mediaHeight,success:function(e){e.addEventListener("canplay",function(e){i.resize()}),e.addEventListener("play",function(e){$.publish(n.MEDIA_PLAYED,[Math.floor(i.player.media.currentTime)])}),e.addEventListener("pause",function(e){Math.floor(i.player.media.currentTime)!=Math.floor(i.player.media.duration)&&$.publish(n.MEDIA_PAUSED,[Math.floor(i.player.media.currentTime)])}),e.addEventListener("ended",function(e){$.publish(n.MEDIA_ENDED,[Math.floor(i.player.media.duration)])});try{e.load()}catch(t){}}})}t.resize()})},t.prototype.resize=function(){if(e.prototype.resize.call(this),"Firefox"===window.browserDetect.browser&&window.browserDetect.version<13)this.$container.width(this.mediaWidth),this.$container.height(this.mediaHeight);else{var t=Utils.Measurements.Dimensions.fitRect(this.mediaWidth,this.mediaHeight,this.$content.width(),this.$content.height());this.$container.height(t.height),this.$container.width(t.width)}this.player&&!this.extension.isFullScreen()&&this.player.resize();var i=Math.floor((this.$content.width()-this.$container.width())/2),n=Math.floor((this.$content.height()-this.$container.height())/2);this.$container.css({left:i,top:n}),this.$title.ellipsisFill(this.title)},t}(o);return s});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/BaseExpandPanel",["require","exports","./BaseView"],function(e,t,i){var n=function(e){function t(t){e.call(this,t,!1,!0),this.isExpanded=!1,this.isFullyExpanded=!1,this.isUnopened=!0,this.autoToggled=!1,this.expandFullEnabled=!0}return __extends(t,e),t.prototype.create=function(){var t=this;e.prototype.create.call(this),this.$top=$('
'),this.$element.append(this.$top),this.$title=$('
'),this.$title.prop("title",this.content.title),this.$top.append(this.$title),this.$expandFullButton=$(' '),this.$expandFullButton.prop("title",this.content.expandFull),this.$top.append(this.$expandFullButton),Utils.Bools.getBool(this.config.options.expandFullEnabled,!0)||this.$expandFullButton.hide(),this.$collapseButton=$('
'),this.$collapseButton.prop("title",this.content.collapse),this.$top.append(this.$collapseButton),this.$closed=$('
'),this.$element.append(this.$closed),this.$expandButton=$(' '),this.$expandButton.prop("title",this.content.expand),this.$closed.append(this.$expandButton),this.$closedTitle=$(' '),this.$closedTitle.prop("title",this.content.title),this.$closed.append(this.$closedTitle),this.$main=$('
'),this.$element.append(this.$main),this.$expandButton.onPressed(function(){t.toggle()}),this.$expandFullButton.onPressed(function(){t.expandFull()}),this.$closedTitle.onPressed(function(){t.toggle()}),this.$title.onPressed(function(){t.isFullyExpanded?t.collapseFull():t.toggle()}),this.$collapseButton.onPressed(function(){t.isFullyExpanded?t.collapseFull():t.toggle()}),this.$top.hide(),this.$main.hide()},t.prototype.init=function(){e.prototype.init.call(this)},t.prototype.setTitle=function(e){this.$title.text(e),this.$closedTitle.text(e)},t.prototype.toggle=function(e){var t=this;e?this.autoToggled=!0:this.autoToggled=!1,this.isExpanded&&(this.$top.hide(),this.$main.hide(),this.$closed.show()),this.$element.stop().animate({width:this.getTargetWidth(),left:this.getTargetLeft()},this.options.panelAnimationDuration,function(){t.toggled()})},t.prototype.toggled=function(){this.toggleStart(),this.isExpanded=!this.isExpanded,this.isExpanded&&(this.$closed.hide(),this.$top.show(),this.$main.show()),this.toggleFinish(),this.isUnopened=!1},t.prototype.expandFull=function(){var e=this,t=this.getFullTargetWidth(),i=this.getFullTargetLeft();this.expandFullStart(),this.$element.stop().animate({width:t,left:i},this.options.panelAnimationDuration,function(){e.expandFullFinish()})},t.prototype.collapseFull=function(){var e=this,t=this.getTargetWidth(),i=this.getTargetLeft();this.collapseFullStart(),this.$element.stop().animate({width:t,left:i},this.options.panelAnimationDuration,function(){e.collapseFullFinish()})},t.prototype.getTargetWidth=function(){return 0},t.prototype.getTargetLeft=function(){return 0},t.prototype.getFullTargetWidth=function(){return 0},t.prototype.getFullTargetLeft=function(){return 0},t.prototype.toggleStart=function(){},t.prototype.toggleFinish=function(){this.isExpanded&&!this.autoToggled?this.focusCollapseButton():this.focusExpandButton()},t.prototype.expandFullStart=function(){},t.prototype.expandFullFinish=function(){this.isFullyExpanded=!0,this.$expandFullButton.hide(),this.focusCollapseButton()},t.prototype.collapseFullStart=function(){},t.prototype.collapseFullFinish=function(){this.isFullyExpanded=!1,this.expandFullEnabled&&this.$expandFullButton.show(),this.focusExpandFullButton()},t.prototype.focusExpandButton=function(){var e=this;setTimeout(function(){e.$expandButton.focus()},1)},t.prototype.focusExpandFullButton=function(){var e=this;setTimeout(function(){e.$expandFullButton.focus()},1)},t.prototype.focusCollapseButton=function(){var e=this;setTimeout(function(){e.$collapseButton.focus()},1)},t.prototype.resize=function(){e.prototype.resize.call(this),this.$main.height(this.$element.parent().height()-this.$top.outerHeight(!0))},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/RightPanel",["require","exports","./BaseCommands","./BaseExpandPanel"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){e.prototype.create.call(this),this.$element.width(this.options.panelCollapsedWidth)},t.prototype.init=function(){var t=this;e.prototype.init.call(this),this.options.panelOpen&&this.toggle(!0),$.subscribe(i.TOGGLE_EXPAND_RIGHT_PANEL,function(){t.isFullyExpanded?t.collapseFull():t.expandFull()})},t.prototype.getTargetWidth=function(){return this.isExpanded?this.options.panelCollapsedWidth:this.options.panelExpandedWidth},t.prototype.getTargetLeft=function(){return this.isExpanded?this.$element.parent().width()-this.options.panelCollapsedWidth:this.$element.parent().width()-this.options.panelExpandedWidth},t.prototype.toggleFinish=function(){e.prototype.toggleFinish.call(this),this.isExpanded?$.publish(i.OPEN_RIGHT_PANEL):$.publish(i.CLOSE_RIGHT_PANEL)},t.prototype.resize=function(){e.prototype.resize.call(this),this.$element.css({left:Math.floor(this.$element.parent().width()-this.$element.outerWidth())})},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-moreinforightpanel-module/MoreInfoRightPanel",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/RightPanel"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("moreInfoRightPanel"),e.prototype.create.call(this),$.subscribe(i.CANVAS_INDEX_CHANGED,function(e,i){t.databind()}),this.setTitle(this.config.content.title),this.$metadata=$('
'),this.$main.append(this.$metadata),this.component=new IIIFComponents.MetadataComponent(this._getOptions())},t.prototype.toggleFinish=function(){e.prototype.toggleFinish.call(this),this.databind()},t.prototype.databind=function(){this.component.options=this._getOptions(),this.component.databind()},t.prototype._getOptions=function(){var e=this;return{canvasDisplayOrder:this.config.options.canvasDisplayOrder,canvases:this.extension.getCurrentCanvases(),canvasExclude:this.config.options.canvasExclude,canvasLabels:this.extension.getCanvasLabels(this.content.page),content:this.config.content,copiedMessageDuration:2e3,copyToClipboardEnabled:Utils.Bools.getBool(this.config.options.copyToClipboardEnabled,!1),element:".rightPanel .iiif-metadata-component",helper:this.extension.helper,licenseFormatter:null,limit:this.config.options.textLimit||4,limitType:IIIFComponents.MetadataComponentOptions.LimitType.LINES,manifestDisplayOrder:this.config.options.manifestDisplayOrder,manifestExclude:this.config.options.manifestExclude,range:this.extension.getCurrentCanvasRange(),rtlLanguageCodes:this.config.options.rtlLanguageCodes,sanitizer:function(t){return e.extension.sanitize(t)},showAllLanguages:this.config.options.showAllLanguages}},t.prototype.resize=function(){e.prototype.resize.call(this),this.$main.height(this.$element.height()-this.$top.height()-this.$main.verticalMargins())},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/LeftPanel",["require","exports","./BaseCommands","./BaseExpandPanel"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;e.prototype.create.call(this),this.$element.width(this.options.panelCollapsedWidth),$.subscribe(i.TOGGLE_EXPAND_LEFT_PANEL,function(){t.isFullyExpanded?t.collapseFull():t.expandFull()})},t.prototype.init=function(){e.prototype.init.call(this),this.options.panelOpen&&this.toggle(!0)},t.prototype.getTargetWidth=function(){return this.isFullyExpanded||!this.isExpanded?this.options.panelExpandedWidth:this.options.panelCollapsedWidth},t.prototype.getFullTargetWidth=function(){return this.$element.parent().width()},t.prototype.toggleFinish=function(){e.prototype.toggleFinish.call(this),this.isExpanded?$.publish(i.OPEN_LEFT_PANEL):$.publish(i.CLOSE_LEFT_PANEL)},t.prototype.resize=function(){e.prototype.resize.call(this),this.isFullyExpanded&&this.$element.width(this.$element.parent().width())},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-shared-module/ThumbsView",["require","exports","./BaseCommands","./BaseView"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t,!0,!0),this.isCreated=!1,this.isOpen=!1}return __extends(t,e),t.prototype.create=function(){var t=this;e.prototype.create.call(this),$.subscribe(i.CANVAS_INDEX_CHANGED,function(e,i){t.selectIndex(parseInt(i))}),$.subscribe(i.LOGIN,function(){t.loadThumbs()}),$.subscribe(i.CLICKTHROUGH,function(){t.loadThumbs()}),this.$thumbs=$('
'),this.$element.append(this.$thumbs),this.$thumbs.addClass(this.extension.helper.getViewingDirection().toString());var n=this;$.templates({thumbsTemplate:'
{{:#index + 1}} {{>label}} {{if ~separator()}}
{{/if}}'});var o=this.options.thumbsExtraHeight;$.views.helpers({separator:function(){return!1},extraHeight:function(){return o},className:function(){var e="thumb";0===this.data.index&&(e+=" first"),this.data.uri||(e+=" placeholder");var t=n.extension.helper.getViewingDirection().toString();return e+=t===manifesto.ViewingDirection.topToBottom().toString()||t===manifesto.ViewingDirection.bottomToTop().toString()?" oneCol":" twoCol"}}),this.$element.on("scroll",function(){t.scrollStop()},100),this.resize()},t.prototype.databind=function(){this.thumbs&&this.createThumbs()},t.prototype.createThumbs=function(){var e=this;if(!this.isCreated&&this.thumbs){for(var t=[],n=0;n1&&(e=1);var t=Math.floor((this.thumbs.length-1)*e);this.loadThumbs(t)},t.prototype.loadThumbs=function(e){if(this.thumbs&&this.thumbs.length){_.isUndefined(e)&&(e=this.extension.helper.canvasIndex);for(var t=e,i=this.options.thumbsLoadRange,n={start:t>i?t-i:0,end:t ');$(u).hide().load(function(){$(this).fadeIn(o,function(){$(this).parent().swapClass("loading","loaded")})}).error(function(){$(this).parent().swapClass("loading","loadingFailed")}),a.append(u)}else a.addClass("hidden")}}}},t.prototype.show=function(){var e=this;this.isOpen=!0,this.$element.show(),setTimeout(function(){e.selectIndex(e.extension.helper.canvasIndex)},1)},t.prototype.hide=function(){this.isOpen=!1,this.$element.hide()},t.prototype.isPDF=function(){return this.extension.helper.getElementType().toString().contains("pdf")},t.prototype.setLabel=function(){$(this.$thumbs).find("span.index").hide(),$(this.$thumbs).find("span.label").show()},t.prototype.addSelectedClassToThumbs=function(e){this.getThumbByIndex(e).addClass("selected")},t.prototype.selectIndex=function(e){-1!=e&&this.thumbs&&this.thumbs.length&&(this.getAllThumbs().removeClass("selected"),this.$selectedThumb=this.getThumbByIndex(e),this.addSelectedClassToThumbs(e),this.lastThumbClickedIndex!=e&&this.$element.scrollTop(this.$selectedThumb.position().top),this.loadThumbs(e))},t.prototype.getAllThumbs=function(){return this._thumbsCache||(this._thumbsCache=this.$thumbs.find(".thumb")),this._thumbsCache},t.prototype.getThumbByIndex=function(e){return this.$thumbs.find('[data-index="'+e+'"]')},t.prototype.scrollToThumb=function(e){var t=this.getThumbByIndex(e);this.$element.scrollTop(t.position().top)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-resourcesleftpanel-module/ThumbsView",["require","exports","../uv-shared-module/ThumbsView"],function(e,t,i){var n=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.create=function(){this.setConfig("resourcesLeftPanel"),e.prototype.create.call(this)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-resourcesleftpanel-module/ResourcesLeftPanel",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/LeftPanel","./ThumbsView"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("resourcesLeftPanel"),e.prototype.create.call(this),this.setTitle(this.content.title),this.$tabsContent=$('
'),this.$main.append(this.$tabsContent),this.$views=$('
'),this.$tabsContent.append(this.$views),this.$thumbsView=$('
'),this.$views.append(this.$thumbsView),this.$resourcesView=$('
'),this.$resources=$(""),this.$resourcesView.append(this.$resources),this.$views.append(this.$resourcesView),this.thumbsView=new o(this.$thumbsView),this.dataBind()},t.prototype.dataBind=function(){this.dataBindThumbsView();var e=this.extension.helper.getResources();0===e.length&&this.$resourcesView.hide();for(var t=0;t'+Manifesto.TranslationCollection.getValue(n.getLabel())+" ("+Utils.Files.simplifyMimeType(n.getFormat().toString())+")");this.$resources.append(o)}},t.prototype.dataBindThumbsView=function(){if(this.thumbsView){var e,t,i=this.extension.helper.getViewingDirection().toString();i===manifesto.ViewingDirection.topToBottom().toString()||i===manifesto.ViewingDirection.bottomToTop().toString()?(e=this.config.options.oneColThumbWidth,t=this.config.options.oneColThumbHeight):(e=this.config.options.twoColThumbWidth,t=this.config.options.twoColThumbHeight),"undefined"==typeof e&&(e=100),"undefined"==typeof t&&(t=100),this.thumbsView.thumbs=this.extension.helper.getThumbs(e,t),this.thumbsView.thumbs.length<2&&this.$thumbsView.hide(),this.thumbsView.databind()}},t.prototype.expandFullStart=function(){e.prototype.expandFullStart.call(this),$.publish(i.LEFTPANEL_EXPAND_FULL_START)},t.prototype.expandFullFinish=function(){e.prototype.expandFullFinish.call(this),$.publish(i.LEFTPANEL_EXPAND_FULL_FINISH)},t.prototype.collapseFullStart=function(){e.prototype.collapseFullStart.call(this),$.publish(i.LEFTPANEL_COLLAPSE_FULL_START)},t.prototype.collapseFullFinish=function(){e.prototype.collapseFullFinish.call(this),$.publish(i.LEFTPANEL_COLLAPSE_FULL_FINISH)},t.prototype.resize=function(){e.prototype.resize.call(this),this.$views.height(this.$main.height()),this.$resources.height(this.$main.height())},t}(n);return s}),define("_Version",["require","exports"],function(e,t){t.Version="1.8.38"});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/SettingsDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue","../../_Version"],function(e,t,i,n,o,s){var r=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("settingsDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_SETTINGS_DIALOGUE,this.closeCommand=i.HIDE_SETTINGS_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open()}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$title=$(" "),this.$content.append(this.$title),this.$scroll=$('
'),this.$content.append(this.$scroll),this.$version=$('
'),this.$content.append(this.$version),this.$website=$('
'),this.$content.append(this.$website),this.$locale=$('
'),this.$scroll.append(this.$locale),this.$localeLabel=$(''+this.content.locale+" "),this.$locale.append(this.$localeLabel),this.$localeDropDown=$(' '),this.$locale.append(this.$localeDropDown),this.$title.text(this.content.title),this.$version.text("v"+s.Version),this.$website.html(this.content.website),this.$website.targetBlank();for(var n=this.extension.getLocales(),o=0;o'+r.label+"")}this.$localeDropDown.val(this.extension.locale),this.$localeDropDown.change(function(){t.extension.changeLocale(t.$localeDropDown.val())}),this.extension.getLocales().length<2&&this.$locale.hide(),this.$element.hide()},t.prototype.getSettings=function(){return this.extension.getSettings()},t.prototype.updateSettings=function(e){this.extension.updateSettings(e),$.publish(n.UPDATE_SETTINGS,[e])},t.prototype.open=function(){e.prototype.open.call(this)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(o);return r});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-mediaelement-extension/SettingsDialogue",["require","exports","../../modules/uv-dialogues-module/SettingsDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("settingsDialogue"),e.prototype.create.call(this)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-mediaelement-extension/Extension",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-shared-module/BaseExtension","../../modules/uv-shared-module/Bookmark","./Commands","./DownloadDialogue","./ShareDialogue","../../modules/uv-shared-module/FooterPanel","../../modules/uv-shared-module/HeaderPanel","../../modules/uv-dialogues-module/HelpDialogue","../../modules/uv-mediaelementcenterpanel-module/MediaElementCenterPanel","../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel","../../modules/uv-resourcesleftpanel-module/ResourcesLeftPanel","./SettingsDialogue","../../modules/uv-shared-module/Shell"],function(e,t,i,n,o,s,r,a,l,h,u,c,p,d,g,f){var m=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(t){var n=this;e.prototype.create.call(this,t),$(window).bind("enterfullscreen",function(){$.publish(i.TOGGLE_FULLSCREEN)}),$(window).bind("exitfullscreen",function(){$.publish(i.TOGGLE_FULLSCREEN)}),$.subscribe(i.THUMB_SELECTED,function(e,t){n.viewCanvas(t)}),$.subscribe(i.LEFTPANEL_EXPAND_FULL_START,function(e){f.$centerPanel.hide(),f.$rightPanel.hide()}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_FINISH,function(e){f.$centerPanel.show(),f.$rightPanel.show(),n.resize()}),$.subscribe(s.MEDIA_ENDED,function(e){n.triggerSocket(s.MEDIA_ENDED)}),$.subscribe(s.MEDIA_PAUSED,function(e){n.triggerSocket(s.MEDIA_PAUSED)}),$.subscribe(s.MEDIA_PLAYED,function(e){n.triggerSocket(s.MEDIA_PLAYED)})},t.prototype.createModules=function(){e.prototype.createModules.call(this),this.isHeaderPanelEnabled()?this.headerPanel=new h(f.$headerPanel):f.$headerPanel.hide(),this.isLeftPanelEnabled()&&(this.leftPanel=new d(f.$leftPanel)),this.centerPanel=new c(f.$centerPanel),this.isRightPanelEnabled()&&(this.rightPanel=new p(f.$rightPanel)),this.isFooterPanelEnabled()?this.footerPanel=new l(f.$footerPanel):f.$footerPanel.hide(),this.$helpDialogue=$('
'),f.$overlays.append(this.$helpDialogue),this.helpDialogue=new u(this.$helpDialogue),this.$downloadDialogue=$('
'),f.$overlays.append(this.$downloadDialogue),this.downloadDialogue=new r(this.$downloadDialogue),this.$shareDialogue=$('
'),f.$overlays.append(this.$shareDialogue),this.shareDialogue=new a(this.$shareDialogue),this.$settingsDialogue=$('
'),f.$overlays.append(this.$settingsDialogue),this.settingsDialogue=new g(this.$settingsDialogue),this.isLeftPanelEnabled()&&this.leftPanel.init(),this.isRightPanelEnabled()&&this.rightPanel.init()},t.prototype.isLeftPanelEnabled=function(){return Utils.Bools.getBool(this.config.options.leftPanelEnabled,!0)&&(this.helper.isMultiCanvas()||this.helper.isMultiSequence()||this.helper.hasResources())},t.prototype.bookmark=function(){e.prototype.bookmark.call(this);var t=this.extensions.helper.getCurrentCanvas(),n=new o;n.index=this.helper.canvasIndex,n.label=Manifesto.TranslationCollection.getValue(t.getLabel()),n.path=this.getBookmarkUri(),n.thumb=t.getProperty("thumbnail"),n.title=this.helper.getLabel(),n.trackingLabel=window.trackingLabel,this.isVideo()?n.type=manifesto.ElementType.movingimage().toString():n.type=manifesto.ElementType.sound().toString(),this.triggerSocket(i.BOOKMARK,n)},t.prototype.getEmbedScript=function(e,t,i){var n=this.config.uri||"",o=String.format(e,this.getSerializedLocales(),n,this.helper.iiifResourceUri,this.helper.collectionIndex,this.helper.manifestIndex,this.helper.sequenceIndex,this.helper.canvasIndex,t,i,this.embedScriptUri);return o},t.prototype.getPosterImageUri=function(){return this.helper.getCurrentCanvas().getProperty("thumbnail")},t.prototype.isVideo=function(){var e=this.helper.getElementType();return e.toString()===manifesto.ElementType.movingimage().toString()},t}(n);return m});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-pdf-extension/DownloadDialogue",["require","exports","../../modules/uv-dialogues-module/DownloadDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("downloadDialogue"),e.prototype.create.call(this)},t.prototype.open=function(t){e.prototype.open.call(this,t),this.addEntireFileDownloadOptions(),this.$downloadOptions.find("li:visible").length?this.$noneAvailable.hide():this.$noneAvailable.show(),this.resize()},t.prototype.isDownloadOptionAvailable=function(t){return e.prototype.isDownloadOptionAvailable.call(this,t)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-pdf-extension/ShareDialogue",["require","exports","../../modules/uv-dialogues-module/ShareDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("shareDialogue"),e.prototype.create.call(this)},t.prototype.update=function(){e.prototype.update.call(this),this.code=this.extension.getEmbedScript(this.options.embedTemplate,this.currentWidth,this.currentHeight),this.$code.val(this.code)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-pdfcenterpanel-module/PDFCenterPanel",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/CenterPanel","../../Params"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("pdfCenterPanel"),e.prototype.create.call(this),$.subscribe(i.OPEN_EXTERNAL_RESOURCE,function(e,i){t.openMedia(i)})},t.prototype.openMedia=function(e){var t=this,i=this;this.extension.getExternalResources(e).then(function(){var e=t.extension.helper.getCurrentCanvas(),n=e.id,s=window.browserDetect.browser,r=window.browserDetect.version;if("Explorer"===s&&10>r||!t.config.options.usePdfJs)new PDFObject({url:n,id:"PDF"}).embed("content");else{var a;a=window.DEBUG?"modules/uv-pdfcenterpanel-module/html/viewer.html":"html/uv-pdfcenterpanel-module/viewer.html",t.$content.load(a,function(){window.DEBUG?PDFJS.workerSrc="extensions/uv-pdf-extension/lib/pdf.worker.min.js":PDFJS.workerSrc="lib/pdf.worker.min.js",PDFJS.DEFAULT_URL=n;var e=1+parseInt(i.extension.getParam(o.anchor))||0;PDFView.initialBookmark="page="+e,window.webViewerLoad(),t.resize()})}})},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(n);return s});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-pdf-extension/SettingsDialogue",["require","exports","../../modules/uv-dialogues-module/SettingsDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("settingsDialogue"),e.prototype.create.call(this)},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-pdf-extension/Extension",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-shared-module/BaseExtension","../../modules/uv-shared-module/Bookmark","./DownloadDialogue","./ShareDialogue","../../modules/uv-shared-module/FooterPanel","../../modules/uv-shared-module/HeaderPanel","../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel","../../modules/uv-pdfcenterpanel-module/PDFCenterPanel","../../modules/uv-resourcesleftpanel-module/ResourcesLeftPanel","./SettingsDialogue","../../modules/uv-shared-module/Shell"],function(e,t,i,n,o,s,r,a,l,h,u,c,p,d){var g=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(t){var n=this;e.prototype.create.call(this),$.subscribe(i.THUMB_SELECTED,function(e,t){n.viewCanvas(t.index)}),$.subscribe(i.LEFTPANEL_EXPAND_FULL_START,function(e){d.$centerPanel.hide(),d.$rightPanel.hide()}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_FINISH,function(e){d.$centerPanel.show(),d.$rightPanel.show(),n.resize()}),$.subscribe(i.SHOW_OVERLAY,function(e,t){n.IsOldIE()&&n.centerPanel.$element.hide()}),$.subscribe(i.HIDE_OVERLAY,function(e,t){n.IsOldIE()&&n.centerPanel.$element.show()})},t.prototype.IsOldIE=function(){var e=window.browserDetect.browser,t=window.browserDetect.version;return"Explorer"===e&&9>=t?!0:!1},t.prototype.createModules=function(){e.prototype.createModules.call(this),this.isHeaderPanelEnabled()?this.headerPanel=new l(d.$headerPanel):d.$headerPanel.hide(),this.isLeftPanelEnabled()&&(this.leftPanel=new c(d.$leftPanel)),this.centerPanel=new u(d.$centerPanel),this.isRightPanelEnabled()&&(this.rightPanel=new h(d.$rightPanel)),this.isFooterPanelEnabled()?this.footerPanel=new a(d.$footerPanel):d.$footerPanel.hide(),this.$downloadDialogue=$('
'),d.$overlays.append(this.$downloadDialogue),this.downloadDialogue=new s(this.$downloadDialogue),this.$shareDialogue=$('
'),d.$overlays.append(this.$shareDialogue),this.shareDialogue=new r(this.$shareDialogue),
-this.$settingsDialogue=$('
'),d.$overlays.append(this.$settingsDialogue),this.settingsDialogue=new p(this.$settingsDialogue),this.isLeftPanelEnabled()&&this.leftPanel.init(),this.isRightPanelEnabled()&&this.rightPanel.init()},t.prototype.bookmark=function(){e.prototype.bookmark.call(this);var t=this.helper.getCurrentCanvas(),n=new o;n.index=this.helper.canvasIndex,n.label=Manifesto.TranslationCollection.getValue(t.getLabel()),n.path=this.getBookmarkUri(),n.thumb=t.getProperty("thumbnail"),n.title=this.helper.getLabel(),n.trackingLabel=window.trackingLabel,n.type=manifesto.ElementType.document().toString(),this.triggerSocket(i.BOOKMARK,n)},t.prototype.getEmbedScript=function(e,t,i){var n=this.config.uri||"",o=String.format(e,this.getSerializedLocales(),n,this.helper.iiifResourceUri,this.helper.collectionIndex,this.helper.manifestIndex,this.helper.sequenceIndex,this.helper.canvasIndex,t,i,this.embedScriptUri);return o},t}(n);return g}),define("extensions/uv-seadragon-extension/Commands",["require","exports"],function(e,t){var i=function(){function e(){}return e.namespace="seadragonExtension.",e.CLEAR_SEARCH=e.namespace+"onClearSearch",e.CURRENT_VIEW_URI=e.namespace+"onCurrentViewUri",e.FIRST=e.namespace+"onFirst",e.GALLERY_DECREASE_SIZE=e.namespace+"onGalleryDecreaseSize",e.GALLERY_INCREASE_SIZE=e.namespace+"onGalleryIncreaseSize",e.GALLERY_THUMB_SELECTED=e.namespace+"onGalleryThumbSelected",e.HIDE_MULTISELECT_DIALOGUE=e.namespace+"onHideMultiSelectDialogue",e.IMAGE_SEARCH=e.namespace+"onImageSearch",e.LAST=e.namespace+"onLast",e.MODE_CHANGED=e.namespace+"onModeChanged",e.MULTISELECT_CHANGE=e.namespace+"onMultiSelectChange",e.MULTISELECTION_MADE=e.namespace+"onMultiSelectionMade",e.NEXT_SEARCH_RESULT=e.namespace+"onNextSearchResult",e.NEXT=e.namespace+"onNext",e.OPEN_THUMBS_VIEW=e.namespace+"onOpenThumbsView",e.OPEN_TREE_VIEW=e.namespace+"onOpenTreeView",e.PAGE_SEARCH=e.namespace+"onPageSearch",e.PAGING_TOGGLED=e.namespace+"onPagingToggled",e.PREV_SEARCH_RESULT=e.namespace+"onPrevSearchResult",e.PREV=e.namespace+"onPrev",e.PRINT=e.namespace+"onPrint",e.ROTATE=e.namespace+"onRotate",e.SEADRAGON_ANIMATION_FINISH=e.namespace+"onAnimationfinish",e.SEADRAGON_ANIMATION_START=e.namespace+"onAnimationStart",e.SEADRAGON_ANIMATION=e.namespace+"onAnimation",e.SEADRAGON_OPEN=e.namespace+"onOpen",e.SEADRAGON_RESIZE=e.namespace+"onResize",e.SEADRAGON_ROTATION=e.namespace+"onRotation",e.SEARCH_PREVIEW_FINISH=e.namespace+"onSearchPreviewFinish",e.SEARCH_PREVIEW_START=e.namespace+"onSearchPreviewStart",e.SEARCH_RESULTS_EMPTY=e.namespace+"onSearchResultsEmpty",e.SEARCH_RESULTS=e.namespace+"onSearchResults",e.SEARCH=e.namespace+"onSearch",e.SHOW_MULTISELECT_DIALOGUE=e.namespace+"onShowMultiSelectDialogue",e.THUMB_MULTISELECTED=e.namespace+"onThumbMultiSelected",e.TREE_NODE_MULTISELECTED=e.namespace+"onTreeNodeMultiSelected",e.TREE_NODE_SELECTED=e.namespace+"onTreeNodeSelected",e.VIEW_PAGE=e.namespace+"onViewPage",e.ZOOM_IN=e.namespace+"onZoomIn",e.ZOOM_OUT=e.namespace+"onZoomOut",e}();return i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-contentleftpanel-module/GalleryView",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/BaseView","../../extensions/uv-seadragon-extension/Commands"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t,!0,!0),this.isOpen=!1}return __extends(t,e),t.prototype.create=function(){this.setConfig("contentLeftPanel"),e.prototype.create.call(this),this.$gallery=$('
'),this.$element.append(this.$gallery)},t.prototype.setup=function(){this.component=new IIIFComponents.GalleryComponent(this.galleryOptions),this.component.on("thumbSelected",function(e){var t=e[0];$.publish(o.GALLERY_THUMB_SELECTED,[t]),$.publish(i.THUMB_SELECTED,[t])}),this.component.on("decreaseSize",function(){$.publish(o.GALLERY_DECREASE_SIZE)}),this.component.on("increaseSize",function(){$.publish(o.GALLERY_INCREASE_SIZE)})},t.prototype.databind=function(){this.component.options=this.galleryOptions,this.component.databind(),this.resize()},t.prototype.show=function(){var e=this;this.isOpen=!0,this.$element.show(),setTimeout(function(){e.component.selectIndex(e.extension.helper.canvasIndex)},10)},t.prototype.hide=function(){this.isOpen=!1,this.$element.hide()},t.prototype.resize=function(){e.prototype.resize.call(this);var t=$(this.galleryOptions.element),i=t.find(".main"),n=t.find(".header");i.height(this.$element.height()-n.height())},t}(n);return s}),define("extensions/uv-seadragon-extension/Mode",["require","exports"],function(e,t){var i=function(){function e(e){this.value=e}return e.prototype.toString=function(){return this.value},e.image=new e("image"),e.page=new e("page"),e}();return i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-contentleftpanel-module/ThumbsView",["require","exports","../uv-shared-module/ThumbsView","../../extensions/uv-seadragon-extension/Commands","../../extensions/uv-seadragon-extension/Mode"],function(e,t,i,n,o){var s=function(e){function t(){e.apply(this,arguments)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("contentLeftPanel"),e.prototype.create.call(this),$.subscribe(n.MODE_CHANGED,function(e,i){t.setLabel()}),$.subscribe(n.SEARCH_PREVIEW_START,function(e,i){t.searchPreviewStart(i)}),$.subscribe(n.SEARCH_PREVIEW_FINISH,function(){t.searchPreviewFinish()}),this.extension.helper.isPaged()&&this.$thumbs.addClass("paged");var i=this;$.views.helpers({separator:function(){return i.extension.helper.isVerticallyAligned()?!0:i.extension.helper.isPaged()?(this.data.index-1)%2==0?!1:!0:!1}})},t.prototype.addSelectedClassToThumbs=function(e){var t=this;if(this.extension.isPagingSettingEnabled()){var i=this.extension.getPagedIndices(e);_.each(i,function(e){t.getThumbByIndex(e).addClass("selected")})}else this.getThumbByIndex(e).addClass("selected")},t.prototype.isPageModeEnabled=function(){return"function"==typeof this.extension.getMode?this.config.options.pageModeEnabled&&this.extension.getMode().toString()===o.page.toString():this.config.options.pageModeEnabled},t.prototype.searchPreviewStart=function(e){this.scrollToThumb(e);var t=this.getThumbByIndex(e);t.addClass("searchpreview")},t.prototype.searchPreviewFinish=function(){this.scrollToThumb(this.extension.helper.canvasIndex),this.getAllThumbs().removeClass("searchpreview")},t.prototype.setLabel=function(){this.isPDF()?($(this.$thumbs).find("span.index").hide(),$(this.$thumbs).find("span.label").hide()):this.isPageModeEnabled()?($(this.$thumbs).find("span.index").hide(),$(this.$thumbs).find("span.label").show()):($(this.$thumbs).find("span.index").show(),$(this.$thumbs).find("span.label").hide())},t}(i);return s});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-contentleftpanel-module/TreeView",["require","exports","../uv-shared-module/BaseView","../../extensions/uv-seadragon-extension/Commands"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t,!0,!0),this.isOpen=!1}return __extends(t,e),t.prototype.create=function(){this.setConfig("contentLeftPanel"),e.prototype.create.call(this),this.$tree=$('
'),this.$element.append(this.$tree)},t.prototype.setup=function(){this.component=new IIIFComponents.TreeComponent(this.treeOptions),this.component.on("treeNodeSelected",function(e){var t=e[0];$.publish(n.TREE_NODE_SELECTED,[t])}),this.component.on("treeNodeMultiSelected",function(e){var t=e[0];$.publish(n.TREE_NODE_MULTISELECTED,[t])})},t.prototype.databind=function(){this.component.options=this.treeOptions,this.component.databind(),this.resize()},t.prototype.show=function(){this.isOpen=!0,this.$element.show()},t.prototype.hide=function(){this.isOpen=!1,this.$element.hide()},t.prototype.selectNode=function(e){this.component.selectNode(e)},t.prototype.deselectCurrentNode=function(){this.component.deselectCurrentNode()},t.prototype.getNodeById=function(e){return this.component.getNodeById(e)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-contentleftpanel-module/ContentLeftPanel",["require","exports","../uv-shared-module/BaseCommands","../../extensions/uv-seadragon-extension/Commands","./GalleryView","../uv-shared-module/LeftPanel","../uv-shared-module/Metrics","../../extensions/uv-seadragon-extension/Mode","./ThumbsView","./TreeView"],function(e,t,i,n,o,s,r,a,l,h){var u=function(e){function t(t){e.call(this,t),this.expandFullEnabled=!1,this.isThumbsViewOpen=!1,this.isTreeViewOpen=!1,this.treeSortType=Manifold.TreeSortType.NONE}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("contentLeftPanel"),e.prototype.create.call(this);$.subscribe(i.SETTINGS_CHANGED,function(){t.databind()}),$.subscribe(n.GALLERY_THUMB_SELECTED,function(){t.collapseFull()}),$.subscribe(i.METRIC_CHANGED,function(){t.extension.metric===r.MOBILE_LANDSCAPE&&t.isFullyExpanded&&t.collapseFull()}),$.subscribe(i.CANVAS_INDEX_CHANGED,function(e,i){t.isFullyExpanded&&t.collapseFull(),t.selectCurrentTreeNode(),t.updateTreeTabBySelection()}),this.$tabs=$('
'),this.$main.append(this.$tabs),this.$treeButton=$(''+this.content.index+" "),this.$tabs.append(this.$treeButton),this.$thumbsButton=$(''+this.content.thumbnails+" "),this.$thumbsButton.prop("title",this.content.thumbnails),this.$tabs.append(this.$thumbsButton),this.$tabsContent=$('
'),this.$main.append(this.$tabsContent),this.$options=$('
'),this.$tabsContent.append(this.$options),this.$topOptions=$('
'),this.$options.append(this.$topOptions),this.$treeSelect=$(" "),this.$topOptions.append(this.$treeSelect),this.$bottomOptions=$('
'),this.$options.append(this.$bottomOptions),this.$leftOptions=$('
'),this.$bottomOptions.append(this.$leftOptions),this.$rightOptions=$('
'),this.$bottomOptions.append(this.$rightOptions),this.$treeViewOptions=$('
'),this.$leftOptions.append(this.$treeViewOptions),this.$sortByLabel=$(''+this.content.sortBy+" "),this.$treeViewOptions.append(this.$sortByLabel),this.$sortButtonGroup=$('
'),this.$treeViewOptions.append(this.$sortButtonGroup),this.$sortByDateButton=$(''+this.content.date+" "),this.$sortButtonGroup.append(this.$sortByDateButton),this.$sortByVolumeButton=$(''+this.content.volume+" "),this.$sortButtonGroup.append(this.$sortByVolumeButton),this.$views=$('
'),this.$tabsContent.append(this.$views),this.$treeView=$('
'),this.$views.append(this.$treeView),this.$thumbsView=$('
'),this.$views.append(this.$thumbsView),this.$galleryView=$('
'),this.$views.append(this.$galleryView),this.$treeSelect.hide(),this.$treeSelect.change(function(){t.databindTreeView(),t.selectCurrentTreeNode(),t.updateTreeTabBySelection()}),this.$sortByDateButton.on("click",function(){t.sortByDate()}),this.$sortByVolumeButton.on("click",function(){t.sortByVolume()}),this.$treeViewOptions.hide(),this.$treeButton.onPressed(function(){t.openTreeView(),$.publish(n.OPEN_TREE_VIEW)}),this.$thumbsButton.onPressed(function(){t.openThumbsView(),$.publish(n.OPEN_THUMBS_VIEW)}),this.setTitle(this.content.title),this.$sortByVolumeButton.addClass("on");var o=this.options.tabOrder;if(o){o=o.toLowerCase(),o=o.replace(/ /g,"");var s=o.split(",");"thumbs"===s[0]?(this.$treeButton.before(this.$thumbsButton),this.$thumbsButton.addClass("first")):this.$treeButton.addClass("first")}},t.prototype.createTreeView=function(){this.treeView=new h(this.$treeView),this.treeView.treeOptions=this.getTreeOptions(),this.treeView.setup(),this.databindTreeView();var e=this.extension.helper.getTopRanges();if(e.length>1)for(var t=0;t'+Manifesto.TranslationCollection.getValue(i.getLabel())+"")}this.updateTreeViewOptions()},t.prototype.databind=function(){this.databindThumbsView(),this.databindTreeView(),this.databindGalleryView()},t.prototype.updateTreeViewOptions=function(){var e=this.getTreeData();this.isCollection()&&this.extension.helper.treeHasNavDates(e)?this.$treeViewOptions.show():this.$treeViewOptions.hide(),this.$treeSelect.find("option").length?this.$treeSelect.show():this.$treeSelect.hide()},t.prototype.sortByDate=function(){this.treeSortType=Manifold.TreeSortType.DATE,this.treeView.treeOptions=this.getTreeOptions(),this.treeView.databind(),this.selectCurrentTreeNode(),this.$sortByDateButton.addClass("on"),this.$sortByVolumeButton.removeClass("on"),this.resize()},t.prototype.sortByVolume=function(){this.treeSortType=Manifold.TreeSortType.NONE,this.treeView.treeOptions=this.getTreeOptions(),this.treeView.databind(),this.selectCurrentTreeNode(),this.$sortByDateButton.removeClass("on"),this.$sortByVolumeButton.addClass("on"),this.resize()},t.prototype.isCollection=function(){var e=this.getTreeData();return e.data.type===manifesto.TreeNodeType.collection().toString()},t.prototype.databindTreeView=function(){this.treeView&&(this.treeView.treeOptions=this.getTreeOptions(),this.treeView.databind(),this.selectCurrentTreeNode())},t.prototype.getTreeOptions=function(){return{element:".views .treeView .iiif-tree-component",helper:this.extension.helper,topRangeIndex:this.getSelectedTopRangeIndex(),treeSortType:this.treeSortType}},t.prototype.updateTreeTabByCanvasIndex=function(){var e=this.extension.helper.getTopRanges();if(e.length>1){var t=this.getCurrentCanvasTopRangeIndex(),i=e[t];this.setTreeTabTitle(Manifesto.TranslationCollection.getValue(i.getLabel()))}else this.setTreeTabTitle(this.content.index)},t.prototype.setTreeTabTitle=function(e){this.$treeButton.text(e),this.$treeButton.prop("title",e)},t.prototype.updateTreeTabBySelection=function(){var e,t=this.extension.helper.getTopRanges();t.length>1&&(e=this.treeView?this.getSelectedTree().text():Manifesto.TranslationCollection.getValue(t[0].getLabel())),e?this.setTreeTabTitle(e):this.setTreeTabTitle(this.content.index)},t.prototype.getViewingDirection=function(){return this.extension.helper.getViewingDirection()},t.prototype.createThumbsView=function(){this.thumbsView=new l(this.$thumbsView),this.databindThumbsView()},t.prototype.databindThumbsView=function(){if(this.thumbsView){var e,t,i=this.getViewingDirection().toString();i===manifesto.ViewingDirection.topToBottom().toString()||i===manifesto.ViewingDirection.bottomToTop().toString()?(e=this.config.options.oneColThumbWidth,t=this.config.options.oneColThumbHeight):(e=this.config.options.twoColThumbWidth,t=this.config.options.twoColThumbHeight);var n=this.extension.helper.getThumbs(e,t);i===manifesto.ViewingDirection.bottomToTop().toString()&&n.reverse(),this.thumbsView.thumbs=n,this.thumbsView.databind()}},t.prototype.createGalleryView=function(){this.galleryView=new o(this.$galleryView),this.galleryView.galleryOptions=this.getGalleryOptions(),this.galleryView.setup(),this.databindGalleryView()},t.prototype.databindGalleryView=function(){this.galleryView&&(this.galleryView.galleryOptions=this.getGalleryOptions(),this.galleryView.databind())},t.prototype.getGalleryOptions=function(){return{element:".views .galleryView .iiif-gallery-component",helper:this.extension.helper,chunkedResizingEnabled:this.config.options.galleryThumbChunkedResizingEnabled,chunkedResizingThreshold:this.config.options.galleryThumbChunkedResizingThreshold,content:this.config.content,debug:!1,imageFadeInDuration:300,initialZoom:6,pageModeEnabled:this.isPageModeEnabled(),scrollStopDuration:100,sizingEnabled:Modernizr.inputtypes.range,thumbHeight:this.config.options.galleryThumbHeight,thumbLoadPadding:this.config.options.galleryThumbLoadPadding,thumbWidth:this.config.options.galleryThumbWidth,viewingDirection:this.getViewingDirection()}},t.prototype.isPageModeEnabled=function(){return"function"==typeof this.extension.getMode?Utils.Bools.getBool(this.config.options.pageModeEnabled,!0)&&this.extension.getMode().toString()===a.page.toString():Utils.Bools.getBool(this.config.options.pageModeEnabled,!0)},t.prototype.getSelectedTree=function(){return this.$treeSelect.find(":selected")},t.prototype.getSelectedTopRangeIndex=function(){var e=this.getSelectedTree().index();return-1===e&&(e=0),e},t.prototype.getTreeData=function(){var e=this.getSelectedTopRangeIndex();return this.extension.helper.getTree(e,Manifold.TreeSortType.NONE)},t.prototype.toggleFinish=function(){if(e.prototype.toggleFinish.call(this),this.isUnopened){var t=Utils.Bools.getBool(this.config.options.treeEnabled,!0),i=Utils.Bools.getBool(this.config.options.thumbsEnabled,!0),n=this.getTreeData();n&&n.nodes.length||(t=!1),t&&i||this.$tabs.hide(),i&&this.defaultToThumbsView()?this.openThumbsView():t&&this.openTreeView()}},t.prototype.defaultToThumbsView=function(){var e=Utils.Bools.getBool(this.config.options.defaultToTreeEnabled,!1),t=this.config.options.defaultToTreeIfGreaterThan||0,i=this.getTreeData();return e&&i.nodes.length>t?!1:!0},t.prototype.expandFullStart=function(){e.prototype.expandFullStart.call(this),$.publish(i.LEFTPANEL_EXPAND_FULL_START)},t.prototype.expandFullFinish=function(){e.prototype.expandFullFinish.call(this),this.$treeButton.hasClass("on")?this.openTreeView():this.$thumbsButton.hasClass("on")&&this.openThumbsView(),$.publish(i.LEFTPANEL_EXPAND_FULL_FINISH)},t.prototype.collapseFullStart=function(){e.prototype.collapseFullStart.call(this),$.publish(i.LEFTPANEL_COLLAPSE_FULL_START)},t.prototype.collapseFullFinish=function(){e.prototype.collapseFullFinish.call(this),this.$thumbsButton.hasClass("on")&&this.openThumbsView(),$.publish(i.LEFTPANEL_COLLAPSE_FULL_FINISH)},t.prototype.openTreeView=function(){this.isTreeViewOpen=!0,this.isThumbsViewOpen=!1,this.treeView||this.createTreeView(),this.$treeButton.addClass("on"),this.$thumbsButton.removeClass("on"),this.treeView.show(),this.thumbsView&&this.thumbsView.hide(),this.galleryView&&this.galleryView.hide(),this.updateTreeViewOptions(),this.selectCurrentTreeNode(),this.resize(),this.treeView.resize()},t.prototype.openThumbsView=function(){this.isTreeViewOpen=!1,this.isThumbsViewOpen=!0,this.thumbsView||this.createThumbsView(),this.isFullyExpanded&&!this.galleryView&&this.createGalleryView(),this.$treeButton.removeClass("on"),this.$thumbsButton.addClass("on"),this.treeView&&this.treeView.hide(),this.$treeSelect.hide(),this.$treeViewOptions.hide(),this.resize(),this.isFullyExpanded?(this.thumbsView.hide(),this.galleryView&&this.galleryView.show(),this.galleryView&&this.galleryView.resize()):(this.galleryView&&this.galleryView.hide(),this.thumbsView.show(),this.thumbsView.resize())},t.prototype.selectTopRangeIndex=function(e){this.$treeSelect.prop("selectedIndex",e)},t.prototype.getCurrentCanvasTopRangeIndex=function(){var e=-1,t=this.extension.getCurrentCanvasRange();return t&&(e=Number(t.path.split("/")[0])),e},t.prototype.selectCurrentTreeNode=function(){if(this.treeView){var e,t=this.getCurrentCanvasTopRangeIndex(),i=this.getSelectedTopRangeIndex(),n=t===i;if(-1!=t){var o=this.extension.getCurrentCanvasRange();o&&o.treeNode&&(e=this.treeView.getNodeById(o.treeNode.id))}e&&n?this.treeView.selectNode(e):this.treeView.deselectCurrentNode()}},t.prototype.resize=function(){e.prototype.resize.call(this),this.$tabsContent.height(this.$main.height()-(this.$tabs.is(":visible")?this.$tabs.height():0)-this.$tabsContent.verticalPadding()),this.$views.height(this.$tabsContent.height()-this.$options.outerHeight())},t}(s);return u}),define("modules/uv-shared-module/Point",["require","exports"],function(e,t){var i=function(){function e(e,t){this.x=e,this.y=t}return e}();return i}),define("extensions/uv-seadragon-extension/CroppedImageDimensions",["require","exports","../../modules/uv-shared-module/Point"],function(e,t,i){var n=Utils.Measurements.Size,o=function(){function e(){this.region=new n(0,0),this.regionPos=new i(0,0),this.size=new n(0,0)}return e}();return o}),define("extensions/uv-seadragon-extension/DownloadType",["require","exports"],function(e,t){var i=function(){function e(){}return e.CURRENTVIEW="currentView",e.ENTIREDOCUMENTASPDF="entireDocumentAsPdf",e.ENTIREDOCUMENTASTEXT="entireDocumentAsText",e.WHOLEIMAGEHIGHRES="wholeImageHighRes",e.WHOLEIMAGESHIGHRES="wholeImageHighRes",e.WHOLEIMAGELOWRES="wholeImageLowRes",e.UNKNOWN="unknown",e}();return i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/DownloadDialogue",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-dialogues-module/DownloadDialogue","./Commands","../../modules/uv-shared-module/DownloadOption","./DownloadType"],function(e,t,i,n,o,s,r){var a=Utils.Measurements.Size,l=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("downloadDialogue"),e.prototype.create.call(this),this.$imageOptionsContainer=$(' '),this.$downloadOptions.append(this.$imageOptionsContainer),this.$imageOptions=$(""),this.$imageOptionsContainer.append(this.$imageOptions),this.$currentViewAsJpgButton=$(' '),this.$imageOptions.append(this.$currentViewAsJpgButton),this.$currentViewAsJpgButton.hide(),this.$wholeImageHighResButton=$(' '),this.$imageOptions.append(this.$wholeImageHighResButton),this.$wholeImageHighResButton.hide(),this.$wholeImagesHighResButton=$(' '),this.$imageOptions.append(this.$wholeImagesHighResButton),this.$wholeImageHighResButton.hide(),this.$wholeImageLowResAsJpgButton=$(''+this.content.wholeImageLowResAsJpg+" "),this.$imageOptions.append(this.$wholeImageLowResAsJpgButton),this.$wholeImageLowResAsJpgButton.hide(),this.$canvasOptionsContainer=$(' '),this.$downloadOptions.append(this.$canvasOptionsContainer),this.$canvasOptions=$(""),this.$canvasOptionsContainer.append(this.$canvasOptions),this.$sequenceOptionsContainer=$(' '),this.$downloadOptions.append(this.$sequenceOptionsContainer),this.$sequenceOptions=$(""),this.$sequenceOptionsContainer.append(this.$sequenceOptions),this.$selectionButton=$(' '),this.$sequenceOptions.append(this.$selectionButton),this.$selectionButton.hide(),this.$buttonsContainer=$('
'),this.$content.append(this.$buttonsContainer),this.$downloadButton=$(''+this.content.download+" "),this.$buttonsContainer.append(this.$downloadButton),this.$explanatoryTextTemplate=$(' ');var n=this;this.$downloadButton.on("click",function(e){e.preventDefault();var a=n.getSelectedOption(),l=a.attr("id"),h=a.attr("title"),u=a.data("mime"),c=r.UNKNOWN,p=t.extension.helper.getCurrentCanvas();if(t.renderingUrls[l])u&&(-1!==u.toLowerCase().indexOf("pdf")?c=r.ENTIREDOCUMENTASPDF:-1!==u.toLowerCase().indexOf("txt")&&(c=r.ENTIREDOCUMENTASTEXT)),(c=r.ENTIREDOCUMENTASPDF)&&window.open(t.renderingUrls[l]);else switch(l){case s.currentViewAsJpg.toString():var d=n.extension.getViewer();window.open(n.extension.getCroppedImageUri(p,d)),c=r.CURRENTVIEW;break;case s.selection.toString():Utils.Async.waitFor(function(){return!t.isActive},function(){$.publish(o.SHOW_MULTISELECT_DIALOGUE)});break;case s.wholeImageHighRes.toString():window.open(t.getCanvasHighResImageUri(t.extension.helper.getCurrentCanvas())),c=r.WHOLEIMAGEHIGHRES;break;case s.wholeImagesHighRes.toString():for(var g=t.extension.getPagedIndices(),f=0;f=S&&x>=S?this.$currentViewAsJpgButton.hide():this.$currentViewAsJpgButton.show()}var C=this.$imageOptions.find("li.single");C=C.sort(function(e,t){var i=$(e).data("width");i?i=parseInt(i.toString()):0;var n=$(e).data("height");n?n=parseInt(n.toString()):0;var o=$(t).data("width");o?o=parseInt(o.toString()):0;var s=$(t).data("height");s?s=parseInt(s.toString()):0;var r=i*n,a=o*s;return a>r?-1:r>a?1:0}),C.detach().appendTo(this.$imageOptions);var _=this.$downloadOptions.find("li.group");_.each(function(e,t){var i=$(t);i.show(),i.find("li.option:hidden").length===i.find("li.option").length&&i.hide()}),this.$downloadOptions.find("li.group:visible").last().addClass("lastVisible"),this.$downloadOptions.find("li.option:visible").length?(this.$downloadOptions.find("li.option input:visible:first").prop("checked",!0),this.$noneAvailable.hide(),this.$downloadButton.show()):(this.$noneAvailable.show(),this.$downloadButton.hide()),this.resize()},t.prototype.resetDynamicDownloadOptions=function(){this.renderingUrls=[],this.renderingUrlsCount=0,this.$downloadOptions.find("li.dynamic").remove()},t.prototype.addDownloadOptionsForRenderings=function(e,t,i){for(var n=e.getRenderings(),o=0;o'+a+" ");switch(i){case s.dynamicImageRenderings:this.$imageOptions.append(u);break;case s.dynamicCanvasRenderings:this.$canvasOptions.append(u);break;case s.dynamicSequenceRenderings:this.$sequenceOptions.append(u)}}}},t.prototype.getSelectedOption=function(){return this.$downloadOptions.find("li.option input:checked")},t.prototype.getCanvasImageResource=function(e){var t=e.getImages();return t[0]?t[0].getResource():null},t.prototype.getCanvasHighResImageUri=function(e){var t=this.getCanvasComputedDimensions(e);if(t){var i=t.width,n=e.getCanonicalImageUri(i),o=n.split("/"),s=this.extension.getViewerRotation();return o[o.length-2]=String(s),n=o.join("/")}return""},t.prototype.getCanvasMimeType=function(e){var t=this.getCanvasImageResource(e),i=t.getFormat();return i?i.toString():null},t.prototype.getCanvasDimensions=function(e){return e.externalResource.data?new a(e.externalResource.data.width,e.externalResource.data.height):new a(0,0)},t.prototype.getCanvasMaxDimensions=function(e){return e.externalResource.data&&e.externalResource.data.profile[1]?new a(e.externalResource.data.profile[1].maxWidth,e.externalResource.data.profile[1].maxHeight):null},t.prototype.getCanvasComputedDimensions=function(e){var t=this.getCanvasDimensions(e),i=this.getCanvasMaxDimensions(e);if(!i)return null;var n=t.width,o=t.height;if(!_.isUndefined(i.width)&&i.width1?!0:!1;case s.wholeImageLowResAsJpg:var n=this.getCanvasComputedDimensions(this.extension.helper.getCurrentCanvas());return n?!this.extension.isPagingSettingEnabled()&&n.width>this.options.confinedImageSize:!1;case s.selection:return this.options.selectionEnabled;default:return e.prototype.isDownloadOptionAvailable.call(this,t)}},t}(n);return l});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/ExternalContentDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("externalContentDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_EXTERNALCONTENT_DIALOGUE,this.closeCommand=i.HIDE_EXTERNALCONTENT_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open(),t.$iframe.prop("src",i.uri)}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$iframe=$(""),this.$content.append(this.$iframe),this.$element.hide()},t.prototype.resize=function(){e.prototype.resize.call(this),this.$iframe.width(this.$content.width()),this.$iframe.height(this.$content.height())},t}(n);return o}),define("modules/uv-shared-module/AutoComplete",["require","exports"],function(e,t){var i=function(){function e(e,t,i,n,o,s,r){var a=this;void 0===o&&(o=300),void 0===s&&(s=2),void 0===r&&(r=!1),this.validKeyDownCodes=[KeyCodes.KeyDown.Backspace,KeyCodes.KeyDown.Spacebar,KeyCodes.KeyDown.Tab,KeyCodes.KeyDown.LeftArrow,KeyCodes.KeyDown.RightArrow,KeyCodes.KeyDown.Delete],this.lastKeyDownWasValid=!1,this.$element=e,this.autoCompleteFunc=t,this.delay=o,this.minChars=s,this.onSelect=n,this.parseResultsFunc=i,this.positionAbove=r,this.$searchResultsList=$(''),this.positionAbove?this.$element.parent().prepend(this.$searchResultsList):this.$element.parent().append(this.$searchResultsList),this.$searchResultTemplate=$(' ');var l=function(){var e=0;return function(t,i){clearTimeout(e),e=setTimeout(t,i)}}(),h=this;this.$element.on("keydown",function(e){var t=e.originalEvent;h.lastKeyDownWasValid=h.isValidKeyDown(t);var i=Utils.Keyboard.getCharCode(t),n=!1;i===KeyCodes.KeyDown.LeftArrow?n=!0:i===KeyCodes.KeyDown.RightArrow&&(n=!0),n&&(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation())}),this.$element.on("keypress",function(e){var t=h.isValidKeyPress(e.originalEvent);return h.lastKeyDownWasValid||t?!0:(e.preventDefault(),!1)}),this.$element.on("keyup",function(e){if(!h.getSelectedListItem().length&&e.keyCode===KeyCodes.KeyDown.Enter)return void h.onSelect(h.getTerms());if(h.$searchResultsList.is(":visible")&&h.results.length)if(e.keyCode===KeyCodes.KeyDown.Enter)h.searchForItem(h.getSelectedListItem());else{if(e.keyCode===KeyCodes.KeyDown.DownArrow)return void h.setSelectedResultIndex(1);if(e.keyCode===KeyCodes.KeyDown.UpArrow)return void h.setSelectedResultIndex(-1)}e.keyCode!==KeyCodes.KeyDown.Enter&&l(function(){var e=h.getTerms();e&&e.length>h.minChars&&!e.contains(" ")?h.search(e):(h.clearResults(),h.hideResults())},h.delay)}),$(document).on("mouseup",function(e){0===a.$searchResultsList.parent().has($(e.target)[0]).length&&(a.clearResults(),a.hideResults())}),this.hideResults()}return e.prototype.isValidKeyDown=function(e){return this.validKeyDownCodes.contains(Utils.Keyboard.getCharCode(e))},e.prototype.isValidKeyPress=function(e){var t=String.fromCharCode(Utils.Keyboard.getCharCode(e));return t.isAlphanumeric()},e.prototype.getTerms=function(){return this.$element.val().trim()},e.prototype.setSelectedResultIndex=function(e){var t;t=1===e?this.selectedResultIndex+1:this.selectedResultIndex-1;var i=this.$searchResultsList.find("li");0>t?t=i.length-1:t>i.length-1&&(t=0),this.selectedResultIndex=t,i.removeClass("selected");var n=i.eq(this.selectedResultIndex);n.addClass("selected");var o=n.outerHeight(!0)*this.selectedResultIndex;this.$searchResultsList.scrollTop(o)},e.prototype.search=function(e){this.results=[],this.clearResults(),this.showResults(),this.$searchResultsList.append(' '),this.updateListPosition();var t=this;this.autoCompleteFunc(e,function(e){t.listResults(e)})},e.prototype.clearResults=function(){this.$searchResultsList.empty()},e.prototype.hideResults=function(){this.$searchResultsList.hide()},e.prototype.showResults=function(){this.selectedResultIndex=-1,this.$searchResultsList.show()},e.prototype.updateListPosition=function(){this.positionAbove?this.$searchResultsList.css({top:-1*this.$searchResultsList.outerHeight(!0)}):this.$searchResultsList.css({top:this.$element.outerHeight(!0)})},e.prototype.listResults=function(e){if(this.results=this.parseResultsFunc(e),this.clearResults(),!this.results.length)return void this.hideResults();for(var t=0;t'+this.content.print+" "),this.$options.prepend(this.$printButton),this.$searchContainer=$('
'),this.$element.prepend(this.$searchContainer),this.$searchOptions=$('
'),this.$searchContainer.append(this.$searchOptions),this.$searchLabel=$(''+this.content.searchWithin+" "),this.$searchOptions.append(this.$searchLabel),this.$searchTextContainer=$('
'),this.$searchOptions.append(this.$searchTextContainer),this.$searchText=$(' '),this.$searchTextContainer.append(this.$searchText),this.$searchButton=$(' '),this.$searchTextContainer.append(this.$searchButton),this.$searchPagerContainer=$(''),this.$element.prepend(this.$searchPagerContainer),this.$searchPagerControls=$('
'),this.$searchPagerContainer.prepend(this.$searchPagerControls),this.$previousResultButton=$(''+this.content.previousResult+" "),this.$searchPagerControls.append(this.$previousResultButton),this.$searchResultsInfo=$('x \'y \'
'),this.$searchPagerControls.append(this.$searchResultsInfo),this.$clearSearchResultsButton=$(''+this.content.clearSearch+" "),this.$searchResultsInfo.append(this.$clearSearchResultsButton),this.$nextResultButton=$(''+this.content.nextResult+" "),this.$searchPagerControls.append(this.$nextResultButton),this.$searchResultsContainer=$('
'),this.$element.prepend(this.$searchResultsContainer),this.$line=$('
'),this.$searchResultsContainer.append(this.$line),this.$pagePositionMarker=$('
'),this.$searchResultsContainer.append(this.$pagePositionMarker),this.$pagePositionLabel=$('
'),this.$searchResultsContainer.append(this.$pagePositionLabel),this.$placemarkerDetails=$('
'),this.$searchResultsContainer.append(this.$placemarkerDetails),this.$placemarkerDetailsTop=$(" "),this.$placemarkerDetails.append(this.$placemarkerDetailsTop),this.$placemarkerDetailsBottom=$("
"),this.$placemarkerDetails.append(this.$placemarkerDetailsBottom),this.$searchPagerContainer.hide(),this.$placemarkerDetails.hide();var n=this;this.$searchButton.on("click",function(e){e.preventDefault(),t.search(t.$searchText.val())}),this.$searchText.on("focus",function(){t.$searchText.val()===t.content.enterKeyword&&t.$searchText.val("")}),this.$placemarkerDetails.on("mouseover",function(){$.publish(o.SEARCH_PREVIEW_START,[t.currentPlacemarkerIndex])}),this.$placemarkerDetails.on("mouseleave",function(){$(this).hide(),$.publish(o.SEARCH_PREVIEW_FINISH);var e=n.getSearchResultPlacemarkers();e.removeClass("hover")}),this.$placemarkerDetails.on("click",function(e){$.publish(o.VIEW_PAGE,[t.currentPlacemarkerIndex])}),this.$previousResultButton.on("click",function(e){e.preventDefault(),$.publish(o.PREV_SEARCH_RESULT)}),this.$nextResultButton.on("click",function(e){e.preventDefault(),$.publish(o.NEXT_SEARCH_RESULT)}),this.$clearSearchResultsButton.on("click",function(e){e.preventDefault(),$.publish(o.CLEAR_SEARCH),t.clearSearchResults()}),this.extension.isSearchWithinEnabled()||(this.$searchContainer.hide(),this.$searchPagerContainer.hide(),this.$searchResultsContainer.hide(),this.$element.addClass("min"));var r=this.extension.getAutoCompleteUri();r&&new s(this.$searchText,function(e,t){$.getJSON(String.format(r,e),function(e){t(e)})},function(e){return _.map(e.terms,function(e){return e.match})},function(e){t.search(e)},300,2,!0),this.$printButton.onPressed(function(){$.publish(o.PRINT)}),this.updatePrintButton();var a=Utils.Bools.getBool(this.config.options.positionMarkerEnabled,!0);a||(this.$pagePositionMarker.hide(),this.$pagePositionLabel.hide())},t.prototype.updatePrintButton=function(){var e=Utils.Bools.getBool(this.options.printEnabled,!1);e?this.$printButton.show():this.$printButton.hide()},t.prototype.search=function(e){return this.terms=e,""===this.terms||this.terms===this.content.enterKeyword?void this.extension.showMessage(this.config.modules.genericDialogue.content.emptyValue,function(){this.$searchText.focus()}):(this.$searchText.blur(),void $.publish(o.SEARCH,[this.terms]))},t.prototype.getSearchResultPlacemarkers=function(){return this.$searchResultsContainer.find(".searchResultPlacemarker")},t.prototype.setCurrentSearchResultPlacemarker=function(){var e=this.getSearchResultPlacemarkers();e.parent().find(".current").removeClass("current");var t=$('.searchResultPlacemarker[data-index="'+this.extension.helper.canvasIndex+'"]');t.addClass("current")},t.prototype.positionSearchResultPlacemarkers=function(){var e=this.extension.searchResults;if(e.length){var t=this.getSearchResultPlacemarkers();t.remove();for(var i=this.getPageLineRatio(),n=this.$line.position().top,o=this.$line.position().left,s=this,r=0;r');h[0].ontouchstart=function(e){s.onPlacemarkerTouchStart.call(this,s)},h.click(function(e){s.onPlacemarkerClick.call(this,s)}),h.mouseenter(function(e){s.onPlacemarkerMouseEnter.call(this,s)}),h.mouseleave(function(e){s.onPlacemarkerMouseLeave.call(this,e,s)}),this.$searchResultsContainer.append(h);var u=n-h.height(),c=o+l-h.width()/2;h.css({top:u,left:c})}}},t.prototype.onPlacemarkerTouchStart=function(e){e.placemarkerTouched=!0;var t=$(this),i=parseInt(t.attr("data-index"));$.publish(o.VIEW_PAGE,[i])},t.prototype.onPlacemarkerClick=function(e){if(!e.placemarkerTouched){e.placemarkerTouched=!1;var t=$(this),i=parseInt(t.attr("data-index"));$.publish(o.VIEW_PAGE,[i])}},t.prototype.onPlacemarkerMouseEnter=function(e){if(!e.placemarkerTouched){var t=$(this);t.addClass("hover");var i=parseInt(t.attr("data-index"));$.publish(o.SEARCH_PREVIEW_START,[i]);var n=e.getSearchResultPlacemarkers(),s=n.index(t[0]);e.currentPlacemarkerIndex=i,e.$placemarkerDetails.show();var a="{0} {1}",l=e.extension.getMode();if(l.toString()===r.page.toString()){var h=e.extension.helper.getCanvasByIndex(i),u=Manifesto.TranslationCollection.getValue(h.getLabel());""===u&&(u=this.extension.helper.manifest.options.defaultLabel),a=String.format(a,e.content.pageCaps,u)}else a=String.format(a,e.content.imageCaps,i+1);e.$placemarkerDetailsTop.html(a);var c,p=e.extension.searchResults[s],d=Utils.Strings.ellipsis(e.terms,e.options.elideDetailsTermsCount);1===p.rects.length?(c=e.content.instanceFound,c=String.format(c,d)):(c=e.content.instancesFound,c=String.format(c,p.rects.length,d)),e.$placemarkerDetailsBottom.html(c);var g=t.position(),f=g.top-e.$placemarkerDetails.height(),m=g.left;me.$line.width()-e.$placemarkerDetails.width()/2?m=e.$line.width()-e.$placemarkerDetails.width()+t.width()/2:m-=e.$placemarkerDetails.width()/2,e.$placemarkerDetails.css({top:f,left:m})}},t.prototype.onPlacemarkerMouseLeave=function(e,t){$.publish(o.SEARCH_PREVIEW_FINISH);var i=$(this),n=e.toElement||e.relatedTarget,s=$(n).closest(t.$placemarkerDetails).length;n!=t.$placemarkerDetails.get(0)&&0==s&&(t.$placemarkerDetails.hide(),i.removeClass("hover"))},t.prototype.setPageMarkerPosition=function(){if(null!=this.extension.helper.canvasIndex){var e=this.getPageLineRatio(),t=this.$line.position().top,i=this.$line.position().left,n=this.extension.helper.canvasIndex*e,o=t,s=i+n;this.$pagePositionMarker.css({top:o,left:s});var r=this.$line.width();s+this.$pagePositionLabel.outerWidth(!0)>r?(s-=this.$pagePositionLabel.outerWidth(!0),this.$pagePositionLabel.removeClass("right"),this.$pagePositionLabel.addClass("left")):(this.$pagePositionLabel.removeClass("left"),this.$pagePositionLabel.addClass("right")),this.$pagePositionLabel.css({top:o,left:s})}},t.prototype.clearSearchResults=function(){this.extension.searchResults=[];var e=this.getSearchResultPlacemarkers();e.remove(),this.$searchText.val(this.content.enterKeyword),this.$searchContainer.show(),this.$searchPagerContainer.hide(),this.$searchText.focus()},t.prototype.getPageLineRatio=function(){var e=this.$line.width();return 1===this.extension.helper.getTotalCanvases()?0:e/(this.extension.helper.getTotalCanvases()-1)},t.prototype.canvasIndexChanged=function(){this.setPageMarkerPosition(),this.setPlacemarkerLabel()},t.prototype.settingsChanged=function(){this.setPlacemarkerLabel()},t.prototype.setPlacemarkerLabel=function(){var e=this.content.displaying,t=this.extension.helper.canvasIndex;if(this.isPageModeEnabled()){var i=this.extension.helper.getCanvasByIndex(t),n=Manifesto.TranslationCollection.getValue(i.getLabel());""===n&&(n=this.content.defaultLabel);var o=this.extension.helper.getLastCanvasLabel(!0);this.$pagePositionLabel.html(String.format(e,this.content.page,this.extension.sanitize(n),this.extension.sanitize(o)))}else this.$pagePositionLabel.html(String.format(e,this.content.image,t+1,this.extension.helper.getTotalCanvases()))},t.prototype.isPageModeEnabled=function(){return this.config.options.pageModeEnabled&&this.extension.getMode().toString()===r.page.toString()},t.prototype.displaySearchResults=function(e,t){if(t){this.positionSearchResultPlacemarkers(),this.$searchContainer.hide(),this.$searchPagerControls.css({left:0});var i=this.$searchPagerContainer.find(".number");i.text(t.resources.length);var n=this.$searchResultsInfo.find(".foundFor");1===t.resources.length?n.html(this.content.resultFoundFor):n.html(this.content.resultsFoundFor);var o=this.$searchPagerContainer.find(".terms");o.html(Utils.Strings.ellipsis(e,this.options.elideResultsTermsCount)),o.prop("title",e),this.$searchPagerContainer.show(),this.resize()}},t.prototype.resize=function(){e.prototype.resize.call(this),this.extension.searchResults.length&&this.positionSearchResultPlacemarkers(),this.setPageMarkerPosition(),this.$searchPagerContainer.width(this.$element.width());var t=this.$element.width()/2;this.$searchPagerControls.css({left:t-this.$searchPagerControls.width()/2}),this.$searchOptions.css({left:t-this.$searchOptions.outerWidth()/2})},t}(n);return a});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-osdmobilefooterpanel-module/MobileFooter",["require","exports","../uv-shared-module/FooterPanel","../../extensions/uv-seadragon-extension/Commands"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("mobileFooterPanel"),e.prototype.create.call(this),this.$spacer=$('
'),this.$options.prepend(this.$spacer),this.$rotateButton=$(''+this.content.rotateRight+" "),this.$options.prepend(this.$rotateButton),this.$zoomOutButton=$(''+this.content.zoomOut+" "),this.$options.prepend(this.$zoomOutButton),this.$zoomInButton=$(''+this.content.zoomIn+" "),this.$options.prepend(this.$zoomInButton),this.$zoomInButton.onPressed(function(){$.publish(n.ZOOM_IN)}),this.$zoomOutButton.onPressed(function(){$.publish(n.ZOOM_OUT)}),this.$rotateButton.onPressed(function(){$.publish(n.ROTATE)})},t.prototype.resize=function(){e.prototype.resize.call(this),this.$options.css("left",Math.floor(this.$element.width()/2-this.$options.width()/2))},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/MoreInfoDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("moreInfoDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_MOREINFO_DIALOGUE,this.closeCommand=i.HIDE_MOREINFO_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open(i)}),$.subscribe(this.closeCommand,function(e){t.close()}),this.config.content=this.extension.config.modules.moreInfoRightPanel.content,this.config.options=this.extension.config.modules.moreInfoRightPanel.options,this.$title=$(""+this.config.content.title+" "),this.$content.append(this.$title),this.$metadata=$('
'),this.$content.append(this.$metadata),this.component=new IIIFComponents.MetadataComponent(this._getOptions()),this.$element.hide()},t.prototype.open=function(t){e.prototype.open.call(this,t),this.component.databind()},t.prototype._getOptions=function(){var e=this;return{canvasDisplayOrder:this.config.options.canvasDisplayOrder,canvases:this.extension.getCurrentCanvases(),canvasExclude:this.config.options.canvasExclude,canvasLabels:"Left Page, Right Page",content:this.config.content,copiedMessageDuration:2e3,copyToClipboardEnabled:Utils.Bools.getBool(this.config.options.copyToClipboardEnabled,!1),element:".overlay.moreInfo .iiif-metadata-component",helper:this.extension.helper,licenseFormatter:null,limit:this.config.options.textLimit||4,limitType:IIIFComponents.MetadataComponentOptions.LimitType.LINES,manifestDisplayOrder:this.config.options.manifestDisplayOrder,manifestExclude:this.config.options.manifestExclude,range:this.extension.getCurrentCanvasRange(),rtlLanguageCodes:this.config.options.rtlLanguageCodes,sanitizer:function(t){return e.extension.sanitize(t)},showAllLanguages:this.config.options.showAllLanguages}},t.prototype.close=function(){e.prototype.close.call(this)},t.prototype.resize=function(){this.setDockedPosition()},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-multiselectdialogue-module/MultiSelectDialogue",["require","exports","../../extensions/uv-seadragon-extension/Commands","../../modules/uv-shared-module/Dialogue","../../extensions/uv-seadragon-extension/Mode"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("multiSelectDialogue"),e.prototype.create.call(this);var n=this;this.openCommand=i.SHOW_MULTISELECT_DIALOGUE,this.closeCommand=i.HIDE_MULTISELECT_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open();var n=t.extension.helper.getMultiSelectState();n.setEnabled(!0),t.component.databind()}),$.subscribe(this.closeCommand,function(e){t.close();var i=t.extension.helper.getMultiSelectState();i.setEnabled(!1)}),this.$title=$(" "),this.$content.append(this.$title),this.$title.text(this.content.title),this.$gallery=$('
'),this.$content.append(this.$gallery),this.options={element:".overlay.multiSelect .iiif-gallery-component",helper:this.extension.helper,chunkedResizingEnabled:this.config.options.galleryThumbChunkedResizingEnabled,chunkedResizingThreshold:this.config.options.galleryThumbChunkedResizingThreshold,content:this.config.content,debug:!1,imageFadeInDuration:300,initialZoom:4,pageModeEnabled:this.isPageModeEnabled(),scrollStopDuration:100,sizingEnabled:!0,thumbHeight:this.config.options.galleryThumbHeight,thumbLoadPadding:this.config.options.galleryThumbLoadPadding,thumbWidth:this.config.options.galleryThumbWidth,viewingDirection:this.extension.helper.getViewingDirection()},this.component=new IIIFComponents.GalleryComponent(this.options);var o=$(this.options.element).find("a.select");o.addClass("btn btn-primary"),this.component.on("multiSelectionMade",function(e){var t=e[0];$.publish(i.MULTISELECTION_MADE,[t]),n.close()}),this.$element.hide()},t.prototype.isPageModeEnabled=function(){return Utils.Bools.getBool(this.config.options.pageModeEnabled,!0)&&this.extension.getMode().toString()===o.page.toString()},t.prototype.open=function(){e.prototype.open.call(this)},t.prototype.close=function(){e.prototype.close.call(this)},t.prototype.resize=function(){e.prototype.resize.call(this);var t=$(this.options.element),i=t.find(".main"),n=t.find(".header");i.height(this.$content.height()-this.$title.outerHeight()-this.$title.verticalMargins()-n.height())},t}(n);return s}),define("extensions/uv-seadragon-extension/MultiSelectionArgs",["require","exports"],function(e,t){var i=function(){function e(){}return e}();return i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-pagingheaderpanel-module/PagingHeaderPanel",["require","exports","../uv-shared-module/AutoComplete","../uv-shared-module/BaseCommands","../../extensions/uv-seadragon-extension/Commands","../uv-shared-module/HeaderPanel","../../extensions/uv-seadragon-extension/Mode"],function(e,t,i,n,o,s,r){var a=function(e){function t(t){e.call(this,t),this.firstButtonEnabled=!1,this.lastButtonEnabled=!1,this.nextButtonEnabled=!1,this.prevButtonEnabled=!1}return __extends(t,e),t.prototype.create=function(){var t=this;if(this.setConfig("pagingHeaderPanel"),e.prototype.create.call(this),$.subscribe(n.CANVAS_INDEX_CHANGED,function(e,i){t.canvasIndexChanged(i)}),$.subscribe(n.SETTINGS_CHANGED,function(e){t.modeChanged(),t.updatePagingToggle()}),$.subscribe(n.CANVAS_INDEX_CHANGE_FAILED,function(e){t.setSearchFieldValue(t.extension.helper.canvasIndex)}),$.subscribe(n.LEFTPANEL_EXPAND_FULL_START,function(e){t.openGallery()}),$.subscribe(n.LEFTPANEL_COLLAPSE_FULL_START,function(e){t.closeGallery()}),this.$prevOptions=$('
'),this.$centerOptions.append(this.$prevOptions),this.$firstButton=$(' '),this.$prevOptions.append(this.$firstButton),this.$prevButton=$(' '),this.$prevOptions.append(this.$prevButton),this.$modeOptions=$('
'),this.$centerOptions.append(this.$modeOptions),this.$imageModeLabel=$(''+this.content.image+" "),this.$modeOptions.append(this.$imageModeLabel),this.$imageModeOption=$(' '),this.$modeOptions.append(this.$imageModeOption),this.$pageModeLabel=$(' '),this.$modeOptions.append(this.$pageModeLabel),this.$pageModeOption=$(' '),this.$modeOptions.append(this.$pageModeOption),this.$search=$('
'),this.$centerOptions.append(this.$search),this.$searchText=$(' '),this.$search.append(this.$searchText),Utils.Bools.getBool(this.options.autoCompleteBoxEnabled,!0))this.$searchText.hide(),this.$autoCompleteBox=$(' '),this.$search.append(this.$autoCompleteBox),new i(this.$autoCompleteBox,function(e,i){var n=[],o=t.extension.helper.getCanvases();if(t.isPageModeEnabled())for(var s=0;s'),this.$centerOptions.append(this.$selectionBoxOptions),this.$imageSelectionBox=$(' '),this.$selectionBoxOptions.append(this.$imageSelectionBox);for(var s=0;s"+l+"")}this.$imageSelectionBox.change(function(){var e=parseInt(t.$imageSelectionBox.val());$.publish(o.IMAGE_SEARCH,[e])})}this.$total=$(' '),this.$search.append(this.$total),this.$searchButton=$(''+this.content.go+" "),this.$search.append(this.$searchButton),this.$nextOptions=$('
'),this.$centerOptions.append(this.$nextOptions),this.$nextButton=$(' '),this.$nextOptions.append(this.$nextButton),this.$lastButton=$(' '),this.$nextOptions.append(this.$lastButton),this.isPageModeEnabled()?(this.$pageModeOption.attr("checked","checked"),this.$pageModeOption.removeAttr("disabled"),this.$pageModeLabel.removeClass("disabled")):(this.$imageModeOption.attr("checked","checked"),this.$pageModeOption.attr("disabled","disabled"),this.$pageModeLabel.addClass("disabled")),this.extension.helper.getManifestType().toString()===manifesto.ManifestType.manuscript().toString()?this.$pageModeLabel.text(this.content.folio):this.$pageModeLabel.text(this.content.page),this.$galleryButton=$(' '),this.$rightOptions.prepend(this.$galleryButton),this.$pagingToggleButtons=$('
'),this.$rightOptions.prepend(this.$pagingToggleButtons),this.$oneUpButton=$(' '),this.$pagingToggleButtons.append(this.$oneUpButton),this.$twoUpButton=$(' '),this.$pagingToggleButtons.append(this.$twoUpButton),this.updatePagingToggle(),this.updateGalleryButton(),this.$oneUpButton.onPressed(function(){var e=!1;t.updateSettings({pagingEnabled:e}),$.publish(o.PAGING_TOGGLED,[e])}),this.$twoUpButton.onPressed(function(){var e=!0;t.updateSettings({pagingEnabled:e}),$.publish(o.PAGING_TOGGLED,[e])}),this.$galleryButton.onPressed(function(){$.publish(n.TOGGLE_EXPAND_LEFT_PANEL)}),this.setTitles(),this.setTotal();var h=this.extension.helper.getViewingDirection();1===this.extension.helper.getTotalCanvases()&&this.$centerOptions.hide(),
-this.$firstButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.topToBottom().toString():case manifesto.ViewingDirection.bottomToTop().toString():$.publish(o.FIRST);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.LAST)}}),this.$prevButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(o.PREV);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.NEXT)}}),this.$nextButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(o.NEXT);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.PREV)}}),this.$lastButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.topToBottom().toString():case manifesto.ViewingDirection.bottomToTop().toString():$.publish(o.LAST);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.FIRST)}}),this.config.options.pageModeEnabled?(this.$imageModeOption.on("click",function(e){$.publish(o.MODE_CHANGED,[r.image.toString()])}),this.$pageModeOption.on("click",function(e){$.publish(o.MODE_CHANGED,[r.page.toString()])})):(this.$imageModeOption.hide(),this.$pageModeLabel.hide(),this.$pageModeOption.hide()),this.$searchText.onEnter(function(){t.$searchText.blur(),t.search(t.$searchText.val())}),this.$searchText.click(function(){$(this).select()}),this.$searchButton.onPressed(function(){t.options.autoCompleteBoxEnabled?t.search(t.$autoCompleteBox.val()):t.search(t.$searchText.val())}),this.options.modeOptionsEnabled===!1&&(this.$modeOptions.hide(),this.$centerOptions.addClass("modeOptionsDisabled")),this.options.imageSelectionBoxEnabled===!0&&this.options.autoCompleteBoxEnabled!==!0&&this.$search.hide(),this.options.helpEnabled===!1&&this.$helpButton.hide(),Utils.Bools.getBool(this.options.pagingToggleEnabled,!0)||this.$pagingToggleButtons.hide()},t.prototype.openGallery=function(){this.$oneUpButton.removeClass("on"),this.$twoUpButton.removeClass("on"),this.$galleryButton.addClass("on")},t.prototype.closeGallery=function(){this.updatePagingToggle(),this.$galleryButton.removeClass("on")},t.prototype.isPageModeEnabled=function(){return this.config.options.pageModeEnabled&&this.extension.getMode().toString()===r.page.toString()},t.prototype.setTitles=function(){this.isPageModeEnabled()?(this.$firstButton.prop("title",this.content.firstPage),this.$prevButton.prop("title",this.content.previousPage),this.$nextButton.prop("title",this.content.nextPage),this.$lastButton.prop("title",this.content.lastPage)):(this.$firstButton.prop("title",this.content.firstImage),this.$prevButton.prop("title",this.content.previousImage),this.$nextButton.prop("title",this.content.nextImage),this.$lastButton.prop("title",this.content.lastImage)),this.$searchButton.prop("title",this.content.go)},t.prototype.updatePagingToggle=function(){return this.pagingToggleIsVisible()?void(this.extension.isPagingSettingEnabled()?(this.$oneUpButton.removeClass("on"),this.$twoUpButton.addClass("on")):(this.$twoUpButton.removeClass("on"),this.$oneUpButton.addClass("on"))):void this.$pagingToggleButtons.hide()},t.prototype.pagingToggleIsVisible=function(){return Utils.Bools.getBool(this.options.pagingToggleEnabled,!0)&&this.extension.helper.isPagingAvailable()},t.prototype.updateGalleryButton=function(){this.galleryIsVisible()||this.$galleryButton.hide()},t.prototype.galleryIsVisible=function(){return Utils.Bools.getBool(this.options.galleryButtonEnabled,!0)&&this.extension.isLeftPanelEnabled()},t.prototype.setTotal=function(){var e=this.content.of;this.isPageModeEnabled()?this.$total.html(String.format(e,this.extension.helper.getLastCanvasLabel(!0))):this.$total.html(String.format(e,this.extension.helper.getTotalCanvases()))},t.prototype.setSearchFieldValue=function(e){var t,i=this.extension.helper.getCanvasByIndex(e);if(this.isPageModeEnabled()){var n=Manifesto.TranslationCollection.getValue(i.getLabel());t="-"===n?"":n}else e+=1,t=e;this.options.autoCompleteBoxEnabled?this.$autoCompleteBox.val(t):this.$searchText.val(t)},t.prototype.search=function(e){if(!e)return this.extension.showMessage(this.content.emptyValue),void $.publish(n.CANVAS_INDEX_CHANGE_FAILED);if(this.isPageModeEnabled())$.publish(o.PAGE_SEARCH,[e]);else{var t;if(t=this.options.autoCompleteBoxEnabled?parseInt(this.$autoCompleteBox.val(),10):parseInt(this.$searchText.val(),10),t-=1,isNaN(t))return this.extension.showMessage(this.extension.config.modules.genericDialogue.content.invalidNumber),void $.publish(n.CANVAS_INDEX_CHANGE_FAILED);var i=this.extension.helper.getCanvasByIndex(t);if(!i)return this.extension.showMessage(this.extension.config.modules.genericDialogue.content.pageNotFound),void $.publish(n.CANVAS_INDEX_CHANGE_FAILED);$.publish(o.IMAGE_SEARCH,[t])}},t.prototype.canvasIndexChanged=function(e){this.setSearchFieldValue(e),this.options.imageSelectionBoxEnabled===!0&&this.options.autoCompleteBoxEnabled!==!0&&this.$imageSelectionBox.val(e);var t=this.extension.helper.getViewingDirection();t.toString()===manifesto.ViewingDirection.rightToLeft().toString()?(this.extension.helper.isFirstCanvas()?(this.disableLastButton(),this.disableNextButton()):(this.enableLastButton(),this.enableNextButton()),this.extension.helper.isLastCanvas()?(this.disableFirstButton(),this.disablePrevButton()):(this.enableFirstButton(),this.enablePrevButton())):(this.extension.helper.isFirstCanvas()?(this.disableFirstButton(),this.disablePrevButton()):(this.enableFirstButton(),this.enablePrevButton()),this.extension.helper.isLastCanvas()?(this.disableLastButton(),this.disableNextButton()):(this.enableLastButton(),this.enableNextButton()))},t.prototype.disableFirstButton=function(){this.firstButtonEnabled=!1,this.$firstButton.disable()},t.prototype.enableFirstButton=function(){this.firstButtonEnabled=!0,this.$firstButton.enable()},t.prototype.disableLastButton=function(){this.lastButtonEnabled=!1,this.$lastButton.disable()},t.prototype.enableLastButton=function(){this.lastButtonEnabled=!0,this.$lastButton.enable()},t.prototype.disablePrevButton=function(){this.prevButtonEnabled=!1,this.$prevButton.disable()},t.prototype.enablePrevButton=function(){this.prevButtonEnabled=!0,this.$prevButton.enable()},t.prototype.disableNextButton=function(){this.nextButtonEnabled=!1,this.$nextButton.disable()},t.prototype.enableNextButton=function(){this.nextButtonEnabled=!0,this.$nextButton.enable()},t.prototype.modeChanged=function(){this.setSearchFieldValue(this.extension.helper.canvasIndex),this.setTitles(),this.setTotal()},t.prototype.resize=function(){e.prototype.resize.call(this),this.extension.width()'),this.$content.prepend(this.$viewer),$.subscribe(i.OPEN_EXTERNAL_RESOURCE,function(e,i){Utils.Async.waitFor(function(){return t.isResized},function(){t.isCreated||t.createUI(),t.openMedia(i)})}),$.subscribe(n.ZOOM_IN,function(){Utils.Async.waitFor(function(){return t.isCreated},function(){t.zoomIn()})}),$.subscribe(n.ZOOM_OUT,function(){Utils.Async.waitFor(function(){return t.isCreated},function(){t.zoomOut()})}),$.subscribe(n.ROTATE,function(){Utils.Async.waitFor(function(){return t.isCreated},function(){t.rotateRight()})}),$.subscribe(i.METRIC_CHANGED,function(){Utils.Async.waitFor(function(){return t.isCreated},function(){t.updateResponsiveView()})})},t.prototype.zoomIn=function(){this.viewer.viewport.zoomTo(2*this.viewer.viewport.getZoom(!0))},t.prototype.zoomOut=function(){this.viewer.viewport.zoomTo(.5*this.viewer.viewport.getZoom(!0))},t.prototype.rotateRight=function(){this.viewer.viewport.setRotation(this.viewer.viewport.getRotation()+90)},t.prototype.updateResponsiveView=function(){this.setNavigatorVisible(),this.extension.metric===s.MOBILE_LANDSCAPE?(this.viewer.autoHideControls=!1,this.$viewportNavButtons.hide()):(this.viewer.autoHideControls=!0,this.$viewportNavButtons.show())},t.prototype.createUI=function(){var e=this;this.$spinner=$('
'),this.$content.append(this.$spinner),this.updateAttribution();var t=window.DEBUG?"modules/uv-seadragoncenterpanel-module/img/":"themes/"+this.extension.config.options.theme+"/img/uv-seadragoncenterpanel-module/";window.openSeadragonViewer=this.viewer=OpenSeadragon({id:"viewer",ajaxWithCredentials:!1,showNavigationControl:!0,showNavigator:!0,showRotationControl:!0,showHomeControl:Utils.Bools.getBool(this.config.options.showHomeControl,!1),showFullPageControl:!1,defaultZoomLevel:this.config.options.defaultZoomLevel||0,controlsFadeDelay:this.config.options.controlsFadeDelay||250,controlsFadeLength:this.config.options.controlsFadeLength||250,navigatorPosition:this.config.options.navigatorPosition||"BOTTOM_RIGHT",animationTime:this.config.options.animationTime||1.2,visibilityRatio:this.config.options.visibilityRatio||.5,constrainDuringPan:Utils.Bools.getBool(this.config.options.constrainDuringPan,!1),immediateRender:Utils.Bools.getBool(this.config.options.immediateRender,!1),blendTime:this.config.options.blendTime||0,autoHideControls:Utils.Bools.getBool(this.config.options.autoHideControls,!0),prefixUrl:t,navImages:{zoomIn:{REST:"zoom_in.png",GROUP:"zoom_in.png",HOVER:"zoom_in.png",DOWN:"zoom_in.png"},zoomOut:{REST:"zoom_out.png",GROUP:"zoom_out.png",HOVER:"zoom_out.png",DOWN:"zoom_out.png"},home:{REST:"home.png",GROUP:"home.png",HOVER:"home.png",DOWN:"home.png"},rotateright:{REST:"rotate_right.png",GROUP:"rotate_right.png",HOVER:"rotate_right.png",DOWN:"rotate_right.png"},rotateleft:{REST:"pixel.gif",GROUP:"pixel.gif",HOVER:"pixel.gif",DOWN:"pixel.gif"},next:{REST:"pixel.gif",GROUP:"pixel.gif",HOVER:"pixel.gif",DOWN:"pixel.gif"},previous:{REST:"pixel.gif",GROUP:"pixel.gif",HOVER:"pixel.gif",DOWN:"pixel.gif"}}}),this.$zoomInButton=this.$viewer.find('div[title="Zoom in"]'),this.$zoomInButton.attr("tabindex",0),this.$zoomInButton.prop("title",this.content.zoomIn),this.$zoomInButton.addClass("zoomIn viewportNavButton"),this.$zoomOutButton=this.$viewer.find('div[title="Zoom out"]'),this.$zoomOutButton.attr("tabindex",0),this.$zoomOutButton.prop("title",this.content.zoomOut),this.$zoomOutButton.addClass("zoomOut viewportNavButton"),this.$goHomeButton=this.$viewer.find('div[title="Go home"]'),this.$goHomeButton.attr("tabindex",0),this.$goHomeButton.prop("title",this.content.goHome),this.$goHomeButton.addClass("goHome viewportNavButton"),this.$rotateButton=this.$viewer.find('div[title="Rotate right"]'),this.$rotateButton.attr("tabindex",0),this.$rotateButton.prop("title",this.content.rotateRight),this.$rotateButton.addClass("rotate viewportNavButton"),this.$viewportNavButtonsContainer=this.$viewer.find(".openseadragon-container > div:not(.openseadragon-canvas):first"),this.$viewportNavButtons=this.$viewportNavButtonsContainer.find(".viewportNavButton"),this.$navigator=this.$viewer.find(".navigator"),this.setNavigatorVisible(),this.$element.on("mousemove",function(t){e.controlsVisible||(e.controlsVisible=!0,e.viewer.setControlsEnabled(!0))}),this.$element.on("mouseleave",function(t){e.controlsVisible&&(e.controlsVisible=!1,e.viewer.setControlsEnabled(!1))}),this.$element.on("mousemove",function(t){if(!e.$viewer.find(".navigator").ismouseover()){if(!e.controlsVisible)return;e.controlsVisible=!1,e.viewer.setControlsEnabled(!1)}},this.config.options.controlsFadeAfterInactive),this.viewer.addHandler("tile-drawn",function(){e.$spinner.hide()}),this.viewer.addHandler("resize",function(t){$.publish(n.SEADRAGON_RESIZE,[t]),e.viewerResize(t)}),this.viewer.addHandler("animation-start",function(e){$.publish(n.SEADRAGON_ANIMATION_START,[e])}),this.viewer.addHandler("animation",function(e){$.publish(n.SEADRAGON_ANIMATION,[e])}),this.viewer.addHandler("animation-finish",function(t){e.currentBounds=e.getBounds(),$.publish(n.SEADRAGON_ANIMATION_FINISH,[t])}),this.viewer.addHandler("rotate",function(e){$.publish(n.SEADRAGON_ROTATION,[e.degrees])}),this.title=this.extension.helper.getLabel(),this.createNavigationButtons(),this.hidePrevButton(),this.hideNextButton(),this.isCreated=!0,this.resize()},t.prototype.createNavigationButtons=function(){var e=this.extension.helper.getViewingDirection();switch(this.$prevButton=$('
'),this.$prevButton.prop("title",this.content.previous),this.$nextButton=$('
'),this.$nextButton.prop("title",this.content.next),this.viewer.addControl(this.$prevButton[0],{anchor:OpenSeadragon.ControlAnchor.TOP_LEFT}),this.viewer.addControl(this.$nextButton[0],{anchor:OpenSeadragon.ControlAnchor.TOP_RIGHT}),e.toString()){case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():this.$prevButton.addClass("vertical"),this.$nextButton.addClass("vertical")}var t=this;this.$prevButton.onPressed(function(i){if(i.preventDefault(),OpenSeadragon.cancelEvent(i),t.prevButtonEnabled)switch(e.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(n.PREV);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(n.NEXT)}}),this.$nextButton.onPressed(function(i){if(i.preventDefault(),OpenSeadragon.cancelEvent(i),t.nextButtonEnabled)switch(e.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(n.NEXT);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(n.PREV)}})},t.prototype.openMedia=function(e){var t=this;this.$spinner.show(),this.items=[],this.extension.getExternalResources(e).then(function(e){t.viewer.close(),e=t.getPagePositions(e);for(var i=0;i1)if(2===e.length)this.extension.helper.isVerticallyAligned()?(n=e[0],n.y=0,o=e[1],o.y=n.height+this.config.options.pageGap):(t=e[0],t.x=0,i=e[1],i.x=t.width+this.config.options.pageGap);else if(this.extension.helper.isVerticallyAligned())if(this.extension.helper.isTopToBottom())for(var a=0;a0;a--)s=e[a],r=e[a-1],r.y=(s.y||0)-s.height;else if(this.extension.helper.isLeftToRight())for(var a=0;a0;a--)s=e[a],r=e[a-1],r.x=(s.x||0)-s.width;return e},t.prototype.openPagesHandler=function(){if($.publish(n.SEADRAGON_OPEN),this.isFirstLoad)this.initialRotation=this.extension.getParam(r.rotation),this.initialRotation&&this.viewer.viewport.setRotation(parseInt(this.initialRotation)),this.initialBounds=this.extension.getParam(r.zoom),this.initialBounds?(this.initialBounds=this.deserialiseBounds(this.initialBounds),this.currentBounds=this.initialBounds,this.fitToBounds(this.currentBounds)):this.goHome();else{var e=this.extension.getSettings();e.preserveViewport&&this.currentBounds?this.fitToBounds(this.currentBounds):this.goHome()}if(this.extension.helper.isMultiCanvas()&&!this.extension.helper.isContinuous()){this.showPrevButton(),this.showNextButton(),$(".navigator").addClass("extraMargin");var t=this.extension.helper.getViewingDirection();t.toString()===manifesto.ViewingDirection.rightToLeft().toString()?(this.extension.helper.isFirstCanvas()?this.disableNextButton():this.enableNextButton(),this.extension.helper.isLastCanvas()?this.disablePrevButton():this.enablePrevButton()):(this.extension.helper.isFirstCanvas()?this.disablePrevButton():this.enablePrevButton(),this.extension.helper.isLastCanvas()?this.disableNextButton():this.enableNextButton())}this.setNavigatorVisible(),this.isFirstLoad=!1,this.overlaySearchResults()},t.prototype.goHome=function(){this.viewer.viewport.goHome(!0)},t.prototype.disablePrevButton=function(){this.prevButtonEnabled=!1,this.$prevButton.addClass("disabled")},t.prototype.enablePrevButton=function(){this.prevButtonEnabled=!0,this.$prevButton.removeClass("disabled")},t.prototype.hidePrevButton=function(){this.disablePrevButton(),this.$prevButton.hide()},t.prototype.showPrevButton=function(){this.enablePrevButton(),this.$prevButton.show()},t.prototype.disableNextButton=function(){this.nextButtonEnabled=!1,this.$nextButton.addClass("disabled")},t.prototype.enableNextButton=function(){this.nextButtonEnabled=!0,this.$nextButton.removeClass("disabled")},t.prototype.hideNextButton=function(){this.disableNextButton(),this.$nextButton.hide()},t.prototype.showNextButton=function(){this.enableNextButton(),this.$nextButton.show()},t.prototype.serialiseBounds=function(e){return e.x+","+e.y+","+e.width+","+e.height},t.prototype.deserialiseBounds=function(e){var t=e.split(",");return{x:Number(t[0]),y:Number(t[1]),width:Number(t[2]),height:Number(t[3])}},t.prototype.fitToBounds=function(e){var t=new OpenSeadragon.Rect;t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,this.viewer.viewport.fitBounds(t,!0)},t.prototype.getBounds=function(){if(!this.viewer||!this.viewer.viewport)return null;var e=this.viewer.viewport.getBounds(!0);return{x:Math.roundToDecimalPlace(e.x,4),y:Math.roundToDecimalPlace(e.y,4),width:Math.roundToDecimalPlace(e.width,4),height:Math.roundToDecimalPlace(e.height,4)}},t.prototype.viewerResize=function(e){if(e.viewport){var t=e.viewport.getCenter(!0);t&&setTimeout(function(){e.viewport.panTo(t,!0)},1)}},t.prototype.overlaySearchResults=function(){var e=this.extension.searchResults;if(e.length)for(var t=this.extension.getPagedIndices(),i=0;i0&&(n=this.extension.resources[t-1].width);for(var o=0;o0?this.config.options.pageGap:0),a=Number(s.y),l=Number(s.width),h=Number(s.height),u=new OpenSeadragon.Rect(r,a,l,h);i.push(u)}return i},t.prototype.resize=function(){var t=this;if(e.prototype.resize.call(this),this.$viewer.height(this.$content.height()-this.$viewer.verticalMargins()),this.$viewer.width(this.$content.width()-this.$viewer.horizontalMargins()),this.isCreated){this.currentBounds&&this.fitToBounds(this.currentBounds),this.$title.ellipsisFill(this.extension.sanitize(this.title)),this.$spinner.css("top",this.$content.height()/2-this.$spinner.height()/2),this.$spinner.css("left",this.$content.width()/2-this.$spinner.width()/2);var i=this.extension.helper.getViewingDirection();if(this.extension.helper.isMultiCanvas()&&this.$prevButton&&this.$nextButton){var n=Math.floor(this.$content.width()/2);switch(i.toString()){case manifesto.ViewingDirection.bottomToTop().toString():this.$prevButton.addClass("down"),this.$nextButton.addClass("up"),this.$prevButton.css("left",n-this.$prevButton.outerWidth()/2),this.$prevButton.css("top",this.$content.height()-this.$prevButton.height()),this.$nextButton.css("left",-1*n-this.$nextButton.outerWidth()/2);break;case manifesto.ViewingDirection.topToBottom().toString():this.$prevButton.css("left",n-this.$prevButton.outerWidth()/2),this.$nextButton.css("left",-1*n-this.$nextButton.outerWidth()/2),this.$nextButton.css("top",this.$content.height()-this.$nextButton.height());break;default:this.$prevButton.css("top",(this.$content.height()-this.$prevButton.height())/2),this.$nextButton.css("top",(this.$content.height()-this.$nextButton.height())/2)}}setTimeout(function(){if(t.extension.helper.isContinuous())if(t.extension.helper.isHorizontallyAligned()){var e=t.$viewer.width()-t.$viewer.rightMargin();t.$navigator.width(e)}else t.$navigator.height(t.$viewer.height())},100)}},t.prototype.setFocus=function(){var e=$(this.viewer.canvas);e.is(":focus")||e.focus()},t.prototype.setNavigatorVisible=function(){var e=Utils.Bools.getBool(this.extension.getSettings().navigatorEnabled,!0)&&this.extension.metric!==s.MOBILE_LANDSCAPE;this.viewer.navigator.setVisible(e),e?this.$navigator.show():this.$navigator.hide()},t}(o);return a}),define("extensions/uv-seadragon-extension/SearchResultRect",["require","exports"],function(e,t){var i=function(){function e(e){this.index=e.resource.resultIndex;var t=e.on.match(/.*xywh=(\d*),(\d*),(\d*),(\d*)/);this.x=t[1],this.y=t[2],this.width=t[3],this.height=t[4]}return e}();return i}),define("extensions/uv-seadragon-extension/SearchResult",["require","exports","./SearchResultRect"],function(e,t,i){var n=function(){function e(e,t){this.rects=[],this.canvasIndex=t.getCanvasIndexById(e.on.match(/(.*)#/)[1]),this.addRect(e)}return e.prototype.addRect=function(e){var t=new i(e);this.rects.push(t),this.rects.sort(function(e,t){return e.index-t.index})},e}();return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/SettingsDialogue",["require","exports","../../modules/uv-dialogues-module/SettingsDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("settingsDialogue"),e.prototype.create.call(this),this.$navigatorEnabled=$('
'),this.$scroll.append(this.$navigatorEnabled),this.$navigatorEnabledCheckbox=$(' '),this.$navigatorEnabled.append(this.$navigatorEnabledCheckbox),this.$navigatorEnabledLabel=$(''+this.content.navigatorEnabled+" "),this.$navigatorEnabled.append(this.$navigatorEnabledLabel),this.$pagingEnabled=$('
'),this.$scroll.append(this.$pagingEnabled),this.$pagingEnabledCheckbox=$(' '),this.$pagingEnabled.append(this.$pagingEnabledCheckbox),this.$pagingEnabledLabel=$(''+this.content.pagingEnabled+" "),this.$pagingEnabled.append(this.$pagingEnabledLabel),this.$preserveViewport=$('
'),this.$scroll.append(this.$preserveViewport),this.$preserveViewportCheckbox=$(' '),this.$preserveViewport.append(this.$preserveViewportCheckbox),this.$preserveViewportLabel=$(''+this.content.preserveViewport+" "),this.$preserveViewport.append(this.$preserveViewportLabel),this.$navigatorEnabledCheckbox.change(function(){var e={};t.$navigatorEnabledCheckbox.is(":checked")?e.navigatorEnabled=!0:e.navigatorEnabled=!1,t.updateSettings(e)}),this.$pagingEnabledCheckbox.change(function(){var e={};t.$pagingEnabledCheckbox.is(":checked")?e.pagingEnabled=!0:e.pagingEnabled=!1,t.updateSettings(e)}),this.$preserveViewportCheckbox.change(function(){var e={};t.$preserveViewportCheckbox.is(":checked")?e.preserveViewport=!0:e.preserveViewport=!1,t.updateSettings(e)})},t.prototype.open=function(){e.prototype.open.call(this);var t=this.getSettings();t.navigatorEnabled?this.$navigatorEnabledCheckbox.prop("checked",!0):this.$navigatorEnabledCheckbox.removeAttr("checked"),this.extension.helper.isPagingAvailable()?t.pagingEnabled?this.$pagingEnabledCheckbox.prop("checked",!0):this.$pagingEnabledCheckbox.removeAttr("checked"):this.$pagingEnabled.hide(),t.preserveViewport?this.$preserveViewportCheckbox.prop("checked",!0):this.$preserveViewportCheckbox.removeAttr("checked")},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/ShareDialogue",["require","exports","../../modules/uv-dialogues-module/ShareDialogue","./Commands"],function(e,t,i,n){var o=function(e){function t(t){var i=this;e.call(this,t),$.subscribe(n.SEADRAGON_OPEN,function(){i.update()}),$.subscribe(n.SEADRAGON_ANIMATION_FINISH,function(){i.update()})}return __extends(t,e),t.prototype.create=function(){this.setConfig("shareDialogue"),e.prototype.create.call(this)},t.prototype.update=function(){e.prototype.update.call(this);var t=this.extension.getViewerBounds(),i=this.extension.getViewerRotation();this.code=this.extension.getEmbedScript(this.options.embedTemplate,this.currentWidth,this.currentHeight,t,i),this.$code.val(this.code)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/Extension",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-shared-module/BaseExtension","../../modules/uv-shared-module/Bookmark","./Commands","../../modules/uv-contentleftpanel-module/ContentLeftPanel","./CroppedImageDimensions","./DownloadDialogue","../../modules/uv-dialogues-module/ExternalContentDialogue","../../modules/uv-searchfooterpanel-module/FooterPanel","../../modules/uv-dialogues-module/HelpDialogue","../../modules/uv-shared-module/Metrics","../../modules/uv-osdmobilefooterpanel-module/MobileFooter","./Mode","../../modules/uv-dialogues-module/MoreInfoDialogue","../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel","../../modules/uv-multiselectdialogue-module/MultiSelectDialogue","./MultiSelectionArgs","../../modules/uv-pagingheaderpanel-module/PagingHeaderPanel","../../Params","../../modules/uv-shared-module/Point","../../modules/uv-seadragoncenterpanel-module/SeadragonCenterPanel","./SearchResult","./SettingsDialogue","./ShareDialogue","../../modules/uv-shared-module/Shell"],function(e,t,i,n,o,s,r,a,l,h,u,c,p,d,g,f,m,v,b,E,w,y,x,S,C,I,T){var D=Utils.Measurements.Size,O=function(e){function t(t){e.call(this,t),this.currentRotation=0,this.iiifImageUriTemplate="{0}/{1}/{2}/{3}/{4}/{5}.jpg",this.searchResults=[]}return __extends(t,e),t.prototype.create=function(t){var n=this;e.prototype.create.call(this,t);$.subscribe(i.METRIC_CHANGED,function(){if(n.metric===p.MOBILE_LANDSCAPE){var e={};e.pagingEnabled=!1,n.updateSettings(e),$.publish(i.UPDATE_SETTINGS),T.$rightPanel.hide()}else T.$rightPanel.show()}),$.subscribe(s.CLEAR_SEARCH,function(e){n.triggerSocket(s.CLEAR_SEARCH)}),$.subscribe(i.DOWN_ARROW,function(e){n.useArrowKeysToNavigate()||n.centerPanel.setFocus()}),$.subscribe(i.END,function(e){n.viewPage(n.helper.getLastPageIndex())}),$.subscribe(s.FIRST,function(e){n.triggerSocket(s.FIRST),n.viewPage(n.helper.getFirstPageIndex())}),$.subscribe(s.GALLERY_DECREASE_SIZE,function(e){n.triggerSocket(s.GALLERY_DECREASE_SIZE)}),$.subscribe(s.GALLERY_INCREASE_SIZE,function(e){n.triggerSocket(s.GALLERY_INCREASE_SIZE)}),$.subscribe(s.GALLERY_THUMB_SELECTED,function(e){n.triggerSocket(s.GALLERY_THUMB_SELECTED)}),$.subscribe(i.HOME,function(e){n.viewPage(n.helper.getFirstPageIndex())}),$.subscribe(s.IMAGE_SEARCH,function(e,t){n.triggerSocket(s.IMAGE_SEARCH,t),n.viewPage(t)}),$.subscribe(s.LAST,function(e){n.triggerSocket(s.LAST),n.viewPage(n.helper.getLastPageIndex())}),$.subscribe(i.LEFT_ARROW,function(e){n.useArrowKeysToNavigate()?n.viewPage(n.getPrevPageIndex()):n.centerPanel.setFocus()}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_START,function(e){n.metric!==p.MOBILE_LANDSCAPE&&T.$rightPanel.show()}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_FINISH,function(e){T.$centerPanel.show(),n.resize()}),$.subscribe(i.LEFTPANEL_EXPAND_FULL_START,function(e){T.$centerPanel.hide(),T.$rightPanel.hide()}),$.subscribe(i.MINUS,function(e){n.centerPanel.setFocus()}),$.subscribe(s.MODE_CHANGED,function(e,t){n.triggerSocket(s.MODE_CHANGED,t),n.mode=new g(t);var o=n.getSettings();$.publish(i.SETTINGS_CHANGED,[o])}),$.subscribe(s.MULTISELECTION_MADE,function(e,t){var i=new b;i.manifestUri=n.helper.iiifResourceUri,i.allCanvases=t.length===n.helper.getCanvases().length,i.canvases=t,i.format=n.config.options.multiSelectionMimeType,i.sequence=n.helper.getCurrentSequence().id,n.triggerSocket(s.MULTISELECTION_MADE,i)}),$.subscribe(s.NEXT,function(e){n.triggerSocket(s.NEXT),n.viewPage(n.getNextPageIndex())}),$.subscribe(s.NEXT_SEARCH_RESULT,function(){n.triggerSocket(s.NEXT_SEARCH_RESULT),n.nextSearchResult()}),$.subscribe(s.OPEN_THUMBS_VIEW,function(e){n.triggerSocket(s.OPEN_THUMBS_VIEW)}),$.subscribe(s.OPEN_TREE_VIEW,function(e){n.triggerSocket(s.OPEN_TREE_VIEW)}),$.subscribe(i.PAGE_DOWN,function(e){n.viewPage(n.getNextPageIndex())}),$.subscribe(s.PAGE_SEARCH,function(e,t){n.triggerSocket(s.PAGE_SEARCH,t),n.viewLabel(t)}),$.subscribe(i.PAGE_UP,function(e){n.viewPage(n.getPrevPageIndex())}),$.subscribe(s.PAGING_TOGGLED,function(e,t){n.triggerSocket(s.PAGING_TOGGLED,t)}),$.subscribe(i.PLUS,function(e){n.centerPanel.setFocus()}),$.subscribe(s.PREV,function(e){n.triggerSocket(s.PREV),n.viewPage(n.getPrevPageIndex())}),$.subscribe(s.PREV_SEARCH_RESULT,function(){n.triggerSocket(s.PREV_SEARCH_RESULT),n.prevSearchResult()}),$.subscribe(s.PRINT,function(){n.print()}),$.subscribe(i.RIGHT_ARROW,function(e){n.useArrowKeysToNavigate()?n.viewPage(n.getNextPageIndex()):n.centerPanel.setFocus()}),$.subscribe(s.SEADRAGON_ANIMATION,function(){n.triggerSocket(s.SEADRAGON_ANIMATION)}),$.subscribe(s.SEADRAGON_ANIMATION_FINISH,function(e,t){n.centerPanel&&n.centerPanel.currentBounds&&n.setParam(w.zoom,n.centerPanel.serialiseBounds(n.centerPanel.currentBounds));var i=n.helper.getCurrentCanvas();n.triggerSocket(s.CURRENT_VIEW_URI,{cropUri:n.getCroppedImageUri(i,n.getViewer()),fullUri:n.getConfinedImageUri(i,i.getWidth())})}),$.subscribe(s.SEADRAGON_ANIMATION_START,function(){n.triggerSocket(s.SEADRAGON_ANIMATION_START)}),$.subscribe(s.SEADRAGON_OPEN,function(){n.useArrowKeysToNavigate()||n.centerPanel.setFocus()}),$.subscribe(s.SEADRAGON_RESIZE,function(){n.triggerSocket(s.SEADRAGON_RESIZE)}),$.subscribe(s.SEADRAGON_ROTATION,function(e,t){n.triggerSocket(s.SEADRAGON_ROTATION),n.currentRotation=t,n.setParam(w.rotation,t)}),$.subscribe(s.SEARCH,function(e,t){
-n.triggerSocket(s.SEARCH,t),n.searchWithin(t)}),$.subscribe(s.SEARCH_PREVIEW_FINISH,function(e){n.triggerSocket(s.SEARCH_PREVIEW_FINISH)}),$.subscribe(s.SEARCH_PREVIEW_START,function(e){n.triggerSocket(s.SEARCH_PREVIEW_START)}),$.subscribe(s.SEARCH_RESULTS,function(e,t){n.triggerSocket(s.SEARCH_RESULTS,t)}),$.subscribe(s.SEARCH_RESULTS_EMPTY,function(e){n.triggerSocket(s.SEARCH_RESULTS_EMPTY)}),$.subscribe(i.THUMB_SELECTED,function(e,t){n.viewPage(t.index)}),$.subscribe(s.TREE_NODE_SELECTED,function(e,t){n.triggerSocket(s.TREE_NODE_SELECTED,t.data.path),n.treeNodeSelected(t)}),$.subscribe(i.UP_ARROW,function(e){n.useArrowKeysToNavigate()||n.centerPanel.setFocus()}),$.subscribe(i.UPDATE_SETTINGS,function(e){n.viewPage(n.helper.canvasIndex,!0);var t=n.getSettings();$.publish(i.SETTINGS_CHANGED,[t])}),$.subscribe(s.VIEW_PAGE,function(e,t){n.triggerSocket(s.VIEW_PAGE,t),n.viewPage(t)}),Utils.Async.waitFor(function(){return n.centerPanel&&n.centerPanel.isCreated},function(){n.checkForSearchParam(),n.checkForRotationParam()})},t.prototype.createModules=function(){e.prototype.createModules.call(this),this.isHeaderPanelEnabled()?this.headerPanel=new E(T.$headerPanel):T.$headerPanel.hide(),this.isLeftPanelEnabled()?this.leftPanel=new r(T.$leftPanel):T.$leftPanel.hide(),this.centerPanel=new x(T.$centerPanel),this.isRightPanelEnabled()?this.rightPanel=new m(T.$rightPanel):T.$rightPanel.hide(),this.isFooterPanelEnabled()?(this.footerPanel=new u(T.$footerPanel),this.mobileFooterPanel=new d(T.$mobileFooterPanel)):T.$footerPanel.hide(),this.$helpDialogue=$('
'),T.$overlays.append(this.$helpDialogue),this.helpDialogue=new c(this.$helpDialogue),this.$moreInfoDialogue=$('
'),T.$overlays.append(this.$moreInfoDialogue),this.moreInfoDialogue=new f(this.$moreInfoDialogue),this.$multiSelectDialogue=$('
'),T.$overlays.append(this.$multiSelectDialogue),this.multiSelectDialogue=new v(this.$multiSelectDialogue),this.$shareDialogue=$('
'),T.$overlays.append(this.$shareDialogue),this.shareDialogue=new I(this.$shareDialogue),this.$downloadDialogue=$('
'),T.$overlays.append(this.$downloadDialogue),this.downloadDialogue=new l(this.$downloadDialogue),this.$settingsDialogue=$('
'),T.$overlays.append(this.$settingsDialogue),this.settingsDialogue=new C(this.$settingsDialogue),this.$externalContentDialogue=$('
'),T.$overlays.append(this.$externalContentDialogue),this.externalContentDialogue=new h(this.$externalContentDialogue),this.isHeaderPanelEnabled()&&this.headerPanel.init(),this.isLeftPanelEnabled()&&this.leftPanel.init(),this.isRightPanelEnabled()&&this.rightPanel.init(),this.isFooterPanelEnabled()&&this.footerPanel.init()},t.prototype.checkForSearchParam=function(){if(this.isDeepLinkingEnabled()){var e=this.getParam(w.highlight);e&&(e.replace(/\+/g," ").replace(/"/g,""),$.publish(s.SEARCH,[e]))}},t.prototype.checkForRotationParam=function(){if(this.isDeepLinkingEnabled()){var e=Number(this.getParam(w.rotation));e&&$.publish(s.SEADRAGON_ROTATION,[e])}},t.prototype.viewPage=function(e,t){if(-1!==e){if(this.helper.isCanvasIndexOutOfRange(e)&&(this.showMessage(this.config.content.canvasIndexOutOfRange),e=0),this.isPagingSettingEnabled()&&!t){var i=this.getPagedIndices(e);if(i.contains(this.helper.canvasIndex))return void this.viewCanvas(e)}this.viewCanvas(e)}},t.prototype.getViewer=function(){return this.centerPanel.viewer},t.prototype.getMode=function(){if(this.mode)return this.mode;switch(this.helper.getManifestType().toString()){case manifesto.ManifestType.monograph().toString():return g.page;case manifesto.ManifestType.manuscript().toString():return g.page;default:return g.image}},t.prototype.getViewerBounds=function(){if(!this.centerPanel)return null;var e=this.centerPanel.getBounds();return e?this.centerPanel.serialiseBounds(e):""},t.prototype.getViewerRotation=function(){return this.centerPanel?this.currentRotation:null},t.prototype.viewRange=function(e){var t=this.helper.getRangeByPath(e);if(t){var i=t.getCanvasIds()[0],n=this.helper.getCanvasIndexById(i);this.viewPage(n)}},t.prototype.viewLabel=function(e){if(!e)return this.showMessage(this.config.modules.genericDialogue.content.emptyValue),void $.publish(i.CANVAS_INDEX_CHANGE_FAILED);var t=this.helper.getCanvasIndexByLabel(e);-1!=t?this.viewPage(t):(this.showMessage(this.config.modules.genericDialogue.content.pageNotFound),$.publish(i.CANVAS_INDEX_CHANGE_FAILED))},t.prototype.treeNodeSelected=function(e){var t=e.data;if(t.type)switch(t.type){case manifesto.IIIFResourceType.manifest().toString():this.viewManifest(t);break;case manifesto.IIIFResourceType.collection().toString():this.viewCollection(t);break;default:this.viewRange(t.path)}},t.prototype.clearSearch=function(){this.searchResults=[],this.viewPage(this.helper.canvasIndex)},t.prototype.prevSearchResult=function(){for(var e=this.searchResults.length-1;e>=0;e--){var t=this.searchResults[e];if(t.canvasIndexthis.helper.canvasIndex){this.viewPage(t.canvasIndex);break}}},t.prototype.bookmark=function(){e.prototype.bookmark.call(this);var t=this.helper.getCurrentCanvas(),n=new o;n.index=this.helper.canvasIndex,n.label=Manifesto.TranslationCollection.getValue(t.getLabel()),n.path=this.getCroppedImageUri(t,this.getViewer()),n.thumb=t.getCanonicalImageUri(this.config.options.bookmarkThumbWidth),n.title=this.helper.getLabel(),n.trackingLabel=window.trackingLabel,n.type=manifesto.ElementType.image().toString(),this.triggerSocket(i.BOOKMARK,n)},t.prototype.print=function(){window.print(),this.triggerSocket(s.PRINT)},t.prototype.getCroppedImageDimensions=function(e,t){if(!t)return null;if(!t.viewport)return null;if(!e.getHeight()||!e.getWidth())return null;var i=t.viewport.getBounds(!0),n=new a,o=Math.floor(i.width),s=Math.floor(i.height),r=Math.floor(i.x),l=Math.floor(i.y);r+o>e.getWidth()?o=e.getWidth()-r:0>r&&(o+=r,r=0),l+s>e.getHeight()?s=e.getHeight()-l:0>l&&(s+=l,l=0),o=Math.min(o,e.getWidth()),s=Math.min(s,e.getHeight());var h=o,u=s;if(e.externalResource.data&&e.externalResource.data.profile[1]){var c=new D(e.externalResource.data.profile[1].maxWidth,e.externalResource.data.profile[1].maxHeight);if(!_.isUndefined(c.width)&&!_.isUndefined(c.height)){if(o>c.width){var p=c.width;s=Math.round(p*(s/o)),o=p}if(s>c.height){var d=c.height;o=Math.round(o/s*d),s=d}}}return n.region=new D(h,u),n.regionPos=new y(r,l),n.size=new D(o,s),n},t.prototype.getCroppedImageUri=function(e,t){if(!t)return null;if(!t.viewport)return null;var i=this.getCroppedImageDimensions(e,t),n=this.getImageBaseUri(e),o=this.getImageId(e),s=i.regionPos.x+","+i.regionPos.y+","+i.region.width+","+i.region.height,r=i.size.width+","+i.size.height,a=this.getViewerRotation(),l="default";return String.format(this.iiifImageUriTemplate,n,o,s,r,a,l)},t.prototype.getConfinedImageDimensions=function(e,t){var i=new D(0,0);i.width=t;var n=Math.normalise(t,0,e.getWidth());return i.height=Math.floor(e.getHeight()*n),i},t.prototype.getConfinedImageUri=function(e,t){var i=this.getImageBaseUri(e),n=this.getImageId(e),o="full",s=this.getConfinedImageDimensions(e,t),r=s.width+","+s.height,a=this.getViewerRotation(),l="default",h=String.format(this.iiifImageUriTemplate,i,n,o,r,a,l);return h},t.prototype.getImageId=function(e){var t=this.getInfoUri(e);return t=t.substr(0,t.lastIndexOf("/")),t.substr(t.lastIndexOf("/")+1)},t.prototype.getImageBaseUri=function(e){var t=this.getInfoUri(e);return t=t.substr(0,t.lastIndexOf("/")),t.substr(0,t.lastIndexOf("/"))},t.prototype.getInfoUri=function(e){var t,i=e.getImages();if(i&&i.length)for(var n=i[0],o=n.getResource(),s=o.getServices(),r=0;rthis.helper.getTotalCanvases()-1?-1:t},t.prototype.getAutoCompleteService=function(){var e=this.helper.getSearchWithinService();return e?e.getService(manifesto.ServiceProfile.autoComplete()):null},t.prototype.getAutoCompleteUri=function(){var e=this.getAutoCompleteService();return e?e.id+"?q={0}":null},t.prototype.getSearchWithinServiceUri=function(){var e=this.helper.getSearchWithinService();if(!e)return null;var t=e.id;return t+="?q={0}"},t.prototype.searchWithin=function(e){var t=this;this.doSearchWithin(e,function(i){i.resources&&i.resources.length?($.publish(s.SEARCH_RESULTS,[{terms:e,results:i}]),t.viewPage(t.helper.canvasIndex,!0)):t.showMessage(t.config.modules.genericDialogue.content.noMatches,function(){$.publish(s.SEARCH_RESULTS_EMPTY)})})},t.prototype.doSearchWithin=function(e,t){var i=this,n=this.getSearchWithinServiceUri();n=String.format(n,e),$.getJSON(n,function(e){e.resources&&e.resources.length&&i.parseSearchWithinResults(e),t(e)})},t.prototype.parseSearchWithinResults=function(e){this.searchResults=[];for(var t=0;t'),this.$content.prepend(this.$navigation),this.$zoomInButton=$(' '),this.$navigation.append(this.$zoomInButton),this.$zoomOutButton=$(' '),this.$navigation.append(this.$zoomOutButton),this.$viewport=$('
'),this.$content.prepend(this.$viewport),this.title=this.extension.helper.getLabel(),this.updateAttribution(),this.$zoomInButton.on("click",function(e){e.preventDefault(),t.viewport.zoomIn()}),this.$zoomOutButton.on("click",function(e){e.preventDefault(),t.viewport.zoomOut()})},t.prototype.openMedia=function(e){var t=this;this.extension.getExternalResources(e).then(function(){t.$viewport.empty();var e=t.extension.helper.getCurrentCanvas();t.viewport=virtex.create({element:"#content .virtex",object:e.id,showStats:t.options.showStats}),t.resize()})},t.prototype.resize=function(){e.prototype.resize.call(this),this.$title.ellipsisFill(this.title),this.$viewport.width(this.$content.width()),this.$viewport.height(this.$content.height())},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-virtex-extension/Extension",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-shared-module/BaseExtension","../../modules/uv-shared-module/Bookmark","../../modules/uv-contentleftpanel-module/ContentLeftPanel","./DownloadDialogue","./ShareDialogue","../../modules/uv-shared-module/FooterPanel","../../modules/uv-shared-module/HeaderPanel","../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel","./SettingsDialogue","../../modules/uv-shared-module/Shell","../../modules/uv-virtexcenterpanel-module/VirtexCenterPanel"],function(e,t,i,n,o,s,r,a,l,h,u,c,p,d){var g=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(t){var n=this;e.prototype.create.call(this,t),$.subscribe(i.THUMB_SELECTED,function(e,t){n.viewCanvas(t)})},t.prototype.createModules=function(){e.prototype.createModules.call(this),this.isHeaderPanelEnabled()?this.headerPanel=new h(p.$headerPanel):p.$headerPanel.hide(),this.isLeftPanelEnabled()&&(this.leftPanel=new s(p.$leftPanel)),this.centerPanel=new d(p.$centerPanel),this.isRightPanelEnabled()&&(this.rightPanel=new u(p.$rightPanel)),this.isFooterPanelEnabled()?this.footerPanel=new l(p.$footerPanel):p.$footerPanel.hide(),this.$downloadDialogue=$('
'),p.$overlays.append(this.$downloadDialogue),this.downloadDialogue=new r(this.$downloadDialogue),this.$shareDialogue=$('
'),p.$overlays.append(this.$shareDialogue),this.shareDialogue=new a(this.$shareDialogue),this.$settingsDialogue=$('
'),p.$overlays.append(this.$settingsDialogue),this.settingsDialogue=new c(this.$settingsDialogue),this.isLeftPanelEnabled()?this.leftPanel.init():p.$leftPanel.hide(),this.isRightPanelEnabled()?this.rightPanel.init():p.$rightPanel.hide()},t.prototype.isLeftPanelEnabled=function(){return Utils.Bools.getBool(this.config.options.leftPanelEnabled,!0)&&(this.helper.isMultiCanvas()||this.helper.isMultiSequence())},t.prototype.bookmark=function(){e.prototype.bookmark.call(this);var t=this.helper.getCurrentCanvas(),n=new o;n.index=this.helper.canvasIndex,n.label=Manifesto.TranslationCollection.getValue(t.getLabel()),n.path=this.getBookmarkUri(),n.thumb=t.getProperty("thumbnail"),n.title=this.helper.getLabel(),n.trackingLabel=window.trackingLabel,n.type=manifesto.ElementType.physicalobject().toString(),this.triggerSocket(i.BOOKMARK,n)},t.prototype.getEmbedScript=function(e,t,i){var n=this.config.uri||"",o=String.format(e,this.getSerializedLocales(),n,this.helper.iiifResourceUri,this.helper.collectionIndex,this.helper.manifestIndex,this.helper.sequenceIndex,this.helper.canvasIndex,t,i,this.embedScriptUri);return o},t}(n);return g}),"function"==typeof jQuery&&define("jquery",[],function(){return jQuery}),require(["Bootstrapper","extensions/uv-mediaelement-extension/Extension","extensions/uv-pdf-extension/Extension","extensions/uv-seadragon-extension/Extension","extensions/uv-virtex-extension/Extension"],function(e,t,i,n,o){var s={};s[manifesto.ElementType.canvas().toString()]={type:n,name:"uv-seadragon-extension"},s[manifesto.ElementType.movingimage().toString()]={type:t,name:"uv-mediaelement-extension"},s[manifesto.ElementType.physicalobject().toString()]={type:o,name:"uv-virtex-extension"},s[manifesto.ElementType.sound().toString()]={type:t,name:"uv-mediaelement-extension"},s[manifesto.RenderingFormat.pdf().toString()]={type:i,name:"uv-pdf-extension"};var r=new e(s);r.bootstrap()}),define("app",function(){});
\ No newline at end of file
diff --git a/dist/uv-1.8.38/lib/bundle.min.js b/dist/uv-1.8.38/lib/bundle.min.js
deleted file mode 100644
index 53f0b9706..000000000
--- a/dist/uv-1.8.38/lib/bundle.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-function Sanitize(){var i,options;for(options=arguments[0]||{},this.config={},this.config.elements=options.elements?options.elements:[],this.config.attributes=options.attributes?options.attributes:{},this.config.attributes[Sanitize.ALL]=this.config.attributes[Sanitize.ALL]?this.config.attributes[Sanitize.ALL]:[],this.config.allow_comments=!!options.allow_comments&&options.allow_comments,this.allowed_elements={},this.config.protocols=options.protocols?options.protocols:{},this.config.add_attributes=options.add_attributes?options.add_attributes:{},this.dom=options.dom?options.dom:document,i=0;i0;)this.current_element.removeChild(this.current_element.firstChild);parent_element.appendChild(this.current_element)}if(!this.config.remove_all_contents&&!this.config.remove_element_contents[name])for(i=0;ichars){var trimmedText=text.substr(0,chars);trimmedText=trimmedText.substr(0,Math.min(trimmedText.length,trimmedText.lastIndexOf(" "))),$self.empty().html(trimmedText+"…")}})},$.fn.ellipsisFill=function(text){var textPassed=!0;return text||(textPassed=!1),this.each(function(){var $self=$(this);if(textPassed||(text=$self.text()),$self.empty(),$self.spanElem=$(' '),$self.append($self.spanElem),$self.css("overflow","hidden"),$self.spanElem.css("white-space","nowrap"),$self.spanElem.html(text),$self.spanElem.width()>$self.width())for(var lastText;$self.spanElem.width()>$self.width();){var t=$self.spanElem.html();if(t=t.substring(0,t.lastIndexOf(" "))+"…",t===lastText)break;$self.spanElem.html(t),lastText=t}})},$.fn.ellipsisFixed=function(chars,buttonText){return this.each(function(){var $self=$(this),text=$self.text();$self.empty();var $span=$(" "),$ellipsis=$(' ');if(buttonText?$ellipsis.html(buttonText):$ellipsis.html("…"),$ellipsis.click(function(e){e.preventDefault();var $this=$(this);$span.html(text),$this.remove()}),text.length>chars){var trimmedText=text.substr(0,chars);trimmedText=trimmedText.substr(0,Math.min(trimmedText.length,trimmedText.lastIndexOf(" "))),$span.html(trimmedText+" "),$span.append($ellipsis)}else $span.html(text);$self.append($span)})},$.fn.ellipsisHtmlFixed=function(chars,cb){return this.each(function(){var $self=$(this),expandedText=$self.html(),$trunc=$(" ");if($trunc.html($self.html().replace(/\s[\s]*/g," ").trim()),!($trunc.text().trim().length<=chars)){for(;$trunc.text().trim().length>chars;)$trunc.removeLastWord(chars);var collapsedText=$trunc.html(),expanded=!1;$self.toggle=function(){$self.empty();var $toggleButton=$(' ');expanded?($self.html(expandedText+" "),$toggleButton.text("less"),$toggleButton.toggleClass("less","more")):($self.html(collapsedText+"… "),$toggleButton.text("more"),$toggleButton.toggleClass("more","less")),$toggleButton.one("click",function(e){e.preventDefault(),$self.toggle()}),expanded=!expanded,$self.append($toggleButton),cb&&cb()},$self.toggle()}})},$.fn.enable=function(){return this.each(function(){var $this=$(this);$this.removeClass("disabled"),$this.attr("tabindex",$this.data("tabindex"))})},$.fn.equaliseHeight=function(reset,average){var maxHeight=-1,minHeight=Number.MAX_VALUE,heights=[];reset&&this.each(function(){$(this).height("auto")}),this.each(function(){var currentHeight=$(this).height();heights.push(currentHeight),maxHeight=maxHeight>currentHeight?maxHeight:currentHeight,minHeight=minHeightmaxTabIndex&&(maxTabIndex=tabIndex,$elementWithGreatestTabIndex=$el)}),$elementWithGreatestTabIndex},$.fn.horizontalMargins=function(){var $self=$(this);return parseInt($self.css("marginLeft"))+parseInt($self.css("marginRight"))},$.fn.leftMargin=function(){var $self=$(this);return parseInt($self.css("marginLeft"))},$.fn.rightMargin=function(){var $self=$(this);return parseInt($self.css("marginRight"))},$.fn.horizontalPadding=function(){var $self=$(this);return parseInt($self.css("paddingLeft"))+parseInt($self.css("paddingRight"))},$.fn.leftPadding=function(){var $self=$(this);return parseInt($self.css("paddingLeft"))},$.fn.rightPadding=function(){var $self=$(this);return parseInt($self.css("paddingRight"))},$.mlp={x:0,y:0},$(documentHandler),$.fn.ismouseover=function(overThis){var result=!1;return this.eq(0).each(function(){var $current=$(this).is("iframe")?$(this).contents().find("body"):$(this),offset=$current.offset();result=offset.left<=$.mlp.x&&offset.left+$current.outerWidth()>$.mlp.x&&offset.top<=$.mlp.y&&offset.top+$current.outerHeight()>$.mlp.y}),result};var timer,on=$.fn.on;$.fn.on=function(){var args=Array.apply(null,arguments),last=args[args.length-1];if(isNaN(last)||1===last&&args.pop())return on.apply(this,args);var delay=args.pop(),fn=args.pop();return args.push(function(){var self=this,params=arguments;clearTimeout(timer),timer=setTimeout(function(){fn.apply(self,params)},delay)}),on.apply(this,args)},$.fn.onEnter=function(cb){return this.each(function(){var $this=$(this);$this.on("keyup",function(e){13===e.keyCode&&(e.preventDefault(),cb())})})},$.fn.onPressed=function(cb){return this.each(function(){var $this=$(this);$this.on("touchstart click",function(e){e.preventDefault(),cb(e)}),$this.on("keyup",function(e){13===e.keyCode&&(e.preventDefault(),cb(e))})})},$.fn.removeLastWord=function(chars,depth){return"undefined"==typeof chars&&(chars=8),"undefined"==typeof depth&&(depth=0),this.each(function(){var $self=$(this);if($self.contents().length>0){var $lastElement=$self.contents().last();if(3===$lastElement[0].nodeType){var words=$lastElement.text().trim().split(" ");if(words.length>1)return words.splice(words.length-1,1),void($lastElement[0].data=words.join(" "));if("undefined"!=typeof chars&&1===words.length&&words[0].length>chars)return void($lastElement[0].data=words.join(" ").substring(0,chars))}$lastElement.removeLastWord(chars,depth+1)}else depth>0&&$self.remove()})},$.fn.swapClass=function(removeClass,addClass){return this.each(function(){$(this).removeClass(removeClass).addClass(addClass)})},$.fn.targetBlank=function(){return this.each(function(){$(this).find("a").prop("target","_blank")})},$.fn.toggleClass=function(class1,class2){return this.each(function(){var $this=$(this);$this.hasClass(class1)?$(this).removeClass(class1).addClass(class2):$(this).removeClass(class2).addClass(class1)})},$.fn.toggleExpandText=function(chars,lessText,moreText,cb){return this.each(function(){var $self=$(this),expandedText=$self.html();if(!(chars>expandedText.length)){var expanded=!1,collapsedText=expandedText.substr(0,chars);collapsedText=collapsedText.substr(0,Math.min(collapsedText.length,collapsedText.lastIndexOf(" "))),$self.toggle=function(){$self.empty();var $toggleButton=$(' ');expanded?($self.html(expandedText+" "),$toggleButton.text(lessText),$toggleButton.toggleClass("less","more")):($self.html(collapsedText+" "),$toggleButton.text(moreText),$toggleButton.toggleClass("more","less")),$toggleButton.one("click",function(e){e.preventDefault(),$self.toggle()}),expanded=!expanded,$self.append($toggleButton),cb&&cb()},$self.toggle()}})},$.fn.toggleExpandTextByLines=function(lines,lessText,moreText,cb){return this.each(function(){for(var $self=$(this),expandedText=$self.html(),$buttonPad=$('… morepad '),stringsByLine=[expandedText],lastHeight=$self.height();$self.text().length>0;){$self.removeLastWord();var html=$self.html();$self.append($buttonPad),lastHeight>$self.height()&&(stringsByLine.unshift(html),lastHeight=$self.height()),$buttonPad.remove()}if(stringsByLine.length<=lines)return void $self.html(expandedText);var collapsedText=stringsByLine[lines-1],expanded=!1;$self.toggle=function(){$self.empty();var $toggleButton=$(' ');expanded?($self.html(expandedText+" "),$toggleButton.text(lessText),$toggleButton.toggleClass("less","more")):($self.html(collapsedText+"… "),$toggleButton.text(moreText),$toggleButton.toggleClass("more","less")),$toggleButton.one("click",function(e){e.preventDefault(),$self.toggle()}),expanded=!expanded,$self.append($toggleButton),cb&&cb()},$self.toggle()})},$.fn.toggleText=function(text1,text2){return this.each(function(){var $this=$(this);$this.text()===text1?$(this).text(text2):$(this).text(text1)})},$.fn.updateAttr=function(attrName,oldVal,newVal){return this.each(function(){var $this=$(this),attr=$this.attr(attrName);attr&&0===attr.indexOf(oldVal)&&(attr=attr.replace(oldVal,newVal),$this.attr(attrName,attr))})},$.fn.verticalMargins=function(){var $self=$(this);return parseInt($self.css("marginTop"))+parseInt($self.css("marginBottom"))},$.fn.verticalPadding=function(){var $self=$(this);return parseInt($self.css("paddingTop"))+parseInt($self.css("paddingBottom"))}}(jQuery),!function(a){var b=null;a.initPubSub=function(){b=a({})},a.subscribe=function(){b||a.initPubSub(),b.on.apply(b,arguments)},a.unsubscribe=function(){b||a.initPubSub(),b.off.apply(b,arguments)},a.disposePubSub=function(){b=null},a.publish=function(){b||a.initPubSub(),b.trigger.apply(b,arguments)}}(jQuery);var KeyCodes;!function(KeyCodes){var KeyDown;!function(KeyDown){KeyDown.Backspace=8,KeyDown.Tab=9,KeyDown.Enter=13,KeyDown.Shift=16,KeyDown.Ctrl=17,KeyDown.Alt=18,KeyDown.PauseBreak=19,KeyDown.CapsLock=20,KeyDown.Escape=27,KeyDown.Spacebar=32,KeyDown.PageUp=33,KeyDown.PageDown=34,KeyDown.End=35,KeyDown.Home=36,KeyDown.LeftArrow=37,KeyDown.UpArrow=38,KeyDown.RightArrow=39,KeyDown.DownArrow=40,KeyDown.PrintScrn=44,KeyDown.Insert=45,KeyDown.Delete=46,KeyDown.Zero=48,KeyDown.One=49,KeyDown.Two=50,KeyDown.Three=51,KeyDown.Four=52,KeyDown.Five=53,KeyDown.Six=54,KeyDown.Seven=55,KeyDown.Eight=56,KeyDown.Nine=57,KeyDown.a=65,KeyDown.b=66,KeyDown.c=67,KeyDown.d=68,KeyDown.e=69,KeyDown.f=70,KeyDown.g=71,KeyDown.h=72,KeyDown.i=73,KeyDown.j=74,KeyDown.k=75,KeyDown.l=76,KeyDown.m=77,KeyDown.n=78,KeyDown.o=79,KeyDown.p=80,KeyDown.q=81,KeyDown.r=82,KeyDown.s=83,KeyDown.t=84,KeyDown.u=85,KeyDown.v=86,KeyDown.w=87,KeyDown.x=88,KeyDown.y=89,KeyDown.z=90,KeyDown.LeftWindowKey=91,KeyDown.RightWindowKey=92,KeyDown.SelectKey=93,KeyDown.Numpad0=96,KeyDown.Numpad1=97,KeyDown.Numpad2=98,KeyDown.Numpad3=99,KeyDown.Numpad4=100,KeyDown.Numpad5=101,KeyDown.Numpad6=102,KeyDown.Numpad7=103,KeyDown.Numpad8=104,KeyDown.Numpad9=105,KeyDown.Multiply=106,KeyDown.NumpadPlus=107,KeyDown.NumpadMinus=109,KeyDown.DecimalPoint=110,KeyDown.Divide=111,KeyDown.F1=112,KeyDown.F2=113,KeyDown.F3=114,KeyDown.F4=115,KeyDown.F5=116,KeyDown.F6=117,KeyDown.F7=118,KeyDown.F8=119,KeyDown.F9=120,KeyDown.F10=121,KeyDown.F11=122,KeyDown.F12=123,
-KeyDown.NumLock=144,KeyDown.ScrollLock=145,KeyDown.Semicolon=186,KeyDown.Equals=187,KeyDown.Comma=188,KeyDown.LessThan=188,KeyDown.Dash=189,KeyDown.Period=190,KeyDown.GreaterThan=190,KeyDown.ForwardSlash=191,KeyDown.QuestionMark=191,KeyDown.GraveAccent=192,KeyDown.Tilde=192,KeyDown.OpenCurlyBracket=219,KeyDown.OpenSquareBracket=219,KeyDown.BackSlash=220,KeyDown.VerticalPipe=220,KeyDown.CloseCurlyBracket=221,KeyDown.CloseSquareBracket=221,KeyDown.Quote=222,KeyDown.CommandFF=224}(KeyDown=KeyCodes.KeyDown||(KeyCodes.KeyDown={}))}(KeyCodes||(KeyCodes={}));var KeyCodes;!function(KeyCodes){var KeyPress;!function(KeyPress){KeyPress.Backspace=8,KeyPress.Enter=13,KeyPress.Spacebar=32,KeyPress.Hash=35,KeyPress.GraveAccent=39,KeyPress.ForwardSlash=32,KeyPress.Asterisk=42,KeyPress.Plus=43,KeyPress.Comma=44,KeyPress.Minus=45,KeyPress.Period=46,KeyPress.ForwardSlash=47,KeyPress.Zero=48,KeyPress.One=49,KeyPress.Two=50,KeyPress.Three=51,KeyPress.Four=52,KeyPress.Five=53,KeyPress.Six=54,KeyPress.Seven=55,KeyPress.Eight=56,KeyPress.Nine=57,KeyPress.Colon=58,KeyPress.Semicolon=59,KeyPress.LessThan=60,KeyPress.Equals=61,KeyPress.GreaterThan=62,KeyPress.QuestionMark=63,KeyPress.At=64,KeyPress.OpenSquareBracket=91,KeyPress.BackSlash=92,KeyPress.CloseSquareBracket=93,KeyPress.a=97,KeyPress.b=98,KeyPress.c=99,KeyPress.d=100,KeyPress.e=101,KeyPress.f=102,KeyPress.g=103,KeyPress.h=104,KeyPress.i=105,KeyPress.j=106,KeyPress.k=107,KeyPress.l=108,KeyPress.m=109,KeyPress.n=110,KeyPress.o=111,KeyPress.p=112,KeyPress.q=113,KeyPress.r=114,KeyPress.s=115,KeyPress.t=116,KeyPress.u=117,KeyPress.v=118,KeyPress.w=119,KeyPress.x=120,KeyPress.y=121,KeyPress.z=122,KeyPress.OpenCurlyBracket=123,KeyPress.VerticalPipe=124,KeyPress.CloseCurlyBracket=125,KeyPress.Tilde=126}(KeyPress=KeyCodes.KeyPress||(KeyCodes.KeyPress={}))}(KeyCodes||(KeyCodes={}));var exjs;!function(r){r.version="0.4.0"}(exjs||(exjs={}));var exjs;!function(r){Array.isArray||(Array.isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)})}(exjs||(exjs={}));var exjs;!function(r){var e=function(){function r(){}return r.prototype.getEnumerator=function(){return{moveNext:function(){return!1},current:void 0}},r.prototype.aggregate=function(r,e){for(var t=r,n=this.getEnumerator();n.moveNext();)t=e(t,n.current);return t},r.prototype.all=function(r){if(r)for(var e=this.getEnumerator(),t=0;e.moveNext();){if(!r(e.current,t))return!1;t++}return!0},r.prototype.any=function(r){for(var e=this.getEnumerator(),t=0;e.moveNext();){if(!r)return!0;if(r(e.current,t))return!0;t++}return!1},r.prototype.append=function(){for(var r=[],e=0;e-1&&(this._keys.splice(e,1),this._values.splice(e,1),this.size--,!0)},e.prototype.entries=function(){var e=this;return r.range(0,this.size).select(function(r){return[e._keys[r],e._values[r]]})},e.prototype.forEach=function(r,e){null==e&&(e=this);for(var t=0,n=this._keys,o=this._values,u=n.length;u>t;t++)r.call(e,o[t],n[t],this)},e.prototype.get=function(r){var e=this._keys.indexOf(r);return this._values[e]},e.prototype.has=function(r){return this._keys.indexOf(r)>-1},e.prototype.keys=function(){return this._keys.en()},e.prototype.set=function(r,e){var t=this._keys.indexOf(r);t>-1?this._values[t]=e:(this._keys.push(r),this._values.push(e),this.size++)},e.prototype.values=function(){return this._values.en()},e}();r.Map3=e,r.Enumerable.prototype.toMap=function(r,t){for(var n=new e,o=this.getEnumerator();o.moveNext();)n.set(r(o.current),t(o.current));return n},r.List&&(r.List.prototype.toMap=r.Enumerable.prototype.toMap)}(exjs||(exjs={})),function(r){r.Map||(r.Map=exjs.Map3)}("undefined"==typeof window?global:window);var exjs;!function(r){function e(e){var t=new r.Enumerable;return t.getEnumerator=function(){var r={current:void 0,moveNext:function(){return e(r)}};return r},t}r.anonymous=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n,o=1,u={current:void 0,moveNext:function(){if(2>o){if(t=t||r.getEnumerator(),t.moveNext())return u.current=t.current,!0;o++}return n=n||e.en().getEnumerator(),n.moveNext()?(u.current=n.current,!0):(u.current=void 0,!1)}};return u}r.Enumerable.prototype.append=function(){for(var t=this,n=[],o=0;o=e?(t.current=void 0,!1):(t.current=r[n],!0)},t}function t(){return this&&Array.isArray(this)?new n(this):new r.Enumerable}var n=function(r){function t(t){r.call(this),this.getEnumerator=function(){return e(t)},this.toArray=function(){return t.slice(0)}}return __extends(t,r),t}(r.Enumerable);try{Object.defineProperty(Array.prototype,"en",{value:t,enumerable:!1,writable:!1,configurable:!1})}catch(o){Array.prototype.en=t}}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=!1,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),o.current=void 0,t.moveNext()?(o.current=t.current,!0):!n&&(n=!0,t=e.getEnumerator(),!!t.moveNext()&&(o.current=t.current,!0))}};return o}r.Enumerable.prototype.concat=function(t){var n=this,o=t instanceof Array?t.en():t,u=new r.Enumerable;return u.getEnumerator=function(){return e(n,o)},u},r.List&&(r.List.prototype.concat=r.Enumerable.prototype.concat)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=[],o={current:void 0,moveNext:function(){if(t||(t=r.getEnumerator()),o.current=void 0,!e){for(;t.moveNext();)if(n.indexOf(t.current)<0)return n.push(o.current=t.current),!0;return!1}for(;t.moveNext();){for(var u=0,i=n.length,c=!1;i>u&&!c;u++)c=!!e(n[u],t.current);if(!c)return n.push(o.current=t.current),!0}return!1}};return o}r.Enumerable.prototype.distinct=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.List&&(r.List.prototype.distinct=r.Enumerable.prototype.distinct)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e,t){t=t||function(r,e){return r===e};var n,o={current:void 0,moveNext:function(){for(n||(n=r.getEnumerator()),o.current=void 0;n.moveNext();){for(var u=!1,i=e.getEnumerator();i.moveNext()&&!u;)u=t(n.current,i.current);if(!u)return o.current=n.current,!0}return!1}};return o}r.Enumerable.prototype.except=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.except=r.Enumerable.prototype.except)}(exjs||(exjs={})),Function.prototype.fromJson=function(r,e){function t(r,e){if(null==r)return r;if(e instanceof Function)return e(r);if(e instanceof Array){if(e=e[0],!(e instanceof Function&&r instanceof Array))return;for(var t=[],n=0;n-1)){var i=t(r[u],this.$jsonMappings[u]);void 0!==i&&(n[u]=i,o.push(u))}for(var u in r)o.indexOf(u)>-1||(n[u]=r[u]);return n};var exjs;!function(r){function e(r,e,n){var o,u=0,i={current:void 0,moveNext:function(){return o||(o=t(r,e,n)),i.current=void 0,!(u>=o.length)&&(i.current=o[u],u++,!0)}};return i}function t(r,e,t){t=t||function(r,e){return r===e};for(var o,u=[],i=[],c=r.getEnumerator();c.moveNext();){o=e(c.current);for(var a=-1,p=0,s=i.length;s>p;p++)if(t(o,i[p])){a=p;break}var f;0>a?(i.push(o),u.push(f=new n(o))):f=u[a],f._add(c.current)}return u}var n=function(r){function e(e){var t=this;r.call(this),this.key=e,this._arr=[],this.getEnumerator=function(){return t._arr.en().getEnumerator()}}return __extends(e,r),e.prototype._add=function(r){this._arr.push(r)},e}(r.Enumerable);r.Enumerable.prototype.groupBy=function(t,n){var o=this,u=new r.Enumerable;return u.getEnumerator=function(){return e(o,t,n)},u},r.List&&(r.List.prototype.groupBy=r.Enumerable.prototype.groupBy)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n){n=n||function(r,e){return r===e};var o,u={current:void 0,moveNext:function(){for(o||(o=r.en(e).distinct().getEnumerator()),u.current=void 0;o.moveNext();){for(var i=!1,c=t.getEnumerator();c.moveNext()&&!i;)i=n(o.current,c.current);if(i)return u.current=o.current,!0}return!1}};return u}r.Enumerable.prototype.intersect=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.intersect=r.Enumerable.prototype.intersect)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n,o,u,i){i=i||function(r,e){return r===e};var c,a,p=0,s={current:void 0,moveNext:function(){if(s.current=void 0,!c){if(c=e.getEnumerator(),!c.moveNext())return!1;a=r.en(t).toArray()}var f;do{for(;p=e?(t.current=void 0,!1):(t.current=r[n],!0)},t},t.prototype.remove=function(r){return this.removeWhere(function(e){return e===r}).any()},t.prototype.removeWhere=function(r){for(var e,t=[],n=this.length-1;n>=0;n--)e=this[n],r(e,n)===!0&&(this.splice(n,1),t.push(e));return t.en().reverse()}}(exjs||(exjs={}));var exjs;!function(r){function e(r,e,n,o){return new t(r,e,n,o)}var t=function(e){function t(r,t,n,o){e.call(this),this.Source=r,o=o||function(r,e){return r>e?1:e>r?-1:0};var u=n===!0?-1:1;this.Sorter=function(r,e){return u*o(t(r),t(e))}}return __extends(t,e),t.prototype.getEnumerator=function(){var e,t=this.Source,n=this.Sorter,o=0,u={current:void 0,moveNext:function(){return e||(e=r.en(t).toArray(),e.sort(n)),u.current=void 0,!(o>=e.length)&&(u.current=e[o],o++,!0)}};return u},t.prototype.thenBy=function(r,e){return new n(this,r,(!1),e)},t.prototype.thenByDescending=function(r,e){return new n(this,r,(!0),e)},t}(r.Enumerable),n=function(r){function e(e,t,n,o){r.call(this,e,t,n,o);var u=e.Sorter,i=this.Sorter;this.Sorter=function(r,e){return u(r,e)||i(r,e)}}return __extends(e,r),e}(t),o=r.Enumerable.prototype;o.orderBy=function(r,t){return e(this,r,!1,t)},o.orderByDescending=function(r,t){return e(this,r,!0,t)},r.List&&(r.List.prototype.orderBy=r.Enumerable.prototype.orderBy,r.List.prototype.orderByDescending=r.Enumerable.prototype.orderByDescending)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n,o=1,u={current:void 0,moveNext:function(){if(2>o){if(t=t||e.en().getEnumerator(),t.moveNext())return u.current=t.current,!0;o++}return n=n||r.getEnumerator(),n.moveNext()?(u.current=n.current,!0):(u.current=void 0,!1)}};return u}r.Enumerable.prototype.prepend=function(){for(var t=this,n=[],o=0;o=e)&&(o.current=n,!0)}};return o}function t(t,n,o){if(t=t||0,n=n||0,t>n)throw new Error("Start cannot be greater than end.");null==o&&(o=1);var u=new r.Enumerable;return u.getEnumerator=function(){return e(t,n,o)},u}r.range=t}(exjs||(exjs={}));var exjs;!function(r){function e(e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.en(e).toArray(),n=t.length),n--,o.current=t[n],n>=0}};return o}r.Enumerable.prototype.reverse=function(){var t=this,n=new r.Enumerable;return n.getEnumerator=function(){return e(t)},n},r.List&&(r.List.prototype.reverse=r.Enumerable.prototype.reverse)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){if(e=e||0,0===e)return Math.round(r);var t=Math.pow(10,e);return Math.round(r*t)/t}r.round=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),!!t.moveNext()&&(o.current=e(t.current,n),n++,!0)}};return o}function t(e,t){var n,o,u={current:void 0,moveNext:function(){for(u.current=void 0,n||(n=e.getEnumerator());!o||!o.moveNext();){if(!n.moveNext())return!1;o=r.selectorEnumerator(t(n.current))}return u.current=o.current,!0}};return u}r.Enumerable.prototype.select=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.selectMany=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.select=r.Enumerable.prototype.select,r.List.prototype.selectMany=r.Enumerable.prototype.selectMany)}(exjs||(exjs={}));var exjs;!function(r){function e(r){return Array.isArray(r)?r.en().getEnumerator():null!=r&&"function"==typeof r.getEnumerator?r.getEnumerator():null}r.selectorEnumerator=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n={current:void 0,moveNext:function(){if(!t){t=r.getEnumerator();for(var o=0;e>o;o++)if(!t.moveNext())return!1}return t.moveNext()?(n.current=t.current,!0):(n.current=void 0,!1)}};return n}function t(r,e){var t,n={current:void 0,moveNext:function(){if(!t){t=r.getEnumerator();for(var o=0;t.moveNext();o++)if(!e(n.current=t.current,o))return!0;return n.current=void 0,!1}return t.moveNext()?(n.current=t.current,!0):(n.current=void 0,!1)}};return n}r.Enumerable.prototype.skip=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.skipWhile=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.skip=r.Enumerable.prototype.skip,r.List.prototype.skipWhile=r.Enumerable.prototype.skipWhile)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),n++,!(n>e)&&(o.current=void 0,!!t.moveNext()&&(o.current=t.current,!0))}};return o}function t(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),t.moveNext()&&e(t.current,n)?(n++,o.current=t.current,!0):(o.current=void 0,!1)}};return o}r.Enumerable.prototype.take=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.takeWhile=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.take=r.Enumerable.prototype.take,r.List.prototype.takeWhile=r.Enumerable.prototype.takeWhile)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t){var n,o=!1,u=[],i={current:void 0,moveNext:function(){if(o){if(null==n)return!1;u.push(n),n=r.selectorEnumerator(t(i.current))}else n=e.getEnumerator(),o=!0;for(;!(n&&n.moveNext()||u.length<1);)n=u.pop();return i.current=null==n?void 0:n.current,void 0!==i.current}};return i}function t(e,t,n){var o,u=!1,i=[],c={current:void 0,moveNext:function(){if(u){if(null==o)return!1;i.push(o),o=r.selectorEnumerator(t(c.current))}else o=e.getEnumerator(),u=!0;do{for(;!(o&&o.moveNext()||i.length<1);)o=i.pop();c.current=null==o?void 0:o.current}while(n(c.current));return void 0!==c.current}};return c}r.Enumerable.prototype.traverse=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.traverseUnique=function(e,n){var o=this,u=[],i=new r.Enumerable;return n?i.getEnumerator=function(){return t(o,e,function(r){return!!u.some(function(e){return n(r,e)})||(u.push(r),!1)})}:i.getEnumerator=function(){return t(o,e,function(r){return u.indexOf(r)>-1||(u.push(r),!1)})},i},r.List&&(r.List.prototype.traverse=r.Enumerable.prototype.traverse,r.List.prototype.traverseUnique=r.Enumerable.prototype.traverseUnique)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n){n=n||function(r,e){return r===e};var o,u,i=[],c={current:void 0,moveNext:function(){if(o||(o=r.en(e).distinct().getEnumerator()),c.current=void 0,!u&&o.moveNext())return i.push(c.current=o.current),!0;for(u=u||r.en(t).distinct().getEnumerator();u.moveNext();){for(var a=0,p=!1,s=i.length;s>a&&!p;a++)p=n(i[a],u.current);if(!p)return c.current=u.current,!0}return!1}};return c}r.Enumerable.prototype.union=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.union=r.Enumerable.prototype.union)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n={current:void 0,moveNext:function(){t||(t=r.getEnumerator());for(var o;t.moveNext();)if(e(o=t.current))return n.current=o,!0;return!1}};return n}r.Enumerable.prototype.where=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.List&&(r.List.prototype.where=r.Enumerable.prototype.where)}(exjs||(exjs={}));var exjs;!function(r){function e(e){var n=new r.Enumerable;return n.getEnumerator=function(){return t(e)},n}function t(r){var e=r.getEnumerator(),t={current:void 0,moveNext:void 0};return t.moveNext=function(){return e.moveNext()?(t.current=e.current,!0):(t.current=void 0,!1)},t}r.en=e}(exjs||(exjs={}));var ex=exjs.en,exjs;!function(r){function e(r,e,t){var n,o,u={current:void 0,moveNext:function(){return n||(n=r.getEnumerator()),o||(o=e.getEnumerator()),u.current=void 0,!(!n.moveNext()||!o.moveNext())&&(u.current=t(n.current,o.current),!0)}};return u}r.Enumerable.prototype.zip=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.zip=r.Enumerable.prototype.zip)}(exjs||(exjs={})),Array.prototype.clone||(Array.prototype.clone=function(){return this.slice(0)}),Array.prototype.contains||(Array.prototype.contains=function(val){return-1!==this.indexOf(val)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var i=fromIndex||0,j=this.length;for(i;j>i;i++)if(this[i]===searchElement)return i;return-1}),Array.prototype.indexOfTest=function(test,fromIndex){var i=fromIndex||0,j=this.length;for(i;j>i;i++)if(test(this[i]))return i;return-1},Array.prototype.insert=function(item,index){this.splice(index,0,item)},Array.prototype.last||(Array.prototype.last=function(){return this[this.length-1]}),Array.prototype.move=function(fromIndex,toIndex){this.splice(toIndex,0,this.splice(fromIndex,1)[0])},Array.prototype.remove=function(item){var index=this.indexOf(item);index>-1&&this.splice(index,1)},Array.prototype.removeAt=function(index){this.splice(index,1)},Math.clamp=function(value,min,max){return Math.min(Math.max(value,min),max)},Math.constrain=function(value,low,high){return Math.clamp(value,low,high)},Math.degreesToRadians=function(degrees){return Math.TAU*(degrees/360)},Math.distanceBetween=function(x1,y1,x2,y2){return Math.sqrt(Math.sq(x2-x1)+Math.sq(y2-y1))},Math.lerp=function(start,stop,amount){return start+(stop-start)*amount},Math.mag=function(a,b,c){return Math.sqrt(a*a+b*b+c*c)},Math.map=function(value,start1,stop1,start2,stop2){return start2+(stop2-start2)*((value-start1)/(stop1-start1))},Math.median=function(values){values.sort(function(a,b){return a-b});var half=Math.floor(values.length/2);return values.length%2?values[half]:(values[half-1]+values[half])/2},Math.normalise=function(num,min,max){return(num-min)/(max-min)},Math.radiansToDegrees=function(radians){return 360*radians/Math.TAU},Math.randomBetween=function(low,high){return high||(high=low,low=0),low>=high?low:low+(high-low)*Math.random()},Math.roundToDecimalPlace=function(num,dec){return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec)},Math.sq=function(n){return n*n},Math.TAU=2*Math.PI,Number.prototype.isInteger||(Number.prototype.isInteger=function(){return this%1===0}),"function"!=typeof Object.create&&(Object.create=function(o,props){function F(){}F.prototype=o;var result=new F;if("object"==typeof props)for(var prop in props)props.hasOwnProperty(prop)&&(result[prop]=props[prop].value);return result}),Object.keys||(Object.keys=function(){var hasOwnProperty=Object.prototype.hasOwnProperty,hasDontEnumBug=!{toString:null}.propertyIsEnumerable("toString"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;return function(obj){if("object"!=typeof obj&&"function"!=typeof obj||null===obj)throw new TypeError("Object.keys called on non-object");var result=[];for(var prop in obj)hasOwnProperty.call(obj,prop)&&result.push(prop);if(hasDontEnumBug)for(var i=0;dontEnumsLength>i;i++)hasOwnProperty.call(obj,dontEnums[i])&&result.push(dontEnums[i]);return result}}()),String.prototype.b64_to_utf8=function(){return decodeURIComponent(escape(window.atob(this)))},String.prototype.contains=function(str){return-1!==this.indexOf(str)},String.prototype.endsWith||(String.prototype.endsWith=function(str){return-1!==this.indexOf(str,this.length-str.length)}),String.format=function(){for(var s=arguments[0],i=0;ii;i++)chr=this.charCodeAt(i),hash=(hash<<5)-hash+chr,hash|=0;return hash.toString()},String.prototype.isAlphanumeric=function(){return/^[a-zA-Z0-9]*$/.test(this)},String.prototype.ltrim=function(){return this.replace(/^\s+/,"")},String.prototype.rtrim=function(){return this.replace(/\s+$/,"")},String.prototype.startsWith||(String.prototype.startsWith=function(str){return 0==this.indexOf(str)}),String.prototype.toCssClass=function(){return this.replace(/[^a-z0-9]/g,function(s){var c=s.charCodeAt(0);return 32==c?"-":c>=65&&90>=c?"_"+s.toLowerCase():"__"+("000"+c.toString(16)).slice(-4)})},String.prototype.toFileName=function(){return this.replace(/[^a-z0-9]/gi,"_").toLowerCase()},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}),String.prototype.utf8_to_b64=function(){return window.btoa(unescape(encodeURIComponent(this)))};var HTTPStatusCode;!function(HTTPStatusCode){HTTPStatusCode.CONTINUE=100,HTTPStatusCode.SWITCHING_PROTOCOLS=101,HTTPStatusCode.PROCESSING=102,HTTPStatusCode.OK=200,HTTPStatusCode.CREATED=201,HTTPStatusCode.ACCEPTED=202,HTTPStatusCode.NON_AUTHORITATIVE_INFORMATION=203,HTTPStatusCode.NO_CONTENT=204,HTTPStatusCode.RESET_CONTENT=205,HTTPStatusCode.PARTIAL_CONTENT=206,HTTPStatusCode.MULTI_STATUS=207,HTTPStatusCode.MULTIPLE_CHOICES=300,HTTPStatusCode.MOVED_PERMANENTLY=301,HTTPStatusCode.MOVED_TEMPORARILY=302,HTTPStatusCode.SEE_OTHER=303,HTTPStatusCode.NOT_MODIFIED=304,HTTPStatusCode.USE_PROXY=305,HTTPStatusCode.TEMPORARY_REDIRECT=307,HTTPStatusCode.BAD_REQUEST=400,HTTPStatusCode.UNAUTHORIZED=401,HTTPStatusCode.PAYMENT_REQUIRED=402,HTTPStatusCode.FORBIDDEN=403,HTTPStatusCode.NOT_FOUND=404,HTTPStatusCode.METHOD_NOT_ALLOWED=405,HTTPStatusCode.NOT_ACCEPTABLE=406,HTTPStatusCode.PROXY_AUTHENTICATION_REQUIRED=407,HTTPStatusCode.REQUEST_TIME_OUT=408,HTTPStatusCode.CONFLICT=409,HTTPStatusCode.GONE=410,HTTPStatusCode.LENGTH_REQUIRED=411,HTTPStatusCode.PRECONDITION_FAILED=412,HTTPStatusCode.REQUEST_ENTITY_TOO_LARGE=413,HTTPStatusCode.REQUEST_URI_TOO_LARGE=414,HTTPStatusCode.UNSUPPORTED_MEDIA_TYPE=415,HTTPStatusCode.REQUESTED_RANGE_NOT_SATISFIABLE=416,HTTPStatusCode.EXPECTATION_FAILED=417,HTTPStatusCode.IM_A_TEAPOT=418,HTTPStatusCode.UNPROCESSABLE_ENTITY=422,HTTPStatusCode.LOCKED=423,HTTPStatusCode.FAILED_DEPENDENCY=424,HTTPStatusCode.UNORDERED_COLLECTION=425,HTTPStatusCode.UPGRADE_REQUIRED=426,HTTPStatusCode.PRECONDITION_REQUIRED=428,HTTPStatusCode.TOO_MANY_REQUESTS=429,HTTPStatusCode.REQUEST_HEADER_FIELDS_TOO_LARGE=431,HTTPStatusCode.INTERNAL_SERVER_ERROR=500,HTTPStatusCode.NOT_IMPLEMENTED=501,HTTPStatusCode.BAD_GATEWAY=502,HTTPStatusCode.SERVICE_UNAVAILABLE=503,HTTPStatusCode.GATEWAY_TIME_OUT=504,HTTPStatusCode.HTTP_VERSION_NOT_SUPPORTED=505,HTTPStatusCode.VARIANT_ALSO_NEGOTIATES=506,HTTPStatusCode.INSUFFICIENT_STORAGE=507,HTTPStatusCode.BANDWIDTH_LIMIT_EXCEEDED=509,HTTPStatusCode.NOT_EXTENDED=510,HTTPStatusCode.NETWORK_AUTHENTICATION_REQUIRED=511}(HTTPStatusCode||(HTTPStatusCode={})),function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{
-var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.manifesto=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(quality="native");else{var images=this.getImages();if(images&&images.length){var firstImage=images[0],resource=firstImage.getResource(),services=resource.getServices();if(width||(width=resource.getWidth()),services.length){var service=services[0];id=service.id,quality=Manifesto.Utils.getImageQuality(service.getProfile())}}if(!id)return"undefined"==typeof this.__jsonld.thumbnail?null:this.__jsonld.thumbnail}size=width+",";var uri=[id,region,size,rotation,quality+".jpg"].join("/");return uri},Canvas.prototype.getImages=function(){var images=[];if(!this.__jsonld.images)return images;for(var i=0;i1},Manifest.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?new Manifesto.ViewingDirection(this.getProperty("viewingDirection")):Manifesto.ViewingDirection.LEFTTORIGHT},Manifest.prototype.getViewingHint=function(){return this.getProperty("viewingHint")?new Manifesto.ViewingHint(this.getProperty("viewingHint")):Manifesto.ViewingHint.EMPTY},Manifest}(Manifesto.IIIFResource);Manifesto.Manifest=Manifest}(Manifesto||(Manifesto={}));var Manifesto,__extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)};!function(Manifesto){var Collection=function(_super){function Collection(jsonld,options){_super.call(this,jsonld,options),this.members=[],this._collections=null,this._manifests=null,jsonld.__collection=this}return __extends(Collection,_super),Collection.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.members.en().where(function(m){return m.isCollection()}).toArray()},Collection.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.members.en().where(function(m){return m.isManifest()}).toArray()},Collection.prototype.getCollectionByIndex=function(collectionIndex){var collection=this.getCollections()[collectionIndex];return collection.options.index=collectionIndex,collection.load()},Collection.prototype.getManifestByIndex=function(manifestIndex){var manifest=this.getManifests()[manifestIndex];return manifest.options.index=manifestIndex,manifest.load()},Collection.prototype.getTotalCollections=function(){return this.getCollections().length},Collection.prototype.getTotalManifests=function(){return this.getManifests().length},Collection.prototype.getTotalMembers=function(){return this.members.length},Collection.prototype.getDefaultTree=function(){return _super.prototype.getDefaultTree.call(this),this.defaultTree.data.type=Manifesto.TreeNodeType.COLLECTION.toString(),this._parseManifests(this),this._parseCollections(this),Manifesto.Utils.generateTreeNodeIds(this.defaultTree),this.defaultTree},Collection.prototype._parseManifests=function(parentCollection){if(parentCollection.getManifests()&&parentCollection.getManifests().length)for(var i=0;i=0;i--){var canvas=this.getCanvasByIndex(i),label=Manifesto.TranslationCollection.getValue(canvas.getLabel(),this.options.locale);if(alphanumeric){var regExp=/^[a-zA-Z0-9]*$/;if(regExp.test(label))return label}else if(label)return label}return this.options.defaultLabel},Sequence.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},Sequence.prototype.getNextPageIndex=function(canvasIndex,pagingEnabled){var index;if(pagingEnabled){var indices=this.getPagedIndices(canvasIndex);index=this.getViewingDirection().toString()===Manifesto.ViewingDirection.RIGHTTOLEFT.toString()?indices[0]+1:_last(indices)+1}else index=canvasIndex+1;return index>this.getLastPageIndex()?-1:index},Sequence.prototype.getPagedIndices=function(canvasIndex,pagingEnabled){var indices=[];return pagingEnabled?(indices=this.isFirstCanvas(canvasIndex)||this.isLastCanvas(canvasIndex)?[canvasIndex]:canvasIndex%2?[canvasIndex,canvasIndex+1]:[canvasIndex-1,canvasIndex],this.getViewingDirection().toString()===Manifesto.ViewingDirection.RIGHTTOLEFT.toString()&&(indices=indices.reverse())):indices.push(canvasIndex),indices},Sequence.prototype.getPrevPageIndex=function(canvasIndex,pagingEnabled){var index;if(pagingEnabled){var indices=this.getPagedIndices(canvasIndex);index=this.getViewingDirection().toString()===Manifesto.ViewingDirection.RIGHTTOLEFT.toString()?_last(indices)-1:indices[0]-1}else index=canvasIndex-1;return index},Sequence.prototype.getStartCanvasIndex=function(){var startCanvas=this.getStartCanvas();if(startCanvas)for(var i=0;ithis.getTotalCanvases()-1},Sequence.prototype.isFirstCanvas=function(canvasIndex){return 0===canvasIndex},Sequence.prototype.isLastCanvas=function(canvasIndex){return canvasIndex===this.getTotalCanvases()-1},Sequence.prototype.isMultiCanvas=function(){return this.getTotalCanvases()>1},Sequence.prototype.isPagingEnabled=function(){return this.getViewingHint().toString()===Manifesto.ViewingHint.PAGED.toString()},Sequence.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2===0},Sequence}(Manifesto.ManifestResource);Manifesto.Sequence=Sequence}(Manifesto||(Manifesto={}));var Manifesto,_isString=require("lodash.isstring");!function(Manifesto){var Deserialiser=function(){function Deserialiser(){}return Deserialiser.parse=function(manifest,options){return this.parseJson(JSON.parse(manifest),options)},Deserialiser.parseJson=function(json,options){var resource;switch(options&&options.navDate&&!isNaN(options.navDate.getTime())&&(json.navDate=options.navDate.toString()),json["@type"]){case"sc:Collection":resource=this.parseCollection(json,options);break;case"sc:Manifest":resource=this.parseManifest(json,options);break;default:return null}return resource.isLoaded=!0,resource},Deserialiser.parseCollection=function(json,options){var collection=new Manifesto.Collection(json,options);return options?collection.index=options.index||0:collection.index=0,this.parseCollections(collection,options),this.parseManifests(collection,options),this.parseMembers(collection,options),collection},Deserialiser.parseCollections=function(collection,options){var children=collection.__jsonld.collections;if(children)for(var i=0;i=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(length){return+length!=length&&(length=0),Buffer.alloc(+length)}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"binary":case"raw":case"raws":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function arrayIndexOf(arr,val,byteOffset,encoding){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&(encoding=String(encoding).toLowerCase(),"ucs2"===encoding||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}for(var foundIndex=-1,i=byteOffset;iremaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128===(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128===(192&secondByte)&&128===(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128===(192&secondByte)&&128===(192&thirdByte)&&128===(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,tempCodePoint>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint))}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset>>=0,0===this.length)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0&&(byteOffset=Math.max(this.length+byteOffset,0)),"string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(this,val,byteOffset,encoding);if("number"==typeof val)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,val,byteOffset):arrayIndexOf(this,[val],byteOffset,encoding);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.includes=function(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset=0|offset,isFinite(length)?(length=0|length,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len,start<0&&(start=0)):start>len&&(start=len),end<0?(end+=len,end<0&&(end=0)):end>len&&(end=len),end0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?(255-this[offset]+1)*-1:this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,byteLength=0|byteLength,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){
-return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i0)throw new Error("Invalid string. Length must be a multiple of 4");placeHolders="="===b64[len-2]?2:"="===b64[len-1]?1:0,arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;ilen2?len2:i+maxChunkLength));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")}exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array;init()},{}],5:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],6:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},{}],7:[function(require,module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;i0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},{}],8:[function(require,module,exports){var http=require("http"),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(params,cb){return params||(params={}),params.scheme="https",params.protocol="https:",http.request.call(this,params,cb)}},{http:27}],9:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],10:[function(require,module,exports){module.exports=function(obj){return!(null==obj||!(obj._isBuffer||obj.constructor&&"function"==typeof obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)))}},{}],11:[function(require,module,exports){function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=cachedSetTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter=55296&&value<=56319&&counter65535&&(value-=65536,output+=stringFromCharCode(value>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function basicToDigit(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias;for(basic=input.lastIndexOf(delimiter),basic<0&&(basic=0),j=0;j=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index=inputLength&&error("invalid-input"),digit=basicToDigit(input.charCodeAt(index++)),(digit>=base||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(digitfloor(maxInt/baseMinusT)&&error("overflow"),w*=baseMinusT;out=output.length+1,bias=adapt(i-oldi,out,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(input=ucs2decode(input),inputLength=input.length,n=initialN,delta=0,bias=initialBias,j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(q= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;if(punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return punycode});else if(freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(require,module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},{}],14:[function(require,module,exports){"use strict";function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:null===n||isNaN(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:n<=0?0:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length=length)ret=stringMode?list.join(""):1===list.length?list[0]:Buffer.concat(list,length),list.length=0;else if(n0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null,null===ret&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),
-0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var _i=0;_i-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream,internalUtil={deprecate:require("util-deprecate")};!function(){try{Stream=require("stream")}catch(_){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims");util.inherits(Writable,Stream);var Duplex;WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var Duplex;Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(this,require("_process"))},{"./_stream_duplex":16,_process:11,buffer:3,"buffer-shims":21,"core-util-is":22,events:7,inherits:9,"process-nextick-args":24,"util-deprecate":25}],21:[function(require,module,exports){(function(global){"use strict";var buffer=require("buffer"),Buffer=buffer.Buffer,SlowBuffer=buffer.SlowBuffer,MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function(size,fill,encoding){if("function"==typeof Buffer.alloc)return Buffer.alloc(size,fill,encoding);if("number"==typeof encoding)throw new TypeError("encoding must not be number");if("number"!=typeof size)throw new TypeError("size must be a number");if(size>MAX_LEN)throw new RangeError("size is too large");var enc=encoding,_fill=fill;void 0===_fill&&(enc=void 0,_fill=0);var buf=new Buffer(size);if("string"==typeof _fill)for(var fillBuf=new Buffer(_fill,enc),flen=fillBuf.length,i=-1;++iMAX_LEN)throw new RangeError("size is too large");return new Buffer(size)},exports.from=function(value,encodingOrOffset,length){if("function"==typeof Buffer.from&&(!global.Uint8Array||Uint8Array.from!==Buffer.from))return Buffer.from(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('"value" argument must not be a number');if("string"==typeof value)return new Buffer(value,encodingOrOffset);if("undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(1===arguments.length)return new Buffer(value);"undefined"==typeof offset&&(offset=0);var len=length;if("undefined"==typeof len&&(len=value.byteLength-offset),offset>=value.byteLength)throw new RangeError("'offset' is out of bounds");if(len>value.byteLength-offset)throw new RangeError("'length' is out of bounds");return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);return value.copy(out,0,0,value.length),out}if(value){if(Array.isArray(value)||"undefined"!=typeof ArrayBuffer&&value.buffer instanceof ArrayBuffer||"length"in value)return new Buffer(value);if("Buffer"===value.type&&Array.isArray(value.data))return new Buffer(value.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},exports.allocUnsafeSlow=function(size){if("function"==typeof Buffer.allocUnsafeSlow)return Buffer.allocUnsafeSlow(size);if("number"!=typeof size)throw new TypeError("size must be a number");if(size>=MAX_LEN)throw new RangeError("size is too large");return new SlowBuffer(size)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:3}],22:[function(require,module,exports){(function(Buffer){function isArray(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return"[object Date]"===objectToString(d)}function isError(e){return"[object Error]"===objectToString(e)||e instanceof Error}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer}).call(this,{isBuffer:require("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":10}],23:[function(require,module,exports){arguments[4][6][0].apply(exports,arguments)},{dup:6}],24:[function(require,module,exports){(function(process){"use strict";function nextTick(fn,arg1,arg2,arg3){if("function"!=typeof fn)throw new TypeError('"callback" argument must be a function');var args,i,len=arguments.length;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:for(args=new Array(len-1),i=0;iself._pos){var newData=response.substr(self._pos);if("x-user-defined"===self._charset){for(var buffer=new Buffer(newData.length),i=0;iself._pos&&(self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos)))),self._pos=reader.result.byteLength)},reader.onload=function(){self.push(null)},reader.readAsArrayBuffer(response)}self._xhr.readyState===rStates.DONE&&"ms-stream"!==self._mode&&self.push(null);
-}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer)},{"./capability":28,_process:11,buffer:3,inherits:9,"readable-stream":26}],31:[function(require,module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],32:[function(require,module,exports){var Buffer=require("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array){if(0===buf.byteOffset&&buf.byteLength===buf.buffer.byteLength)return buf.buffer;if("function"==typeof buf.buffer.slice)return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength)}if(Buffer.isBuffer(buf)){for(var arrayCopy=new Uint8Array(buf.length),len=buf.length,i=0;i=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived=55296&&charCode<=56319)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);var end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived),charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},{buffer:3}],34:[function(require,module,exports){"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}function urlFormat(obj){return util.isString(obj)&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}var punycode=require("punycode"),util=require("./util");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],"."===last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},{"./util":35,punycode:12,querystring:15}],35:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return"string"==typeof arg},isObject:function(arg){return"object"==typeof arg&&null!==arg},isNull:function(arg){return null===arg},isNullOrUndefined:function(arg){return null==arg}}},{}],36:[function(require,module,exports){function extend(){for(var target={},i=0;i2?sources[length-2]:void 0,guard=length>2?sources[2]:void 0,thisArg=length>1?sources[length-1]:void 0;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:void 0,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?void 0:customizer,length=1);++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var reIsUint=/^\d+$/,MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=isIterateeCall},{}],43:[function(require,module,exports){function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(void 0===start?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index0;++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable,getLength=baseProperty("length");module.exports=isArguments},{}],47:[function(require,module,exports){function baseClamp(number,lower,upper){return number===number&&(void 0!==upper&&(number=number<=upper?number:upper),void 0!==lower&&(number=number>=lower?number:lower)),number}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toInteger(value){if(!value)return 0===value?value:0;if(value=toNumber(value),value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER}var remainder=value%1;return value===value?remainder?value-remainder:value:0}function toNumber(value){if(isObject(value)){var other=isFunction(value.valueOf)?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=value.replace(reTrim,"");var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}function toString(value){if("string"==typeof value)return value;if(null==value)return"";if(isSymbol(value))return Symbol?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function endsWith(string,target,position){string=toString(string),target="string"==typeof target?target:target+"";var length=string.length;return position=void 0===position?length:baseClamp(toInteger(position),0,length),position-=target.length,position>=0&&string.indexOf(target,position)==position}var root=require("lodash._root"),INFINITY=1/0,MAX_INTEGER=1.7976931348623157e308,NAN=NaN,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,objectProto=Object.prototype,objectToString=objectProto.toString,Symbol=root.Symbol,symbolProto=Symbol?Symbol.prototype:void 0,symbolToString=Symbol?symbolProto.toString:void 0;module.exports=endsWith},{"lodash._root":48}],48:[function(require,module,exports){(function(global){function checkGlobal(value){return value&&value.Object===Object?value:null}var objectTypes={"function":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType?exports:void 0,freeModule=objectTypes[typeof module]&&module&&!module.nodeType?module:void 0,freeGlobal=checkGlobal(freeExports&&freeModule&&"object"==typeof global&&global),freeSelf=checkGlobal(objectTypes[typeof self]&&self),freeWindow=checkGlobal(objectTypes[typeof window]&&window),thisGlobal=checkGlobal(objectTypes[typeof this]&&this),root=freeGlobal||freeWindow!==(thisGlobal&&thisGlobal.window)&&freeWindow||freeSelf||thisGlobal||Function("return this")();module.exports=root}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],49:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isNative(value){return null!=value&&(isFunction(value)?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value))}var arrayTag="[object Array]",funcTag="[object Function]",reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nativeIsArray=getNative(Array,"isArray"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};module.exports=isArray},{}],50:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}var stringTag="[object String]",objectProto=Object.prototype,objToString=objectProto.toString;module.exports=isString},{}],51:[function(require,module,exports){function last(array){var length=array?array.length:0;return length?array[length-1]:void 0}module.exports=last},{}],52:[function(require,module,exports){function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;return iteratee=baseCallback(iteratee,thisArg,3),func(collection,iteratee)}var arrayMap=require("lodash._arraymap"),baseCallback=require("lodash._basecallback"),baseEach=require("lodash._baseeach"),isArray=require("lodash.isarray"),MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=map},{"lodash._arraymap":53,"lodash._basecallback":54,"lodash._baseeach":59,"lodash.isarray":49}],53:[function(require,module,exports){function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);++indexlength?0:length+start),end=void 0===end||end>length?length:+end||0,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++indexarrLength))return!1;for(;++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObjectLike(value){return!!value&&"object"==typeof value}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray},{}],57:[function(require,module,exports){arguments[4][41][0].apply(exports,arguments)},{dup:41}],58:[function(require,module,exports){function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function pairs(object){object=toObject(object);for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var keys=require("lodash.keys"),MAX_SAFE_INTEGER=9007199254740991,baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor(),getLength=baseProperty("length");module.exports=baseEach},{"lodash.keys":60}],60:[function(require,module,exports){arguments[4][44][0].apply(exports,arguments)},{dup:44,"lodash._getnative":61,"lodash.isarguments":62,"lodash.isarray":49}],61:[function(require,module,exports){arguments[4][45][0].apply(exports,arguments)},{dup:45}],62:[function(require,module,exports){arguments[4][46][0].apply(exports,arguments)},{dup:46}]},{},[1])(1)}),function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.manifold=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o0&&msie<11)if(9===msie){var settings={url:that._options.iiifResourceUri,type:"GET",dataType:"jsonp",jsonp:"callback",jsonpCallback:"manifestCallback"};$.ajax(settings),window.manifestCallback=function(json){that._loaded(that,JSON.stringify(json),resolve,reject)}}else 10===msie&&$.getJSON(that._options.iiifResourceUri,function(json){that._loaded(that,JSON.stringify(json),resolve,reject)});else manifesto.loadManifest(that._options.iiifResourceUri).then(function(json){that._loaded(that,json,resolve,reject)})})},Bootstrapper.prototype._loaded=function(bootstrapper,json,resolve,reject){var iiifResource=manifesto.create(json,{locale:bootstrapper._options.locale});if(bootstrapper._options.iiifResource||(bootstrapper._options.iiifResource=iiifResource),iiifResource.getIIIFResourceType().toString()===manifesto.IIIFResourceType.collection().toString()){var collections=iiifResource.getCollections();collections&&collections.length?iiifResource.getCollectionByIndex(bootstrapper._options.collectionIndex).then(function(collection){collection||reject("Collection index not found"),0===collection.getTotalManifests()&&0===bootstrapper._options.manifestIndex&&collection.getTotalCollections()>0&&(bootstrapper._options.collectionIndex=0,bootstrapper._options.iiifResourceUri=collection.id,bootstrapper.bootstrap()),collection.getManifestByIndex(bootstrapper._options.manifestIndex).then(function(manifest){bootstrapper._options.manifest=manifest;var helper=new Manifold.Helper(bootstrapper._options);resolve(helper)})}):iiifResource.getManifestByIndex(bootstrapper._options.manifestIndex).then(function(manifest){bootstrapper._options.manifest=manifest;var helper=new Manifold.Helper(bootstrapper._options);resolve(helper)})}else{bootstrapper._options.manifest=iiifResource;var helper=new Manifold.Helper(bootstrapper._options);resolve(helper)}},Bootstrapper.prototype._msieversion=function(){var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");return msie>0?parseInt(ua.substring(msie+5,ua.indexOf(".",msie))):0},Bootstrapper}();Manifold.Bootstrapper=Bootstrapper}(Manifold||(Manifold={}));var Manifold;!function(Manifold){var ExternalResource=function(){function ExternalResource(resource,dataUriFunc){this.isResponseHandled=!1,resource.externalResource=this,this.dataUri=dataUriFunc(resource),this._parseAuthServices(resource)}return ExternalResource.prototype._parseAuthServices=function(resource){this.clickThroughService=manifesto.getService(resource,manifesto.ServiceProfile.clickThrough().toString()),this.loginService=manifesto.getService(resource,manifesto.ServiceProfile.login().toString()),this.restrictedService=manifesto.getService(resource,manifesto.ServiceProfile.restricted().toString()),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(manifesto.ServiceProfile.logout().toString()),this.tokenService=this.clickThroughService.getService(manifesto.ServiceProfile.token().toString())):this.loginService?(this.logoutService=this.loginService.getService(manifesto.ServiceProfile.logout().toString()),this.tokenService=this.loginService.getService(manifesto.ServiceProfile.token().toString())):this.restrictedService&&(this.logoutService=this.restrictedService.getService(manifesto.ServiceProfile.logout().toString()),this.tokenService=this.restrictedService.getService(manifesto.ServiceProfile.token().toString()))},ExternalResource.prototype.isAccessControlled=function(){return!!(this.clickThroughService||this.loginService||this.restrictedService)},ExternalResource.prototype.hasServiceDescriptor=function(){return this.dataUri.endsWith("info.json")},ExternalResource.prototype.getData=function(accessToken){var that=this;return new Promise(function(resolve,reject){var type="GET";if(!that.hasServiceDescriptor()){if(!that.isAccessControlled())return that.status=HTTPStatusCode.OK,void resolve(that);type="HEAD"}$.ajax({url:that.dataUri,type:type,dataType:"json",beforeSend:function(xhr){accessToken&&xhr.setRequestHeader("Authorization","Bearer "+accessToken.accessToken)}}).done(function(data){if(data){var uri=unescape(data["@id"]);that.data=data,that._parseAuthServices(that.data),uri.endsWith("/info.json")&&(uri=uri.substr(0,uri.lastIndexOf("/")));var dataUri=that.dataUri;dataUri.endsWith("/info.json")&&(dataUri=dataUri.substr(0,dataUri.lastIndexOf("/"))),uri!==dataUri&&that.loginService?that.status=HTTPStatusCode.MOVED_TEMPORARILY:that.status=HTTPStatusCode.OK,resolve(that)}else that.status=HTTPStatusCode.OK,resolve(that)}).fail(function(error){that.status=error.status,that.error=error,error.responseJSON&&that._parseAuthServices(error.responseJSON),resolve(that)})})},ExternalResource}();Manifold.ExternalResource=ExternalResource}(Manifold||(Manifold={}));var Manifold;!function(Manifold){var Helper=function(){function Helper(options){this.options=options,this.iiifResource=this.options.iiifResource,this.iiifResourceUri=this.options.iiifResourceUri,this.manifest=this.options.manifest,this.collectionIndex=this.options.collectionIndex||0,this.manifestIndex=this.options.manifestIndex||0,this.sequenceIndex=this.options.sequenceIndex||0,this.canvasIndex=this.options.canvasIndex||0}return Helper.prototype.getAutoCompleteService=function(){var service=this.getSearchWithinService();return service?service.getService(manifesto.ServiceProfile.autoComplete()):null},Helper.prototype.getAttribution=function(){return Manifesto.TranslationCollection.getValue(this.manifest.getAttribution())},Helper.prototype.getCanvases=function(){return this.getCurrentSequence().getCanvases()},Helper.prototype.getCanvasById=function(id){return this.getCurrentSequence().getCanvasById(id)},Helper.prototype.getCanvasesById=function(ids){for(var canvases=[],i=0;i '},metadataItem=new Manifesto.MetadataItem(this.options.locale);metadataItem.parse(item),metadataItem.isRootLevel=!0,manifestGroup.addItem(metadataItem)}return metadataGroups.push(manifestGroup),options?this._parseMetadataOptions(options,metadataGroups):metadataGroups},Helper.prototype._parseMetadataOptions=function(options,metadataGroups){var sequence=this.getCurrentSequence(),sequenceMetadata=sequence.getMetadata();if(sequenceMetadata&&sequenceMetadata.length){var sequenceGroup=new Manifold.MetadataGroup(sequence);sequenceGroup.addMetadata(sequenceMetadata),metadataGroups.push(sequenceGroup)}if(options.range){var rangeGroups=this._getRangeMetadata([],options.range);rangeGroups=rangeGroups.reverse(),metadataGroups=metadataGroups.concat(rangeGroups)}if(options.canvases&&options.canvases.length)for(var i=0;i0},Helper.prototype.isBottomToTop=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.bottomToTop().toString()},Helper.prototype.isCanvasIndexOutOfRange=function(index){return this.getCurrentSequence().isCanvasIndexOutOfRange(index)},Helper.prototype.isContinuous=function(){return this.getViewingHint().toString()===manifesto.ViewingHint.continuous().toString()},Helper.prototype.isFirstCanvas=function(index){return"undefined"!=typeof index?this.getCurrentSequence().isFirstCanvas(index):this.getCurrentSequence().isFirstCanvas(this.canvasIndex)},Helper.prototype.isHorizontallyAligned=function(){return this.isLeftToRight()||this.isRightToLeft()},Helper.prototype.isLastCanvas=function(index){return"undefined"!=typeof index?this.getCurrentSequence().isLastCanvas(index):this.getCurrentSequence().isLastCanvas(this.canvasIndex)},Helper.prototype.isLeftToRight=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.leftToRight().toString()},Helper.prototype.isMultiCanvas=function(){return this.getCurrentSequence().isMultiCanvas()},Helper.prototype.isMultiSequence=function(){return this.manifest.isMultiSequence()},Helper.prototype.isPaged=function(){return this.getViewingHint().toString()===manifesto.ViewingHint.paged().toString()},Helper.prototype.isPagingAvailable=function(){return this.isPagingEnabled()&&this.getTotalCanvases()>2},Helper.prototype.isPagingEnabled=function(){return this.getCurrentSequence().isPagingEnabled()},Helper.prototype.isRightToLeft=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.rightToLeft().toString();
-},Helper.prototype.isTopToBottom=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.topToBottom().toString()},Helper.prototype.isTotalCanvasesEven=function(){return this.getCurrentSequence().isTotalCanvasesEven()},Helper.prototype.isUIEnabled=function(name){var uiExtensions=this.manifest.getService(manifesto.ServiceProfile.uiExtensions());if(uiExtensions){var disableUI=uiExtensions.getProperty("disableUI");if(disableUI&&(disableUI.contains(name)||disableUI.contains(name.toLowerCase())))return!1}return!0},Helper.prototype.isVerticallyAligned=function(){return this.isTopToBottom()||this.isBottomToTop()},Helper.prototype.createDateNodes=function(rootNode,nodes){for(var i=0;i=n.data.startYear&&year<=n.data.endYear)return n}return null},Helper.prototype.getMonthNode=function(yearNode,month){for(var i=0;i0&&this.getAllSelectedCanvases().length===this.canvases.length},MultiSelectState.prototype.allRangesSelected=function(){return this.ranges.length>0&&this.getAllSelectedRanges().length===this.ranges.length},MultiSelectState.prototype.allSelected=function(){return this.allRangesSelected()&&this.allCanvasesSelected()},MultiSelectState.prototype.getAll=function(){return this.canvases.concat(this.ranges)},MultiSelectState.prototype.getAllSelectedCanvases=function(){return this.canvases.en().where(function(c){return c.multiSelected}).toArray()},MultiSelectState.prototype.getAllSelectedRanges=function(){return this.ranges.en().where(function(r){return r.multiSelected}).toArray()},MultiSelectState.prototype.getCanvasById=function(id){return this.canvases.en().where(function(c){return c.id===id}).first()},MultiSelectState.prototype.getCanvasesByIds=function(ids){for(var canvases=[],i=0;i'+label+""},UriLabeller}();Manifold.UriLabeller=UriLabeller}(Manifold||(Manifold={}))},{}]},{},[1])(1)}),function(t,e,o){"use strict";function r(t,e,r,p){r=r||"width";var n,l,m,c=(e.match(s)||[])[2],f="px"===c?1:d[c+"toPx"],u=/r?em/i;if(f||u.test(c)&&!p)t=f?t:"rem"===c?i:"fontSize"===r?t.parentNode||t:t,f=f||parseFloat(a(t,"fontSize")),m=parseFloat(e)*f;else{n=t.style,l=n[r];try{n[r]=e}catch(x){return 0}m=n[r]?parseFloat(a(t,r)):0,n[r]=l!==o?l:null}return m}function a(t,e){var o,n,i,l,d,c=/^top|bottom/,f=["paddingTop","paddingBottom","borderTop","borderBottom"],u=4;if(o=m?m(t)[e]:(n=t.style["pixel"+e.charAt(0).toUpperCase()+e.slice(1)])?n+"px":"fontSize"===e?r(t,"1em","left",1)+"px":t.currentStyle[e],i=(o.match(s)||[])[2],"%"===i&&p)if(c.test(e)){for(l=(d=t.parentNode||t).offsetHeight;u--;)l-=parseFloat(a(d,f[u]));o=parseFloat(o)/100*l+"px"}else o=r(t,o);else("auto"===o||i&&"px"!==i)&&m?o=0:i&&"px"!==i&&!m&&(o=r(t,o)+"px");return o}var p,n=e.createElement("test"),i=e.documentElement,l=e.defaultView,m=l&&l.getComputedStyle,s=/^(-?[\d+\.\-]+)([a-z]+|%)$/i,d={},c=[1/25.4,1/2.54,1/72,1/6],f=["mm","cm","pt","pc","in","mozmm"],u=6;for(i.appendChild(n),m&&(n.style.marginTop="1%",p="1%"===m(n).marginTop);u--;)d[f[u]+"toPx"]=c[u]?c[u]*d.inToPx:r(n,"1"+f[u]);i.removeChild(n),n=o,t.Length={toPx:r}}(this,this.document);var Utils;!function(Utils){var Async=function(){function Async(){}return Async.waitFor=function(test,successCallback,failureCallback,interval,maxTries,numTries){interval||(interval=200),maxTries||(maxTries=100),numTries||(numTries=0),numTries+=1,numTries>maxTries?failureCallback&&failureCallback():test()?successCallback():setTimeout(function(){Async.waitFor(test,successCallback,failureCallback,interval,maxTries,numTries)},interval)},Async}();Utils.Async=Async}(Utils||(Utils={}));var Utils;!function(Utils){var Bools=function(){function Bools(){}return Bools.getBool=function(val,defaultVal){return null===val||"undefined"==typeof val?defaultVal:val},Bools}();Utils.Bools=Bools}(Utils||(Utils={}));var Utils;!function(Utils){var Clipboard=function(){function Clipboard(){}return Clipboard.copy=function(text){var $tempDiv=$(""),brRegex=/
/gi;text=text.replace(brRegex,"\n"),$("body").append($tempDiv),$tempDiv.append(text);var $tempInput=$("
'),this.$element.append(this.$tree)},t.prototype.setup=function(){this.component=new IIIFComponents.TreeComponent(this.treeOptions),this.component.on("treeNodeSelected",function(e){var t=e[0];$.publish(n.TREE_NODE_SELECTED,[t])}),this.component.on("treeNodeMultiSelected",function(e){var t=e[0];$.publish(n.TREE_NODE_MULTISELECTED,[t])})},t.prototype.databind=function(){this.component.options=this.treeOptions,this.component.databind(),this.resize()},t.prototype.show=function(){this.isOpen=!0,this.$element.show()},t.prototype.hide=function(){this.isOpen=!1,this.$element.hide()},t.prototype.selectNode=function(e){this.component.selectNode(e)},t.prototype.deselectCurrentNode=function(){this.component.deselectCurrentNode()},t.prototype.getNodeById=function(e){return this.component.getNodeById(e)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-contentleftpanel-module/ContentLeftPanel",["require","exports","../uv-shared-module/BaseCommands","../../extensions/uv-seadragon-extension/Commands","./GalleryView","../uv-shared-module/LeftPanel","../uv-shared-module/Metrics","../../extensions/uv-seadragon-extension/Mode","./ThumbsView","./TreeView"],function(e,t,i,n,o,s,r,a,l,h){var c=function(e){function t(t){e.call(this,t),this.expandFullEnabled=!1,this.isThumbsViewOpen=!1,this.isTreeViewOpen=!1,this.treeSortType=Manifold.TreeSortType.NONE}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("contentLeftPanel"),e.prototype.create.call(this);$.subscribe(i.SETTINGS_CHANGED,function(){t.databind()}),$.subscribe(n.GALLERY_THUMB_SELECTED,function(){t.collapseFull()}),$.subscribe(i.METRIC_CHANGED,function(){t.extension.metric===r.MOBILE_LANDSCAPE&&t.isFullyExpanded&&t.collapseFull()}),$.subscribe(n.SEARCH_RESULTS,function(){t.databindThumbsView(),t.databindGalleryView()}),$.subscribe(n.SEARCH_RESULTS_CLEARED,function(){t.databindThumbsView(),t.databindGalleryView()}),$.subscribe(n.SEARCH_RESULTS_EMPTY,function(){t.databindThumbsView(),t.databindGalleryView()}),$.subscribe(i.CANVAS_INDEX_CHANGED,function(e,i){t.isFullyExpanded&&t.collapseFull(),t.selectCurrentTreeNode(),t.updateTreeTabBySelection()}),this.$tabs=$('
'),this.$main.append(this.$tabs),this.$treeButton=$(''+this.content.index+" "),this.$tabs.append(this.$treeButton),this.$thumbsButton=$(''+this.content.thumbnails+" "),this.$thumbsButton.prop("title",this.content.thumbnails),this.$tabs.append(this.$thumbsButton),this.$tabsContent=$('
'),this.$main.append(this.$tabsContent),this.$options=$('
'),this.$tabsContent.append(this.$options),this.$topOptions=$('
'),this.$options.append(this.$topOptions),this.$treeSelect=$(" "),this.$topOptions.append(this.$treeSelect),this.$bottomOptions=$('
'),this.$options.append(this.$bottomOptions),this.$leftOptions=$('
'),this.$bottomOptions.append(this.$leftOptions),this.$rightOptions=$('
'),this.$bottomOptions.append(this.$rightOptions),this.$treeViewOptions=$('
'),this.$leftOptions.append(this.$treeViewOptions),this.$sortByLabel=$(''+this.content.sortBy+" "),this.$treeViewOptions.append(this.$sortByLabel),this.$sortButtonGroup=$('
'),this.$treeViewOptions.append(this.$sortButtonGroup),this.$sortByDateButton=$(''+this.content.date+" "),this.$sortButtonGroup.append(this.$sortByDateButton),this.$sortByVolumeButton=$(''+this.content.volume+" "),this.$sortButtonGroup.append(this.$sortByVolumeButton),this.$views=$('
'),this.$tabsContent.append(this.$views),this.$treeView=$('
'),this.$views.append(this.$treeView),this.$thumbsView=$('
'),this.$views.append(this.$thumbsView),this.$galleryView=$('
'),this.$views.append(this.$galleryView),this.$treeSelect.hide(),this.$treeSelect.change(function(){t.databindTreeView(),t.selectCurrentTreeNode(),t.updateTreeTabBySelection()}),this.$sortByDateButton.on("click",function(){t.sortByDate()}),this.$sortByVolumeButton.on("click",function(){t.sortByVolume()}),this.$treeViewOptions.hide(),this.$treeButton.onPressed(function(){t.openTreeView(),$.publish(n.OPEN_TREE_VIEW)}),this.$thumbsButton.onPressed(function(){t.openThumbsView(),$.publish(n.OPEN_THUMBS_VIEW)}),this.setTitle(this.content.title),this.$sortByVolumeButton.addClass("on");var o=this.options.tabOrder;if(o){o=o.toLowerCase(),o=o.replace(/ /g,"");var s=o.split(",");"thumbs"===s[0]?(this.$treeButton.before(this.$thumbsButton),this.$thumbsButton.addClass("first")):this.$treeButton.addClass("first")}},t.prototype.createTreeView=function(){this.treeView=new h(this.$treeView),this.treeView.treeOptions=this.getTreeOptions(),this.treeView.setup(),this.databindTreeView();var e=this.extension.helper.getTopRanges();if(e.length>1)for(var t=0;t'+Manifesto.TranslationCollection.getValue(i.getLabel())+"")}this.updateTreeViewOptions()},t.prototype.databind=function(){this.databindThumbsView(),this.databindTreeView(),this.databindGalleryView()},t.prototype.updateTreeViewOptions=function(){var e=this.getTreeData();this.isCollection()&&this.extension.helper.treeHasNavDates(e)?this.$treeViewOptions.show():this.$treeViewOptions.hide(),this.$treeSelect.find("option").length?this.$treeSelect.show():this.$treeSelect.hide()},t.prototype.sortByDate=function(){this.treeSortType=Manifold.TreeSortType.DATE,this.treeView.treeOptions=this.getTreeOptions(),this.treeView.databind(),this.selectCurrentTreeNode(),this.$sortByDateButton.addClass("on"),this.$sortByVolumeButton.removeClass("on"),this.resize()},t.prototype.sortByVolume=function(){this.treeSortType=Manifold.TreeSortType.NONE,this.treeView.treeOptions=this.getTreeOptions(),this.treeView.databind(),this.selectCurrentTreeNode(),this.$sortByDateButton.removeClass("on"),this.$sortByVolumeButton.addClass("on"),this.resize()},t.prototype.isCollection=function(){var e=this.getTreeData();return e.data.type===manifesto.TreeNodeType.collection().toString()},t.prototype.databindTreeView=function(){this.treeView&&(this.treeView.treeOptions=this.getTreeOptions(),this.treeView.databind(),this.selectCurrentTreeNode())},t.prototype.getTreeOptions=function(){return{branchNodesSelectable:!1,element:".views .treeView .iiif-tree-component",helper:this.extension.helper,topRangeIndex:this.getSelectedTopRangeIndex(),treeSortType:this.treeSortType}},t.prototype.updateTreeTabByCanvasIndex=function(){var e=this.extension.helper.getTopRanges();if(e.length>1){var t=this.getCurrentCanvasTopRangeIndex(),i=e[t];this.setTreeTabTitle(Manifesto.TranslationCollection.getValue(i.getLabel()))}else this.setTreeTabTitle(this.content.index)},t.prototype.setTreeTabTitle=function(e){this.$treeButton.text(e),this.$treeButton.prop("title",e)},t.prototype.updateTreeTabBySelection=function(){var e,t=this.extension.helper.getTopRanges();t.length>1&&(e=this.treeView?this.getSelectedTree().text():Manifesto.TranslationCollection.getValue(t[0].getLabel())),e?this.setTreeTabTitle(e):this.setTreeTabTitle(this.content.index)},t.prototype.getViewingDirection=function(){return this.extension.helper.getViewingDirection()},t.prototype.createThumbsView=function(){this.thumbsView=new l(this.$thumbsView),this.databindThumbsView()},t.prototype.databindThumbsView=function(){if(this.thumbsView){var e,t,i=this.getViewingDirection().toString();i===manifesto.ViewingDirection.topToBottom().toString()||i===manifesto.ViewingDirection.bottomToTop().toString()?(e=this.config.options.oneColThumbWidth,t=this.config.options.oneColThumbHeight):(e=this.config.options.twoColThumbWidth,t=this.config.options.twoColThumbHeight);var n=this.extension.helper.getThumbs(e,t);i===manifesto.ViewingDirection.bottomToTop().toString()&&n.reverse();var o=this.extension.searchResults;if(o&&o.length)for(var s=0;st?!1:!0},t.prototype.expandFullStart=function(){e.prototype.expandFullStart.call(this),$.publish(i.LEFTPANEL_EXPAND_FULL_START)},t.prototype.expandFullFinish=function(){e.prototype.expandFullFinish.call(this),this.$treeButton.hasClass("on")?this.openTreeView():this.$thumbsButton.hasClass("on")&&this.openThumbsView(),$.publish(i.LEFTPANEL_EXPAND_FULL_FINISH)},t.prototype.collapseFullStart=function(){e.prototype.collapseFullStart.call(this),$.publish(i.LEFTPANEL_COLLAPSE_FULL_START)},t.prototype.collapseFullFinish=function(){e.prototype.collapseFullFinish.call(this),this.$thumbsButton.hasClass("on")&&this.openThumbsView(),$.publish(i.LEFTPANEL_COLLAPSE_FULL_FINISH)},t.prototype.openTreeView=function(){this.isTreeViewOpen=!0,this.isThumbsViewOpen=!1,this.treeView||this.createTreeView(),this.$treeButton.addClass("on"),this.$thumbsButton.removeClass("on"),this.treeView.show(),this.thumbsView&&this.thumbsView.hide(),this.galleryView&&this.galleryView.hide(),this.updateTreeViewOptions(),this.selectCurrentTreeNode(),this.resize(),this.treeView.resize()},t.prototype.openThumbsView=function(){this.isTreeViewOpen=!1,this.isThumbsViewOpen=!0,this.thumbsView||this.createThumbsView(),this.isFullyExpanded&&!this.galleryView&&this.createGalleryView(),this.$treeButton.removeClass("on"),this.$thumbsButton.addClass("on"),this.treeView&&this.treeView.hide(),this.$treeSelect.hide(),this.$treeViewOptions.hide(),this.resize(),this.isFullyExpanded?(this.thumbsView.hide(),this.galleryView&&this.galleryView.show(),this.galleryView&&this.galleryView.resize()):(this.galleryView&&this.galleryView.hide(),this.thumbsView.show(),this.thumbsView.resize())},t.prototype.selectTopRangeIndex=function(e){this.$treeSelect.prop("selectedIndex",e)},t.prototype.getCurrentCanvasTopRangeIndex=function(){var e=-1,t=this.extension.getCurrentCanvasRange();return t&&(e=Number(t.path.split("/")[0])),e},t.prototype.selectCurrentTreeNode=function(){if(this.treeView){var e,t=this.getCurrentCanvasTopRangeIndex(),i=this.getSelectedTopRangeIndex(),n=t===i;if(-1!=t){var o=this.extension.getCurrentCanvasRange();o&&o.treeNode&&(e=this.treeView.getNodeById(o.treeNode.id))}e&&n?this.treeView.selectNode(e):this.treeView.deselectCurrentNode()}},t.prototype.resize=function(){e.prototype.resize.call(this),this.$tabsContent.height(this.$main.height()-(this.$tabs.is(":visible")?this.$tabs.height():0)-this.$tabsContent.verticalPadding()),this.$views.height(this.$tabsContent.height()-this.$options.outerHeight())},t}(s);return c}),define("modules/uv-shared-module/Point",["require","exports"],function(e,t){var i=function(){function e(e,t){this.x=e,this.y=t}return e}();return i}),define("extensions/uv-seadragon-extension/CroppedImageDimensions",["require","exports","../../modules/uv-shared-module/Point"],function(e,t,i){var n=Utils.Measurements.Size,o=function(){function e(){this.region=new n(0,0),this.regionPos=new i(0,0),this.size=new n(0,0)}return e}();return o}),define("extensions/uv-seadragon-extension/DownloadType",["require","exports"],function(e,t){var i=function(){function e(){}return e.CURRENTVIEW="currentView",e.ENTIREDOCUMENTASPDF="entireDocumentAsPdf",e.ENTIREDOCUMENTASTEXT="entireDocumentAsText",e.WHOLEIMAGEHIGHRES="wholeImageHighRes",e.WHOLEIMAGESHIGHRES="wholeImageHighRes",e.WHOLEIMAGELOWRES="wholeImageLowRes",e.UNKNOWN="unknown",e}();return i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/DownloadDialogue",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-dialogues-module/DownloadDialogue","./Commands","../../modules/uv-shared-module/DownloadOption","./DownloadType"],function(e,t,i,n,o,s,r){var a=Utils.Measurements.Size,l=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("downloadDialogue"),e.prototype.create.call(this),this.$imageOptionsContainer=$(' '),this.$downloadOptions.append(this.$imageOptionsContainer),this.$imageOptions=$(""),this.$imageOptionsContainer.append(this.$imageOptions),this.$currentViewAsJpgButton=$(' '),this.$imageOptions.append(this.$currentViewAsJpgButton),this.$currentViewAsJpgButton.hide(),this.$wholeImageHighResButton=$(' '),this.$imageOptions.append(this.$wholeImageHighResButton),this.$wholeImageHighResButton.hide(),this.$wholeImagesHighResButton=$(' '),this.$imageOptions.append(this.$wholeImagesHighResButton),this.$wholeImageHighResButton.hide(),this.$wholeImageLowResAsJpgButton=$(''+this.content.wholeImageLowResAsJpg+" "),this.$imageOptions.append(this.$wholeImageLowResAsJpgButton),this.$wholeImageLowResAsJpgButton.hide(),this.$canvasOptionsContainer=$(' '),this.$downloadOptions.append(this.$canvasOptionsContainer),this.$canvasOptions=$(""),this.$canvasOptionsContainer.append(this.$canvasOptions),this.$sequenceOptionsContainer=$(' '),this.$downloadOptions.append(this.$sequenceOptionsContainer),this.$sequenceOptions=$(""),this.$sequenceOptionsContainer.append(this.$sequenceOptions),this.$selectionButton=$(' '),this.$sequenceOptions.append(this.$selectionButton),this.$selectionButton.hide(),this.$buttonsContainer=$('
'),this.$content.append(this.$buttonsContainer),this.$downloadButton=$(''+this.content.download+" "),this.$buttonsContainer.append(this.$downloadButton),this.$explanatoryTextTemplate=$(' ');var n=this;this.$downloadButton.on("click",function(e){e.preventDefault();var a=n.getSelectedOption(),l=a.attr("id"),h=a.attr("title"),c=a.data("mime"),u=r.UNKNOWN,p=t.extension.helper.getCurrentCanvas();if(t.renderingUrls[l])c&&(-1!==c.toLowerCase().indexOf("pdf")?u=r.ENTIREDOCUMENTASPDF:-1!==c.toLowerCase().indexOf("txt")&&(u=r.ENTIREDOCUMENTASTEXT)),(u=r.ENTIREDOCUMENTASPDF)&&window.open(t.renderingUrls[l]);else switch(l){case s.currentViewAsJpg.toString():var d=n.extension.getViewer();window.open(n.extension.getCroppedImageUri(p,d)),u=r.CURRENTVIEW;break;case s.selection.toString():Utils.Async.waitFor(function(){return!t.isActive},function(){$.publish(o.SHOW_MULTISELECT_DIALOGUE)});break;case s.wholeImageHighRes.toString():window.open(t.getCanvasHighResImageUri(t.extension.helper.getCurrentCanvas())),u=r.WHOLEIMAGEHIGHRES;break;case s.wholeImagesHighRes.toString():for(var g=t.extension.getPagedIndices(),f=0;f=S&&y>=S?this.$currentViewAsJpgButton.hide():this.$currentViewAsJpgButton.show()}var _=this.$imageOptions.find("li.single");_=_.sort(function(e,t){var i=$(e).data("width");i?i=parseInt(i.toString()):0;var n=$(e).data("height");n?n=parseInt(n.toString()):0;var o=$(t).data("width");o?o=parseInt(o.toString()):0;var s=$(t).data("height");s?s=parseInt(s.toString()):0;var r=i*n,a=o*s;return a>r?-1:r>a?1:0}),_.detach().appendTo(this.$imageOptions);var C=this.$downloadOptions.find("li.group");C.each(function(e,t){var i=$(t);i.show(),i.find("li.option:hidden").length===i.find("li.option").length&&i.hide()}),this.$downloadOptions.find("li.group:visible").last().addClass("lastVisible"),this.$downloadOptions.find("li.option:visible").length?(this.$downloadOptions.find("li.option input:visible:first").prop("checked",!0),this.$noneAvailable.hide(),this.$downloadButton.show()):(this.$noneAvailable.show(),this.$downloadButton.hide()),this.resize()},t.prototype.resetDynamicDownloadOptions=function(){this.renderingUrls=[],this.renderingUrlsCount=0,this.$downloadOptions.find("li.dynamic").remove()},t.prototype.addDownloadOptionsForRenderings=function(e,t,i){for(var n=e.getRenderings(),o=0;o'+a+" ");switch(i){case s.dynamicImageRenderings:this.$imageOptions.append(c);break;case s.dynamicCanvasRenderings:this.$canvasOptions.append(c);break;case s.dynamicSequenceRenderings:this.$sequenceOptions.append(c)}}}},t.prototype.getSelectedOption=function(){return this.$downloadOptions.find("li.option input:checked")},t.prototype.getCanvasImageResource=function(e){var t=e.getImages();return t[0]?t[0].getResource():null},t.prototype.getCanvasHighResImageUri=function(e){var t=this.getCanvasComputedDimensions(e);if(t){var i=t.width,n=e.getCanonicalImageUri(i),o=n.split("/"),s=this.extension.getViewerRotation();return o[o.length-2]=String(s),n=o.join("/")}return""},t.prototype.getCanvasMimeType=function(e){var t=this.getCanvasImageResource(e),i=t.getFormat();return i?i.toString():null},t.prototype.getCanvasDimensions=function(e){return e.externalResource.data?new a(e.externalResource.data.width,e.externalResource.data.height):new a(0,0)},t.prototype.getCanvasMaxDimensions=function(e){return e.externalResource.data&&e.externalResource.data.profile[1]?new a(e.externalResource.data.profile[1].maxWidth,e.externalResource.data.profile[1].maxHeight):null},t.prototype.getCanvasComputedDimensions=function(e){var t=this.getCanvasDimensions(e),i=this.getCanvasMaxDimensions(e);if(!i)return null;var n=t.width,o=t.height;if(!_.isUndefined(i.width)&&i.width1?!0:!1;case s.wholeImageLowResAsJpg:var n=this.getCanvasComputedDimensions(this.extension.helper.getCurrentCanvas());return n?!this.extension.isPagingSettingEnabled()&&n.width>this.options.confinedImageSize:!1;case s.selection:return this.options.selectionEnabled;default:return e.prototype.isDownloadOptionAvailable.call(this,t)}},t}(n);return l});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/ExternalContentDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("externalContentDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_EXTERNALCONTENT_DIALOGUE,this.closeCommand=i.HIDE_EXTERNALCONTENT_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open(),t.$iframe.prop("src",i.uri)}),$.subscribe(this.closeCommand,function(e){t.close()}),this.$iframe=$(""),this.$content.append(this.$iframe),this.$element.hide()},t.prototype.resize=function(){e.prototype.resize.call(this),this.$iframe.width(this.$content.width()),this.$iframe.height(this.$content.height())},t}(n);return o}),define("modules/uv-shared-module/AutoComplete",["require","exports"],function(e,t){var i=function(){function e(e,t,i,n,o,s,r){var a=this;void 0===o&&(o=300),void 0===s&&(s=2),void 0===r&&(r=!1),this._validKeyDownCodes=[KeyCodes.KeyDown.Backspace,KeyCodes.KeyDown.Spacebar,KeyCodes.KeyDown.Tab,KeyCodes.KeyDown.LeftArrow,KeyCodes.KeyDown.RightArrow,KeyCodes.KeyDown.Delete],this._validKeyPressCodes=[KeyCodes.KeyPress.GraveAccent,KeyCodes.KeyPress.DoubleQuote],this._lastKeyDownWasValid=!1,this._$element=e,this._autoCompleteFunc=t,this._delay=o,this._minChars=s,this._onSelect=n,this._parseResultsFunc=i,this._positionAbove=r,this._$searchResultsList=$(''),this._positionAbove?this._$element.parent().prepend(this._$searchResultsList):this._$element.parent().append(this._$searchResultsList),this._$searchResultTemplate=$(' ');var l=function(){var e=0;return function(t,i){clearTimeout(e),e=setTimeout(t,i)}}(),h=this;this._$element.on("keydown",function(e){var t=e.originalEvent;h._lastKeyDownWasValid=h._isValidKeyDown(t);var i=Utils.Keyboard.getCharCode(t),n=!1;i===KeyCodes.KeyDown.LeftArrow?n=!0:i===KeyCodes.KeyDown.RightArrow&&(n=!0),n&&(t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation())}),this._$element.on("keypress",function(e){var t=h._isValidKeyPress(e.originalEvent);return h._lastKeyDownWasValid||t?!0:(e.preventDefault(),!1)}),this._$element.on("keyup",function(e){if(!h._getSelectedListItem().length&&e.keyCode===KeyCodes.KeyDown.Enter)return void h._onSelect(h._getTerms());if(h._$searchResultsList.is(":visible")&&h._results.length)if(e.keyCode===KeyCodes.KeyDown.Enter)h._searchForItem(h._getSelectedListItem());else{if(e.keyCode===KeyCodes.KeyDown.DownArrow)return void h._setSelectedResultIndex(1);if(e.keyCode===KeyCodes.KeyDown.UpArrow)return void h._setSelectedResultIndex(-1)}e.keyCode!==KeyCodes.KeyDown.Enter&&l(function(){var e=h._getTerms();e&&e.length>h._minChars&&!e.contains(" ")?h._search(e):(h._clearResults(),h._hideResults())},h._delay)}),$(document).on("mouseup",function(e){0===a._$searchResultsList.parent().has($(e.target)[0]).length&&(a._clearResults(),a._hideResults())}),this._hideResults()}return e.prototype._isValidKeyDown=function(e){var t=this._validKeyDownCodes.contains(Utils.Keyboard.getCharCode(e));return t},e.prototype._isValidKeyPress=function(e){var t=Utils.Keyboard.getCharCode(e),i=String.fromCharCode(t),n=i.isAlphanumeric()||this._validKeyPressCodes.contains(t);return n},e.prototype._getTerms=function(){return this._$element.val().trim()},e.prototype._setSelectedResultIndex=function(e){var t;t=1===e?this._selectedResultIndex+1:this._selectedResultIndex-1;var i=this._$searchResultsList.find("li");0>t?t=i.length-1:t>i.length-1&&(t=0),this._selectedResultIndex=t,i.removeClass("selected");var n=i.eq(this._selectedResultIndex);n.addClass("selected");var o=n.outerHeight(!0)*this._selectedResultIndex;this._$searchResultsList.scrollTop(o)},e.prototype._search=function(e){this._results=[],this._clearResults(),this._showResults(),this._$searchResultsList.append(' '),this._updateListPosition();var t=this;this._autoCompleteFunc(e,function(e){t._listResults(e)})},e.prototype._clearResults=function(){this._$searchResultsList.empty()},e.prototype._hideResults=function(){this._$searchResultsList.hide()},e.prototype._showResults=function(){this._selectedResultIndex=-1,this._$searchResultsList.show()},e.prototype._updateListPosition=function(){this._positionAbove?this._$searchResultsList.css({top:-1*this._$searchResultsList.outerHeight(!0)}):this._$searchResultsList.css({top:this._$element.outerHeight(!0)})},e.prototype._listResults=function(e){if(this._results=this._parseResultsFunc(e),this._clearResults(),!this._results.length)return void this._hideResults();for(var t=0;t'+this.content.print+""),this.$options.prepend(this.$printButton),this.$searchContainer=$('
'),this.$element.prepend(this.$searchContainer),this.$searchOptions=$('
'),this.$searchContainer.append(this.$searchOptions),this.$searchLabel=$(''+this.content.searchWithin+" "),this.$searchOptions.append(this.$searchLabel),this.$searchTextContainer=$('
'),this.$searchOptions.append(this.$searchTextContainer),this.$searchText=$(' '),this.$searchTextContainer.append(this.$searchText),this.$searchButton=$(' '),this.$searchTextContainer.append(this.$searchButton),this.$searchPagerContainer=$(''),this.$element.prepend(this.$searchPagerContainer),this.$searchPagerControls=$('
'),this.$searchPagerContainer.prepend(this.$searchPagerControls),this.$previousResultButton=$(''+this.content.previousResult+" "),this.$searchPagerControls.append(this.$previousResultButton),this.$searchResultsInfo=$('x \'y \'
'),this.$searchPagerControls.append(this.$searchResultsInfo),this.$clearSearchResultsButton=$(''+this.content.clearSearch+" "),this.$searchResultsInfo.append(this.$clearSearchResultsButton),this.$nextResultButton=$(''+this.content.nextResult+" "),this.$searchPagerControls.append(this.$nextResultButton),this.$searchResultsContainer=$('
'),this.$element.prepend(this.$searchResultsContainer),this.$line=$('
'),this.$searchResultsContainer.append(this.$line),this.$pagePositionMarker=$('
'),this.$searchResultsContainer.append(this.$pagePositionMarker),this.$pagePositionLabel=$('
'),this.$searchResultsContainer.append(this.$pagePositionLabel),this.$placemarkerDetails=$('
'),this.$searchResultsContainer.append(this.$placemarkerDetails),this.$placemarkerDetailsTop=$(" "),this.$placemarkerDetails.append(this.$placemarkerDetailsTop),this.$placemarkerDetailsBottom=$("
"),this.$placemarkerDetails.append(this.$placemarkerDetailsBottom),this.$searchPagerContainer.hide(),this.$placemarkerDetails.hide();var o=this;this.$searchButton.on("click",function(e){e.preventDefault(),t.search(t.$searchText.val())}),this.$searchText.on("focus",function(){t.$searchText.val()===t.content.enterKeyword&&t.$searchText.val("")}),this.$placemarkerDetails.on("mouseover",function(){$.publish(s.SEARCH_PREVIEW_START,[t.currentPlacemarkerIndex])}),this.$placemarkerDetails.on("mouseleave",function(){$(this).hide(),$.publish(s.SEARCH_PREVIEW_FINISH);var e=o.getSearchResultPlacemarkers();e.removeClass("hover")}),this.$placemarkerDetails.on("click",function(e){$.publish(s.VIEW_PAGE,[t.currentPlacemarkerIndex])}),this.$previousResultButton.on("click",function(e){e.preventDefault(),$.publish(s.PREV_SEARCH_RESULT)}),this.$nextResultButton.on("click",function(e){e.preventDefault(),$.publish(s.NEXT_SEARCH_RESULT)}),this.$clearSearchResultsButton.on("click",function(e){e.preventDefault(),$.publish(s.CLEAR_SEARCH),t.clearSearchResults()}),this.extension.isSearchWithinEnabled()||(this.$searchContainer.hide(),this.$searchPagerContainer.hide(),this.$searchResultsContainer.hide(),this.$element.addClass("min")),1===this.extension.helper.getTotalCanvases()&&this.$searchResultsContainer.hide();var r=this.extension.getAutoCompleteUri();r?new i(this.$searchText,function(e,t){$.getJSON(String.format(r,e),function(e){t(e)})},function(e){return _.map(e.terms,function(e){return e.match})},function(e){t.search(e)},300,2,!0):this.$searchText.on("keyup",function(e){e.keyCode===KeyCodes.KeyDown.Enter&&o.search(o.$searchText.val())}),this.$printButton.onPressed(function(){$.publish(s.PRINT)}),this.updatePrintButton();var a=Utils.Bools.getBool(this.config.options.positionMarkerEnabled,!0);a||(this.$pagePositionMarker.hide(),this.$pagePositionLabel.hide())},t.prototype.isZoomToSearchResultEnabled=function(){return Utils.Bools.getBool(this.extension.config.options.zoomToSearchResultEnabled,!0)},t.prototype.isPreviousButtonEnabled=function(){var e=this.extension.helper.canvasIndex,t=this.getFirstSearchResultCanvasIndex(),i=this.getCurrentSearchResultRectIndex();return this.isZoomToSearchResultEnabled()&&this.extension.currentSearchResultRect?t>e?!1:e===t&&0===i?!1:!0:e>t},t.prototype.isCanvasIndexLessThanFirstSearchResultIndex=function(){var e=this.extension.searchResults;return this.extension.helper.canvasIndex<=e[0].canvasIndex},t.prototype.isNextButtonEnabled=function(){var e=this.extension.helper.canvasIndex,t=this.getLastSearchResultCanvasIndex(),i=this.getCurrentSearchResultRectIndex();return this.isZoomToSearchResultEnabled()&&this.extension.currentSearchResultRect?e>t?!1:e===t&&i===this.getLastSearchResultRectIndex()?!1:!0:t>e},t.prototype.getSearchResults=function(){return this.extension.searchResults},t.prototype.getCurrentSearchResultRectIndex=function(){return this.extension.getCurrentSearchResultRectIndex()},t.prototype.getFirstSearchResultCanvasIndex=function(){var e=this.getSearchResults(),t=e[0].canvasIndex;return t},t.prototype.getLastSearchResultCanvasIndex=function(){var e=this.getSearchResults(),t=e[e.length-1].canvasIndex;return t},t.prototype.getLastSearchResultRectIndex=function(){return this.extension.getLastSearchResultRectIndex()},t.prototype.updateNextButton=function(){var e=this.extension.searchResults;e&&e.length&&(this.isNextButtonEnabled()?this.$nextResultButton.removeClass("disabled"):this.$nextResultButton.addClass("disabled"))},t.prototype.updatePrevButton=function(){var e=this.extension.searchResults;e&&e.length&&(this.isPreviousButtonEnabled()?this.$previousResultButton.removeClass("disabled"):this.$previousResultButton.addClass("disabled"))},t.prototype.updatePrintButton=function(){var e=Utils.Bools.getBool(this.options.printEnabled,!1);e?this.$printButton.show():this.$printButton.hide()},t.prototype.search=function(e){return this.terms=e,""===this.terms||this.terms===this.content.enterKeyword?void this.extension.showMessage(this.config.modules.genericDialogue.content.emptyValue,function(){this.$searchText.focus()}):(this.$searchText.blur(),this.showSearchSpinner(),void $.publish(s.SEARCH,[this.terms]))},t.prototype.getSearchResultPlacemarkers=function(){return this.$searchResultsContainer.find(".searchResultPlacemarker")},t.prototype.setCurrentSearchResultPlacemarker=function(){var e=this.getSearchResultPlacemarkers();e.parent().find(".current").removeClass("current");var t=$('.searchResultPlacemarker[data-index="'+this.extension.helper.canvasIndex+'"]');t.addClass("current")},t.prototype.positionSearchResultPlacemarkers=function(){var e=this.extension.searchResults;if(e.length){var t=this.getSearchResultPlacemarkers();t.remove();for(var i=this.getPageLineRatio(),n=this.$line.position().top,o=this.$line.position().left,s=this,r=0;r');h[0].ontouchstart=function(e){s.onPlacemarkerTouchStart.call(this,s)},h.click(function(e){s.onPlacemarkerClick.call(this,s)}),h.mouseenter(function(e){s.onPlacemarkerMouseEnter.call(this,s)}),h.mouseleave(function(e){s.onPlacemarkerMouseLeave.call(this,e,s)}),this.$searchResultsContainer.append(h);var c=n-h.height(),u=o+l-h.width()/2;h.css({top:c,left:u})}}},t.prototype.onPlacemarkerTouchStart=function(e){e.placemarkerTouched=!0;var t=$(this),i=parseInt(t.attr("data-index"));$.publish(s.VIEW_PAGE,[i])},t.prototype.onPlacemarkerClick=function(e){if(!e.placemarkerTouched){e.placemarkerTouched=!1;var t=$(this),i=parseInt(t.attr("data-index"));$.publish(s.VIEW_PAGE,[i])}},t.prototype.onPlacemarkerMouseEnter=function(e){if(!e.placemarkerTouched){var t=$(this);t.addClass("hover");var i=parseInt(t.attr("data-index"));$.publish(s.SEARCH_PREVIEW_START,[i]);var n=e.getSearchResultPlacemarkers(),o=n.index(t[0]);e.currentPlacemarkerIndex=i,e.$placemarkerDetails.show();var a="{0} {1}",l=e.extension.getMode();if(l.toString()===r.page.toString()){var h=e.extension.helper.getCanvasByIndex(i),c=Manifesto.TranslationCollection.getValue(h.getLabel());""===c&&(c=this.extension.helper.manifest.options.defaultLabel),a=String.format(a,e.content.pageCaps,c)}else a=String.format(a,e.content.imageCaps,i+1);e.$placemarkerDetailsTop.html(a);var u,p=e.extension.searchResults[o],d=Utils.Strings.ellipsis(e.terms,e.options.elideDetailsTermsCount);1===p.rects.length?(u=e.content.instanceFound,u=String.format(u,d)):(u=e.content.instancesFound,u=String.format(u,p.rects.length,d)),e.$placemarkerDetailsBottom.html(u);var g=t.position(),f=g.top-e.$placemarkerDetails.height(),m=g.left;me.$line.width()-e.$placemarkerDetails.width()/2?m=e.$line.width()-e.$placemarkerDetails.width()+t.width()/2:m-=e.$placemarkerDetails.width()/2,e.$placemarkerDetails.css({top:f,left:m})}},t.prototype.onPlacemarkerMouseLeave=function(e,t){$.publish(s.SEARCH_PREVIEW_FINISH);var i=$(this),n=e.toElement||e.relatedTarget,o=$(n).closest(t.$placemarkerDetails).length;n!=t.$placemarkerDetails.get(0)&&0===o&&(t.$placemarkerDetails.hide(),i.removeClass("hover"))},t.prototype.setPageMarkerPosition=function(){if(null!=this.extension.helper.canvasIndex){var e=this.getPageLineRatio(),t=this.$line.position().top,i=this.$line.position().left,n=this.extension.helper.canvasIndex*e,o=t,s=i+n;this.$pagePositionMarker.css({top:o,left:s});var r=this.$line.width();s+this.$pagePositionLabel.outerWidth(!0)>r?(s-=this.$pagePositionLabel.outerWidth(!0),this.$pagePositionLabel.removeClass("right"),this.$pagePositionLabel.addClass("left")):(this.$pagePositionLabel.removeClass("left"),this.$pagePositionLabel.addClass("right")),this.$pagePositionLabel.css({top:o,left:s})}},t.prototype.clearSearchResults=function(){this.extension.searchResults=[];var e=this.getSearchResultPlacemarkers();e.remove(),this.$searchText.val(this.content.enterKeyword),this.$searchContainer.show(),this.$searchPagerContainer.hide(),this.$searchText.focus()},t.prototype.getPageLineRatio=function(){var e=this.$line.width();return 1===this.extension.helper.getTotalCanvases()?0:e/(this.extension.helper.getTotalCanvases()-1)},t.prototype.canvasIndexChanged=function(){this.setPageMarkerPosition(),this.setPlacemarkerLabel()},t.prototype.settingsChanged=function(){this.setPlacemarkerLabel()},t.prototype.setPlacemarkerLabel=function(){var e=this.content.displaying,t=this.extension.helper.canvasIndex;if(this.isPageModeEnabled()){var i=this.extension.helper.getCanvasByIndex(t),n=Manifesto.TranslationCollection.getValue(i.getLabel());""===n&&(n=this.content.defaultLabel);var o=this.extension.helper.getLastCanvasLabel(!0);this.$pagePositionLabel.html(String.format(e,this.content.page,this.extension.sanitize(n),this.extension.sanitize(o)))}else this.$pagePositionLabel.html(String.format(e,this.content.image,t+1,this.extension.helper.getTotalCanvases()))},t.prototype.isPageModeEnabled=function(){return this.config.options.pageModeEnabled&&this.extension.getMode().toString()===r.page.toString()},t.prototype.showSearchSpinner=function(){this.$searchText.addClass("searching")},t.prototype.hideSearchSpinner=function(){this.$searchText.removeClass("searching")},t.prototype.displaySearchResults=function(e,t){if(t){this.hideSearchSpinner(),this.positionSearchResultPlacemarkers(),this.$searchContainer.hide(),this.$searchPagerControls.css({left:0});var i=this.$searchPagerContainer.find(".number");i.text(this.extension.getTotalSearchResultRects());var n=this.$searchResultsInfo.find(".foundFor");1===t.length?n.html(this.content.resultFoundFor):n.html(this.content.resultsFoundFor);var o=this.$searchPagerContainer.find(".terms");o.html(Utils.Strings.ellipsis(e,this.options.elideResultsTermsCount)),o.prop("title",e),this.$searchPagerContainer.show(),this.resize()}},t.prototype.resize=function(){e.prototype.resize.call(this);var t=this.extension.searchResults;t&&t.length&&this.positionSearchResultPlacemarkers(),this.setPageMarkerPosition(),this.$searchPagerContainer.width(this.$element.width());var i=this.$element.width()/2;this.$searchPagerControls.css({left:i-this.$searchPagerControls.width()/2}),this.$searchOptions.css({left:i-this.$searchOptions.outerWidth()/2})},t}(o);return a});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-osdmobilefooterpanel-module/MobileFooter",["require","exports","../uv-shared-module/FooterPanel","../../extensions/uv-seadragon-extension/Commands"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){this.setConfig("mobileFooterPanel"),e.prototype.create.call(this),this.$spacer=$('
'),this.$options.prepend(this.$spacer),this.$rotateButton=$(''+this.content.rotateRight+" "),this.$options.prepend(this.$rotateButton),this.$zoomOutButton=$(''+this.content.zoomOut+" "),this.$options.prepend(this.$zoomOutButton),this.$zoomInButton=$(''+this.content.zoomIn+" "),this.$options.prepend(this.$zoomInButton),this.$zoomInButton.onPressed(function(){$.publish(n.ZOOM_IN)}),this.$zoomOutButton.onPressed(function(){$.publish(n.ZOOM_OUT)}),this.$rotateButton.onPressed(function(){$.publish(n.ROTATE)})},t.prototype.resize=function(){e.prototype.resize.call(this),this.$options.css("left",Math.floor(this.$element.width()/2-this.$options.width()/2))},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-dialogues-module/MoreInfoDialogue",["require","exports","../uv-shared-module/BaseCommands","../uv-shared-module/Dialogue"],function(e,t,i,n){var o=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("moreInfoDialogue"),e.prototype.create.call(this),this.openCommand=i.SHOW_MOREINFO_DIALOGUE,this.closeCommand=i.HIDE_MOREINFO_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open(i)}),$.subscribe(this.closeCommand,function(e){t.close()}),this.config.content=this.extension.config.modules.moreInfoRightPanel.content,this.config.options=this.extension.config.modules.moreInfoRightPanel.options,this.$title=$(""+this.config.content.title+" "),this.$content.append(this.$title),this.$metadata=$('
'),this.$content.append(this.$metadata),this.component=new IIIFComponents.MetadataComponent(this._getOptions()),this.$element.hide()},t.prototype.open=function(t){e.prototype.open.call(this,t),this.component.databind()},t.prototype._getOptions=function(){var e=this;return{canvasDisplayOrder:this.config.options.canvasDisplayOrder,canvases:this.extension.getCurrentCanvases(),canvasExclude:this.config.options.canvasExclude,canvasLabels:"Left Page, Right Page",content:this.config.content,copiedMessageDuration:2e3,copyToClipboardEnabled:Utils.Bools.getBool(this.config.options.copyToClipboardEnabled,!1),element:".overlay.moreInfo .iiif-metadata-component",helper:this.extension.helper,licenseFormatter:null,limit:this.config.options.textLimit||4,limitType:IIIFComponents.MetadataComponentOptions.LimitType.LINES,manifestDisplayOrder:this.config.options.manifestDisplayOrder,manifestExclude:this.config.options.manifestExclude,range:this.extension.getCurrentCanvasRange(),rtlLanguageCodes:this.config.options.rtlLanguageCodes,sanitizer:function(t){return e.extension.sanitize(t)},showAllLanguages:this.config.options.showAllLanguages}},t.prototype.close=function(){e.prototype.close.call(this)},t.prototype.resize=function(){this.setDockedPosition()},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-multiselectdialogue-module/MultiSelectDialogue",["require","exports","../../extensions/uv-seadragon-extension/Commands","../../modules/uv-shared-module/Dialogue","../../extensions/uv-seadragon-extension/Mode"],function(e,t,i,n,o){var s=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("multiSelectDialogue"),e.prototype.create.call(this);var n=this;this.openCommand=i.SHOW_MULTISELECT_DIALOGUE,this.closeCommand=i.HIDE_MULTISELECT_DIALOGUE,$.subscribe(this.openCommand,function(e,i){t.open();var n=t.extension.helper.getMultiSelectState();n.setEnabled(!0),t.component.databind()}),$.subscribe(this.closeCommand,function(e){t.close();var i=t.extension.helper.getMultiSelectState();i.setEnabled(!1)}),this.$title=$(" "),this.$content.append(this.$title),this.$title.text(this.content.title),this.$gallery=$('
'),this.$content.append(this.$gallery),this.options={element:".overlay.multiSelect .iiif-gallery-component",helper:this.extension.helper,chunkedResizingThreshold:this.config.options.galleryThumbChunkedResizingThreshold,content:this.config.content,debug:!1,imageFadeInDuration:300,initialZoom:4,minLabelWidth:20,pageModeEnabled:this.isPageModeEnabled(),searchResults:[],scrollStopDuration:100,sizingEnabled:!0,thumbHeight:this.config.options.galleryThumbHeight,thumbLoadPadding:this.config.options.galleryThumbLoadPadding,thumbWidth:this.config.options.galleryThumbWidth,viewingDirection:this.extension.helper.getViewingDirection()},this.component=new IIIFComponents.GalleryComponent(this.options);var o=$(this.options.element).find("a.select");o.addClass("btn btn-primary"),this.component.on("multiSelectionMade",function(e){var t=e[0];$.publish(i.MULTISELECTION_MADE,[t]),n.close()}),this.$element.hide()},t.prototype.isPageModeEnabled=function(){return Utils.Bools.getBool(this.config.options.pageModeEnabled,!0)&&this.extension.getMode().toString()===o.page.toString()},t.prototype.open=function(){e.prototype.open.call(this)},t.prototype.close=function(){e.prototype.close.call(this)},t.prototype.resize=function(){e.prototype.resize.call(this);var t=$(this.options.element),i=t.find(".main"),n=t.find(".header");i.height(this.$content.height()-this.$title.outerHeight()-this.$title.verticalMargins()-n.height())},t}(n);return s}),define("extensions/uv-seadragon-extension/MultiSelectionArgs",["require","exports"],function(e,t){var i=function(){function e(){}return e}();return i});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("modules/uv-pagingheaderpanel-module/PagingHeaderPanel",["require","exports","../uv-shared-module/AutoComplete","../uv-shared-module/BaseCommands","../../extensions/uv-seadragon-extension/Commands","../uv-shared-module/HeaderPanel","../../extensions/uv-seadragon-extension/Mode"],function(e,t,i,n,o,s,r){var a=function(e){function t(t){e.call(this,t),this.firstButtonEnabled=!1,this.lastButtonEnabled=!1,this.nextButtonEnabled=!1,this.prevButtonEnabled=!1}return __extends(t,e),t.prototype.create=function(){var t=this;if(this.setConfig("pagingHeaderPanel"),e.prototype.create.call(this),$.subscribe(n.CANVAS_INDEX_CHANGED,function(e,i){t.canvasIndexChanged(i)}),$.subscribe(n.SETTINGS_CHANGED,function(e){t.modeChanged(),t.updatePagingToggle()}),$.subscribe(n.CANVAS_INDEX_CHANGE_FAILED,function(e){t.setSearchFieldValue(t.extension.helper.canvasIndex)}),$.subscribe(n.LEFTPANEL_EXPAND_FULL_START,function(e){t.openGallery()}),$.subscribe(n.LEFTPANEL_COLLAPSE_FULL_START,function(e){t.closeGallery()}),this.$prevOptions=$('
'),this.$centerOptions.append(this.$prevOptions),this.$firstButton=$(' '),
+this.$prevOptions.append(this.$firstButton),this.$prevButton=$(' '),this.$prevOptions.append(this.$prevButton),this.$modeOptions=$('
'),this.$centerOptions.append(this.$modeOptions),this.$imageModeLabel=$(''+this.content.image+" "),this.$modeOptions.append(this.$imageModeLabel),this.$imageModeOption=$(' '),this.$modeOptions.append(this.$imageModeOption),this.$pageModeLabel=$(' '),this.$modeOptions.append(this.$pageModeLabel),this.$pageModeOption=$(' '),this.$modeOptions.append(this.$pageModeOption),this.$search=$('
'),this.$centerOptions.append(this.$search),this.$searchText=$(' '),this.$search.append(this.$searchText),Utils.Bools.getBool(this.options.autoCompleteBoxEnabled,!0))this.$searchText.hide(),this.$autoCompleteBox=$(' '),this.$search.append(this.$autoCompleteBox),new i(this.$autoCompleteBox,function(e,i){var n=[],o=t.extension.helper.getCanvases();if(t.isPageModeEnabled())for(var s=0;s'),this.$centerOptions.append(this.$selectionBoxOptions),this.$imageSelectionBox=$(' '),this.$selectionBoxOptions.append(this.$imageSelectionBox);for(var s=0;s"+l+"")}this.$imageSelectionBox.change(function(){var e=parseInt(t.$imageSelectionBox.val());$.publish(o.IMAGE_SEARCH,[e])})}this.$total=$(' '),this.$search.append(this.$total),this.$searchButton=$(''+this.content.go+" "),this.$search.append(this.$searchButton),this.$nextOptions=$('
'),this.$centerOptions.append(this.$nextOptions),this.$nextButton=$(' '),this.$nextOptions.append(this.$nextButton),this.$lastButton=$(' '),this.$nextOptions.append(this.$lastButton),this.isPageModeEnabled()?(this.$pageModeOption.attr("checked","checked"),this.$pageModeOption.removeAttr("disabled"),this.$pageModeLabel.removeClass("disabled")):(this.$imageModeOption.attr("checked","checked"),this.$pageModeOption.attr("disabled","disabled"),this.$pageModeLabel.addClass("disabled")),this.extension.helper.getManifestType().toString()===manifesto.ManifestType.manuscript().toString()?this.$pageModeLabel.text(this.content.folio):this.$pageModeLabel.text(this.content.page),this.$galleryButton=$(' '),this.$rightOptions.prepend(this.$galleryButton),this.$pagingToggleButtons=$('
'),this.$rightOptions.prepend(this.$pagingToggleButtons),this.$oneUpButton=$(' '),this.$pagingToggleButtons.append(this.$oneUpButton),this.$twoUpButton=$(' '),this.$pagingToggleButtons.append(this.$twoUpButton),this.updatePagingToggle(),this.updateGalleryButton(),this.$oneUpButton.onPressed(function(){var e=!1;t.updateSettings({pagingEnabled:e}),$.publish(o.PAGING_TOGGLED,[e])}),this.$twoUpButton.onPressed(function(){var e=!0;t.updateSettings({pagingEnabled:e}),$.publish(o.PAGING_TOGGLED,[e])}),this.$galleryButton.onPressed(function(){$.publish(n.TOGGLE_EXPAND_LEFT_PANEL)}),this.setTitles(),this.setTotal();var h=this.extension.helper.getViewingDirection();1===this.extension.helper.getTotalCanvases()&&this.$centerOptions.hide(),this.$firstButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.topToBottom().toString():case manifesto.ViewingDirection.bottomToTop().toString():$.publish(o.FIRST);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.LAST)}}),this.$prevButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(o.PREV);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.NEXT)}}),this.$nextButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(o.NEXT);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.PREV)}}),this.$lastButton.onPressed(function(){switch(h.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.topToBottom().toString():case manifesto.ViewingDirection.bottomToTop().toString():$.publish(o.LAST);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(o.FIRST)}}),this.config.options.pageModeEnabled?(this.$imageModeOption.on("click",function(e){$.publish(o.MODE_CHANGED,[r.image.toString()])}),this.$pageModeOption.on("click",function(e){$.publish(o.MODE_CHANGED,[r.page.toString()])})):(this.$imageModeOption.hide(),this.$pageModeLabel.hide(),this.$pageModeOption.hide()),this.$searchText.onEnter(function(){t.$searchText.blur(),t.search(t.$searchText.val())}),this.$searchText.click(function(){$(this).select()}),this.$searchButton.onPressed(function(){t.options.autoCompleteBoxEnabled?t.search(t.$autoCompleteBox.val()):t.search(t.$searchText.val())}),this.options.modeOptionsEnabled===!1&&(this.$modeOptions.hide(),this.$centerOptions.addClass("modeOptionsDisabled")),this.options.imageSelectionBoxEnabled===!0&&this.options.autoCompleteBoxEnabled!==!0&&this.$search.hide(),this.options.helpEnabled===!1&&this.$helpButton.hide(),Utils.Bools.getBool(this.options.pagingToggleEnabled,!0)||this.$pagingToggleButtons.hide()},t.prototype.openGallery=function(){this.$oneUpButton.removeClass("on"),this.$twoUpButton.removeClass("on"),this.$galleryButton.addClass("on")},t.prototype.closeGallery=function(){this.updatePagingToggle(),this.$galleryButton.removeClass("on")},t.prototype.isPageModeEnabled=function(){return this.config.options.pageModeEnabled&&this.extension.getMode().toString()===r.page.toString()},t.prototype.setTitles=function(){this.isPageModeEnabled()?(this.$firstButton.prop("title",this.content.firstPage),this.$prevButton.prop("title",this.content.previousPage),this.$nextButton.prop("title",this.content.nextPage),this.$lastButton.prop("title",this.content.lastPage)):(this.$firstButton.prop("title",this.content.firstImage),this.$prevButton.prop("title",this.content.previousImage),this.$nextButton.prop("title",this.content.nextImage),this.$lastButton.prop("title",this.content.lastImage)),this.$searchButton.prop("title",this.content.go)},t.prototype.updatePagingToggle=function(){return this.pagingToggleIsVisible()?void(this.extension.isPagingSettingEnabled()?(this.$oneUpButton.removeClass("on"),this.$twoUpButton.addClass("on")):(this.$twoUpButton.removeClass("on"),this.$oneUpButton.addClass("on"))):void this.$pagingToggleButtons.hide()},t.prototype.pagingToggleIsVisible=function(){return Utils.Bools.getBool(this.options.pagingToggleEnabled,!0)&&this.extension.helper.isPagingAvailable()},t.prototype.updateGalleryButton=function(){this.galleryIsVisible()||this.$galleryButton.hide()},t.prototype.galleryIsVisible=function(){return Utils.Bools.getBool(this.options.galleryButtonEnabled,!0)&&this.extension.isLeftPanelEnabled()},t.prototype.setTotal=function(){var e=this.content.of;this.isPageModeEnabled()?this.$total.html(String.format(e,this.extension.helper.getLastCanvasLabel(!0))):this.$total.html(String.format(e,this.extension.helper.getTotalCanvases()))},t.prototype.setSearchFieldValue=function(e){var t,i=this.extension.helper.getCanvasByIndex(e);if(this.isPageModeEnabled()){var n=Manifesto.TranslationCollection.getValue(i.getLabel());t="-"===n?"":n}else e+=1,t=e;this.options.autoCompleteBoxEnabled?this.$autoCompleteBox.val(t):this.$searchText.val(t)},t.prototype.search=function(e){if(!e)return this.extension.showMessage(this.content.emptyValue),void $.publish(n.CANVAS_INDEX_CHANGE_FAILED);if(this.isPageModeEnabled())$.publish(o.PAGE_SEARCH,[e]);else{var t;if(t=this.options.autoCompleteBoxEnabled?parseInt(this.$autoCompleteBox.val(),10):parseInt(this.$searchText.val(),10),t-=1,isNaN(t))return this.extension.showMessage(this.extension.config.modules.genericDialogue.content.invalidNumber),void $.publish(n.CANVAS_INDEX_CHANGE_FAILED);var i=this.extension.helper.getCanvasByIndex(t);if(!i)return this.extension.showMessage(this.extension.config.modules.genericDialogue.content.pageNotFound),void $.publish(n.CANVAS_INDEX_CHANGE_FAILED);$.publish(o.IMAGE_SEARCH,[t])}},t.prototype.canvasIndexChanged=function(e){this.setSearchFieldValue(e),this.options.imageSelectionBoxEnabled===!0&&this.options.autoCompleteBoxEnabled!==!0&&this.$imageSelectionBox.val(e);var t=this.extension.helper.getViewingDirection();t.toString()===manifesto.ViewingDirection.rightToLeft().toString()?(this.extension.helper.isFirstCanvas()?(this.disableLastButton(),this.disableNextButton()):(this.enableLastButton(),this.enableNextButton()),this.extension.helper.isLastCanvas()?(this.disableFirstButton(),this.disablePrevButton()):(this.enableFirstButton(),this.enablePrevButton())):(this.extension.helper.isFirstCanvas()?(this.disableFirstButton(),this.disablePrevButton()):(this.enableFirstButton(),this.enablePrevButton()),this.extension.helper.isLastCanvas()?(this.disableLastButton(),this.disableNextButton()):(this.enableLastButton(),this.enableNextButton()))},t.prototype.disableFirstButton=function(){this.firstButtonEnabled=!1,this.$firstButton.disable()},t.prototype.enableFirstButton=function(){this.firstButtonEnabled=!0,this.$firstButton.enable()},t.prototype.disableLastButton=function(){this.lastButtonEnabled=!1,this.$lastButton.disable()},t.prototype.enableLastButton=function(){this.lastButtonEnabled=!0,this.$lastButton.enable()},t.prototype.disablePrevButton=function(){this.prevButtonEnabled=!1,this.$prevButton.disable()},t.prototype.enablePrevButton=function(){this.prevButtonEnabled=!0,this.$prevButton.enable()},t.prototype.disableNextButton=function(){this.nextButtonEnabled=!1,this.$nextButton.disable()},t.prototype.enableNextButton=function(){this.nextButtonEnabled=!0,this.$nextButton.enable()},t.prototype.modeChanged=function(){this.setSearchFieldValue(this.extension.helper.canvasIndex),this.setTitles(),this.setTotal()},t.prototype.resize=function(){e.prototype.resize.call(this),this.extension.width()'),this.$content.prepend(this.$viewer),$.subscribe(i.SETTINGS_CHANGED,function(e,i){t.viewer.gestureSettingsMouse.clickToZoom=i.clickToZoomEnabled}),$.subscribe(i.OPEN_EXTERNAL_RESOURCE,function(e,i){t.whenResized(function(){t.isCreated||t.createUI(),t.openMedia(i)})}),$.subscribe(s.CLEAR_SEARCH,function(){t.whenCreated(function(){t.extension.currentSearchResultRect=null,t.clearSearchResults()})}),$.subscribe(s.VIEW_PAGE,function(){t.extension.previousSearchResultRect=null,t.extension.currentSearchResultRect=null}),$.subscribe(s.NEXT_SEARCH_RESULT,function(){t.whenCreated(function(){t.nextSearchResult()})}),$.subscribe(s.PREV_SEARCH_RESULT,function(){t.whenCreated(function(){t.prevSearchResult()})}),$.subscribe(s.ZOOM_IN,function(){t.whenCreated(function(){t.zoomIn()})}),$.subscribe(s.ZOOM_OUT,function(){t.whenCreated(function(){t.zoomOut()})}),$.subscribe(s.ROTATE,function(){t.whenCreated(function(){t.rotateRight()})}),$.subscribe(i.METRIC_CHANGED,function(){t.whenCreated(function(){t.updateResponsiveView()})})},t.prototype.whenResized=function(e){var t=this;Utils.Async.waitFor(function(){return t.isResized},e)},t.prototype.whenCreated=function(e){var t=this;Utils.Async.waitFor(function(){return t.isCreated},e)},t.prototype.zoomIn=function(){this.viewer.viewport.zoomTo(2*this.viewer.viewport.getZoom(!0))},t.prototype.zoomOut=function(){this.viewer.viewport.zoomTo(.5*this.viewer.viewport.getZoom(!0))},t.prototype.rotateRight=function(){this.viewer.viewport.setRotation(this.viewer.viewport.getRotation()+90)},t.prototype.updateResponsiveView=function(){this.setNavigatorVisible(),this.extension.metric===r.MOBILE_LANDSCAPE?(this.viewer.autoHideControls=!1,this.$viewportNavButtons.hide()):(this.viewer.autoHideControls=!0,this.$viewportNavButtons.show())},t.prototype.createUI=function(){var e=this;this.$spinner=$('
'),this.$content.append(this.$spinner),this.updateAttribution();var t=window.DEBUG?"modules/uv-seadragoncenterpanel-module/img/":"themes/"+this.extension.config.options.theme+"/img/uv-seadragoncenterpanel-module/";window.openSeadragonViewer=this.viewer=OpenSeadragon({id:"viewer",ajaxWithCredentials:!1,showNavigationControl:!0,showNavigator:!0,showRotationControl:!0,showHomeControl:Utils.Bools.getBool(this.config.options.showHomeControl,!1),showFullPageControl:!1,defaultZoomLevel:this.config.options.defaultZoomLevel||0,maxZoomPixelRatio:this.config.options.maxZoomPixelRatio||2,controlsFadeDelay:this.config.options.controlsFadeDelay||250,controlsFadeLength:this.config.options.controlsFadeLength||250,navigatorPosition:this.config.options.navigatorPosition||"BOTTOM_RIGHT",animationTime:this.config.options.animationTime||1.2,visibilityRatio:this.config.options.visibilityRatio||.5,constrainDuringPan:Utils.Bools.getBool(this.config.options.constrainDuringPan,!1),immediateRender:Utils.Bools.getBool(this.config.options.immediateRender,!1),blendTime:this.config.options.blendTime||0,autoHideControls:Utils.Bools.getBool(this.config.options.autoHideControls,!0),prefixUrl:t,gestureSettingsMouse:{clickToZoom:!!this.extension.config.options.clickToZoomEnabled},navImages:{zoomIn:{REST:"zoom_in.png",GROUP:"zoom_in.png",HOVER:"zoom_in.png",DOWN:"zoom_in.png"},zoomOut:{REST:"zoom_out.png",GROUP:"zoom_out.png",HOVER:"zoom_out.png",DOWN:"zoom_out.png"},home:{REST:"home.png",GROUP:"home.png",HOVER:"home.png",DOWN:"home.png"},rotateright:{REST:"rotate_right.png",GROUP:"rotate_right.png",HOVER:"rotate_right.png",DOWN:"rotate_right.png"},rotateleft:{REST:"pixel.gif",GROUP:"pixel.gif",HOVER:"pixel.gif",DOWN:"pixel.gif"},next:{REST:"pixel.gif",GROUP:"pixel.gif",HOVER:"pixel.gif",DOWN:"pixel.gif"},previous:{REST:"pixel.gif",GROUP:"pixel.gif",HOVER:"pixel.gif",DOWN:"pixel.gif"}}}),this.$zoomInButton=this.$viewer.find('div[title="Zoom in"]'),this.$zoomInButton.attr("tabindex",0),this.$zoomInButton.prop("title",this.content.zoomIn),this.$zoomInButton.addClass("zoomIn viewportNavButton"),this.$zoomOutButton=this.$viewer.find('div[title="Zoom out"]'),this.$zoomOutButton.attr("tabindex",0),this.$zoomOutButton.prop("title",this.content.zoomOut),this.$zoomOutButton.addClass("zoomOut viewportNavButton"),this.$goHomeButton=this.$viewer.find('div[title="Go home"]'),this.$goHomeButton.attr("tabindex",0),this.$goHomeButton.prop("title",this.content.goHome),this.$goHomeButton.addClass("goHome viewportNavButton"),this.$rotateButton=this.$viewer.find('div[title="Rotate right"]'),this.$rotateButton.attr("tabindex",0),this.$rotateButton.prop("title",this.content.rotateRight),this.$rotateButton.addClass("rotate viewportNavButton"),this.$viewportNavButtonsContainer=this.$viewer.find(".openseadragon-container > div:not(.openseadragon-canvas):first"),this.$viewportNavButtons=this.$viewportNavButtonsContainer.find(".viewportNavButton"),this.$canvas=$(this.viewer.canvas),window.DEBUG||this.$canvas.on("contextmenu",function(e){return!1}),this.$navigator=this.$viewer.find(".navigator"),this.setNavigatorVisible(),this.$element.on("mousemove",function(t){e.controlsVisible||(e.controlsVisible=!0,e.viewer.setControlsEnabled(!0))}),this.$element.on("mouseleave",function(t){e.controlsVisible&&(e.controlsVisible=!1,e.viewer.setControlsEnabled(!1))}),this.$element.on("mousemove",function(t){if(!e.$viewer.find(".navigator").ismouseover()){if(!e.controlsVisible)return;e.controlsVisible=!1,e.viewer.setControlsEnabled(!1)}},this.config.options.controlsFadeAfterInactive),this.viewer.addHandler("tile-drawn",function(){e.$spinner.hide()}),this.viewer.addHandler("resize",function(t){$.publish(s.SEADRAGON_RESIZE,[t]),e.viewerResize(t)}),this.viewer.addHandler("animation-start",function(e){$.publish(s.SEADRAGON_ANIMATION_START,[e])}),this.viewer.addHandler("animation",function(e){$.publish(s.SEADRAGON_ANIMATION,[e])}),this.viewer.addHandler("animation-finish",function(t){e.currentBounds=e.getViewportBounds(),e.updateVisibleSearchResultRects(),$.publish(s.SEADRAGON_ANIMATION_FINISH,[t])}),this.viewer.addHandler("rotate",function(e){$.publish(s.SEADRAGON_ROTATION,[e.degrees])}),this.title=this.extension.helper.getLabel(),this.createNavigationButtons(),this.hidePrevButton(),this.hideNextButton(),this.isCreated=!0,this.resize()},t.prototype.createNavigationButtons=function(){var e=this.extension.helper.getViewingDirection();switch(this.$prevButton=$('
'),this.$prevButton.prop("title",this.content.previous),this.$nextButton=$('
'),this.$nextButton.prop("title",this.content.next),this.viewer.addControl(this.$prevButton[0],{anchor:OpenSeadragon.ControlAnchor.TOP_LEFT}),this.viewer.addControl(this.$nextButton[0],{anchor:OpenSeadragon.ControlAnchor.TOP_RIGHT}),e.toString()){case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():this.$prevButton.addClass("vertical"),this.$nextButton.addClass("vertical")}var t=this;this.$prevButton.onPressed(function(i){if(i.preventDefault(),OpenSeadragon.cancelEvent(i),t.prevButtonEnabled)switch(e.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(s.PREV);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(s.NEXT)}}),this.$nextButton.onPressed(function(i){if(i.preventDefault(),OpenSeadragon.cancelEvent(i),t.nextButtonEnabled)switch(e.toString()){case manifesto.ViewingDirection.leftToRight().toString():case manifesto.ViewingDirection.bottomToTop().toString():case manifesto.ViewingDirection.topToBottom().toString():$.publish(s.NEXT);break;case manifesto.ViewingDirection.rightToLeft().toString():$.publish(s.PREV)}})},t.prototype.openMedia=function(e){var t=this;this.$spinner.show(),this.items=[],this.extension.getExternalResources(e).then(function(e){t.viewer.close(),e=t.getPagePositions(e);for(var i=0;i1)if(2===e.length)this.extension.helper.isVerticallyAligned()?(n=e[0],n.y=0,o=e[1],o.y=n.height+this.config.options.pageGap):(t=e[0],t.x=0,i=e[1],i.x=t.width+this.config.options.pageGap);else if(this.extension.helper.isVerticallyAligned())if(this.extension.helper.isTopToBottom())for(var a=0;a0;a--)s=e[a],r=e[a-1],r.y=(s.y||0)-s.height;else if(this.extension.helper.isLeftToRight())for(var a=0;a0;a--)s=e[a],r=e[a-1],r.x=(s.x||0)-s.width;return e},t.prototype.openPagesHandler=function(){if($.publish(s.SEADRAGON_OPEN),this.isFirstLoad)this.initialRotation=this.extension.getParam(a.rotation),this.initialRotation&&this.viewer.viewport.setRotation(parseInt(this.initialRotation)),this.initialBounds=this.extension.getParam(a.xywh),this.initialBounds?(this.initialBounds=n.fromString(this.initialBounds),this.currentBounds=this.initialBounds,this.fitToBounds(this.currentBounds)):this.goHome();else{var e=this.extension.getSettings();e.preserveViewport&&this.currentBounds?this.fitToBounds(this.currentBounds):this.goHome()}if(this.extension.helper.isMultiCanvas()&&!this.extension.helper.isContinuous()){this.showPrevButton(),this.showNextButton(),$(".navigator").addClass("extraMargin");var t=this.extension.helper.getViewingDirection();t.toString()===manifesto.ViewingDirection.rightToLeft().toString()?(this.extension.helper.isFirstCanvas()?this.disableNextButton():this.enableNextButton(),this.extension.helper.isLastCanvas()?this.disablePrevButton():this.enablePrevButton()):(this.extension.helper.isFirstCanvas()?this.disablePrevButton():this.enablePrevButton(),this.extension.helper.isLastCanvas()?this.disableNextButton():this.enableNextButton())}this.setNavigatorVisible(),this.isFirstLoad=!1,this.overlaySearchResults();var i=this.getInitialSearchResultRect();this.extension.previousSearchResultRect=null,this.extension.currentSearchResultRect=null,i&&this.isZoomToSearchResultEnabled()&&this.zoomToSearchResult(i)},t.prototype.goHome=function(){this.viewer.viewport.goHome(!0)},t.prototype.disablePrevButton=function(){this.prevButtonEnabled=!1,this.$prevButton.addClass("disabled")},t.prototype.enablePrevButton=function(){this.prevButtonEnabled=!0,this.$prevButton.removeClass("disabled")},t.prototype.hidePrevButton=function(){this.disablePrevButton(),this.$prevButton.hide()},t.prototype.showPrevButton=function(){this.enablePrevButton(),this.$prevButton.show()},t.prototype.disableNextButton=function(){this.nextButtonEnabled=!1,this.$nextButton.addClass("disabled")},t.prototype.enableNextButton=function(){this.nextButtonEnabled=!0,this.$nextButton.removeClass("disabled")},t.prototype.hideNextButton=function(){this.disableNextButton(),this.$nextButton.hide()},t.prototype.showNextButton=function(){this.enableNextButton(),this.$nextButton.show()},t.prototype.serialiseBounds=function(e){return e.x+","+e.y+","+e.width+","+e.height},t.prototype.fitToBounds=function(e,t){void 0===t&&(t=!0);var i=new OpenSeadragon.Rect;i.x=Number(e.x),i.y=Number(e.y),i.width=Number(e.w),i.height=Number(e.h),this.viewer.viewport.fitBoundsWithConstraints(i,t)},t.prototype.getCroppedImageBounds=function(){if(!this.viewer||!this.viewer.viewport)return null;var e=this.extension.helper.getCurrentCanvas(),t=this.extension.getCroppedImageDimensions(e,this.viewer),i=new n(t.regionPos.x,t.regionPos.y,t.region.width,t.region.height);return i.toString()},t.prototype.getViewportBounds=function(){if(!this.viewer||!this.viewer.viewport)return null;var e=this.viewer.viewport.getBounds(!0),t=new n(Math.floor(e.x),Math.floor(e.y),Math.floor(e.width),Math.floor(e.height));return t.toString()},t.prototype.viewerResize=function(e){if(e.viewport){var t=e.viewport.getCenter(!0);t&&setTimeout(function(){e.viewport.panTo(t,!0)},1)}},t.prototype.clearSearchResults=function(){this.$canvas.find(".searchOverlay").hide()},t.prototype.overlaySearchResults=function(){for(var e=this.getSearchResultsForCurrentImages(),t=0;tthis.extension.helper.canvasIndex?(this.extension.currentSearchResultRect=o,$.publish(s.SEARCH_RESULT_CANVAS_CHANGED,[o])):this.zoomToSearchResult(o):$.publish(s.NEXT_IMAGES_SEARCH_RESULT_UNAVAILABLE)},t.prototype.prevSearchResult=function(){for(var e,t=this.getSearchResultRectsForCurrentImages(),i=this.getSearchResultRectIndex(this.extension.currentSearchResultRect),n=i-1;n>=0;n--){var o=t[n];e=o;break}e&&this.isZoomToSearchResultEnabled()?o.canvasIndexthis.extension.helper.canvasIndex?t.en().where(function(t){return t.canvasIndex===e.extension.helper.canvasIndex}).last():t.en().where(function(t){return t.canvasIndex===e.extension.helper.canvasIndex}).first():null},t.prototype.zoomToSearchResult=function(e){this.extension.previousSearchResultRect=this.extension.currentSearchResultRect||e,this.extension.currentSearchResultRect=e,this.fitToBounds(new n(e.viewportX,e.viewportY,e.width,e.height),!1),this.highlightSearchResultRect(e),$.publish(s.SEARCH_RESULT_RECT_CHANGED)},t.prototype.highlightSearchResultRect=function(e){var t=$("#searchResult-"+e.canvasIndex+"-"+e.index);t.addClass("current"),$(".searchOverlay").not(t).removeClass("current")},t.prototype.getSearchOverlayRects=function(e){var t=[],i=this.extension.resources.en().where(function(t){return t.index===e.canvasIndex}).first(),n=this.extension.resources.indexOf(i),o=(this.extension.resources[n].width,0);n>0&&(o=this.extension.resources[n-1].width);for(var s=0;s0?this.config.options.pageGap:0),l=r.y,h=r.width,c=r.height,u=new OpenSeadragon.Rect(a,l,h,c);r.viewportX=a,r.viewportY=l,u.canvasIndex=r.canvasIndex,u.resultIndex=r.index,u.chars=r.chars,t.push(u)}return t},t.prototype.resize=function(){var t=this;if(e.prototype.resize.call(this),this.$viewer.height(this.$content.height()-this.$viewer.verticalMargins()),this.$viewer.width(this.$content.width()-this.$viewer.horizontalMargins()),this.isCreated){this.currentBounds&&this.fitToBounds("string"==typeof this.currentBounds?n.fromString(this.currentBounds):this.currentBounds),this.$title.ellipsisFill(this.extension.sanitize(this.title)),this.$spinner.css("top",this.$content.height()/2-this.$spinner.height()/2),this.$spinner.css("left",this.$content.width()/2-this.$spinner.width()/2);var i=this.extension.helper.getViewingDirection();if(this.extension.helper.isMultiCanvas()&&this.$prevButton&&this.$nextButton){var o=Math.floor(this.$content.width()/2);switch(i.toString()){case manifesto.ViewingDirection.bottomToTop().toString():this.$prevButton.addClass("down"),this.$nextButton.addClass("up"),this.$prevButton.css("left",o-this.$prevButton.outerWidth()/2),this.$prevButton.css("top",this.$content.height()-this.$prevButton.height()),this.$nextButton.css("left",-1*o-this.$nextButton.outerWidth()/2);break;case manifesto.ViewingDirection.topToBottom().toString():this.$prevButton.css("left",o-this.$prevButton.outerWidth()/2),this.$nextButton.css("left",-1*o-this.$nextButton.outerWidth()/2),this.$nextButton.css("top",this.$content.height()-this.$nextButton.height());break;default:this.$prevButton.css("top",(this.$content.height()-this.$prevButton.height())/2),this.$nextButton.css("top",(this.$content.height()-this.$nextButton.height())/2)}}setTimeout(function(){if(t.extension.helper.isContinuous())if(t.extension.helper.isHorizontallyAligned()){var e=t.$viewer.width()-t.$viewer.rightMargin();t.$navigator.width(e)}else t.$navigator.height(t.$viewer.height())},100)}},t.prototype.setFocus=function(){this.$canvas.is(":focus")||this.extension.config.options.allowStealFocus&&this.$canvas.focus()},t.prototype.setNavigatorVisible=function(){var e=Utils.Bools.getBool(this.extension.getSettings().navigatorEnabled,!0)&&this.extension.metric!==r.MOBILE_LANDSCAPE;this.viewer.navigator.setVisible(e),e?this.$navigator.show():this.$navigator.hide()},t}(o);return l});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/SettingsDialogue",["require","exports","../../modules/uv-dialogues-module/SettingsDialogue"],function(e,t,i){var n=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(){var t=this;this.setConfig("settingsDialogue"),e.prototype.create.call(this),this.$navigatorEnabled=$('
'),this.$scroll.append(this.$navigatorEnabled),this.$navigatorEnabledCheckbox=$(' '),this.$navigatorEnabled.append(this.$navigatorEnabledCheckbox),this.$navigatorEnabledLabel=$(''+this.content.navigatorEnabled+" "),
+this.$navigatorEnabled.append(this.$navigatorEnabledLabel),this.$pagingEnabled=$('
'),this.$scroll.append(this.$pagingEnabled),this.$pagingEnabledCheckbox=$(' '),this.$pagingEnabled.append(this.$pagingEnabledCheckbox),this.$pagingEnabledLabel=$(''+this.content.pagingEnabled+" "),this.$pagingEnabled.append(this.$pagingEnabledLabel),this.$clickToZoomEnabled=$('
'),this.$scroll.append(this.$clickToZoomEnabled),this.$clickToZoomEnabledCheckbox=$(' '),this.$clickToZoomEnabled.append(this.$clickToZoomEnabledCheckbox),this.$clickToZoomEnabledLabel=$(''+this.content.clickToZoomEnabled+" "),this.$clickToZoomEnabled.append(this.$clickToZoomEnabledLabel),this.$preserveViewport=$('
'),this.$scroll.append(this.$preserveViewport),this.$preserveViewportCheckbox=$(' '),this.$preserveViewport.append(this.$preserveViewportCheckbox),this.$preserveViewportLabel=$(''+this.content.preserveViewport+" "),this.$preserveViewport.append(this.$preserveViewportLabel),this.$navigatorEnabledCheckbox.change(function(){var e={};t.$navigatorEnabledCheckbox.is(":checked")?e.navigatorEnabled=!0:e.navigatorEnabled=!1,t.updateSettings(e)}),this.$clickToZoomEnabledCheckbox.change(function(){var e={};t.$clickToZoomEnabledCheckbox.is(":checked")?e.clickToZoomEnabled=!0:e.clickToZoomEnabled=!1,t.updateSettings(e)}),this.$pagingEnabledCheckbox.change(function(){var e={};t.$pagingEnabledCheckbox.is(":checked")?e.pagingEnabled=!0:e.pagingEnabled=!1,t.updateSettings(e)}),this.$preserveViewportCheckbox.change(function(){var e={};t.$preserveViewportCheckbox.is(":checked")?e.preserveViewport=!0:e.preserveViewport=!1,t.updateSettings(e)})},t.prototype.open=function(){e.prototype.open.call(this);var t=this.getSettings();t.navigatorEnabled?this.$navigatorEnabledCheckbox.prop("checked",!0):this.$navigatorEnabledCheckbox.removeAttr("checked"),t.clickToZoomEnabled?this.$clickToZoomEnabledCheckbox.prop("checked",!0):this.$clickToZoomEnabledCheckbox.removeAttr("checked"),this.extension.helper.isPagingAvailable()?t.pagingEnabled?this.$pagingEnabledCheckbox.prop("checked",!0):this.$pagingEnabledCheckbox.removeAttr("checked"):this.$pagingEnabled.hide(),t.preserveViewport?this.$preserveViewportCheckbox.prop("checked",!0):this.$preserveViewportCheckbox.removeAttr("checked")},t}(i);return n});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/ShareDialogue",["require","exports","../../modules/uv-dialogues-module/ShareDialogue","./Commands"],function(e,t,i,n){var o=function(e){function t(t){var i=this;e.call(this,t),$.subscribe(n.SEADRAGON_OPEN,function(){i.update()}),$.subscribe(n.SEADRAGON_ANIMATION_FINISH,function(){i.update()})}return __extends(t,e),t.prototype.create=function(){this.setConfig("shareDialogue"),e.prototype.create.call(this)},t.prototype.update=function(){e.prototype.update.call(this);var t=this.extension.getViewportBounds(),i=this.extension.getViewerRotation();this.code=this.extension.getEmbedScript(this.options.embedTemplate,this.currentWidth,this.currentHeight,t,i),this.$code.val(this.code)},t.prototype.resize=function(){e.prototype.resize.call(this)},t}(i);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-seadragon-extension/Extension",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-shared-module/BaseExtension","../../modules/uv-shared-module/Bookmark","./Commands","../../modules/uv-contentleftpanel-module/ContentLeftPanel","./CroppedImageDimensions","./DownloadDialogue","../../modules/uv-dialogues-module/ExternalContentDialogue","../../modules/uv-searchfooterpanel-module/FooterPanel","../../modules/uv-dialogues-module/HelpDialogue","../../modules/uv-shared-module/Metrics","../../modules/uv-osdmobilefooterpanel-module/MobileFooter","./Mode","../../modules/uv-dialogues-module/MoreInfoDialogue","../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel","../../modules/uv-multiselectdialogue-module/MultiSelectDialogue","./MultiSelectionArgs","../../modules/uv-pagingheaderpanel-module/PagingHeaderPanel","../../Params","../../modules/uv-shared-module/Point","../../modules/uv-seadragoncenterpanel-module/SeadragonCenterPanel","./SettingsDialogue","./ShareDialogue","../../modules/uv-shared-module/Shell"],function(e,t,i,n,o,s,r,a,l,h,c,u,p,d,g,f,m,v,b,E,x,w,y,S,C,R){var I=Manifold.SearchResult,T=Utils.Measurements.Size,D=function(e){function t(t){e.call(this,t),this.currentRotation=0,this.isSearching=!1,this.searchResults=[]}return __extends(t,e),t.prototype.create=function(t){var n=this;e.prototype.create.call(this,t);$.subscribe(i.METRIC_CHANGED,function(){if(n.metric===p.MOBILE_LANDSCAPE){var e={};e.pagingEnabled=!1,n.updateSettings(e),$.publish(i.UPDATE_SETTINGS),R.$rightPanel.hide()}else R.$rightPanel.show()}),$.subscribe(s.CLEAR_SEARCH,function(e){n.searchResults=null,$.publish(s.SEARCH_RESULTS_CLEARED),n.triggerSocket(s.CLEAR_SEARCH)}),$.subscribe(i.DOWN_ARROW,function(e){n.useArrowKeysToNavigate()||n.centerPanel.setFocus()}),$.subscribe(i.END,function(e){n.viewPage(n.helper.getLastPageIndex())}),$.subscribe(s.FIRST,function(e){n.triggerSocket(s.FIRST),n.viewPage(n.helper.getFirstPageIndex())}),$.subscribe(s.GALLERY_DECREASE_SIZE,function(e){n.triggerSocket(s.GALLERY_DECREASE_SIZE)}),$.subscribe(s.GALLERY_INCREASE_SIZE,function(e){n.triggerSocket(s.GALLERY_INCREASE_SIZE)}),$.subscribe(s.GALLERY_THUMB_SELECTED,function(e){n.triggerSocket(s.GALLERY_THUMB_SELECTED)}),$.subscribe(i.HOME,function(e){n.viewPage(n.helper.getFirstPageIndex())}),$.subscribe(s.IMAGE_SEARCH,function(e,t){n.triggerSocket(s.IMAGE_SEARCH,t),n.viewPage(t)}),$.subscribe(s.LAST,function(e){n.triggerSocket(s.LAST),n.viewPage(n.helper.getLastPageIndex())}),$.subscribe(i.LEFT_ARROW,function(e){n.useArrowKeysToNavigate()?n.viewPage(n.getPrevPageIndex()):n.centerPanel.setFocus()}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_START,function(e){n.metric!==p.MOBILE_LANDSCAPE&&R.$rightPanel.show()}),$.subscribe(i.LEFTPANEL_COLLAPSE_FULL_FINISH,function(e){R.$centerPanel.show(),n.resize()}),$.subscribe(i.LEFTPANEL_EXPAND_FULL_START,function(e){R.$centerPanel.hide(),R.$rightPanel.hide()}),$.subscribe(i.MINUS,function(e){n.centerPanel.setFocus()}),$.subscribe(s.MODE_CHANGED,function(e,t){n.triggerSocket(s.MODE_CHANGED,t),n.mode=new g(t);var o=n.getSettings();$.publish(i.SETTINGS_CHANGED,[o])}),$.subscribe(s.MULTISELECTION_MADE,function(e,t){var i=new b;i.manifestUri=n.helper.iiifResourceUri,i.allCanvases=t.length===n.helper.getCanvases().length,i.canvases=t,i.format=n.config.options.multiSelectionMimeType,i.sequence=n.helper.getCurrentSequence().id,n.triggerSocket(s.MULTISELECTION_MADE,i)}),$.subscribe(s.NEXT,function(e){n.triggerSocket(s.NEXT),n.viewPage(n.getNextPageIndex())}),$.subscribe(s.NEXT_SEARCH_RESULT,function(){n.triggerSocket(s.NEXT_SEARCH_RESULT)}),$.subscribe(s.NEXT_IMAGES_SEARCH_RESULT_UNAVAILABLE,function(){n.triggerSocket(s.NEXT_IMAGES_SEARCH_RESULT_UNAVAILABLE),n.nextSearchResult()}),$.subscribe(s.PREV_IMAGES_SEARCH_RESULT_UNAVAILABLE,function(){n.triggerSocket(s.PREV_IMAGES_SEARCH_RESULT_UNAVAILABLE),n.prevSearchResult()}),$.subscribe(s.OPEN_THUMBS_VIEW,function(e){n.triggerSocket(s.OPEN_THUMBS_VIEW)}),$.subscribe(s.OPEN_TREE_VIEW,function(e){n.triggerSocket(s.OPEN_TREE_VIEW)}),$.subscribe(i.PAGE_DOWN,function(e){n.viewPage(n.getNextPageIndex())}),$.subscribe(s.PAGE_SEARCH,function(e,t){n.triggerSocket(s.PAGE_SEARCH,t),n.viewLabel(t)}),$.subscribe(i.PAGE_UP,function(e){n.viewPage(n.getPrevPageIndex())}),$.subscribe(s.PAGING_TOGGLED,function(e,t){n.triggerSocket(s.PAGING_TOGGLED,t)}),$.subscribe(i.PLUS,function(e){n.centerPanel.setFocus()}),$.subscribe(s.PREV,function(e){n.triggerSocket(s.PREV),n.viewPage(n.getPrevPageIndex())}),$.subscribe(s.PREV_SEARCH_RESULT,function(){n.triggerSocket(s.PREV_SEARCH_RESULT)}),$.subscribe(s.PRINT,function(){n.print()}),$.subscribe(i.RIGHT_ARROW,function(e){n.useArrowKeysToNavigate()?n.viewPage(n.getNextPageIndex()):n.centerPanel.setFocus()}),$.subscribe(s.SEADRAGON_ANIMATION,function(){n.triggerSocket(s.SEADRAGON_ANIMATION)}),$.subscribe(s.SEADRAGON_ANIMATION_FINISH,function(e,t){n.centerPanel&&n.centerPanel.currentBounds&&n.setParam(x.xywh,n.centerPanel.getViewportBounds());var i=n.helper.getCurrentCanvas();n.triggerSocket(s.CURRENT_VIEW_URI,{cropUri:n.getCroppedImageUri(i,n.getViewer()),fullUri:n.getConfinedImageUri(i,i.getWidth())})}),$.subscribe(s.SEADRAGON_ANIMATION_START,function(){n.triggerSocket(s.SEADRAGON_ANIMATION_START)}),$.subscribe(s.SEADRAGON_OPEN,function(){n.useArrowKeysToNavigate()||n.centerPanel.setFocus()}),$.subscribe(s.SEADRAGON_RESIZE,function(){n.triggerSocket(s.SEADRAGON_RESIZE)}),$.subscribe(s.SEADRAGON_ROTATION,function(e,t){n.triggerSocket(s.SEADRAGON_ROTATION),n.currentRotation=t,n.setParam(x.rotation,t)}),$.subscribe(s.SEARCH,function(e,t){n.triggerSocket(s.SEARCH,t),n.searchWithin(t)}),$.subscribe(s.SEARCH_PREVIEW_FINISH,function(e){n.triggerSocket(s.SEARCH_PREVIEW_FINISH)}),$.subscribe(s.SEARCH_PREVIEW_START,function(e){n.triggerSocket(s.SEARCH_PREVIEW_START)}),$.subscribe(s.SEARCH_RESULTS,function(e,t){n.triggerSocket(s.SEARCH_RESULTS,t)}),$.subscribe(s.SEARCH_RESULT_CANVAS_CHANGED,function(e,t){n.viewPage(t.canvasIndex)}),$.subscribe(s.SEARCH_RESULTS_EMPTY,function(e){n.triggerSocket(s.SEARCH_RESULTS_EMPTY)}),$.subscribe(i.THUMB_SELECTED,function(e,t){n.viewPage(t.index)}),$.subscribe(s.TREE_NODE_SELECTED,function(e,t){n.triggerSocket(s.TREE_NODE_SELECTED,t.data.path),n.treeNodeSelected(t)}),$.subscribe(i.UP_ARROW,function(e){n.useArrowKeysToNavigate()||n.centerPanel.setFocus()}),$.subscribe(i.UPDATE_SETTINGS,function(e){n.viewPage(n.helper.canvasIndex,!0);var t=n.getSettings();$.publish(i.SETTINGS_CHANGED,[t])}),$.subscribe(s.VIEW_PAGE,function(e,t){n.triggerSocket(s.VIEW_PAGE,t),n.viewPage(t)}),Utils.Async.waitFor(function(){return n.centerPanel&&n.centerPanel.isCreated},function(){n.checkForSearchParam(),n.checkForRotationParam()})},t.prototype.createModules=function(){e.prototype.createModules.call(this),this.isHeaderPanelEnabled()?this.headerPanel=new E(R.$headerPanel):R.$headerPanel.hide(),this.isLeftPanelEnabled()?this.leftPanel=new r(R.$leftPanel):R.$leftPanel.hide(),this.centerPanel=new y(R.$centerPanel),this.isRightPanelEnabled()?this.rightPanel=new m(R.$rightPanel):R.$rightPanel.hide(),this.isFooterPanelEnabled()?(this.footerPanel=new c(R.$footerPanel),this.mobileFooterPanel=new d(R.$mobileFooterPanel)):R.$footerPanel.hide(),this.$helpDialogue=$('
'),R.$overlays.append(this.$helpDialogue),this.helpDialogue=new u(this.$helpDialogue),this.$moreInfoDialogue=$('
'),R.$overlays.append(this.$moreInfoDialogue),this.moreInfoDialogue=new f(this.$moreInfoDialogue),this.$multiSelectDialogue=$('
'),R.$overlays.append(this.$multiSelectDialogue),this.multiSelectDialogue=new v(this.$multiSelectDialogue),this.$shareDialogue=$('
'),R.$overlays.append(this.$shareDialogue),this.shareDialogue=new C(this.$shareDialogue),this.$downloadDialogue=$('
'),R.$overlays.append(this.$downloadDialogue),this.downloadDialogue=new l(this.$downloadDialogue),this.$settingsDialogue=$('
'),R.$overlays.append(this.$settingsDialogue),this.settingsDialogue=new S(this.$settingsDialogue),this.$externalContentDialogue=$('
'),R.$overlays.append(this.$externalContentDialogue),this.externalContentDialogue=new h(this.$externalContentDialogue),this.isHeaderPanelEnabled()&&this.headerPanel.init(),this.isLeftPanelEnabled()&&this.leftPanel.init(),this.isRightPanelEnabled()&&this.rightPanel.init(),this.isFooterPanelEnabled()&&this.footerPanel.init()},t.prototype.checkForSearchParam=function(){if(this.isDeepLinkingEnabled()){var e=this.getParam(x.highlight);e&&(e.replace(/\+/g," ").replace(/"/g,""),$.publish(s.SEARCH,[e]))}},t.prototype.checkForRotationParam=function(){if(this.isDeepLinkingEnabled()){var e=Number(this.getParam(x.rotation));e&&$.publish(s.SEADRAGON_ROTATION,[e])}},t.prototype.viewPage=function(e,t){if(-1!==e){if(this.helper.isCanvasIndexOutOfRange(e)&&(this.showMessage(this.config.content.canvasIndexOutOfRange),e=0),this.isPagingSettingEnabled()&&!t){var i=this.getPagedIndices(e);if(i.contains(this.helper.canvasIndex))return void this.viewCanvas(e)}this.viewCanvas(e)}},t.prototype.getViewer=function(){return this.centerPanel.viewer},t.prototype.getMode=function(){if(this.mode)return this.mode;switch(this.helper.getManifestType().toString()){case manifesto.ManifestType.monograph().toString():return g.page;case manifesto.ManifestType.manuscript().toString():return g.page;default:return g.image}},t.prototype.getViewportBounds=function(){if(!this.centerPanel)return null;var e=this.centerPanel.getViewportBounds();return e},t.prototype.getViewerRotation=function(){return this.centerPanel?this.currentRotation:null},t.prototype.viewRange=function(e){var t=this.helper.getRangeByPath(e);if(t){var i=t.getCanvasIds()[0],n=this.helper.getCanvasIndexById(i);this.viewPage(n)}},t.prototype.viewLabel=function(e){if(!e)return this.showMessage(this.config.modules.genericDialogue.content.emptyValue),void $.publish(i.CANVAS_INDEX_CHANGE_FAILED);var t=this.helper.getCanvasIndexByLabel(e);-1!=t?this.viewPage(t):(this.showMessage(this.config.modules.genericDialogue.content.pageNotFound),$.publish(i.CANVAS_INDEX_CHANGE_FAILED))},t.prototype.treeNodeSelected=function(e){var t=e.data;if(t.type)switch(t.type){case manifesto.IIIFResourceType.manifest().toString():this.viewManifest(t);break;case manifesto.IIIFResourceType.collection().toString():this.viewCollection(t);break;default:this.viewRange(t.path)}},t.prototype.clearSearch=function(){this.searchResults=[],this.viewPage(this.helper.canvasIndex)},t.prototype.prevSearchResult=function(){for(var e,t=this.searchResults.length-1;t>=0;t--){var i=this.searchResults[t];if(i.canvasIndex<=this.getPrevPageIndex()){e=i,this.viewPage(e.canvasIndex);break}}},t.prototype.nextSearchResult=function(){for(var e,t=0;t=this.getNextPageIndex()){e=i,this.viewPage(i.canvasIndex);break}}},t.prototype.bookmark=function(){e.prototype.bookmark.call(this);var t=this.helper.getCurrentCanvas(),n=new o;n.index=this.helper.canvasIndex,n.label=Manifesto.TranslationCollection.getValue(t.getLabel()),n.path=this.getCroppedImageUri(t,this.getViewer()),n.thumb=t.getCanonicalImageUri(this.config.options.bookmarkThumbWidth),n.title=this.helper.getLabel(),n.trackingLabel=window.trackingLabel,n.type=manifesto.ElementType.image().toString(),this.triggerSocket(i.BOOKMARK,n)},t.prototype.print=function(){window.print(),this.triggerSocket(s.PRINT)},t.prototype.getCroppedImageDimensions=function(e,t){if(!t)return null;if(!t.viewport)return null;if(!e.getHeight()||!e.getWidth())return null;var i=t.viewport.getBounds(!0),n=new a,o=Math.floor(i.width),s=Math.floor(i.height),r=Math.floor(i.x),l=Math.floor(i.y);r+o>e.getWidth()?o=e.getWidth()-r:0>r&&(o+=r,r=0),l+s>e.getHeight()?s=e.getHeight()-l:0>l&&(s+=l,l=0),o=Math.min(o,e.getWidth()),s=Math.min(s,e.getHeight());var h=o,c=s;if(e.externalResource.data&&e.externalResource.data.profile&&e.externalResource.data.profile[1]){var u=new T(e.externalResource.data.profile[1].maxWidth,e.externalResource.data.profile[1].maxHeight);if(!_.isUndefined(u.width)&&!_.isUndefined(u.height)){if(o>u.width){var p=u.width;s=Math.round(p*(s/o)),o=p}if(s>u.height){var d=u.height;o=Math.round(o/s*d),s=d}}}return n.region=new T(h,c),n.regionPos=new w(r,l),n.size=new T(o,s),n},t.prototype.getCroppedImageUri=function(e,t){if(!t)return null;if(!t.viewport)return null;var i=this.getCroppedImageDimensions(e,t),n=this.getImageBaseUri(e),o=this.getImageId(e),s=i.regionPos.x+","+i.regionPos.y+","+i.region.width+","+i.region.height,r=i.size.width+","+i.size.height,a=this.getViewerRotation(),l="default";return n+"/"+o+"/"+s+"/"+r+"/"+a+"/"+l+".jpg"},t.prototype.getConfinedImageDimensions=function(e,t){var i=new T(0,0);i.width=t;var n=Math.normalise(t,0,e.getWidth());return i.height=Math.floor(e.getHeight()*n),i},t.prototype.getConfinedImageUri=function(e,t){var i=this.getImageBaseUri(e),n=this.getImageId(e),o="full",s=this.getConfinedImageDimensions(e,t),r=s.width+","+s.height,a=this.getViewerRotation(),l="default";return i+"/"+n+"/"+o+"/"+r+"/"+a+"/"+l+".jpg"},t.prototype.getImageId=function(e){var t=this.getInfoUri(e);return t=t.substr(0,t.lastIndexOf("/")),t.substr(t.lastIndexOf("/")+1)},t.prototype.getImageBaseUri=function(e){var t=this.getInfoUri(e);return t=t.substr(0,t.lastIndexOf("/")),t.substr(0,t.lastIndexOf("/"))},t.prototype.getInfoUri=function(e){var t,i=e.getImages();if(i&&i.length)for(var n=i[0],o=n.getResource(),s=o.getServices(),r=0;rthis.helper.getTotalCanvases()-1?-1:t},t.prototype.getAutoCompleteService=function(){var e=this.helper.getSearchWithinService();return e?e.getService(manifesto.ServiceProfile.autoComplete()):null},t.prototype.getAutoCompleteUri=function(){var e=this.getAutoCompleteService();return e?e.id+"?q={0}":null},t.prototype.getSearchWithinServiceUri=function(){var e=this.helper.getSearchWithinService();if(!e)return null;var t=e.id;return t+="?q={0}"},t.prototype.searchWithin=function(e){var t=this;if(!this.isSearching){this.isSearching=!0,this.searchResults=[];var i=this,n=this.getSearchWithinServiceUri();n=String.format(n,e),this.getSearchResults(n,e,this.searchResults,function(n){t.isSearching=!1,n.length?(t.searchResults=n.sort(function(e,t){return e.canvasIndex-t.canvasIndex}),$.publish(s.SEARCH_RESULTS,[{terms:e,results:n}]),i.viewPage(i.helper.canvasIndex,!0)):i.showMessage(i.config.modules.genericDialogue.content.noMatches,function(){$.publish(s.SEARCH_RESULTS_EMPTY)})})}},t.prototype.getSearchResults=function(e,t,i,n){var o=this;$.getJSON(e,function(e){e.resources&&e.resources.length&&(i=i.concat(o.parseSearchJson(e,i))),e.next?o.getSearchResults(e.next,t,i,n):n(i)})},t.prototype.parseSearchJson=function(e,t){for(var i=[],n=0;n'),this.$content.prepend(this.$navigation),this.$zoomInButton=$(' '),this.$navigation.append(this.$zoomInButton),this.$zoomOutButton=$(' '),this.$navigation.append(this.$zoomOutButton),this.$viewport=$('
'),this.$content.prepend(this.$viewport),this.title=this.extension.helper.getLabel(),this.updateAttribution(),this.$zoomInButton.on("click",function(e){e.preventDefault(),t.viewport.zoomIn()}),this.$zoomOutButton.on("click",function(e){e.preventDefault(),t.viewport.zoomOut()})},t.prototype.openMedia=function(e){var t=this;this.extension.getExternalResources(e).then(function(){t.$viewport.empty();var e=t.extension.helper.getCurrentCanvas();t.viewport=virtex.create({element:"#content .virtex",object:e.id,showStats:t.options.showStats}),t.resize()})},t.prototype.resize=function(){e.prototype.resize.call(this),this.$title.ellipsisFill(this.title),this.$viewport.width(this.$content.width()),this.$viewport.height(this.$content.height())},t}(n);return o});var __extends=this&&this.__extends||function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};define("extensions/uv-virtex-extension/Extension",["require","exports","../../modules/uv-shared-module/BaseCommands","../../modules/uv-shared-module/BaseExtension","../../modules/uv-shared-module/Bookmark","../../modules/uv-contentleftpanel-module/ContentLeftPanel","./DownloadDialogue","./ShareDialogue","../../modules/uv-shared-module/FooterPanel","../../modules/uv-shared-module/HeaderPanel","../../modules/uv-moreinforightpanel-module/MoreInfoRightPanel","./SettingsDialogue","../../modules/uv-shared-module/Shell","../../modules/uv-virtexcenterpanel-module/VirtexCenterPanel"],function(e,t,i,n,o,s,r,a,l,h,c,u,p,d){var g=function(e){function t(t){e.call(this,t)}return __extends(t,e),t.prototype.create=function(t){var n=this;e.prototype.create.call(this,t),$.subscribe(i.THUMB_SELECTED,function(e,t){n.viewCanvas(t)})},t.prototype.createModules=function(){e.prototype.createModules.call(this),this.isHeaderPanelEnabled()?this.headerPanel=new h(p.$headerPanel):p.$headerPanel.hide(),this.isLeftPanelEnabled()&&(this.leftPanel=new s(p.$leftPanel)),this.centerPanel=new d(p.$centerPanel),this.isRightPanelEnabled()&&(this.rightPanel=new c(p.$rightPanel)),this.isFooterPanelEnabled()?this.footerPanel=new l(p.$footerPanel):p.$footerPanel.hide(),this.$downloadDialogue=$('
'),p.$overlays.append(this.$downloadDialogue),this.downloadDialogue=new r(this.$downloadDialogue),this.$shareDialogue=$('
'),p.$overlays.append(this.$shareDialogue),this.shareDialogue=new a(this.$shareDialogue),this.$settingsDialogue=$('
'),p.$overlays.append(this.$settingsDialogue),this.settingsDialogue=new u(this.$settingsDialogue),this.isLeftPanelEnabled()?this.leftPanel.init():p.$leftPanel.hide(),this.isRightPanelEnabled()?this.rightPanel.init():p.$rightPanel.hide()},t.prototype.isLeftPanelEnabled=function(){return Utils.Bools.getBool(this.config.options.leftPanelEnabled,!0)&&(this.helper.isMultiCanvas()||this.helper.isMultiSequence())},t.prototype.bookmark=function(){e.prototype.bookmark.call(this);var t=this.helper.getCurrentCanvas(),n=new o;n.index=this.helper.canvasIndex,n.label=Manifesto.TranslationCollection.getValue(t.getLabel()),n.path=this.getBookmarkUri(),n.thumb=t.getProperty("thumbnail"),n.title=this.helper.getLabel(),n.trackingLabel=window.trackingLabel,n.type=manifesto.ElementType.physicalobject().toString(),this.triggerSocket(i.BOOKMARK,n)},t.prototype.getEmbedScript=function(e,t,i){var n=this.config.uri||"",o=String.format(e,this.getSerializedLocales(),n,this.helper.iiifResourceUri,this.helper.collectionIndex,this.helper.manifestIndex,this.helper.sequenceIndex,this.helper.canvasIndex,t,i,this.embedScriptUri);return o},t}(n);return g}),"function"==typeof jQuery&&define("jquery",[],function(){return jQuery}),require(["Bootstrapper","extensions/uv-mediaelement-extension/Extension","extensions/uv-pdf-extension/Extension","extensions/uv-seadragon-extension/Extension","extensions/uv-virtex-extension/Extension"],function(e,t,i,n,o){var s={};s[manifesto.ElementType.canvas().toString()]={type:n,name:"uv-seadragon-extension"},s[manifesto.ElementType.movingimage().toString()]={type:t,name:"uv-mediaelement-extension"},s[manifesto.ElementType.physicalobject().toString()]={type:o,name:"uv-virtex-extension"},s[manifesto.ElementType.sound().toString()]={type:t,name:"uv-mediaelement-extension"},s[manifesto.RenderingFormat.pdf().toString()]={type:i,name:"uv-pdf-extension"};var r=new e(s);r.bootstrap()}),define("app",function(){});
\ No newline at end of file
diff --git a/dist/uv-2.0.0/lib/bundle.min.js b/dist/uv-2.0.0/lib/bundle.min.js
new file mode 100644
index 000000000..aed472185
--- /dev/null
+++ b/dist/uv-2.0.0/lib/bundle.min.js
@@ -0,0 +1,11 @@
+function Sanitize(){var i,options;for(options=arguments[0]||{},this.config={},this.config.elements=options.elements?options.elements:[],this.config.attributes=options.attributes?options.attributes:{},this.config.attributes[Sanitize.ALL]=this.config.attributes[Sanitize.ALL]?this.config.attributes[Sanitize.ALL]:[],this.config.allow_comments=!!options.allow_comments&&options.allow_comments,this.allowed_elements={},this.config.protocols=options.protocols?options.protocols:{},this.config.add_attributes=options.add_attributes?options.add_attributes:{},this.dom=options.dom?options.dom:document,i=0;i0;)this.current_element.removeChild(this.current_element.firstChild);parent_element.appendChild(this.current_element)}if(!this.config.remove_all_contents&&!this.config.remove_element_contents[name])for(i=0;ichars){var trimmedText=text.substr(0,chars);trimmedText=trimmedText.substr(0,Math.min(trimmedText.length,trimmedText.lastIndexOf(" "))),$self.empty().html(trimmedText+"…")}})},$.fn.ellipsisFill=function(text){var textPassed=!0;return text||(textPassed=!1),this.each(function(){var $self=$(this);if(textPassed||(text=$self.text()),$self.empty(),$self.spanElem=$(' '),$self.append($self.spanElem),$self.css("overflow","hidden"),$self.spanElem.css("white-space","nowrap"),$self.spanElem.html(text),$self.spanElem.width()>$self.width())for(var lastText;$self.spanElem.width()>$self.width();){var t=$self.spanElem.html();if(t=t.substring(0,t.lastIndexOf(" "))+"…",t===lastText)break;$self.spanElem.html(t),lastText=t}})},$.fn.ellipsisFixed=function(chars,buttonText){return this.each(function(){var $self=$(this),text=$self.text();$self.empty();var $span=$(" "),$ellipsis=$(' ');if(buttonText?$ellipsis.html(buttonText):$ellipsis.html("…"),$ellipsis.click(function(e){e.preventDefault();var $this=$(this);$span.html(text),$this.remove()}),text.length>chars){var trimmedText=text.substr(0,chars);trimmedText=trimmedText.substr(0,Math.min(trimmedText.length,trimmedText.lastIndexOf(" "))),$span.html(trimmedText+" "),$span.append($ellipsis)}else $span.html(text);$self.append($span)})},$.fn.ellipsisHtmlFixed=function(chars,cb){return this.each(function(){var $self=$(this),expandedText=$self.html(),$trunc=$(" ");if($trunc.html($self.html().replace(/\s[\s]*/g," ").trim()),!($trunc.text().trim().length<=chars)){for(;$trunc.text().trim().length>chars;)$trunc.removeLastWord(chars);var collapsedText=$trunc.html(),expanded=!1;$self.toggle=function(){$self.empty();var $toggleButton=$(' ');expanded?($self.html(expandedText+" "),$toggleButton.text("less"),$toggleButton.toggleClass("less","more")):($self.html(collapsedText+"… "),$toggleButton.text("more"),$toggleButton.toggleClass("more","less")),$toggleButton.one("click",function(e){e.preventDefault(),$self.toggle()}),expanded=!expanded,$self.append($toggleButton),cb&&cb()},$self.toggle()}})},$.fn.enable=function(){return this.each(function(){var $this=$(this);$this.removeClass("disabled"),$this.attr("tabindex",$this.data("tabindex"))})},$.fn.equaliseHeight=function(reset,average){var maxHeight=-1,minHeight=Number.MAX_VALUE,heights=[];reset&&this.each(function(){$(this).height("auto")}),this.each(function(){var currentHeight=$(this).height();heights.push(currentHeight),maxHeight=maxHeight>currentHeight?maxHeight:currentHeight,minHeight=minHeightmaxTabIndex&&(maxTabIndex=tabIndex,$elementWithGreatestTabIndex=$el)}),$elementWithGreatestTabIndex},$.fn.horizontalMargins=function(){var $self=$(this);return parseInt($self.css("marginLeft"))+parseInt($self.css("marginRight"))},$.fn.leftMargin=function(){var $self=$(this);return parseInt($self.css("marginLeft"))},$.fn.rightMargin=function(){var $self=$(this);return parseInt($self.css("marginRight"))},$.fn.horizontalPadding=function(){var $self=$(this);return parseInt($self.css("paddingLeft"))+parseInt($self.css("paddingRight"))},$.fn.leftPadding=function(){var $self=$(this);return parseInt($self.css("paddingLeft"))},$.fn.rightPadding=function(){var $self=$(this);return parseInt($self.css("paddingRight"))},$.mlp={x:0,y:0},$(documentHandler),$.fn.ismouseover=function(overThis){var result=!1;return this.eq(0).each(function(){var $current=$(this).is("iframe")?$(this).contents().find("body"):$(this),offset=$current.offset();result=offset.left<=$.mlp.x&&offset.left+$current.outerWidth()>$.mlp.x&&offset.top<=$.mlp.y&&offset.top+$current.outerHeight()>$.mlp.y}),result};var timer,on=$.fn.on;$.fn.on=function(){var args=Array.apply(null,arguments),last=args[args.length-1];if(isNaN(last)||1===last&&args.pop())return on.apply(this,args);var delay=args.pop(),fn=args.pop();return args.push(function(){var self=this,params=arguments;clearTimeout(timer),timer=setTimeout(function(){fn.apply(self,params)},delay)}),on.apply(this,args)},$.fn.onEnter=function(cb){return this.each(function(){var $this=$(this);$this.on("keyup",function(e){13===e.keyCode&&(e.preventDefault(),cb())})})},$.fn.onPressed=function(cb){return this.each(function(){var $this=$(this);$this.on("touchstart click",function(e){e.preventDefault(),cb(e)}),$this.on("keyup",function(e){13===e.keyCode&&(e.preventDefault(),cb(e))})})},$.fn.removeLastWord=function(chars,depth){return"undefined"==typeof chars&&(chars=8),"undefined"==typeof depth&&(depth=0),this.each(function(){var $self=$(this);if($self.contents().length>0){var $lastElement=$self.contents().last();if(3===$lastElement[0].nodeType){var words=$lastElement.text().trim().split(" ");if(words.length>1)return words.splice(words.length-1,1),void($lastElement[0].data=words.join(" "));if("undefined"!=typeof chars&&1===words.length&&words[0].length>chars)return void($lastElement[0].data=words.join(" ").substring(0,chars))}$lastElement.removeLastWord(chars,depth+1)}else depth>0&&$self.remove()})},$.fn.swapClass=function(removeClass,addClass){return this.each(function(){$(this).removeClass(removeClass).addClass(addClass)})},$.fn.targetBlank=function(){return this.each(function(){$(this).find("a").prop("target","_blank")})},$.fn.toggleClass=function(class1,class2){return this.each(function(){var $this=$(this);$this.hasClass(class1)?$(this).removeClass(class1).addClass(class2):$(this).removeClass(class2).addClass(class1)})},$.fn.toggleExpandText=function(chars,lessText,moreText,cb){return this.each(function(){var $self=$(this),expandedText=$self.html();if(!(chars>expandedText.length)){var expanded=!1,collapsedText=expandedText.substr(0,chars);collapsedText=collapsedText.substr(0,Math.min(collapsedText.length,collapsedText.lastIndexOf(" "))),$self.toggle=function(){$self.empty();var $toggleButton=$(' ');expanded?($self.html(expandedText+" "),$toggleButton.text(lessText),$toggleButton.toggleClass("less","more")):($self.html(collapsedText+" "),$toggleButton.text(moreText),$toggleButton.toggleClass("more","less")),$toggleButton.one("click",function(e){e.preventDefault(),$self.toggle()}),expanded=!expanded,$self.append($toggleButton),cb&&cb()},$self.toggle()}})},$.fn.toggleExpandTextByLines=function(lines,lessText,moreText,cb){return this.each(function(){for(var $self=$(this),expandedText=$self.html(),$buttonPad=$('… morepad '),stringsByLine=[expandedText],lastHeight=$self.height();$self.text().length>0;){$self.removeLastWord();var html=$self.html();$self.append($buttonPad),lastHeight>$self.height()&&(stringsByLine.unshift(html),lastHeight=$self.height()),$buttonPad.remove()}if(stringsByLine.length<=lines)return void $self.html(expandedText);var collapsedText=stringsByLine[lines-1],expanded=!1;$self.toggle=function(){$self.empty();var $toggleButton=$(' ');expanded?($self.html(expandedText+" "),$toggleButton.text(lessText),$toggleButton.toggleClass("less","more")):($self.html(collapsedText+"… "),$toggleButton.text(moreText),$toggleButton.toggleClass("more","less")),$toggleButton.one("click",function(e){e.preventDefault(),$self.toggle()}),expanded=!expanded,$self.append($toggleButton),cb&&cb()},$self.toggle()})},$.fn.toggleText=function(text1,text2){return this.each(function(){var $this=$(this);$this.text()===text1?$(this).text(text2):$(this).text(text1)})},$.fn.updateAttr=function(attrName,oldVal,newVal){return this.each(function(){var $this=$(this),attr=$this.attr(attrName);attr&&0===attr.indexOf(oldVal)&&(attr=attr.replace(oldVal,newVal),$this.attr(attrName,attr))})},$.fn.verticalMargins=function(){var $self=$(this);return parseInt($self.css("marginTop"))+parseInt($self.css("marginBottom"))},$.fn.verticalPadding=function(){var $self=$(this);return parseInt($self.css("paddingTop"))+parseInt($self.css("paddingBottom"))}}(jQuery),!function(a){var b=null;a.initPubSub=function(){b=a({})},a.subscribe=function(){b||a.initPubSub(),b.on.apply(b,arguments)},a.unsubscribe=function(){b||a.initPubSub(),b.off.apply(b,arguments)},a.disposePubSub=function(){b=null},a.publish=function(){b||a.initPubSub(),b.trigger.apply(b,arguments)}}(jQuery);var KeyCodes;!function(KeyCodes){var KeyDown;!function(KeyDown){KeyDown.Backspace=8,KeyDown.Tab=9,KeyDown.Enter=13,KeyDown.Shift=16,KeyDown.Ctrl=17,KeyDown.Alt=18,KeyDown.PauseBreak=19,KeyDown.CapsLock=20,KeyDown.Escape=27,KeyDown.Spacebar=32,KeyDown.PageUp=33,KeyDown.PageDown=34,KeyDown.End=35,KeyDown.Home=36,KeyDown.LeftArrow=37,KeyDown.UpArrow=38,KeyDown.RightArrow=39,KeyDown.DownArrow=40,KeyDown.PrintScrn=44,KeyDown.Insert=45,KeyDown.Delete=46,KeyDown.Zero=48,KeyDown.One=49,KeyDown.Two=50,KeyDown.Three=51,KeyDown.Four=52,KeyDown.Five=53,KeyDown.Six=54,KeyDown.Seven=55,KeyDown.Eight=56,KeyDown.Nine=57,KeyDown.a=65,KeyDown.b=66,KeyDown.c=67,KeyDown.d=68,KeyDown.e=69,KeyDown.f=70,KeyDown.g=71,KeyDown.h=72,KeyDown.i=73,KeyDown.j=74,KeyDown.k=75,KeyDown.l=76,KeyDown.m=77,KeyDown.n=78,KeyDown.o=79,KeyDown.p=80,KeyDown.q=81,KeyDown.r=82,KeyDown.s=83,KeyDown.t=84,KeyDown.u=85,KeyDown.v=86,KeyDown.w=87,KeyDown.x=88,KeyDown.y=89,KeyDown.z=90,KeyDown.LeftWindowKey=91,KeyDown.RightWindowKey=92,KeyDown.SelectKey=93,KeyDown.Numpad0=96,KeyDown.Numpad1=97,KeyDown.Numpad2=98,KeyDown.Numpad3=99,KeyDown.Numpad4=100,KeyDown.Numpad5=101,KeyDown.Numpad6=102,KeyDown.Numpad7=103,KeyDown.Numpad8=104,KeyDown.Numpad9=105,KeyDown.Multiply=106,KeyDown.NumpadPlus=107,KeyDown.NumpadMinus=109,KeyDown.DecimalPoint=110,KeyDown.Divide=111,KeyDown.F1=112,KeyDown.F2=113,KeyDown.F3=114,KeyDown.F4=115,KeyDown.F5=116,
+KeyDown.F6=117,KeyDown.F7=118,KeyDown.F8=119,KeyDown.F9=120,KeyDown.F10=121,KeyDown.F11=122,KeyDown.F12=123,KeyDown.NumLock=144,KeyDown.ScrollLock=145,KeyDown.Semicolon=186,KeyDown.Equals=187,KeyDown.Comma=188,KeyDown.LessThan=188,KeyDown.Dash=189,KeyDown.Period=190,KeyDown.GreaterThan=190,KeyDown.ForwardSlash=191,KeyDown.QuestionMark=191,KeyDown.GraveAccent=192,KeyDown.Tilde=192,KeyDown.OpenCurlyBracket=219,KeyDown.OpenSquareBracket=219,KeyDown.BackSlash=220,KeyDown.VerticalPipe=220,KeyDown.CloseCurlyBracket=221,KeyDown.CloseSquareBracket=221,KeyDown.Quote=222,KeyDown.CommandFF=224}(KeyDown=KeyCodes.KeyDown||(KeyCodes.KeyDown={}))}(KeyCodes||(KeyCodes={}));var KeyCodes;!function(KeyCodes){var KeyPress;!function(KeyPress){KeyPress.Backspace=8,KeyPress.Enter=13,KeyPress.Spacebar=32,KeyPress.Hash=35,KeyPress.GraveAccent=39,KeyPress.ForwardSlash=32,KeyPress.DoubleQuote=34,KeyPress.Asterisk=42,KeyPress.Plus=43,KeyPress.Comma=44,KeyPress.Minus=45,KeyPress.Period=46,KeyPress.ForwardSlash=47,KeyPress.Zero=48,KeyPress.One=49,KeyPress.Two=50,KeyPress.Three=51,KeyPress.Four=52,KeyPress.Five=53,KeyPress.Six=54,KeyPress.Seven=55,KeyPress.Eight=56,KeyPress.Nine=57,KeyPress.Colon=58,KeyPress.Semicolon=59,KeyPress.LessThan=60,KeyPress.Equals=61,KeyPress.GreaterThan=62,KeyPress.QuestionMark=63,KeyPress.At=64,KeyPress.OpenSquareBracket=91,KeyPress.BackSlash=92,KeyPress.CloseSquareBracket=93,KeyPress.a=97,KeyPress.b=98,KeyPress.c=99,KeyPress.d=100,KeyPress.e=101,KeyPress.f=102,KeyPress.g=103,KeyPress.h=104,KeyPress.i=105,KeyPress.j=106,KeyPress.k=107,KeyPress.l=108,KeyPress.m=109,KeyPress.n=110,KeyPress.o=111,KeyPress.p=112,KeyPress.q=113,KeyPress.r=114,KeyPress.s=115,KeyPress.t=116,KeyPress.u=117,KeyPress.v=118,KeyPress.w=119,KeyPress.x=120,KeyPress.y=121,KeyPress.z=122,KeyPress.OpenCurlyBracket=123,KeyPress.VerticalPipe=124,KeyPress.CloseCurlyBracket=125,KeyPress.Tilde=126}(KeyPress=KeyCodes.KeyPress||(KeyCodes.KeyPress={}))}(KeyCodes||(KeyCodes={}));var exjs;!function(r){r.version="0.4.0"}(exjs||(exjs={}));var exjs;!function(r){Array.isArray||(Array.isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)})}(exjs||(exjs={}));var exjs;!function(r){var e=function(){function r(){}return r.prototype.getEnumerator=function(){return{moveNext:function(){return!1},current:void 0}},r.prototype.aggregate=function(r,e){for(var t=r,n=this.getEnumerator();n.moveNext();)t=e(t,n.current);return t},r.prototype.all=function(r){if(r)for(var e=this.getEnumerator(),t=0;e.moveNext();){if(!r(e.current,t))return!1;t++}return!0},r.prototype.any=function(r){for(var e=this.getEnumerator(),t=0;e.moveNext();){if(!r)return!0;if(r(e.current,t))return!0;t++}return!1},r.prototype.append=function(){for(var r=[],e=0;e-1&&(this._keys.splice(e,1),this._values.splice(e,1),this.size--,!0)},e.prototype.entries=function(){var e=this;return r.range(0,this.size).select(function(r){return[e._keys[r],e._values[r]]})},e.prototype.forEach=function(r,e){null==e&&(e=this);for(var t=0,n=this._keys,o=this._values,u=n.length;u>t;t++)r.call(e,o[t],n[t],this)},e.prototype.get=function(r){var e=this._keys.indexOf(r);return this._values[e]},e.prototype.has=function(r){return this._keys.indexOf(r)>-1},e.prototype.keys=function(){return this._keys.en()},e.prototype.set=function(r,e){var t=this._keys.indexOf(r);t>-1?this._values[t]=e:(this._keys.push(r),this._values.push(e),this.size++)},e.prototype.values=function(){return this._values.en()},e}();r.Map3=e,r.Enumerable.prototype.toMap=function(r,t){for(var n=new e,o=this.getEnumerator();o.moveNext();)n.set(r(o.current),t(o.current));return n},r.List&&(r.List.prototype.toMap=r.Enumerable.prototype.toMap)}(exjs||(exjs={})),function(r){r.Map||(r.Map=exjs.Map3)}("undefined"==typeof window?global:window);var exjs;!function(r){function e(e){var t=new r.Enumerable;return t.getEnumerator=function(){var r={current:void 0,moveNext:function(){return e(r)}};return r},t}r.anonymous=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n,o=1,u={current:void 0,moveNext:function(){if(2>o){if(t=t||r.getEnumerator(),t.moveNext())return u.current=t.current,!0;o++}return n=n||e.en().getEnumerator(),n.moveNext()?(u.current=n.current,!0):(u.current=void 0,!1)}};return u}r.Enumerable.prototype.append=function(){for(var t=this,n=[],o=0;o=e?(t.current=void 0,!1):(t.current=r[n],!0)},t}function t(){return this&&Array.isArray(this)?new n(this):new r.Enumerable}var n=function(r){function t(t){r.call(this),this.getEnumerator=function(){return e(t)},this.toArray=function(){return t.slice(0)}}return __extends(t,r),t}(r.Enumerable);try{Object.defineProperty(Array.prototype,"en",{value:t,enumerable:!1,writable:!1,configurable:!1})}catch(o){Array.prototype.en=t}}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=!1,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),o.current=void 0,t.moveNext()?(o.current=t.current,!0):!n&&(n=!0,t=e.getEnumerator(),!!t.moveNext()&&(o.current=t.current,!0))}};return o}r.Enumerable.prototype.concat=function(t){var n=this,o=t instanceof Array?t.en():t,u=new r.Enumerable;return u.getEnumerator=function(){return e(n,o)},u},r.List&&(r.List.prototype.concat=r.Enumerable.prototype.concat)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=[],o={current:void 0,moveNext:function(){if(t||(t=r.getEnumerator()),o.current=void 0,!e){for(;t.moveNext();)if(n.indexOf(t.current)<0)return n.push(o.current=t.current),!0;return!1}for(;t.moveNext();){for(var u=0,i=n.length,c=!1;i>u&&!c;u++)c=!!e(n[u],t.current);if(!c)return n.push(o.current=t.current),!0}return!1}};return o}r.Enumerable.prototype.distinct=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.List&&(r.List.prototype.distinct=r.Enumerable.prototype.distinct)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e,t){t=t||function(r,e){return r===e};var n,o={current:void 0,moveNext:function(){for(n||(n=r.getEnumerator()),o.current=void 0;n.moveNext();){for(var u=!1,i=e.getEnumerator();i.moveNext()&&!u;)u=t(n.current,i.current);if(!u)return o.current=n.current,!0}return!1}};return o}r.Enumerable.prototype.except=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.except=r.Enumerable.prototype.except)}(exjs||(exjs={})),Function.prototype.fromJson=function(r,e){function t(r,e){if(null==r)return r;if(e instanceof Function)return e(r);if(e instanceof Array){if(e=e[0],!(e instanceof Function&&r instanceof Array))return;for(var t=[],n=0;n-1)){var i=t(r[u],this.$jsonMappings[u]);void 0!==i&&(n[u]=i,o.push(u))}for(var u in r)o.indexOf(u)>-1||(n[u]=r[u]);return n};var exjs;!function(r){function e(r,e,n){var o,u=0,i={current:void 0,moveNext:function(){return o||(o=t(r,e,n)),i.current=void 0,!(u>=o.length)&&(i.current=o[u],u++,!0)}};return i}function t(r,e,t){t=t||function(r,e){return r===e};for(var o,u=[],i=[],c=r.getEnumerator();c.moveNext();){o=e(c.current);for(var a=-1,p=0,s=i.length;s>p;p++)if(t(o,i[p])){a=p;break}var f;0>a?(i.push(o),u.push(f=new n(o))):f=u[a],f._add(c.current)}return u}var n=function(r){function e(e){var t=this;r.call(this),this.key=e,this._arr=[],this.getEnumerator=function(){return t._arr.en().getEnumerator()}}return __extends(e,r),e.prototype._add=function(r){this._arr.push(r)},e}(r.Enumerable);r.Enumerable.prototype.groupBy=function(t,n){var o=this,u=new r.Enumerable;return u.getEnumerator=function(){return e(o,t,n)},u},r.List&&(r.List.prototype.groupBy=r.Enumerable.prototype.groupBy)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n){n=n||function(r,e){return r===e};var o,u={current:void 0,moveNext:function(){for(o||(o=r.en(e).distinct().getEnumerator()),u.current=void 0;o.moveNext();){for(var i=!1,c=t.getEnumerator();c.moveNext()&&!i;)i=n(o.current,c.current);if(i)return u.current=o.current,!0}return!1}};return u}r.Enumerable.prototype.intersect=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.intersect=r.Enumerable.prototype.intersect)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n,o,u,i){i=i||function(r,e){return r===e};var c,a,p=0,s={current:void 0,moveNext:function(){if(s.current=void 0,!c){if(c=e.getEnumerator(),!c.moveNext())return!1;a=r.en(t).toArray()}var f;do{for(;p=e?(t.current=void 0,!1):(t.current=r[n],!0)},t},t.prototype.remove=function(r){return this.removeWhere(function(e){return e===r}).any()},t.prototype.removeWhere=function(r){for(var e,t=[],n=this.length-1;n>=0;n--)e=this[n],r(e,n)===!0&&(this.splice(n,1),t.push(e));return t.en().reverse()}}(exjs||(exjs={}));var exjs;!function(r){function e(r,e,n,o){return new t(r,e,n,o)}var t=function(e){function t(r,t,n,o){e.call(this),this.Source=r,o=o||function(r,e){return r>e?1:e>r?-1:0};var u=n===!0?-1:1;this.Sorter=function(r,e){return u*o(t(r),t(e))}}return __extends(t,e),t.prototype.getEnumerator=function(){var e,t=this.Source,n=this.Sorter,o=0,u={current:void 0,moveNext:function(){return e||(e=r.en(t).toArray(),e.sort(n)),u.current=void 0,!(o>=e.length)&&(u.current=e[o],o++,!0)}};return u},t.prototype.thenBy=function(r,e){return new n(this,r,(!1),e)},t.prototype.thenByDescending=function(r,e){return new n(this,r,(!0),e)},t}(r.Enumerable),n=function(r){function e(e,t,n,o){r.call(this,e,t,n,o);var u=e.Sorter,i=this.Sorter;this.Sorter=function(r,e){return u(r,e)||i(r,e)}}return __extends(e,r),e}(t),o=r.Enumerable.prototype;o.orderBy=function(r,t){return e(this,r,!1,t)},o.orderByDescending=function(r,t){return e(this,r,!0,t)},r.List&&(r.List.prototype.orderBy=r.Enumerable.prototype.orderBy,r.List.prototype.orderByDescending=r.Enumerable.prototype.orderByDescending)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n,o=1,u={current:void 0,moveNext:function(){if(2>o){if(t=t||e.en().getEnumerator(),t.moveNext())return u.current=t.current,!0;o++}return n=n||r.getEnumerator(),n.moveNext()?(u.current=n.current,!0):(u.current=void 0,!1)}};return u}r.Enumerable.prototype.prepend=function(){for(var t=this,n=[],o=0;o=e)&&(o.current=n,!0)}};return o}function t(t,n,o){if(t=t||0,n=n||0,t>n)throw new Error("Start cannot be greater than end.");null==o&&(o=1);var u=new r.Enumerable;return u.getEnumerator=function(){return e(t,n,o)},u}r.range=t}(exjs||(exjs={}));var exjs;!function(r){function e(e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.en(e).toArray(),n=t.length),n--,o.current=t[n],n>=0}};return o}r.Enumerable.prototype.reverse=function(){var t=this,n=new r.Enumerable;return n.getEnumerator=function(){return e(t)},n},r.List&&(r.List.prototype.reverse=r.Enumerable.prototype.reverse)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){if(e=e||0,0===e)return Math.round(r);var t=Math.pow(10,e);return Math.round(r*t)/t}r.round=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),!!t.moveNext()&&(o.current=e(t.current,n),n++,!0)}};return o}function t(e,t){var n,o,u={current:void 0,moveNext:function(){for(u.current=void 0,n||(n=e.getEnumerator());!o||!o.moveNext();){if(!n.moveNext())return!1;o=r.selectorEnumerator(t(n.current))}return u.current=o.current,!0}};return u}r.Enumerable.prototype.select=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.selectMany=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.select=r.Enumerable.prototype.select,r.List.prototype.selectMany=r.Enumerable.prototype.selectMany)}(exjs||(exjs={}));var exjs;!function(r){function e(r){return Array.isArray(r)?r.en().getEnumerator():null!=r&&"function"==typeof r.getEnumerator?r.getEnumerator():null}r.selectorEnumerator=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n={current:void 0,moveNext:function(){if(!t){t=r.getEnumerator();for(var o=0;e>o;o++)if(!t.moveNext())return!1}return t.moveNext()?(n.current=t.current,!0):(n.current=void 0,!1)}};return n}function t(r,e){var t,n={current:void 0,moveNext:function(){if(!t){t=r.getEnumerator();for(var o=0;t.moveNext();o++)if(!e(n.current=t.current,o))return!0;return n.current=void 0,!1}return t.moveNext()?(n.current=t.current,!0):(n.current=void 0,!1)}};return n}r.Enumerable.prototype.skip=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.skipWhile=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.skip=r.Enumerable.prototype.skip,r.List.prototype.skipWhile=r.Enumerable.prototype.skipWhile)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),n++,!(n>e)&&(o.current=void 0,!!t.moveNext()&&(o.current=t.current,!0))}};return o}function t(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),t.moveNext()&&e(t.current,n)?(n++,o.current=t.current,!0):(o.current=void 0,!1)}};return o}r.Enumerable.prototype.take=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.takeWhile=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.take=r.Enumerable.prototype.take,r.List.prototype.takeWhile=r.Enumerable.prototype.takeWhile)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t){var n,o=!1,u=[],i={current:void 0,moveNext:function(){if(o){if(null==n)return!1;u.push(n),n=r.selectorEnumerator(t(i.current))}else n=e.getEnumerator(),o=!0;for(;!(n&&n.moveNext()||u.length<1);)n=u.pop();return i.current=null==n?void 0:n.current,void 0!==i.current}};return i}function t(e,t,n){var o,u=!1,i=[],c={current:void 0,moveNext:function(){if(u){if(null==o)return!1;i.push(o),o=r.selectorEnumerator(t(c.current))}else o=e.getEnumerator(),u=!0;do{for(;!(o&&o.moveNext()||i.length<1);)o=i.pop();c.current=null==o?void 0:o.current}while(n(c.current));return void 0!==c.current}};return c}r.Enumerable.prototype.traverse=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.traverseUnique=function(e,n){var o=this,u=[],i=new r.Enumerable;return n?i.getEnumerator=function(){return t(o,e,function(r){return!!u.some(function(e){return n(r,e)})||(u.push(r),!1)})}:i.getEnumerator=function(){return t(o,e,function(r){return u.indexOf(r)>-1||(u.push(r),!1)})},i},r.List&&(r.List.prototype.traverse=r.Enumerable.prototype.traverse,r.List.prototype.traverseUnique=r.Enumerable.prototype.traverseUnique)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n){n=n||function(r,e){return r===e};var o,u,i=[],c={current:void 0,moveNext:function(){if(o||(o=r.en(e).distinct().getEnumerator()),c.current=void 0,!u&&o.moveNext())return i.push(c.current=o.current),!0;for(u=u||r.en(t).distinct().getEnumerator();u.moveNext();){for(var a=0,p=!1,s=i.length;s>a&&!p;a++)p=n(i[a],u.current);if(!p)return c.current=u.current,!0}return!1}};return c}r.Enumerable.prototype.union=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.union=r.Enumerable.prototype.union)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n={current:void 0,moveNext:function(){t||(t=r.getEnumerator());for(var o;t.moveNext();)if(e(o=t.current))return n.current=o,!0;return!1}};return n}r.Enumerable.prototype.where=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.List&&(r.List.prototype.where=r.Enumerable.prototype.where)}(exjs||(exjs={}));var exjs;!function(r){function e(e){var n=new r.Enumerable;return n.getEnumerator=function(){return t(e)},n}function t(r){var e=r.getEnumerator(),t={current:void 0,moveNext:void 0};return t.moveNext=function(){return e.moveNext()?(t.current=e.current,!0):(t.current=void 0,!1)},t}r.en=e}(exjs||(exjs={}));var ex=exjs.en,exjs;!function(r){function e(r,e,t){var n,o,u={current:void 0,moveNext:function(){return n||(n=r.getEnumerator()),o||(o=e.getEnumerator()),u.current=void 0,!(!n.moveNext()||!o.moveNext())&&(u.current=t(n.current,o.current),!0)}};return u}r.Enumerable.prototype.zip=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.zip=r.Enumerable.prototype.zip)}(exjs||(exjs={})),Array.prototype.clone||(Array.prototype.clone=function(){return this.slice(0)}),Array.prototype.contains||(Array.prototype.contains=function(val){return this.indexOf(val)!==-1}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var i=fromIndex||0,j=this.length;for(i;i>>0;if("function"!=typeof callback)throw new TypeError(callback+" is not a function");for(arguments.length>1&&(T=thisArg),A=new Array(len),k=0;k-1&&this.splice(index,1)},Array.prototype.removeAt=function(index){this.splice(index,1)},Math.clamp=function(value,min,max){return Math.min(Math.max(value,min),max)},Math.constrain=function(value,low,high){return Math.clamp(value,low,high)},Math.degreesToRadians=function(degrees){return Math.TAU*(degrees/360)},Math.distanceBetween=function(x1,y1,x2,y2){return Math.sqrt(Math.sq(x2-x1)+Math.sq(y2-y1))},Math.lerp=function(start,stop,amount){return start+(stop-start)*amount},Math.mag=function(a,b,c){return Math.sqrt(a*a+b*b+c*c)},Math.map=function(value,start1,stop1,start2,stop2){return start2+(stop2-start2)*((value-start1)/(stop1-start1))},Math.median=function(values){values.sort(function(a,b){return a-b});var half=Math.floor(values.length/2);return values.length%2?values[half]:(values[half-1]+values[half])/2},Math.normalise=function(num,min,max){return(num-min)/(max-min)},Math.radiansToDegrees=function(radians){return 360*radians/Math.TAU},Math.randomBetween=function(low,high){return high||(high=low,low=0),low>=high?low:low+(high-low)*Math.random()},Math.roundToDecimalPlace=function(num,dec){return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec)},Math.sq=function(n){return n*n},Math.TAU=2*Math.PI,Number.prototype.isInteger||(Number.prototype.isInteger=function(){return this%1===0}),"function"!=typeof Object.create&&(Object.create=function(o,props){function F(){}F.prototype=o;var result=new F;if("object"==typeof props)for(var prop in props)props.hasOwnProperty(prop)&&(result[prop]=props[prop].value);return result}),Object.keys||(Object.keys=function(){var hasOwnProperty=Object.prototype.hasOwnProperty,hasDontEnumBug=!{toString:null}.propertyIsEnumerable("toString"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;return function(obj){if("object"!=typeof obj&&"function"!=typeof obj||null===obj)throw new TypeError("Object.keys called on non-object");var result=[];for(var prop in obj)hasOwnProperty.call(obj,prop)&&result.push(prop);if(hasDontEnumBug)for(var i=0;i=65&&c<=90?"_"+s.toLowerCase():"__"+("000"+c.toString(16)).slice(-4)})},String.prototype.toFileName=function(){return this.replace(/[^a-z0-9]/gi,"_").toLowerCase()},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}),String.prototype.utf8_to_b64=function(){return window.btoa(unescape(encodeURIComponent(this)))};var HTTPStatusCode;!function(HTTPStatusCode){HTTPStatusCode.CONTINUE=100,HTTPStatusCode.SWITCHING_PROTOCOLS=101,HTTPStatusCode.PROCESSING=102,HTTPStatusCode.OK=200,HTTPStatusCode.CREATED=201,HTTPStatusCode.ACCEPTED=202,HTTPStatusCode.NON_AUTHORITATIVE_INFORMATION=203,HTTPStatusCode.NO_CONTENT=204,HTTPStatusCode.RESET_CONTENT=205,HTTPStatusCode.PARTIAL_CONTENT=206,HTTPStatusCode.MULTI_STATUS=207,HTTPStatusCode.MULTIPLE_CHOICES=300,HTTPStatusCode.MOVED_PERMANENTLY=301,HTTPStatusCode.MOVED_TEMPORARILY=302,HTTPStatusCode.SEE_OTHER=303,HTTPStatusCode.NOT_MODIFIED=304,HTTPStatusCode.USE_PROXY=305,HTTPStatusCode.TEMPORARY_REDIRECT=307,HTTPStatusCode.BAD_REQUEST=400,HTTPStatusCode.UNAUTHORIZED=401,HTTPStatusCode.PAYMENT_REQUIRED=402,HTTPStatusCode.FORBIDDEN=403,HTTPStatusCode.NOT_FOUND=404,HTTPStatusCode.METHOD_NOT_ALLOWED=405,HTTPStatusCode.NOT_ACCEPTABLE=406,HTTPStatusCode.PROXY_AUTHENTICATION_REQUIRED=407,HTTPStatusCode.REQUEST_TIME_OUT=408,HTTPStatusCode.CONFLICT=409,HTTPStatusCode.GONE=410,HTTPStatusCode.LENGTH_REQUIRED=411,HTTPStatusCode.PRECONDITION_FAILED=412,HTTPStatusCode.REQUEST_ENTITY_TOO_LARGE=413,HTTPStatusCode.REQUEST_URI_TOO_LARGE=414,HTTPStatusCode.UNSUPPORTED_MEDIA_TYPE=415,HTTPStatusCode.REQUESTED_RANGE_NOT_SATISFIABLE=416,HTTPStatusCode.EXPECTATION_FAILED=417,HTTPStatusCode.IM_A_TEAPOT=418,HTTPStatusCode.UNPROCESSABLE_ENTITY=422,HTTPStatusCode.LOCKED=423,HTTPStatusCode.FAILED_DEPENDENCY=424,HTTPStatusCode.UNORDERED_COLLECTION=425,HTTPStatusCode.UPGRADE_REQUIRED=426,HTTPStatusCode.PRECONDITION_REQUIRED=428,HTTPStatusCode.TOO_MANY_REQUESTS=429,HTTPStatusCode.REQUEST_HEADER_FIELDS_TOO_LARGE=431,HTTPStatusCode.INTERNAL_SERVER_ERROR=500,HTTPStatusCode.NOT_IMPLEMENTED=501,
+HTTPStatusCode.BAD_GATEWAY=502,HTTPStatusCode.SERVICE_UNAVAILABLE=503,HTTPStatusCode.GATEWAY_TIME_OUT=504,HTTPStatusCode.HTTP_VERSION_NOT_SUPPORTED=505,HTTPStatusCode.VARIANT_ALSO_NEGOTIATES=506,HTTPStatusCode.INSUFFICIENT_STORAGE=507,HTTPStatusCode.BANDWIDTH_LIMIT_EXCEEDED=509,HTTPStatusCode.NOT_EXTENDED=510,HTTPStatusCode.NETWORK_AUTHENTICATION_REQUIRED=511}(HTTPStatusCode||(HTTPStatusCode={})),function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.manifesto=f()}}(function(){var define;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o-1||this.externalResource.data["@context"].indexOf("/1.1/context.json")>-1||this.externalResource.data["@context"].indexOf("/1/context.json")>-1)&&(quality="native");else{var images=this.getImages();if(images&&images.length){var firstImage=images[0],resource=firstImage.getResource(),services=resource.getServices();if(width||(width=resource.getWidth()),services.length){var service=services[0];id=service.id,quality=Manifesto.Utils.getImageQuality(service.getProfile())}}if(!id)return"undefined"==typeof this.__jsonld.thumbnail?null:this.__jsonld.thumbnail}size=width+",";var uri=[id,region,size,rotation,quality+".jpg"].join("/");return uri},Canvas.prototype.getImages=function(){var images=[];if(!this.__jsonld.images)return images;for(var i=0;i1},Manifest.prototype.isPagingEnabled=function(){return this.getViewingHint().toString()===Manifesto.ViewingHint.PAGED.toString()},Manifest.prototype.getViewingDirection=function(){return this.getProperty("viewingDirection")?new Manifesto.ViewingDirection(this.getProperty("viewingDirection")):Manifesto.ViewingDirection.LEFTTORIGHT},Manifest.prototype.getViewingHint=function(){return this.getProperty("viewingHint")?new Manifesto.ViewingHint(this.getProperty("viewingHint")):Manifesto.ViewingHint.EMPTY},Manifest}(Manifesto.IIIFResource);Manifesto.Manifest=Manifest}(Manifesto||(Manifesto={}));var Manifesto,__extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)};!function(Manifesto){var Collection=function(_super){function Collection(jsonld,options){_super.call(this,jsonld,options),this.members=[],this._collections=null,this._manifests=null,jsonld.__collection=this}return __extends(Collection,_super),Collection.prototype.getCollections=function(){return this._collections?this._collections:this._collections=this.members.en().where(function(m){return m.isCollection()}).toArray()},Collection.prototype.getManifests=function(){return this._manifests?this._manifests:this._manifests=this.members.en().where(function(m){return m.isManifest()}).toArray()},Collection.prototype.getCollectionByIndex=function(collectionIndex){var collection=this.getCollections()[collectionIndex];return collection.options.index=collectionIndex,collection.load()},Collection.prototype.getManifestByIndex=function(manifestIndex){var manifest=this.getManifests()[manifestIndex];return manifest.options.index=manifestIndex,manifest.load()},Collection.prototype.getTotalCollections=function(){return this.getCollections().length},Collection.prototype.getTotalManifests=function(){return this.getManifests().length},Collection.prototype.getTotalMembers=function(){return this.members.length},Collection.prototype.getDefaultTree=function(){return _super.prototype.getDefaultTree.call(this),this.defaultTree.data.type=Manifesto.TreeNodeType.COLLECTION.toString(),this._parseManifests(this),this._parseCollections(this),Manifesto.Utils.generateTreeNodeIds(this.defaultTree),this.defaultTree},Collection.prototype._parseManifests=function(parentCollection){if(parentCollection.getManifests()&&parentCollection.getManifests().length)for(var i=0;i=0;i--){var canvas=this.getCanvasByIndex(i),label=Manifesto.TranslationCollection.getValue(canvas.getLabel(),this.options.locale);if(alphanumeric){var regExp=/^[a-zA-Z0-9]*$/;if(regExp.test(label))return label}else if(label)return label}return this.options.defaultLabel},Sequence.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},Sequence.prototype.getNextPageIndex=function(canvasIndex,pagingEnabled){var index;if(pagingEnabled){var indices=this.getPagedIndices(canvasIndex);index=this.getViewingDirection().toString()===Manifesto.ViewingDirection.RIGHTTOLEFT.toString()?indices[0]+1:_last(indices)+1}else index=canvasIndex+1;return index>this.getLastPageIndex()?-1:index},Sequence.prototype.getPagedIndices=function(canvasIndex,pagingEnabled){var indices=[];return pagingEnabled?(indices=this.isFirstCanvas(canvasIndex)||this.isLastCanvas(canvasIndex)?[canvasIndex]:canvasIndex%2?[canvasIndex,canvasIndex+1]:[canvasIndex-1,canvasIndex],this.getViewingDirection().toString()===Manifesto.ViewingDirection.RIGHTTOLEFT.toString()&&(indices=indices.reverse())):indices.push(canvasIndex),indices},Sequence.prototype.getPrevPageIndex=function(canvasIndex,pagingEnabled){var index;if(pagingEnabled){var indices=this.getPagedIndices(canvasIndex);index=this.getViewingDirection().toString()===Manifesto.ViewingDirection.RIGHTTOLEFT.toString()?_last(indices)-1:indices[0]-1}else index=canvasIndex-1;return index},Sequence.prototype.getStartCanvasIndex=function(){var startCanvas=this.getStartCanvas();if(startCanvas)for(var i=0;ithis.getTotalCanvases()-1},Sequence.prototype.isFirstCanvas=function(canvasIndex){return 0===canvasIndex},Sequence.prototype.isLastCanvas=function(canvasIndex){return canvasIndex===this.getTotalCanvases()-1},Sequence.prototype.isMultiCanvas=function(){return this.getTotalCanvases()>1},Sequence.prototype.isPagingEnabled=function(){return this.getViewingHint().toString()===Manifesto.ViewingHint.PAGED.toString()},Sequence.prototype.isTotalCanvasesEven=function(){return this.getTotalCanvases()%2===0},Sequence}(Manifesto.ManifestResource);Manifesto.Sequence=Sequence}(Manifesto||(Manifesto={}));var Manifesto,_isString=require("lodash.isstring");!function(Manifesto){var Deserialiser=function(){function Deserialiser(){}return Deserialiser.parse=function(manifest,options){return this.parseJson(JSON.parse(manifest),options)},Deserialiser.parseJson=function(json,options){var resource;switch(options&&options.navDate&&!isNaN(options.navDate.getTime())&&(json.navDate=options.navDate.toString()),json["@type"]){case"sc:Collection":resource=this.parseCollection(json,options);break;case"sc:Manifest":resource=this.parseManifest(json,options);break;default:return null}return resource.isLoaded=!0,resource},Deserialiser.parseCollection=function(json,options){var collection=new Manifesto.Collection(json,options);return options?collection.index=options.index||0:collection.index=0,this.parseCollections(collection,options),this.parseManifests(collection,options),this.parseMembers(collection,options),collection},Deserialiser.parseCollections=function(collection,options){var children=collection.__jsonld.collections;if(children)for(var i=0;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function byteLength(b64){return 3*b64.length/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;ilen2?len2:i+maxChunkLength));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;iMAX_LEN)throw new RangeError("size is too large");var enc=encoding,_fill=fill;void 0===_fill&&(enc=void 0,_fill=0);var buf=new Buffer(size);if("string"==typeof _fill)for(var fillBuf=new Buffer(_fill,enc),flen=fillBuf.length,i=-1;++iMAX_LEN)throw new RangeError("size is too large");return new Buffer(size)},exports.from=function(value,encodingOrOffset,length){if("function"==typeof Buffer.from&&(!global.Uint8Array||Uint8Array.from!==Buffer.from))return Buffer.from(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('"value" argument must not be a number');if("string"==typeof value)return new Buffer(value,encodingOrOffset);if("undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(1===arguments.length)return new Buffer(value);"undefined"==typeof offset&&(offset=0);var len=length;if("undefined"==typeof len&&(len=value.byteLength-offset),offset>=value.byteLength)throw new RangeError("'offset' is out of bounds");if(len>value.byteLength-offset)throw new RangeError("'length' is out of bounds");return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);return value.copy(out,0,0,value.length),out}if(value){if(Array.isArray(value)||"undefined"!=typeof ArrayBuffer&&value.buffer instanceof ArrayBuffer||"length"in value)return new Buffer(value);if("Buffer"===value.type&&Array.isArray(value.data))return new Buffer(value.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},exports.allocUnsafeSlow=function(size){if("function"==typeof Buffer.allocUnsafeSlow)return Buffer.allocUnsafeSlow(size);if("number"!=typeof size)throw new TypeError("size must be a number");if(size>=MAX_LEN)throw new RangeError("size is too large");return new SlowBuffer(size)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:5}],5:[function(require,module,exports){(function(global){"use strict";function typedArraySupport(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(length){return+length!=length&&(length=0),Buffer.alloc(+length)}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,isNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val=255&val,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&(encoding=String(encoding).toLowerCase(),"ucs2"===encoding||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}var i;if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;jremaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128===(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128===(192&secondByte)&&128===(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128===(192&secondByte)&&128===(192&thirdByte)&&128===(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,tempCodePoint>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint))}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("isarray");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),""},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;iremaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len,start<0&&(start=0)):start>len&&(start=len),end<0?(end+=len,end<0&&(end=0)):end>len&&(end=len),end0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?(255-this[offset]+1)*-1:this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,byteLength=0|byteLength,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},{}],9:[function(require,module,exports){var http=require("http"),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(params,cb){return params||(params={}),params.scheme="https",params.protocol="https:",http.request.call(this,params,cb)}},{http:49}],10:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],11:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],12:[function(require,module,exports){function isBuffer(obj){return!!obj.constructor&&"function"==typeof obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)}function isSlowBuffer(obj){return"function"==typeof obj.readFloatLE&&"function"==typeof obj.slice&&isBuffer(obj.slice(0,0))}module.exports=function(obj){return null!=obj&&(isBuffer(obj)||isSlowBuffer(obj)||!!obj._isBuffer)}},{}],13:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},{}],14:[function(require,module,exports){function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);++indexlength?0:length+start),end=void 0===end||end>length?length:+end||0,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var keys=require("lodash.keys"),MAX_SAFE_INTEGER=9007199254740991,baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor(),getLength=baseProperty("length");module.exports=baseEach},{"lodash.keys":31}],19:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function arraySome(array,predicate){for(var index=-1,length=array.length;++indexarrLength))return!1;for(;++index2?sources[length-2]:void 0,guard=length>2?sources[2]:void 0,thisArg=length>1?sources[length-1]:void 0;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:void 0,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?void 0:customizer,length=1);++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var reIsUint=/^\d+$/,MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=isIterateeCall},{}],24:[function(require,module,exports){(function(global){function checkGlobal(value){return value&&value.Object===Object?value:null}var objectTypes={"function":!0,object:!0},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType?exports:void 0,freeModule=objectTypes[typeof module]&&module&&!module.nodeType?module:void 0,freeGlobal=checkGlobal(freeExports&&freeModule&&"object"==typeof global&&global),freeSelf=checkGlobal(objectTypes[typeof self]&&self),freeWindow=checkGlobal(objectTypes[typeof window]&&window),thisGlobal=checkGlobal(objectTypes[typeof this]&&this),root=freeGlobal||freeWindow!==(thisGlobal&&thisGlobal.window)&&freeWindow||freeSelf||thisGlobal||Function("return this")();module.exports=root}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],25:[function(require,module,exports){function assignWith(object,source,customizer){for(var index=-1,props=keys(source),length=props.length;++index=lower?number:lower)),number}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toInteger(value){if(!value)return 0===value?value:0;if(value=toNumber(value),value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER}var remainder=value%1;return value===value?remainder?value-remainder:value:0}function toNumber(value){if(isObject(value)){var other=isFunction(value.valueOf)?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=value.replace(reTrim,"");var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}function toString(value){if("string"==typeof value)return value;if(null==value)return"";if(isSymbol(value))return Symbol?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function endsWith(string,target,position){string=toString(string),target="string"==typeof target?target:target+"";var length=string.length;return position=void 0===position?length:baseClamp(toInteger(position),0,length),position-=target.length,position>=0&&string.indexOf(target,position)==position}var root=require("lodash._root"),INFINITY=1/0,MAX_INTEGER=1.7976931348623157e308,NAN=NaN,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt,objectProto=Object.prototype,objectToString=objectProto.toString,Symbol=root.Symbol,symbolProto=Symbol?Symbol.prototype:void 0,symbolToString=Symbol?symbolProto.toString:void 0;module.exports=endsWith},{"lodash._root":24}],27:[function(require,module,exports){function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable;module.exports=isArguments},{}],28:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isNative(value){return null!=value&&(isFunction(value)?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value))}var arrayTag="[object Array]",funcTag="[object Function]",reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nativeIsArray=getNative(Array,"isArray"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};module.exports=isArray},{}],29:[function(require,module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}var stringTag="[object String]",objectProto=Object.prototype,objToString=objectProto.toString;module.exports=isString},{}],30:[function(require,module,exports){function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObjectLike(value){return!!value&&"object"==typeof value}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray},{}],31:[function(require,module,exports){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index0;++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;return iteratee=baseCallback(iteratee,thisArg,3),func(collection,iteratee)}var arrayMap=require("lodash._arraymap"),baseCallback=require("lodash._basecallback"),baseEach=require("lodash._baseeach"),isArray=require("lodash.isarray"),MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=map},{"lodash._arraymap":14,"lodash._basecallback":16,"lodash._baseeach":18,"lodash.isarray":28}],34:[function(require,module,exports){function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function pairs(object){object=toObject(object);for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index1)for(var i=1;i1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter=55296&&value<=56319&&counter65535&&(value-=65536,output+=stringFromCharCode(value>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function basicToDigit(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias;for(basic=input.lastIndexOf(delimiter),basic<0&&(basic=0),j=0;j=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index=inputLength&&error("invalid-input"),digit=basicToDigit(input.charCodeAt(index++)),(digit>=base||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(digitfloor(maxInt/baseMinusT)&&error("overflow"),w*=baseMinusT;out=output.length+1,bias=adapt(i-oldi,out,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(input=ucs2decode(input),inputLength=input.length,n=initialN,delta=0,bias=initialBias,j=0;j=n&¤tValuefloor((maxInt-delta)/handledCPCountPlusOne)&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;jmaxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(q= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;if(punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return punycode});else if(freeExports&&freeModule)if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);else root.punycode=punycode}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],39:[function(require,module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},{}],40:[function(require,module,exports){"use strict";function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,
+processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return nstr.length?str.length:n;if(ret+=nb===str.length?str:str.slice(0,n),n-=nb,0===n){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,0===n){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null,null===ret?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);!1!==ret||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1,increasedAwaitDrain=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var _i=0;_i-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream,internalUtil={deprecate:require("util-deprecate")};!function(){try{Stream=require("stream")}catch(_){}finally{Stream||(Stream=require("events").EventEmitter)}}();var Buffer=require("buffer").Buffer,bufferShim=require("buffer-shims");util.inherits(Writable,Stream);var Duplex;WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var Duplex;Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(this,require("_process"))},{"./_stream_duplex":42,_process:37,buffer:5,"buffer-shims":4,"core-util-is":7,events:8,inherits:11,"process-nextick-args":36,"util-deprecate":57}],47:[function(require,module,exports){"use strict";function BufferList(){this.head=null,this.tail=null,this.length=0}var bufferShim=(require("buffer").Buffer,require("buffer-shims"));module.exports=BufferList,BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return bufferShim.alloc(0);if(1===this.length)return this.head.data;for(var ret=bufferShim.allocUnsafe(n>>>0),p=this.head,i=0;p;)p.data.copy(ret,i),i+=p.data.length,p=p.next;return ret}},{buffer:5,"buffer-shims":4}],48:[function(require,module,exports){(function(process){var Stream=function(){try{return require("stream")}catch(_){}}();exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js"),!process.browser&&"disable"===process.env.READABLE_STREAM&&Stream&&(module.exports=Stream)}).call(this,require("_process"))},{"./lib/_stream_duplex.js":42,"./lib/_stream_passthrough.js":43,"./lib/_stream_readable.js":44,"./lib/_stream_transform.js":45,"./lib/_stream_writable.js":46,_process:37}],49:[function(require,module,exports){(function(global){var ClientRequest=require("./lib/request"),extend=require("xtend"),statusCodes=require("builtin-status-codes"),url=require("url"),http=exports;http.request=function(opts,cb){opts="string"==typeof opts?url.parse(opts):extend(opts);var defaultProtocol=global.location.protocol.search(/^https?:$/)===-1?"http:":"",protocol=opts.protocol||defaultProtocol,host=opts.hostname||opts.host,port=opts.port,path=opts.path||"/";host&&host.indexOf(":")!==-1&&(host="["+host+"]"),opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path,opts.method=(opts.method||"GET").toUpperCase(),opts.headers=opts.headers||{};var req=new ClientRequest(opts);return cb&&req.on("response",cb),req},http.get=function(opts,cb){var req=http.request(opts,cb);return req.end(),req},http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":51,"builtin-status-codes":6,url:55,xtend:58}],50:[function(require,module,exports){(function(global){function checkTypeSupport(type){try{return xhr.responseType=type,xhr.responseType===type}catch(e){}return!1}function isFunction(value){return"function"==typeof value}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream),exports.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),exports.blobConstructor=!0}catch(e){}var xhr=new global.XMLHttpRequest;xhr.open("GET",global.location.host?"/":"https://example.com");var haveArrayBuffer="undefined"!=typeof global.ArrayBuffer,haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=haveArrayBuffer&&checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=isFunction(xhr.overrideMimeType),exports.vbArray=isFunction(global.VBArray),xhr=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],51:[function(require,module,exports){(function(process,global,Buffer){function decideMode(preferBinary,useFetch){return capability.fetch&&useFetch?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&preferBinary?"arraybuffer":capability.vbArray&&preferBinary?"text:vbarray":"text"}function statusValid(xhr){try{var status=xhr.status;return null!==status&&0!==status}catch(e){return!1}}var capability=require("./capability"),inherits=require("inherits"),response=require("./response"),stream=require("readable-stream"),toArrayBuffer=require("to-arraybuffer"),IncomingMessage=response.IncomingMessage,rStates=response.readyStates,ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self),self._opts=opts,self._body=[],self._headers={},opts.auth&&self.setHeader("Authorization","Basic "+new Buffer(opts.auth).toString("base64")),Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name])});var preferBinary,useFetch=!0;if("disable-fetch"===opts.mode)useFetch=!1,preferBinary=!0;else if("prefer-streaming"===opts.mode)preferBinary=!1;else if("allow-wrong-content-type"===opts.mode)preferBinary=!capability.overrideMimeType;else{if(opts.mode&&"default"!==opts.mode&&"prefer-fast"!==opts.mode)throw new Error("Invalid value for opts.mode");preferBinary=!0}self._mode=decideMode(preferBinary,useFetch),self.on("finish",function(){self._onFinish()})};inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(name,value){var self=this,lowerName=name.toLowerCase();unsafeHeaders.indexOf(lowerName)===-1&&(self._headers[lowerName]={name:name,value:value})},ClientRequest.prototype.getHeader=function(name){var self=this;return self._headers[name.toLowerCase()].value},ClientRequest.prototype.removeHeader=function(name){var self=this;delete self._headers[name.toLowerCase()]},ClientRequest.prototype._onFinish=function(){var self=this;if(!self._destroyed){var body,opts=self._opts,headersObj=self._headers;if("POST"!==opts.method&&"PUT"!==opts.method&&"PATCH"!==opts.method||(body=capability.blobConstructor?new global.Blob(self._body.map(function(buffer){return toArrayBuffer(buffer)}),{type:(headersObj["content-type"]||{}).value||""}):Buffer.concat(self._body).toString()),"fetch"===self._mode){var headers=Object.keys(headersObj).map(function(name){return[headersObj[name].name,headersObj[name].value]});global.fetch(self._opts.url,{method:self._opts.method,headers:headers,body:body,mode:"cors",credentials:opts.withCredentials?"include":"same-origin"}).then(function(response){self._fetchResponse=response,self._connect()},function(reason){self.emit("error",reason)})}else{var xhr=self._xhr=new global.XMLHttpRequest;try{xhr.open(self._opts.method,self._opts.url,!0)}catch(err){return void process.nextTick(function(){self.emit("error",err)})}"responseType"in xhr&&(xhr.responseType=self._mode.split(":")[0]),"withCredentials"in xhr&&(xhr.withCredentials=!!opts.withCredentials),"text"===self._mode&&"overrideMimeType"in xhr&&xhr.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(headersObj).forEach(function(name){xhr.setRequestHeader(headersObj[name].name,headersObj[name].value)}),self._response=null,xhr.onreadystatechange=function(){switch(xhr.readyState){case rStates.LOADING:case rStates.DONE:self._onXHRProgress()}},"moz-chunked-arraybuffer"===self._mode&&(xhr.onprogress=function(){self._onXHRProgress()}),xhr.onerror=function(){self._destroyed||self.emit("error",new Error("XHR error"))};try{xhr.send(body)}catch(err){return void process.nextTick(function(){self.emit("error",err)})}}}},ClientRequest.prototype._onXHRProgress=function(){var self=this;statusValid(self._xhr)&&!self._destroyed&&(self._response||self._connect(),self._response._onXHRProgress())},ClientRequest.prototype._connect=function(){var self=this;self._destroyed||(self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode),self.emit("response",self._response))},ClientRequest.prototype._write=function(chunk,encoding,cb){var self=this;self._body.push(chunk),cb()},ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var self=this;self._destroyed=!0,self._response&&(self._response._destroyed=!0),self._xhr&&self._xhr.abort()},ClientRequest.prototype.end=function(data,encoding,cb){var self=this;"function"==typeof data&&(cb=data,data=void 0),stream.Writable.prototype.end.call(self,data,encoding,cb)},ClientRequest.prototype.flushHeaders=function(){},ClientRequest.prototype.setTimeout=function(){},ClientRequest.prototype.setNoDelay=function(){},ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer)},{"./capability":50,"./response":52,_process:37,buffer:5,inherits:11,"readable-stream":48,"to-arraybuffer":54}],52:[function(require,module,exports){(function(process,global,Buffer){var capability=require("./capability"),inherits=require("inherits"),stream=require("readable-stream"),rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},IncomingMessage=exports.IncomingMessage=function(xhr,response,mode){function read(){reader.read().then(function(result){if(!self._destroyed){if(result.done)return void self.push(null);self.push(new Buffer(result.value)),read()}})}var self=this;if(stream.Readable.call(self),self._mode=mode,self.headers={},self.rawHeaders=[],self.trailers={},self.rawTrailers=[],self.on("end",function(){process.nextTick(function(){self.emit("close")})}),"fetch"===mode){self._fetchResponse=response,self.url=response.url,self.statusCode=response.status,self.statusMessage=response.statusText;for(var header,_i,_it=response.headers[Symbol.iterator]();header=(_i=_it.next()).value,!_i.done;)self.headers[header[0].toLowerCase()]=header[1],self.rawHeaders.push(header[0],header[1]);var reader=response.body.getReader();read()}else{self._xhr=xhr,self._pos=0,self.url=xhr.responseURL,self.statusCode=xhr.status,self.statusMessage=xhr.statusText;var headers=xhr.getAllResponseHeaders().split(/\r?\n/);if(headers.forEach(function(header){var matches=header.match(/^([^:]+):\s*(.*)/);if(matches){var key=matches[1].toLowerCase();
+"set-cookie"===key?(void 0===self.headers[key]&&(self.headers[key]=[]),self.headers[key].push(matches[2])):void 0!==self.headers[key]?self.headers[key]+=", "+matches[2]:self.headers[key]=matches[2],self.rawHeaders.push(matches[1],matches[2])}}),self._charset="x-user-defined",!capability.overrideMimeType){var mimeType=self.rawHeaders["mime-type"];if(mimeType){var charsetMatch=mimeType.match(/;\s*charset=([^;])(;|$)/);charsetMatch&&(self._charset=charsetMatch[1].toLowerCase())}self._charset||(self._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){},IncomingMessage.prototype._onXHRProgress=function(){var self=this,xhr=self._xhr,response=null;switch(self._mode){case"text:vbarray":if(xhr.readyState!==rStates.DONE)break;try{response=new global.VBArray(xhr.responseBody).toArray()}catch(e){}if(null!==response){self.push(new Buffer(response));break}case"text":try{response=xhr.responseText}catch(e){self._mode="text:vbarray";break}if(response.length>self._pos){var newData=response.substr(self._pos);if("x-user-defined"===self._charset){for(var buffer=new Buffer(newData.length),i=0;iself._pos&&(self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos)))),self._pos=reader.result.byteLength)},reader.onload=function(){self.push(null)},reader.readAsArrayBuffer(response)}self._xhr.readyState===rStates.DONE&&"ms-stream"!==self._mode&&self.push(null)}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer)},{"./capability":50,_process:37,buffer:5,inherits:11,"readable-stream":48}],53:[function(require,module,exports){function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw new Error("Unknown encoding: "+encoding)}function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3,this.charLength=this.charReceived?3:0}var Buffer=require("buffer").Buffer,isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},StringDecoder=exports.StringDecoder=function(encoding){switch(this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(encoding),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(buffer){for(var charStr="";this.charLength;){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived=55296&&charCode<=56319)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);var end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived),charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},{buffer:5}],54:[function(require,module,exports){var Buffer=require("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array){if(0===buf.byteOffset&&buf.byteLength===buf.buffer.byteLength)return buf.buffer;if("function"==typeof buf.buffer.slice)return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength)}if(Buffer.isBuffer(buf)){for(var arrayCopy=new Uint8Array(buf.length),len=buf.length,i=0;i",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex127?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],"."===last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},{"./util":56,punycode:38,querystring:41}],56:[function(require,module,exports){"use strict";module.exports={isString:function(arg){return"string"==typeof arg},isObject:function(arg){return"object"==typeof arg&&null!==arg},isNull:function(arg){return null===arg},isNullOrUndefined:function(arg){return null==arg}}},{}],57:[function(require,module,exports){(function(global){function deprecate(fn,msg){function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}if(config("noDeprecation"))return fn;var warned=!1;return deprecated}function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=deprecate}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],58:[function(require,module,exports){function extend(){for(var target={},i=0;i0&&msie<11)if(9===msie){var settings={url:that._options.iiifResourceUri,type:"GET",dataType:"jsonp",jsonp:"callback",jsonpCallback:"manifestCallback"};$.ajax(settings),window.manifestCallback=function(json){that._loaded(that,JSON.stringify(json),resolve,reject)}}else 10===msie&&$.getJSON(that._options.iiifResourceUri,function(json){that._loaded(that,JSON.stringify(json),resolve,reject)});else manifesto.loadManifest(that._options.iiifResourceUri).then(function(json){that._loaded(that,json,resolve,reject)})})},Bootstrapper.prototype._loaded=function(bootstrapper,json,resolve,reject){var iiifResource=manifesto.create(json,{locale:bootstrapper._options.locale});if(bootstrapper._options.iiifResource||(bootstrapper._options.iiifResource=iiifResource),iiifResource.getIIIFResourceType().toString()===manifesto.IIIFResourceType.collection().toString()){var collections=iiifResource.getCollections();collections&&collections.length?iiifResource.getCollectionByIndex(bootstrapper._options.collectionIndex).then(function(collection){collection||reject("Collection index not found"),0===collection.getTotalManifests()&&0===bootstrapper._options.manifestIndex&&collection.getTotalCollections()>0&&(bootstrapper._options.collectionIndex=0,bootstrapper._options.iiifResourceUri=collection.id,bootstrapper.bootstrap()),collection.getManifestByIndex(bootstrapper._options.manifestIndex).then(function(manifest){bootstrapper._options.manifest=manifest;var helper=new Manifold.Helper(bootstrapper._options);resolve(helper)})}):iiifResource.getManifestByIndex(bootstrapper._options.manifestIndex).then(function(manifest){bootstrapper._options.manifest=manifest;var helper=new Manifold.Helper(bootstrapper._options);resolve(helper)})}else{bootstrapper._options.manifest=iiifResource;var helper=new Manifold.Helper(bootstrapper._options);resolve(helper)}},Bootstrapper.prototype._msieversion=function(){var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");return msie>0?parseInt(ua.substring(msie+5,ua.indexOf(".",msie))):0},Bootstrapper}();Manifold.Bootstrapper=Bootstrapper}(Manifold||(Manifold={}));var Manifold;!function(Manifold){var ExternalResource=function(){function ExternalResource(resource,dataUriFunc){this.isResponseHandled=!1,resource.externalResource=this,this.dataUri=dataUriFunc(resource),this._parseAuthServices(resource)}return ExternalResource.prototype._parseAuthServices=function(resource){this.clickThroughService=manifesto.Utils.getService(resource,manifesto.ServiceProfile.clickThrough().toString()),this.loginService=manifesto.Utils.getService(resource,manifesto.ServiceProfile.login().toString()),this.restrictedService=manifesto.Utils.getService(resource,manifesto.ServiceProfile.restricted().toString()),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(manifesto.ServiceProfile.logout().toString()),this.tokenService=this.clickThroughService.getService(manifesto.ServiceProfile.token().toString())):this.loginService?(this.logoutService=this.loginService.getService(manifesto.ServiceProfile.logout().toString()),this.tokenService=this.loginService.getService(manifesto.ServiceProfile.token().toString())):this.restrictedService&&(this.logoutService=this.restrictedService.getService(manifesto.ServiceProfile.logout().toString()),this.tokenService=this.restrictedService.getService(manifesto.ServiceProfile.token().toString()))},ExternalResource.prototype.isAccessControlled=function(){return!!(this.clickThroughService||this.loginService||this.restrictedService)},ExternalResource.prototype.hasServiceDescriptor=function(){return this.dataUri.endsWith("info.json")},ExternalResource.prototype.getData=function(accessToken){var that=this;return that.data={},new Promise(function(resolve,reject){var type="GET";if(!that.hasServiceDescriptor()){if(!that.isAccessControlled())return that.status=HTTPStatusCode.OK,void resolve(that);type="HEAD"}$.ajax({url:that.dataUri,type:type,dataType:"json",beforeSend:function(xhr){accessToken&&xhr.setRequestHeader("Authorization","Bearer "+accessToken.accessToken)}}).done(function(data){if(data){var uri=unescape(data["@id"]);that.data=data,that._parseAuthServices(that.data),uri.endsWith("/info.json")&&(uri=uri.substr(0,uri.lastIndexOf("/")));var dataUri=that.dataUri;dataUri.endsWith("/info.json")&&(dataUri=dataUri.substr(0,dataUri.lastIndexOf("/"))),uri!==dataUri&&that.loginService?that.status=HTTPStatusCode.MOVED_TEMPORARILY:that.status=HTTPStatusCode.OK,resolve(that)}else that.status=HTTPStatusCode.OK,resolve(that)}).fail(function(error){that.status=error.status,that.error=error,error.responseJSON&&that._parseAuthServices(error.responseJSON),resolve(that)})})},ExternalResource}();Manifold.ExternalResource=ExternalResource}(Manifold||(Manifold={}));var Manifold;!function(Manifold){var Helper=function(){function Helper(options){this.options=options,this.iiifResource=this.options.iiifResource,this.iiifResourceUri=this.options.iiifResourceUri,this.manifest=this.options.manifest,this.collectionIndex=this.options.collectionIndex||0,this.manifestIndex=this.options.manifestIndex||0,this.sequenceIndex=this.options.sequenceIndex||0,this.canvasIndex=this.options.canvasIndex||0}return Helper.prototype.getAutoCompleteService=function(){var service=this.getSearchWithinService();return service?service.getService(manifesto.ServiceProfile.autoComplete()):null},Helper.prototype.getAttribution=function(){return Manifesto.TranslationCollection.getValue(this.manifest.getAttribution())},Helper.prototype.getCanvases=function(){return this.getCurrentSequence().getCanvases()},Helper.prototype.getCanvasById=function(id){return this.getCurrentSequence().getCanvasById(id)},Helper.prototype.getCanvasesById=function(ids){for(var canvases=[],i=0;i '},metadataItem=new Manifesto.MetadataItem(this.options.locale);metadataItem.parse(item),metadataItem.isRootLevel=!0,manifestGroup.addItem(metadataItem)}return metadataGroups.push(manifestGroup),options?this._parseMetadataOptions(options,metadataGroups):metadataGroups},Helper.prototype._parseMetadataOptions=function(options,metadataGroups){var sequence=this.getCurrentSequence(),sequenceMetadata=sequence.getMetadata();if(sequenceMetadata&&sequenceMetadata.length){var sequenceGroup=new Manifold.MetadataGroup(sequence);sequenceGroup.addMetadata(sequenceMetadata),metadataGroups.push(sequenceGroup)}if(options.range){var rangeGroups=this._getRangeMetadata([],options.range);rangeGroups=rangeGroups.reverse(),metadataGroups=metadataGroups.concat(rangeGroups)}if(options.canvases&&options.canvases.length)for(var i=0;i0},Helper.prototype.isBottomToTop=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.bottomToTop().toString()},Helper.prototype.isCanvasIndexOutOfRange=function(index){return this.getCurrentSequence().isCanvasIndexOutOfRange(index)},Helper.prototype.isContinuous=function(){return this.getViewingHint().toString()===manifesto.ViewingHint.continuous().toString()},Helper.prototype.isFirstCanvas=function(index){return"undefined"!=typeof index?this.getCurrentSequence().isFirstCanvas(index):this.getCurrentSequence().isFirstCanvas(this.canvasIndex)},Helper.prototype.isHorizontallyAligned=function(){return this.isLeftToRight()||this.isRightToLeft()},Helper.prototype.isLastCanvas=function(index){return"undefined"!=typeof index?this.getCurrentSequence().isLastCanvas(index):this.getCurrentSequence().isLastCanvas(this.canvasIndex)},Helper.prototype.isLeftToRight=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.leftToRight().toString()},Helper.prototype.isMultiCanvas=function(){return this.getCurrentSequence().isMultiCanvas()},Helper.prototype.isMultiSequence=function(){return this.manifest.isMultiSequence()},Helper.prototype.isPaged=function(){return this.getViewingHint().toString()===manifesto.ViewingHint.paged().toString()},Helper.prototype.isPagingAvailable=function(){return this.isPagingEnabled()&&this.getTotalCanvases()>2},Helper.prototype.isPagingEnabled=function(){return this.manifest.isPagingEnabled()||this.getCurrentSequence().isPagingEnabled()},Helper.prototype.isRightToLeft=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.rightToLeft().toString()},Helper.prototype.isTopToBottom=function(){return this.getViewingDirection().toString()===manifesto.ViewingDirection.topToBottom().toString()},Helper.prototype.isTotalCanvasesEven=function(){return this.getCurrentSequence().isTotalCanvasesEven()},Helper.prototype.isUIEnabled=function(name){var uiExtensions=this.manifest.getService(manifesto.ServiceProfile.uiExtensions());if(uiExtensions){var disableUI=uiExtensions.getProperty("disableUI");if(disableUI&&(disableUI.contains(name)||disableUI.contains(name.toLowerCase())))return!1}return!0},Helper.prototype.isVerticallyAligned=function(){return this.isTopToBottom()||this.isBottomToTop()},Helper.prototype.createDateNodes=function(rootNode,nodes){for(var i=0;i=n.data.startYear&&year<=n.data.endYear)return n}return null},Helper.prototype.getMonthNode=function(yearNode,month){for(var i=0;i0&&this.getAllSelectedCanvases().length===this.canvases.length},MultiSelectState.prototype.allRangesSelected=function(){return this.ranges.length>0&&this.getAllSelectedRanges().length===this.ranges.length},MultiSelectState.prototype.allSelected=function(){return this.allRangesSelected()&&this.allCanvasesSelected()},MultiSelectState.prototype.getAll=function(){return this.canvases.concat(this.ranges)},MultiSelectState.prototype.getAllSelectedCanvases=function(){return this.canvases.en().where(function(c){return c.multiSelected}).toArray()},MultiSelectState.prototype.getAllSelectedRanges=function(){return this.ranges.en().where(function(r){return r.multiSelected}).toArray()},MultiSelectState.prototype.getCanvasById=function(id){return this.canvases.en().where(function(c){return c.id===id}).first()},MultiSelectState.prototype.getCanvasesByIds=function(ids){for(var canvases=[],i=0;i'+label+""},UriLabeller}();Manifold.UriLabeller=UriLabeller}(Manifold||(Manifold={}))},{}]},{},[1])(1)}),function(t,e,o){"use strict";function r(t,e,r,p){r=r||"width";var n,l,m,c=(e.match(s)||[])[2],f="px"===c?1:d[c+"toPx"],u=/r?em/i;if(f||u.test(c)&&!p)t=f?t:"rem"===c?i:"fontSize"===r?t.parentNode||t:t,f=f||parseFloat(a(t,"fontSize")),m=parseFloat(e)*f;else{n=t.style,l=n[r];try{n[r]=e}catch(x){return 0}m=n[r]?parseFloat(a(t,r)):0,n[r]=l!==o?l:null}return m}function a(t,e){var o,n,i,l,d,c=/^top|bottom/,f=["paddingTop","paddingBottom","borderTop","borderBottom"],u=4;if(o=m?m(t)[e]:(n=t.style["pixel"+e.charAt(0).toUpperCase()+e.slice(1)])?n+"px":"fontSize"===e?r(t,"1em","left",1)+"px":t.currentStyle[e],i=(o.match(s)||[])[2],"%"===i&&p)if(c.test(e)){for(l=(d=t.parentNode||t).offsetHeight;u--;)l-=parseFloat(a(d,f[u]));o=parseFloat(o)/100*l+"px"}else o=r(t,o);else("auto"===o||i&&"px"!==i)&&m?o=0:i&&"px"!==i&&!m&&(o=r(t,o)+"px");return o}var p,n=e.createElement("test"),i=e.documentElement,l=e.defaultView,m=l&&l.getComputedStyle,s=/^(-?[\d+\.\-]+)([a-z]+|%)$/i,d={},c=[1/25.4,1/2.54,1/72,1/6],f=["mm","cm","pt","pc","in","mozmm"],u=6;for(i.appendChild(n),m&&(n.style.marginTop="1%",p="1%"===m(n).marginTop);u--;)d[f[u]+"toPx"]=c[u]?c[u]*d.inToPx:r(n,"1"+f[u]);i.removeChild(n),n=o,t.Length={toPx:r}}(this,this.document);var Utils;!function(Utils){var Async=function(){function Async(){}return Async.waitFor=function(test,successCallback,failureCallback,interval,maxTries,numTries){interval||(interval=200),maxTries||(maxTries=100),numTries||(numTries=0),numTries+=1,numTries>maxTries?failureCallback&&failureCallback():test()?successCallback():setTimeout(function(){Async.waitFor(test,successCallback,failureCallback,interval,maxTries,numTries)},interval)},Async}();Utils.Async=Async}(Utils||(Utils={}));var Utils;!function(Utils){var Bools=function(){function Bools(){}return Bools.getBool=function(val,defaultVal){return null===val||"undefined"==typeof val?defaultVal:val},Bools}();Utils.Bools=Bools}(Utils||(Utils={}));var Utils;!function(Utils){var Clipboard=function(){function Clipboard(){}return Clipboard.copy=function(text){var $tempDiv=$(""),brRegex=/
/gi;text=text.replace(brRegex,"\n"),$("body").append($tempDiv),$tempDiv.append(text);var $tempInput=$("
\
');
this._$metadataItemValueTemplate = $('
');
+ this._$metadataItemURIValueTemplate = $(' ');
this._$copyTextTemplate = $('\
' + this.options.content.copiedToClipboard + '
\
');
@@ -282,7 +283,8 @@ var IIIFComponents;
var $metadataItem = this._$metadataItemTemplate.clone();
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
- var label = item.getLabel();
+ var originalLabel = item.getLabel();
+ var label = originalLabel;
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
@@ -306,29 +308,50 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var value;
var $value;
- if (this.options.showAllLanguages && item.value && item.value.length > 1) {
- for (var i = 0; i < item.value.length; i++) {
- var translation = item.value[i];
- $value = this._buildMetadataItemValue(translation.value, translation.locale);
- $values.append($value);
- }
+ // if the value is a URI
+ if (originalLabel && originalLabel.toLowerCase() === "license") {
+ $value = this._buildMetadataItemURIValue(item.value[0].value);
+ $values.append($value);
}
else {
- $value = this._buildMetadataItemValue(item.getValue(), this._getItemLocale(item));
- $values.append($value);
+ if (this.options.showAllLanguages && item.value && item.value.length > 1) {
+ // display all values in each locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ else {
+ var itemLocale = this._getItemLocale(item);
+ var valueFound = false;
+ // display all values in the item's locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ if (itemLocale === translation.locale) {
+ valueFound = true;
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ // if no values were found in the current locale, default to the first.
+ if (!valueFound) {
+ var translation = item.value[0];
+ if (translation) {
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ }
}
- if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $value.text() && $label.text()) {
- this._addCopyButton($metadataItem, $label);
+ if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $label.text()) {
+ this._addCopyButton($metadataItem, $label, $values);
}
return $metadataItem;
};
MetadataComponent.prototype._getItemLocale = function (item) {
- if (item.value && item.value.length) {
- return item.value[0].locale;
- }
- else {
- return item.defaultLocale || this.options.helper.options.locale;
- }
+ // the item's label locale takes precedence
+ return (item.label.length && item.label[0].locale) ? item.label[0].locale : item.defaultLocale || this.options.helper.options.locale;
};
MetadataComponent.prototype._buildMetadataItemValue = function (value, locale) {
value = this._sanitize(value);
@@ -342,6 +365,13 @@ var IIIFComponents;
}
return $value;
};
+ MetadataComponent.prototype._buildMetadataItemURIValue = function (value) {
+ value = this._sanitize(value);
+ var $value = this._$metadataItemURIValueTemplate.clone();
+ $value.prop('href', value);
+ $value.text(value);
+ return $value;
+ };
MetadataComponent.prototype._addReadingDirection = function ($elem, locale) {
locale = Manifesto.Utils.getInexactLocale(locale);
var rtlLanguages = this._readCSV(this.options.rtlLanguageCodes);
@@ -351,7 +381,7 @@ var IIIFComponents;
$elem.addClass('rtl');
}
};
- MetadataComponent.prototype._addCopyButton = function ($elem, $header) {
+ MetadataComponent.prototype._addCopyButton = function ($elem, $header, $values) {
var $copyBtn = this._$copyTextTemplate.clone();
var $copiedText = $copyBtn.children();
$header.append($copyBtn);
@@ -370,20 +400,13 @@ var IIIFComponents;
});
}
var that = this;
+ var originalValue = $values.text();
$copyBtn.on('click', function (e) {
- var $this = $(this);
- var $item = $this.closest('.item');
- that._copyItemValues($this, $item);
+ that._copyItemValues($copyBtn, originalValue);
});
};
- MetadataComponent.prototype._copyItemValues = function ($copyButton, $item) {
- var $values = $item.find('.value');
- var values = "";
- for (var i = 0; i < $values.length; i++) {
- var value = $($values[i]).text();
- values.length ? values += '\n' + value : values += value;
- }
- Utils.Clipboard.copy(values);
+ MetadataComponent.prototype._copyItemValues = function ($copyButton, originalValue) {
+ Utils.Clipboard.copy(originalValue);
var $copiedText = $copyButton.find('.copiedText');
$copiedText.show();
setTimeout(function () {
diff --git a/dist/uv-1.8.38/lib/iiif-tree-component.js b/dist/uv-2.0.0/lib/iiif-tree-component.js
similarity index 95%
rename from dist/uv-1.8.38/lib/iiif-tree-component.js
rename to dist/uv-2.0.0/lib/iiif-tree-component.js
index 996b13ef8..40449ee5f 100644
--- a/dist/uv-1.8.38/lib/iiif-tree-component.js
+++ b/dist/uv-2.0.0/lib/iiif-tree-component.js
@@ -1,4 +1,4 @@
-// iiif-tree-component v1.0.1 https://github.com/viewdir/iiif-tree-component#readme
+// iiif-tree-component v1.0.7 https://github.com/viewdir/iiif-tree-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifTreeComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;omwy o wybodaeth"}},"shareDialogue":{"options":{"embedTemplate":"
\n","instructionsEnabled":false,"shareFrameEnabled":true},"content":{"customSize":"dewisol","embed":"Ymgorffori","embedInstructions":"Er mwyn ymgorffori'r eitem hon ar eich gwefan, copïwch a gosodwch y cod isod.","height":"Hyd","iiif":"Maniffest IIIF","share":"Rhannu","shareInstructions":"Er mwyn rhannu'r eitem hon, copïwch y URL isod.","size":"Maint:","width":"Lled"}},"clickThroughDialogue":{"content":{"viewTerms":"Darllenwch y Telerau a'r Amodau Llawn"}},"loginDialogue":{"content":{"login":"Mewngofnodi","logout":"Allgofnodi","cancel":"Canslo"}},"mobileFooterPanel":{"content":{"rotateRight":"Cylchdroi i'r dde","moreInfo":"Mwy o Wybodaeth","zoomIn":"Closio","zoomOut":"Gwrthglosio"}},"restrictedDialogue":{"content":{"cancel":"Canslo"}}},"localisation":{"label":"Cymraeg","locales":[{"name":"cy-GB","label":"Cymraeg"},{"name":"en-GB","label":"English (GB)"}]},"content":{"authCORSError":"Mae angen diweddaru'ch porwr er mwyn galluogi rhannu adnoddau traws-safle.","authorisationFailedMessage":"Ni lwyddoch i fewngofnodi. Rhowch gynnig arni eto.","canvasIndexOutOfRange":"Canfas yn rhy fawr i'w arddangos (ceisiwch eto)","degradedResourceMessage":"Mewngofnodwch i weld ansawdd uchel.","degradedResourceLogin":"Mewngofnodi","forbiddenResourceMessage":"Nid yw'ch hawliau mynediad presennol yn ddigonol i weld y ddelwedd hon","termsOfUse":"Telerau Defnydd"}}
\ No newline at end of file
diff --git a/dist/uv-2.0.0/lib/uv-seadragon-extension.en-GB.config.json b/dist/uv-2.0.0/lib/uv-seadragon-extension.en-GB.config.json
new file mode 100644
index 000000000..463289808
--- /dev/null
+++ b/dist/uv-2.0.0/lib/uv-seadragon-extension.en-GB.config.json
@@ -0,0 +1 @@
+{"options":{"allowStealFocus":false,"bookmarkThumbHeight":150,"bookmarkThumbWidth":90,"dropEnabled":true,"footerPanelEnabled":true,"headerPanelEnabled":true,"leftPanelEnabled":true,"limitLocales":false,"multiSelectionMimeType":"application/zip","navigatorEnabled":true,"openTemplate":"http://universalviewer.io?manifest={0}","overrideFullScreen":false,"pagingEnabled":true,"pagingOptionEnabled":true,"pessimisticAccessControl":false,"preserveViewport":false,"rightPanelEnabled":true,"saveUserSettings":false,"clickToZoomEnabled":true,"searchWithinEnabled":true,"termsOfUseEnabled":false,"theme":"uv-en-GB-theme","tokenStorage":"session","useArrowKeysToNavigate":false,"zoomToSearchResultEnabled":true},"modules":{"contentLeftPanel":{"options":{"defaultToTreeEnabled":false,"defaultToTreeIfGreaterThan":0,"elideCount":40,"expandFullEnabled":true,"galleryThumbChunkedResizingThreshold":400,"galleryThumbHeight":320,"galleryThumbLoadPadding":3,"galleryThumbWidth":200,"oneColThumbHeight":320,"oneColThumbWidth":200,"pageModeEnabled":true,"panelAnimationDuration":250,"panelCollapsedWidth":30,"panelExpandedWidth":255,"panelOpen":true,"tabOrder":"","thumbsEnabled":true,"thumbsExtraHeight":8,"thumbsImageFadeInDuration":300,"thumbsLoadRange":15,"treeEnabled":true,"twoColThumbHeight":150,"twoColThumbWidth":90},"content":{"collapse":"Collapse Contents","collapseFull":"Collapse Gallery","date":"date","expand":"Expand Contents","expandFull":"Expand Gallery","index":"Index","searchResult":"{0} search result","searchResults":"{0} search results","sortBy":"Sort By:","thumbnails":"Thumbnails","title":"Contents","volume":"volume"}},"dialogue":{"content":{"close":"Close"}},"downloadDialogue":{"options":{"confinedImageSize":1000,"currentViewDisabledPercentage":90,"maxImageWidth":5000,"optionsExplanatoryTextEnabled":false,"selectionEnabled":false},"content":{"currentViewAsJpg":"Current view {0} x {1}px (jpg)","currentViewAsJpgExplanation":"Opens in a new window","download":"Download","downloadSelection":"Download Selection","downloadSelectionExplanation":"Opens a dialogue to select which pages to download.","editSettings":"Edit Settings","entireDocument":"Entire document ({0})","entireFileAsOriginal":"Entire file ({0})","noneAvailable":"No download options are available.","pagingNote":"Please turn off Two Page View for additional options.","preview":"Preview","title":"Download","wholeImageHighRes":"Whole image {0} x {1}px ({2})","wholeImageHighResExplanation":"Opens in a new window.","wholeImagesHighRes":"Whole images ({0})","wholeImagesHighResExplanation":"Opens in two new windows.","wholeImageLowResAsJpg":"Whole image {0} x {1}px (jpg)","wholeImageLowResAsJpgExplanation":"Opens in a new window."}},"footerPanel":{"options":{"bookmarkEnabled":false,"downloadEnabled":true,"embedEnabled":false,"feedbackEnabled":false,"fullscreenEnabled":true,"minimiseButtons":true,"moreInfoEnabled":true,"openEnabled":false,"printEnabled":false,"shareEnabled":true},"content":{"bookmark":"Add to bookmarks","download":"Download","embed":"Embed","feedback":"Feedback","exitFullScreen":"Exit Full Screen","fullScreen":"Full Screen","open":"Open","share":"Share"}},"genericDialogue":{"content":{"emptyValue":"please enter a value.","invalidNumber":"Please enter a valid number.","noMatches":"No matches were found.","ok":"OK","pageNotFound":"This item does not contain a page with the number you entered. Try switching the numbering mode to 'image'.","refresh":"Refresh"}},"headerPanel":{"options":{"localeToggleEnabled":false,"settingsButtonEnabled":true}},"helpDialogue":{"content":{"text":"placeholder text","title":"Help"}},"moreInfoRightPanel":{"options":{"canvasDisplayOrder":"","canvasExclude":"","copyToClipboardEnabled":false,"manifestDisplayOrder":"","manifestExclude":"","panelAnimationDuration":250,"panelCollapsedWidth":30,"panelExpandedWidth":255,"panelOpen":false,"rtlLanguageCodes":"ar, ara, dv, div, he, heb, ur, urd","showAllLanguages":false,"textLimit":4,"textLimitType":"lines"},"content":{"attribution":"Attribution","collapse":"Collapse Information","collapseFull":"Collapse Gallery","description":"Description","expand":"Expand Information","expandFull":"Expand Gallery","holdingText":"Your module goes here!","less":"less","license":"License","logo":"Logo","more":"more","noData":"No data to display","page":"Page","title":"More Information","manifestHeader":"About the item","canvasHeader":"About the image","copyToClipboard":"Copy to clipboard","copiedToClipboard":"Copied to clipboard"}},"multiSelectDialogue":{"options":{"galleryThumbChunkedResizingEnabled":true,"galleryThumbChunkedResizingThreshold":400,"galleryThumbHeight":320,"galleryThumbLoadPadding":3,"galleryThumbWidth":200,"pageModeEnabled":true},"content":{"select":"Download","selectAll":"Select All","title":"Select Pages for Download"}},"pagingHeaderPanel":{"options":{"autoCompleteBoxEnabled":true,"galleryButtonEnabled":true,"imageSelectionBoxEnabled":false,"pageModeEnabled":false,"pagingToggleEnabled":true},"content":{"close":"Close","emptyValue":"Please enter a value","first":"First","firstImage":"First Image","firstPage":"First Page","folio":"Folio","gallery":"Gallery","go":"Go","help":"Help","image":"Image","last":"Last","lastImage":"Last Image","lastPage":"Last Page","next":"Next","nextImage":"Next Image","nextPage":"Next Page","of":"of {0}","oneUp":"Single page view","page":"Page","previous":"Previous","previousImage":"Previous Image","previousPage":"Previous Page","settings":"Settings","twoUp":"Two page view"}},"seadragonCenterPanel":{"options":{"animationTime":0.15,"autoHideControls":true,"attributionEnabled":true,"blendTime":0,"constrainDuringPan":false,"controlsFadeAfterInactive":1500,"controlsFadeDelay":250,"controlsFadeLength":250,"defaultZoomLevel":0,"immediateRender":false,"maxZoomPixelRatio":1.25,"navigatorPosition":"BOTTOM_RIGHT","pageGap":50,"showHomeControl":false,"trimAttributionCount":150,"visibilityRatio":0.5},"content":{"attribution":"Attribution","goHome":"Go Home","imageUnavailable":"Image Unavailable","next":"Next","previous":"Previous","rotateRight":"Rotate Right","zoomIn":"Zoom In","zoomOut":"Zoom Out"}},"searchFooterPanel":{"options":{"elideDetailsTermsCount":20,"elideResultsTermsCount":10,"pageModeEnabled":true,"positionMarkerEnabled":true},"content":{"clearSearch":"Clear","defaultLabel":"-","displaying":"{0} {1} of {2}","enterKeyword":"Enter Keyword","image":"image","imageCaps":"Image","instanceFound":"1 instance of '{0}' found","instancesFound":"{0} instances of '{1}' found","nextResult":"Next Result","page":"page","pageCaps":"Page","previousResult":"Previous Result","print":"Print","resultFoundFor":"result found for","resultsFoundFor":"results found for","searchWithin":"Search within this item:"}},"settingsDialogue":{"content":{"locale":"Locale","navigatorEnabled":"Navigator Enabled","clickToZoomEnabled":"Mouse Click To Zoom","pagingEnabled":"Two Page View","preserveViewport":"Preserve Zoom","title":"Settings","website":"more info "}},"shareDialogue":{"options":{"embedTemplate":"
\n","instructionsEnabled":false,"shareFrameEnabled":true},"content":{"customSize":"custom","embed":"Embed","embedInstructions":"To embed this item in your own website, copy and paste the code below.","height":"Height","iiif":"IIIF Manifest","share":"Share","shareInstructions":"To share this item, copy the URL below.","size":"Size:","width":"Width"}},"clickThroughDialogue":{"content":{"viewTerms":"Read Full Terms and Conditions"}},"loginDialogue":{"content":{"login":"Login","logout":"Logout","cancel":"Cancel"}},"mobileFooterPanel":{"content":{"rotateRight":"Rotate Right","moreInfo":"More Information","zoomIn":"Zoom In","zoomOut":"Zoom Out"}},"restrictedDialogue":{"content":{"cancel":"Cancel"}}},"localisation":{"label":"English (GB)","locales":[{"name":"cy-GB","label":"Cymraeg"},{"name":"en-GB","label":"English (GB)"}]},"content":{"authCORSError":"Your browser does not support CORS, please upgrade to view this content.","authorisationFailedMessage":"Your log-in attempt did not appear to be successful. Please try again.","canvasIndexOutOfRange":"Canvas index out of range.","degradedResourceMessage":"Please log in to view at full quality.","degradedResourceLogin":"log in","forbiddenResourceMessage":"Your current access rights are insufficient to view this image","termsOfUse":"Terms of Use"}}
\ No newline at end of file
diff --git a/dist/uv-1.8.38/lib/uv-virtex-extension-dependencies.js b/dist/uv-2.0.0/lib/uv-virtex-extension-dependencies.js
similarity index 100%
rename from dist/uv-1.8.38/lib/uv-virtex-extension-dependencies.js
rename to dist/uv-2.0.0/lib/uv-virtex-extension-dependencies.js
diff --git a/dist/uv-1.8.38/lib/uv-virtex-extension.cy-GB.config.json b/dist/uv-2.0.0/lib/uv-virtex-extension.cy-GB.config.json
similarity index 100%
rename from dist/uv-1.8.38/lib/uv-virtex-extension.cy-GB.config.json
rename to dist/uv-2.0.0/lib/uv-virtex-extension.cy-GB.config.json
diff --git a/dist/uv-1.8.38/lib/uv-virtex-extension.en-GB.config.json b/dist/uv-2.0.0/lib/uv-virtex-extension.en-GB.config.json
similarity index 100%
rename from dist/uv-1.8.38/lib/uv-virtex-extension.en-GB.config.json
rename to dist/uv-2.0.0/lib/uv-virtex-extension.en-GB.config.json
diff --git a/dist/uv-1.8.38/lib/viewer.js b/dist/uv-2.0.0/lib/viewer.js
similarity index 100%
rename from dist/uv-1.8.38/lib/viewer.js
rename to dist/uv-2.0.0/lib/viewer.js
diff --git a/dist/uv-1.8.38/lib/viewer.min.js b/dist/uv-2.0.0/lib/viewer.min.js
similarity index 100%
rename from dist/uv-1.8.38/lib/viewer.min.js
rename to dist/uv-2.0.0/lib/viewer.min.js
diff --git a/dist/uv-1.8.38/lib/virtex.js b/dist/uv-2.0.0/lib/virtex.js
similarity index 100%
rename from dist/uv-1.8.38/lib/virtex.js
rename to dist/uv-2.0.0/lib/virtex.js
diff --git a/dist/uv-1.8.38/schema/uv-mediaelement-extension.cy-GB.schema.json b/dist/uv-2.0.0/schema/uv-mediaelement-extension.cy-GB.schema.json
similarity index 100%
rename from dist/uv-1.8.38/schema/uv-mediaelement-extension.cy-GB.schema.json
rename to dist/uv-2.0.0/schema/uv-mediaelement-extension.cy-GB.schema.json
diff --git a/dist/uv-1.8.38/schema/uv-mediaelement-extension.en-GB.schema.json b/dist/uv-2.0.0/schema/uv-mediaelement-extension.en-GB.schema.json
similarity index 100%
rename from dist/uv-1.8.38/schema/uv-mediaelement-extension.en-GB.schema.json
rename to dist/uv-2.0.0/schema/uv-mediaelement-extension.en-GB.schema.json
diff --git a/dist/uv-1.8.38/schema/uv-pdf-extension.cy-GB.schema.json b/dist/uv-2.0.0/schema/uv-pdf-extension.cy-GB.schema.json
similarity index 100%
rename from dist/uv-1.8.38/schema/uv-pdf-extension.cy-GB.schema.json
rename to dist/uv-2.0.0/schema/uv-pdf-extension.cy-GB.schema.json
diff --git a/dist/uv-1.8.38/schema/uv-pdf-extension.en-GB.schema.json b/dist/uv-2.0.0/schema/uv-pdf-extension.en-GB.schema.json
similarity index 100%
rename from dist/uv-1.8.38/schema/uv-pdf-extension.en-GB.schema.json
rename to dist/uv-2.0.0/schema/uv-pdf-extension.en-GB.schema.json
diff --git a/dist/uv-2.0.0/schema/uv-seadragon-extension.cy-GB.schema.json b/dist/uv-2.0.0/schema/uv-seadragon-extension.cy-GB.schema.json
new file mode 100644
index 000000000..fd52fa714
--- /dev/null
+++ b/dist/uv-2.0.0/schema/uv-seadragon-extension.cy-GB.schema.json
@@ -0,0 +1 @@
+{"$schema":"http://json-schema.org/draft-04/schema#","description":"","type":"object","properties":{"options":{"type":"object","properties":{"allowStealFocus":{"type":"boolean"},"bookmarkThumbHeight":{"type":"number"},"bookmarkThumbWidth":{"type":"number"},"dropEnabled":{"type":"boolean"},"footerPanelEnabled":{"type":"boolean"},"headerPanelEnabled":{"type":"boolean"},"leftPanelEnabled":{"type":"boolean"},"limitLocales":{"type":"boolean"},"multiSelectionMimeType":{"type":"string","minLength":1},"navigatorEnabled":{"type":"boolean"},"openTemplate":{"type":"string","minLength":1},"overrideFullScreen":{"type":"boolean"},"pagingEnabled":{"type":"boolean"},"pagingOptionEnabled":{"type":"boolean"},"pessimisticAccessControl":{"type":"boolean"},"preserveViewport":{"type":"boolean"},"rightPanelEnabled":{"type":"boolean"},"saveUserSettings":{"type":"boolean"},"clickToZoomEnabled":{"type":"boolean"},"searchWithinEnabled":{"type":"boolean"},"termsOfUseEnabled":{"type":"boolean"},"theme":{"type":"string","minLength":1},"tokenStorage":{"type":"string","minLength":1},"useArrowKeysToNavigate":{"type":"boolean"},"zoomToSearchResultEnabled":{"type":"boolean"}},"required":["allowStealFocus","bookmarkThumbHeight","bookmarkThumbWidth","dropEnabled","footerPanelEnabled","headerPanelEnabled","leftPanelEnabled","limitLocales","multiSelectionMimeType","navigatorEnabled","openTemplate","overrideFullScreen","pagingEnabled","pagingOptionEnabled","pessimisticAccessControl","preserveViewport","rightPanelEnabled","saveUserSettings","clickToZoomEnabled","searchWithinEnabled","termsOfUseEnabled","theme","tokenStorage","useArrowKeysToNavigate","zoomToSearchResultEnabled"]},"modules":{"type":"object","properties":{"contentLeftPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"defaultToTreeEnabled":{"type":"boolean"},"defaultToTreeIfGreaterThan":{"type":"number"},"elideCount":{"type":"number"},"expandFullEnabled":{"type":"boolean"},"galleryThumbChunkedResizingThreshold":{"type":"number"},"galleryThumbHeight":{"type":"number"},"galleryThumbLoadPadding":{"type":"number"},"galleryThumbWidth":{"type":"number"},"oneColThumbHeight":{"type":"number"},"oneColThumbWidth":{"type":"number"},"pageModeEnabled":{"type":"boolean"},"panelAnimationDuration":{"type":"number"},"panelCollapsedWidth":{"type":"number"},"panelExpandedWidth":{"type":"number"},"panelOpen":{"type":"boolean"},"tabOrder":{"type":"string"},"thumbsEnabled":{"type":"boolean"},"thumbsExtraHeight":{"type":"number"},"thumbsImageFadeInDuration":{"type":"number"},"thumbsLoadRange":{"type":"number"},"treeEnabled":{"type":"boolean"},"twoColThumbHeight":{"type":"number"},"twoColThumbWidth":{"type":"number"}},"required":["defaultToTreeEnabled","defaultToTreeIfGreaterThan","elideCount","expandFullEnabled","galleryThumbChunkedResizingThreshold","galleryThumbHeight","galleryThumbLoadPadding","galleryThumbWidth","oneColThumbHeight","oneColThumbWidth","pageModeEnabled","panelAnimationDuration","panelCollapsedWidth","panelExpandedWidth","panelOpen","tabOrder","thumbsEnabled","thumbsExtraHeight","thumbsImageFadeInDuration","thumbsLoadRange","treeEnabled","twoColThumbHeight","twoColThumbWidth"]},"content":{"type":"object","properties":{"collapse":{"type":"string","minLength":1},"collapseFull":{"type":"string","minLength":1},"date":{"type":"string","minLength":1},"expand":{"type":"string","minLength":1},"expandFull":{"type":"string","minLength":1},"index":{"type":"string","minLength":1},"searchResult":{"type":"string","minLength":1},"searchResults":{"type":"string","minLength":1},"sortBy":{"type":"string","minLength":1},"thumbnails":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"volume":{"type":"string","minLength":1}},"required":["collapse","collapseFull","date","expand","expandFull","index","searchResult","searchResults","sortBy","thumbnails","title","volume"]}},"required":["options","content"]},"dialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"close":{"type":"string","minLength":1}},"required":["close"]}},"required":["content"]},"downloadDialogue":{"type":"object","properties":{"options":{"type":"object","properties":{"confinedImageSize":{"type":"number"},"currentViewDisabledPercentage":{"type":"number"},"maxImageWidth":{"type":"number"},"optionsExplanatoryTextEnabled":{"type":"boolean"},"selectionEnabled":{"type":"boolean"}},"required":["confinedImageSize","currentViewDisabledPercentage","maxImageWidth","optionsExplanatoryTextEnabled","selectionEnabled"]},"content":{"type":"object","properties":{"currentViewAsJpg":{"type":"string","minLength":1},"currentViewAsJpgExplanation":{"type":"string","minLength":1},"download":{"type":"string","minLength":1},"downloadSelection":{"type":"string","minLength":1},"downloadSelectionExplanation":{"type":"string","minLength":1},"editSettings":{"type":"string","minLength":1},"entireDocument":{"type":"string","minLength":1},"entireFileAsOriginal":{"type":"string","minLength":1},"noneAvailable":{"type":"string","minLength":1},"pagingNote":{"type":"string","minLength":1},"preview":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"wholeImageHighRes":{"type":"string","minLength":1},"wholeImageHighResExplanation":{"type":"string","minLength":1},"wholeImagesHighRes":{"type":"string","minLength":1},"wholeImagesHighResExplanation":{"type":"string","minLength":1},"wholeImageLowResAsJpg":{"type":"string","minLength":1},"wholeImageLowResAsJpgExplanation":{"type":"string","minLength":1}},"required":["currentViewAsJpg","currentViewAsJpgExplanation","download","downloadSelection","downloadSelectionExplanation","editSettings","entireDocument","entireFileAsOriginal","noneAvailable","pagingNote","preview","title","wholeImageHighRes","wholeImageHighResExplanation","wholeImagesHighRes","wholeImagesHighResExplanation","wholeImageLowResAsJpg","wholeImageLowResAsJpgExplanation"]}},"required":["options","content"]},"footerPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"bookmarkEnabled":{"type":"boolean"},"downloadEnabled":{"type":"boolean"},"embedEnabled":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"fullscreenEnabled":{"type":"boolean"},"minimiseButtons":{"type":"boolean"},"moreInfoEnabled":{"type":"boolean"},"openEnabled":{"type":"boolean"},"printEnabled":{"type":"boolean"},"shareEnabled":{"type":"boolean"}},"required":["bookmarkEnabled","downloadEnabled","embedEnabled","feedbackEnabled","fullscreenEnabled","minimiseButtons","moreInfoEnabled","openEnabled","printEnabled","shareEnabled"]},"content":{"type":"object","properties":{"bookmark":{"type":"string","minLength":1},"download":{"type":"string","minLength":1},"embed":{"type":"string","minLength":1},"feedback":{"type":"string","minLength":1},"exitFullScreen":{"type":"string","minLength":1},"fullScreen":{"type":"string","minLength":1},"open":{"type":"string","minLength":1},"share":{"type":"string","minLength":1}},"required":["bookmark","download","embed","feedback","exitFullScreen","fullScreen","open","share"]}},"required":["options","content"]},"genericDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"emptyValue":{"type":"string","minLength":1},"invalidNumber":{"type":"string","minLength":1},"noMatches":{"type":"string","minLength":1},"ok":{"type":"string","minLength":1},"pageNotFound":{"type":"string","minLength":1},"refresh":{"type":"string","minLength":1}},"required":["emptyValue","invalidNumber","noMatches","ok","pageNotFound","refresh"]}},"required":["content"]},"headerPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"localeToggleEnabled":{"type":"boolean"},"settingsButtonEnabled":{"type":"boolean"}},"required":["localeToggleEnabled","settingsButtonEnabled"]}},"required":["options"]},"helpDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"text":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["text","title"]}},"required":["content"]},"moreInfoRightPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"canvasDisplayOrder":{"type":"string"},"canvasExclude":{"type":"string"},"copyToClipboardEnabled":{"type":"boolean"},"manifestDisplayOrder":{"type":"string"},"manifestExclude":{"type":"string"},"panelAnimationDuration":{"type":"number"},"panelCollapsedWidth":{"type":"number"},"panelExpandedWidth":{"type":"number"},"panelOpen":{"type":"boolean"},"rtlLanguageCodes":{"type":"string","minLength":1},"showAllLanguages":{"type":"boolean"},"textLimit":{"type":"number"},"textLimitType":{"type":"string","minLength":1}},"required":["canvasDisplayOrder","canvasExclude","copyToClipboardEnabled","manifestDisplayOrder","manifestExclude","panelAnimationDuration","panelCollapsedWidth","panelExpandedWidth","panelOpen","rtlLanguageCodes","showAllLanguages","textLimit","textLimitType"]},"content":{"type":"object","properties":{"attribution":{"type":"string","minLength":1},"collapse":{"type":"string","minLength":1},"collapseFull":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"expand":{"type":"string","minLength":1},"expandFull":{"type":"string","minLength":1},"holdingText":{"type":"string","minLength":1},"less":{"type":"string","minLength":1},"license":{"type":"string","minLength":1},"logo":{"type":"string","minLength":1},"more":{"type":"string","minLength":1},"noData":{"type":"string","minLength":1},"page":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"manifestHeader":{"type":"string","minLength":1},"canvasHeader":{"type":"string","minLength":1},"copyToClipboard":{"type":"string","minLength":1},"copiedToClipboard":{"type":"string","minLength":1}},"required":["attribution","collapse","collapseFull","description","expand","expandFull","holdingText","less","license","logo","more","noData","page","title","manifestHeader","canvasHeader","copyToClipboard","copiedToClipboard"]}},"required":["options","content"]},"multiSelectDialogue":{"type":"object","properties":{"options":{"type":"object","properties":{"galleryThumbChunkedResizingEnabled":{"type":"boolean"},"galleryThumbChunkedResizingThreshold":{"type":"number"},"galleryThumbHeight":{"type":"number"},"galleryThumbLoadPadding":{"type":"number"},"galleryThumbWidth":{"type":"number"},"pageModeEnabled":{"type":"boolean"}},"required":["galleryThumbChunkedResizingEnabled","galleryThumbChunkedResizingThreshold","galleryThumbHeight","galleryThumbLoadPadding","galleryThumbWidth","pageModeEnabled"]},"content":{"type":"object","properties":{"select":{"type":"string","minLength":1},"selectAll":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["select","selectAll","title"]}},"required":["options","content"]},"pagingHeaderPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"autoCompleteBoxEnabled":{"type":"boolean"},"galleryButtonEnabled":{"type":"boolean"},"imageSelectionBoxEnabled":{"type":"boolean"},"pageModeEnabled":{"type":"boolean"},"pagingToggleEnabled":{"type":"boolean"}},"required":["autoCompleteBoxEnabled","galleryButtonEnabled","imageSelectionBoxEnabled","pageModeEnabled","pagingToggleEnabled"]},"content":{"type":"object","properties":{"close":{"type":"string","minLength":1},"emptyValue":{"type":"string","minLength":1},"first":{"type":"string","minLength":1},"firstImage":{"type":"string","minLength":1},"firstPage":{"type":"string","minLength":1},"folio":{"type":"string","minLength":1},"gallery":{"type":"string","minLength":1},"go":{"type":"string","minLength":1},"help":{"type":"string","minLength":1},"image":{"type":"string","minLength":1},"last":{"type":"string","minLength":1},"lastImage":{"type":"string","minLength":1},"lastPage":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"nextImage":{"type":"string","minLength":1},"nextPage":{"type":"string","minLength":1},"of":{"type":"string","minLength":1},"oneUp":{"type":"string","minLength":1},"page":{"type":"string","minLength":1},"previous":{"type":"string","minLength":1},"previousImage":{"type":"string","minLength":1},"previousPage":{"type":"string","minLength":1},"settings":{"type":"string","minLength":1},"twoUp":{"type":"string","minLength":1}},"required":["close","emptyValue","first","firstImage","firstPage","folio","gallery","go","help","image","last","lastImage","lastPage","next","nextImage","nextPage","of","oneUp","page","previous","previousImage","previousPage","settings","twoUp"]}},"required":["options","content"]},"seadragonCenterPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"animationTime":{"type":"number"},"autoHideControls":{"type":"boolean"},"attributionEnabled":{"type":"boolean"},"blendTime":{"type":"number"},"constrainDuringPan":{"type":"boolean"},"controlsFadeAfterInactive":{"type":"number"},"controlsFadeDelay":{"type":"number"},"controlsFadeLength":{"type":"number"},"defaultZoomLevel":{"type":"number"},"immediateRender":{"type":"boolean"},"maxZoomPixelRatio":{"type":"number"},"navigatorPosition":{"type":"string","minLength":1},"pageGap":{"type":"number"},"showHomeControl":{"type":"boolean"},"trimAttributionCount":{"type":"number"},"visibilityRatio":{"type":"number"}},"required":["animationTime","autoHideControls","attributionEnabled","blendTime","constrainDuringPan","controlsFadeAfterInactive","controlsFadeDelay","controlsFadeLength","defaultZoomLevel","immediateRender","maxZoomPixelRatio","navigatorPosition","pageGap","showHomeControl","trimAttributionCount","visibilityRatio"]},"content":{"type":"object","properties":{"attribution":{"type":"string","minLength":1},"goHome":{"type":"string","minLength":1},"imageUnavailable":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"previous":{"type":"string","minLength":1},"rotateRight":{"type":"string","minLength":1},"zoomIn":{"type":"string","minLength":1},"zoomOut":{"type":"string","minLength":1}},"required":["attribution","goHome","imageUnavailable","next","previous","rotateRight","zoomIn","zoomOut"]}},"required":["options","content"]},"searchFooterPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"elideDetailsTermsCount":{"type":"number"},"elideResultsTermsCount":{"type":"number"},"pageModeEnabled":{"type":"boolean"},"positionMarkerEnabled":{"type":"boolean"}},"required":["elideDetailsTermsCount","elideResultsTermsCount","pageModeEnabled","positionMarkerEnabled"]},"content":{"type":"object","properties":{"clearSearch":{"type":"string","minLength":1},"defaultLabel":{"type":"string","minLength":1},"displaying":{"type":"string","minLength":1},"enterKeyword":{"type":"string","minLength":1},"image":{"type":"string","minLength":1},"imageCaps":{"type":"string","minLength":1},"instanceFound":{"type":"string","minLength":1},"instancesFound":{"type":"string","minLength":1},"nextResult":{"type":"string","minLength":1},"page":{"type":"string","minLength":1},"pageCaps":{"type":"string","minLength":1},"previousResult":{"type":"string","minLength":1},"print":{"type":"string","minLength":1},"resultFoundFor":{"type":"string","minLength":1},"resultsFoundFor":{"type":"string","minLength":1},"searchWithin":{"type":"string","minLength":1}},"required":["clearSearch","defaultLabel","displaying","enterKeyword","image","imageCaps","instanceFound","instancesFound","nextResult","page","pageCaps","previousResult","print","resultFoundFor","resultsFoundFor","searchWithin"]}},"required":["options","content"]},"settingsDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"locale":{"type":"string","minLength":1},"navigatorEnabled":{"type":"string","minLength":1},"clickToZoomEnabled":{"type":"string","minLength":1},"pagingEnabled":{"type":"string","minLength":1},"preserveViewport":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"website":{"type":"string","minLength":1}},"required":["locale","navigatorEnabled","clickToZoomEnabled","pagingEnabled","preserveViewport","title","website"]}},"required":["content"]},"shareDialogue":{"type":"object","properties":{"options":{"type":"object","properties":{"embedTemplate":{"type":"string","minLength":1},"instructionsEnabled":{"type":"boolean"},"shareFrameEnabled":{"type":"boolean"}},"required":["embedTemplate","instructionsEnabled","shareFrameEnabled"]},"content":{"type":"object","properties":{"customSize":{"type":"string","minLength":1},"embed":{"type":"string","minLength":1},"embedInstructions":{"type":"string","minLength":1},"height":{"type":"string","minLength":1},"iiif":{"type":"string","minLength":1},"share":{"type":"string","minLength":1},"shareInstructions":{"type":"string","minLength":1},"size":{"type":"string","minLength":1},"width":{"type":"string","minLength":1}},"required":["customSize","embed","embedInstructions","height","iiif","share","shareInstructions","size","width"]}},"required":["options","content"]},"clickThroughDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"viewTerms":{"type":"string","minLength":1}},"required":["viewTerms"]}},"required":["content"]},"loginDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"login":{"type":"string","minLength":1},"logout":{"type":"string","minLength":1},"cancel":{"type":"string","minLength":1}},"required":["login","logout","cancel"]}},"required":["content"]},"mobileFooterPanel":{"type":"object","properties":{"content":{"type":"object","properties":{"rotateRight":{"type":"string","minLength":1},"moreInfo":{"type":"string","minLength":1},"zoomIn":{"type":"string","minLength":1},"zoomOut":{"type":"string","minLength":1}},"required":["rotateRight","moreInfo","zoomIn","zoomOut"]}},"required":["content"]},"restrictedDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"cancel":{"type":"string","minLength":1}},"required":["cancel"]}},"required":["content"]}},"required":["contentLeftPanel","dialogue","downloadDialogue","footerPanel","genericDialogue","headerPanel","helpDialogue","moreInfoRightPanel","multiSelectDialogue","pagingHeaderPanel","seadragonCenterPanel","searchFooterPanel","settingsDialogue","shareDialogue","clickThroughDialogue","loginDialogue","mobileFooterPanel","restrictedDialogue"]},"localisation":{"type":"object","properties":{"label":{"type":"string","minLength":1},"locales":{"type":"array","uniqueItems":true,"minItems":1,"items":{"required":["name","label"],"properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}}}}},"required":["label","locales"]},"content":{"type":"object","properties":{"authCORSError":{"type":"string","minLength":1},"authorisationFailedMessage":{"type":"string","minLength":1},"canvasIndexOutOfRange":{"type":"string","minLength":1},"degradedResourceMessage":{"type":"string","minLength":1},"degradedResourceLogin":{"type":"string","minLength":1},"forbiddenResourceMessage":{"type":"string","minLength":1},"termsOfUse":{"type":"string","minLength":1}},"required":["authCORSError","authorisationFailedMessage","canvasIndexOutOfRange","degradedResourceMessage","degradedResourceLogin","forbiddenResourceMessage","termsOfUse"]}},"required":["options","modules","localisation","content"]}
\ No newline at end of file
diff --git a/dist/uv-2.0.0/schema/uv-seadragon-extension.en-GB.schema.json b/dist/uv-2.0.0/schema/uv-seadragon-extension.en-GB.schema.json
new file mode 100644
index 000000000..fd52fa714
--- /dev/null
+++ b/dist/uv-2.0.0/schema/uv-seadragon-extension.en-GB.schema.json
@@ -0,0 +1 @@
+{"$schema":"http://json-schema.org/draft-04/schema#","description":"","type":"object","properties":{"options":{"type":"object","properties":{"allowStealFocus":{"type":"boolean"},"bookmarkThumbHeight":{"type":"number"},"bookmarkThumbWidth":{"type":"number"},"dropEnabled":{"type":"boolean"},"footerPanelEnabled":{"type":"boolean"},"headerPanelEnabled":{"type":"boolean"},"leftPanelEnabled":{"type":"boolean"},"limitLocales":{"type":"boolean"},"multiSelectionMimeType":{"type":"string","minLength":1},"navigatorEnabled":{"type":"boolean"},"openTemplate":{"type":"string","minLength":1},"overrideFullScreen":{"type":"boolean"},"pagingEnabled":{"type":"boolean"},"pagingOptionEnabled":{"type":"boolean"},"pessimisticAccessControl":{"type":"boolean"},"preserveViewport":{"type":"boolean"},"rightPanelEnabled":{"type":"boolean"},"saveUserSettings":{"type":"boolean"},"clickToZoomEnabled":{"type":"boolean"},"searchWithinEnabled":{"type":"boolean"},"termsOfUseEnabled":{"type":"boolean"},"theme":{"type":"string","minLength":1},"tokenStorage":{"type":"string","minLength":1},"useArrowKeysToNavigate":{"type":"boolean"},"zoomToSearchResultEnabled":{"type":"boolean"}},"required":["allowStealFocus","bookmarkThumbHeight","bookmarkThumbWidth","dropEnabled","footerPanelEnabled","headerPanelEnabled","leftPanelEnabled","limitLocales","multiSelectionMimeType","navigatorEnabled","openTemplate","overrideFullScreen","pagingEnabled","pagingOptionEnabled","pessimisticAccessControl","preserveViewport","rightPanelEnabled","saveUserSettings","clickToZoomEnabled","searchWithinEnabled","termsOfUseEnabled","theme","tokenStorage","useArrowKeysToNavigate","zoomToSearchResultEnabled"]},"modules":{"type":"object","properties":{"contentLeftPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"defaultToTreeEnabled":{"type":"boolean"},"defaultToTreeIfGreaterThan":{"type":"number"},"elideCount":{"type":"number"},"expandFullEnabled":{"type":"boolean"},"galleryThumbChunkedResizingThreshold":{"type":"number"},"galleryThumbHeight":{"type":"number"},"galleryThumbLoadPadding":{"type":"number"},"galleryThumbWidth":{"type":"number"},"oneColThumbHeight":{"type":"number"},"oneColThumbWidth":{"type":"number"},"pageModeEnabled":{"type":"boolean"},"panelAnimationDuration":{"type":"number"},"panelCollapsedWidth":{"type":"number"},"panelExpandedWidth":{"type":"number"},"panelOpen":{"type":"boolean"},"tabOrder":{"type":"string"},"thumbsEnabled":{"type":"boolean"},"thumbsExtraHeight":{"type":"number"},"thumbsImageFadeInDuration":{"type":"number"},"thumbsLoadRange":{"type":"number"},"treeEnabled":{"type":"boolean"},"twoColThumbHeight":{"type":"number"},"twoColThumbWidth":{"type":"number"}},"required":["defaultToTreeEnabled","defaultToTreeIfGreaterThan","elideCount","expandFullEnabled","galleryThumbChunkedResizingThreshold","galleryThumbHeight","galleryThumbLoadPadding","galleryThumbWidth","oneColThumbHeight","oneColThumbWidth","pageModeEnabled","panelAnimationDuration","panelCollapsedWidth","panelExpandedWidth","panelOpen","tabOrder","thumbsEnabled","thumbsExtraHeight","thumbsImageFadeInDuration","thumbsLoadRange","treeEnabled","twoColThumbHeight","twoColThumbWidth"]},"content":{"type":"object","properties":{"collapse":{"type":"string","minLength":1},"collapseFull":{"type":"string","minLength":1},"date":{"type":"string","minLength":1},"expand":{"type":"string","minLength":1},"expandFull":{"type":"string","minLength":1},"index":{"type":"string","minLength":1},"searchResult":{"type":"string","minLength":1},"searchResults":{"type":"string","minLength":1},"sortBy":{"type":"string","minLength":1},"thumbnails":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"volume":{"type":"string","minLength":1}},"required":["collapse","collapseFull","date","expand","expandFull","index","searchResult","searchResults","sortBy","thumbnails","title","volume"]}},"required":["options","content"]},"dialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"close":{"type":"string","minLength":1}},"required":["close"]}},"required":["content"]},"downloadDialogue":{"type":"object","properties":{"options":{"type":"object","properties":{"confinedImageSize":{"type":"number"},"currentViewDisabledPercentage":{"type":"number"},"maxImageWidth":{"type":"number"},"optionsExplanatoryTextEnabled":{"type":"boolean"},"selectionEnabled":{"type":"boolean"}},"required":["confinedImageSize","currentViewDisabledPercentage","maxImageWidth","optionsExplanatoryTextEnabled","selectionEnabled"]},"content":{"type":"object","properties":{"currentViewAsJpg":{"type":"string","minLength":1},"currentViewAsJpgExplanation":{"type":"string","minLength":1},"download":{"type":"string","minLength":1},"downloadSelection":{"type":"string","minLength":1},"downloadSelectionExplanation":{"type":"string","minLength":1},"editSettings":{"type":"string","minLength":1},"entireDocument":{"type":"string","minLength":1},"entireFileAsOriginal":{"type":"string","minLength":1},"noneAvailable":{"type":"string","minLength":1},"pagingNote":{"type":"string","minLength":1},"preview":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"wholeImageHighRes":{"type":"string","minLength":1},"wholeImageHighResExplanation":{"type":"string","minLength":1},"wholeImagesHighRes":{"type":"string","minLength":1},"wholeImagesHighResExplanation":{"type":"string","minLength":1},"wholeImageLowResAsJpg":{"type":"string","minLength":1},"wholeImageLowResAsJpgExplanation":{"type":"string","minLength":1}},"required":["currentViewAsJpg","currentViewAsJpgExplanation","download","downloadSelection","downloadSelectionExplanation","editSettings","entireDocument","entireFileAsOriginal","noneAvailable","pagingNote","preview","title","wholeImageHighRes","wholeImageHighResExplanation","wholeImagesHighRes","wholeImagesHighResExplanation","wholeImageLowResAsJpg","wholeImageLowResAsJpgExplanation"]}},"required":["options","content"]},"footerPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"bookmarkEnabled":{"type":"boolean"},"downloadEnabled":{"type":"boolean"},"embedEnabled":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"fullscreenEnabled":{"type":"boolean"},"minimiseButtons":{"type":"boolean"},"moreInfoEnabled":{"type":"boolean"},"openEnabled":{"type":"boolean"},"printEnabled":{"type":"boolean"},"shareEnabled":{"type":"boolean"}},"required":["bookmarkEnabled","downloadEnabled","embedEnabled","feedbackEnabled","fullscreenEnabled","minimiseButtons","moreInfoEnabled","openEnabled","printEnabled","shareEnabled"]},"content":{"type":"object","properties":{"bookmark":{"type":"string","minLength":1},"download":{"type":"string","minLength":1},"embed":{"type":"string","minLength":1},"feedback":{"type":"string","minLength":1},"exitFullScreen":{"type":"string","minLength":1},"fullScreen":{"type":"string","minLength":1},"open":{"type":"string","minLength":1},"share":{"type":"string","minLength":1}},"required":["bookmark","download","embed","feedback","exitFullScreen","fullScreen","open","share"]}},"required":["options","content"]},"genericDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"emptyValue":{"type":"string","minLength":1},"invalidNumber":{"type":"string","minLength":1},"noMatches":{"type":"string","minLength":1},"ok":{"type":"string","minLength":1},"pageNotFound":{"type":"string","minLength":1},"refresh":{"type":"string","minLength":1}},"required":["emptyValue","invalidNumber","noMatches","ok","pageNotFound","refresh"]}},"required":["content"]},"headerPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"localeToggleEnabled":{"type":"boolean"},"settingsButtonEnabled":{"type":"boolean"}},"required":["localeToggleEnabled","settingsButtonEnabled"]}},"required":["options"]},"helpDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"text":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["text","title"]}},"required":["content"]},"moreInfoRightPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"canvasDisplayOrder":{"type":"string"},"canvasExclude":{"type":"string"},"copyToClipboardEnabled":{"type":"boolean"},"manifestDisplayOrder":{"type":"string"},"manifestExclude":{"type":"string"},"panelAnimationDuration":{"type":"number"},"panelCollapsedWidth":{"type":"number"},"panelExpandedWidth":{"type":"number"},"panelOpen":{"type":"boolean"},"rtlLanguageCodes":{"type":"string","minLength":1},"showAllLanguages":{"type":"boolean"},"textLimit":{"type":"number"},"textLimitType":{"type":"string","minLength":1}},"required":["canvasDisplayOrder","canvasExclude","copyToClipboardEnabled","manifestDisplayOrder","manifestExclude","panelAnimationDuration","panelCollapsedWidth","panelExpandedWidth","panelOpen","rtlLanguageCodes","showAllLanguages","textLimit","textLimitType"]},"content":{"type":"object","properties":{"attribution":{"type":"string","minLength":1},"collapse":{"type":"string","minLength":1},"collapseFull":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"expand":{"type":"string","minLength":1},"expandFull":{"type":"string","minLength":1},"holdingText":{"type":"string","minLength":1},"less":{"type":"string","minLength":1},"license":{"type":"string","minLength":1},"logo":{"type":"string","minLength":1},"more":{"type":"string","minLength":1},"noData":{"type":"string","minLength":1},"page":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"manifestHeader":{"type":"string","minLength":1},"canvasHeader":{"type":"string","minLength":1},"copyToClipboard":{"type":"string","minLength":1},"copiedToClipboard":{"type":"string","minLength":1}},"required":["attribution","collapse","collapseFull","description","expand","expandFull","holdingText","less","license","logo","more","noData","page","title","manifestHeader","canvasHeader","copyToClipboard","copiedToClipboard"]}},"required":["options","content"]},"multiSelectDialogue":{"type":"object","properties":{"options":{"type":"object","properties":{"galleryThumbChunkedResizingEnabled":{"type":"boolean"},"galleryThumbChunkedResizingThreshold":{"type":"number"},"galleryThumbHeight":{"type":"number"},"galleryThumbLoadPadding":{"type":"number"},"galleryThumbWidth":{"type":"number"},"pageModeEnabled":{"type":"boolean"}},"required":["galleryThumbChunkedResizingEnabled","galleryThumbChunkedResizingThreshold","galleryThumbHeight","galleryThumbLoadPadding","galleryThumbWidth","pageModeEnabled"]},"content":{"type":"object","properties":{"select":{"type":"string","minLength":1},"selectAll":{"type":"string","minLength":1},"title":{"type":"string","minLength":1}},"required":["select","selectAll","title"]}},"required":["options","content"]},"pagingHeaderPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"autoCompleteBoxEnabled":{"type":"boolean"},"galleryButtonEnabled":{"type":"boolean"},"imageSelectionBoxEnabled":{"type":"boolean"},"pageModeEnabled":{"type":"boolean"},"pagingToggleEnabled":{"type":"boolean"}},"required":["autoCompleteBoxEnabled","galleryButtonEnabled","imageSelectionBoxEnabled","pageModeEnabled","pagingToggleEnabled"]},"content":{"type":"object","properties":{"close":{"type":"string","minLength":1},"emptyValue":{"type":"string","minLength":1},"first":{"type":"string","minLength":1},"firstImage":{"type":"string","minLength":1},"firstPage":{"type":"string","minLength":1},"folio":{"type":"string","minLength":1},"gallery":{"type":"string","minLength":1},"go":{"type":"string","minLength":1},"help":{"type":"string","minLength":1},"image":{"type":"string","minLength":1},"last":{"type":"string","minLength":1},"lastImage":{"type":"string","minLength":1},"lastPage":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"nextImage":{"type":"string","minLength":1},"nextPage":{"type":"string","minLength":1},"of":{"type":"string","minLength":1},"oneUp":{"type":"string","minLength":1},"page":{"type":"string","minLength":1},"previous":{"type":"string","minLength":1},"previousImage":{"type":"string","minLength":1},"previousPage":{"type":"string","minLength":1},"settings":{"type":"string","minLength":1},"twoUp":{"type":"string","minLength":1}},"required":["close","emptyValue","first","firstImage","firstPage","folio","gallery","go","help","image","last","lastImage","lastPage","next","nextImage","nextPage","of","oneUp","page","previous","previousImage","previousPage","settings","twoUp"]}},"required":["options","content"]},"seadragonCenterPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"animationTime":{"type":"number"},"autoHideControls":{"type":"boolean"},"attributionEnabled":{"type":"boolean"},"blendTime":{"type":"number"},"constrainDuringPan":{"type":"boolean"},"controlsFadeAfterInactive":{"type":"number"},"controlsFadeDelay":{"type":"number"},"controlsFadeLength":{"type":"number"},"defaultZoomLevel":{"type":"number"},"immediateRender":{"type":"boolean"},"maxZoomPixelRatio":{"type":"number"},"navigatorPosition":{"type":"string","minLength":1},"pageGap":{"type":"number"},"showHomeControl":{"type":"boolean"},"trimAttributionCount":{"type":"number"},"visibilityRatio":{"type":"number"}},"required":["animationTime","autoHideControls","attributionEnabled","blendTime","constrainDuringPan","controlsFadeAfterInactive","controlsFadeDelay","controlsFadeLength","defaultZoomLevel","immediateRender","maxZoomPixelRatio","navigatorPosition","pageGap","showHomeControl","trimAttributionCount","visibilityRatio"]},"content":{"type":"object","properties":{"attribution":{"type":"string","minLength":1},"goHome":{"type":"string","minLength":1},"imageUnavailable":{"type":"string","minLength":1},"next":{"type":"string","minLength":1},"previous":{"type":"string","minLength":1},"rotateRight":{"type":"string","minLength":1},"zoomIn":{"type":"string","minLength":1},"zoomOut":{"type":"string","minLength":1}},"required":["attribution","goHome","imageUnavailable","next","previous","rotateRight","zoomIn","zoomOut"]}},"required":["options","content"]},"searchFooterPanel":{"type":"object","properties":{"options":{"type":"object","properties":{"elideDetailsTermsCount":{"type":"number"},"elideResultsTermsCount":{"type":"number"},"pageModeEnabled":{"type":"boolean"},"positionMarkerEnabled":{"type":"boolean"}},"required":["elideDetailsTermsCount","elideResultsTermsCount","pageModeEnabled","positionMarkerEnabled"]},"content":{"type":"object","properties":{"clearSearch":{"type":"string","minLength":1},"defaultLabel":{"type":"string","minLength":1},"displaying":{"type":"string","minLength":1},"enterKeyword":{"type":"string","minLength":1},"image":{"type":"string","minLength":1},"imageCaps":{"type":"string","minLength":1},"instanceFound":{"type":"string","minLength":1},"instancesFound":{"type":"string","minLength":1},"nextResult":{"type":"string","minLength":1},"page":{"type":"string","minLength":1},"pageCaps":{"type":"string","minLength":1},"previousResult":{"type":"string","minLength":1},"print":{"type":"string","minLength":1},"resultFoundFor":{"type":"string","minLength":1},"resultsFoundFor":{"type":"string","minLength":1},"searchWithin":{"type":"string","minLength":1}},"required":["clearSearch","defaultLabel","displaying","enterKeyword","image","imageCaps","instanceFound","instancesFound","nextResult","page","pageCaps","previousResult","print","resultFoundFor","resultsFoundFor","searchWithin"]}},"required":["options","content"]},"settingsDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"locale":{"type":"string","minLength":1},"navigatorEnabled":{"type":"string","minLength":1},"clickToZoomEnabled":{"type":"string","minLength":1},"pagingEnabled":{"type":"string","minLength":1},"preserveViewport":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"website":{"type":"string","minLength":1}},"required":["locale","navigatorEnabled","clickToZoomEnabled","pagingEnabled","preserveViewport","title","website"]}},"required":["content"]},"shareDialogue":{"type":"object","properties":{"options":{"type":"object","properties":{"embedTemplate":{"type":"string","minLength":1},"instructionsEnabled":{"type":"boolean"},"shareFrameEnabled":{"type":"boolean"}},"required":["embedTemplate","instructionsEnabled","shareFrameEnabled"]},"content":{"type":"object","properties":{"customSize":{"type":"string","minLength":1},"embed":{"type":"string","minLength":1},"embedInstructions":{"type":"string","minLength":1},"height":{"type":"string","minLength":1},"iiif":{"type":"string","minLength":1},"share":{"type":"string","minLength":1},"shareInstructions":{"type":"string","minLength":1},"size":{"type":"string","minLength":1},"width":{"type":"string","minLength":1}},"required":["customSize","embed","embedInstructions","height","iiif","share","shareInstructions","size","width"]}},"required":["options","content"]},"clickThroughDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"viewTerms":{"type":"string","minLength":1}},"required":["viewTerms"]}},"required":["content"]},"loginDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"login":{"type":"string","minLength":1},"logout":{"type":"string","minLength":1},"cancel":{"type":"string","minLength":1}},"required":["login","logout","cancel"]}},"required":["content"]},"mobileFooterPanel":{"type":"object","properties":{"content":{"type":"object","properties":{"rotateRight":{"type":"string","minLength":1},"moreInfo":{"type":"string","minLength":1},"zoomIn":{"type":"string","minLength":1},"zoomOut":{"type":"string","minLength":1}},"required":["rotateRight","moreInfo","zoomIn","zoomOut"]}},"required":["content"]},"restrictedDialogue":{"type":"object","properties":{"content":{"type":"object","properties":{"cancel":{"type":"string","minLength":1}},"required":["cancel"]}},"required":["content"]}},"required":["contentLeftPanel","dialogue","downloadDialogue","footerPanel","genericDialogue","headerPanel","helpDialogue","moreInfoRightPanel","multiSelectDialogue","pagingHeaderPanel","seadragonCenterPanel","searchFooterPanel","settingsDialogue","shareDialogue","clickThroughDialogue","loginDialogue","mobileFooterPanel","restrictedDialogue"]},"localisation":{"type":"object","properties":{"label":{"type":"string","minLength":1},"locales":{"type":"array","uniqueItems":true,"minItems":1,"items":{"required":["name","label"],"properties":{"name":{"type":"string","minLength":1},"label":{"type":"string","minLength":1}}}}},"required":["label","locales"]},"content":{"type":"object","properties":{"authCORSError":{"type":"string","minLength":1},"authorisationFailedMessage":{"type":"string","minLength":1},"canvasIndexOutOfRange":{"type":"string","minLength":1},"degradedResourceMessage":{"type":"string","minLength":1},"degradedResourceLogin":{"type":"string","minLength":1},"forbiddenResourceMessage":{"type":"string","minLength":1},"termsOfUse":{"type":"string","minLength":1}},"required":["authCORSError","authorisationFailedMessage","canvasIndexOutOfRange","degradedResourceMessage","degradedResourceLogin","forbiddenResourceMessage","termsOfUse"]}},"required":["options","modules","localisation","content"]}
\ No newline at end of file
diff --git a/dist/uv-1.8.38/schema/uv-virtex-extension.cy-GB.schema.json b/dist/uv-2.0.0/schema/uv-virtex-extension.cy-GB.schema.json
similarity index 100%
rename from dist/uv-1.8.38/schema/uv-virtex-extension.cy-GB.schema.json
rename to dist/uv-2.0.0/schema/uv-virtex-extension.cy-GB.schema.json
diff --git a/dist/uv-1.8.38/schema/uv-virtex-extension.en-GB.schema.json b/dist/uv-2.0.0/schema/uv-virtex-extension.en-GB.schema.json
similarity index 100%
rename from dist/uv-1.8.38/schema/uv-virtex-extension.en-GB.schema.json
rename to dist/uv-2.0.0/schema/uv-virtex-extension.en-GB.schema.json
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-mediaelement-extension/theme.css b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-mediaelement-extension/theme.css
similarity index 96%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-mediaelement-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-mediaelement-extension/theme.css
index 40c7f807a..50ac78810 100644
--- a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-mediaelement-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-mediaelement-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -318,33 +318,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -2751,6 +2771,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -2788,47 +2815,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -2848,7 +2893,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -2858,16 +2902,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -3002,6 +3056,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-pdf-extension/theme.css b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-pdf-extension/theme.css
similarity index 97%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-pdf-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-pdf-extension/theme.css
index ea393cfb8..16b526a15 100644
--- a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-pdf-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-pdf-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -318,33 +318,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -3607,6 +3627,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -3644,47 +3671,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -3704,7 +3749,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -3714,16 +3758,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -3858,6 +3912,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-seadragon-extension/theme.css b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-seadragon-extension/theme.css
similarity index 95%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-seadragon-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-seadragon-extension/theme.css
index 9b71e436d..6a9083ff0 100644
--- a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-seadragon-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-seadragon-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -626,6 +626,9 @@
opacity: 0.5;
filter: alpha(opacity=50);
}
+#app .centerPanel .content .searchOverlay.current {
+ border: 3px solid #fff;
+}
#app .openseadragon-canvas {
outline: none;
}
@@ -669,33 +672,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -935,6 +958,10 @@
float: left;
border: none;
}
+#app .footerPanel .search .searchTextContainer .searchText.searching {
+ background: url('../../img/uv-searchfooterpanel-module/spinner.gif') no-repeat;
+ background-position: right 3px;
+}
#app .footerPanel .search .searchTextContainer a.imageButton.searchButton {
background: url('../../img/uv-searchfooterpanel-module/search.png') no-repeat;
height: 18px;
@@ -967,6 +994,19 @@
width: 585px;
}
#app .footerPanel .searchPager .controls a.previousResult {
+ -webkit-touch-callout: none;
+ /* iOS Safari */
+ -webkit-user-select: none;
+ /* Chrome/Safari/Opera */
+ -khtml-user-select: none;
+ /* Konqueror */
+ -moz-user-select: none;
+ /* Firefox */
+ -ms-user-select: none;
+ /* Internet Explorer/Edge */
+ user-select: none;
+ /* Non-prefixed version, currently
+ not supported by any browser */
background-image: url('../../img/uv-searchfooterpanel-module/prev.png');
background-repeat: no-repeat;
height: 30px;
@@ -987,7 +1027,24 @@
color: #fff;
text-decoration: none;
}
+#app .footerPanel .searchPager .controls a.previousResult.disabled {
+ opacity: 0.25;
+ filter: alpha(opacity=25);
+}
#app .footerPanel .searchPager .controls a.nextResult {
+ -webkit-touch-callout: none;
+ /* iOS Safari */
+ -webkit-user-select: none;
+ /* Chrome/Safari/Opera */
+ -khtml-user-select: none;
+ /* Konqueror */
+ -moz-user-select: none;
+ /* Firefox */
+ -ms-user-select: none;
+ /* Internet Explorer/Edge */
+ user-select: none;
+ /* Non-prefixed version, currently
+ not supported by any browser */
background-image: url('../../img/uv-searchfooterpanel-module/next.png');
background-repeat: no-repeat;
height: 30px;
@@ -1008,7 +1065,24 @@
color: #fff;
text-decoration: none;
}
+#app .footerPanel .searchPager .controls a.nextResult.disabled {
+ opacity: 0.25;
+ filter: alpha(opacity=25);
+}
#app .footerPanel .searchPager .controls a.clearSearch {
+ -webkit-touch-callout: none;
+ /* iOS Safari */
+ -webkit-user-select: none;
+ /* Chrome/Safari/Opera */
+ -khtml-user-select: none;
+ /* Konqueror */
+ -moz-user-select: none;
+ /* Firefox */
+ -ms-user-select: none;
+ /* Internet Explorer/Edge */
+ user-select: none;
+ /* Non-prefixed version, currently
+ not supported by any browser */
cursor: pointer;
color: #26b5cc;
text-decoration: none;
@@ -2583,6 +2657,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -2620,47 +2701,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -2680,7 +2779,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -2690,16 +2788,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -2834,6 +2942,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-virtex-extension/theme.css b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-virtex-extension/theme.css
similarity index 96%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-virtex-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-virtex-extension/theme.css
index 5643c626d..d1d158f35 100644
--- a/dist/uv-1.8.38/themes/uv-cy-GB-theme/css/uv-virtex-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-cy-GB-theme/css/uv-virtex-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -318,33 +318,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -2028,6 +2048,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -2065,47 +2092,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -2125,7 +2170,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -2135,16 +2179,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -2279,6 +2333,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/padlock.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/padlock.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/padlock.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/padlock.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-moreinforightpanel-module/copy.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-moreinforightpanel-module/copy.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-moreinforightpanel-module/copy.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-moreinforightpanel-module/copy.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/first.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/first.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/first.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/first.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/grid.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/grid.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/grid.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/grid.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/last.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/last.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/last.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/last.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/next.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/next.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/next.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/next.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/one_up.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/one_up.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/one_up.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/one_up.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/prev.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/prev.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/prev.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/prev.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/settings.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/settings.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/settings.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/settings.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/two_up.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/two_up.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/two_up.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pagingheaderpanel-module/two_up.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grab.cur b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grab.cur
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grab.cur
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grab.cur
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/shadow.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/shadow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/shadow.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/shadow.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/texture.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/texture.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/texture.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/texture.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/home.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/home.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/home.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/home.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/next.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/next.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/next.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/next.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/prev.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/prev.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/prev.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/prev.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/search.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/search.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/search.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/search.png
diff --git a/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/spinner.gif b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/spinner.gif
new file mode 100644
index 000000000..148005da2
Binary files /dev/null and b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-searchfooterpanel-module/spinner.gif differ
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_left.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_left.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_left.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_left.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_right.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_right.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_right.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/arrows_right.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/bookmark.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/bookmark.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/bookmark.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/bookmark.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close_attribution.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close_attribution.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close_attribution.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close_attribution.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close_information_box.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close_information_box.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close_information_box.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close_information_box.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close_message_box.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close_message_box.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/close_message_box.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/close_message_box.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-moreinforightpanel-module/copy.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/copy.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-moreinforightpanel-module/copy.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/copy.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/dialogue_arrow.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/dialogue_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/dialogue_arrow.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/dialogue_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/download.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/download.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/download.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/download.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/embed.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/embed.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/embed.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/embed.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/error.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/error.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/error.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/error.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/exit_fullscreen.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/exit_fullscreen.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/exit_fullscreen.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/exit_fullscreen.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/feedback.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/feedback.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/feedback.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/feedback.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/fullscreen.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/fullscreen.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/fullscreen.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/fullscreen.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/hidden_thumb.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/hidden_thumb.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/hidden_thumb.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/hidden_thumb.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/iiif.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/iiif.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/iiif.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/iiif.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/minus.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/minus.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/minus.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/minus.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/modal_bg.gif b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/modal_bg.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/modal_bg.gif
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/modal_bg.gif
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/moreinfo.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/moreinfo.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/moreinfo.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/moreinfo.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/open.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/open.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/open.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/open.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/plus.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/plus.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/plus.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/plus.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/print.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/print.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/print.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/print.png
diff --git a/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/search_result.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/search_result.png
new file mode 100644
index 000000000..a0fa494bf
Binary files /dev/null and b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/search_result.png differ
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/settings.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/settings.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/settings.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/settings.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/share.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/share.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/share.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/share.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/sprite.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/sprite.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/sprite.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/sprite.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/unavailable.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/unavailable.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-shared-module/unavailable.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-shared-module/unavailable.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png
diff --git a/dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png b/dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png
rename to dist/uv-2.0.0/themes/uv-cy-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-mediaelement-extension/theme.css b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-mediaelement-extension/theme.css
similarity index 96%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-mediaelement-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-mediaelement-extension/theme.css
index 8fd05de65..a207fe947 100644
--- a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-mediaelement-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-mediaelement-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -318,33 +318,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -2751,6 +2771,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -2788,47 +2815,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -2848,7 +2893,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -2858,16 +2902,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -3002,6 +3056,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-pdf-extension/theme.css b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-pdf-extension/theme.css
similarity index 97%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-pdf-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-pdf-extension/theme.css
index 620fb5522..00b175d67 100644
--- a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-pdf-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-pdf-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -318,33 +318,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -3607,6 +3627,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -3644,47 +3671,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -3704,7 +3749,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -3714,16 +3758,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -3858,6 +3912,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-seadragon-extension/theme.css b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-seadragon-extension/theme.css
similarity index 95%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-seadragon-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-seadragon-extension/theme.css
index e22e74a03..0c39ef957 100644
--- a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-seadragon-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-seadragon-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -626,6 +626,9 @@
opacity: 0.5;
filter: alpha(opacity=50);
}
+#app .centerPanel .content .searchOverlay.current {
+ border: 3px solid #fff;
+}
#app .openseadragon-canvas {
outline: none;
}
@@ -669,33 +672,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -935,6 +958,10 @@
float: left;
border: none;
}
+#app .footerPanel .search .searchTextContainer .searchText.searching {
+ background: url('../../img/uv-searchfooterpanel-module/spinner.gif') no-repeat;
+ background-position: right 3px;
+}
#app .footerPanel .search .searchTextContainer a.imageButton.searchButton {
background: url('../../img/uv-searchfooterpanel-module/search.png') no-repeat;
height: 18px;
@@ -967,6 +994,19 @@
width: 585px;
}
#app .footerPanel .searchPager .controls a.previousResult {
+ -webkit-touch-callout: none;
+ /* iOS Safari */
+ -webkit-user-select: none;
+ /* Chrome/Safari/Opera */
+ -khtml-user-select: none;
+ /* Konqueror */
+ -moz-user-select: none;
+ /* Firefox */
+ -ms-user-select: none;
+ /* Internet Explorer/Edge */
+ user-select: none;
+ /* Non-prefixed version, currently
+ not supported by any browser */
background-image: url('../../img/uv-searchfooterpanel-module/prev.png');
background-repeat: no-repeat;
height: 30px;
@@ -987,7 +1027,24 @@
color: #fff;
text-decoration: none;
}
+#app .footerPanel .searchPager .controls a.previousResult.disabled {
+ opacity: 0.25;
+ filter: alpha(opacity=25);
+}
#app .footerPanel .searchPager .controls a.nextResult {
+ -webkit-touch-callout: none;
+ /* iOS Safari */
+ -webkit-user-select: none;
+ /* Chrome/Safari/Opera */
+ -khtml-user-select: none;
+ /* Konqueror */
+ -moz-user-select: none;
+ /* Firefox */
+ -ms-user-select: none;
+ /* Internet Explorer/Edge */
+ user-select: none;
+ /* Non-prefixed version, currently
+ not supported by any browser */
background-image: url('../../img/uv-searchfooterpanel-module/next.png');
background-repeat: no-repeat;
height: 30px;
@@ -1008,7 +1065,24 @@
color: #fff;
text-decoration: none;
}
+#app .footerPanel .searchPager .controls a.nextResult.disabled {
+ opacity: 0.25;
+ filter: alpha(opacity=25);
+}
#app .footerPanel .searchPager .controls a.clearSearch {
+ -webkit-touch-callout: none;
+ /* iOS Safari */
+ -webkit-user-select: none;
+ /* Chrome/Safari/Opera */
+ -khtml-user-select: none;
+ /* Konqueror */
+ -moz-user-select: none;
+ /* Firefox */
+ -ms-user-select: none;
+ /* Internet Explorer/Edge */
+ user-select: none;
+ /* Non-prefixed version, currently
+ not supported by any browser */
cursor: pointer;
color: #26b5cc;
text-decoration: none;
@@ -2583,6 +2657,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -2620,47 +2701,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -2680,7 +2779,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -2690,16 +2788,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -2834,6 +2942,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-virtex-extension/theme.css b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-virtex-extension/theme.css
similarity index 96%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-virtex-extension/theme.css
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-virtex-extension/theme.css
index 7560f47d7..0daab7cd8 100644
--- a/dist/uv-1.8.38/themes/uv-en-GB-theme/css/uv-virtex-extension/theme.css
+++ b/dist/uv-2.0.0/themes/uv-en-GB-theme/css/uv-virtex-extension/theme.css
@@ -2,7 +2,7 @@
color: #000;
}
#app .overlay.share {
- width: 270px;
+ width: 280px;
padding: 0 0 30px 8px;
}
#app .overlay.share .middle .content .tabs {
@@ -318,33 +318,53 @@
#app .leftPanel .views .thumbsView .thumbs .thumb.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb span {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info {
+ overflow: hidden;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info span {
font-size: 11px;
color: #fff;
display: block;
padding: 2px 0 0 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb .label {
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .index {
+ float: left;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .label {
+ float: left;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+#app .leftPanel .views .thumbsView .thumbs .thumb .info .searchResults {
+ float: right;
+ width: 35px;
+ overflow-x: hidden;
+ text-overflow: ellipsis;
+ color: #14a4c3;
+ padding-left: 14px;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
#app .leftPanel .views .thumbsView .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol {
margin: 0 0 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .label {
+ width: 178px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.oneCol .wrap {
width: 208px;
max-height: 373px;
}
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol {
margin: 0 7px 7px 0;
}
-#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap,
#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .label {
+ width: 63px;
+}
+#app .leftPanel .views .thumbsView .thumbs .thumb.twoCol .wrap {
width: 98px;
max-height: 182px;
}
@@ -2028,6 +2048,13 @@ input[type=range]:focus::-ms-fill-upper {
padding: 0 10px 0 0;
overflow: auto;
}
+.iiif-gallery-component *,
+.iiif-gallery-component *:before,
+.iiif-gallery-component *:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
.iiif-gallery-component .header {
overflow: hidden;
height: 45px;
@@ -2065,47 +2092,65 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-gallery-component .main {
overflow: auto;
overflow-x: hidden;
+ height: 1000px;
}
.iiif-gallery-component .main .thumbs {
margin-right: 10px;
overflow: hidden;
position: relative;
}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb input {
+ display: none;
+}
.iiif-gallery-component .main .thumbs.multiSelect .thumb .wrap.multiSelected {
+ background: none;
+ border: 2px solid transparent;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea input {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs.multiSelect .thumb.insideScrollArea .wrap.multiSelected {
border: 2px solid #14a4c3;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap {
+.iiif-gallery-component .main .thumbs .thumb {
+ margin: 0 7px 7px 0;
+}
+.iiif-gallery-component .main .thumbs .thumb .wrap {
border: 2px solid transparent;
+ padding: 2px;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea .wrap img {
+.iiif-gallery-component .main .thumbs .thumb .wrap img {
display: none;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea span {
+.iiif-gallery-component .main .thumbs .thumb .info span {
color: transparent;
+ padding: 2px 0 0 0;
}
-.iiif-gallery-component .main .thumbs.chunked .thumb.outsideScrollArea.selected .wrap {
- border: 2px solid transparent;
-}
-.iiif-gallery-component .main .thumbs.chunked.multiSelect .thumb.outsideScrollArea .wrap.multiSelected {
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
background: none;
- border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb {
- margin: 0 7px 7px 0;
+.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+ border: 2px solid transparent;
}
-.iiif-gallery-component .main .thumbs .thumb .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap {
border: 2px solid #373737;
- padding: 2px;
}
-.iiif-gallery-component .main .thumbs .thumb.selected .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .wrap img {
+ display: block;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info span {
+ color: #fff;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea .info .searchResults {
+ color: #14a4c3;
+ background: url('../../img/uv-shared-module/search_result.png') no-repeat 0px 3px;
+}
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.selected .wrap {
border: 2px solid #fff;
}
-.iiif-gallery-component .main .thumbs .thumb.searchpreview .wrap {
+.iiif-gallery-component .main .thumbs .thumb.insideScrollArea.searchpreview .wrap {
border: 2px solid #26b5cc;
}
-.iiif-gallery-component .main .thumbs .thumb span {
- padding: 2px 0 0 0;
-}
.iiif-gallery-component .main .thumbs .thumb {
float: left;
cursor: pointer;
@@ -2125,7 +2170,6 @@ input[type=range]:focus::-ms-fill-upper {
background: url('../../img/uv-shared-module/hidden_thumb.png') no-repeat 50% 50%;
}
.iiif-gallery-component .main .thumbs .thumb .wrap img {
- display: block;
max-width: 100%;
max-height: 100%;
}
@@ -2135,16 +2179,26 @@ input[type=range]:focus::-ms-fill-upper {
top: 0px;
left: 0px;
}
-.iiif-gallery-component .main .thumbs .thumb span {
+.iiif-gallery-component .main .thumbs .thumb .info {
+ overflow: hidden;
+}
+.iiif-gallery-component .main .thumbs .thumb .info span {
font-size: 11px;
- color: #fff;
display: block;
-}
-.iiif-gallery-component .main .thumbs .thumb .label {
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
+.iiif-gallery-component .main .thumbs .thumb .info .index,
+.iiif-gallery-component .main .thumbs .thumb .info .label {
+ float: left;
+}
+.iiif-gallery-component .main .thumbs .thumb .info .searchResults {
+ display: none;
+ float: right;
+ width: 32px;
+ padding-left: 14px;
+}
.iiif-gallery-component .main .thumbs .thumb.placeholder .wrap {
background: url('../../img/uv-shared-module/unavailable.png') no-repeat 50% 50%;
}
@@ -2279,6 +2333,10 @@ input[type=range]:focus::-ms-fill-upper {
.iiif-metadata-component .groups .group .items .item .value img {
max-width: 100px;
}
+.iiif-metadata-component .groups .group .items .item a.value {
+ display: block;
+ color: #26b5cc;
+}
@media only screen and (min-width: 0px) and (max-width: 640px) {
#app .headerPanel {
display: none;
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/hamburger.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/hamburger.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/hamburger.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/hamburger.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/padlock.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/padlock.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/padlock.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/padlock.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-contentleftpanel-module/thumb_placeholder.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/bigplay.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome-bg.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/controls-wellcome.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-mediaelementcenterpanel-module/loading.gif
diff --git a/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-moreinforightpanel-module/copy.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-moreinforightpanel-module/copy.png
new file mode 100644
index 000000000..0e64490c4
Binary files /dev/null and b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-moreinforightpanel-module/copy.png differ
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/rotate_right.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_in.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-osdmobilefooterpanel-module/zoom_out.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/first.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/first.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/first.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/first.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/grid.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/grid.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/grid.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/grid.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/last.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/last.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/last.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/last.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/next.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/next.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/next.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/next.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/one_up.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/one_up.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/one_up.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/one_up.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/prev.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/prev.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/prev.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/prev.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/settings.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/settings.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/settings.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/settings.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/two_up.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/two_up.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/two_up.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pagingheaderpanel-module/two_up.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-check.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-comment.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-help.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-insert.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-key.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-newparagraph.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-noicon.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-note.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/annotation-paragraph.svg
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-next@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/findbarButton-previous@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grab.cur b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grab.cur
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grab.cur
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grab.cur
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/grabbing.cur
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-icon.gif
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/loading-small.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-documentProperties@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-firstPage@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-handTool@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-lastPage@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCcw@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/secondaryToolbarButton-rotateCw@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/shadow.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/shadow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/shadow.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/shadow.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/texture.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/texture.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/texture.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/texture.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-bookmark@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-download@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-menuArrows@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-openFile@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageDown@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-pageUp@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-presentationMode@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-print@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-search@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-secondaryToolbarToggle@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-sidebarToggle@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewAttachments.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline-rtl@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewOutline@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-viewThumbnail@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomIn@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-pdfcenterpanel-module/toolbarButton-zoomOut@2x.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/down_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/home.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/home.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/home.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/home.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/left_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/pixel.gif
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/right_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/rotate_right.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/up_arrow_disabled.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_in.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-seadragoncenterpanel-module/zoom_out.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/next.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/next.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/next.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/next.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_down_hover.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/placemarker_up.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/prev.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/prev.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/prev.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/prev.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/search.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/search.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/search.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/search.png
diff --git a/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/spinner.gif b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/spinner.gif
new file mode 100644
index 000000000..148005da2
Binary files /dev/null and b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-searchfooterpanel-module/spinner.gif differ
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/arrows_left.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/arrows_left.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/arrows_left.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/arrows_left.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/arrows_right.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/arrows_right.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/arrows_right.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/arrows_right.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/bookmark.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/bookmark.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/bookmark.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/bookmark.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close_attribution.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close_attribution.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close_attribution.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close_attribution.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close_information_box.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close_information_box.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close_information_box.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close_information_box.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close_message_box.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close_message_box.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/close_message_box.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/close_message_box.png
diff --git a/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/copy.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/copy.png
new file mode 100644
index 000000000..0e64490c4
Binary files /dev/null and b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/copy.png differ
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/dialogue_arrow.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/dialogue_arrow.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/dialogue_arrow.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/dialogue_arrow.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/download.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/download.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/download.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/download.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/embed.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/embed.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/embed.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/embed.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/error.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/error.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/error.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/error.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/exit_fullscreen.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/exit_fullscreen.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/exit_fullscreen.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/exit_fullscreen.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/feedback.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/feedback.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/feedback.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/feedback.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/fullscreen.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/fullscreen.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/fullscreen.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/fullscreen.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/hidden_thumb.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/hidden_thumb.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/hidden_thumb.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/hidden_thumb.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/iiif.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/iiif.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/iiif.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/iiif.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/minus.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/minus.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/minus.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/minus.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/modal_bg.gif b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/modal_bg.gif
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/modal_bg.gif
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/modal_bg.gif
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/moreinfo.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/moreinfo.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/moreinfo.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/moreinfo.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/open.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/open.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/open.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/open.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/plus.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/plus.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/plus.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/plus.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/print.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/print.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/print.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/print.png
diff --git a/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/search_result.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/search_result.png
new file mode 100644
index 000000000..a0fa494bf
Binary files /dev/null and b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/search_result.png differ
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/settings.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/settings.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/settings.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/settings.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/share.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/share.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/share.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/share.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/sprite.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/sprite.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/sprite.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/sprite.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/unavailable.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/unavailable.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-shared-module/unavailable.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-shared-module/unavailable.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_in.png
diff --git a/dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png b/dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png
similarity index 100%
rename from dist/uv-1.8.38/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png
rename to dist/uv-2.0.0/themes/uv-en-GB-theme/img/uv-virtexcenterpanel-module/zoom_out.png
diff --git a/examples b/examples
index f609aac2d..04e991206 160000
--- a/examples
+++ b/examples
@@ -1 +1 @@
-Subproject commit f609aac2da95059e380bad128ebaed24f1e5b4af
+Subproject commit 04e991206dcb16c5728f93629ac0ae6c0537759d
diff --git a/package.json b/package.json
index fd5c8ce5a..d986135f1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "universalviewer",
- "version": "1.8.38",
+ "version": "2.0.0",
"description": "The Universal Viewer is an open source project to enable cultural heritage institutions to present their digital artifacts in an IIIF-compliant and highly customisable user interface.",
"repository": {
"type": "git",
@@ -19,7 +19,7 @@
"homepage": "https://github.com/universalviewer/universalviewer",
"devDependencies": {
"async": "^0.9.0",
- "base-component": "viewdir/base-component",
+ "base-component": "viewdir/base-component#v1.0.8",
"chalk": "^0.5.1",
"cucumber": "^0.4.5",
"eventemitter2": "^1.0.3",
@@ -41,17 +41,16 @@
"grunt-typescript": "^0.8.0",
"hooker": "^0.2.3",
"http-status-codes": "edsilv/http-status-codes",
- "iiif-gallery-component": "viewdir/iiif-gallery-component#v1.0.0",
- "iiif-metadata-component": "viewdir/iiif-metadata-component#v1.0.1",
- "iiif-tree-component": "viewdir/iiif-tree-component#v1.0.2",
+ "iiif-gallery-component": "viewdir/iiif-gallery-component#v1.0.6",
+ "iiif-metadata-component": "viewdir/iiif-metadata-component#v1.0.10",
+ "iiif-tree-component": "viewdir/iiif-tree-component#v1.0.7",
"jquery-plugins": "edsilv/jquery-plugins",
"jquery-tiny-pubsub": "edsilv/jquery-tiny-pubsub",
"json-schema-generator": "krg7880/json-schema-generator",
"key-codes": "edsilv/key-codes",
"less": "^2.4.0",
"lodash": "^3.1.0",
- "manifesto": "viewdir/manifesto#v0.3.0",
- "manifold": "viewdir/manifold#v1.1.0",
+ "manifold": "viewdir/manifold#v1.1.11",
"ncp": "^2.0.0",
"openseadragon": "^2.2.1",
"protractor": "1.3.1",
diff --git a/src/BootstrapParams.ts b/src/BootstrapParams.ts
index 419c7b471..e76316adb 100644
--- a/src/BootstrapParams.ts
+++ b/src/BootstrapParams.ts
@@ -17,7 +17,7 @@ class BootstrapParams {
locales: any[];
manifestIndex: number;
manifestUri: string;
- paramMap: string[] = ['c', 'm', 's', 'cv', 'z', 'r', 'h', 'a']; // todo: move z, r, h, a to their respective extensions
+ paramMap: string[] = ['c', 'm', 's', 'cv', 'xywh', 'r', 'h', 'a']; // todo: move xywh, r, h, a to their respective extensions
sequenceIndex: number;
constructor() {
@@ -46,7 +46,7 @@ class BootstrapParams {
}
getParam(param: Params): any {
- if (this.hashParamsAvailable()){
+ if (this.hashParamsAvailable()) {
// get param from parent document
var p = parseInt(Utils.Urls.getHashParameter(this.paramMap[param], parent.document));
if (p || p === 0) return p;
diff --git a/src/Bootstrapper.ts b/src/Bootstrapper.ts
index 4a0bac158..d20eb9bf2 100644
--- a/src/Bootstrapper.ts
+++ b/src/Bootstrapper.ts
@@ -58,14 +58,14 @@ class Bootstrapper{
var sequence: Manifesto.ISequence = helper.getSequenceByIndex(this.params.sequenceIndex);
- if (!sequence){
+ if (!sequence) {
this.notFound();
return;
}
var canvas: Manifesto.ICanvas = helper.getCanvasByIndex(this.params.canvasIndex);
- if (!canvas){
+ if (!canvas) {
this.notFound();
return;
}
@@ -76,13 +76,13 @@ class Bootstrapper{
var extension: IExtension = this.extensions[canvasType.toString()];
// if there isn't an extension for the canvasType, try the format
- if (!extension){
+ if (!extension) {
var format = canvas.getProperty('format');
extension = this.extensions[format];
}
// if there still isn't a matching extension, show an error.
- if (!extension){
+ if (!extension) {
alert("No matching UV extension found.");
return;
}
@@ -107,7 +107,7 @@ class Bootstrapper{
return (null === this.params.jsonp) ? Modernizr.cors : !this.params.jsonp;
}
- notFound(): void{
+ notFound(): void {
try{
parent.$(parent.document).trigger(BaseCommands.NOT_FOUND);
return;
@@ -189,12 +189,12 @@ class Bootstrapper{
// todo: use a compiler flag when available
var cssPath = (window.DEBUG)? 'extensions/' + extension.name + '/build/' + config.options.theme + '.css' : 'themes/' + config.options.theme + '/css/' + extension.name + '/theme.css';
- yepnope.injectCss(cssPath, function () {
+ yepnope.injectCss(cssPath, function() {
cb();
});
}
- createExtension(extension: any, config: any): void{
+ createExtension(extension: any, config: any): void {
this.config = config;
var helper = extension.helper;
this.extension = new extension.type(this);
diff --git a/src/Params.ts b/src/Params.ts
index 221ef2211..f13c2317b 100644
--- a/src/Params.ts
+++ b/src/Params.ts
@@ -1,9 +1,11 @@
+
+// do not change order, index is important!
enum Params {
collectionIndex,
manifestIndex,
sequenceIndex,
canvasIndex,
- zoom,
+ xywh,
rotation,
highlight,
anchor
diff --git a/src/_Version.ts b/src/_Version.ts
index ec126fc26..abac5c6ca 100644
--- a/src/_Version.ts
+++ b/src/_Version.ts
@@ -1 +1 @@
-export var Version = '1.8.38';
\ No newline at end of file
+export var Version = '2.0.0';
\ No newline at end of file
diff --git a/src/extensions/uv-mediaelement-extension/lib/iiif-metadata-component.js b/src/extensions/uv-mediaelement-extension/lib/iiif-metadata-component.js
index 1481b91e8..2223e4e5f 100644
--- a/src/extensions/uv-mediaelement-extension/lib/iiif-metadata-component.js
+++ b/src/extensions/uv-mediaelement-extension/lib/iiif-metadata-component.js
@@ -1,4 +1,4 @@
-// iiif-metadata-component v1.0.0 https://github.com/viewdir/iiif-metadata-component#readme
+// iiif-metadata-component v1.0.10 https://github.com/viewdir/iiif-metadata-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifMetadataComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\
');
this._$metadataItemValueTemplate = $('
');
+ this._$metadataItemURIValueTemplate = $(' ');
this._$copyTextTemplate = $('\
' + this.options.content.copiedToClipboard + '
\
');
@@ -282,7 +283,8 @@ var IIIFComponents;
var $metadataItem = this._$metadataItemTemplate.clone();
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
- var label = item.getLabel();
+ var originalLabel = item.getLabel();
+ var label = originalLabel;
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
@@ -306,29 +308,50 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var value;
var $value;
- if (this.options.showAllLanguages && item.value && item.value.length > 1) {
- for (var i = 0; i < item.value.length; i++) {
- var translation = item.value[i];
- $value = this._buildMetadataItemValue(translation.value, translation.locale);
- $values.append($value);
- }
+ // if the value is a URI
+ if (originalLabel && originalLabel.toLowerCase() === "license") {
+ $value = this._buildMetadataItemURIValue(item.value[0].value);
+ $values.append($value);
}
else {
- $value = this._buildMetadataItemValue(item.getValue(), this._getItemLocale(item));
- $values.append($value);
+ if (this.options.showAllLanguages && item.value && item.value.length > 1) {
+ // display all values in each locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ else {
+ var itemLocale = this._getItemLocale(item);
+ var valueFound = false;
+ // display all values in the item's locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ if (itemLocale === translation.locale) {
+ valueFound = true;
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ // if no values were found in the current locale, default to the first.
+ if (!valueFound) {
+ var translation = item.value[0];
+ if (translation) {
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ }
}
- if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $value.text() && $label.text()) {
- this._addCopyButton($metadataItem, $label);
+ if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $label.text()) {
+ this._addCopyButton($metadataItem, $label, $values);
}
return $metadataItem;
};
MetadataComponent.prototype._getItemLocale = function (item) {
- if (item.value && item.value.length) {
- return item.value[0].locale;
- }
- else {
- return item.defaultLocale || this.options.helper.options.locale;
- }
+ // the item's label locale takes precedence
+ return (item.label.length && item.label[0].locale) ? item.label[0].locale : item.defaultLocale || this.options.helper.options.locale;
};
MetadataComponent.prototype._buildMetadataItemValue = function (value, locale) {
value = this._sanitize(value);
@@ -342,6 +365,13 @@ var IIIFComponents;
}
return $value;
};
+ MetadataComponent.prototype._buildMetadataItemURIValue = function (value) {
+ value = this._sanitize(value);
+ var $value = this._$metadataItemURIValueTemplate.clone();
+ $value.prop('href', value);
+ $value.text(value);
+ return $value;
+ };
MetadataComponent.prototype._addReadingDirection = function ($elem, locale) {
locale = Manifesto.Utils.getInexactLocale(locale);
var rtlLanguages = this._readCSV(this.options.rtlLanguageCodes);
@@ -351,7 +381,7 @@ var IIIFComponents;
$elem.addClass('rtl');
}
};
- MetadataComponent.prototype._addCopyButton = function ($elem, $header) {
+ MetadataComponent.prototype._addCopyButton = function ($elem, $header, $values) {
var $copyBtn = this._$copyTextTemplate.clone();
var $copiedText = $copyBtn.children();
$header.append($copyBtn);
@@ -370,20 +400,13 @@ var IIIFComponents;
});
}
var that = this;
+ var originalValue = $values.text();
$copyBtn.on('click', function (e) {
- var $this = $(this);
- var $item = $this.closest('.item');
- that._copyItemValues($this, $item);
+ that._copyItemValues($copyBtn, originalValue);
});
};
- MetadataComponent.prototype._copyItemValues = function ($copyButton, $item) {
- var $values = $item.find('.value');
- var values = "";
- for (var i = 0; i < $values.length; i++) {
- var value = $($values[i]).text();
- values.length ? values += '\n' + value : values += value;
- }
- Utils.Clipboard.copy(values);
+ MetadataComponent.prototype._copyItemValues = function ($copyButton, originalValue) {
+ Utils.Clipboard.copy(originalValue);
var $copiedText = $copyButton.find('.copiedText');
$copiedText.show();
setTimeout(function () {
diff --git a/src/extensions/uv-pdf-extension/lib/iiif-metadata-component.js b/src/extensions/uv-pdf-extension/lib/iiif-metadata-component.js
index 1481b91e8..2223e4e5f 100644
--- a/src/extensions/uv-pdf-extension/lib/iiif-metadata-component.js
+++ b/src/extensions/uv-pdf-extension/lib/iiif-metadata-component.js
@@ -1,4 +1,4 @@
-// iiif-metadata-component v1.0.0 https://github.com/viewdir/iiif-metadata-component#readme
+// iiif-metadata-component v1.0.10 https://github.com/viewdir/iiif-metadata-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifMetadataComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\
');
this._$metadataItemValueTemplate = $('
');
+ this._$metadataItemURIValueTemplate = $(' ');
this._$copyTextTemplate = $('\
' + this.options.content.copiedToClipboard + '
\
');
@@ -282,7 +283,8 @@ var IIIFComponents;
var $metadataItem = this._$metadataItemTemplate.clone();
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
- var label = item.getLabel();
+ var originalLabel = item.getLabel();
+ var label = originalLabel;
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
@@ -306,29 +308,50 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var value;
var $value;
- if (this.options.showAllLanguages && item.value && item.value.length > 1) {
- for (var i = 0; i < item.value.length; i++) {
- var translation = item.value[i];
- $value = this._buildMetadataItemValue(translation.value, translation.locale);
- $values.append($value);
- }
+ // if the value is a URI
+ if (originalLabel && originalLabel.toLowerCase() === "license") {
+ $value = this._buildMetadataItemURIValue(item.value[0].value);
+ $values.append($value);
}
else {
- $value = this._buildMetadataItemValue(item.getValue(), this._getItemLocale(item));
- $values.append($value);
+ if (this.options.showAllLanguages && item.value && item.value.length > 1) {
+ // display all values in each locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ else {
+ var itemLocale = this._getItemLocale(item);
+ var valueFound = false;
+ // display all values in the item's locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ if (itemLocale === translation.locale) {
+ valueFound = true;
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ // if no values were found in the current locale, default to the first.
+ if (!valueFound) {
+ var translation = item.value[0];
+ if (translation) {
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ }
}
- if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $value.text() && $label.text()) {
- this._addCopyButton($metadataItem, $label);
+ if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $label.text()) {
+ this._addCopyButton($metadataItem, $label, $values);
}
return $metadataItem;
};
MetadataComponent.prototype._getItemLocale = function (item) {
- if (item.value && item.value.length) {
- return item.value[0].locale;
- }
- else {
- return item.defaultLocale || this.options.helper.options.locale;
- }
+ // the item's label locale takes precedence
+ return (item.label.length && item.label[0].locale) ? item.label[0].locale : item.defaultLocale || this.options.helper.options.locale;
};
MetadataComponent.prototype._buildMetadataItemValue = function (value, locale) {
value = this._sanitize(value);
@@ -342,6 +365,13 @@ var IIIFComponents;
}
return $value;
};
+ MetadataComponent.prototype._buildMetadataItemURIValue = function (value) {
+ value = this._sanitize(value);
+ var $value = this._$metadataItemURIValueTemplate.clone();
+ $value.prop('href', value);
+ $value.text(value);
+ return $value;
+ };
MetadataComponent.prototype._addReadingDirection = function ($elem, locale) {
locale = Manifesto.Utils.getInexactLocale(locale);
var rtlLanguages = this._readCSV(this.options.rtlLanguageCodes);
@@ -351,7 +381,7 @@ var IIIFComponents;
$elem.addClass('rtl');
}
};
- MetadataComponent.prototype._addCopyButton = function ($elem, $header) {
+ MetadataComponent.prototype._addCopyButton = function ($elem, $header, $values) {
var $copyBtn = this._$copyTextTemplate.clone();
var $copiedText = $copyBtn.children();
$header.append($copyBtn);
@@ -370,20 +400,13 @@ var IIIFComponents;
});
}
var that = this;
+ var originalValue = $values.text();
$copyBtn.on('click', function (e) {
- var $this = $(this);
- var $item = $this.closest('.item');
- that._copyItemValues($this, $item);
+ that._copyItemValues($copyBtn, originalValue);
});
};
- MetadataComponent.prototype._copyItemValues = function ($copyButton, $item) {
- var $values = $item.find('.value');
- var values = "";
- for (var i = 0; i < $values.length; i++) {
- var value = $($values[i]).text();
- values.length ? values += '\n' + value : values += value;
- }
- Utils.Clipboard.copy(values);
+ MetadataComponent.prototype._copyItemValues = function ($copyButton, originalValue) {
+ Utils.Clipboard.copy(originalValue);
var $copiedText = $copyButton.find('.copiedText');
$copiedText.show();
setTimeout(function () {
diff --git a/src/extensions/uv-seadragon-extension/Bounds.ts b/src/extensions/uv-seadragon-extension/Bounds.ts
new file mode 100644
index 000000000..18ece7209
--- /dev/null
+++ b/src/extensions/uv-seadragon-extension/Bounds.ts
@@ -0,0 +1,25 @@
+class Bounds {
+
+ public x: number;
+ public y: number;
+ public w: number;
+ public h: number;
+
+ constructor(x: number, y: number, w: number, h: number) {
+ this.x = x;
+ this.y = y;
+ this.w = w;
+ this.h = h;
+ }
+
+ toString(): string {
+ return `${this.x},${this.y},${this.w},${this.h}`
+ }
+
+ static fromString(bounds: string): Bounds {
+ var boundsArr: string[] = bounds.split(',');
+ return new Bounds(Number(boundsArr[0]), Number(boundsArr[1]), Number(boundsArr[2]), Number(boundsArr[3]));
+ }
+}
+
+export = Bounds;
\ No newline at end of file
diff --git a/src/extensions/uv-seadragon-extension/Commands.ts b/src/extensions/uv-seadragon-extension/Commands.ts
index cb82f4c59..de526e9f4 100644
--- a/src/extensions/uv-seadragon-extension/Commands.ts
+++ b/src/extensions/uv-seadragon-extension/Commands.ts
@@ -1,46 +1,51 @@
class Commands {
static namespace: string = 'seadragonExtension.';
- static CLEAR_SEARCH: string = Commands.namespace + 'onClearSearch';
- static CURRENT_VIEW_URI: string = Commands.namespace + 'onCurrentViewUri';
- static FIRST: string = Commands.namespace + 'onFirst';
- static GALLERY_DECREASE_SIZE: string = Commands.namespace + 'onGalleryDecreaseSize';
- static GALLERY_INCREASE_SIZE: string = Commands.namespace + 'onGalleryIncreaseSize';
- static GALLERY_THUMB_SELECTED: string = Commands.namespace + 'onGalleryThumbSelected';
- static HIDE_MULTISELECT_DIALOGUE: string = Commands.namespace + 'onHideMultiSelectDialogue';
- static IMAGE_SEARCH: string = Commands.namespace + 'onImageSearch';
- static LAST: string = Commands.namespace + 'onLast';
- static MODE_CHANGED: string = Commands.namespace + 'onModeChanged';
- static MULTISELECT_CHANGE: string = Commands.namespace + 'onMultiSelectChange';
- static MULTISELECTION_MADE: string = Commands.namespace + 'onMultiSelectionMade';
- static NEXT_SEARCH_RESULT: string = Commands.namespace + 'onNextSearchResult';
- static NEXT: string = Commands.namespace + 'onNext';
- static OPEN_THUMBS_VIEW: string = Commands.namespace + 'onOpenThumbsView';
- static OPEN_TREE_VIEW: string = Commands.namespace + 'onOpenTreeView';
- static PAGE_SEARCH: string = Commands.namespace + 'onPageSearch';
- static PAGING_TOGGLED: string = Commands.namespace + 'onPagingToggled';
- static PREV_SEARCH_RESULT: string = Commands.namespace + 'onPrevSearchResult';
- static PREV: string = Commands.namespace + 'onPrev';
- static PRINT: string = Commands.namespace + 'onPrint';
- static ROTATE: string = Commands.namespace + 'onRotate';
- static SEADRAGON_ANIMATION_FINISH: string = Commands.namespace + 'onAnimationfinish';
- static SEADRAGON_ANIMATION_START: string = Commands.namespace + 'onAnimationStart';
- static SEADRAGON_ANIMATION: string = Commands.namespace + 'onAnimation';
- static SEADRAGON_OPEN: string = Commands.namespace + 'onOpen';
- static SEADRAGON_RESIZE: string = Commands.namespace + 'onResize';
- static SEADRAGON_ROTATION: string = Commands.namespace + 'onRotation';
- static SEARCH_PREVIEW_FINISH: string = Commands.namespace + 'onSearchPreviewFinish';
- static SEARCH_PREVIEW_START: string = Commands.namespace + 'onSearchPreviewStart';
- static SEARCH_RESULTS_EMPTY: string = Commands.namespace + 'onSearchResultsEmpty';
- static SEARCH_RESULTS: string = Commands.namespace + 'onSearchResults';
- static SEARCH: string = Commands.namespace + 'onSearch';
- static SHOW_MULTISELECT_DIALOGUE: string = Commands.namespace + 'onShowMultiSelectDialogue';
- static THUMB_MULTISELECTED: string = Commands.namespace + 'onThumbMultiSelected';
- static TREE_NODE_MULTISELECTED: string = Commands.namespace + 'onTreeNodeMultiSelected';
- static TREE_NODE_SELECTED: string = Commands.namespace + 'onTreeNodeSelected';
- static VIEW_PAGE: string = Commands.namespace + 'onViewPage';
- static ZOOM_IN: string = Commands.namespace + 'onZoomIn';
- static ZOOM_OUT: string = Commands.namespace + 'onZoomOut';
+ static CLEAR_SEARCH: string = Commands.namespace + 'onClearSearch';
+ static CURRENT_VIEW_URI: string = Commands.namespace + 'onCurrentViewUri';
+ static FIRST: string = Commands.namespace + 'onFirst';
+ static GALLERY_DECREASE_SIZE: string = Commands.namespace + 'onGalleryDecreaseSize';
+ static GALLERY_INCREASE_SIZE: string = Commands.namespace + 'onGalleryIncreaseSize';
+ static GALLERY_THUMB_SELECTED: string = Commands.namespace + 'onGalleryThumbSelected';
+ static HIDE_MULTISELECT_DIALOGUE: string = Commands.namespace + 'onHideMultiSelectDialogue';
+ static IMAGE_SEARCH: string = Commands.namespace + 'onImageSearch';
+ static LAST: string = Commands.namespace + 'onLast';
+ static MODE_CHANGED: string = Commands.namespace + 'onModeChanged';
+ static MULTISELECT_CHANGE: string = Commands.namespace + 'onMultiSelectChange';
+ static MULTISELECTION_MADE: string = Commands.namespace + 'onMultiSelectionMade';
+ static NEXT_SEARCH_RESULT: string = Commands.namespace + 'onNextSearchResult';
+ static NEXT: string = Commands.namespace + 'onNext';
+ static NEXT_IMAGES_SEARCH_RESULT_UNAVAILABLE: string = Commands.namespace + 'onNextImagesSearchResultUnavailable';
+ static PREV_IMAGES_SEARCH_RESULT_UNAVAILABLE: string = Commands.namespace + 'onPrevImagesSearchResultUnavailable';
+ static OPEN_THUMBS_VIEW: string = Commands.namespace + 'onOpenThumbsView';
+ static OPEN_TREE_VIEW: string = Commands.namespace + 'onOpenTreeView';
+ static PAGE_SEARCH: string = Commands.namespace + 'onPageSearch';
+ static PAGING_TOGGLED: string = Commands.namespace + 'onPagingToggled';
+ static PREV_SEARCH_RESULT: string = Commands.namespace + 'onPrevSearchResult';
+ static PREV: string = Commands.namespace + 'onPrev';
+ static PRINT: string = Commands.namespace + 'onPrint';
+ static ROTATE: string = Commands.namespace + 'onRotate';
+ static SEADRAGON_ANIMATION_FINISH: string = Commands.namespace + 'onAnimationfinish';
+ static SEADRAGON_ANIMATION_START: string = Commands.namespace + 'onAnimationStart';
+ static SEADRAGON_ANIMATION: string = Commands.namespace + 'onAnimation';
+ static SEADRAGON_OPEN: string = Commands.namespace + 'onOpen';
+ static SEADRAGON_RESIZE: string = Commands.namespace + 'onResize';
+ static SEADRAGON_ROTATION: string = Commands.namespace + 'onRotation';
+ static SEARCH_PREVIEW_FINISH: string = Commands.namespace + 'onSearchPreviewFinish';
+ static SEARCH_PREVIEW_START: string = Commands.namespace + 'onSearchPreviewStart';
+ static SEARCH_RESULT_CANVAS_CHANGED: string = Commands.namespace + 'onSearchResultCanvasChanged';
+ static SEARCH_RESULT_RECT_CHANGED: string = Commands.namespace + 'onSearchResultRectChanged';
+ static SEARCH_RESULTS_EMPTY: string = Commands.namespace + 'onSearchResultsEmpty';
+ static SEARCH_RESULTS: string = Commands.namespace + 'onSearchResults';
+ static SEARCH_RESULTS_CLEARED: string = Commands.namespace + 'onSearchResultsCleared';
+ static SEARCH: string = Commands.namespace + 'onSearch';
+ static SHOW_MULTISELECT_DIALOGUE: string = Commands.namespace + 'onShowMultiSelectDialogue';
+ static THUMB_MULTISELECTED: string = Commands.namespace + 'onThumbMultiSelected';
+ static TREE_NODE_MULTISELECTED: string = Commands.namespace + 'onTreeNodeMultiSelected';
+ static TREE_NODE_SELECTED: string = Commands.namespace + 'onTreeNodeSelected';
+ static VIEW_PAGE: string = Commands.namespace + 'onViewPage';
+ static ZOOM_IN: string = Commands.namespace + 'onZoomIn';
+ static ZOOM_OUT: string = Commands.namespace + 'onZoomOut';
}
export = Commands;
\ No newline at end of file
diff --git a/src/extensions/uv-seadragon-extension/DownloadDialogue.ts b/src/extensions/uv-seadragon-extension/DownloadDialogue.ts
index 74ba44611..8076c644b 100644
--- a/src/extensions/uv-seadragon-extension/DownloadDialogue.ts
+++ b/src/extensions/uv-seadragon-extension/DownloadDialogue.ts
@@ -17,9 +17,7 @@ class DownloadDialogue extends BaseDownloadDialogue {
$explanatoryTextTemplate: JQuery;
$imageOptionsContainer: JQuery;
$imageOptions: JQuery;
- //$pagingNote: JQuery;
$selectionButton: JQuery;
- //$settingsButton: JQuery;
$sequenceOptionsContainer: JQuery;
$sequenceOptions: JQuery;
$wholeImageHighResButton: JQuery;
@@ -92,7 +90,7 @@ class DownloadDialogue extends BaseDownloadDialogue {
this.$downloadButton.on('click', (e) => {
e.preventDefault();
- var $selectedOption = that.getSelectedOption();
+ var $selectedOption: JQuery = that.getSelectedOption();
var id: string = $selectedOption.attr('id');
var label: string = $selectedOption.attr('title');
@@ -101,15 +99,15 @@ class DownloadDialogue extends BaseDownloadDialogue {
var canvas: Manifesto.ICanvas = this.extension.helper.getCurrentCanvas();
if (this.renderingUrls[id]) {
- if (mime){
- if (mime.toLowerCase().indexOf('pdf') !== -1){
+ if (mime) {
+ if (mime.toLowerCase().indexOf('pdf') !== -1) {
type = DownloadType.ENTIREDOCUMENTASPDF;
- } else if (mime.toLowerCase().indexOf('txt') !== -1){
+ } else if (mime.toLowerCase().indexOf('txt') !== -1) {
type = DownloadType.ENTIREDOCUMENTASTEXT;
}
}
- if (type = DownloadType.ENTIREDOCUMENTASPDF){
+ if (type = DownloadType.ENTIREDOCUMENTASPDF) {
//var printService: Manifesto.IService = this.extension.helper.manifest.getService(manifesto.ServiceProfile.printExtensions());
// if downloading a pdf - if there's a print service, generate an event instead of opening a new window.
@@ -120,7 +118,7 @@ class DownloadDialogue extends BaseDownloadDialogue {
//}
}
} else {
- switch (id){
+ switch (id) {
case DownloadOption.currentViewAsJpg.toString():
var viewer = (that.extension).getViewer();
window.open((that.extension).getCroppedImageUri(canvas, viewer));
@@ -549,12 +547,16 @@ class DownloadDialogue extends BaseDownloadDialogue {
case DownloadOption.dynamicCanvasRenderings:
case DownloadOption.dynamicImageRenderings:
case DownloadOption.wholeImageHighRes:
- if (!(this.extension).isPagingSettingEnabled()){
+ // if in one-up mode, or in two-up mode with a single page being shown
+ if (!(this.extension).isPagingSettingEnabled() ||
+ (this.extension).isPagingSettingEnabled() && this.extension.resources && this.extension.resources.length === 1) {
var maxSize: Size = this.getCanvasMaxDimensions(this.extension.helper.getCurrentCanvas());
- if (maxSize && _.isUndefined(maxSize.width)){
- return true;
- } else if (maxSize.width <= this.options.maxImageWidth){
- return true;
+ if (maxSize) {
+ if (_.isUndefined(maxSize.width)) {
+ return true;
+ } else if (maxSize.width <= this.options.maxImageWidth) {
+ return true;
+ }
}
}
return false;
diff --git a/src/extensions/uv-seadragon-extension/Extension.ts b/src/extensions/uv-seadragon-extension/Extension.ts
index 51f9073ba..6756c0203 100644
--- a/src/extensions/uv-seadragon-extension/Extension.ts
+++ b/src/extensions/uv-seadragon-extension/Extension.ts
@@ -27,8 +27,8 @@ import Params = require("../../Params");
import Point = require("../../modules/uv-shared-module/Point");
import RightPanel = require("../../modules/uv-shared-module/RightPanel");
import SeadragonCenterPanel = require("../../modules/uv-seadragoncenterpanel-module/SeadragonCenterPanel");
-import SearchResult = require("./SearchResult");
-import SearchResultRect = require("./SearchResultRect");
+import SearchResult = Manifold.SearchResult;
+import SearchResultRect = Manifold.SearchResultRect;
import Settings = require("../../modules/uv-shared-module/Settings");
import SettingsDialogue = require("./SettingsDialogue");
import ShareDialogue = require("./ShareDialogue");
@@ -46,17 +46,19 @@ class Extension extends BaseExtension implements ISeadragonExtension {
$shareDialogue: JQuery;
centerPanel: SeadragonCenterPanel;
currentRotation: number = 0;
+ currentSearchResultRect: SearchResultRect;
downloadDialogue: DownloadDialogue;
externalContentDialogue: ExternalContentDialogue;
footerPanel: FooterPanel;
headerPanel: PagingHeaderPanel;
helpDialogue: HelpDialogue;
- iiifImageUriTemplate: string = '{0}/{1}/{2}/{3}/{4}/{5}.jpg';
+ isSearching: boolean = false;
leftPanel: ContentLeftPanel;
mobileFooterPanel: MobileFooterPanel;
mode: Mode;
moreInfoDialogue: MoreInfoDialogue;
multiSelectDialogue: MultiSelectDialogue;
+ previousSearchResultRect: SearchResultRect;
rightPanel: MoreInfoRightPanel;
searchResults: SearchResult[] = [];
settingsDialogue: SettingsDialogue;
@@ -69,7 +71,7 @@ class Extension extends BaseExtension implements ISeadragonExtension {
create(overrideDependencies?: any): void {
super.create(overrideDependencies);
- var that = this;
+ const that = this;
$.subscribe(BaseCommands.METRIC_CHANGED, () => {
if (this.metric === Metrics.MOBILE_LANDSCAPE) {
@@ -84,6 +86,8 @@ class Extension extends BaseExtension implements ISeadragonExtension {
});
$.subscribe(Commands.CLEAR_SEARCH, (e) => {
+ this.searchResults = null;
+ $.publish(Commands.SEARCH_RESULTS_CLEARED);
this.triggerSocket(Commands.CLEAR_SEARCH);
});
@@ -180,9 +184,18 @@ class Extension extends BaseExtension implements ISeadragonExtension {
$.subscribe(Commands.NEXT_SEARCH_RESULT, () => {
this.triggerSocket(Commands.NEXT_SEARCH_RESULT);
+ });
+
+ $.subscribe(Commands.NEXT_IMAGES_SEARCH_RESULT_UNAVAILABLE, () => {
+ this.triggerSocket(Commands.NEXT_IMAGES_SEARCH_RESULT_UNAVAILABLE);
this.nextSearchResult();
});
+ $.subscribe(Commands.PREV_IMAGES_SEARCH_RESULT_UNAVAILABLE, () => {
+ this.triggerSocket(Commands.PREV_IMAGES_SEARCH_RESULT_UNAVAILABLE);
+ this.prevSearchResult();
+ });
+
$.subscribe(Commands.OPEN_THUMBS_VIEW, (e) => {
this.triggerSocket(Commands.OPEN_THUMBS_VIEW);
});
@@ -219,7 +232,6 @@ class Extension extends BaseExtension implements ISeadragonExtension {
$.subscribe(Commands.PREV_SEARCH_RESULT, () => {
this.triggerSocket(Commands.PREV_SEARCH_RESULT);
- this.prevSearchResult();
});
$.subscribe(Commands.PRINT, () => {
@@ -240,7 +252,7 @@ class Extension extends BaseExtension implements ISeadragonExtension {
$.subscribe(Commands.SEADRAGON_ANIMATION_FINISH, (e, viewer) => {
if (this.centerPanel && this.centerPanel.currentBounds){
- this.setParam(Params.zoom, this.centerPanel.serialiseBounds(this.centerPanel.currentBounds));
+ this.setParam(Params.xywh, this.centerPanel.getViewportBounds());
}
var canvas: Manifesto.ICanvas = this.helper.getCurrentCanvas();
@@ -289,6 +301,10 @@ class Extension extends BaseExtension implements ISeadragonExtension {
this.triggerSocket(Commands.SEARCH_RESULTS, obj);
});
+ $.subscribe(Commands.SEARCH_RESULT_CANVAS_CHANGED, (e, rect: SearchResultRect) => {
+ this.viewPage(rect.canvasIndex);
+ });
+
$.subscribe(Commands.SEARCH_RESULTS_EMPTY, (e) => {
this.triggerSocket(Commands.SEARCH_RESULTS_EMPTY);
});
@@ -327,7 +343,7 @@ class Extension extends BaseExtension implements ISeadragonExtension {
});
}
- createModules(): void{
+ createModules(): void {
super.createModules();
if (this.isHeaderPanelEnabled()){
@@ -415,6 +431,7 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
}
}
+
checkForRotationParam(): void{
// if a rotation value is in the hash params, set currentRotation
if (this.isDeepLinkingEnabled()){
@@ -438,7 +455,7 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
if (this.isPagingSettingEnabled() && !isReload){
- var indices = this.getPagedIndices(canvasIndex);
+ var indices: number[] = this.getPagedIndices(canvasIndex);
// if the page is already displayed, only advance canvasIndex.
if (indices.contains(this.helper.canvasIndex)) {
@@ -469,11 +486,10 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
}
- getViewerBounds(): string{
+ getViewportBounds(): string {
if (!this.centerPanel) return null;
- var bounds = this.centerPanel.getBounds();
- if (bounds) return this.centerPanel.serialiseBounds(bounds);
- return "";
+ const bounds = this.centerPanel.getViewportBounds();
+ return bounds;
}
getViewerRotation(): number{
@@ -509,7 +525,7 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
treeNodeSelected(node: ITreeNode): void{
- var data: any = node.data;
+ const data: any = node.data;
if (!data.type) return;
@@ -518,6 +534,8 @@ class Extension extends BaseExtension implements ISeadragonExtension {
this.viewManifest(data);
break;
case manifesto.IIIFResourceType.collection().toString():
+ // note: this won't get called as the tree component now has branchNodesSelectable = false
+ // useful to keep around for reference
this.viewCollection(data);
break;
default:
@@ -534,25 +552,29 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
prevSearchResult(): void {
+ let foundResult: SearchResult;
// get the first result with a canvasIndex less than the current index.
- for (var i = this.searchResults.length - 1; i >= 0; i--) {
- var result = this.searchResults[i];
+ for (let i = this.searchResults.length - 1; i >= 0; i--) {
+ const result: SearchResult = this.searchResults[i];
- if (result.canvasIndex < this.helper.canvasIndex) {
- this.viewPage(result.canvasIndex);
+ if (result.canvasIndex <= this.getPrevPageIndex()) {
+ foundResult = result;
+ this.viewPage(foundResult.canvasIndex);
break;
}
}
}
nextSearchResult(): void {
-
+ let foundResult: SearchResult;
+
// get the first result with an index greater than the current index.
- for (var i = 0; i < this.searchResults.length; i++) {
- var result = this.searchResults[i];
+ for (let i = 0; i < this.searchResults.length; i++) {
+ const result: SearchResult = this.searchResults[i];
- if (result.canvasIndex > this.helper.canvasIndex) {
+ if (result.canvasIndex >= this.getNextPageIndex()) {
+ foundResult = result;
this.viewPage(result.canvasIndex);
break;
}
@@ -562,8 +584,8 @@ class Extension extends BaseExtension implements ISeadragonExtension {
bookmark(): void {
super.bookmark();
- var canvas: Manifesto.ICanvas = this.helper.getCurrentCanvas();
- var bookmark: Bookmark = new Bookmark();
+ const canvas: Manifesto.ICanvas = this.helper.getCurrentCanvas();
+ const bookmark: Bookmark = new Bookmark();
bookmark.index = this.helper.canvasIndex;
bookmark.label = Manifesto.TranslationCollection.getValue(canvas.getLabel());
@@ -594,14 +616,14 @@ class Extension extends BaseExtension implements ISeadragonExtension {
return null;
}
- var bounds = viewer.viewport.getBounds(true);
+ const bounds = viewer.viewport.getBounds(true);
- var dimensions: CroppedImageDimensions = new CroppedImageDimensions();
+ const dimensions: CroppedImageDimensions = new CroppedImageDimensions();
- var width: number = Math.floor(bounds.width);
- var height: number = Math.floor(bounds.height);
- var x: number = Math.floor(bounds.x);
- var y: number = Math.floor(bounds.y);
+ let width: number = Math.floor(bounds.width);
+ let height: number = Math.floor(bounds.height);
+ let x: number = Math.floor(bounds.x);
+ let y: number = Math.floor(bounds.y);
// constrain to image bounds
if (x + width > canvas.getWidth()) {
@@ -620,29 +642,26 @@ class Extension extends BaseExtension implements ISeadragonExtension {
width = Math.min(width, canvas.getWidth());
height = Math.min(height, canvas.getHeight());
- var regionWidth: number = width;
- var regionHeight: number = height;
+ let regionWidth: number = width;
+ let regionHeight: number = height;
- if (canvas.externalResource.data && canvas.externalResource.data.profile[1]){
- var maxSize: Size = new Size(canvas.externalResource.data.profile[1].maxWidth, canvas.externalResource.data.profile[1].maxHeight);
- if (!_.isUndefined(maxSize.width) && !_.isUndefined(maxSize.height)){
+ if (canvas.externalResource.data && canvas.externalResource.data.profile && canvas.externalResource.data.profile[1]) {
- if( width > maxSize.width ){
+ const maxSize: Size = new Size(canvas.externalResource.data.profile[1].maxWidth, canvas.externalResource.data.profile[1].maxHeight);
- var newWidth: number = maxSize.width;
- height = Math.round( newWidth * (height / width) );
- width = newWidth;
+ if (!_.isUndefined(maxSize.width) && !_.isUndefined(maxSize.height)){
+ if (width > maxSize.width) {
+ let newWidth: number = maxSize.width;
+ height = Math.round(newWidth * (height / width));
+ width = newWidth;
}
- if ( height > maxSize.height ) {
-
- var newHeight: number = maxSize.height;
- width = Math.round( (width / height) * newHeight );
+ if (height > maxSize.height) {
+ let newHeight: number = maxSize.height;
+ width = Math.round((width / height) * newHeight);
height = newHeight;
-
}
-
}
}
@@ -726,75 +745,74 @@ class Extension extends BaseExtension implements ISeadragonExtension {
if (!viewer) return null;
if (!viewer.viewport) return null;
- var dimensions: CroppedImageDimensions = this.getCroppedImageDimensions(canvas, viewer);
+ const dimensions: CroppedImageDimensions = this.getCroppedImageDimensions(canvas, viewer);
// construct uri
// {baseuri}/{id}/{region}/{size}/{rotation}/{quality}.jpg
- var baseUri = this.getImageBaseUri(canvas);
- var id = this.getImageId(canvas);
- var region = dimensions.regionPos.x + "," + dimensions.regionPos.y + "," + dimensions.region.width + "," + dimensions.region.height;
- var size = dimensions.size.width + ',' + dimensions.size.height;
- var rotation = this.getViewerRotation();
- var quality = 'default';
- return String.format(this.iiifImageUriTemplate, baseUri, id, region, size, rotation, quality);
+ const baseUri: string = this.getImageBaseUri(canvas);
+ const id: string = this.getImageId(canvas);
+ const region: string = dimensions.regionPos.x + "," + dimensions.regionPos.y + "," + dimensions.region.width + "," + dimensions.region.height;
+ const size: string = dimensions.size.width + ',' + dimensions.size.height;
+ const rotation: number = this.getViewerRotation();
+ const quality: string = 'default';
+ return `${baseUri}/${id}/${region}/${size}/${rotation}/${quality}.jpg`;
}
getConfinedImageDimensions(canvas: Manifesto.ICanvas, width: number): Size {
- var dimensions: Size = new Size(0, 0);
+ const dimensions: Size = new Size(0, 0);
dimensions.width = width;
- var normWidth = Math.normalise(width, 0, canvas.getWidth());
+ const normWidth = Math.normalise(width, 0, canvas.getWidth());
dimensions.height = Math.floor(canvas.getHeight() * normWidth);
return dimensions;
}
getConfinedImageUri(canvas: Manifesto.ICanvas, width: number): string {
- var baseUri = this.getImageBaseUri(canvas);
+ const baseUri = this.getImageBaseUri(canvas);
// {baseuri}/{id}/{region}/{size}/{rotation}/{quality}.jpg
- var id = this.getImageId(canvas);
- var region = 'full';
- var dimensions = this.getConfinedImageDimensions(canvas, width);
- var size: string = dimensions.width + ',' + dimensions.height;
- var rotation = this.getViewerRotation();
- var quality = 'default';
- var uri = String.format(this.iiifImageUriTemplate, baseUri, id, region, size, rotation, quality);
- return uri;
+ const id: string = this.getImageId(canvas);
+ const region: string = 'full';
+ const dimensions: Size = this.getConfinedImageDimensions(canvas, width);
+ const size: string = dimensions.width + ',' + dimensions.height;
+ const rotation: number = this.getViewerRotation();
+ const quality: string = 'default';
+ return `${baseUri}/${id}/${region}/${size}/${rotation}/${quality}.jpg`;
}
getImageId(canvas: Manifesto.ICanvas): string {
- var id = this.getInfoUri(canvas);
+ let id = this.getInfoUri(canvas);
// First trim off info.json, then extract ID:
id = id.substr(0, id.lastIndexOf("/"));
return id.substr(id.lastIndexOf("/") + 1);
}
getImageBaseUri(canvas: Manifesto.ICanvas): string {
- var uri = this.getInfoUri(canvas);
+ let uri = this.getInfoUri(canvas);
// First trim off info.json, then trim off ID....
uri = uri.substr(0, uri.lastIndexOf("/"));
return uri.substr(0, uri.lastIndexOf("/"));
}
getInfoUri(canvas: Manifesto.ICanvas): string{
- var infoUri: string;
+ let infoUri: string;
- var images: Manifesto.IAnnotation[] = canvas.getImages();
+ const images: Manifesto.IAnnotation[] = canvas.getImages();
if (images && images.length) {
- var firstImage = images[0];
- var resource: Manifesto.IResource = firstImage.getResource();
- var services: Manifesto.IService[] = resource.getServices();
+ let firstImage = images[0];
+ let resource: Manifesto.IResource = firstImage.getResource();
+ let services: Manifesto.IService[] = resource.getServices();
- for (var i = 0; i < services.length; i++) {
- var service: Manifesto.IService = services[i];
- var id = service.id;
+ for (let i = 0; i < services.length; i++) {
+ let service: Manifesto.IService = services[i];
+ let id = service.id;
if (!_.endsWith(id, '/')) {
id += '/';
}
- if (manifesto.isImageProfile(service.getProfile())){
+ if (manifesto.Utils.isImageProfile(service.getProfile())){
infoUri = id + 'info.json';
}
}
@@ -809,18 +827,18 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
getEmbedScript(template: string, width: number, height: number, zoom: string, rotation: number): string{
- var configUri = this.config.uri || '';
- var script = String.format(template, this.getSerializedLocales(), configUri, this.helper.iiifResourceUri, this.helper.collectionIndex, this.helper.manifestIndex, this.helper.sequenceIndex, this.helper.canvasIndex, zoom, rotation, width, height, this.embedScriptUri);
+ const configUri = this.config.uri || '';
+ let script = String.format(template, this.getSerializedLocales(), configUri, this.helper.iiifResourceUri, this.helper.collectionIndex, this.helper.manifestIndex, this.helper.sequenceIndex, this.helper.canvasIndex, zoom, rotation, width, height, this.embedScriptUri);
return script;
}
getPrevPageIndex(canvasIndex?: number): number {
if (_.isUndefined(canvasIndex)) canvasIndex = this.helper.canvasIndex;
- var index;
+ let index: number;
if (this.isPagingSettingEnabled()){
- var indices = this.getPagedIndices(canvasIndex);
+ let indices: number[] = this.getPagedIndices(canvasIndex);
if (this.helper.isRightToLeft()){
index = indices.last() - 1;
@@ -858,10 +876,10 @@ class Extension extends BaseExtension implements ISeadragonExtension {
getNextPageIndex(canvasIndex?: number): number {
if (_.isUndefined(canvasIndex)) canvasIndex = this.helper.canvasIndex;
- var index;
+ let index: number;
if (this.isPagingSettingEnabled()){
- var indices = this.getPagedIndices(canvasIndex);
+ let indices: number[] = this.getPagedIndices(canvasIndex);
if (this.helper.isRightToLeft()){
index = indices[0] + 1;
@@ -881,33 +899,50 @@ class Extension extends BaseExtension implements ISeadragonExtension {
}
getAutoCompleteService(): Manifesto.IService {
- var service: Manifesto.IService = this.helper.getSearchWithinService();
+ const service: Manifesto.IService = this.helper.getSearchWithinService();
if (!service) return null;
return service.getService(manifesto.ServiceProfile.autoComplete());
}
getAutoCompleteUri(): string{
- var service = this.getAutoCompleteService();
+ const service = this.getAutoCompleteService();
if (!service) return null;
return service.id + '?q={0}';
}
getSearchWithinServiceUri(): string {
- var service: Manifesto.IService = this.helper.getSearchWithinService();
+ const service: Manifesto.IService = this.helper.getSearchWithinService();
if (!service) return null;
- var uri = service.id;
+ let uri: string = service.id;
uri = uri + "?q={0}";
return uri;
}
- searchWithin(terms): void {
+ searchWithin(terms: string): void {
- var that = this;
+ if (this.isSearching) return;
- this.doSearchWithin(terms, (results: any) => {
- if (results.resources && results.resources.length) {
+ this.isSearching = true;
+
+ // clear search results
+ this.searchResults = [];
+
+ const that = this;
+
+ let searchUri: string = this.getSearchWithinServiceUri();
+ searchUri = String.format(searchUri, terms);
+
+ this.getSearchResults(searchUri, terms, this.searchResults, (results: SearchResult[]) => {
+
+ this.isSearching = false;
+
+ if (results.length) {
+ this.searchResults = results.sort((a, b) => {
+ return a.canvasIndex - b.canvasIndex;
+ });
+
$.publish(Commands.SEARCH_RESULTS, [{terms, results}]);
// reload current index as it may contain results.
@@ -920,56 +955,80 @@ class Extension extends BaseExtension implements ISeadragonExtension {
});
}
- doSearchWithin(terms: string, cb: (results: any) => void): void {
- var that = this;
-
- var searchUri = this.getSearchWithinServiceUri();
- searchUri = String.format(searchUri, terms);
+ getSearchResults(searchUri: string,
+ terms: string,
+ searchResults: SearchResult[],
+ cb: (results: SearchResult[]) => void): void {
$.getJSON(searchUri, (results: any) => {
+
if (results.resources && results.resources.length) {
- that.parseSearchWithinResults(results);
+ searchResults = searchResults.concat(this.parseSearchJson(results, searchResults));
}
- cb(results);
+ if (results.next) {
+ this.getSearchResults(results.next, terms, searchResults, cb);
+ } else {
+ cb(searchResults);
+ }
});
}
- parseSearchWithinResults(results: any): void {
- this.searchResults = [];
-
- for (var i = 0; i < results.resources.length; i++) {
- var r = results.resources[i];
+ parseSearchJson(resultsToParse: any, searchResults: SearchResult[]): SearchResult[] {
- var sr: SearchResult = new SearchResult(r, this.helper);
+ const parsedResults: SearchResult[] = [];
- var match = this.getSearchResultByCanvasIndex(sr.canvasIndex);
+ for (let i = 0; i < resultsToParse.resources.length; i++) {
+ const resource: any = resultsToParse.resources[i];
+ const canvasIndex: number = this.helper.getCanvasIndexById(resource.on.match(/(.*)#/)[1]);
+ var searchResult: SearchResult = new SearchResult(resource, canvasIndex);
+ const match: SearchResult = parsedResults.en().where(x => x.canvasIndex === searchResult.canvasIndex).first();
- if (match){
- match.addRect(r);
+ // if there's already a SearchResult for the canvas index, add a rect to it, otherwise create a new SearchResult
+ if (match) {
+ match.addRect(resource);
} else {
- this.searchResults.push(sr);
+ parsedResults.push(searchResult);
}
}
+
+ // sort by canvasIndex
+ parsedResults.sort((a, b) => {
+ return a.canvasIndex - b.canvasIndex;
+ });
+
+ return parsedResults;
}
- getSearchResultByCanvasIndex(canvasIndex: number): SearchResult {
- for (var i = 0; i < this.searchResults.length; i++) {
- var r = this.searchResults[i];
- if (r.canvasIndex === canvasIndex){
- return r;
- }
- }
- return null;
+ getSearchResultRects(): SearchResultRect[] {
+ return this.searchResults.en().selectMany(x => x.rects).toArray();
}
- getPagedIndices(canvasIndex?: number): number[]{
+ getCurrentSearchResultRectIndex(): number {
+ const searchResultRects: SearchResultRect[] = this.getSearchResultRects();
+ return searchResultRects.indexOf(this.currentSearchResultRect);
+ }
+
+ getTotalSearchResultRects(): number {
+ const searchResultRects: SearchResultRect[] = this.getSearchResultRects();
+ return searchResultRects.length;
+ }
+
+ isFirstSearchResultRect(): boolean {
+ return this.getCurrentSearchResultRectIndex() === 0;
+ }
+
+ getLastSearchResultRectIndex(): number {
+ return this.getTotalSearchResultRects() - 1;
+ }
+
+ getPagedIndices(canvasIndex?: number): number[] {
if (_.isUndefined(canvasIndex)) canvasIndex = this.helper.canvasIndex;
- var indices = [];
+ let indices: number[] = [];
// if it's a continuous manifest, get all resources.
- if (this.helper.isContinuous()){
+ if (this.helper.isContinuous()) {
indices = _.map(this.helper.getCanvases(), (c: Manifesto.ICanvas, index: number) => {
return index;
});
@@ -977,15 +1036,15 @@ class Extension extends BaseExtension implements ISeadragonExtension {
if (!this.isPagingSettingEnabled()) {
indices.push(this.helper.canvasIndex);
} else {
- if (this.helper.isFirstCanvas(canvasIndex) || (this.helper.isLastCanvas(canvasIndex) && this.helper.isTotalCanvasesEven())){
+ if (this.helper.isFirstCanvas(canvasIndex) || (this.helper.isLastCanvas(canvasIndex) && this.helper.isTotalCanvasesEven())) {
indices = [canvasIndex];
- } else if (canvasIndex % 2){
+ } else if (canvasIndex % 2) {
indices = [canvasIndex, canvasIndex + 1];
} else {
indices = [canvasIndex - 1, canvasIndex];
}
- if (this.helper.isRightToLeft()){
+ if (this.helper.isRightToLeft()) {
indices = indices.reverse();
}
}
diff --git a/src/extensions/uv-seadragon-extension/ISeadragonExtension.ts b/src/extensions/uv-seadragon-extension/ISeadragonExtension.ts
index fddd2c8b2..5266937a0 100644
--- a/src/extensions/uv-seadragon-extension/ISeadragonExtension.ts
+++ b/src/extensions/uv-seadragon-extension/ISeadragonExtension.ts
@@ -1,29 +1,35 @@
import CroppedImageDimensions = require("./CroppedImageDimensions");
import IExtension = require("../../modules/uv-shared-module/IExtension");
import Mode = require("./Mode");
-import SearchResult = require("./SearchResult");
+import SearchResult = Manifold.SearchResult;
+import SearchResultRect = Manifold.SearchResultRect;
import Size = Utils.Measurements.Size;
interface ISeadragonExtension extends IExtension{
+ currentSearchResultRect: SearchResultRect;
getAutoCompleteUri(): string;
getConfinedImageDimensions(canvas: Manifesto.ICanvas, width: number): Size;
getConfinedImageUri(canvas: Manifesto.ICanvas, width: number, height?: number): string;
getCroppedImageDimensions(canvas: Manifesto.ICanvas, viewer: any): CroppedImageDimensions;
getCroppedImageUri(canvas: Manifesto.ICanvas, viewer: any): string;
+ getCurrentSearchResultRectIndex(): number;
getEmbedScript(template: string, width: number, height: number, zoom: string, rotation: number): string;
getImageBaseUri(canvas: Manifesto.ICanvas): string;
getImageId(canvas: Manifesto.ICanvas): string;
+ getLastSearchResultRectIndex(): number;
getMode(): Mode;
getNextPageIndex(index?: number): number;
getPrevPageIndex(index?: number): number;
- getSearchResultByCanvasIndex(index: number): SearchResult;
+ getSearchResultRects(): SearchResultRect[];
getSearchWithinServiceUri(): string;
+ getTotalSearchResultRects(): number;
getViewer(): any;
- getViewerBounds(): string;
getViewerRotation(): number;
+ getViewportBounds(): string;
+ isFirstSearchResultRect(): boolean;
isPagingSettingEnabled(): boolean;
isSearchWithinEnabled(): boolean;
- parseSearchWithinResults(results: any);
+ previousSearchResultRect: SearchResultRect;
searchResults: SearchResult[];
searchWithin(terms: string, callback: (results: any) => void): void;
}
diff --git a/src/extensions/uv-seadragon-extension/ISettings.d.ts b/src/extensions/uv-seadragon-extension/ISettings.d.ts
index f9dc6a10e..f99a53349 100644
--- a/src/extensions/uv-seadragon-extension/ISettings.d.ts
+++ b/src/extensions/uv-seadragon-extension/ISettings.d.ts
@@ -1,5 +1,8 @@
interface ISettings {
navigatorEnabled?: boolean;
pagingEnabled?: boolean;
+ leftPanelOpen?: boolean;
+ rightPanelOpen?: boolean;
preserveViewport?: boolean;
+ clickToZoomEnabled?: boolean;
}
diff --git a/src/extensions/uv-seadragon-extension/SearchResult.ts b/src/extensions/uv-seadragon-extension/SearchResult.ts
deleted file mode 100644
index dbe6f748b..000000000
--- a/src/extensions/uv-seadragon-extension/SearchResult.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import SearchResultRect = require("./SearchResultRect");
-
-class SearchResult {
- public canvasIndex: number;
- public rects: SearchResultRect[] = [];
-
- constructor(resource: any, helper: Manifold.IHelper) {
- this.canvasIndex = helper.getCanvasIndexById(resource.on.match(/(.*)#/)[1]);
- this.addRect(resource);
- }
-
- addRect(resource: any): void {
- var rect = new SearchResultRect(resource);
- this.rects.push(rect);
- // sort ascending
- this.rects.sort(function(a, b) {
- return a.index - b.index;
- });
- }
-}
-
-export = SearchResult;
\ No newline at end of file
diff --git a/src/extensions/uv-seadragon-extension/SearchResultRect.ts b/src/extensions/uv-seadragon-extension/SearchResultRect.ts
deleted file mode 100644
index 140e49b77..000000000
--- a/src/extensions/uv-seadragon-extension/SearchResultRect.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-class SearchResultRect {
- public index: number;
- public x: number;
- public y: number;
- public width: number;
- public height: number;
-
- constructor(result: any) {
- this.index = result.resource.resultIndex;
- var xywh = result.on.match(/.*xywh=(\d*),(\d*),(\d*),(\d*)/);
- this.x = xywh[1];
- this.y = xywh[2];
- this.width = xywh[3];
- this.height = xywh[4];
- }
-}
-
-export = SearchResultRect;
\ No newline at end of file
diff --git a/src/extensions/uv-seadragon-extension/SettingsDialogue.ts b/src/extensions/uv-seadragon-extension/SettingsDialogue.ts
index 5f338293a..716d102b1 100644
--- a/src/extensions/uv-seadragon-extension/SettingsDialogue.ts
+++ b/src/extensions/uv-seadragon-extension/SettingsDialogue.ts
@@ -6,6 +6,13 @@ class SettingsDialogue extends BaseSettingsDialogue {
$navigatorEnabled: JQuery;
$navigatorEnabledCheckbox: JQuery;
$navigatorEnabledLabel: JQuery;
+
+ $clickToZoomEnabled: JQuery;
+ $clickToZoomEnabledCheckbox: JQuery;
+ $clickToZoomEnabledLabel: JQuery;
+
+
+
$pagingEnabled: JQuery;
$pagingEnabledCheckbox: JQuery;
$pagingEnabledLabel: JQuery;
@@ -41,6 +48,15 @@ class SettingsDialogue extends BaseSettingsDialogue {
this.$pagingEnabledLabel = $('' + this.content.pagingEnabled + ' ');
this.$pagingEnabled.append(this.$pagingEnabledLabel);
+ this.$clickToZoomEnabled = $('
');
+ this.$scroll.append(this.$clickToZoomEnabled);
+
+ this.$clickToZoomEnabledCheckbox = $(' ');
+ this.$clickToZoomEnabled.append(this.$clickToZoomEnabledCheckbox);
+
+ this.$clickToZoomEnabledLabel = $('' + this.content.clickToZoomEnabled + ' ');
+ this.$clickToZoomEnabled.append(this.$clickToZoomEnabledLabel);
+
this.$preserveViewport = $('
');
this.$scroll.append(this.$preserveViewport);
@@ -61,6 +77,18 @@ class SettingsDialogue extends BaseSettingsDialogue {
this.updateSettings(settings);
});
+
+ this.$clickToZoomEnabledCheckbox.change(() => {
+ var settings: ISettings = {};
+
+ if(this.$clickToZoomEnabledCheckbox.is(":checked")) {
+ settings.clickToZoomEnabled = true;
+ } else {
+ settings.clickToZoomEnabled = false;
+ }
+
+ this.updateSettings(settings);
+ });
this.$pagingEnabledCheckbox.change(() => {
var settings: ISettings = {};
@@ -97,6 +125,12 @@ class SettingsDialogue extends BaseSettingsDialogue {
} else {
this.$navigatorEnabledCheckbox.removeAttr("checked");
}
+
+ if (settings.clickToZoomEnabled){
+ this.$clickToZoomEnabledCheckbox.prop("checked", true);
+ } else {
+ this.$clickToZoomEnabledCheckbox.removeAttr("checked");
+ }
if (!this.extension.helper.isPagingAvailable()){
this.$pagingEnabled.hide();
diff --git a/src/extensions/uv-seadragon-extension/ShareDialogue.ts b/src/extensions/uv-seadragon-extension/ShareDialogue.ts
index c8819c2ae..88aeb71b0 100644
--- a/src/extensions/uv-seadragon-extension/ShareDialogue.ts
+++ b/src/extensions/uv-seadragon-extension/ShareDialogue.ts
@@ -27,14 +27,14 @@ class ShareDialogue extends BaseShareDialogue {
super.update();
- var zoom = (this.extension).getViewerBounds();
- var rotation = (this.extension).getViewerRotation();
+ var xywh: string = (this.extension).getViewportBounds();
+ var rotation: number = (this.extension).getViewerRotation();
this.code = (this.extension).getEmbedScript(
this.options.embedTemplate,
this.currentWidth,
this.currentHeight,
- zoom,
+ xywh,
rotation);
this.$code.val(this.code);
diff --git a/src/extensions/uv-seadragon-extension/config/en-GB.json b/src/extensions/uv-seadragon-extension/config/en-GB.json
index 8611816f5..cb15e7c21 100644
--- a/src/extensions/uv-seadragon-extension/config/en-GB.json
+++ b/src/extensions/uv-seadragon-extension/config/en-GB.json
@@ -1,5 +1,6 @@
{
"options": {
+ "allowStealFocus": false,
"bookmarkThumbHeight": 150,
"bookmarkThumbWidth": 90,
"dropEnabled": true,
@@ -17,11 +18,13 @@
"preserveViewport": false,
"rightPanelEnabled": true,
"saveUserSettings": false,
+ "clickToZoomEnabled": true,
"searchWithinEnabled": true,
"termsOfUseEnabled": false,
"theme": "uv-en-GB-theme",
"tokenStorage": "session",
- "useArrowKeysToNavigate": false
+ "useArrowKeysToNavigate": false,
+ "zoomToSearchResultEnabled": true
},
"modules": {
"contentLeftPanel": {
@@ -30,7 +33,6 @@
"defaultToTreeIfGreaterThan": 0,
"elideCount": 40,
"expandFullEnabled": true,
- "galleryThumbChunkedResizingEnabled": true,
"galleryThumbChunkedResizingThreshold": 400,
"galleryThumbHeight": 320,
"galleryThumbLoadPadding": 3,
@@ -135,7 +137,7 @@
"controlsFadeLength": 250,
"defaultZoomLevel": 0,
"immediateRender": false,
- "maxZoomLevel": 8,
+ "maxZoomPixelRatio": 1.25,
"navigatorPosition": "BOTTOM_RIGHT",
"pageGap": 50,
"showHomeControl": false,
@@ -155,7 +157,7 @@
},
"shareDialogue": {
"options": {
- "embedTemplate": "
\n",
+ "embedTemplate": "
\n",
"instructionsEnabled": false,
"shareFrameEnabled": true
}
diff --git a/src/extensions/uv-seadragon-extension/l10n/cy-GB.json b/src/extensions/uv-seadragon-extension/l10n/cy-GB.json
index caea34573..915dd2913 100644
--- a/src/extensions/uv-seadragon-extension/l10n/cy-GB.json
+++ b/src/extensions/uv-seadragon-extension/l10n/cy-GB.json
@@ -1,221 +1,225 @@
{
- "localisation": {
- "label": "Cymraeg"
- },
- "content": {
- "authCORSError": "Mae angen diweddaru'ch porwr er mwyn galluogi rhannu adnoddau traws-safle.",
- "authorisationFailedMessage": "Ni lwyddoch i fewngofnodi. Rhowch gynnig arni eto.",
- "canvasIndexOutOfRange": "Canfas yn rhy fawr i'w arddangos (ceisiwch eto)",
- "degradedResourceMessage": "Mewngofnodwch i weld ansawdd uchel.",
- "degradedResourceLogin": "Mewngofnodi",
- "forbiddenResourceMessage": "Nid yw'ch hawliau mynediad presennol yn ddigonol i weld y ddelwedd hon"
- },
- "modules": {
- "clickThroughDialogue": {
- "content": {
- "viewTerms": "Darllenwch y Telerau a'r Amodau Llawn"
- }
- },
- "contentLeftPanel": {
- "content": {
- "collapse": "Lleihau'r Cynnwys",
- "collapseFull": "Lleihau'r Galeri",
- "date": "Dyddiad",
- "expand": "Ehangu'r Cynnwys",
- "expandFull": "Ehangu'r Galeri",
- "index": "Mynegai",
- "sortBy": "Trefnu yn ôl:",
- "thumbnails": "Bodluniau",
- "title": "Cynnwys",
- "volume": "cyfrol"
- }
- },
- "dialogue": {
- "content": {
- "close": "Cau"
- }
- },
- "downloadDialogue": {
- "content": {
- "currentViewAsJpg": "Delwedd ddethol {0} x {1}px (jpg)",
- "currentViewAsJpgExplanation": "Opens in a new window",
- "download": "Lawrlwytho",
- "downloadSelection": "Lawrlwytho'r detholiad",
- "downloadSelectionExplanation": "Opens a dialogue to select which pages to download.",
- "editSettings": "Golygu'r dewisiadau",
- "entireDocument": "Y Ddogfen Gyfan ({0})",
- "entireFileAsOriginal": "Y ffeil gyfan ({0})",
- "noneAvailable": "Nid oes unrhyw opsiynau lawrlwytho ar gael.",
- "pagingNote": "Dad-ddewiswch 'Arddangos Dwy Dudalen' i weld dewisiadau pellach.",
- "preview": "Rhagolwg",
- "title": "Lawrlwytho",
- "wholeImageHighRes": "Delwedd gyfan {0} x {1}px ({2})",
- "wholeImageHighResExplanation": "Opens in a new window.",
- "wholeImagesHighRes": "Delweddau gyfan ({0})",
- "wholeImagesHighResExplanation": "Opens in two new windows.",
- "wholeImageLowResAsJpg": "Delwedd gyfan {0} x {1}px (jpg)",
- "wholeImageLowResAsJpgExplanation": "Opens in a new window."
- }
- },
- "footerPanel": {
- "content": {
- "bookmark": "Ychwanegu at nodau tudalen",
- "download": "Lawrlwytho",
- "embed": "Ymgorffori",
- "feedback": "Adborth",
- "exitFullScreen": "Dianc o'r sgrin lawn",
- "fullScreen": "Sgrin lawn",
- "open": "Agor",
- "share": "Share"
- }
- },
- "genericDialogue": {
- "content": {
- "emptyValue": "rhowch rif",
- "invalidNumber": "Rhowch rif dilys",
- "noMatches": "Dim canlyniad sy'n cyfateb.",
- "ok": "GWELD",
- "pageNotFound": "Nid yw'r eitem yn cynnwys tudalen gyda'r rhif a nodwyd. Ceisiwch cyfnewid y math i 'delwedd'.",
- "refresh": "Ailosod"
- }
- },
- "helpDialogue": {
- "content": {
- "text": "testun i'w osod",
- "title": "Cymorth"
- }
- },
- "loginDialogue": {
- "content": {
- "login": "Mewngofnodi",
- "logout": "Allgofnodi",
- "cancel": "Canslo"
- }
- },
- "mobileFooterPanel": {
- "content": {
- "rotateRight": "Cylchdroi i'r dde",
- "moreInfo": "Mwy o Wybodaeth",
- "zoomIn": "Closio",
- "zoomOut": "Gwrthglosio"
- }
- },
- "moreInfoRightPanel": {
- "content": {
- "attribution": "Priodoledd",
- "collapse": "Lleihau'r Wybodaeth",
- "collapseFull": "Cuddio'r Galeri",
- "description": "Disgrifiad",
- "expand": "Ehangu'r Wybodaeth",
- "expandFull": "Ehangu'r Galeri",
- "holdingText": "Eich modiwl fan hyn!",
- "less": "llai",
- "license": "Trwydded",
- "logo": "Logo",
- "more": "mwy",
- "noData": "Nid oes data i'w arddangos",
- "page": "tudalen",
- "title": "Mwy o Wybodaeth",
- "manifestHeader": "Am yr eitem",
- "canvasHeader": "Am y ddelwedd",
- "copyToClipboard": "Copïo i'r clipfwrdd",
- "copiedToClipboard": "Copïwyd i'r clipfwrdd"
- }
- },
- "multiSelectDialogue": {
- "content": {
- "select": "Lawrlwytho",
- "selectAll": "Dewis Popeth",
- "title": "Dewiswch Tudalennau i Lawrlwytho"
- }
- },
- "pagingHeaderPanel": {
- "content": {
- "close": "Cau",
- "emptyValue": "Mewnosodwch werth",
- "first": "gyntaf",
- "firstImage": "Delwedd Gyntaf",
- "firstPage": "Tudalen gyntaf",
- "folio": "ffolio",
- "gallery": "Oriel",
- "go": "GWELD",
- "help": "Cymorth",
- "image": "Delwedd",
- "last": "Olaf",
- "lastImage": "Delwedd Olaf",
- "lastPage": "Tudalen Olaf",
- "next": "Nesaf",
- "nextImage": "Delwedd Nesaf",
- "nextPage": "Tudalen Nesaf",
- "of": "o {0}",
- "oneUp": "Gweld un dudalen ar y tro",
- "page": "Tudalen",
- "previous": "Blaenorol",
- "previousImage": "Delwedd Flaenorol",
- "previousPage": "Tudalen Flaenorol",
- "settings": "Dewisiadau",
- "twoUp": "Gweld dwy dudalen ar y tro"
- }
- },
- "restrictedDialogue": {
- "content": {
- "cancel": "Canslo"
- }
- },
- "seadragonCenterPanel": {
- "content": {
- "attribution": "Priodoliad",
- "goHome": "Gweld y maint gwreiddiol",
- "imageUnavailable": "Nid oes delwedd ar gael",
- "next": "nesaf",
- "previous": "blaenorol",
- "rotateRight": "Cylchdroi i'r dde",
- "zoomIn": "Closio",
- "zoomOut": "Gwrthglosio"
- }
- },
- "searchFooterPanel": {
- "content": {
- "clearSearch": "Gwaredu",
- "defaultLabel": "-",
- "displaying": "{0} {1} o {2}",
- "enterKeyword": "Mewnosodwch allweddair",
- "image": "delwedd",
- "imageCaps": "delwedd",
- "instanceFound": "Dangos 1 canlyniad ar gyfer '{0}' ",
- "instancesFound": "Dangos {0} canlyniad o '{1}' ",
- "nextResult": "Canlyniad nesaf",
- "page": "tudalen",
- "pageCaps": "tudalen",
- "previousResult": "Canlyniad blaenorol",
- "print": "print",
- "resultFoundFor": "canlyniad a geir ar gyfer",
- "resultsFoundFor": "canlyniad ar gyfer",
- "searchWithin": "Chwilio tu fewn i:"
- }
- },
- "settingsDialogue": {
- "content": {
- "locale": "Iaith",
- "navigatorEnabled": "Llywiwr wedi galluogi",
- "pagingEnabled": "Arddangos dwy dudalen",
- "preserveViewport": "Cadw'r lefel o glosio",
- "title": "Dewisiadau",
- "website": "mwy o wybodaeth "
- }
- },
- "shareDialogue": {
- "content": {
- "customSize": "arfer",
- "embed": "gwreiddio",
- "embedInstructions": "Er mwyn ymgorffori'r eitem hon ar eich gwefan, cop�wch a gosodwch y cod isod.",
- "height": "Hyd",
- "iiif": "IIIF Manifest",
- "share": "Rhannu",
- "shareInstructions": "I rannu yr eitem hon, copïwch y URL isod.",
- "size": "maint:",
- "width": "Lled"
- }
+ "localisation": {
+ "label": "Cymraeg"
+ },
+ "content": {
+ "authCORSError": "Mae angen diweddaru'ch porwr er mwyn galluogi rhannu adnoddau traws-safle.",
+ "authorisationFailedMessage": "Ni lwyddoch i fewngofnodi. Rhowch gynnig arni eto.",
+ "canvasIndexOutOfRange": "Canfas yn rhy fawr i'w arddangos (ceisiwch eto)",
+ "degradedResourceMessage": "Mewngofnodwch i weld ansawdd uchel.",
+ "degradedResourceLogin": "Mewngofnodi",
+ "forbiddenResourceMessage": "Nid yw'ch hawliau mynediad presennol yn ddigonol i weld y ddelwedd hon",
+ "termsOfUse": "Telerau Defnydd"
+ },
+ "modules": {
+ "clickThroughDialogue": {
+ "content": {
+ "viewTerms": "Darllenwch y Telerau a'r Amodau Llawn"
+ }
+ },
+ "contentLeftPanel": {
+ "content": {
+ "collapse": "Lleihau'r Cynnwys",
+ "collapseFull": "Lleihau'r Galeri",
+ "date": "Dyddiad",
+ "expand": "Ehangu'r Cynnwys",
+ "expandFull": "Ehangu'r Galeri",
+ "index": "Mynegai",
+ "searchResult": "{0} canlyniad chwilio",
+ "searchResults": "{0} canlyniad chwilio",
+ "sortBy": "Trefnu yn ôl:",
+ "thumbnails": "Bodluniau",
+ "title": "Cynnwys",
+ "volume": "cyfrol"
+ }
+ },
+ "dialogue": {
+ "content": {
+ "close": "Cau"
+ }
+ },
+ "downloadDialogue": {
+ "content": {
+ "currentViewAsJpg": "Delwedd ddethol {0} x {1}px (jpg)",
+ "currentViewAsJpgExplanation": "Agor mewn dwy ffenest newydd.",
+ "download": "Lawrlwytho",
+ "downloadSelection": "Lawrlwytho'r detholiad",
+ "downloadSelectionExplanation": "Agor ffenest er mwyn dewis tudalennau i'w lawrlwytho.",
+ "editSettings": "Golygu'r dewisiadau",
+ "entireDocument": "Y Ddogfen Gyfan ({0})",
+ "entireFileAsOriginal": "Y ffeil gyfan ({0})",
+ "noneAvailable": "Nid oes unrhyw opsiynau lawrlwytho ar gael.",
+ "pagingNote": "Dad-ddewiswch 'Arddangos Dwy Dudalen' i weld dewisiadau pellach.",
+ "preview": "Rhagolwg",
+ "title": "Lawrlwytho",
+ "wholeImageHighRes": "Delwedd gyfan {0} x {1}px ({2})",
+ "wholeImageHighResExplanation": "Agor mewn ffenest newydd",
+ "wholeImagesHighRes": "Delweddau cyfan ({0})",
+ "wholeImagesHighResExplanation": "Agor mewn dwy ffenest newydd.",
+ "wholeImageLowResAsJpg": "Delwedd gyfan {0} x {1}px (jpg)",
+ "wholeImageLowResAsJpgExplanation": "Agor mewn ffenest newydd"
+ }
+ },
+ "footerPanel": {
+ "content": {
+ "bookmark": "Ychwanegu at nodau tudalen",
+ "download": "Lawrlwytho",
+ "embed": "Ymgorffori",
+ "feedback": "Adborth",
+ "exitFullScreen": "Dianc o'r sgrin lawn",
+ "fullScreen": "Sgrin lawn",
+ "open": "Agor",
+ "share": "Rhannu"
+ }
+ },
+ "genericDialogue": {
+ "content": {
+ "emptyValue": "rhowch rif",
+ "invalidNumber": "Rhowch rif dilys",
+ "noMatches": "Dim canlyniad sy'n cyfateb.",
+ "ok": "GWELD",
+ "pageNotFound": "Nid yw'r eitem yn cynnwys tudalen gyda'r rhif a nodwyd. Ceisiwch cyfnewid y math i 'delwedd'.",
+ "refresh": "Ailosod"
+ }
+ },
+ "helpDialogue": {
+ "content": {
+ "text": "testun i'w osod",
+ "title": "Cymorth"
+ }
+ },
+ "loginDialogue": {
+ "content": {
+ "login": "Mewngofnodi",
+ "logout": "Allgofnodi",
+ "cancel": "Canslo"
+ }
+ },
+ "mobileFooterPanel": {
+ "content": {
+ "rotateRight": "Cylchdroi i'r dde",
+ "moreInfo": "Mwy o Wybodaeth",
+ "zoomIn": "Closio",
+ "zoomOut": "Gwrthglosio"
+ }
+ },
+ "moreInfoRightPanel": {
+ "content": {
+ "attribution": "Priodoledd",
+ "collapse": "Lleihau'r Wybodaeth",
+ "collapseFull": "Cuddio'r Galeri",
+ "description": "Disgrifiad",
+ "expand": "Ehangu'r Wybodaeth",
+ "expandFull": "Ehangu'r Galeri",
+ "holdingText": "Eich modiwl fan hyn!",
+ "less": "llai",
+ "license": "Trwydded",
+ "logo": "Logo",
+ "more": "mwy",
+ "noData": "Nid oes data i'w arddangos",
+ "page": "Tudalen",
+ "title": "Mwy o Wybodaeth",
+ "manifestHeader": "Am yr eitem",
+ "canvasHeader": "Am y ddelwedd",
+ "copyToClipboard": "Copïo i'r clipfwrdd",
+ "copiedToClipboard": "Copïwyd i'r clipfwrdd"
+ }
+ },
+ "multiSelectDialogue": {
+ "content": {
+ "select": "Lawrlwytho",
+ "selectAll": "Dewis y cyfan",
+ "title": "Dewis Tudalennau i'w Lawrlwytho"
+ }
+ },
+ "pagingHeaderPanel": {
+ "content": {
+ "close": "Cau",
+ "emptyValue": "Mewnosodwch werth",
+ "first": "gyntaf",
+ "firstImage": "Delwedd Gyntaf",
+ "firstPage": "Tudalen gyntaf",
+ "folio": "Ffolio",
+ "gallery": "Galeri",
+ "go": "GWELD",
+ "help": "Cymorth",
+ "image": "Delwedd",
+ "last": "Olaf",
+ "lastImage": "Delwedd Olaf",
+ "lastPage": "Tudalen Olaf",
+ "next": "Nesaf",
+ "nextImage": "Delwedd Nesaf",
+ "nextPage": "Tudalen Nesaf",
+ "of": "o {0}",
+ "oneUp": "Gweld un dudalen ar y tro",
+ "page": "Tudalen",
+ "previous": "Blaenorol",
+ "previousImage": "Delwedd Flaenorol",
+ "previousPage": "Tudalen Flaenorol",
+ "settings": "Dewisiadau",
+ "twoUp": "Gweld dwy dudalen ar y tro"
+ }
+ },
+ "seadragonCenterPanel": {
+ "content": {
+ "attribution": "Priodoliad",
+ "goHome": "Gweld y maint gwreiddiol",
+ "imageUnavailable": "Nid oes delwedd ar gael",
+ "next": "nesaf",
+ "previous": "blaenorol",
+ "rotateRight": "Cylchdroi i'r dde",
+ "zoomIn": "Closio",
+ "zoomOut": "Gwrthglosio"
+ }
+ },
+ "restrictedDialogue": {
+ "content": {
+ "cancel": "Canslo"
+ }
+ },
+ "searchFooterPanel": {
+ "content": {
+ "clearSearch": "Gwaredu",
+ "defaultLabel": "-",
+ "displaying": "{0} {1} o {2}",
+ "enterKeyword": "Mewnosodwch allweddair",
+ "image": "delwedd",
+ "imageCaps": "delwedd",
+ "instanceFound": "Dangos 1 canlyniad ar gyfer '{0}' ",
+ "instancesFound": "Dangos {0} canlyniad o '{1}' ",
+ "nextResult": "Canlyniad nesaf",
+ "page": "tudalen",
+ "pageCaps": "tudalen",
+ "previousResult": "Canlyniad blaenorol",
+ "print": "Argraffu",
+ "resultFoundFor": "canlyniad a geir ar gyfer",
+ "resultsFoundFor": "canlyniad ar gyfer",
+ "searchWithin": "Chwilio tu fewn i:"
+ }
+ },
+ "settingsDialogue": {
+ "content": {
+ "locale": "Iaith",
+ "navigatorEnabled": "Ffenest llywio ar gael",
+ "clickToZoomEnabled": "Cliciwch gyda'r llygoden i glosio",
+ "pagingEnabled": "Arddangos dwy dudalen",
+ "preserveViewport": "Cadw'r lefel o glosio",
+ "title": "Dewisiadau",
+ "website": "mwy o wybodaeth "
+ }
+ },
+ "shareDialogue": {
+ "content": {
+ "customSize": "dewisol",
+ "embed": "Ymgorffori",
+ "embedInstructions": "Er mwyn ymgorffori'r eitem hon ar eich gwefan, copïwch a gosodwch y cod isod.",
+ "height": "Hyd",
+ "iiif": "Maniffest IIIF",
+ "share": "Rhannu",
+ "shareInstructions": "Er mwyn rhannu'r eitem hon, copïwch y URL isod.",
+ "size": "Maint:",
+ "width": "Lled"
+ }
+ }
}
- }
-}
+}
\ No newline at end of file
diff --git a/src/extensions/uv-seadragon-extension/l10n/en-GB.json b/src/extensions/uv-seadragon-extension/l10n/en-GB.json
index 9fabe0872..224e1c251 100644
--- a/src/extensions/uv-seadragon-extension/l10n/en-GB.json
+++ b/src/extensions/uv-seadragon-extension/l10n/en-GB.json
@@ -27,6 +27,8 @@
"expand": "Expand Contents",
"expandFull": "Expand Gallery",
"index": "Index",
+ "searchResult": "{0} search result",
+ "searchResults": "{0} search results",
"sortBy": "Sort By:",
"thumbnails": "Thumbnails",
"title": "Contents",
@@ -203,6 +205,7 @@
"content": {
"locale": "Locale",
"navigatorEnabled": "Navigator Enabled",
+ "clickToZoomEnabled": "Mouse Click To Zoom",
"pagingEnabled": "Two Page View",
"preserveViewport": "Preserve Zoom",
"title": "Settings",
diff --git a/src/extensions/uv-seadragon-extension/lib/iiif-gallery-component.js b/src/extensions/uv-seadragon-extension/lib/iiif-gallery-component.js
index 81378feca..c7a1428ef 100644
--- a/src/extensions/uv-seadragon-extension/lib/iiif-gallery-component.js
+++ b/src/extensions/uv-seadragon-extension/lib/iiif-gallery-component.js
@@ -1,4 +1,4 @@
-// iiif-gallery-component v1.0.0 https://github.com/viewdir/iiif-gallery-component#readme
+// iiif-gallery-component v1.0.6 https://github.com/viewdir/iiif-gallery-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifGalleryComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\
+ \
\
{^{if multiSelectEnabled}}\
\
{{/if}}\
\
-
{{:#index + 1}} \
-
{{>label}} \
+
\
+ {{:#index + 1}} \
+ {{>label}} \
+ {{>data.searchResults}} \
+
\
'
});
+ var that = this;
$.views.helpers({
- className: function () {
+ galleryThumbClassName: function () {
var className = "thumb preLoad";
if (this.data.index === 0) {
className += " first";
@@ -103,6 +107,15 @@ var IIIFComponents;
className += " placeholder";
}
return className;
+ },
+ galleryThumbSearchResultsTitle: function () {
+ var searchResults = Number(this.data.data.searchResults);
+ if (searchResults) {
+ if (searchResults > 1) {
+ return String.format(that.options.content.searchResults, searchResults);
+ }
+ return String.format(that.options.content.searchResult, searchResults);
+ }
}
});
// use unevent to detect scroll stop.
@@ -116,9 +129,10 @@ var IIIFComponents;
};
GalleryComponent.prototype._getDefaultOptions = function () {
return {
- chunkedResizingEnabled: true,
chunkedResizingThreshold: 400,
content: {
+ searchResult: "{0} search result",
+ searchResults: "{0} search results",
select: "Select",
selectAll: "Select All"
},
@@ -126,8 +140,10 @@ var IIIFComponents;
helper: null,
imageFadeInDuration: 300,
initialZoom: 6,
+ minLabelWidth: 20,
pageModeEnabled: false,
scrollStopDuration: 100,
+ searchResults: [],
sizingEnabled: true,
thumbHeight: 320,
thumbLoadPadding: 3,
@@ -140,6 +156,17 @@ var IIIFComponents;
if (this.options.viewingDirection.toString() === manifesto.ViewingDirection.bottomToTop().toString()) {
this._thumbs.reverse();
}
+ if (this.options.searchResults && this.options.searchResults.length) {
+ for (var i = 0; i < this.options.searchResults.length; i++) {
+ var searchResult = this.options.searchResults[i];
+ // find the thumb with the same canvasIndex and add the searchResult
+ var thumb = this._thumbs.en().where(function (t) { return t.index === searchResult.canvasIndex; }).first();
+ // clone the data so searchResults isn't persisted on the canvas.
+ var data = $.extend(true, {}, thumb.data);
+ data.searchResults = searchResult.rects.length;
+ thumb.data = data;
+ }
+ }
this._thumbsCache = null; // delete cache
this._createThumbs();
this.selectIndex(this.options.helper.canvasIndex);
@@ -147,8 +174,8 @@ var IIIFComponents;
if (multiSelectState.isEnabled) {
this._$multiSelectOptions.show();
this._$thumbs.addClass("multiSelect");
- for (var j = 0; j < multiSelectState.canvases.length; j++) {
- var canvas = multiSelectState.canvases[j];
+ for (var i = 0; i < multiSelectState.canvases.length; i++) {
+ var canvas = multiSelectState.canvases[i];
var thumb = this._getThumbByCanvas(canvas);
this._setThumbMultiSelected(thumb, canvas.multiSelected);
}
@@ -156,8 +183,8 @@ var IIIFComponents;
for (var i = 0; i < multiSelectState.ranges.length; i++) {
var range = multiSelectState.ranges[i];
var thumbs = this._getThumbsByRange(range);
- for (var k = 0; k < thumbs.length; k++) {
- var thumb = thumbs[k];
+ for (var i_1 = 0; i_1 < thumbs.length; i_1++) {
+ var thumb = thumbs[i_1];
this._setThumbMultiSelected(thumb, range.multiSelected);
}
}
@@ -166,6 +193,21 @@ var IIIFComponents;
this._$multiSelectOptions.hide();
this._$thumbs.removeClass("multiSelect");
}
+ this._update();
+ };
+ GalleryComponent.prototype._update = function () {
+ var multiSelectState = this._getMultiSelectState();
+ if (multiSelectState.isEnabled) {
+ // check/uncheck Select All checkbox
+ this._$selectAllButtonCheckbox.prop("checked", multiSelectState.allSelected());
+ var anySelected = multiSelectState.getAll().en().where(function (t) { return t.multiSelected; }).toArray().length > 0;
+ if (!anySelected) {
+ this._$selectButton.hide();
+ }
+ else {
+ this._$selectButton.show();
+ }
+ }
};
GalleryComponent.prototype._getMultiSelectState = function () {
return this.options.helper.getMultiSelectState();
@@ -177,9 +219,6 @@ var IIIFComponents;
return;
this._$thumbs.undelegate('.thumb', 'click');
this._$thumbs.empty();
- if (this._isChunkedResizingEnabled()) {
- this._$thumbs.addClass("chunked");
- }
var multiSelectState = this._getMultiSelectState();
// set initial thumb sizes
var heights = [];
@@ -193,8 +232,8 @@ var IIIFComponents;
thumb.multiSelectEnabled = multiSelectState.isEnabled;
}
var medianHeight = Math.median(heights);
- for (var j = 0; j < this._thumbs.length; j++) {
- var thumb = this._thumbs[j];
+ for (var i = 0; i < this._thumbs.length; i++) {
+ var thumb = this._thumbs[i];
thumb.initialHeight = medianHeight;
}
this._$thumbs.link($.templates.galleryThumbsTemplate, this._thumbs);
@@ -223,26 +262,52 @@ var IIIFComponents;
else {
multiSelectState.selectCanvas(thumb.data, thumb.multiSelected);
}
+ that._update();
that._emit(GalleryComponent.Events.THUMB_MULTISELECTED, thumb);
});
});
}
- this._setLabel();
- this._updateThumbs();
};
GalleryComponent.prototype._getThumbByCanvas = function (canvas) {
return this._thumbs.en().where(function (c) { return c.data.id === canvas.id; }).first();
};
GalleryComponent.prototype._sizeThumb = function ($thumb) {
- var $wrap = $thumb.find('.wrap');
- var width = Number($thumb.data().initialwidth);
- var height = Number($thumb.data().initialheight);
- var $label = $thumb.find('.label');
+ var initialWidth = $thumb.data().initialwidth;
+ var initialHeight = $thumb.data().initialheight;
+ var width = Number(initialWidth);
+ var height = Number(initialHeight);
var newWidth = Math.floor(width * this._range);
var newHeight = Math.floor(height * this._range);
+ var $wrap = $thumb.find('.wrap');
+ var $label = $thumb.find('.label');
+ var $index = $thumb.find('.index');
+ var $searchResults = $thumb.find('.searchResults');
+ var newLabelWidth = newWidth;
+ // if search results are visible, size index/label to accommodate it.
+ // if the resulting size is below options.minLabelWidth, hide search results.
+ if (this.options.searchResults && this.options.searchResults.length) {
+ $searchResults.show();
+ newLabelWidth = newWidth - $searchResults.outerWidth();
+ if (newLabelWidth < this.options.minLabelWidth) {
+ $searchResults.hide();
+ newLabelWidth = newWidth;
+ }
+ else {
+ $searchResults.show();
+ }
+ }
+ if (this.options.pageModeEnabled) {
+ $index.hide();
+ $label.show();
+ }
+ else {
+ $index.show();
+ $label.hide();
+ }
$wrap.outerWidth(newWidth);
$wrap.outerHeight(newHeight);
- $label.outerWidth(newWidth);
+ $index.outerWidth(newLabelWidth);
+ $label.outerWidth(newLabelWidth);
};
GalleryComponent.prototype._loadThumb = function ($thumb, cb) {
var $wrap = $thumb.find('.wrap');
@@ -255,16 +320,16 @@ var IIIFComponents;
if (visible !== "false") {
$wrap.addClass('loading');
var src = $thumb.attr('data-src');
- var img = $(' ');
+ var $img = $(' ');
// fade in on load.
- $(img).hide().load(function () {
+ $img.hide().load(function () {
$(this).fadeIn(fadeDuration, function () {
$(this).parent().swapClass('loading', 'loaded');
});
});
- $wrap.prepend(img);
+ $wrap.prepend($img);
if (cb)
- cb(img);
+ cb($img);
}
else {
$wrap.addClass('hidden');
@@ -294,45 +359,37 @@ var IIIFComponents;
}
// test which thumbs are scrolled into view
var thumbs = this._getAllThumbs();
+ var numToUpdate = 0;
for (var i = 0; i < thumbs.length; i++) {
var $thumb = $(thumbs[i]);
var thumbTop = $thumb.position().top;
var thumbHeight = $thumb.outerHeight();
var thumbBottom = thumbTop + thumbHeight;
- if (debug) {
- var $label = $thumb.find('span:visible');
- $label.empty().append('t: ' + thumbTop + ', b: ' + thumbBottom);
- }
- // if chunked resizing isn't enabled, resize all thumbs
- if (!this._isChunkedResizingEnabled()) {
- this._sizeThumb($thumb);
- }
var padding = thumbHeight * this.options.thumbLoadPadding;
// check all thumbs to see if they are within the scroll area plus padding
if (thumbTop <= scrollBottom + padding && thumbBottom >= scrollTop - padding) {
- // if chunked resizing is enabled, only resize, equalise, and show thumbs in the scroll area
- if (this._isChunkedResizingEnabled()) {
- this._sizeThumb($thumb);
- }
- $thumb.removeClass('outsideScrollArea');
- if (debug) {
- $label.append(', i: true');
- }
+ numToUpdate += 1;
+ var $label = $thumb.find('span:visible').not('.searchResults');
+ // if (debug) {
+ // $thumb.addClass('debug');
+ // $label.empty().append('t: ' + thumbTop + ', b: ' + thumbBottom);
+ // } else {
+ // $thumb.removeClass('debug');
+ // }
+ this._sizeThumb($thumb);
+ $thumb.addClass('insideScrollArea');
+ // if (debug) {
+ // $label.append(', i: true');
+ // }
this._loadThumb($thumb);
}
else {
- $thumb.addClass('outsideScrollArea');
- if (debug) {
- $label.append(', i: false');
- }
+ $thumb.removeClass('insideScrollArea');
}
}
- };
- GalleryComponent.prototype._isChunkedResizingEnabled = function () {
- if (this.options.chunkedResizingEnabled && this._thumbs.length > this.options.chunkedResizingThreshold) {
- return true;
+ if (debug) {
+ console.log('number of thumbs to update: ' + numToUpdate);
}
- return false;
};
GalleryComponent.prototype._getSelectedThumbIndex = function () {
return Number(this._$selectedThumb.data('index'));
@@ -350,15 +407,16 @@ var IIIFComponents;
var $thumb = this._getThumbByIndex(canvasIndex);
this._$main.scrollTop($thumb.position().top);
};
- GalleryComponent.prototype._searchPreviewStart = function (canvasIndex) {
- this._scrollToThumb(canvasIndex);
- var $thumb = this._getThumbByIndex(canvasIndex);
- $thumb.addClass('searchpreview');
- };
- GalleryComponent.prototype._searchPreviewFinish = function () {
- this._scrollToThumb(this.options.helper.canvasIndex);
- this._getAllThumbs().removeClass('searchpreview');
- };
+ // these don't work well because thumbs are loaded in chunks
+ // public searchPreviewStart(canvasIndex: number): void {
+ // this._scrollToThumb(canvasIndex);
+ // const $thumb: JQuery = this._getThumbByIndex(canvasIndex);
+ // $thumb.addClass('searchpreview');
+ // }
+ // public searchPreviewFinish(): void {
+ // this._scrollToThumb(this.options.helper.canvasIndex);
+ // this._getAllThumbs().removeClass('searchpreview');
+ // }
GalleryComponent.prototype.selectIndex = function (index) {
if (!this._thumbs || !this._thumbs.length)
return;
@@ -369,16 +427,6 @@ var IIIFComponents;
// make sure visible images are loaded.
this._updateThumbs();
};
- GalleryComponent.prototype._setLabel = function () {
- if (this.options.pageModeEnabled) {
- $(this._$thumbs).find('span.index').hide();
- $(this._$thumbs).find('span.label').show();
- }
- else {
- $(this._$thumbs).find('span.index').show();
- $(this._$thumbs).find('span.label').hide();
- }
- };
GalleryComponent.prototype._setRange = function () {
var norm = Math.normalise(Number(this._$sizeRange.val()), 0, 10);
this._range = Math.clamp(norm, 0.05, 1);
diff --git a/src/extensions/uv-seadragon-extension/lib/iiif-metadata-component.js b/src/extensions/uv-seadragon-extension/lib/iiif-metadata-component.js
index 1481b91e8..2223e4e5f 100644
--- a/src/extensions/uv-seadragon-extension/lib/iiif-metadata-component.js
+++ b/src/extensions/uv-seadragon-extension/lib/iiif-metadata-component.js
@@ -1,4 +1,4 @@
-// iiif-metadata-component v1.0.0 https://github.com/viewdir/iiif-metadata-component#readme
+// iiif-metadata-component v1.0.10 https://github.com/viewdir/iiif-metadata-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifMetadataComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\
');
this._$metadataItemValueTemplate = $('
');
+ this._$metadataItemURIValueTemplate = $(' ');
this._$copyTextTemplate = $('\
' + this.options.content.copiedToClipboard + '
\
');
@@ -282,7 +283,8 @@ var IIIFComponents;
var $metadataItem = this._$metadataItemTemplate.clone();
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
- var label = item.getLabel();
+ var originalLabel = item.getLabel();
+ var label = originalLabel;
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
@@ -306,29 +308,50 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var value;
var $value;
- if (this.options.showAllLanguages && item.value && item.value.length > 1) {
- for (var i = 0; i < item.value.length; i++) {
- var translation = item.value[i];
- $value = this._buildMetadataItemValue(translation.value, translation.locale);
- $values.append($value);
- }
+ // if the value is a URI
+ if (originalLabel && originalLabel.toLowerCase() === "license") {
+ $value = this._buildMetadataItemURIValue(item.value[0].value);
+ $values.append($value);
}
else {
- $value = this._buildMetadataItemValue(item.getValue(), this._getItemLocale(item));
- $values.append($value);
+ if (this.options.showAllLanguages && item.value && item.value.length > 1) {
+ // display all values in each locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ else {
+ var itemLocale = this._getItemLocale(item);
+ var valueFound = false;
+ // display all values in the item's locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ if (itemLocale === translation.locale) {
+ valueFound = true;
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ // if no values were found in the current locale, default to the first.
+ if (!valueFound) {
+ var translation = item.value[0];
+ if (translation) {
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ }
}
- if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $value.text() && $label.text()) {
- this._addCopyButton($metadataItem, $label);
+ if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $label.text()) {
+ this._addCopyButton($metadataItem, $label, $values);
}
return $metadataItem;
};
MetadataComponent.prototype._getItemLocale = function (item) {
- if (item.value && item.value.length) {
- return item.value[0].locale;
- }
- else {
- return item.defaultLocale || this.options.helper.options.locale;
- }
+ // the item's label locale takes precedence
+ return (item.label.length && item.label[0].locale) ? item.label[0].locale : item.defaultLocale || this.options.helper.options.locale;
};
MetadataComponent.prototype._buildMetadataItemValue = function (value, locale) {
value = this._sanitize(value);
@@ -342,6 +365,13 @@ var IIIFComponents;
}
return $value;
};
+ MetadataComponent.prototype._buildMetadataItemURIValue = function (value) {
+ value = this._sanitize(value);
+ var $value = this._$metadataItemURIValueTemplate.clone();
+ $value.prop('href', value);
+ $value.text(value);
+ return $value;
+ };
MetadataComponent.prototype._addReadingDirection = function ($elem, locale) {
locale = Manifesto.Utils.getInexactLocale(locale);
var rtlLanguages = this._readCSV(this.options.rtlLanguageCodes);
@@ -351,7 +381,7 @@ var IIIFComponents;
$elem.addClass('rtl');
}
};
- MetadataComponent.prototype._addCopyButton = function ($elem, $header) {
+ MetadataComponent.prototype._addCopyButton = function ($elem, $header, $values) {
var $copyBtn = this._$copyTextTemplate.clone();
var $copiedText = $copyBtn.children();
$header.append($copyBtn);
@@ -370,20 +400,13 @@ var IIIFComponents;
});
}
var that = this;
+ var originalValue = $values.text();
$copyBtn.on('click', function (e) {
- var $this = $(this);
- var $item = $this.closest('.item');
- that._copyItemValues($this, $item);
+ that._copyItemValues($copyBtn, originalValue);
});
};
- MetadataComponent.prototype._copyItemValues = function ($copyButton, $item) {
- var $values = $item.find('.value');
- var values = "";
- for (var i = 0; i < $values.length; i++) {
- var value = $($values[i]).text();
- values.length ? values += '\n' + value : values += value;
- }
- Utils.Clipboard.copy(values);
+ MetadataComponent.prototype._copyItemValues = function ($copyButton, originalValue) {
+ Utils.Clipboard.copy(originalValue);
var $copiedText = $copyButton.find('.copiedText');
$copiedText.show();
setTimeout(function () {
diff --git a/src/extensions/uv-seadragon-extension/lib/iiif-tree-component.js b/src/extensions/uv-seadragon-extension/lib/iiif-tree-component.js
index 996b13ef8..40449ee5f 100644
--- a/src/extensions/uv-seadragon-extension/lib/iiif-tree-component.js
+++ b/src/extensions/uv-seadragon-extension/lib/iiif-tree-component.js
@@ -1,4 +1,4 @@
-// iiif-tree-component v1.0.1 https://github.com/viewdir/iiif-tree-component#readme
+// iiif-tree-component v1.0.7 https://github.com/viewdir/iiif-tree-component#readme
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifTreeComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o\
');
this._$metadataItemValueTemplate = $('
');
+ this._$metadataItemURIValueTemplate = $(' ');
this._$copyTextTemplate = $('\
' + this.options.content.copiedToClipboard + '
\
');
@@ -282,7 +283,8 @@ var IIIFComponents;
var $metadataItem = this._$metadataItemTemplate.clone();
var $label = $metadataItem.find('.label');
var $values = $metadataItem.find('.values');
- var label = item.getLabel();
+ var originalLabel = item.getLabel();
+ var label = originalLabel;
if (label && item.isRootLevel) {
switch (label.toLowerCase()) {
case "attribution":
@@ -306,29 +308,50 @@ var IIIFComponents;
$metadataItem.addClass(label.toCssClass());
var value;
var $value;
- if (this.options.showAllLanguages && item.value && item.value.length > 1) {
- for (var i = 0; i < item.value.length; i++) {
- var translation = item.value[i];
- $value = this._buildMetadataItemValue(translation.value, translation.locale);
- $values.append($value);
- }
+ // if the value is a URI
+ if (originalLabel && originalLabel.toLowerCase() === "license") {
+ $value = this._buildMetadataItemURIValue(item.value[0].value);
+ $values.append($value);
}
else {
- $value = this._buildMetadataItemValue(item.getValue(), this._getItemLocale(item));
- $values.append($value);
+ if (this.options.showAllLanguages && item.value && item.value.length > 1) {
+ // display all values in each locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ else {
+ var itemLocale = this._getItemLocale(item);
+ var valueFound = false;
+ // display all values in the item's locale
+ for (var i = 0; i < item.value.length; i++) {
+ var translation = item.value[i];
+ if (itemLocale === translation.locale) {
+ valueFound = true;
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ // if no values were found in the current locale, default to the first.
+ if (!valueFound) {
+ var translation = item.value[0];
+ if (translation) {
+ $value = this._buildMetadataItemValue(translation.value, translation.locale);
+ $values.append($value);
+ }
+ }
+ }
}
- if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $value.text() && $label.text()) {
- this._addCopyButton($metadataItem, $label);
+ if (this.options.copyToClipboardEnabled && Utils.Clipboard.supportsCopy() && $label.text()) {
+ this._addCopyButton($metadataItem, $label, $values);
}
return $metadataItem;
};
MetadataComponent.prototype._getItemLocale = function (item) {
- if (item.value && item.value.length) {
- return item.value[0].locale;
- }
- else {
- return item.defaultLocale || this.options.helper.options.locale;
- }
+ // the item's label locale takes precedence
+ return (item.label.length && item.label[0].locale) ? item.label[0].locale : item.defaultLocale || this.options.helper.options.locale;
};
MetadataComponent.prototype._buildMetadataItemValue = function (value, locale) {
value = this._sanitize(value);
@@ -342,6 +365,13 @@ var IIIFComponents;
}
return $value;
};
+ MetadataComponent.prototype._buildMetadataItemURIValue = function (value) {
+ value = this._sanitize(value);
+ var $value = this._$metadataItemURIValueTemplate.clone();
+ $value.prop('href', value);
+ $value.text(value);
+ return $value;
+ };
MetadataComponent.prototype._addReadingDirection = function ($elem, locale) {
locale = Manifesto.Utils.getInexactLocale(locale);
var rtlLanguages = this._readCSV(this.options.rtlLanguageCodes);
@@ -351,7 +381,7 @@ var IIIFComponents;
$elem.addClass('rtl');
}
};
- MetadataComponent.prototype._addCopyButton = function ($elem, $header) {
+ MetadataComponent.prototype._addCopyButton = function ($elem, $header, $values) {
var $copyBtn = this._$copyTextTemplate.clone();
var $copiedText = $copyBtn.children();
$header.append($copyBtn);
@@ -370,20 +400,13 @@ var IIIFComponents;
});
}
var that = this;
+ var originalValue = $values.text();
$copyBtn.on('click', function (e) {
- var $this = $(this);
- var $item = $this.closest('.item');
- that._copyItemValues($this, $item);
+ that._copyItemValues($copyBtn, originalValue);
});
};
- MetadataComponent.prototype._copyItemValues = function ($copyButton, $item) {
- var $values = $item.find('.value');
- var values = "";
- for (var i = 0; i < $values.length; i++) {
- var value = $($values[i]).text();
- values.length ? values += '\n' + value : values += value;
- }
- Utils.Clipboard.copy(values);
+ MetadataComponent.prototype._copyItemValues = function ($copyButton, originalValue) {
+ Utils.Clipboard.copy(originalValue);
var $copiedText = $copyButton.find('.copiedText');
$copiedText.show();
setTimeout(function () {
diff --git a/src/lib/bundle.js b/src/lib/bundle.js
index c0c2a2c11..1be40eb15 100644
--- a/src/lib/bundle.js
+++ b/src/lib/bundle.js
@@ -566,22 +566,18 @@ module.exports = E;
},{}]},{},[1])(1)
});
-!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.baseComponent=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o-1?(this._keys.splice(e,1),this._values.splice(e,1),this.size--,!0):!1},e.prototype.entries=function(){var e=this;return r.range(0,this.size).select(function(r){return[e._keys[r],e._values[r]]})},e.prototype.forEach=function(r,e){null==e&&(e=this);for(var t=0,n=this._keys,o=this._values,u=n.length;u>t;t++)r.call(e,o[t],n[t],this)},e.prototype.get=function(r){var e=this._keys.indexOf(r);return this._values[e]},e.prototype.has=function(r){return this._keys.indexOf(r)>-1},e.prototype.keys=function(){return this._keys.en()},e.prototype.set=function(r,e){var t=this._keys.indexOf(r);t>-1?this._values[t]=e:(this._keys.push(r),this._values.push(e),this.size++)},e.prototype.values=function(){return this._values.en()},e}();r.Map3=e,r.Enumerable.prototype.toMap=function(r,t){for(var n=new e,o=this.getEnumerator();o.moveNext();)n.set(r(o.current),t(o.current));return n},r.List&&(r.List.prototype.toMap=r.Enumerable.prototype.toMap)}(exjs||(exjs={})),function(r){r.Map||(r.Map=exjs.Map3)}("undefined"==typeof window?global:window);var exjs;!function(r){function e(e){var t=new r.Enumerable;return t.getEnumerator=function(){var r={current:void 0,moveNext:function(){return e(r)}};return r},t}r.anonymous=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n,o=1,u={current:void 0,moveNext:function(){if(2>o){if(t=t||r.getEnumerator(),t.moveNext())return u.current=t.current,!0;o++}return n=n||e.en().getEnumerator(),n.moveNext()?(u.current=n.current,!0):(u.current=void 0,!1)}};return u}r.Enumerable.prototype.append=function(){for(var t=this,n=[],o=0;o=e?(t.current=void 0,!1):(t.current=r[n],!0)},t}function t(){return this&&Array.isArray(this)?new n(this):new r.Enumerable}var n=function(r){function t(t){r.call(this),this.getEnumerator=function(){return e(t)},this.toArray=function(){return t.slice(0)}}return __extends(t,r),t}(r.Enumerable);try{Object.defineProperty(Array.prototype,"en",{value:t,enumerable:!1,writable:!1,configurable:!1})}catch(o){Array.prototype.en=t}}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=!1,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),o.current=void 0,t.moveNext()?(o.current=t.current,!0):n?!1:(n=!0,t=e.getEnumerator(),t.moveNext()?(o.current=t.current,!0):!1)}};return o}r.Enumerable.prototype.concat=function(t){var n=this,o=t instanceof Array?t.en():t,u=new r.Enumerable;return u.getEnumerator=function(){return e(n,o)},u},r.List&&(r.List.prototype.concat=r.Enumerable.prototype.concat)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=[],o={current:void 0,moveNext:function(){if(t||(t=r.getEnumerator()),o.current=void 0,!e){for(;t.moveNext();)if(n.indexOf(t.current)<0)return n.push(o.current=t.current),!0;return!1}for(;t.moveNext();){for(var u=0,i=n.length,c=!1;i>u&&!c;u++)c=!!e(n[u],t.current);if(!c)return n.push(o.current=t.current),!0}return!1}};return o}r.Enumerable.prototype.distinct=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.List&&(r.List.prototype.distinct=r.Enumerable.prototype.distinct)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e,t){t=t||function(r,e){return r===e};var n,o={current:void 0,moveNext:function(){for(n||(n=r.getEnumerator()),o.current=void 0;n.moveNext();){for(var u=!1,i=e.getEnumerator();i.moveNext()&&!u;)u=t(n.current,i.current);if(!u)return o.current=n.current,!0}return!1}};return o}r.Enumerable.prototype.except=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.except=r.Enumerable.prototype.except)}(exjs||(exjs={})),Function.prototype.fromJson=function(r,e){function t(r,e){if(null==r)return r;if(e instanceof Function)return e(r);if(e instanceof Array){if(e=e[0],!(e instanceof Function&&r instanceof Array))return;for(var t=[],n=0;n-1)){var i=t(r[u],this.$jsonMappings[u]);void 0!==i&&(n[u]=i,o.push(u))}for(var u in r)o.indexOf(u)>-1||(n[u]=r[u]);return n};var exjs;!function(r){function e(r,e,n){var o,u=0,i={current:void 0,moveNext:function(){return o||(o=t(r,e,n)),i.current=void 0,u>=o.length?!1:(i.current=o[u],u++,!0)}};return i}function t(r,e,t){t=t||function(r,e){return r===e};for(var o,u=[],i=[],c=r.getEnumerator();c.moveNext();){o=e(c.current);for(var a=-1,p=0,s=i.length;s>p;p++)if(t(o,i[p])){a=p;break}var f;0>a?(i.push(o),u.push(f=new n(o))):f=u[a],f._add(c.current)}return u}var n=function(r){function e(e){var t=this;r.call(this),this.key=e,this._arr=[],this.getEnumerator=function(){return t._arr.en().getEnumerator()}}return __extends(e,r),e.prototype._add=function(r){this._arr.push(r)},e}(r.Enumerable);r.Enumerable.prototype.groupBy=function(t,n){var o=this,u=new r.Enumerable;return u.getEnumerator=function(){return e(o,t,n)},u},r.List&&(r.List.prototype.groupBy=r.Enumerable.prototype.groupBy)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n){n=n||function(r,e){return r===e};var o,u={current:void 0,moveNext:function(){for(o||(o=r.en(e).distinct().getEnumerator()),u.current=void 0;o.moveNext();){for(var i=!1,c=t.getEnumerator();c.moveNext()&&!i;)i=n(o.current,c.current);if(i)return u.current=o.current,!0}return!1}};return u}r.Enumerable.prototype.intersect=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.intersect=r.Enumerable.prototype.intersect)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n,o,u,i){i=i||function(r,e){return r===e};var c,a,p=0,s={current:void 0,moveNext:function(){if(s.current=void 0,!c){if(c=e.getEnumerator(),!c.moveNext())return!1;a=r.en(t).toArray()}var f;do{for(;p=e?(t.current=void 0,!1):(t.current=r[n],!0)},t},t.prototype.remove=function(r){return this.removeWhere(function(e){return e===r}).any()},t.prototype.removeWhere=function(r){for(var e,t=[],n=this.length-1;n>=0;n--)e=this[n],r(e,n)===!0&&(this.splice(n,1),t.push(e));return t.en().reverse()}}(exjs||(exjs={}));var exjs;!function(r){function e(r,e,n,o){return new t(r,e,n,o)}var t=function(e){function t(r,t,n,o){e.call(this),this.Source=r,o=o||function(r,e){return r>e?1:e>r?-1:0};var u=n===!0?-1:1;this.Sorter=function(r,e){return u*o(t(r),t(e))}}return __extends(t,e),t.prototype.getEnumerator=function(){var e,t=this.Source,n=this.Sorter,o=0,u={current:void 0,moveNext:function(){return e||(e=r.en(t).toArray(),e.sort(n)),u.current=void 0,o>=e.length?!1:(u.current=e[o],o++,!0)}};return u},t.prototype.thenBy=function(r,e){return new n(this,r,!1,e)},t.prototype.thenByDescending=function(r,e){return new n(this,r,!0,e)},t}(r.Enumerable),n=function(r){function e(e,t,n,o){r.call(this,e,t,n,o);var u=e.Sorter,i=this.Sorter;this.Sorter=function(r,e){return u(r,e)||i(r,e)}}return __extends(e,r),e}(t),o=r.Enumerable.prototype;o.orderBy=function(r,t){return e(this,r,!1,t)},o.orderByDescending=function(r,t){return e(this,r,!0,t)},r.List&&(r.List.prototype.orderBy=r.Enumerable.prototype.orderBy,r.List.prototype.orderByDescending=r.Enumerable.prototype.orderByDescending)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n,o=1,u={current:void 0,moveNext:function(){if(2>o){if(t=t||e.en().getEnumerator(),t.moveNext())return u.current=t.current,!0;o++}return n=n||r.getEnumerator(),n.moveNext()?(u.current=n.current,!0):(u.current=void 0,!1)}};return u}r.Enumerable.prototype.prepend=function(){for(var t=this,n=[],o=0;o=e?!1:(o.current=n,!0)}};return o}function t(t,n,o){if(t=t||0,n=n||0,t>n)throw new Error("Start cannot be greater than end.");null==o&&(o=1);var u=new r.Enumerable;return u.getEnumerator=function(){return e(t,n,o)},u}r.range=t}(exjs||(exjs={}));var exjs;!function(r){function e(e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.en(e).toArray(),n=t.length),n--,o.current=t[n],n>=0}};return o}r.Enumerable.prototype.reverse=function(){var t=this,n=new r.Enumerable;return n.getEnumerator=function(){return e(t)},n},r.List&&(r.List.prototype.reverse=r.Enumerable.prototype.reverse)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){if(e=e||0,0===e)return Math.round(r);var t=Math.pow(10,e);return Math.round(r*t)/t}r.round=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),t.moveNext()?(o.current=e(t.current,n),n++,!0):!1}};return o}function t(e,t){var n,o,u={current:void 0,moveNext:function(){for(u.current=void 0,n||(n=e.getEnumerator());!o||!o.moveNext();){if(!n.moveNext())return!1;o=r.selectorEnumerator(t(n.current))}return u.current=o.current,!0}};return u}r.Enumerable.prototype.select=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.selectMany=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.select=r.Enumerable.prototype.select,r.List.prototype.selectMany=r.Enumerable.prototype.selectMany)}(exjs||(exjs={}));var exjs;!function(r){function e(r){return Array.isArray(r)?r.en().getEnumerator():null!=r&&"function"==typeof r.getEnumerator?r.getEnumerator():null}r.selectorEnumerator=e}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n={current:void 0,moveNext:function(){if(!t){t=r.getEnumerator();for(var o=0;e>o;o++)if(!t.moveNext())return!1}return t.moveNext()?(n.current=t.current,!0):(n.current=void 0,!1)}};return n}function t(r,e){var t,n={current:void 0,moveNext:function(){if(!t){t=r.getEnumerator();for(var o=0;t.moveNext();o++)if(!e(n.current=t.current,o))return!0;return n.current=void 0,!1}return t.moveNext()?(n.current=t.current,!0):(n.current=void 0,!1)}};return n}r.Enumerable.prototype.skip=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.skipWhile=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.skip=r.Enumerable.prototype.skip,r.List.prototype.skipWhile=r.Enumerable.prototype.skipWhile)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),n++,n>e?!1:(o.current=void 0,t.moveNext()?(o.current=t.current,!0):!1)}};return o}function t(r,e){var t,n=0,o={current:void 0,moveNext:function(){return t||(t=r.getEnumerator()),t.moveNext()&&e(t.current,n)?(n++,o.current=t.current,!0):(o.current=void 0,!1)}};return o}r.Enumerable.prototype.take=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.takeWhile=function(e){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return t(n,e)},o},r.List&&(r.List.prototype.take=r.Enumerable.prototype.take,r.List.prototype.takeWhile=r.Enumerable.prototype.takeWhile)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t){var n,o=!1,u=[],i={current:void 0,moveNext:function(){if(o){if(null==n)return!1;u.push(n),n=r.selectorEnumerator(t(i.current))}else n=e.getEnumerator(),o=!0;for(;!(n&&n.moveNext()||u.length<1);)n=u.pop();return i.current=null==n?void 0:n.current,void 0!==i.current}};return i}function t(e,t,n){var o,u=!1,i=[],c={current:void 0,moveNext:function(){if(u){if(null==o)return!1;i.push(o),o=r.selectorEnumerator(t(c.current))}else o=e.getEnumerator(),u=!0;do{for(;!(o&&o.moveNext()||i.length<1);)o=i.pop();c.current=null==o?void 0:o.current}while(n(c.current));return void 0!==c.current}};return c}r.Enumerable.prototype.traverse=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.Enumerable.prototype.traverseUnique=function(e,n){var o=this,u=[],i=new r.Enumerable;return n?i.getEnumerator=function(){return t(o,e,function(r){return u.some(function(e){return n(r,e)})?!0:(u.push(r),!1)})}:i.getEnumerator=function(){return t(o,e,function(r){return u.indexOf(r)>-1?!0:(u.push(r),!1)})},i},r.List&&(r.List.prototype.traverse=r.Enumerable.prototype.traverse,r.List.prototype.traverseUnique=r.Enumerable.prototype.traverseUnique)}(exjs||(exjs={}));var exjs;!function(r){function e(e,t,n){n=n||function(r,e){return r===e};var o,u,i=[],c={current:void 0,moveNext:function(){if(o||(o=r.en(e).distinct().getEnumerator()),c.current=void 0,!u&&o.moveNext())return i.push(c.current=o.current),!0;for(u=u||r.en(t).distinct().getEnumerator();u.moveNext();){for(var a=0,p=!1,s=i.length;s>a&&!p;a++)p=n(i[a],u.current);if(!p)return c.current=u.current,!0}return!1}};return c}r.Enumerable.prototype.union=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.union=r.Enumerable.prototype.union)}(exjs||(exjs={}));var exjs;!function(r){function e(r,e){var t,n={current:void 0,moveNext:function(){t||(t=r.getEnumerator());for(var o;t.moveNext();)if(e(o=t.current))return n.current=o,!0;return!1}};return n}r.Enumerable.prototype.where=function(t){var n=this,o=new r.Enumerable;return o.getEnumerator=function(){return e(n,t)},o},r.List&&(r.List.prototype.where=r.Enumerable.prototype.where)}(exjs||(exjs={}));var exjs;!function(r){function e(e){var n=new r.Enumerable;return n.getEnumerator=function(){return t(e)},n}function t(r){var e=r.getEnumerator(),t={current:void 0,moveNext:void 0};return t.moveNext=function(){return e.moveNext()?(t.current=e.current,!0):(t.current=void 0,!1)},t}r.en=e}(exjs||(exjs={}));var ex=exjs.en,exjs;!function(r){function e(r,e,t){var n,o,u={current:void 0,moveNext:function(){return n||(n=r.getEnumerator()),o||(o=e.getEnumerator()),u.current=void 0,n.moveNext()&&o.moveNext()?(u.current=t(n.current,o.current),!0):!1}};return u}r.Enumerable.prototype.zip=function(t,n){var o=this,u=t instanceof Array?t.en():t,i=new r.Enumerable;return i.getEnumerator=function(){return e(o,u,n)},i},r.List&&(r.List.prototype.zip=r.Enumerable.prototype.zip)}(exjs||(exjs={}));
//# sourceMappingURL=ex.es3.min.js.map
-// extensions v0.1.9 https://github.com/edsilv/extensions
-Array.prototype.clone||(Array.prototype.clone=function(){return this.slice(0)}),Array.prototype.contains||(Array.prototype.contains=function(val){return-1!==this.indexOf(val)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var i=fromIndex||0,j=this.length;for(i;j>i;i++)if(this[i]===searchElement)return i;return-1}),Array.prototype.indexOfTest=function(test,fromIndex){var i=fromIndex||0,j=this.length;for(i;j>i;i++)if(test(this[i]))return i;return-1},Array.prototype.insert=function(item,index){this.splice(index,0,item)},Array.prototype.last||(Array.prototype.last=function(){return this[this.length-1]}),Array.prototype.move=function(fromIndex,toIndex){this.splice(toIndex,0,this.splice(fromIndex,1)[0])},Array.prototype.remove=function(item){var index=this.indexOf(item);index>-1&&this.splice(index,1)},Array.prototype.removeAt=function(index){this.splice(index,1)},Math.clamp=function(value,min,max){return Math.min(Math.max(value,min),max)},Math.constrain=function(value,low,high){return Math.clamp(value,low,high)},Math.degreesToRadians=function(degrees){return Math.TAU*(degrees/360)},Math.distanceBetween=function(x1,y1,x2,y2){return Math.sqrt(Math.sq(x2-x1)+Math.sq(y2-y1))},Math.lerp=function(start,stop,amount){return start+(stop-start)*amount},Math.mag=function(a,b,c){return Math.sqrt(a*a+b*b+c*c)},Math.map=function(value,start1,stop1,start2,stop2){return start2+(stop2-start2)*((value-start1)/(stop1-start1))},Math.median=function(values){values.sort(function(a,b){return a-b});var half=Math.floor(values.length/2);return values.length%2?values[half]:(values[half-1]+values[half])/2},Math.normalise=function(num,min,max){return(num-min)/(max-min)},Math.radiansToDegrees=function(radians){return 360*radians/Math.TAU},Math.randomBetween=function(low,high){return high||(high=low,low=0),low>=high?low:low+(high-low)*Math.random()},Math.roundToDecimalPlace=function(num,dec){return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec)},Math.sq=function(n){return n*n},Math.TAU=2*Math.PI,Number.prototype.isInteger||(Number.prototype.isInteger=function(){return this%1===0}),"function"!=typeof Object.create&&(Object.create=function(o,props){function F(){}F.prototype=o;var result=new F;if("object"==typeof props)for(var prop in props)props.hasOwnProperty(prop)&&(result[prop]=props[prop].value);return result}),Object.keys||(Object.keys=function(){var hasOwnProperty=Object.prototype.hasOwnProperty,hasDontEnumBug=!{toString:null}.propertyIsEnumerable("toString"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;return function(obj){if("object"!=typeof obj&&"function"!=typeof obj||null===obj)throw new TypeError("Object.keys called on non-object");var result=[];for(var prop in obj)hasOwnProperty.call(obj,prop)&&result.push(prop);if(hasDontEnumBug)for(var i=0;dontEnumsLength>i;i++)hasOwnProperty.call(obj,dontEnums[i])&&result.push(dontEnums[i]);return result}}()),String.prototype.b64_to_utf8=function(){return decodeURIComponent(escape(window.atob(this)))},String.prototype.contains=function(str){return-1!==this.indexOf(str)},String.prototype.endsWith||(String.prototype.endsWith=function(str){return-1!==this.indexOf(str,this.length-str.length)}),String.format=function(){for(var s=arguments[0],i=0;ii;i++)chr=this.charCodeAt(i),hash=(hash<<5)-hash+chr,hash|=0;return hash.toString()},String.prototype.isAlphanumeric=function(){return/^[a-zA-Z0-9]*$/.test(this)},String.prototype.ltrim=function(){return this.replace(/^\s+/,"")},String.prototype.rtrim=function(){return this.replace(/\s+$/,"")},String.prototype.startsWith||(String.prototype.startsWith=function(str){return 0==this.indexOf(str)}),String.prototype.toCssClass=function(){return this.replace(/[^a-z0-9]/g,function(s){var c=s.charCodeAt(0);return 32==c?"-":c>=65&&90>=c?"_"+s.toLowerCase():"__"+("000"+c.toString(16)).slice(-4)})},String.prototype.toFileName=function(){return this.replace(/[^a-z0-9]/gi,"_").toLowerCase()},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}),String.prototype.utf8_to_b64=function(){return window.btoa(unescape(encodeURIComponent(this)))};
+// extensions v0.1.11 https://github.com/edsilv/extensions
+Array.prototype.clone||(Array.prototype.clone=function(){return this.slice(0)}),Array.prototype.contains||(Array.prototype.contains=function(val){return this.indexOf(val)!==-1}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var i=fromIndex||0,j=this.length;for(i;i>>0;if("function"!=typeof callback)throw new TypeError(callback+" is not a function");for(arguments.length>1&&(T=thisArg),A=new Array(len),k=0;k-1&&this.splice(index,1)},Array.prototype.removeAt=function(index){this.splice(index,1)},Math.clamp=function(value,min,max){return Math.min(Math.max(value,min),max)},Math.constrain=function(value,low,high){return Math.clamp(value,low,high)},Math.degreesToRadians=function(degrees){return Math.TAU*(degrees/360)},Math.distanceBetween=function(x1,y1,x2,y2){return Math.sqrt(Math.sq(x2-x1)+Math.sq(y2-y1))},Math.lerp=function(start,stop,amount){return start+(stop-start)*amount},Math.mag=function(a,b,c){return Math.sqrt(a*a+b*b+c*c)},Math.map=function(value,start1,stop1,start2,stop2){return start2+(stop2-start2)*((value-start1)/(stop1-start1))},Math.median=function(values){values.sort(function(a,b){return a-b});var half=Math.floor(values.length/2);return values.length%2?values[half]:(values[half-1]+values[half])/2},Math.normalise=function(num,min,max){return(num-min)/(max-min)},Math.radiansToDegrees=function(radians){return 360*radians/Math.TAU},Math.randomBetween=function(low,high){return high||(high=low,low=0),low>=high?low:low+(high-low)*Math.random()},Math.roundToDecimalPlace=function(num,dec){return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec)},Math.sq=function(n){return n*n},Math.TAU=2*Math.PI,Number.prototype.isInteger||(Number.prototype.isInteger=function(){return this%1===0}),"function"!=typeof Object.create&&(Object.create=function(o,props){function F(){}F.prototype=o;var result=new F;if("object"==typeof props)for(var prop in props)props.hasOwnProperty(prop)&&(result[prop]=props[prop].value);return result}),Object.keys||(Object.keys=function(){var hasOwnProperty=Object.prototype.hasOwnProperty,hasDontEnumBug=!{toString:null}.propertyIsEnumerable("toString"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;return function(obj){if("object"!=typeof obj&&"function"!=typeof obj||null===obj)throw new TypeError("Object.keys called on non-object");var result=[];for(var prop in obj)hasOwnProperty.call(obj,prop)&&result.push(prop);if(hasDontEnumBug)for(var i=0;i=65&&c<=90?"_"+s.toLowerCase():"__"+("000"+c.toString(16)).slice(-4)})},String.prototype.toFileName=function(){return this.replace(/[^a-z0-9]/gi,"_").toLowerCase()},String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}),String.prototype.utf8_to_b64=function(){return window.btoa(unescape(encodeURIComponent(this)))};
var HTTPStatusCode;
(function (HTTPStatusCode) {
HTTPStatusCode.CONTINUE = 100;
@@ -1921,15 +1918,17 @@ var Manifesto;
var width = w;
var size;
// if an info.json has been loaded
- if (this.externalResource && this.externalResource.data) {
+ if (this.externalResource && this.externalResource.data && this.externalResource.data['@id']) {
id = this.externalResource.data['@id'];
if (!width) {
width = this.externalResource.data.width;
}
- if (this.externalResource.data['@context'].indexOf('/1.0/context.json') > -1 ||
- this.externalResource.data['@context'].indexOf('/1.1/context.json') > -1 ||
- this.externalResource.data['@context'].indexOf('/1/context.json') > -1) {
- quality = 'native';
+ if (this.externalResource.data['@context']) {
+ if (this.externalResource.data['@context'].indexOf('/1.0/context.json') > -1 ||
+ this.externalResource.data['@context'].indexOf('/1.1/context.json') > -1 ||
+ this.externalResource.data['@context'].indexOf('/1/context.json') > -1) {
+ quality = 'native';
+ }
}
}
else {
@@ -2194,8 +2193,14 @@ var Manifesto;
};
Manifest.prototype._parseRanges = function (r, path, parentRange) {
var range;
+ var id;
if (_isString(r)) {
- r = this._getRangeById(r);
+ id = r;
+ r = this._getRangeById(id);
+ }
+ if (!r) {
+ console.warn("Range:", id, "does not exist");
+ return;
}
range = new Manifesto.Range(r, this.options);
range.parentRange = parentRange;
@@ -2207,28 +2212,25 @@ var Manifesto;
parentRange.members.push(range);
}
if (r.ranges) {
- for (var j = 0; j < r.ranges.length; j++) {
- this._parseRanges(r.ranges[j], path + '/' + j, range);
- }
- }
- if (r.canvases) {
- for (var k = 0; k < r.canvases.length; k++) {
- this._parseRangeCanvas(r.canvases[k], r);
+ for (var i = 0; i < r.ranges.length; i++) {
+ this._parseRanges(r.ranges[i], path + '/' + i, range);
}
}
if (r.members) {
- for (var l = 0; l < r.members.length; l++) {
- var child = r.members[l];
+ var _loop_1 = function(i) {
+ var child = r.members[i];
// only add to members if not already parsed from backwards-compatible ranges/canvases arrays
if (r.members.en().where(function (m) { return m.id === child.id; }).first()) {
- continue;
+ return "continue";
}
if (child['@type'].toLowerCase() === 'sc:range') {
- this._parseRanges(child, path + '/' + l, range);
- }
- else if (child['@type'].toLowerCase() === 'sc:canvas') {
- this._parseRangeCanvas(child, r);
+ this_1._parseRanges(child, path + '/' + i, range);
}
+ };
+ var this_1 = this;
+ for (var i = 0; i < r.members.length; i++) {
+ var state_1 = _loop_1(i);
+ if (state_1 === "continue") continue;
}
}
};
@@ -2305,6 +2307,9 @@ var Manifesto;
Manifest.prototype.isMultiSequence = function () {
return this.getTotalSequences() > 1;
};
+ Manifest.prototype.isPagingEnabled = function () {
+ return this.getViewingHint().toString() === Manifesto.ViewingHint.PAGED.toString();
+ };
Manifest.prototype.getViewingDirection = function () {
if (this.getProperty('viewingDirection')) {
return new Manifesto.ViewingDirection(this.getProperty('viewingDirection'));
@@ -3045,6 +3050,74 @@ var Manifesto;
Utils.generateTreeNodeIds(n, i);
}
};
+ Utils.isImageProfile = function (profile) {
+ if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2PROFILE.toString()) {
+ return true;
+ }
+ return false;
+ };
+ Utils.isLevel0ImageProfile = function (profile) {
+ if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0PROFILE.toString()) {
+ return true;
+ }
+ return false;
+ };
+ Utils.isLevel1ImageProfile = function (profile) {
+ if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1PROFILE.toString()) {
+ return true;
+ }
+ return false;
+ };
+ Utils.isLevel2ImageProfile = function (profile) {
+ if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2PROFILE.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2.toString() ||
+ profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2PROFILE.toString()) {
+ return true;
+ }
+ return false;
+ };
Utils.loadResource = function (uri) {
return new Promise(function (resolve, reject) {
var u = url.parse(uri);
@@ -3397,7 +3470,12 @@ var Manifesto;
};
MetadataItem.prototype.getValue = function () {
if (this.value) {
- return Manifesto.TranslationCollection.getValue(this.value, this.defaultLocale);
+ var locale = this.defaultLocale;
+ // if the label has a locale, prefer that to the default locale
+ if (this.label.length && this.label[0].locale) {
+ locale = this.label[0].locale;
+ }
+ return Manifesto.TranslationCollection.getValue(this.value, locale);
}
return null;
};
@@ -3500,6 +3578,7 @@ global.manifesto = global.Manifesto = module.exports = {
ServiceProfile: new Manifesto.ServiceProfile(),
Translation: Manifesto.Translation,
TranslationCollection: Manifesto.TranslationCollection,
+ TreeNode: Manifesto.TreeNode,
TreeNodeType: new Manifesto.TreeNodeType(),
Utils: Manifesto.Utils,
ViewingDirection: new Manifesto.ViewingDirection(),
@@ -3513,86 +3592,6 @@ global.manifesto = global.Manifesto = module.exports = {
create: function (manifest, options) {
return Manifesto.Deserialiser.parse(manifest, options);
},
- getService: function (resource, profile) {
- return Manifesto.Utils.getService(resource, profile);
- },
- // todo: enable this syntax: var treeNode = new manifesto.TreeNode()
- getTreeNode: function () {
- return new Manifesto.TreeNode();
- },
- isImageProfile: function (profile) {
- if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2PROFILE.toString()) {
- return true;
- }
- return false;
- },
- isLevel0ImageProfile: function (profile) {
- if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL0PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL0PROFILE.toString()) {
- return true;
- }
- return false;
- },
- isLevel1ImageProfile: function (profile) {
- if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL1PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL1PROFILE.toString()) {
- return true;
- }
- return false;
- },
- isLevel2ImageProfile: function (profile) {
- if (profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECOMPLIANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECOMPLIANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIFIMAGECONFORMANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.STANFORDIIIF1IMAGECONFORMANCE2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF1IMAGELEVEL2PROFILE.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2.toString() ||
- profile.toString() === Manifesto.ServiceProfile.IIIF2IMAGELEVEL2PROFILE.toString()) {
- return true;
- }
- return false;
- },
- // todo: create hasServiceDescriptor
- // based on @profile and @type (or lack of) can the resource describe associated services?
- loadExternalResources: function (resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options) {
- return Manifesto.Utils.loadExternalResources(resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options);
- },
loadManifest: function (uri) {
return Manifesto.Utils.loadResource(uri);
}
@@ -3747,293 +3746,531 @@ var Manifesto;
})(Manifesto || (Manifesto = {}));
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"http":27,"https":8,"lodash.assign":37,"lodash.endswith":47,"lodash.isarray":49,"lodash.isstring":50,"lodash.last":51,"lodash.map":52,"url":34}],2:[function(require,module,exports){
-
-},{}],3:[function(require,module,exports){
-(function (global){
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh
- * @license MIT
- */
-/* eslint-disable no-proto */
-
+},{"http":49,"https":9,"lodash.assign":25,"lodash.endswith":26,"lodash.isarray":28,"lodash.isstring":29,"lodash.last":32,"lodash.map":33,"url":55}],2:[function(require,module,exports){
'use strict'
-var base64 = require('base64-js')
-var ieee754 = require('ieee754')
-var isArray = require('isarray')
-
-exports.Buffer = Buffer
-exports.SlowBuffer = SlowBuffer
-exports.INSPECT_MAX_BYTES = 50
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
-/**
- * If `Buffer.TYPED_ARRAY_SUPPORT`:
- * === true Use Uint8Array implementation (fastest)
- * === false Use Object implementation (most compatible, even IE6)
- *
- * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
- * Opera 11.6+, iOS 4.2+.
- *
- * Due to various browser bugs, sometimes the Object implementation will be used even
- * when the browser supports typed arrays.
- *
- * Note:
- *
- * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
- * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
- *
- * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
- *
- * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
- * incorrect length in some situations.
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
- * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
- * get the Object implementation, which is slower but behaves correctly.
- */
-Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
- ? global.TYPED_ARRAY_SUPPORT
- : typedArraySupport()
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+ lookup[i] = code[i]
+ revLookup[code.charCodeAt(i)] = i
+}
-/*
- * Export kMaxLength after typed array support is determined.
- */
-exports.kMaxLength = kMaxLength()
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
-function typedArraySupport () {
- try {
- var arr = new Uint8Array(1)
- arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
- return arr.foo() === 42 && // typed array instances can be augmented
- typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
- arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
- } catch (e) {
- return false
+function placeHoldersCount (b64) {
+ var len = b64.length
+ if (len % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
}
+
+ // the number of equal signs (place holders)
+ // if there are two placeholders, than the two characters before it
+ // represent one byte
+ // if there is only one, then the three characters before it represent 2 bytes
+ // this is just a cheap hack to not do indexOf twice
+ return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
}
-function kMaxLength () {
- return Buffer.TYPED_ARRAY_SUPPORT
- ? 0x7fffffff
- : 0x3fffffff
+function byteLength (b64) {
+ // base64 is 4/3 + up to two characters of the original data
+ return b64.length * 3 / 4 - placeHoldersCount(b64)
}
-function createBuffer (that, length) {
- if (kMaxLength() < length) {
- throw new RangeError('Invalid typed array length')
- }
- if (Buffer.TYPED_ARRAY_SUPPORT) {
- // Return an augmented `Uint8Array` instance, for best performance
- that = new Uint8Array(length)
- that.__proto__ = Buffer.prototype
- } else {
- // Fallback: Return an object instance of the Buffer class
- if (that === null) {
- that = new Buffer(length)
- }
- that.length = length
- }
+function toByteArray (b64) {
+ var i, j, l, tmp, placeHolders, arr
+ var len = b64.length
+ placeHolders = placeHoldersCount(b64)
- return that
-}
+ arr = new Arr(len * 3 / 4 - placeHolders)
-/**
- * The Buffer constructor returns instances of `Uint8Array` that have their
- * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
- * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
- * and the `Uint8Array` methods. Square bracket notation works as expected -- it
- * returns a single octet.
- *
- * The `Uint8Array` prototype remains unmodified.
- */
+ // if there are placeholders, only get up to the last complete 4 chars
+ l = placeHolders > 0 ? len - 4 : len
-function Buffer (arg, encodingOrOffset, length) {
- if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
- return new Buffer(arg, encodingOrOffset, length)
- }
+ var L = 0
- // Common case.
- if (typeof arg === 'number') {
- if (typeof encodingOrOffset === 'string') {
- throw new Error(
- 'If encoding is specified then the first argument must be a string'
- )
- }
- return allocUnsafe(this, arg)
+ for (i = 0, j = 0; i < l; i += 4, j += 3) {
+ tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
+ arr[L++] = (tmp >> 16) & 0xFF
+ arr[L++] = (tmp >> 8) & 0xFF
+ arr[L++] = tmp & 0xFF
}
- return from(this, arg, encodingOrOffset, length)
-}
-Buffer.poolSize = 8192 // not used by this implementation
+ if (placeHolders === 2) {
+ tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
+ arr[L++] = tmp & 0xFF
+ } else if (placeHolders === 1) {
+ tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
+ arr[L++] = (tmp >> 8) & 0xFF
+ arr[L++] = tmp & 0xFF
+ }
-// TODO: Legacy, not needed anymore. Remove in next major version.
-Buffer._augment = function (arr) {
- arr.__proto__ = Buffer.prototype
return arr
}
-function from (that, value, encodingOrOffset, length) {
- if (typeof value === 'number') {
- throw new TypeError('"value" argument must not be a number')
+function tripletToBase64 (num) {
+ return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
+}
+
+function encodeChunk (uint8, start, end) {
+ var tmp
+ var output = []
+ for (var i = start; i < end; i += 3) {
+ tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
+ output.push(tripletToBase64(tmp))
}
+ return output.join('')
+}
- if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
- return fromArrayBuffer(that, value, encodingOrOffset, length)
+function fromByteArray (uint8) {
+ var tmp
+ var len = uint8.length
+ var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+ var output = ''
+ var parts = []
+ var maxChunkLength = 16383 // must be multiple of 3
+
+ // go through the array every three bytes, we'll deal with trailing stuff later
+ for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+ parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
}
- if (typeof value === 'string') {
- return fromString(that, value, encodingOrOffset)
+ // pad the end with zeros, but make sure to not forget the extra bytes
+ if (extraBytes === 1) {
+ tmp = uint8[len - 1]
+ output += lookup[tmp >> 2]
+ output += lookup[(tmp << 4) & 0x3F]
+ output += '=='
+ } else if (extraBytes === 2) {
+ tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
+ output += lookup[tmp >> 10]
+ output += lookup[(tmp >> 4) & 0x3F]
+ output += lookup[(tmp << 2) & 0x3F]
+ output += '='
}
- return fromObject(that, value)
-}
+ parts.push(output)
-/**
- * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
- * if value is a number.
- * Buffer.from(str[, encoding])
- * Buffer.from(array)
- * Buffer.from(buffer)
- * Buffer.from(arrayBuffer[, byteOffset[, length]])
- **/
-Buffer.from = function (value, encodingOrOffset, length) {
- return from(null, value, encodingOrOffset, length)
+ return parts.join('')
}
-if (Buffer.TYPED_ARRAY_SUPPORT) {
- Buffer.prototype.__proto__ = Uint8Array.prototype
- Buffer.__proto__ = Uint8Array
- if (typeof Symbol !== 'undefined' && Symbol.species &&
- Buffer[Symbol.species] === Buffer) {
- // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
- Object.defineProperty(Buffer, Symbol.species, {
- value: null,
- configurable: true
- })
- }
-}
+},{}],3:[function(require,module,exports){
-function assertSize (size) {
+},{}],4:[function(require,module,exports){
+(function (global){
+'use strict';
+
+var buffer = require('buffer');
+var Buffer = buffer.Buffer;
+var SlowBuffer = buffer.SlowBuffer;
+var MAX_LEN = buffer.kMaxLength || 2147483647;
+exports.alloc = function alloc(size, fill, encoding) {
+ if (typeof Buffer.alloc === 'function') {
+ return Buffer.alloc(size, fill, encoding);
+ }
+ if (typeof encoding === 'number') {
+ throw new TypeError('encoding must not be number');
+ }
if (typeof size !== 'number') {
- throw new TypeError('"size" argument must be a number')
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ var enc = encoding;
+ var _fill = fill;
+ if (_fill === undefined) {
+ enc = undefined;
+ _fill = 0;
+ }
+ var buf = new Buffer(size);
+ if (typeof _fill === 'string') {
+ var fillBuf = new Buffer(_fill, enc);
+ var flen = fillBuf.length;
+ var i = -1;
+ while (++i < size) {
+ buf[i] = fillBuf[i % flen];
+ }
+ } else {
+ buf.fill(_fill);
}
+ return buf;
}
-
-function alloc (that, size, fill, encoding) {
- assertSize(size)
- if (size <= 0) {
- return createBuffer(that, size)
+exports.allocUnsafe = function allocUnsafe(size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ return Buffer.allocUnsafe(size);
}
- if (fill !== undefined) {
- // Only pay attention to encoding if it's a string. This
- // prevents accidentally sending in a number that would
- // be interpretted as a start offset.
- return typeof encoding === 'string'
- ? createBuffer(that, size).fill(fill, encoding)
- : createBuffer(that, size).fill(fill)
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
}
- return createBuffer(that, size)
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new Buffer(size);
}
+exports.from = function from(value, encodingOrOffset, length) {
+ if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {
+ return Buffer.from(value, encodingOrOffset, length);
+ }
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number');
+ }
+ if (typeof value === 'string') {
+ return new Buffer(value, encodingOrOffset);
+ }
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ var offset = encodingOrOffset;
+ if (arguments.length === 1) {
+ return new Buffer(value);
+ }
+ if (typeof offset === 'undefined') {
+ offset = 0;
+ }
+ var len = length;
+ if (typeof len === 'undefined') {
+ len = value.byteLength - offset;
+ }
+ if (offset >= value.byteLength) {
+ throw new RangeError('\'offset\' is out of bounds');
+ }
+ if (len > value.byteLength - offset) {
+ throw new RangeError('\'length\' is out of bounds');
+ }
+ return new Buffer(value.slice(offset, offset + len));
+ }
+ if (Buffer.isBuffer(value)) {
+ var out = new Buffer(value.length);
+ value.copy(out, 0, 0, value.length);
+ return out;
+ }
+ if (value) {
+ if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {
+ return new Buffer(value);
+ }
+ if (value.type === 'Buffer' && Array.isArray(value.data)) {
+ return new Buffer(value.data);
+ }
+ }
-/**
- * Creates a new filled Buffer instance.
- * alloc(size[, fill[, encoding]])
- **/
-Buffer.alloc = function (size, fill, encoding) {
- return alloc(null, size, fill, encoding)
+ throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');
}
-
-function allocUnsafe (that, size) {
- assertSize(size)
- that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
- if (!Buffer.TYPED_ARRAY_SUPPORT) {
- for (var i = 0; i < size; ++i) {
- that[i] = 0
- }
+exports.allocUnsafeSlow = function allocUnsafeSlow(size) {
+ if (typeof Buffer.allocUnsafeSlow === 'function') {
+ return Buffer.allocUnsafeSlow(size);
}
- return that
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size >= MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new SlowBuffer(size);
}
-/**
- * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
- * */
-Buffer.allocUnsafe = function (size) {
- return allocUnsafe(null, size)
-}
-/**
- * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"buffer":5}],5:[function(require,module,exports){
+(function (global){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
*/
-Buffer.allocUnsafeSlow = function (size) {
- return allocUnsafe(null, size)
-}
+/* eslint-disable no-proto */
-function fromString (that, string, encoding) {
- if (typeof encoding !== 'string' || encoding === '') {
- encoding = 'utf8'
- }
+'use strict'
- if (!Buffer.isEncoding(encoding)) {
- throw new TypeError('"encoding" must be a valid string encoding')
- }
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+var isArray = require('isarray')
- var length = byteLength(string, encoding) | 0
- that = createBuffer(that, length)
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
- that.write(string, encoding)
- return that
-}
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Due to various browser bugs, sometimes the Object implementation will be used even
+ * when the browser supports typed arrays.
+ *
+ * Note:
+ *
+ * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ * incorrect length in some situations.
-function fromArrayLike (that, array) {
- var length = checked(array.length) | 0
- that = createBuffer(that, length)
- for (var i = 0; i < length; i += 1) {
- that[i] = array[i] & 255
- }
- return that
-}
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
+ * get the Object implementation, which is slower but behaves correctly.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
+ ? global.TYPED_ARRAY_SUPPORT
+ : typedArraySupport()
-function fromArrayBuffer (that, array, byteOffset, length) {
- array.byteLength // this throws if `array` is not a valid ArrayBuffer
+/*
+ * Export kMaxLength after typed array support is determined.
+ */
+exports.kMaxLength = kMaxLength()
- if (byteOffset < 0 || array.byteLength < byteOffset) {
- throw new RangeError('\'offset\' is out of bounds')
+function typedArraySupport () {
+ try {
+ var arr = new Uint8Array(1)
+ arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
+ return arr.foo() === 42 && // typed array instances can be augmented
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
+ arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
+ } catch (e) {
+ return false
}
+}
- if (array.byteLength < byteOffset + (length || 0)) {
- throw new RangeError('\'length\' is out of bounds')
- }
+function kMaxLength () {
+ return Buffer.TYPED_ARRAY_SUPPORT
+ ? 0x7fffffff
+ : 0x3fffffff
+}
- if (byteOffset === undefined && length === undefined) {
- array = new Uint8Array(array)
- } else if (length === undefined) {
- array = new Uint8Array(array, byteOffset)
- } else {
- array = new Uint8Array(array, byteOffset, length)
+function createBuffer (that, length) {
+ if (kMaxLength() < length) {
+ throw new RangeError('Invalid typed array length')
}
-
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
- that = array
+ that = new Uint8Array(length)
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
- that = fromArrayLike(that, array)
+ if (that === null) {
+ that = new Buffer(length)
+ }
+ that.length = length
}
+
return that
}
-function fromObject (that, obj) {
- if (Buffer.isBuffer(obj)) {
- var len = checked(obj.length) | 0
- that = createBuffer(that, len)
-
- if (that.length === 0) {
- return that
- }
-
- obj.copy(that, 0, 0, len)
+/**
+ * The Buffer constructor returns instances of `Uint8Array` that have their
+ * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
+ * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
+ * and the `Uint8Array` methods. Square bracket notation works as expected -- it
+ * returns a single octet.
+ *
+ * The `Uint8Array` prototype remains unmodified.
+ */
+
+function Buffer (arg, encodingOrOffset, length) {
+ if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
+ return new Buffer(arg, encodingOrOffset, length)
+ }
+
+ // Common case.
+ if (typeof arg === 'number') {
+ if (typeof encodingOrOffset === 'string') {
+ throw new Error(
+ 'If encoding is specified then the first argument must be a string'
+ )
+ }
+ return allocUnsafe(this, arg)
+ }
+ return from(this, arg, encodingOrOffset, length)
+}
+
+Buffer.poolSize = 8192 // not used by this implementation
+
+// TODO: Legacy, not needed anymore. Remove in next major version.
+Buffer._augment = function (arr) {
+ arr.__proto__ = Buffer.prototype
+ return arr
+}
+
+function from (that, value, encodingOrOffset, length) {
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number')
+ }
+
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ return fromArrayBuffer(that, value, encodingOrOffset, length)
+ }
+
+ if (typeof value === 'string') {
+ return fromString(that, value, encodingOrOffset)
+ }
+
+ return fromObject(that, value)
+}
+
+/**
+ * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
+ * if value is a number.
+ * Buffer.from(str[, encoding])
+ * Buffer.from(array)
+ * Buffer.from(buffer)
+ * Buffer.from(arrayBuffer[, byteOffset[, length]])
+ **/
+Buffer.from = function (value, encodingOrOffset, length) {
+ return from(null, value, encodingOrOffset, length)
+}
+
+if (Buffer.TYPED_ARRAY_SUPPORT) {
+ Buffer.prototype.__proto__ = Uint8Array.prototype
+ Buffer.__proto__ = Uint8Array
+ if (typeof Symbol !== 'undefined' && Symbol.species &&
+ Buffer[Symbol.species] === Buffer) {
+ // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
+ Object.defineProperty(Buffer, Symbol.species, {
+ value: null,
+ configurable: true
+ })
+ }
+}
+
+function assertSize (size) {
+ if (typeof size !== 'number') {
+ throw new TypeError('"size" argument must be a number')
+ } else if (size < 0) {
+ throw new RangeError('"size" argument must not be negative')
+ }
+}
+
+function alloc (that, size, fill, encoding) {
+ assertSize(size)
+ if (size <= 0) {
+ return createBuffer(that, size)
+ }
+ if (fill !== undefined) {
+ // Only pay attention to encoding if it's a string. This
+ // prevents accidentally sending in a number that would
+ // be interpretted as a start offset.
+ return typeof encoding === 'string'
+ ? createBuffer(that, size).fill(fill, encoding)
+ : createBuffer(that, size).fill(fill)
+ }
+ return createBuffer(that, size)
+}
+
+/**
+ * Creates a new filled Buffer instance.
+ * alloc(size[, fill[, encoding]])
+ **/
+Buffer.alloc = function (size, fill, encoding) {
+ return alloc(null, size, fill, encoding)
+}
+
+function allocUnsafe (that, size) {
+ assertSize(size)
+ that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < size; ++i) {
+ that[i] = 0
+ }
+ }
+ return that
+}
+
+/**
+ * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
+ * */
+Buffer.allocUnsafe = function (size) {
+ return allocUnsafe(null, size)
+}
+/**
+ * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
+ */
+Buffer.allocUnsafeSlow = function (size) {
+ return allocUnsafe(null, size)
+}
+
+function fromString (that, string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') {
+ encoding = 'utf8'
+ }
+
+ if (!Buffer.isEncoding(encoding)) {
+ throw new TypeError('"encoding" must be a valid string encoding')
+ }
+
+ var length = byteLength(string, encoding) | 0
+ that = createBuffer(that, length)
+
+ var actual = that.write(string, encoding)
+
+ if (actual !== length) {
+ // Writing a hex string, for example, that contains invalid characters will
+ // cause everything after the first invalid character to be ignored. (e.g.
+ // 'abxxcd' will be treated as 'ab')
+ that = that.slice(0, actual)
+ }
+
+ return that
+}
+
+function fromArrayLike (that, array) {
+ var length = array.length < 0 ? 0 : checked(array.length) | 0
+ that = createBuffer(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+function fromArrayBuffer (that, array, byteOffset, length) {
+ array.byteLength // this throws if `array` is not a valid ArrayBuffer
+
+ if (byteOffset < 0 || array.byteLength < byteOffset) {
+ throw new RangeError('\'offset\' is out of bounds')
+ }
+
+ if (array.byteLength < byteOffset + (length || 0)) {
+ throw new RangeError('\'length\' is out of bounds')
+ }
+
+ if (byteOffset === undefined && length === undefined) {
+ array = new Uint8Array(array)
+ } else if (length === undefined) {
+ array = new Uint8Array(array, byteOffset)
+ } else {
+ array = new Uint8Array(array, byteOffset, length)
+ }
+
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = array
+ that.__proto__ = Buffer.prototype
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ that = fromArrayLike(that, array)
+ }
+ return that
+}
+
+function fromObject (that, obj) {
+ if (Buffer.isBuffer(obj)) {
+ var len = checked(obj.length) | 0
+ that = createBuffer(that, len)
+
+ if (that.length === 0) {
+ return that
+ }
+
+ obj.copy(that, 0, 0, len)
return that
}
@@ -4055,7 +4292,7 @@ function fromObject (that, obj) {
}
function checked (length) {
- // Note: cannot use `length < kMaxLength` here because that fails when
+ // Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
@@ -4104,9 +4341,9 @@ Buffer.isEncoding = function isEncoding (encoding) {
case 'utf8':
case 'utf-8':
case 'ascii':
+ case 'latin1':
case 'binary':
case 'base64':
- case 'raw':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
@@ -4167,9 +4404,8 @@ function byteLength (string, encoding) {
for (;;) {
switch (encoding) {
case 'ascii':
+ case 'latin1':
case 'binary':
- case 'raw':
- case 'raws':
return len
case 'utf8':
case 'utf-8':
@@ -4242,8 +4478,9 @@ function slowToString (encoding, start, end) {
case 'ascii':
return asciiSlice(this, start, end)
+ case 'latin1':
case 'binary':
- return binarySlice(this, start, end)
+ return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
@@ -4295,6 +4532,20 @@ Buffer.prototype.swap32 = function swap32 () {
return this
}
+Buffer.prototype.swap64 = function swap64 () {
+ var len = this.length
+ if (len % 8 !== 0) {
+ throw new RangeError('Buffer size must be a multiple of 64-bits')
+ }
+ for (var i = 0; i < len; i += 8) {
+ swap(this, i, i + 7)
+ swap(this, i + 1, i + 6)
+ swap(this, i + 2, i + 5)
+ swap(this, i + 3, i + 4)
+ }
+ return this
+}
+
Buffer.prototype.toString = function toString () {
var length = this.length | 0
if (length === 0) return ''
@@ -4377,7 +4628,73 @@ Buffer.prototype.compare = function compare (target, start, end, thisStart, this
return 0
}
-function arrayIndexOf (arr, val, byteOffset, encoding) {
+// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
+// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
+//
+// Arguments:
+// - buffer - a Buffer to search
+// - val - a string, Buffer, or number
+// - byteOffset - an index into `buffer`; will be clamped to an int32
+// - encoding - an optional encoding, relevant is val is a string
+// - dir - true for indexOf, false for lastIndexOf
+function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
+ // Empty buffer means no match
+ if (buffer.length === 0) return -1
+
+ // Normalize byteOffset
+ if (typeof byteOffset === 'string') {
+ encoding = byteOffset
+ byteOffset = 0
+ } else if (byteOffset > 0x7fffffff) {
+ byteOffset = 0x7fffffff
+ } else if (byteOffset < -0x80000000) {
+ byteOffset = -0x80000000
+ }
+ byteOffset = +byteOffset // Coerce to Number.
+ if (isNaN(byteOffset)) {
+ // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
+ byteOffset = dir ? 0 : (buffer.length - 1)
+ }
+
+ // Normalize byteOffset: negative offsets start from the end of the buffer
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset
+ if (byteOffset >= buffer.length) {
+ if (dir) return -1
+ else byteOffset = buffer.length - 1
+ } else if (byteOffset < 0) {
+ if (dir) byteOffset = 0
+ else return -1
+ }
+
+ // Normalize val
+ if (typeof val === 'string') {
+ val = Buffer.from(val, encoding)
+ }
+
+ // Finally, search either indexOf (if dir is true) or lastIndexOf
+ if (Buffer.isBuffer(val)) {
+ // Special case: looking for empty string/buffer always fails
+ if (val.length === 0) {
+ return -1
+ }
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
+ } else if (typeof val === 'number') {
+ val = val & 0xFF // Search for a byte value [0-255]
+ if (Buffer.TYPED_ARRAY_SUPPORT &&
+ typeof Uint8Array.prototype.indexOf === 'function') {
+ if (dir) {
+ return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
+ } else {
+ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
+ }
+ }
+ return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
+ }
+
+ throw new TypeError('val must be string, number or Buffer')
+}
+
+function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1
var arrLength = arr.length
var valLength = val.length
@@ -4404,61 +4721,46 @@ function arrayIndexOf (arr, val, byteOffset, encoding) {
}
}
- var foundIndex = -1
- for (var i = byteOffset; i < arrLength; ++i) {
- if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
- if (foundIndex === -1) foundIndex = i
- if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
- } else {
- if (foundIndex !== -1) i -= i - foundIndex
- foundIndex = -1
+ var i
+ if (dir) {
+ var foundIndex = -1
+ for (i = byteOffset; i < arrLength; i++) {
+ if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
+ if (foundIndex === -1) foundIndex = i
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
+ } else {
+ if (foundIndex !== -1) i -= i - foundIndex
+ foundIndex = -1
+ }
+ }
+ } else {
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
+ for (i = byteOffset; i >= 0; i--) {
+ var found = true
+ for (var j = 0; j < valLength; j++) {
+ if (read(arr, i + j) !== read(val, j)) {
+ found = false
+ break
+ }
+ }
+ if (found) return i
}
}
return -1
}
-Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
- if (typeof byteOffset === 'string') {
- encoding = byteOffset
- byteOffset = 0
- } else if (byteOffset > 0x7fffffff) {
- byteOffset = 0x7fffffff
- } else if (byteOffset < -0x80000000) {
- byteOffset = -0x80000000
- }
- byteOffset >>= 0
+Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
+ return this.indexOf(val, byteOffset, encoding) !== -1
+}
- if (this.length === 0) return -1
- if (byteOffset >= this.length) return -1
+Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
+}
- // Negative offsets start from the end of the buffer
- if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
-
- if (typeof val === 'string') {
- val = Buffer.from(val, encoding)
- }
-
- if (Buffer.isBuffer(val)) {
- // special case: looking for empty string/buffer always fails
- if (val.length === 0) {
- return -1
- }
- return arrayIndexOf(this, val, byteOffset, encoding)
- }
- if (typeof val === 'number') {
- if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
- return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
- }
- return arrayIndexOf(this, [ val ], byteOffset, encoding)
- }
-
- throw new TypeError('val must be string, number or Buffer')
-}
-
-Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
- return this.indexOf(val, byteOffset, encoding) !== -1
-}
+Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
+}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
@@ -4474,7 +4776,7 @@ function hexWrite (buf, string, offset, length) {
// must be an even number of digits
var strLen = string.length
- if (strLen % 2 !== 0) throw new Error('Invalid hex string')
+ if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
@@ -4495,7 +4797,7 @@ function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
-function binaryWrite (buf, string, offset, length) {
+function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
@@ -4557,8 +4859,9 @@ Buffer.prototype.write = function write (string, offset, length, encoding) {
case 'ascii':
return asciiWrite(this, string, offset, length)
+ case 'latin1':
case 'binary':
- return binaryWrite(this, string, offset, length)
+ return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
@@ -4699,7 +5002,7 @@ function asciiSlice (buf, start, end) {
return ret
}
-function binarySlice (buf, start, end) {
+function latin1Slice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
@@ -5466,211 +5769,183 @@ function isnan (val) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"base64-js":4,"ieee754":5,"isarray":6}],4:[function(require,module,exports){
-'use strict'
+},{"base64-js":2,"ieee754":10,"isarray":13}],6:[function(require,module,exports){
+module.exports = {
+ "100": "Continue",
+ "101": "Switching Protocols",
+ "102": "Processing",
+ "200": "OK",
+ "201": "Created",
+ "202": "Accepted",
+ "203": "Non-Authoritative Information",
+ "204": "No Content",
+ "205": "Reset Content",
+ "206": "Partial Content",
+ "207": "Multi-Status",
+ "208": "Already Reported",
+ "226": "IM Used",
+ "300": "Multiple Choices",
+ "301": "Moved Permanently",
+ "302": "Found",
+ "303": "See Other",
+ "304": "Not Modified",
+ "305": "Use Proxy",
+ "307": "Temporary Redirect",
+ "308": "Permanent Redirect",
+ "400": "Bad Request",
+ "401": "Unauthorized",
+ "402": "Payment Required",
+ "403": "Forbidden",
+ "404": "Not Found",
+ "405": "Method Not Allowed",
+ "406": "Not Acceptable",
+ "407": "Proxy Authentication Required",
+ "408": "Request Timeout",
+ "409": "Conflict",
+ "410": "Gone",
+ "411": "Length Required",
+ "412": "Precondition Failed",
+ "413": "Payload Too Large",
+ "414": "URI Too Long",
+ "415": "Unsupported Media Type",
+ "416": "Range Not Satisfiable",
+ "417": "Expectation Failed",
+ "418": "I'm a teapot",
+ "421": "Misdirected Request",
+ "422": "Unprocessable Entity",
+ "423": "Locked",
+ "424": "Failed Dependency",
+ "425": "Unordered Collection",
+ "426": "Upgrade Required",
+ "428": "Precondition Required",
+ "429": "Too Many Requests",
+ "431": "Request Header Fields Too Large",
+ "500": "Internal Server Error",
+ "501": "Not Implemented",
+ "502": "Bad Gateway",
+ "503": "Service Unavailable",
+ "504": "Gateway Timeout",
+ "505": "HTTP Version Not Supported",
+ "506": "Variant Also Negotiates",
+ "507": "Insufficient Storage",
+ "508": "Loop Detected",
+ "509": "Bandwidth Limit Exceeded",
+ "510": "Not Extended",
+ "511": "Network Authentication Required"
+}
-exports.toByteArray = toByteArray
-exports.fromByteArray = fromByteArray
+},{}],7:[function(require,module,exports){
+(function (Buffer){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
-var lookup = []
-var revLookup = []
-var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
-function init () {
- var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
- for (var i = 0, len = code.length; i < len; ++i) {
- lookup[i] = code[i]
- revLookup[code.charCodeAt(i)] = i
+function isArray(arg) {
+ if (Array.isArray) {
+ return Array.isArray(arg);
}
-
- revLookup['-'.charCodeAt(0)] = 62
- revLookup['_'.charCodeAt(0)] = 63
+ return objectToString(arg) === '[object Array]';
}
+exports.isArray = isArray;
-init()
-
-function toByteArray (b64) {
- var i, j, l, tmp, placeHolders, arr
- var len = b64.length
-
- if (len % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
- // the number of equal signs (place holders)
- // if there are two placeholders, than the two characters before it
- // represent one byte
- // if there is only one, then the three characters before it represent 2 bytes
- // this is just a cheap hack to not do indexOf twice
- placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
- // base64 is 4/3 + up to two characters of the original data
- arr = new Arr(len * 3 / 4 - placeHolders)
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
- // if there are placeholders, only get up to the last complete 4 chars
- l = placeHolders > 0 ? len - 4 : len
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
- var L = 0
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
- tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
- arr[L++] = (tmp >> 16) & 0xFF
- arr[L++] = (tmp >> 8) & 0xFF
- arr[L++] = tmp & 0xFF
- }
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
- if (placeHolders === 2) {
- tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
- arr[L++] = tmp & 0xFF
- } else if (placeHolders === 1) {
- tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
- arr[L++] = (tmp >> 8) & 0xFF
- arr[L++] = tmp & 0xFF
- }
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
- return arr
+function isRegExp(re) {
+ return objectToString(re) === '[object RegExp]';
}
+exports.isRegExp = isRegExp;
-function tripletToBase64 (num) {
- return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
}
+exports.isObject = isObject;
-function encodeChunk (uint8, start, end) {
- var tmp
- var output = []
- for (var i = start; i < end; i += 3) {
- tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
- output.push(tripletToBase64(tmp))
- }
- return output.join('')
+function isDate(d) {
+ return objectToString(d) === '[object Date]';
}
+exports.isDate = isDate;
-function fromByteArray (uint8) {
- var tmp
- var len = uint8.length
- var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
- var output = ''
- var parts = []
- var maxChunkLength = 16383 // must be multiple of 3
+function isError(e) {
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
- // go through the array every three bytes, we'll deal with trailing stuff later
- for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
- parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
- }
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
- // pad the end with zeros, but make sure to not forget the extra bytes
- if (extraBytes === 1) {
- tmp = uint8[len - 1]
- output += lookup[tmp >> 2]
- output += lookup[(tmp << 4) & 0x3F]
- output += '=='
- } else if (extraBytes === 2) {
- tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
- output += lookup[tmp >> 10]
- output += lookup[(tmp >> 4) & 0x3F]
- output += lookup[(tmp << 2) & 0x3F]
- output += '='
- }
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
- parts.push(output)
+exports.isBuffer = Buffer.isBuffer;
- return parts.join('')
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
}
-},{}],5:[function(require,module,exports){
-exports.read = function (buffer, offset, isLE, mLen, nBytes) {
- var e, m
- var eLen = nBytes * 8 - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var nBits = -7
- var i = isLE ? (nBytes - 1) : 0
- var d = isLE ? -1 : 1
- var s = buffer[offset + i]
-
- i += d
-
- e = s & ((1 << (-nBits)) - 1)
- s >>= (-nBits)
- nBits += eLen
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- m = e & ((1 << (-nBits)) - 1)
- e >>= (-nBits)
- nBits += mLen
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- if (e === 0) {
- e = 1 - eBias
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity)
- } else {
- m = m + Math.pow(2, mLen)
- e = e - eBias
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-}
-
-exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c
- var eLen = nBytes * 8 - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
- var i = isLE ? 0 : (nBytes - 1)
- var d = isLE ? 1 : -1
- var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
-
- value = Math.abs(value)
-
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0
- e = eMax
- } else {
- e = Math.floor(Math.log(value) / Math.LN2)
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--
- c *= 2
- }
- if (e + eBias >= 1) {
- value += rt / c
- } else {
- value += rt * Math.pow(2, 1 - eBias)
- }
- if (value * c >= 2) {
- e++
- c /= 2
- }
-
- if (e + eBias >= eMax) {
- m = 0
- e = eMax
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen)
- e = e + eBias
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
- e = 0
- }
- }
-
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
-
- e = (e << mLen) | m
- eLen += mLen
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
-
- buffer[offset + i - d] |= s * 128
-}
-
-},{}],6:[function(require,module,exports){
-var toString = {}.toString;
-
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
-
-},{}],7:[function(require,module,exports){
+}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
+},{"../../is-buffer/index.js":12}],8:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -5974,7 +6249,7 @@ function isUndefined(arg) {
return arg === void 0;
}
-},{}],8:[function(require,module,exports){
+},{}],9:[function(require,module,exports){
var http = require('http');
var https = module.exports;
@@ -5990,7 +6265,93 @@ https.request = function (params, cb) {
return http.request.call(this, params, cb);
}
-},{"http":27}],9:[function(require,module,exports){
+},{"http":49}],10:[function(require,module,exports){
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
+
+},{}],11:[function(require,module,exports){
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
@@ -6015,2797 +6376,3127 @@ if (typeof Object.create === 'function') {
}
}
-},{}],10:[function(require,module,exports){
-/**
- * Determine if an object is Buffer
- *
- * Author: Feross Aboukhadijeh
- * License: MIT
+},{}],12:[function(require,module,exports){
+/*!
+ * Determine if an object is a Buffer
*
- * `npm install is-buffer`
+ * @author Feross Aboukhadijeh
+ * @license MIT
*/
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
module.exports = function (obj) {
- return !!(obj != null &&
- (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor)
- (obj.constructor &&
- typeof obj.constructor.isBuffer === 'function' &&
- obj.constructor.isBuffer(obj))
- ))
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
}
-},{}],11:[function(require,module,exports){
-// shim for using process in browser
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+}
-var process = module.exports = {};
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+}
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
+},{}],13:[function(require,module,exports){
+var toString = {}.toString;
-var cachedSetTimeout;
-var cachedClearTimeout;
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
-(function () {
- try {
- cachedSetTimeout = setTimeout;
- } catch (e) {
- cachedSetTimeout = function () {
- throw new Error('setTimeout is not defined');
- }
- }
- try {
- cachedClearTimeout = clearTimeout;
- } catch (e) {
- cachedClearTimeout = function () {
- throw new Error('clearTimeout is not defined');
- }
- }
-} ())
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
+},{}],14:[function(require,module,exports){
+/**
+ * lodash 3.0.0 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.7.0
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
+/**
+ * A specialized version of `_.map` for arrays without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
}
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = cachedSetTimeout(cleanUpNextTick);
- draining = true;
+module.exports = arrayMap;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- cachedClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- cachedSetTimeout(drainQueue, 0);
- }
-};
+},{}],15:[function(require,module,exports){
+/**
+ * lodash 3.2.0 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var baseCopy = require('lodash._basecopy'),
+ keys = require('lodash.keys');
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
+/**
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
+module.exports = baseAssign;
-},{}],12:[function(require,module,exports){
-(function (global){
-/*! https://mths.be/punycode v1.4.1 by @mathias */
-;(function(root) {
+},{"lodash._basecopy":17,"lodash.keys":31}],16:[function(require,module,exports){
+/**
+ * lodash 3.3.1 (Custom Build)
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation
+ * Based on Underscore.js 1.8.3
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license
+ */
+var baseIsEqual = require('lodash._baseisequal'),
+ bindCallback = require('lodash._bindcallback'),
+ isArray = require('lodash.isarray'),
+ pairs = require('lodash.pairs');
- /** Detect free variables */
- var freeExports = typeof exports == 'object' && exports &&
- !exports.nodeType && exports;
- var freeModule = typeof module == 'object' && module &&
- !module.nodeType && module;
- var freeGlobal = typeof global == 'object' && global;
- if (
- freeGlobal.global === freeGlobal ||
- freeGlobal.window === freeGlobal ||
- freeGlobal.self === freeGlobal
- ) {
- root = freeGlobal;
- }
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
- /**
- * The `punycode` object.
- * @name punycode
- * @type Object
- */
- var punycode,
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
- /** Highest positive signed 32-bit float value */
- maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ return value == null ? '' : (value + '');
+}
- /** Bootstring parameters */
- base = 36,
- tMin = 1,
- tMax = 26,
- skew = 38,
- damp = 700,
- initialBias = 72,
- initialN = 128, // 0x80
- delimiter = '-', // '\x2D'
+/**
+ * The base implementation of `_.callback` which supports specifying the
+ * number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+function baseCallback(func, thisArg, argCount) {
+ var type = typeof func;
+ if (type == 'function') {
+ return thisArg === undefined
+ ? func
+ : bindCallback(func, thisArg, argCount);
+ }
+ if (func == null) {
+ return identity;
+ }
+ if (type == 'object') {
+ return baseMatches(func);
+ }
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
+}
- /** Regular expressions */
- regexPunycode = /^xn--/,
- regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
- regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
+/**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
- /** Error messages */
- errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+}
- /** Convenience shortcuts */
- baseMinusTMin = base - tMin,
- floor = Math.floor,
- stringFromCharCode = String.fromCharCode,
+/**
+ * The base implementation of `_.isMatch` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} matchData The propery names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
- /** Temporary variable */
- key;
+ if (object == null) {
+ return !length;
+ }
+ object = toObject(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
- /*--------------------------------------------------------------------------*/
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
- /**
- * A generic error utility function.
- * @private
- * @param {String} type The error type.
- * @returns {Error} Throws a `RangeError` with the applicable error message.
- */
- function error(type) {
- throw new RangeError(errors[type]);
- }
-
- /**
- * A generic `Array#map` utility function.
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} callback The function that gets called for every array
- * item.
- * @returns {Array} A new array of values returned by the callback function.
- */
- function map(array, fn) {
- var length = array.length;
- var result = [];
- while (length--) {
- result[length] = fn(array[length]);
- }
- return result;
- }
-
- /**
- * A simple `Array#map`-like wrapper to work with domain name strings or email
- * addresses.
- * @private
- * @param {String} domain The domain name or email address.
- * @param {Function} callback The function that gets called for every
- * character.
- * @returns {Array} A new string of characters returned by the callback
- * function.
- */
- function mapDomain(string, fn) {
- var parts = string.split('@');
- var result = '';
- if (parts.length > 1) {
- // In email addresses, only the domain name should be punycoded. Leave
- // the local part (i.e. everything up to `@`) intact.
- result = parts[0] + '@';
- string = parts[1];
- }
- // Avoid `split(regex)` for IE8 compatibility. See #17.
- string = string.replace(regexSeparators, '\x2E');
- var labels = string.split('.');
- var encoded = map(labels, fn).join('.');
- return result + encoded;
- }
-
- /**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- * @see `punycode.ucs2.encode`
- * @see
- * @memberOf punycode.ucs2
- * @name decode
- * @param {String} string The Unicode input string (UCS-2).
- * @returns {Array} The new array of code points.
- */
- function ucs2decode(string) {
- var output = [],
- counter = 0,
- length = string.length,
- value,
- extra;
- while (counter < length) {
- value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // high surrogate, and there is a next character
- extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // unmatched surrogate; only append this code unit, in case the next
- // code unit is the high surrogate of a surrogate pair
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
-
- /**
- * Creates a string based on an array of numeric code points.
- * @see `punycode.ucs2.decode`
- * @memberOf punycode.ucs2
- * @name encode
- * @param {Array} codePoints The array of numeric code points.
- * @returns {String} The new Unicode string (UCS-2).
- */
- function ucs2encode(array) {
- return map(array, function(value) {
- var output = '';
- if (value > 0xFFFF) {
- value -= 0x10000;
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
- value = 0xDC00 | value & 0x3FF;
- }
- output += stringFromCharCode(value);
- return output;
- }).join('');
- }
-
- /**
- * Converts a basic code point into a digit/integer.
- * @see `digitToBasic()`
- * @private
- * @param {Number} codePoint The basic numeric code point value.
- * @returns {Number} The numeric value of a basic code point (for use in
- * representing integers) in the range `0` to `base - 1`, or `base` if
- * the code point does not represent a value.
- */
- function basicToDigit(codePoint) {
- if (codePoint - 48 < 10) {
- return codePoint - 22;
- }
- if (codePoint - 65 < 26) {
- return codePoint - 65;
- }
- if (codePoint - 97 < 26) {
- return codePoint - 97;
- }
- return base;
- }
-
- /**
- * Converts a digit/integer into a basic code point.
- * @see `basicToDigit()`
- * @private
- * @param {Number} digit The numeric value of a basic code point.
- * @returns {Number} The basic code point whose value (when used for
- * representing integers) is `digit`, which needs to be in the range
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
- * used; else, the lowercase form is used. The behavior is undefined
- * if `flag` is non-zero and `digit` has no uppercase form.
- */
- function digitToBasic(digit, flag) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- }
-
- /**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * https://tools.ietf.org/html/rfc3492#section-3.4
- * @private
- */
- function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- }
-
- /**
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
- * symbols.
- * @memberOf punycode
- * @param {String} input The Punycode string of ASCII-only symbols.
- * @returns {String} The resulting string of Unicode symbols.
- */
- function decode(input) {
- // Don't use UCS-2
- var output = [],
- inputLength = input.length,
- out,
- i = 0,
- n = initialN,
- bias = initialBias,
- basic,
- j,
- index,
- oldi,
- w,
- k,
- digit,
- t,
- /** Cached calculation results */
- baseMinusT;
-
- // Handle the basic code points: let `basic` be the number of input code
- // points before the last delimiter, or `0` if there is none, then copy
- // the first basic code points to the output.
-
- basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
-
- for (j = 0; j < basic; ++j) {
- // if it's not a basic code point
- if (input.charCodeAt(j) >= 0x80) {
- error('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
-
- // Main decoding loop: start just after the last delimiter if any basic code
- // points were copied; start at the beginning otherwise.
-
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
-
- // `index` is the index of the next character to be consumed.
- // Decode a generalized variable-length integer into `delta`,
- // which gets added to `i`. The overflow checking is easier
- // if we increase `i` as we go, then subtract off its starting
- // value at the end to obtain `delta`.
- for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
-
- if (index >= inputLength) {
- error('invalid-input');
- }
-
- digit = basicToDigit(input.charCodeAt(index++));
-
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error('overflow');
- }
-
- i += digit * w;
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
-
- if (digit < t) {
- break;
- }
-
- baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error('overflow');
- }
-
- w *= baseMinusT;
-
- }
-
- out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
-
- // `i` was supposed to wrap around from `out` to `0`,
- // incrementing `n` each time, so we'll fix that now:
- if (floor(i / out) > maxInt - n) {
- error('overflow');
- }
-
- n += floor(i / out);
- i %= out;
-
- // Insert `n` at position `i` of the output
- output.splice(i++, 0, n);
-
- }
-
- return ucs2encode(output);
- }
-
- /**
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
- * Punycode string of ASCII-only symbols.
- * @memberOf punycode
- * @param {String} input The string of Unicode symbols.
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
- */
- function encode(input) {
- var n,
- delta,
- handledCPCount,
- basicLength,
- bias,
- j,
- m,
- q,
- k,
- t,
- currentValue,
- output = [],
- /** `inputLength` will hold the number of code points in `input`. */
- inputLength,
- /** Cached calculation results */
- handledCPCountPlusOne,
- baseMinusT,
- qMinusT;
-
- // Convert the input in UCS-2 to Unicode
- input = ucs2decode(input);
-
- // Cache the length
- inputLength = input.length;
-
- // Initialize the state
- n = initialN;
- delta = 0;
- bias = initialBias;
-
- // Handle the basic code points
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
-
- handledCPCount = basicLength = output.length;
-
- // `handledCPCount` is the number of code points that have been handled;
- // `basicLength` is the number of basic code points.
-
- // Finish the basic string - if it is not empty - with a delimiter
- if (basicLength) {
- output.push(delimiter);
- }
-
- // Main encoding loop:
- while (handledCPCount < inputLength) {
-
- // All non-basic code points < n have been handled already. Find the next
- // larger one:
- for (m = maxInt, j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- // Increase `delta` enough to advance the decoder's