universalviewer
Version:
The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
2 lines • 194 kB
JavaScript
/*! For license information please see 561.b4bc0392dd5030a85245.js.LICENSE.txt */
(self.webpackChunkUV=self.webpackChunkUV||[]).push([[561],{2325(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTINUE=100,t.SWITCHING_PROTOCOLS=101,t.PROCESSING=102,t.OK=200,t.CREATED=201,t.ACCEPTED=202,t.NON_AUTHORITATIVE_INFORMATION=203,t.NO_CONTENT=204,t.RESET_CONTENT=205,t.PARTIAL_CONTENT=206,t.MULTI_STATUS=207,t.MULTIPLE_CHOICES=300,t.MOVED_PERMANENTLY=301,t.MOVED_TEMPORARILY=302,t.SEE_OTHER=303,t.NOT_MODIFIED=304,t.USE_PROXY=305,t.TEMPORARY_REDIRECT=307,t.BAD_REQUEST=400,t.UNAUTHORIZED=401,t.PAYMENT_REQUIRED=402,t.FORBIDDEN=403,t.NOT_FOUND=404,t.METHOD_NOT_ALLOWED=405,t.NOT_ACCEPTABLE=406,t.PROXY_AUTHENTICATION_REQUIRED=407,t.REQUEST_TIME_OUT=408,t.CONFLICT=409,t.GONE=410,t.LENGTH_REQUIRED=411,t.PRECONDITION_FAILED=412,t.REQUEST_ENTITY_TOO_LARGE=413,t.REQUEST_URI_TOO_LARGE=414,t.UNSUPPORTED_MEDIA_TYPE=415,t.REQUESTED_RANGE_NOT_SATISFIABLE=416,t.EXPECTATION_FAILED=417,t.IM_A_TEAPOT=418,t.UNPROCESSABLE_ENTITY=422,t.LOCKED=423,t.FAILED_DEPENDENCY=424,t.UNORDERED_COLLECTION=425,t.UPGRADE_REQUIRED=426,t.PRECONDITION_REQUIRED=428,t.TOO_MANY_REQUESTS=429,t.REQUEST_HEADER_FIELDS_TOO_LARGE=431,t.INTERNAL_SERVER_ERROR=500,t.NOT_IMPLEMENTED=501,t.BAD_GATEWAY=502,t.SERVICE_UNAVAILABLE=503,t.GATEWAY_TIME_OUT=504,t.HTTP_VERSION_NOT_SUPPORTED=505,t.VARIANT_ALSO_NEGOTIATES=506,t.INSUFFICIENT_STORAGE=507,t.BANDWIDTH_LIMIT_EXCEEDED=509,t.NOT_EXTENDED=510,t.NETWORK_AUTHENTICATION_REQUIRED=511}])},1539(e,t,n){"use strict";n.d(t,{JT:()=>a,Yw:()=>v,BG:()=>r,k9:()=>_,eY:()=>y});var r,i=function(e){this.isVisible=!0;var t=e.target.match(/.*[^n]xyz=(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/),n=e.target.match(/.*nxyz=(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/);this.bodyValue=e.bodyValue,this.x=Number(t[1]),this.y=Number(t[2]),this.z=Number(t[3]),this.nx=Number(n[1]),this.ny=Number(n[2]),this.nz=Number(n[3])},o=function(e){var t;this.isVisible=!0,e.on?(t=e.on.match(/.*xywh=(\d*),(\d*),(\d*),(\d*)/),this.chars=e.resource.chars):(t=e.target.match(/.*xywh=(\d*),(\d*),(\d*),(\d*)/),this.chars=e.bodyValue),this.x=Number(t[1]),this.y=Number(t[2]),this.width=Number(t[3]),this.height=Number(t[4])},a=function(){function e(e){this.rects=[],this.points3D=[],this.canvasId=e}return e.prototype.addRect=function(e){var t=new o(e);t.canvasId=this.canvasId,t.canvasIndex=this.canvasIndex,t.index=this.rects.length,this.rects.push(t),this.rects.sort((function(e,t){return e.index-t.index}))},e.prototype.addPoint3D=function(e){var t=new i(e);t.canvasId=this.canvasId,t.canvasIndex=this.canvasIndex,t.index=this.points3D.length,this.points3D.push(t),this.points3D.sort((function(e,t){return e.index-t.index}))},e}(),s=n(6346),l=function(){function e(){this.isEnabled=!1,this.ranges=[],this.canvases=[]}return e.prototype.allCanvasesSelected=function(){return this.canvases.length>0&&this.getAllSelectedCanvases().length===this.canvases.length},e.prototype.allRangesSelected=function(){return this.ranges.length>0&&this.getAllSelectedRanges().length===this.ranges.length},e.prototype.allSelected=function(){return this.allRangesSelected()&&this.allCanvasesSelected()},e.prototype.getAll=function(){return this.canvases.concat(this.ranges)},e.prototype.getAllSelectedCanvases=function(){return this.canvases.filter((function(e){return e.multiSelected}))},e.prototype.getAllSelectedRanges=function(){return this.ranges.filter((function(e){return e.multiSelected}))},e.prototype.getCanvasById=function(e){return this.canvases.filter((function(t){return s.Utils.normaliseUrl(t.id)===s.Utils.normaliseUrl(e)}))[0]},e.prototype.getCanvasesByIds=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(this.getCanvasById(r))}return t},e.prototype.getRangeCanvases=function(e){var t=e.getCanvasIds();return this.getCanvasesByIds(t)},e.prototype.selectAll=function(e){this.selectRanges(this.ranges,e),this.selectCanvases(this.canvases,e)},e.prototype.selectCanvas=function(e,t){this.canvases.filter((function(t){return t.id===e.id}))[0].multiSelected=t},e.prototype.selectAllCanvases=function(e){this.selectCanvases(this.canvases,e)},e.prototype.selectCanvases=function(e,t){for(var n=0;n<e.length;n++)e[n].multiSelected=t},e.prototype.selectRange=function(e,t){var n=this.ranges.filter((function(t){return t.id===e.id}))[0];n.multiSelected=t;var r=this.getRangeCanvases(n);this.selectCanvases(r,t)},e.prototype.selectAllRanges=function(e){this.selectRanges(this.ranges,e)},e.prototype.selectRanges=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];r.multiSelected=t;var i=this.getCanvasesByIds(r.getCanvasIds());this.selectCanvases(i,t)}},e.prototype.setEnabled=function(e){this.isEnabled=e;for(var t=this.getAll(),n=0;n<t.length;n++){var r=t[n];r.multiSelectEnabled=this.isEnabled,e||(r.multiSelected=!1)}},e}(),c=function(){function e(e,t){this.items=[],this.resource=e,this.label=t}return e.prototype.addItem=function(e){this.items.push(e)},e.prototype.addMetadata=function(e,t){void 0===t&&(t=!1);for(var n=0;n<e.length;n++){var r=e[n];r.isRootLevel=t,this.addItem(r)}},e}();!function(e){e.DATE="date",e.NONE="none"}(r||(r={}));var u=n(3957),p=function(){function e(){}return e.manifestNotLoaded="Manifest has not loaded yet",e}(),f=function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)},d=function(){function e(e){if(this.options=e,this.iiifResource=this.options.iiifResource,this.manifestUri=this.options.manifestUri,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,this.choiceIndex=this.options.choiceIndex||0,this.options.canvasId){var t=this.getCanvasIndexById(this.options.canvasId);null!==t&&(this.canvasIndex=t)}}return e.prototype.getAutoCompleteService=function(){var e=this.getSearchService(),t=null;return e&&((t=e.getService(u.bB.SEARCH_0_AUTO_COMPLETE))||(t=e.getService(u.bB.SEARCH_1_AUTO_COMPLETE)),t||(t=e.getService(u.bB.SEARCH_2_AUTO_COMPLETE))),t},e.prototype.getAttribution=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getAttribution();return e?e.getValue(this.options.locale):null},e.prototype.getCanvases=function(){return this.getCurrentSequence().getCanvases()},e.prototype.getCanvasById=function(e){return this.getCurrentSequence().getCanvasById(e)},e.prototype.getCanvasesById=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.getCanvasById(r);i&&t.push(i)}return t},e.prototype.getCanvasByIndex=function(e){return this.getCurrentSequence().getCanvasByIndex(e)},e.prototype.getCanvasIndexById=function(e){return this.getCurrentSequence().getCanvasIndexById(e)},e.prototype.getCanvasIndexByLabel=function(e){var t=this.getManifestType()===s.ManifestType.MANUSCRIPT;return this.getCurrentSequence().getCanvasIndexByLabel(e,t)},e.prototype.getCanvasRange=function(e,t){var n=this.getCanvasRanges(e);if(t){for(var r=0;r<n.length;r++){var i=n[r];if(i.path===t)return i}return null}return n[0]},e.prototype.getCanvasRanges=function(e){if(!this.manifest)throw new Error(p.manifestNotLoaded);return e.ranges||(e.ranges=this.manifest.getAllRanges().filter((function(t){return t.getCanvasIds().some((function(t){return s.Utils.normaliseUrl(t)===s.Utils.normaliseUrl(e.id)}))}))),e.ranges},e.prototype.getCollectionIndex=function(e){if(!e.parentCollection||e.parentCollection.parentCollection)return e.parentCollection?e.parentCollection.index:void 0},e.prototype.getCurrentCanvas=function(){return this.getCurrentSequence().getCanvasByIndex(this.canvasIndex)},e.prototype.getCurrentSequence=function(){return this.getSequenceByIndex(this.sequenceIndex)},e.prototype.getDescription=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getDescription();return e?e.getValue(this.options.locale):null},e.prototype.getSummary=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getSummary();return e?e.getValue(this.options.locale):null},e.prototype.getLabel=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getLabel();return e?e.getValue(this.options.locale):null},e.prototype.getLastCanvasLabel=function(e){return this.getCurrentSequence().getLastCanvasLabel(e)},e.prototype.getFirstPageIndex=function(){return 0},e.prototype.getLastPageIndex=function(){return this.getTotalCanvases()-1},e.prototype.getLicense=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getLicense()},e.prototype.getRights=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getRights()},e.prototype.getLogo=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getLogo()},e.prototype.getManifestType=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getManifestType();return e===s.ManifestType.EMPTY&&(e=s.ManifestType.MONOGRAPH),e},e.prototype.getMetadata=function(e){if(!this.manifest)throw new Error(p.manifestNotLoaded);var t=[],n=this.manifest.getMetadata(),r=new c(this.manifest),i=this.options.locale;n&&n.length&&r.addMetadata(n,!0);var o=String(this.manifest.getSummary().getValue(i)||"").trim();if(o.length>0){for(var a=!1,l="",u=0;u<n.length;u++){var f=n[u];if((l=String(f.getValue(i)||"").trim()).length>0&&o===l){a=!0;break}}if(!a){var d="en"!==(i||"").split("-")[0]?"description":"Summary";(v=new s.LabelValuePair(i)).label=new s.PropertyValue([new s.LocalizedValue(d,i)]),v.value=this.manifest.getSummary(),v.isRootLevel=!0,r.addItem(v)}}this.manifest.getAttribution().length&&((v=new s.LabelValuePair(i)).label=new s.PropertyValue([new s.LocalizedValue("attribution",i)]),v.value=this.manifest.getAttribution(),v.isRootLevel=!0,r.addItem(v));var h=this.manifest.getRequiredStatement();h&&(f=this.parseStatement(h),(v=new s.LabelValuePair(i)).parse(f),v.isRootLevel=!0,r.addItem(v));var g=this.manifest.getLicense();g&&(f={label:"license",value:e&&e.licenseFormatter?e.licenseFormatter.format(g):g},(v=new s.LabelValuePair(i)).parse(f),v.isRootLevel=!0,r.addItem(v));var v,_=this.manifest.getRights();(_&&(f={label:"rights",value:e&&e.licenseFormatter?e.licenseFormatter.format(_):_},(v=new s.LabelValuePair(i)).parse(f),v.isRootLevel=!0,r.addItem(v)),this.manifest.getLogo())&&(f={label:"logo",value:'<img alt="logo" src="'+this.manifest.getLogo()+'"/>'},(v=new s.LabelValuePair(i)).parse(f),v.isRootLevel=!0,r.addItem(v));return t.push(r),e?this._parseMetadataOptions(e,t):t},e.prototype.getAllRequiredStatements=function(){var e=[],t=this.getCurrentRange();if(t){var n=t.getRequiredStatement?t.getRequiredStatement():null;n&&e.push(f(f({},this.parseStatement(n)),{source:"Range"}))}var r=this.getCurrentCanvas();if(r){var i=r.getRequiredStatement?r.getRequiredStatement():null;i&&e.push(f(f({},this.parseStatement(i)),{source:"Canvas"}))}if(this.manifest){var o=this.manifest.getRequiredStatement();o&&o&&e.push(f(f({},this.parseStatement(o)),{source:"Manifest"}))}return e},e.prototype.getMostSpecificRequiredStatement=function(){var e=this.getAllRequiredStatements(),t=e.find((function(e){return"Range"===e.source}));if(t)return t;var n=e.find((function(e){return"Canvas"===e.source}));return n||(e.find((function(e){return"Manifest"===e.source}))||null)},e.prototype.getRequiredStatement=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getRequiredStatement();return e?this.parseStatement(e):null},e.prototype.parseStatement=function(e){return{label:e.label?e.getLabel():"",value:e.value&&e.value.length?e.getValue():""}},e.prototype._parseMetadataOptions=function(e,t){var n=this.getCurrentSequence(),r=n.getMetadata();if(r&&r.length){var i=new c(n);i.addMetadata(r),t.push(i)}if(e.range){var o=this._getRangeMetadata([],e.range);o=o.reverse(),t=t.concat(o)}if(e.canvases&&e.canvases.length)for(var a=0;a<e.canvases.length;a++){var s=e.canvases[a],l=s.getMetadata();if(l&&l.length){var u=new c(s);u.addMetadata(s.getMetadata()),t.push(u)}for(var p=s.getImages(),f=0;f<p.length;f++){var d=p[f],h=d.getMetadata();if(h&&h.length){var g=new c(d);g.addMetadata(h),t.push(g)}}}return t},e.prototype._getRangeMetadata=function(e,t){var n=t.getMetadata();if(n&&n.length){var r=new c(t);r.addMetadata(n),e.push(r)}else if(t.parentRange)return this._getRangeMetadata(e,t.parentRange);return e},e.prototype.getMultiSelectState=function(){return this._multiSelectState||(this._multiSelectState=new l,this._multiSelectState.ranges=this.getRanges().slice(0),this._multiSelectState.canvases=this.getCurrentSequence().getCanvases().slice(0)),this._multiSelectState},e.prototype.getCurrentRange=function(){return this.rangeId?this.getRangeById(this.rangeId):null},e.prototype.getPosterCanvas=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getPosterCanvas()},e.prototype.getAccompanyingCanvas=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getAccompanyingCanvas()},e.prototype.getPosterImage=function(){var e=this.getPosterCanvas();if(e){var t=e.getContent();if(t&&t.length)return t[0].getBody()[0].id}return null},e.prototype.getAccompanyingCanvasImage=function(){var e=this.getAccompanyingCanvas();if(e){var t=e.getContent();if(t&&t.length)return t[0].getBody()[0].id}return null},e.prototype.getPreviousRange=function(e){var t;if(t=e||this.getCurrentRange()){var n=this.getFlattenedTree();if(n)for(var r=0;r<n.length;r++){var i=n[r];if(i&&i.data.id===t.id){for(;r>0;)return n[--r].data;break}}}return null},e.prototype.getNextRange=function(e){var t;if(t=e||this.getCurrentRange()){var n=this.getFlattenedTree();if(n)for(var r=0;r<n.length;r++){var i=n[r];if(i&&i.data.id===t.id){for(;r<n.length-1;){var o=n[++r];if(o.data.canvases&&o.data.canvases.length)return o.data}break}}}return null},e.prototype.getFlattenedTree=function(e){var t;return(t=e||this.getTree())?this._flattenTree(t,"nodes"):null},e.prototype._flattenTree=function(e,t){var n=this,r=[e];return e[t]&&e[t].length>0?r.concat(e[t].map((function(e){return n._flattenTree(e,t)})).reduce((function(e,t){return e.concat(t)}),[])):r},e.prototype.getRanges=function(){return this.manifest.getAllRanges()},e.prototype.getRangeByPath=function(e){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getRangeByPath(e)},e.prototype.getRangeById=function(e){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getRangeById(e)},e.prototype.getRangeCanvases=function(e){var t=e.getCanvasIds();return this.getCanvasesById(t)},e.prototype.getRelated=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getRelated()},e.prototype.getSearchService=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.manifest.getService(u.bB.SEARCH_0);return e||(e=this.manifest.getService(u.bB.SEARCH_1)),e||(e=this.manifest.getService(u.bB.SEARCH_2)),e},e.prototype.getSeeAlso=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getSeeAlso()},e.prototype.getSequenceByIndex=function(e){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getSequenceByIndex(e)},e.prototype.getShareServiceUrl=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=null,t=this.manifest.getService(u.bB.SHARE_EXTENSIONS);return t&&(t.length&&(t=t[0]),e=t.__jsonld.shareUrl),e},e.prototype._getSortedTreeNodesByDate=function(e,t){var n=this.getFlattenedTree(t);if(n){var r=n.filter((function(e){return e.data.type===s.TreeNodeType.MANIFEST}));this.createDecadeNodes(e,n),this.sortDecadeNodes(e),this.createYearNodes(e,n),this.sortYearNodes(e),this.createMonthNodes(e,r),this.sortMonthNodes(e),this.createDateNodes(e,r),this.pruneDecadeNodes(e)}},e.prototype.getStartCanvasIndex=function(){return this.getCurrentSequence().getStartCanvasIndex()},e.prototype.getThumbs=function(e,t){return this.getCurrentSequence().getThumbs(e,t)},e.prototype.getTopRanges=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getTopRanges()},e.prototype.getTotalCanvases=function(){return this.getCurrentSequence().getTotalCanvases()},e.prototype.getTrackingLabel=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.getTrackingLabel()},e.prototype._getTopRanges=function(){return this.iiifResource.getTopRanges()},e.prototype.getTree=function(e,t){if(void 0===e&&(e=0),void 0===t&&(t=r.NONE),!this.iiifResource)return null;var n;if(this.iiifResource.isCollection())n=this.iiifResource.getDefaultTree();else{var i=this._getTopRanges(),o=new s.TreeNode;if(o.label="root",o.data=this.iiifResource,!i.length)return o;n=i[e].getTree(o)}var a=new s.TreeNode;return t.toString()===r.DATE.toString()&&this.treeHasNavDates(n)?(this._getSortedTreeNodesByDate(a,n),a):n},e.prototype.treeHasNavDates=function(e){var t=this.getFlattenedTree(e);return!!t&&t.some((function(e){return!isNaN(e.navDate)}))},e.prototype.getViewingDirection=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.getCurrentSequence().getViewingDirection();return e||(e=this.manifest.getViewingDirection()),e},e.prototype.getViewingHint=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.getCurrentSequence().getViewingHint();return e||(e=this.manifest.getViewingHint()),e},e.prototype.getBehavior=function(){var e,t;if(!this.manifest)throw new Error(p.manifestNotLoaded);var n=null!==(t=null===(e=this.getCurrentRange())||void 0===e?void 0:e.getBehavior())&&void 0!==t?t:null;return n||(n=this.manifest.getBehavior()),n},e.prototype.getChoices=function(){return this.getCurrentCanvas().getChoices()},e.prototype.getActiveChoice=function(){var e,t=this.getChoices();return t.length&&null!==(e=t[this.choiceIndex])&&void 0!==e?e:null},e.prototype.hasParentCollection=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return!!this.manifest.parentCollection},e.prototype.hasRelatedPage=function(){var e=this.getRelated();return!!e&&(e.length&&(e=e[0]),"text/html"===e.format)},e.prototype.hasResources=function(){return this.getCurrentCanvas().getResources().length>0},e.prototype.isBottomToTop=function(){var e=this.getViewingDirection();return!!e&&e===u.T5.BOTTOM_TO_TOP},e.prototype.hasAnnotations=function(){for(var e=this.getCanvases(),t=0;t<e.length;t++){var n=e[t],r=n.getAnnotations();if(r&&r.length>0)return!0;var i=n.getProperty("seeAlso");if(i)for(var o=Array.isArray(i)?i:[i],a=0;a<o.length;a++)if(o[a].profile.includes("alto"))return!0}return!1},e.prototype.isCanvasIndexOutOfRange=function(e){return this.getCurrentSequence().isCanvasIndexOutOfRange(e)},e.prototype.isContinuous=function(){var e=this.getViewingHint();if(e)return e===u.LX.CONTINUOUS;var t=this.getBehavior();return!!t&&t===u.nS.CONTINUOUS},e.prototype.isFirstCanvas=function(e){return void 0!==e?this.getCurrentSequence().isFirstCanvas(e):this.getCurrentSequence().isFirstCanvas(this.canvasIndex)},e.prototype.isHorizontallyAligned=function(){return this.isLeftToRight()||this.isRightToLeft()},e.prototype.isLastCanvas=function(e){return void 0!==e?this.getCurrentSequence().isLastCanvas(e):this.getCurrentSequence().isLastCanvas(this.canvasIndex)},e.prototype.isLeftToRight=function(){var e=this.getViewingDirection();return!!e&&e===u.T5.LEFT_TO_RIGHT},e.prototype.isMultiCanvas=function(){return this.getCurrentSequence().isMultiCanvas()},e.prototype.isMultiSequence=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.isMultiSequence()},e.prototype.isPaged=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);var e=this.getViewingHint();return e?e===u.LX.PAGED:this.manifest.isPagingEnabled()},e.prototype.isPagingAvailable=function(){return this.isPagingEnabled()&&this.getTotalCanvases()>2},e.prototype.isPagingEnabled=function(){if(!this.manifest)throw new Error(p.manifestNotLoaded);return this.manifest.isPagingEnabled()||this.getCurrentSequence().isPagingEnabled()},e.prototype.isRightToLeft=function(){var e=this.getViewingDirection();return!!e&&e===u.T5.RIGHT_TO_LEFT},e.prototype.isTopToBottom=function(){var e=this.getViewingDirection();return!!e&&e===u.T5.TOP_TO_BOTTOM},e.prototype.isTotalCanvasesEven=function(){return this.getCurrentSequence().isTotalCanvasesEven()},e.prototype.isUIEnabled=function(e){if(!this.manifest)throw new Error(p.manifestNotLoaded);var t=this.manifest.getService(u.bB.UI_EXTENSIONS);if(t){var n=t.getProperty("disableUI");if(n&&(-1!==n.indexOf(e)||-1!==n.indexOf(e.toLowerCase())))return!1}return!0},e.prototype.isVerticallyAligned=function(){return this.isTopToBottom()||this.isBottomToTop()},e.prototype.hasChoices=function(){return this.getChoices().length>0},e.prototype.createDateNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=this.getNodeYear(r),o=this.getNodeMonth(r),a=new s.TreeNode;a.id=r.id,a.label=this.getNodeDisplayDate(r),a.data=r.data,a.data.type=s.TreeNodeType.MANIFEST,a.data.year=i,a.data.month=o;var l=this.getDecadeNode(e,i);if(l){var c=this.getYearNode(l,i);if(c){var u=this.getMonthNode(c,o);u&&u.addNode(a)}}}},e.prototype.createDecadeNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.navDate){var i=this.getNodeYear(r),o=Number(i.toString().substr(0,3)+"9");if(!this.getDecadeNode(e,i)){var a=new s.TreeNode;a.label=i+" - "+o,a.navDate=r.navDate,a.data.startYear=i,a.data.endYear=o,e.addNode(a)}}}},e.prototype.createMonthNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.navDate){var i=this.getNodeYear(r),o=this.getNodeMonth(r),a=this.getDecadeNode(e,i),l=null;if(a&&(l=this.getYearNode(a,i)),a&&l&&!this.getMonthNode(l,o)){var c=new s.TreeNode;c.label=this.getNodeDisplayMonth(r),c.navDate=r.navDate,c.data.year=i,c.data.month=o,l.addNode(c)}}}},e.prototype.createYearNodes=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(r.navDate){var i=this.getNodeYear(r),o=this.getDecadeNode(e,i);if(o&&!this.getYearNode(o,i)){var a=new s.TreeNode;a.label=i.toString(),a.navDate=r.navDate,a.data.year=i,o.addNode(a)}}}},e.prototype.getDecadeNode=function(e,t){for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(t>=r.data.startYear&&t<=r.data.endYear)return r}return null},e.prototype.getMonthNode=function(e,t){for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(t===this.getNodeMonth(r))return r}return null},e.prototype.getNodeDisplayDate=function(e){return e.navDate.toDateString()},e.prototype.getNodeDisplayMonth=function(e){return["January","February","March","April","May","June","July","August","September","October","November","December"][e.navDate.getMonth()]},e.prototype.getNodeMonth=function(e){return e.navDate.getMonth()},e.prototype.getNodeYear=function(e){return e.navDate.getFullYear()},e.prototype.getYearNode=function(e,t){for(var n=0;n<e.nodes.length;n++){var r=e.nodes[n];if(t===this.getNodeYear(r))return r}return null},e.prototype.pruneDecadeNodes=function(e){for(var t=[],n=0;n<e.nodes.length;n++){var r=e.nodes[n];r.nodes.length||t.push(r)}for(var i=0;i<t.length;i++){var o=t[i],a=e.nodes.indexOf(o);a>-1&&e.nodes.splice(a,1)}},e.prototype.sortDecadeNodes=function(e){e.nodes=e.nodes.sort((function(e,t){return e.data.startYear-t.data.startYear}))},e.prototype.sortMonthNodes=function(e){for(var t=this,n=0;n<e.nodes.length;n++)for(var r=e.nodes[n],i=0;i<r.nodes.length;i++){var o=r.nodes[i];o.nodes=o.nodes.sort((function(e,n){return t.getNodeMonth(e)-t.getNodeMonth(n)}))}},e.prototype.sortYearNodes=function(e){for(var t=this,n=0;n<e.nodes.length;n++){var r=e.nodes[n];r.nodes=r.nodes.sort((function(e,n){return t.getNodeYear(e)-t.getNodeYear(n)}))}},e}(),h=function(){function e(e){this._options=e,this._options.locale=this._options.locale||"en-GB"}return e.prototype.bootstrap=function(e,t){var n=this;return new Promise((function(r,i){e&&t&&(r=e,i=t),s.Utils.loadManifest(n._options.manifestUri).then((function(e){n._loaded(n,e,r,i)})).catch((function(e){i(e)}))}))},e.prototype.bootstrapJson=function(e,t,n){var r=this;return new Promise((function(i,o){t&&n&&(i=t,o=n),r._loaded(r,e,i,o)}))},e.prototype._loaded=function(e,t,n,r){var i=s.Utils.parseManifest(t,{locale:e._options.locale});if(i){e._options.iiifResource||(e._options.iiifResource=i);var o=e._options.collectionIndex,a=e._options.manifestIndex;if(i.getIIIFResourceType()===u.es.COLLECTION){var l=i.getManifests(),c=i.getCollections();l.length||void 0!==o||(o=0),void 0!==o&&c&&c.length?i.getCollectionByIndex(o).then((function(t){t||r("Collection index not found"),0===t.getTotalManifests()&&0===a&&t.getTotalCollections()>0?(e._options.collectionIndex=0,e._options.manifestUri=t.id,e.bootstrap(n,r)):void 0!==a&&t.getManifestByIndex(a).then((function(t){e._options.manifest=t;var r=new d(e._options);n(r)}))})):i.getManifestByIndex(e._options.manifestIndex).then((function(t){e._options.manifest=t;var r=new d(e._options);n(r)}))}else{e._options.manifest=i;var p=new d(e._options);n(p)}}else console.error("Unable to load IIIF resource")},e}(),g=n(2325),v=function(){function e(e,t){this.authHoldingPage=null,this.clickThroughService=null,this.externalService=null,this.isProbed=!1,this.isResponseHandled=!1,this.kioskService=null,this.loginService=null,this.logoutService=null,this.probeService=null,this.restrictedService=null,this.tokenService=null,e.externalResource=this,this.dataUri=this._getDataUri(e),this.index=e.index,this.authAPIVersion=t.authApiVersion,this._parseAuthServices(e),this._parseCanvasDimensions(e)}return e.prototype._getImageServiceDescriptor=function(e){for(var t=null,n=0;n<e.length;n++){var r=e[n],i=r.id;i.endsWith("/")||(i+="/"),r.getProfile()&&(s.Utils.isImageProfile(r.getProfile())||s.Utils.isImageServiceType(r.getIIIFResourceType()))&&(t=i+"info.json")}return t},e.prototype._getDataUri=function(e){var t=e.getContent(),n=e.getImages(),r=null;if(t&&t.length){var i=t[0].getBody();return i.length?(o=i[0].getServices()).length&&(r=this._getImageServiceDescriptor(o))?r:i[0].id:null}if(n&&n.length){var o,a=n[0].getResource();return(o=a.getServices()).length&&(r=this._getImageServiceDescriptor(o))?r:a.id}var s=e.getService(u.bB.IXIF);return s?s.getInfoUri():e.id},e.prototype._parseAuthServices=function(e){if(.9===this.authAPIVersion)this.clickThroughService=s.Utils.getService(e,u.bB.AUTH_0_CLICK_THROUGH),this.loginService=s.Utils.getService(e,u.bB.AUTH_0_LOGIN),this.restrictedService=s.Utils.getService(e,u.bB.AUTH_0_RESTRICTED),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(u.bB.AUTH_0_LOGOUT),this.tokenService=this.clickThroughService.getService(u.bB.AUTH_0_TOKEN)):this.loginService?(this.logoutService=this.loginService.getService(u.bB.AUTH_0_LOGOUT),this.tokenService=this.loginService.getService(u.bB.AUTH_0_TOKEN)):this.restrictedService&&(this.logoutService=this.restrictedService.getService(u.bB.AUTH_0_LOGOUT),this.tokenService=this.restrictedService.getService(u.bB.AUTH_0_TOKEN));else{if(void 0!==e.isCanvas&&e.isCanvas()){var t=e.getContent();if(t&&t.length){var n=t[0].getBody();n&&n.length&&(e=n[0])}}this.clickThroughService=s.Utils.getService(e,u.bB.AUTH_1_CLICK_THROUGH),this.loginService=s.Utils.getService(e,u.bB.AUTH_1_LOGIN),this.externalService=s.Utils.getService(e,u.bB.AUTH_1_EXTERNAL),this.kioskService=s.Utils.getService(e,u.bB.AUTH_1_KIOSK),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(u.bB.AUTH_1_LOGOUT),this.tokenService=this.clickThroughService.getService(u.bB.AUTH_1_TOKEN),this.probeService=this.clickThroughService.getService(u.bB.AUTH_1_PROBE)):this.loginService?(this.logoutService=this.loginService.getService(u.bB.AUTH_1_LOGOUT),this.tokenService=this.loginService.getService(u.bB.AUTH_1_TOKEN),this.probeService=s.Utils.getService(e,u.bB.AUTH_1_PROBE),this.probeService||(this.probeService=this.loginService.getService(u.bB.AUTH_1_PROBE))):this.externalService?(this.logoutService=this.externalService.getService(u.bB.AUTH_1_LOGOUT),this.tokenService=this.externalService.getService(u.bB.AUTH_1_TOKEN),this.probeService=s.Utils.getService(e,u.bB.AUTH_1_PROBE),this.probeService||(this.probeService=this.externalService.getService(u.bB.AUTH_1_PROBE))):this.kioskService&&(this.logoutService=this.kioskService.getService(u.bB.AUTH_1_LOGOUT),this.tokenService=this.kioskService.getService(u.bB.AUTH_1_TOKEN),this.probeService=s.Utils.getService(e,u.bB.AUTH_1_PROBE),this.probeService||(this.probeService=this.kioskService.getService(u.bB.AUTH_1_PROBE)))}},e.prototype._parseCanvasDimensions=function(e){var t=e.getImages();if(t&&t.length){var n=t[0].getResource();this.width=n.getWidth(),this.height=n.getHeight()}else if((t=e.getContent()).length){var r=t[0].getBody();r.length&&(this.width=r[0].getWidth(),this.height=r[0].getHeight())}},e.prototype._parseDescriptorDimensions=function(e){void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)},e.prototype.isAccessControlled=function(){return!!(this.clickThroughService||this.loginService||this.externalService||this.kioskService||this.probeService)},e.prototype.hasServiceDescriptor=function(){return!!this.dataUri&&this.dataUri.endsWith("info.json")},e.prototype.getData=function(e){var t=this;return t.data={},new Promise((function(n,r){if(t.dataUri)if(t.probeService){t.isProbed=!0;var i=new XMLHttpRequest;i.open("GET",t.probeService.id,!0),i.withCredentials=!1,e&&i.setRequestHeader("Authorization","Bearer "+e.accessToken),i.onload=function(){var e=JSON.parse(i.responseText),r=unescape(e.contentLocation);t.status=i.status,r!==t.dataUri&&(t.status=g.MOVED_TEMPORARILY),t.data=e,n(t)},i.onerror=function(){t.status=i.status,n(t)},i.send()}else{var o="GET";if(!t.hasServiceDescriptor()){if(!t.isAccessControlled())return t.status=g.OK,void n(t);o="HEAD"}var a=new XMLHttpRequest;a.open(o,t.dataUri,!0),a.withCredentials=!1,e&&a.setRequestHeader("Authorization","Bearer "+e.accessToken),a.onload=function(){if(a.responseText){var e=JSON.parse(a.responseText),r=a.status,i=unescape(e["@id"]||e.id);t.data=e,t._parseAuthServices(t.data),t._parseDescriptorDimensions(t.data),i.endsWith("/info.json")&&(i=i.substr(0,i.lastIndexOf("/")));var o=t.dataUri;o&&o.endsWith("/info.json")&&(o=o.substr(0,o.lastIndexOf("/"))),r===g.OK&&i!==o&&(t.loginService||t.kioskService)?t.status=g.MOVED_TEMPORARILY:t.status=r,n(t)}else t.status=a.status||g.OK,n(t)},a.onerror=function(){t.status=a.status,a.responseText&&t._parseAuthServices(JSON.parse(a.responseText)),n(t)},a.send()}else r("There is no dataUri to fetch")}))},e}(),_=function(){function e(e){this.labels=e}return e.prototype.format=function(e){return-1!=e.indexOf("<a")?e:'<a href="'+e+'">'+(this.labels[e]?this.labels[e]:e)+"</a>"},e}(),y=function(e){return new h(e).bootstrap()}},3957(e,t){"use strict";var n,r,i,o,a,s,l,c,u,p;t.LX=t.T5=t.bB=t.O6=t.zu=t.es=t.S3=t.nS=void 0,function(e){e.BOOKMARKING="oa:bookmarking",e.CLASSIFYING="oa:classifying",e.COMMENTING="oa:commenting",e.DESCRIBING="oa:describing",e.EDITING="oa:editing",e.HIGHLIGHTING="oa:highlighting",e.IDENTIFYING="oa:identifying",e.LINKING="oa:linking",e.MODERATING="oa:moderating",e.PAINTING="sc:painting",e.QUESTIONING="oa:questioning",e.REPLYING="oa:replying",e.TAGGING="oa:tagging",e.TRANSCRIBING="oad:transcribing"}(n||(n={})),function(e){e.AUTO_ADVANCE="auto-advance",e.CONTINUOUS="continuous",e.FACING_PAGES="facing-pages",e.HIDDEN="hidden",e.INDIVIDUALS="individuals",e.MULTI_PART="multi-part",e.NO_NAV="no-nav",e.NON_PAGED="non-paged",e.PAGED="paged",e.REPEAT="repeat",e.SEQUENCE="sequence",e.THUMBNAIL_NAV="thumbnail-nav",e.TOGETHER="together",e.UNORDERED="unordered"}(r||(t.nS=r={})),function(e){e.CANVAS="canvas",e.CHOICE="choice",e.OA_CHOICE="oa:choice",e.CONTENT_AS_TEXT="contentastext",e.DATASET="dataset",e.DOCUMENT="document",e.IMAGE="image",e.MODEL="model",e.MOVING_IMAGE="movingimage",e.PDF="pdf",e.PHYSICAL_OBJECT="physicalobject",e.SOUND="sound",e.TEXT="text",e.TEXTUALBODY="textualbody",e.VIDEO="video"}(i||(t.S3=i={})),function(e){e.ANNOTATION="annotation",e.ANNOTATION_COLLECTION="annotationcollection",e.ANNOTATION_PAGE="annotationpage",e.CANVAS="canvas",e.COLLECTION="collection",e.MANIFEST="manifest",e.RANGE="range",e.SEQUENCE="sequence"}(o||(t.es=o={})),function(e){e.APNG="image/apng",e.AUDIO_MP4="audio/mp4",e.AUDIO_OGG="audio/ogg",e.AVIF="audio/avif",e.CORTO="application/corto",e.DICOM="application/dicom",e.DRACO="application/draco",e.EPUB="application/epub+zip",e.GIF="image/gif",e.GIRDER="image/vnd.kitware.girder",e.GLB="model/gltf-binary",e.GLTF="model/gltf+json",e.IIIF_PRESENTATION_2='application/ld+json;profile="http://iiif.io/api/presentation/2/context.json"',e.IIIF_PRESENTATION_3='application/ld+json;profile="http://iiif.io/api/presentation/3/context.json"',e.JPG="image/jpeg",e.M3U8="application/vnd.apple.mpegurl",e.MP3="audio/mp3",e.MPEG="audio/mpeg",e.MPEG_DASH="application/dash+xml",e.OBJ="model/obj",e.OPF="application/oebps-package+xml",e.PDF="application/pdf",e.PLY="application/ply",e.PNG="image/png",e.SVG="image/svg+xml",e.THREEJS="application/vnd.threejs+json",e.USDZ="model/vnd.usd+zip",e.VIDEO_MP4="video/mp4",e.VIDEO_OGG="video/ogg",e.WAV="audio/wav",e.WEBM="video/webm",e.WEBP="image/webp"}(a||(t.zu=a={})),function(e){e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.ODT="application/vnd.oasis.opendocument.text",e.PDF="application/pdf"}(s||(t.O6=s={})),function(e){e.IMAGE_0_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/compliance.html#level0",e.IMAGE_0_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/compliance.html#level1",e.IMAGE_0_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/compliance.html#level2",e.IMAGE_0_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/conformance.html#level0",e.IMAGE_0_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/conformance.html#level1",e.IMAGE_0_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/conformance.html#level2",e.IMAGE_1_COMPLIANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",e.IMAGE_1_COMPLIANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1",e.IMAGE_1_COMPLIANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2",e.IMAGE_1_CONFORMANCE_LEVEL_0="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0",e.IMAGE_1_CONFORMANCE_LEVEL_1="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1",e.IMAGE_1_CONFORMANCE_LEVEL_2="http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2",e.IMAGE_1_LEVEL_0="http://iiif.io/api/image/1/level0.json",e.IMAGE_1_PROFILE_LEVEL_0="http://iiif.io/api/image/1/profiles/level0.json",e.IMAGE_1_LEVEL_1="http://iiif.io/api/image/1/level1.json",e.IMAGE_1_PROFILE_LEVEL_1="http://iiif.io/api/image/1/profiles/level1.json",e.IMAGE_1_LEVEL_2="http://iiif.io/api/image/1/level2.json",e.IMAGE_1_PROFILE_LEVEL_2="http://iiif.io/api/image/1/profiles/level2.json",e.IMAGE_2_LEVEL_0="http://iiif.io/api/image/2/level0.json",e.IMAGE_2_PROFILE_LEVEL_0="http://iiif.io/api/image/2/profiles/level0.json",e.IMAGE_2_LEVEL_1="http://iiif.io/api/image/2/level1.json",e.IMAGE_2_PROFILE_LEVEL_1="http://iiif.io/api/image/2/profiles/level1.json",e.IMAGE_2_LEVEL_2="http://iiif.io/api/image/2/level2.json",e.IMAGE_2_PROFILE_LEVEL_2="http://iiif.io/api/image/2/profiles/level2.json",e.AUTH_0_CLICK_THROUGH="http://iiif.io/api/auth/0/login/clickthrough",e.AUTH_0_LOGIN="http://iiif.io/api/auth/0/login",e.AUTH_0_LOGOUT="http://iiif.io/api/auth/0/logout",e.AUTH_0_RESTRICTED="http://iiif.io/api/auth/0/login/restricted",e.AUTH_0_TOKEN="http://iiif.io/api/auth/0/token",e.AUTH_1_CLICK_THROUGH="http://iiif.io/api/auth/1/clickthrough",e.AUTH_1_EXTERNAL="http://iiif.io/api/auth/1/external",e.AUTH_1_KIOSK="http://iiif.io/api/auth/1/kiosk",e.AUTH_1_LOGIN="http://iiif.io/api/auth/1/login",e.AUTH_1_LOGOUT="http://iiif.io/api/auth/1/logout",e.AUTH_1_PROBE="http://iiif.io/api/auth/1/probe",e.AUTH_1_TOKEN="http://iiif.io/api/auth/1/token",e.SEARCH_0="http://iiif.io/api/search/0/search",e.SEARCH_0_AUTO_COMPLETE="http://iiif.io/api/search/0/autocomplete",e.SEARCH_1="http://iiif.io/api/search/1/search",e.SEARCH_1_AUTO_COMPLETE="http://iiif.io/api/search/1/autocomplete",e.SEARCH_2="http://iiif.io/api/search/2/search",e.SEARCH_2_AUTO_COMPLETE="http://iiif.io/api/search/2/autocomplete",e.TRACKING_EXTENSIONS="http://universalviewer.io/tracking-extensions-profile",e.UI_EXTENSIONS="http://universalviewer.io/ui-extensions-profile",e.PRINT_EXTENSIONS="http://universalviewer.io/print-extensions-profile",e.SHARE_EXTENSIONS="http://universalviewer.io/share-extensions-profile",e.DOWNLOAD_EXTENSIONS="http://universalviewer.io/download-extensions-profile",e.OTHER_MANIFESTATIONS="http://iiif.io/api/otherManifestations.json",e.IXIF="http://wellcomelibrary.org/ld/ixif/0/alpha.json"}(l||(t.bB=l={})),function(e){e.IMAGE_SERVICE_2="ImageService2",e.IMAGE_SERVICE_3="ImageService3",e.SEARCH_SERVICE_2="SearchService2",e.AUTO_COMPLETE_SERVICE_2="AutoCompleteService2"}(c||(c={})),function(e){e.BOTTOM_TO_TOP="bottom-to-top",e.LEFT_TO_RIGHT="left-to-right",e.RIGHT_TO_LEFT="right-to-left",e.TOP_TO_BOTTOM="top-to-bottom"}(u||(t.T5=u={})),function(e){e.CONTINUOUS="continuous",e.INDIVIDUALS="individuals",e.NON_PAGED="non-paged",e.PAGED="paged",e.TOP="top"}(p||(t.LX=p={}))},6314(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},4991(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var n,r,i=(r=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[1],a=i[3];if(!a)return o;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),c="/*# ".concat(l," */"),u=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[o].concat(u).concat([c]).join("\n")}return[o].join("\n")}},2127(e,t,n){var r,i,o,a=n(4692);r=function(e,t){"use strict";var n=!1===t;if(!(t=t||e.jQuery)||!t.fn)throw"JsViews requires jQuery";var r,i,o,a,s,l,c,u,p,f,d,h,g,v,_,y,m,E,b,I,T,A,C,O,S="v1.0.15",x="_ocp",w=/[ \t]*(\r\n|\n|\r)/g,L=/\\(['"\\])/g,N=/['"\\]/g,R=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,P=/^if\s/,M=/<(\w+)[>\s]/,j=/[\x00`><\"'&=]/,U=/^on[A-Z]|^convert(Back)?$/,V=/^\#\d+_`[\s\S]*\/\d+_`$/,D=/[\x00`><"'&=]/g,k=/[&<>]/g,G=/&(amp|gt|lt);/g,F=/\[['"]?|['"]?\]/g,B=0,H={"&":"&","<":"<",">":">","\0":"�","'":"'",'"':""","`":"`","=":"="},q={amp:"&",gt:">",lt:"<"},Y="html",K="string",W="object",X="data-jsv-tmpl",$="jsvTmpl",Q="For #index in nested block use #getIndex().",z={},J={},Z=e.jsrender,ee=Z&&t&&!t.render,te={template:{compile:function e(n,r,i,o){function s(r){var a,s;if(typeof r===K||r.nodeType>0&&(l=r)){if(!l&&(/^\.?\/[^\\:*?"<>]*$/.test(r)?(s=f[n=n||r])?r=s:l=document.getElementById(r):"#"===r.charAt(0)&&(l=document.getElementById(r.slice(1))),!l&&t.fn&&!v.rTmpl.test(r)))try{l=t(r,document)[0]}catch(e){}l&&("SCRIPT"!==l.tagName&&Se(r+": Use script block, not "+l.tagName),o?r=l.innerHTML:((a=l.getAttribute(X))&&(a!==$?(r=f[a],delete f[a]):t.fn&&(r=t.data(l)[$])),a&&r||(n=n||(t.fn?$:r),r=e(n,l.innerHTML,i,o)),r.tmplName=n=n||a,n!==$&&(f[n]=r),l.setAttribute(X,n),t.fn&&t.data(l,$,r))),l=void 0}else r.fn||(r=void 0);return r}var l,c,u=r=r||"";if(v._html=d.html,0===o&&(o=void 0,u=s(u)),(o=o||(r.markup?r.bnds?le({},r):r:{})).tmplName=o.tmplName||n||"unnamed",i&&(o._parentTmpl=i),!u&&r.markup&&(u=s(r.markup))&&u.fn&&(u=u.markup),void 0!==u)return u.render||r.render?u.tmpls&&(c=u):(r=Ee(u,o),we(u.replace(N,"\\$&"),r)),c||(c=le((function(){return c.render.apply(c,arguments)}),r),function(e){var t,n,r;for(t in te)e[n=t+"s"]&&(r=e[n],e[n]={},a[n](r,e))}(c)),c}},tag:{compile:function(e,t,n){var r,i,o,a=new v._tg;function s(){var t=this;t._={unlinked:!0},t.inline=!0,t.tagName=e}if(u(t)?t={depends:t.depends,render:t}:typeof t===K&&(t={template:t}),i=t.baseTag)for(o in t.flow=!!t.flow,(i=typeof i===K?n&&n.tags[i]||g[i]:i)||Se('baseTag: "'+t.baseTag+'" not found'),a=le(a,i),t)a[o]=re(i[o],t[o]);else a=le(a,t);return void 0!==(r=a.template)&&(a.template=typeof r===K?f[r]||f(r):r),(s.prototype=a).constructor=a._ctr=s,n&&(a._parentTmpl=n),a}},viewModel:{compile:function(e,n){var r,i,o,a=this,s=n.getters,l=n.extend,f=n.id,d=t.extend({_is:e||"unnamed",unmap:T,merge:I},l),h="",g="",v=s?s.length:0,_=t.observable,y={};function m(e){i.apply(this,e)}function E(){return new m(arguments)}function b(e,t){for(var n,r,i,o,l,c=0;c<v;c++)n=void 0,typeof(i=s[c])!==K&&(i=(n=i).getter,l=n.parentRef),void 0===(o=e[i])&&n&&void 0!==(r=n.defaultVal)&&(o=ye(r,e)),t(o,n&&a[n.type],i,l)}function I(e,t,n){e=typeof e===K?JSON.parse(e):e;var r,i,o,a,s,l,u,d,h,g,v=0,m=this;if(p(m)){for(u={},h=[],i=e.length,o=m.length;v<i;v++){for(d=e[v],l=!1,r=0;r<o&&!l;r++)u[r]||(s=m[r],f&&(u[r]=l=typeof f===K?d[f]&&(y[f]?s[f]():s[f])===d[f]:f(s,d)));l?(s.merge(d),h.push(s)):(h.push(g=E.map(d)),n&&me(g,n,t))}_?_(m).refresh(h,!0):m.splice.apply(m,[0,m.length].concat(h))}else for(a in b(e,(function(e,t,n,r){t?m[n]().merge(e,m,r):m[n]()!==e&&m[n](e)})),e)a===c||y[a]||(m[a]=e[a])}function T(){var e,t,n,r,i=0,o=this;function l(e){for(var t=[],n=0,r=e.length;n<r;n++)t.push(e[n].unmap());return t}if(p(o))return l(o);for(e={};i<v;i++)n=void 0,typeof(t=s[i])!==K&&(t=(n=t).getter),r=o[t](),e[t]=n&&r&&a[n.type]?p(r)?l(r):r.unmap():r;for(t in o)!o.hasOwnProperty(t)||"_"===t.charAt(0)&&y[t.slice(1)]||t===c||u(o[t])||(e[t]=o[t]);return e}for(m.prototype=d,r=0;r<v;r++)!function(e){e=e.getter||e,y[e]=r+1;var t="_"+e;h+=(h?",":"")+e,g+="this."+t+" = "+e+";\n",d[e]=d[e]||function(n){if(!arguments.length)return this[t];_?_(this).setProperty(e,n):this[t]=n},_&&(d[e].set=d[e].set||function(e){this[t]=e})}(s[r]);return g=new Function(h,g),i=function(){g.apply(this,arguments),(o=arguments[v+1])&&me(this,arguments[v],o)},i.prototype=d,d.constructor=i,E.map=function(t){var n,r,i,o,a=0,l=t=typeof t===K?JSON.parse(t):t,u=[];if(p(t)){for(n=(t=t||[]).length;a<n;a++)u.push(this.map(t[a]));return u._is=e,u.unmap=T,u.merge=I,u}if(t){for(b(t,(function(e,t){t&&(e=t.map(e)),u.push(e)})),l=this.apply(this,u),a=v;a--;)if(i=u[a],(o=s[a].parentRef)&&i&&i.unmap)if(p(i))for(n=i.length;n--;)me(i[n],o,l);else me(i,o,l);for(r in t)r===c||y[r]||(l[r]=t[r])}return l},E.getters=s,E.extend=l,E.id=f,E}},helper:{},converter:{}};function ne(e,t){return function(){var n,r=this,i=r.base;return r.base=e,n=t.apply(r,arguments),r.base=i,n}}function re(e,t){return u(t)&&((t=ne(e?e._d?e:ne(ae,e):ae,t))._d=(e&&e._d||0)+1),t}function ie(e,t){var n,r=t.props;for(n in r)!U.test(n)||e[n]&&e[n].fix||(e[n]="convert"!==n?re(e.constructor.prototype[n],r[n]):r[n])}function oe(e){return e}function ae(){return""}function se(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function le(e,t){if(e){for(var n in t)e[n]=t[n];return e}}function ce(e,t,n){return e?p(e)?ce.apply(a,e):(A=n?n[0]:A,/^(\W|_){5}$/.test(e+t+A)||Se("Invalid delimiters"),E=e[0],b=e[1],I=t[0],T=t[1],_.delimiters=[E+b,I+T,A],e="\\"+E+"(\\"+A+")?\\"+b,t="\\"+I+"\\"+T,i="(?:(\\w+(?=[\\/\\s\\"+I+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+I+"]|\\"+I+"(?!\\"+T+"))*?)",v.rTag="(?:"+i+")",i=new RegExp("(?:"+e+i+"(\\/)?|\\"+E+"(\\"+A+")?\\"+b+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),v.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+t),m):_.delimiters}function ue(){var e=this.get("item");return e?e.index:void 0}function pe(){return this.index}function fe(e,t,n,r){var i,o,a,s=0;if(1===n&&(r=1,n=void 0),t)for(a=(o=t.split(".")).length;e&&s<a;s++)i=e,e=o[s]?e[o[s]]:e;return n&&(n.lt=n.lt||s<a),void 0===e?r?ae:"":r?function(){return e.apply(i,arguments)}:e}function de(n,r,i){var o,a,s,l,c,p,f,d=this,g=!O&&arguments.length>1,_=d.ctx;if(n){if(d._||(c=d.index,d=d.tag),p=d,_&&_.hasOwnProperty(n)||(_=h).hasOwnProperty(n)){if(s=_[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n)return s}else _=void 0;if((!O&&d.tagCtx||d.linked)&&(s&&s._cxp||(d=d.tagCtx||u(s)?d:!(d=d.scope||d).isTop&&d.ctx.tag||d,void 0!==s&&d.tagCtx&&(d=d.tagCtx.view.scope),_=d._ocps,(s=_&&_.hasOwnProperty(n)&&_[n]||s)&&s._cxp||!i&&!g||((_||(d._ocps=d._ocps||{}))[n]=s=[{_ocp:s,_vw:p,_key:n}],s._cxp={path:x,ind:0,updateValue:function(e,n){return t.observable(s[0]).setProperty(x,e),this}})),l=s&&s._cxp)){if(arguments.length>2)return(a=s[1]?v._ceo(s[1].deps):[x]).unshift(s[0]),a._cxp=l,a;if(c=l.tagElse,f=s[1]?l.tag&&l.tag.cvtArgs?l.tag.cvtArgs(c,1)[l.ind]:s[1](s[0].data,s[0],v):s[0]._ocp,g)return v._ucp(n,r,d,l),d;s=f}return s&&u(s)&&(o=function(){return s.apply(this&&this!==e?this:p,arguments)},le(o,s)),o||s}}function he(e,t){var n,r,i,o,a,s,l,c=this;if(c.tagName){if(!(c=((s=c).tagCtxs||[c])[e||0]))return}else s=c.tag;if(a=s.bindFrom,o=c.args,(l=s.convert)&&typeof l===K&&(l="true"===l?void 0:c.view.getRsc("converters",l)||Se("Unknown converter: '"+l+"'")),l&&!t&&(o=o.slice()),a){for(i=[],n=a.length;n--;)r=a[n],i.unshift(ge(c,r));t&&(o=i)}if(l){if(void 0===(l=l.apply(s,i||o)))return o;if(n=(a=a||[0]).length,p(l)&&(!1===l.arg0||1!==n&&l.length===n&&!l.arg0)||(l=[l],a=[0],n=1),t)o=l;else for(;n--;)+(r=a[n])===r&&(o[r]=l[n])}return o}function ge(e,t){return(e=e[+t===t?"args":"props"])&&e[t]}function ve(e){return this.cvtArgs(e,1)}function _e(e,t,n,r,i,o,a,s){var l,c,u,p=this,f="array"===t;p.content=s,p.views=f?[]:{},p.data=r,p.tmpl=i,u=p._={key:0,useKey:f?0:1,id:""+B++,onRender:a,bnds:{}},p.linked=!!a,p.type=t||"top",t&&(p.cache={_ct:_._cchCt}),n&&"top"!==n.type||((p.ctx=e||{}).root=p.data),(p.parent=n)?(p.root=n.root||p,l=n.views,c=n._,p.isTop=c.scp,p.scope=(!e.tag||e.tag===n.ctx.tag)&&!p.isTop&&n.scope||p,c.useKey?(l[u.key="_"+c.useKey++]=p,p.index=Q,p.getIndex=ue):l.length===(u.key=p.index=o)?l.push(p):l.splice(o,0,p),p.ctx=e||n.ctx):t&&(p.root=p)}function ye(e,t){return u(e)?e.call(t):e}function me(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!0})}function Ee(e,n){var r,i=y._wm||{},o={tmpls:[],links:{},bnds:[],_is:"template",render:Ae};return n&&(o=le(o,n)),o.markup=e,o.htmlTag||(r=M.exec(e),o.htmlTag=r?r[1].toLowerCase():""),(r=i[o.htmlTag])&&r!==i.div&&(o.markup=t.trim(o.markup)),o}function be(e,t){var n=e+"s";a[n]=function r(i,o,s){var l,c,u,p=v.onStore[e];if(i&&typeof i===W&&!i.nodeType&&!i.markup&&!i.getTgt&&!("viewModel"===e&&i.getters||i.extend)){for(c in i)r(c,i[c],o);return o||a}return i&&typeof i!==K&&(s=o,o=i,i=void 0),u=s?"viewModel"===e?s:s[n]=s[n]||{}:r,l=t.compile,void 0===o&&(o=l?i:u[i],i=void 0),null===o?i&&delete u[i]:(l&&((o=l.call(u,i,o,s,0)||{})._is=e),i&&(u[i]=o)),p&&p(i,o,s,l),o}}function Ie(e){m[e]=m[e]||function(t){return arguments.length?(_[e]=t,m):_[e]}}function Te(e){function t(t,n){this.tgt=e.getTgt(t,n),n.map=this}return u(e)&&(e={getTgt:e}),e.baseMap&&(e=le(le({},e.baseMap),e)),e.map=function(e,n){return new t(e,n)},e}function Ae(e,t,n,r,i,a){var s,l,c,f,d,h,g,_=r,m="";if(!0===t?(n=t,t=void 0):typeof t!==W&&(t=void 0),(c=this.tag)?(f=(_=_||this.view)._getTmpl(c.template||this.tmpl),arguments.length||(e=c.contentCtx&&u(c.contentCtx)?e=c.contentCtx(e):_)):f=this,f){if(!r&&e&&"view"===e._is&&(_=e),_&&e===_&&(e=_.data),d=!_,O=O||d,d&&((t=t||{}).root=e),!O||y.useViews||f.useViews||_&&_!==o)m=Ce(f,e,t,n,_,i,a,c);else{if(_?(h=_.data,g=_.index,_.index=Q):(h=(_=o).data,_.data=e,_.ctx=t),p(e)&&!n)for(s=0,l=e.length;s<l;s++)_.index=s,_.data=e[s],m+=f.fn(e[s],_,v);else _.data=e,m+=f.fn(e,_,v);_.data=h,_.index=g}d&&(O=void 0)}return m}function Ce(e,t,n,r,i,