UNPKG

@tindtechnologies/universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

2 lines 283 kB
/*! For license information please see 561.621ce63b41db020f2b81.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:()=>y,eY:()=>_});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}(),u=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 c=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.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(c.bB.SEARCH_0_AUTO_COMPLETE))||(t=e.getService(c.bB.SEARCH_1_AUTO_COMPLETE)),t||(t=e.getService(c.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 u(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="",c=0;c<n.length;c++){var f=n[c];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,y=this.manifest.getRights();(y&&(f={label:"rights",value:e&&e.licenseFormatter?e.licenseFormatter.format(y):y},(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 u(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 c=new u(s);c.addMetadata(s.getMetadata()),t.push(c)}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 u(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 u(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(c.bB.SEARCH_0);return e||(e=this.manifest.getService(c.bB.SEARCH_1)),e||(e=this.manifest.getService(c.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(c.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.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===c.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===c.LX.CONTINUOUS;var t=this.getBehavior();return!!t&&t===c.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===c.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===c.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===c.T5.RIGHT_TO_LEFT},e.prototype.isTopToBottom=function(){var e=this.getViewingDirection();return!!e&&e===c.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(c.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.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 u=this.getYearNode(l,i);if(u){var c=this.getMonthNode(u,o);c&&c.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 u=new s.TreeNode;u.label=this.getNodeDisplayMonth(r),u.navDate=r.navDate,u.data.year=i,u.data.month=o,l.addNode(u)}}}},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()===c.es.COLLECTION){var l=i.getManifests(),u=i.getCollections();l.length||void 0!==o||(o=0),void 0!==o&&u&&u.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(c.bB.IXIF);return s?s.getInfoUri():e.id},e.prototype._parseAuthServices=function(e){if(.9===this.authAPIVersion)this.clickThroughService=s.Utils.getService(e,c.bB.AUTH_0_CLICK_THROUGH),this.loginService=s.Utils.getService(e,c.bB.AUTH_0_LOGIN),this.restrictedService=s.Utils.getService(e,c.bB.AUTH_0_RESTRICTED),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(c.bB.AUTH_0_LOGOUT),this.tokenService=this.clickThroughService.getService(c.bB.AUTH_0_TOKEN)):this.loginService?(this.logoutService=this.loginService.getService(c.bB.AUTH_0_LOGOUT),this.tokenService=this.loginService.getService(c.bB.AUTH_0_TOKEN)):this.restrictedService&&(this.logoutService=this.restrictedService.getService(c.bB.AUTH_0_LOGOUT),this.tokenService=this.restrictedService.getService(c.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,c.bB.AUTH_1_CLICK_THROUGH),this.loginService=s.Utils.getService(e,c.bB.AUTH_1_LOGIN),this.externalService=s.Utils.getService(e,c.bB.AUTH_1_EXTERNAL),this.kioskService=s.Utils.getService(e,c.bB.AUTH_1_KIOSK),this.clickThroughService?(this.logoutService=this.clickThroughService.getService(c.bB.AUTH_1_LOGOUT),this.tokenService=this.clickThroughService.getService(c.bB.AUTH_1_TOKEN),this.probeService=this.clickThroughService.getService(c.bB.AUTH_1_PROBE)):this.loginService?(this.logoutService=this.loginService.getService(c.bB.AUTH_1_LOGOUT),this.tokenService=this.loginService.getService(c.bB.AUTH_1_TOKEN),this.probeService=s.Utils.getService(e,c.bB.AUTH_1_PROBE),this.probeService||(this.probeService=this.loginService.getService(c.bB.AUTH_1_PROBE))):this.externalService?(this.logoutService=this.externalService.getService(c.bB.AUTH_1_LOGOUT),this.tokenService=this.externalService.getService(c.bB.AUTH_1_TOKEN),this.probeService=s.Utils.getService(e,c.bB.AUTH_1_PROBE),this.probeService||(this.probeService=this.externalService.getService(c.bB.AUTH_1_PROBE))):this.kioskService&&(this.logoutService=this.kioskService.getService(c.bB.AUTH_1_LOGOUT),this.tokenService=this.kioskService.getService(c.bB.AUTH_1_TOKEN),this.probeService=s.Utils.getService(e,c.bB.AUTH_1_PROBE),this.probeService||(this.probeService=this.kioskService.getService(c.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}(),y=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}(),_=function(e){return new h(e).bootstrap()}},3957(e,t){"use strict";var n,r,i,o,a,s,l,u,c,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"}(u||(u={})),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"}(c||(t.T5=c={})),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),u="/*# ".concat(l," */"),c=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[o].concat(c).concat([u]).join("\n")}return[o].join("\n")}},4692(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],a=Object.getPrototypeOf,s=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},u=o.push,c=o.indexOf,p={},f=p.toString,d=p.hasOwnProperty,h=d.toString,g=h.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=function(e){return null!=e&&e===e.window},m=r.document,E={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||m).createElement("script");if(o.text=e,t)for(r in E)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?p[f.call(e)]||"object":typeof e}var x="3.5.0",C=function(e,t){return new C.fn.init(e,t)};function A(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!y(e)&&!_(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}C.fn=C.prototype={jquery:x,constructor:C,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=C.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return C.each(this,e)},map:function(e){return this.pushStack(C.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},C.extend=C.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||y(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(u&&r&&(C.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||C.isPlainObject(n)?n:{},i=!1,a[t]=C.extend(u,o,r)):void 0!==r&&(a[t]=r));return a},C.extend({expando:"jQuery"+(x+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==f.call(e)||(t=a(e))&&("function"!=typeof(n=d.call(t,"constructor")&&t.constructor)||h.call(n)!==g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(A(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(A(Object(e))?C.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(A(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l(a)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=o[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){p["[object "+t+"]"]=t.toLowerCase()}));var I=function(e){var t,n,r,i,o,a,s,l,u,c,p,f,d,h,g,v,y,_,m,E="sizzle"+1*new Date,b=e.document,T=0,x=0,C=le(),A=le(),I=le(),w=le(),S=function(e,t){return e===t&&(p=!0),0},O={}.hasOwnProperty,N=[],L=N.pop,P=N.push,R=N.push,M=N.slice,j=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},D="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="[\\x20\\t\\r\\n\\f]",U="(?:\\\\[\\da-fA-F]{1,6}"+k+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",V="\\["+k+"*("+U+")(?:"+k+"*([*^$|!~]?=)"+k+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+U+"))|)"+k+"*\\]",H=":("+U+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+V+")*)|.*)\\)|)",F=new RegExp(k+"+","g"),G=new RegExp("^"+k+"+|((?:^|[^\\\\])(?:\\\\.)*)"+k+"+$","g"),B=new RegExp("^"+k+"*,"+k+"*"),q=new RegExp("^"+k+"*([>+~]|"+k+")"+k+"*"),W=new RegExp(k+"|>"),$=new RegExp(H),Y=new RegExp("^"+U+"$"),X={ID:new RegExp("^#("+U+")"),CLASS:new RegExp("^\\.("+U+")"),TAG:new RegExp("^("+U+"|[*])"),ATTR:new RegExp("^"+V),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i"),bool:new RegExp("^(?:"+D+")$","i"),needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,z=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+k+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f()},ae=Ee((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{R.apply(N=M.call(b.childNodes),b.childNodes),N[b.childNodes.length].nodeType}catch(e){R={apply:N.length?function(e,t){P.apply(e,M.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,u,c,p,h,y,_=t&&t.ownerDocument,b=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==b&&9!==b&&11!==b)return r;if(!i&&(f(t),t=t||d,g)){if(11!==b&&(p=Z.exec(e)))if(o=p[1]){if(9===b){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(_&&(u=_.getElementById(o))&&m(t,u)&&u.id===o)return r.push(u),r}else{if(p[2])return R.apply(r,t.getElementsByTagName(e)),r;if((o=p[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!w[e+" "]&&(!v||!v.test(e))&&(1!==b||"object"!==t.nodeName.toLowerCase())){if(y=e,_=t,1===b&&(W.test(e)||q.test(e))){for((_=ee.test(e)&&ye(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=E)),s=(h=a(e)).length;s--;)h[s]=(c?"#"+c:":scope")+" "+me(h[s]);y=h.join(",")}try{return R.apply(r,_.querySelectorAll(y)),r}catch(t){w(e,!0)}finally{c===E&&t.removeAttribute("id")}}}return l(e.replace(G,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ue(e){return e[E]=!0,e}function ce(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function pe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return ue((function(t){return t=+t,ue((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ye(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},f=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:b;return a!=d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),b!=d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return h.appendChild(e).appendChild(d.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(d.getElementsByClassName),n.getById=ce((function(e){return h.appendChild(e).id=E,!d.getElementsByName||!d.getElementsByName(E).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByT