-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.938bcfd1.js
19 lines (19 loc) · 314 KB
/
2.938bcfd1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{495:function(e,t,n){"use strict";n.r(t),n.d(t,"DndContext",(function(){return r.a})),n.d(t,"createDndContext",(function(){return r.b})),n.d(t,"DndProvider",(function(){return o.a})),n.d(t,"DragPreviewImage",(function(){return i})),n.d(t,"useDrag",(function(){return C})),n.d(t,"useDrop",(function(){return k.a})),n.d(t,"useDragLayer",(function(){return P.a})),n.d(t,"DragSource",(function(){return te})),n.d(t,"DropTarget",(function(){return le})),n.d(t,"DragLayer",(function(){return ye}));var r=n(148),o=n(817),a=n(0),i=a.memo((function(e){var t=e.connect,n=e.src;if("undefined"!=typeof Image){var r=new Image;r.src=n,r.onload=function(){return t(r)}}return null}));i.displayName="DragPreviewImage";var c=n(17),l=n(896),u=n(287),s=n(884),f=n(303);function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=!1,h=!1,m=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.sourceId=e}},{key:"getHandlerId",value:function(){return this.sourceId}},{key:"canDrag",value:function(){Object(c.a)(!d,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return d=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{d=!1}}},{key:"isDragging",value:function(){if(!this.sourceId)return!1;Object(c.a)(!h,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return h=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{h=!1}}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"isDraggingSource",value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:"isOverTarget",value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:"getTargetIds",value:function(){return this.internalMonitor.getTargetIds()}},{key:"isSourcePublic",value:function(){return this.internalMonitor.isSourcePublic()}},{key:"getSourceId",value:function(){return this.internalMonitor.getSourceId()}},{key:"subscribeToOffsetChange",value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:"canDragSource",value:function(e){return this.internalMonitor.canDragSource(e)}},{key:"canDropOnTarget",value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&p(t.prototype,n),r&&p(t,r),e}(),b=n(912),y=n(895),v=n(290);function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var w=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Object(b.a)({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,Object(y.a)(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,Object(y.a)(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:"reconnect",value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:"reconnectDragSource",value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();t&&this.disconnectDragSource(),this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)):this.lastConnectedDragSource=e)}},{key:"reconnectDragPreview",value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();this.handlerId?this.dragPreview&&t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.disconnectDragPreview(),this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.disconnectDragPreview()}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didConnectedDragSourceChange",value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:"didConnectedDragPreviewChange",value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:"didDragSourceOptionsChange",value:function(){return!Object(v.a)(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:"didDragPreviewOptionsChange",value:function(){return!Object(v.a)(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:"disconnectDragSource",value:function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}},{key:"disconnectDragPreview",value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:"clearDragSource",value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:"clearDragPreview",value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}},{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:"dragPreview",get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}}])&&g(t.prototype,n),r&&g(t,r),e}();function O(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function C(e){var t=Object(a.useRef)(e);t.current=e,Object(c.a)(null!=e.item,"item must be defined"),Object(c.a)(null!=e.item.type,"item type must be defined");var n,r=E((n=Object(f.a)(),[Object(a.useMemo)((function(){return new m(n)}),[n]),Object(a.useMemo)((function(){return new w(n.getBackend())}),[n])]),2),o=r[0],i=r[1];!function(e,t,n){var r=Object(f.a)(),o=Object(a.useMemo)((function(){return{beginDrag:function(){var n=e.current,r=n.begin,o=n.item;if(r){var a=r(t);return Object(c.a)(null==a||"object"===j(a),"dragSpec.begin() must either return an object, undefined, or null"),a||o||{}}return o||{}},canDrag:function(){return"boolean"==typeof e.current.canDrag?e.current.canDrag:"function"!=typeof e.current.canDrag||e.current.canDrag(t)},isDragging:function(n,r){var o=e.current.isDragging;return o?o(t):r===n.getSourceId()},endDrag:function(){var r=e.current.end;r&&r(t.getItem(),t),n.reconnect()}}}),[]);Object(u.a)((function(){var a=O(Object(s.a)(e.current.item.type,o,r),2),i=a[0],c=a[1];return t.receiveHandlerId(i),n.receiveHandlerId(i),c}),[])}(t,o,i);var p=Object(l.a)(o,t.current.collect||function(){return{}},(function(){return i.reconnect()})),d=Object(a.useMemo)((function(){return i.hooks.dragSource()}),[i]),h=Object(a.useMemo)((function(){return i.hooks.dragPreview()}),[i]);return Object(u.a)((function(){i.dragSourceOptions=t.current.options||null,i.reconnect()}),[i]),Object(u.a)((function(){i.dragPreviewOptions=t.current.previewOptions||null,i.reconnect()}),[i]),[p,d,h]}var k=n(911),P=n(816);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){return"function"==typeof e}function R(){}function I(e){if(!function(e){return"object"===_(e)&&null!==e}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function T(e){var t=e.current;return null==t?null:t.decoratedRef?t.decoratedRef.current:t}function S(e){return(t=e)&&t.prototype&&"function"==typeof t.prototype.render||function(e){return e&&e.$$typeof&&"Symbol(react.forward_ref)"===e.$$typeof.toString()}(e);var t}var M=n(142),D=n.n(M);function B(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),e}var W=function(){function e(t){B(this,e),this.isDisposed=!1,this.action=x(t)?t:R}return A(e,[{key:"dispose",value:function(){this.isDisposed||(this.action(),this.isDisposed=!0)}}],[{key:"isDisposable",value:function(e){return e&&x(e.dispose)}},{key:"_fixup",value:function(t){return e.isDisposable(t)?t:e.empty}},{key:"create",value:function(t){return new e(t)}}]),e}();W.empty={dispose:R};var L=function(){function e(){B(this,e),this.isDisposed=!1;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.disposables=n}return A(e,[{key:"add",value:function(e){this.isDisposed?e.dispose():this.disposables.push(e)}},{key:"remove",value:function(e){var t=!1;if(!this.isDisposed){var n=this.disposables.indexOf(e);-1!==n&&(t=!0,this.disposables.splice(n,1),e.dispose())}return t}},{key:"clear",value:function(){if(!this.isDisposed){for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;for(var e=this.disposables.length,t=new Array(e),n=0;n<e;n++)t[n]=this.disposables[n];this.disposables=[];for(var r=0;r<e;r++)t[r].dispose()}}}]),e}(),z=function(){function e(){B(this,e),this.isDisposed=!1}return A(e,[{key:"getDisposable",value:function(){return this.current}},{key:"setDisposable",value:function(e){var t=this.isDisposed;if(!t){var n=this.current;this.current=e,n&&n.dispose()}t&&e&&e.dispose()}},{key:"dispose",value:function(){if(!this.isDisposed){this.isDisposed=!0;var e=this.current;this.current=void 0,e&&e.dispose()}}}]),e}();function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function U(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function q(e){var t=e.DecoratedComponent,n=e.createHandler,o=e.createMonitor,i=e.createConnector,l=e.registerHandler,u=e.containerDisplayName,s=e.getType,f=e.collect,p=e.options.arePropsEqual,d=void 0===p?v.a:p,h=t,m=t.displayName||t.name||"Component",b=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=U(this,Z(t).call(this,e))).decoratedRef=a.createRef(),n.handleChange=function(){var e=n.getCurrentState();Object(v.a)(e,n.state)||n.setState(e)},n.disposable=new z,n.receiveProps(e),n.dispose(),n}var u,p,b;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$(e,t)}(t,e),u=t,(p=[{key:"getHandlerId",value:function(){return this.handlerId}},{key:"getDecoratedComponentInstance",value:function(){return Object(c.a)(this.decoratedRef.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.decoratedRef.current}},{key:"shouldComponentUpdate",value:function(e,t){return!d(e,this.props)||!Object(v.a)(t,this.state)}},{key:"componentDidMount",value:function(){this.disposable=new z,this.currentType=void 0,this.receiveProps(this.props),this.handleChange()}},{key:"componentDidUpdate",value:function(e){d(this.props,e)||(this.receiveProps(this.props),this.handleChange())}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"receiveProps",value:function(e){this.handler&&(this.handler.receiveProps(e),this.receiveType(s(e)))}},{key:"receiveType",value:function(e){if(this.handlerMonitor&&this.manager&&this.handlerConnector&&e!==this.currentType){this.currentType=e;var t=V(l(e,this.handler,this.manager),2),n=t[0],r=t[1];this.handlerId=n,this.handlerMonitor.receiveHandlerId(n),this.handlerConnector.receiveHandlerId(n);var o=this.manager.getMonitor().subscribeToStateChange(this.handleChange,{handlerIds:[n]});this.disposable.setDisposable(new L(new W(o),new W(r)))}}},{key:"dispose",value:function(){this.disposable.dispose(),this.handlerConnector&&this.handlerConnector.receiveHandlerId(null)}},{key:"getCurrentState",value:function(){return this.handlerConnector?f(this.handlerConnector.hooks,this.handlerMonitor,this.props):{}}},{key:"render",value:function(){var e=this;return a.createElement(r.a.Consumer,null,(function(t){var n=t.dragDropManager;return e.receiveDragDropManager(n),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame((function(){return e.handlerConnector.reconnect()})),a.createElement(h,Object.assign({},e.props,e.getCurrentState(),{ref:S(h)?e.decoratedRef:null}))}))}},{key:"receiveDragDropManager",value:function(e){void 0===this.manager&&(Object(c.a)(void 0!==e,"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",m,m),void 0!==e&&(this.manager=e,this.handlerMonitor=o(e),this.handlerConnector=i(e.getBackend()),this.handler=n(this.handlerMonitor,this.decoratedRef)))}}])&&F(u.prototype,p),b&&F(u,b),t}(a.Component);return b.DecoratedComponent=t,b.displayName="".concat(u,"(").concat(m,")"),D()(b,t)}function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){return"string"==typeof e||"symbol"===G(e)||!!t&&Array.isArray(e)&&e.every((function(e){return J(e,!1)}))}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var X=["canDrag","beginDrag","isDragging","endDrag"],K=["beginDrag"],Q=function(){function e(t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.beginDrag=function(){if(o.props)return o.spec.beginDrag(o.props,o.monitor,o.ref.current)},this.spec=t,this.monitor=n,this.ref=r}var t,n,r;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"canDrag",value:function(){return!!this.props&&(!this.spec.canDrag||this.spec.canDrag(this.props,this.monitor))}},{key:"isDragging",value:function(e,t){return!!this.props&&(this.spec.isDragging?this.spec.isDragging(this.props,this.monitor):t===e.getSourceId())}},{key:"endDrag",value:function(){this.props&&this.spec.endDrag&&this.spec.endDrag(this.props,this.monitor,T(this.ref))}}])&&Y(t.prototype,n),r&&Y(t,r),e}();function ee(e){return Object.keys(e).forEach((function(t){Object(c.a)(X.indexOf(t)>-1,'Expected the drag source specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',X.join(", "),t),Object(c.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),K.forEach((function(t){Object(c.a)("function"==typeof e[t],"Expected %s in the drag source specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source",t,t,e[t])})),function(t,n){return new Q(e,t,n)}}function te(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(c.a)(J(e),'Expected "type" provided as the first argument to DragSource to be a string, or a function that returns a string given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',e),o=function(){return e}),Object(c.a)(I(t),'Expected "spec" provided as the second argument to DragSource to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',t);var a=ee(t);return Object(c.a)("function"==typeof n,'Expected "collect" provided as the third argument to DragSource to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),Object(c.a)(I(r),'Expected "options" provided as the fourth argument to DragSource to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source',n),function(e){return q({containerDisplayName:"DragSource",createHandler:a,registerHandler:s.a,createConnector:function(e){return new w(e)},createMonitor:function(e){return new m(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}var ne=n(894),re=n(893);function oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ae=["canDrop","hover","drop"],ie=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.props=null,this.spec=t,this.monitor=n,this.ref=r}var t,n,r;return t=e,(n=[{key:"receiveProps",value:function(e){this.props=e}},{key:"receiveMonitor",value:function(e){this.monitor=e}},{key:"canDrop",value:function(){return!this.spec.canDrop||this.spec.canDrop(this.props,this.monitor)}},{key:"hover",value:function(){this.spec.hover&&this.spec.hover(this.props,this.monitor,T(this.ref))}},{key:"drop",value:function(){if(this.spec.drop)return this.spec.drop(this.props,this.monitor,this.ref.current)}}])&&oe(t.prototype,n),r&&oe(t,r),e}();function ce(e){return Object.keys(e).forEach((function(t){Object(c.a)(ae.indexOf(t)>-1,'Expected the drop target specification to only have some of the following keys: %s. Instead received a specification with an unexpected "%s" key. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',ae.join(", "),t),Object(c.a)("function"==typeof e[t],"Expected %s in the drop target specification to be a function. Instead received a specification with %s: %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target",t,t,e[t])})),function(t,n){return new ie(e,t,n)}}function le(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e;"function"!=typeof e&&(Object(c.a)(J(e,!0),'Expected "type" provided as the first argument to DropTarget to be a string, an array of strings, or a function that returns either given the current props. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',e),o=function(){return e}),Object(c.a)(I(t),'Expected "spec" provided as the second argument to DropTarget to be a plain object. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',t);var a=ce(t);return Object(c.a)("function"==typeof n,'Expected "collect" provided as the third argument to DropTarget to be a function that returns a plain object of props to inject. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),Object(c.a)(I(r),'Expected "options" provided as the fourth argument to DropTarget to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target',n),function(e){return q({containerDisplayName:"DropTarget",createHandler:a,registerHandler:s.b,createMonitor:function(e){return new re.a(e)},createConnector:function(e){return new ne.a(e)},DecoratedComponent:e,getType:o,collect:n,options:r})}}function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e}function de(e,t){return!t||"object"!==ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function he(e){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&be(e,t)}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(c.a)("function"==typeof e,'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ',"Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer",e),Object(c.a)(I(t),'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer',t),function(n){var o=n,i=t.arePropsEqual,l=void 0===i?v.a:i,u=o.displayName||o.name||"Component",s=function(t){function n(){var e;return se(this,n),(e=de(this,he(n).apply(this,arguments))).isCurrentlyMounted=!1,e.ref=a.createRef(),e.handleChange=function(){if(e.isCurrentlyMounted){var t=e.getCurrentState();Object(v.a)(t,e.state)||e.setState(t)}},e}return me(n,t),pe(n,[{key:"getDecoratedComponentInstance",value:function(){return Object(c.a)(this.ref.current,"In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()"),this.ref.current}},{key:"shouldComponentUpdate",value:function(e,t){return!l(e,this.props)||!Object(v.a)(t,this.state)}},{key:"componentDidMount",value:function(){this.isCurrentlyMounted=!0,this.handleChange()}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.unsubscribeFromOffsetChange&&(this.unsubscribeFromOffsetChange(),this.unsubscribeFromOffsetChange=void 0),this.unsubscribeFromStateChange&&(this.unsubscribeFromStateChange(),this.unsubscribeFromStateChange=void 0)}},{key:"render",value:function(){var e=this;return a.createElement(r.a.Consumer,null,(function(t){var n=t.dragDropManager;return void 0===n?null:(e.receiveDragDropManager(n),e.isCurrentlyMounted?a.createElement(o,Object.assign({},e.props,e.state,{ref:S(o)?e.ref:null})):null)}))}},{key:"receiveDragDropManager",value:function(e){if(void 0===this.manager){this.manager=e,Object(c.a)("object"===ue(e),"Could not find the drag and drop manager in the context of %s. Make sure to render a DndProvider component in your top-level component. Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context",u,u);var t=this.manager.getMonitor();this.unsubscribeFromOffsetChange=t.subscribeToOffsetChange(this.handleChange),this.unsubscribeFromStateChange=t.subscribeToStateChange(this.handleChange)}}},{key:"getCurrentState",value:function(){if(!this.manager)return{};var t=this.manager.getMonitor();return e(t,this.props)}}]),n}(a.Component);return s.displayName="DragLayer(".concat(u,")"),s.DecoratedComponent=n,D()(s,n)}}},879:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicWindowContext=t.MosaicContext=void 0;var o=r(n(0));t.MosaicContext=o.default.createContext(void 0),t.MosaicWindowContext=o.default.createContext(void 0)},880:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalBlueprint=void 0;var i=a(n(0));!function(e){var t,r,o;try{!function(){var e=new Error("Cannot find module '@blueprintjs/core'");throw e.code="MODULE_NOT_FOUND",e}(),function(){var e=new Error("Cannot find module '@blueprintjs/icons'");throw e.code="MODULE_NOT_FOUND",e}(),t=n(!function(){var e=new Error("Cannot find module '@blueprintjs/core'");throw e.code="MODULE_NOT_FOUND",e}()),r=t.Classes,e.Icon=t.Icon,o=n(!function(){var e=new Error("Cannot find module '@blueprintjs/icons'");throw e.code="MODULE_NOT_FOUND",e}()).IconNames}catch(t){e.Icon=function(e){var t=e.icon;return i.createElement("span",null,t)}}e.getClasses=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r?e.map((function(e){return r[e]})).join(" "):""},e.getIconClass=function(e){return r&&o?r.iconClass(o[e]):""}}(t.OptionalBlueprint||(t.OptionalBlueprint={}))},881:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getAndAssertNodeAtPathExists=t.getNodeAtPath=t.getLeaves=t.getPathToCorner=t.getOtherDirection=t.getOtherBranch=t.createBalancedTreeFromLeaves=t.isParent=t.Corner=void 0;var o,a=r(n(512)),i=r(n(507));function c(e){return null!=e.direction}function l(e){return"row"===e?"column":"row"}function u(e,t){return t.length>0?i.default(e,t,null):e}!function(e){e[e.TOP_LEFT=1]="TOP_LEFT",e[e.TOP_RIGHT=2]="TOP_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT",e[e.BOTTOM_RIGHT=4]="BOTTOM_RIGHT"}(o=t.Corner||(t.Corner={})),t.isParent=c,t.createBalancedTreeFromLeaves=function(e,t){if(void 0===t&&(t="row"),0===e.length)return null;for(var n=a.default(e),r=[];n.length>1;){for(;n.length>0;)n.length>1?r.push({direction:"row",first:n.shift(),second:n.shift()}):r.unshift(n.shift());n=r,r=[]}return function e(t,n){if(void 0===n&&(n="row"),c(t)){var r=l(n);return{direction:n,first:e(t.first,r),second:e(t.second,r)}}return t}(n[0],t)},t.getOtherBranch=function(e){if("first"===e)return"second";if("second"===e)return"first";throw new Error("Branch '"+e+"' not a valid branch")},t.getOtherDirection=l,t.getPathToCorner=function(e,t){for(var n=e,r=[];c(n);)("row"!==n.direction||t!==o.TOP_LEFT&&t!==o.BOTTOM_LEFT)&&("column"!==n.direction||t!==o.TOP_LEFT&&t!==o.TOP_RIGHT)?(r.push("second"),n=n.second):(r.push("first"),n=n.first);return r},t.getLeaves=function e(t){return null==t?[]:c(t)?e(t.first).concat(e(t.second)):[t]},t.getNodeAtPath=u,t.getAndAssertNodeAtPathExists=function(e,t){if(null==e)throw new Error("Root is empty, cannot fetch path");var n=u(e,t);if(null==n)throw new Error("Path ["+t.join(", ")+"] did not resolve to a node");return n}},882:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createDefaultToolbarButton=void 0;var o=r(n(50)),a=r(n(0)),i=n(880);t.createDefaultToolbarButton=function(e,t,n,r){return a.default.createElement("button",{title:e,onClick:n,className:o.default("mosaic-default-control",i.OptionalBlueprint.getClasses("BUTTON","MINIMAL"),t)},r&&a.default.createElement("span",{className:"control-text"},r))}},884:function(e,t,n){"use strict";function r(e,t,n){var r=n.getRegistry(),o=r.addTarget(e,t);return[o,function(){return r.removeTarget(o)}]}function o(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}))},885:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createExpandUpdate=t.createHideUpdate=t.createDragToUpdates=t.createRemoveUpdate=t.updateTree=t.buildSpecFromUpdate=void 0;var o=r(n(946)),a=r(n(947)),i=r(n(888)),c=r(n(286)),l=r(n(511)),u=r(n(513)),s=r(n(948)),f=n(889),p=n(881);function d(e){return e.path.length>0?u.default({},e.path,e.spec):e.spec}function h(e,t){var n=e;return t.forEach((function(e){n=o.default(n,d(e))})),n}function m(e,t){var n=i.default(t),r=l.default(t),o=n.concat(p.getOtherBranch(r));return{path:n,spec:{$set:p.getAndAssertNodeAtPathExists(e,o)}}}function b(e,t,n){return c.default(s.default(e,n),s.default(t,n))}t.buildSpecFromUpdate=d,t.updateTree=h,t.createRemoveUpdate=m,t.createDragToUpdates=function(e,t,n,r){var o=p.getAndAssertNodeAtPathExists(e,n),i=[];b(t,n,n.length)?o=h(o,[m(o,a.default(t,n.length))]):(i.push(m(e,t)),b(t,n,t.length-1)&&n.splice(t.length-1,1));var c,l,u=p.getAndAssertNodeAtPathExists(e,t);r===f.MosaicDropTargetPosition.LEFT||r===f.MosaicDropTargetPosition.TOP?(c=u,l=o):(c=o,l=u);var s="column";return r!==f.MosaicDropTargetPosition.LEFT&&r!==f.MosaicDropTargetPosition.RIGHT||(s="row"),i.push({path:n,spec:{$set:{first:c,second:l,direction:s}}}),i},t.createHideUpdate=function(e){return{path:i.default(e),spec:{splitPercentage:{$set:"first"===l.default(e)?0:100}}}},t.createExpandUpdate=function(e,t){for(var n,r={},o=e.length-1;o>=0;o--){var a=e[o];(n={splitPercentage:{$set:"first"===a?t:100-t}})[a]=r,r=n}return{spec:r,path:[]}}},886:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicDragType=void 0,t.MosaicDragType={WINDOW:"MosaicWindow"}},888:function(e,t,n){var r=n(501),o=n(289);e.exports=function(e,t,n){var a=null==e?0:e.length;return a?(t=n||void 0===t?1:o(t),r(e,0,(t=a-t)<0?0:t)):[]}},889:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicDropTargetPosition=void 0,t.MosaicDropTargetPosition={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"}},890:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddSharp");t.default=i},891:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"}),"ExpandMoreSharp");t.default=i},892:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineSharp");t.default=i},893:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(17);function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=!1,i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t,n,i;return t=e,(n=[{key:"receiveHandlerId",value:function(e){this.targetId=e}},{key:"getHandlerId",value:function(){return this.targetId}},{key:"subscribeToStateChange",value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:"canDrop",value:function(){if(!this.targetId)return!1;Object(r.a)(!a,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return a=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{a=!1}}},{key:"isOver",value:function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}},{key:"getItemType",value:function(){return this.internalMonitor.getItemType()}},{key:"getItem",value:function(){return this.internalMonitor.getItem()}},{key:"getDropResult",value:function(){return this.internalMonitor.getDropResult()}},{key:"didDrop",value:function(){return this.internalMonitor.didDrop()}},{key:"getInitialClientOffset",value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:"getInitialSourceClientOffset",value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:"getSourceClientOffset",value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:"getClientOffset",value:function(){return this.internalMonitor.getClientOffset()}},{key:"getDifferenceFromInitialOffset",value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}])&&o(t.prototype,n),i&&o(t,i),e}()},894:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(290),o=n(912),a=n(895);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=Object(o.a)({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,Object(a.a)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,c;return t=e,(n=[{key:"reconnect",value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}},{key:"receiveHandlerId",value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:"didHandlerIdChange",value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:"didDropTargetChange",value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:"didOptionsChange",value:function(){return!Object(r.a)(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:"disconnectDropTarget",value:function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}},{key:"clearDropTarget",value:function(){this.dropTargetRef=null,this.dropTargetNode=null}},{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}}])&&i(t.prototype,n),c&&i(t,c),e}()},895:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return null!==e&&"object"===r(e)&&e.hasOwnProperty("current")}n.d(t,"a",(function(){return o}))},896:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(287),o=n(417);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e,t,n){var i=a(Object(o.a)(e,t,n),2),c=i[0],l=i[1];return Object(r.a)((function(){var t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(l,{handlerIds:[t]})}),[e,l]),c}},897:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuSharp");t.default=i},898:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M21.99 2H2v16h16l4 4-.01-20zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}),"CommentSharp");t.default=i},899:function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var o=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},900:function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},901:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.BoundingBox=void 0;var o=n(962);!function(e){function t(e,t,n){var r=e.top,a=e.right,i=e.bottom,c=e.left;return"column"===n?(100-r-i)*t/100+r:"row"===n?(100-a-c)*t/100+c:o.assertNever(n)}e.empty=function(){return{top:0,right:0,bottom:0,left:0}},e.split=function(e,n,a){var i=t(e,n,a);return"column"===a?{first:r(r({},e),{bottom:100-i}),second:r(r({},e),{top:i})}:"row"===a?{first:r(r({},e),{right:100-i}),second:r(r({},e),{left:i})}:o.assertNever(a)},e.getAbsoluteSplitPercentage=t,e.getRelativeSplitPercentage=function(e,t,n){var r=e.top,a=e.right,i=e.bottom,c=e.left;return"column"===n?(t-r)/(100-r-i)*100:"row"===n?(t-c)/(100-a-c)*100:o.assertNever(n)},e.asStyles=function(e){return{top:e.top+"%",right:e.right+"%",bottom:e.bottom+"%",left:e.left+"%"}}}(t.BoundingBox||(t.BoundingBox={}))},902:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicZeroState=void 0;var i=a(n(50)),c=a(n(288)),l=a(n(0)),u=n(879),s=n(880),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.replace=function(){return Promise.resolve(t.props.createNode()).then((function(e){return t.context.mosaicActions.replaceWith([],e)})).catch(c.default)},t}return o(t,e),t.prototype.render=function(){return l.default.createElement("div",{className:i.default("mosaic-zero-state",s.OptionalBlueprint.getClasses("NON_IDEAL_STATE"))},l.default.createElement("div",{className:s.OptionalBlueprint.getClasses("NON_IDEAL_STATE_VISUAL")},l.default.createElement(s.OptionalBlueprint.Icon,{iconSize:120,icon:"applications"})),l.default.createElement("h4",{className:s.OptionalBlueprint.getClasses("HEADING")},"No Windows Present"),l.default.createElement("div",null,this.props.createNode&&l.default.createElement("button",{className:i.default(s.OptionalBlueprint.getClasses("BUTTON"),s.OptionalBlueprint.getIconClass("ADD")),onClick:this.replace},"Add New Window")))},t.contextType=u.MosaicContext,t}(l.default.PureComponent);t.MosaicZeroState=f},903:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicDropTarget=void 0;var i=a(n(50)),c=a(n(0)),l=n(495),u=n(879),s=n(886),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.position,n=e.isOver,r=e.connectDropTarget,o=e.draggedMosaicId;return r(c.default.createElement("div",{className:i.default("drop-target",t,{"drop-target-hover":n&&o===this.context.mosaicId})}))},t.contextType=u.MosaicContext,t}(c.default.PureComponent);t.MosaicDropTarget=l.DropTarget(s.MosaicDragType.WINDOW,{drop:function(e,t,n){return n.context.mosaicId===(t.getItem()||{}).mosaicId?{path:e.path,position:e.position}:{}}},(function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),draggedMosaicId:(t.getItem()||{}).mosaicId}}))(f)},904:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONTROLS_WITHOUT_CREATION=t.DEFAULT_CONTROLS_WITH_CREATION=void 0;var o=r(n(0)),a=n(905),i=n(906),c=n(907),l=n(908);t.DEFAULT_CONTROLS_WITH_CREATION=o.default.Children.toArray([o.default.createElement(c.ReplaceButton,null),o.default.createElement(l.SplitButton,null),o.default.createElement(a.ExpandButton,null),o.default.createElement(i.RemoveButton,null)]),t.DEFAULT_CONTROLS_WITHOUT_CREATION=o.default.Children.toArray([o.default.createElement(a.ExpandButton,null),o.default.createElement(i.RemoveButton,null)])},905:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandButton=void 0;var i=a(n(50)),c=a(n(0)),l=n(879),u=n(880),s=n(882),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return c.default.createElement(l.MosaicContext.Consumer,null,(function(t){var n=t.mosaicActions;return s.createDefaultToolbarButton("Expand",i.default("expand-button",u.OptionalBlueprint.getIconClass("MAXIMIZE")),e.createExpand(n))}))},t.prototype.createExpand=function(e){var t=this;return function(){e.expand(t.context.mosaicWindowActions.getPath()),t.props.onClick&&t.props.onClick()}},t.contextType=l.MosaicWindowContext,t}(c.default.PureComponent);t.ExpandButton=f},906:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveButton=void 0;var i=a(n(50)),c=a(n(0)),l=n(879),u=n(880),s=n(882),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return c.default.createElement(l.MosaicContext.Consumer,null,(function(t){var n=t.mosaicActions;return s.createDefaultToolbarButton("Close Window",i.default("close-button",u.OptionalBlueprint.getIconClass("CROSS")),e.createRemove(n))}))},t.prototype.createRemove=function(e){var t=this;return function(){e.remove(t.context.mosaicWindowActions.getPath()),t.props.onClick&&t.props.onClick()}},t.contextType=l.MosaicWindowContext,t}(c.default.PureComponent);t.RemoveButton=f},907:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaceButton=void 0;var i=a(n(50)),c=a(n(288)),l=a(n(0)),u=n(879),s=n(880),f=n(882),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.replace=function(){t.context.mosaicWindowActions.replaceWithNew().then((function(){t.props.onClick&&t.props.onClick()})).catch(c.default)},t}return o(t,e),t.prototype.render=function(){return f.createDefaultToolbarButton("Replace Window",i.default("replace-button",s.OptionalBlueprint.getIconClass("EXCHANGE")),this.replace)},t.contextType=u.MosaicWindowContext,t}(l.default.PureComponent);t.ReplaceButton=p},908:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SplitButton=void 0;var i=a(n(50)),c=a(n(288)),l=a(n(0)),u=n(879),s=n(880),f=n(882),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.split=function(){t.context.mosaicWindowActions.split().then((function(){t.props.onClick&&t.props.onClick()})).catch(c.default)},t}return o(t,e),t.prototype.render=function(){return f.createDefaultToolbarButton("Split Window",i.default("split-button",s.OptionalBlueprint.getIconClass("ADD_COLUMN_RIGHT")),this.split)},t.contextType=u.MosaicWindowContext,t}(l.default.PureComponent);t.SplitButton=p},909:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Separator=void 0;var i=a(n(0)),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return i.default.createElement("div",{className:"separator"})},t}(i.default.PureComponent);t.Separator=c},911:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(0),o=n(17),a=n(896),i=n(287),c=n(884),l=n(303),u=n(894),s=n(893);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(e){var t=Object(r.useRef)(e);t.current=e,Object(o.a)(null!=e.accept,"accept must be defined");var n,d=p((n=Object(l.a)(),[Object(r.useMemo)((function(){return new s.a(n)}),[n]),Object(r.useMemo)((function(){return new u.a(n.getBackend())}),[n])]),2),h=d[0],m=d[1];!function(e,t,n){var o=Object(l.a)(),a=Object(r.useMemo)((function(){return{canDrop:function(){var n=e.current.canDrop;return!n||n(t.getItem(),t)},hover:function(){var n=e.current.hover;n&&n(t.getItem(),t)},drop:function(){var n=e.current.drop;if(n)return n(t.getItem(),t)}}}),[t]);Object(i.a)((function(){var r=f(Object(c.b)(e.current.accept,a,o),2),i=r[0],l=r[1];return t.receiveHandlerId(i),n.receiveHandlerId(i),l}),[t,n])}(t,h,m);var b=Object(a.a)(h,t.current.collect||function(){return{}},(function(){return m.reconnect()})),y=Object(r.useMemo)((function(){return m.hooks.dropTarget()}),[m]);return Object(i.a)((function(){m.dropTargetOptions=e.options||null,m.reconnect()}),[e.options]),[b,y]}},912:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),o=n(17);function a(e,t){"function"==typeof e?e(t):e.current=t}function i(e,t){var n=e.ref;return Object(o.a)("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),n?Object(r.cloneElement)(e,{ref:function(e){a(n,e),a(t,e)}}):Object(r.cloneElement)(e,{ref:t})}function c(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a <div>, or turn it into a ")+"drag source or a drop target itself.")}}function l(e){var t={};return Object.keys(e).forEach((function(n){var o=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var a=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Object(r.isValidElement)(t)){var o=t;return e(o,n),o}var a=t;c(a);var l=n?function(t){return e(t,n)}:e;return i(a,l)}}(o);t[n]=function(){return a}}})),t}},917:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M19 18l2 1V1H7v2h12v15zM17 5H3v18l7-3 7 3V5z"}),"BookmarksSharp");t.default=i},918:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M19.44 12.99l-.01.02c.04-.33.08-.67.08-1.01 0-.34-.03-.66-.07-.99l.01.02 2.44-1.92-2.43-4.22-2.87 1.16.01.01c-.52-.4-1.09-.74-1.71-1h.01L14.44 2H9.57l-.44 3.07h.01c-.62.26-1.19.6-1.71 1l.01-.01-2.88-1.17-2.44 4.22 2.44 1.92.01-.02c-.04.33-.07.65-.07.99 0 .34.03.68.08 1.01l-.01-.02-2.1 1.65-.33.26 2.43 4.2 2.88-1.15-.02-.04c.53.41 1.1.75 1.73 1.01h-.03L9.58 22h4.85s.03-.18.06-.42l.38-2.65h-.01c.62-.26 1.2-.6 1.73-1.01l-.02.04 2.88 1.15 2.43-4.2s-.14-.12-.33-.26l-2.11-1.66zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"}),"SettingsSharp");t.default=i},919:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z"}),"ExpandLessSharp");t.default=i},920:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckSharp");t.default=i},921:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}),"PaletteSharp");t.default=i},922:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHorizSharp");t.default=i},923:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M19 12v7H5v-7H3v9h18v-9h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z"}),"SaveAltSharp");t.default=i},924:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"}),"Input");t.default=i},925:function(e,t,n){"use strict";var r=n(926).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},926:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(0)),o=a(n(927));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?d(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){function t(){var e,n;u(this,t);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return m(d(n=f(this,(e=p(t)).call.apply(e,[this].concat(i)))),"onClick",(function(e){var t=n.props,a=t.text,i=t.onCopy,c=t.children,l=t.options,u=r.default.Children.only(c),s=(0,o.default)(a,l);i&&i(a,s),u&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(e)})),n}var n,a,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,(a=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=l(e,["text","onCopy","options","children"]),o=r.default.Children.only(t);return r.default.cloneElement(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{onClick:this.onClick}))}}])&&s(n.prototype,a),i&&s(n,i),t}(r.default.PureComponent);t.CopyToClipboard=b,m(b,"defaultProps",{onCopy:void 0,options:void 0})},927:function(e,t,n){"use strict";var r=n(928),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,i,c,l,u,s=!1;t||(t={}),n=t.debug||!1;try{if(i=r(),c=document.createRange(),l=document.getSelection(),(u=document.createElement("span")).textContent=e,u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=o[t.format]||o.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),l.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),s=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(c):l.removeAllRanges()),u&&document.body.removeChild(u),i()}return s}},928:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},929:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");t.default=i},930:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExitSharp");t.default=i},931:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"FullscreenSharp");t.default=i},932:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M4.01 2L4 22h16V8l-6-6H4.01zM13 9V3.5L18.5 9H13z"}),"InsertDriveFileSharp");t.default=i},933:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){d(e,t,n[t])}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?p(e):t}function f(e){return(f=Object.getPrototypeOf||function(e){return e.__proto__})(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h={position:"absolute",left:0,top:0,right:0,bottom:0,overflow:"hidden",zIndex:-1,visibility:"hidden",pointerEvents:"none"},m={position:"absolute",left:0,top:0,transition:"0s"};function b(e,t){for(var n=e.parentNode;n;){if(n===t)return!0;n=n.parentNode}return!1}var y=function(e){function t(){var e,n,r;c(this,t);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return s(r,(n=r=s(this,(e=f(t)).call.apply(e,[this].concat(a))),d(p(p(r)),"_expandRef",null),d(p(p(r)),"_shrinkRef",null),d(p(p(r)),"_node",null),d(p(p(r)),"_lastWidth",void 0),d(p(p(r)),"_lastHeight",void 0),d(p(p(r)),"_lastRect",void 0),d(p(p(r)),"_hasResize",!1),d(p(p(r)),"_handleScroll",(function(e){(r.props.onPosition||r.props.onReflow||r.props.onResize)&&(r._globalScollTarget(e.target)||r._refScrollTarget(e.target)||r._ancestorScollTarget(e.target))&&r._reflow()})),d(p(p(r)),"_globalScollTarget",(function(e){return e instanceof Node&&(r.props.onPosition||r.props.onReflow)&&(e===document||e===document.documentElement||e===document.body)})),d(p(p(r)),"_refScrollTarget",(function(e){if(e instanceof HTMLElement&&(e===r._expandRef||e===r._shrinkRef)){var t=e.offsetWidth,n=e.offsetHeight;if(t!==r._lastWidth||n!==r._lastHeight)return r._lastWidth=t,r._lastHeight=n,r._reset(r._expandRef),r._reset(r._shrinkRef),!0}return!1})),d(p(p(r)),"_ancestorScollTarget",(function(e){return e instanceof Node&&(r.props.onPosition||r.props.onReflow)&&r._node&&b(r._node,e)})),d(p(p(r)),"_reflow",(function(){if(r._node&&r._node.parentNode instanceof Element){var e=r._node.parentNode.getBoundingClientRect(),t=!0,n=!0;r._lastRect&&(t=e.width!==r._lastRect.width||e.height!==r._lastRect.height,n=e.top!==r._lastRect.top||e.left!==r._lastRect.left),r._lastRect=e,t&&r.props.onResize&&r.props.onResize(e),n&&r.props.onPosition&&r.props.onPosition(e),(t||n)&&r.props.onReflow&&r.props.onReflow(e)}})),d(p(p(r)),"_handleRef",(function(e){r._node=e})),d(p(p(r)),"_handleExpandRef",(function(e){r._reset(e),r._expandRef=e})),d(p(p(r)),"_handleShrinkRef",(function(e){r._reset(e),r._shrinkRef=e})),n))}var n,r,a;return n=t,(r=[{key:"componentDidMount",value:function(){this._reflow(),window.addEventListener("scroll",this._handleScroll,!0),(this.props.onPosition||this.props.onReflow)&&(window.addEventListener("resize",this._reflow,!0),this._hasResize=!0)}},{key:"componentDidUpdate",value:function(){!this.props.onPosition&&!this.props.onReflow||this._hasResize?this.props.onPosition||this.props.onReflow||!this._hasResize||(window.removeEventListener("resize",this._reflow,!0),this._hasResize=!1):(window.addEventListener("resize",this._reflow,!0),this._hasResize=!0)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this._handleScroll,!0),this._hasResize&&window.removeEventListener("resize",this._reflow,!0)}},{key:"_reset",value:function(e){e&&(e.scrollLeft=1e5,e.scrollTop=1e5)}},{key:"render",value:function(){return this.props.onResize||this.props.onReflow?o.default.createElement("div",{style:h,ref:this._handleRef},o.default.createElement("div",{ref:this._handleExpandRef,style:h},o.default.createElement("div",{style:i({},m,{width:1e5,height:1e5})})),o.default.createElement("div",{ref:this._handleShrinkRef,style:h},o.default.createElement("div",{style:i({},m,{width:"200%",height:"200%"})}))):o.default.createElement("noscript",{ref:this._handleRef})}}])&&u(n.prototype,r),a&&u(n,a),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");l(e.prototype,t&&t.prototype),t&&l(e,t)}(t,e),t}(o.default.Component);d(y,"displayName","ResizeObserver");var v=y;t.default=v},934:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"}),"ViewColumn");t.default=i},935:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M21 3H3v18h18V3zm-2 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"}),"CropOriginalSharp");t.default=i},936:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M21 3H3v18h18V3zm-2 16H5V5h14v14z"}),"CropDinSharp");t.default=i},937:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVertSharp");t.default=i},938:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M20 8h-3V6.21c0-2.61-1.91-4.94-4.51-5.19C9.51.74 7 3.08 7 6v2H4v14h16V8zm-8 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9z"}),"LockSharp");t.default=i},939:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=c(n(0)),i=c(n(2));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onReceiveMessage=n.onReceiveMessage.bind(n),n.onLoad=n.onLoad.bind(n),n.sendMessage=n.sendMessage.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onReceiveMessage),this._frame&&this._frame.addEventListener("load",this.onLoad)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onReceiveMessage,!1)}},{key:"componentWillReceiveProps",value:function(e){this.props.postMessageData!==e.postMessageData&&this.sendMessage(e.postMessageData)}},{key:"onReceiveMessage",value:function(e){var t=this.props.handleReceiveMessage;t&&t(e)}},{key:"onLoad",value:function(){var e=this.props.handleReady;e&&e(),this.sendMessage(this.props.postMessageData)}},{key:"sendMessage",value:function(e){this._frame.contentWindow.postMessage(e,this.props.targetOrigin)}},{key:"render",value:function(){var e=this,n=this.props.attributes;return a.default.createElement("iframe",r({ref:function(t){e._frame=t}},Object.assign({},t.defaultAttributes,n)))}}]),t}(a.default.Component);l.propTypes={attributes:i.default.shape({frameBorder:i.default.oneOfType([i.default.string,i.default.number]),height:i.default.oneOfType([i.default.string,i.default.number]),name:i.default.string,scrolling:i.default.string,sandbox:i.default.string,srcDoc:i.default.string,src:i.default.string.isRequired,width:i.default.oneOfType([i.default.string,i.default.number])}),handleReceiveMessage:i.default.func,handleReady:i.default.func,postMessageData:i.default.any,targetOrigin:i.default.string},l.defaultProps={targetOrigin:"*"},l.defaultAttributes={frameBorder:0},t.default=l},940:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"InfoSharp");t.default=i},941:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91c.48.22 1.05.34 1.7.34.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"CopyrightSharp");t.default=i},942:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z"}),"LayersSharp");t.default=i},943:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M10 17l5-5-5-5v10z"}),"ArrowRightSharp");t.default=i},944:function(e,t,n){"use strict";var r=n(21),o=n(26);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=o(n(0)),i=(0,r(n(22)).default)(a.createElement("path",{d:"M14 7l-5 5 5 5V7z"}),"ArrowLeftSharp");t.default=i},945:function(e,t,n){var r=n(503),o=n(220),a=n(285),i=n(292),c=a((function(e,t){return i(e)?r(e,o(t,1,i,!0)):[]}));e.exports=c},946:function(e,t,n){"use strict";(function(n){function r(e){return"object"!=typeof e||"toString"in e?e:Object.prototype.toString.call(e).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var o="object"==typeof n&&!0;function a(e,t){if(!e){if(o)throw new Error("Invariant failed");throw new Error(t())}}t.invariant=a;var i=Object.prototype.hasOwnProperty,c=Array.prototype.splice,l=Object.prototype.toString;function u(e){return l.call(e).slice(8,-1)}var s=Object.assign||function(e,t){return f(t).forEach((function(n){i.call(t,n)&&(e[n]=t[n])})),e},f="function"==typeof Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function p(e){return Array.isArray(e)?s(e.constructor(e.length),e):"Map"===u(e)?new Map(e):"Set"===u(e)?new Set(e):e&&"object"==typeof e?s(Object.create(Object.getPrototypeOf(e)),e):e}var d=function(){function e(){this.commands=s({},h),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(e,t){return e===t},this.update.newContext=function(){return(new e).update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(e){this.update.isEquals=e},enumerable:!0,configurable:!0}),e.prototype.extend=function(e,t){this.commands[e]=t},e.prototype.update=function(e,t){var n=this,r="function"==typeof t?{$apply:t}:t;Array.isArray(e)&&Array.isArray(r)||a(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),a("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var o=e;return f(r).forEach((function(t){if(i.call(n.commands,t)){var a=e===o;o=n.commands[t](r[t],o,r,e),a&&n.isEquals(o,e)&&(o=e)}else{var c="Map"===u(e)?n.update(e.get(t),r[t]):n.update(e[t],r[t]),l="Map"===u(o)?o.get(t):o[t];n.isEquals(c,l)&&(void 0!==c||i.call(e,t))||(o===e&&(o=p(e)),"Map"===u(o)?o.set(t,c):o[t]=c)}})),o},e}();t.Context=d;var h={$push:function(e,t,n){return b(t,n,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,n){return b(t,n,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,n,o){return function(e,t){a(Array.isArray(e),(function(){return"Expected $splice target to be an array; got "+r(e)})),v(t.$splice)}(t,n),e.forEach((function(e){v(e),t===o&&e.length&&(t=p(o)),c.apply(t,e)})),t},$set:function(e,t,n){return function(e){a(1===Object.keys(e).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),e},$toggle:function(e,t){y(e,"$toggle");var n=e.length?p(t):t;return e.forEach((function(e){n[e]=!t[e]})),n},$unset:function(e,t,n,r){return y(e,"$unset"),e.forEach((function(e){Object.hasOwnProperty.call(t,e)&&(t===r&&(t=p(r)),delete t[e])})),t},$add:function(e,t,n,r){return g(t,"$add"),y(e,"$add"),"Map"===u(t)?e.forEach((function(e){var n=e[0],o=e[1];t===r&&t.get(n)!==o&&(t=p(r)),t.set(n,o)})):e.forEach((function(e){t!==r||t.has(e)||(t=p(r)),t.add(e)})),t},$remove:function(e,t,n,r){return g(t,"$remove"),y(e,"$remove"),e.forEach((function(e){t===r&&t.has(e)&&(t=p(r)),t.delete(e)})),t},$merge:function(e,t,n,o){var i,c;return i=t,a((c=e)&&"object"==typeof c,(function(){return"update(): $merge expects a spec of type 'object'; got "+r(c)})),a(i&&"object"==typeof i,(function(){return"update(): $merge expects a target of type 'object'; got "+r(i)})),f(e).forEach((function(n){e[n]!==t[n]&&(t===o&&(t=p(o)),t[n]=e[n])})),t},$apply:function(e,t){var n;return a("function"==typeof(n=e),(function(){return"update(): expected spec of $apply to be a function; got "+r(n)+"."})),e(t)}},m=new d;function b(e,t,n){a(Array.isArray(e),(function(){return"update(): expected target of "+r(n)+" to be an array; got "+r(e)+"."})),y(t[n],n)}function y(e,t){a(Array.isArray(e),(function(){return"update(): expected spec of "+r(t)+" to be an array; got "+r(e)+". Did you forget to wrap your parameter in an array?"}))}function v(e){a(Array.isArray(e),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+r(e)+". Did you forget to wrap your parameters in an array?"}))}function g(e,t){var n=u(e);a("Map"===n||"Set"===n,(function(){return"update(): "+r(t)+" expects a target of type Set or Map; got "+r(n)}))}t.isEquals=m.update.isEquals,t.extend=m.extend,t.default=m.update,t.default.default=e.exports=s(t.default,t)}).call(this,n(510))},947:function(e,t,n){var r=n(501),o=n(289);e.exports=function(e,t,n){var a=null==e?0:e.length;return a?(t=n||void 0===t?1:o(t),r(e,t<0?0:t,a)):[]}},948:function(e,t,n){var r=n(501),o=n(289);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},949:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});
/**
* @license
* Copyright 2019 Kevin Verdieck, originally developed at Palantir Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var r=n(950);Object.defineProperty(t,"Mosaic",{enumerable:!0,get:function(){return r.Mosaic}}),Object.defineProperty(t,"MosaicWithoutDragDropContext",{enumerable:!0,get:function(){return r.MosaicWithoutDragDropContext}});var o=n(886);Object.defineProperty(t,"MosaicDragType",{enumerable:!0,get:function(){return o.MosaicDragType}});var a=n(879);Object.defineProperty(t,"MosaicContext",{enumerable:!0,get:function(){return a.MosaicContext}}),Object.defineProperty(t,"MosaicWindowContext",{enumerable:!0,get:function(){return a.MosaicWindowContext}});var i=n(885);Object.defineProperty(t,"buildSpecFromUpdate",{enumerable:!0,get:function(){return i.buildSpecFromUpdate}}),Object.defineProperty(t,"createDragToUpdates",{enumerable:!0,get:function(){return i.createDragToUpdates}}),Object.defineProperty(t,"createExpandUpdate",{enumerable:!0,get:function(){return i.createExpandUpdate}}),Object.defineProperty(t,"createHideUpdate",{enumerable:!0,get:function(){return i.createHideUpdate}}),Object.defineProperty(t,"createRemoveUpdate",{enumerable:!0,get:function(){return i.createRemoveUpdate}}),Object.defineProperty(t,"updateTree",{enumerable:!0,get:function(){return i.updateTree}});var c=n(881);Object.defineProperty(t,"createBalancedTreeFromLeaves",{enumerable:!0,get:function(){return c.createBalancedTreeFromLeaves}}),Object.defineProperty(t,"Corner",{enumerable:!0,get:function(){return c.Corner}}),Object.defineProperty(t,"getAndAssertNodeAtPathExists",{enumerable:!0,get:function(){return c.getAndAssertNodeAtPathExists}}),Object.defineProperty(t,"getLeaves",{enumerable:!0,get:function(){return c.getLeaves}}),Object.defineProperty(t,"getNodeAtPath",{enumerable:!0,get:function(){return c.getNodeAtPath}}),Object.defineProperty(t,"getOtherBranch",{enumerable:!0,get:function(){return c.getOtherBranch}}),Object.defineProperty(t,"getOtherDirection",{enumerable:!0,get:function(){return c.getOtherDirection}}),Object.defineProperty(t,"getPathToCorner",{enumerable:!0,get:function(){return c.getPathToCorner}}),Object.defineProperty(t,"isParent",{enumerable:!0,get:function(){return c.isParent}});var l=n(964);Object.defineProperty(t,"MosaicWindow",{enumerable:!0,get:function(){return l.MosaicWindow}});var u=n(882);Object.defineProperty(t,"createDefaultToolbarButton",{enumerable:!0,get:function(){return u.createDefaultToolbarButton}});var s=n(902);Object.defineProperty(t,"MosaicZeroState",{enumerable:!0,get:function(){return s.MosaicZeroState}});var f=n(909);Object.defineProperty(t,"Separator",{enumerable:!0,get:function(){return f.Separator}});var p=n(905);Object.defineProperty(t,"ExpandButton",{enumerable:!0,get:function(){return p.ExpandButton}});var d=n(907);Object.defineProperty(t,"ReplaceButton",{enumerable:!0,get:function(){return d.ReplaceButton}});var h=n(908);Object.defineProperty(t,"SplitButton",{enumerable:!0,get:function(){return h.SplitButton}});var m=n(906);Object.defineProperty(t,"RemoveButton",{enumerable:!0,get:function(){return m.RemoveButton}});var b=n(904);Object.defineProperty(t,"DEFAULT_CONTROLS_WITH_CREATION",{enumerable:!0,get:function(){return b.DEFAULT_CONTROLS_WITH_CREATION}}),Object.defineProperty(t,"DEFAULT_CONTROLS_WITHOUT_CREATION",{enumerable:!0,get:function(){return b.DEFAULT_CONTROLS_WITHOUT_CREATION}})},950:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Mosaic=t.MosaicWithoutDragDropContext=void 0;var c=i(n(50)),l=(i(n(951)),i(n(129)),i(n(952)),i(n(0))),u=n(495),s=i(n(422)),f=i(n(418)),p=n(954),d=n(879),h=n(957),m=n(902),b=n(963),y=n(885);n(881);function v(e){return null!=e.initialValue}var g=function(e){function t(){var t,n=e.apply(this,arguments)||this;return n.state={currentNode:null,lastInitialValue:null,mosaicId:null!==(t=n.props.mosaicId)&&void 0!==t?t:p.v4()},n.updateRoot=function(e,t){void 0===t&&(t=!1);var r=n.getRoot()||{};n.replaceRoot(y.updateTree(r,e),t)},n.replaceRoot=function(e,t){void 0===t&&(t=!1),n.props.onChange(e),!t&&n.props.onRelease&&n.props.onRelease(e),v(n.props)&&n.setState({currentNode:e})},n.actions={updateTree:n.updateRoot,remove:function(e){0===e.length?n.replaceRoot(null):n.updateRoot([y.createRemoveUpdate(n.getRoot(),e)])},expand:function(e,t){return void 0===t&&(t=70),n.updateRoot([y.createExpandUpdate(e,t)])},getRoot:function(){return n.getRoot()},hide:function(e){return n.updateRoot([y.createHideUpdate(e)])},replaceWith:function(e,t){return n.updateRoot([{path:e,spec:{$set:t}}])}},n.childContext={mosaicActions:n.actions,mosaicId:n.state.mosaicId},n}return o(t,e),t.getDerivedStateFromProps=function(e,t){return e.mosaicId&&(t.mosaicId,e.mosaicId),v(e)&&e.initialValue!==t.lastInitialValue?{lastInitialValue:e.initialValue,currentNode:e.initialValue}:null},t.prototype.render=function(){var e=this.props.className;return l.default.createElement(d.MosaicContext.Provider,{value:this.childContext},l.default.createElement("div",{className:c.default(e,"mosaic mosaic-drop-target")},this.renderTree(),l.default.createElement(b.RootDropTargets,null)))},t.prototype.getRoot=function(){return v(this.props)?this.state.currentNode:this.props.value},t.prototype.renderTree=function(){var e=this.getRoot();if(this.validateTree(e),null==e)return this.props.zeroStateView;var t=this.props,n=t.renderTile,r=t.resize;return l.default.createElement(h.MosaicRoot,{root:e,renderTile:n,resize:r})},t.prototype.validateTree=function(e){},t.defaultProps={onChange:function(){},zeroStateView:l.default.createElement(m.MosaicZeroState,null),className:"mosaic-blueprint-theme"},t}(l.default.PureComponent);t.MosaicWithoutDragDropContext=g;var w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return l.default.createElement(u.DndProvider,{backend:s.default,options:f.default},l.default.createElement(g,a({},this.props)))},t}(l.default.PureComponent);t.Mosaic=w},951:function(e,t,n){var r=n(225),o=n(506),a=Object.prototype.hasOwnProperty,i=o((function(e,t,n){a.call(e,n)?++e[n]:r(e,n,1)}));e.exports=i},952:function(e,t,n){var r=n(128),o=n(159),a=n(953),i=n(297);e.exports=function(e,t){if(null==e)return{};var n=r(i(e),(function(e){return[e]}));return t=o(t),a(e,n,(function(e,n){return t(e,n[0])}))}},953:function(e,t,n){var r=n(160),o=n(300),a=n(138);e.exports=function(e,t,n){for(var i=-1,c=t.length,l={};++i<c;){var u=t[i],s=r(e,u);n(s,u)&&o(l,a(u,e),s)}return l}},954:function(e,t,n){var r=n(955),o=n(956),a=o;a.v1=r,a.v4=o,e.exports=a},955:function(e,t,n){var r,o,a=n(899),i=n(900),c=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,s=t||[],f=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==p){var d=a();null==f&&(f=r=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==p&&(p=o=16383&(d[6]<<8|d[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:l+1,b=h-c+(m-l)/1e4;if(b<0&&void 0===e.clockseq&&(p=p+1&16383),(b<0||h>c)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,l=m,o=p;var y=(1e4*(268435455&(h+=122192928e5))+m)%4294967296;s[u++]=y>>>24&255,s[u++]=y>>>16&255,s[u++]=y>>>8&255,s[u++]=255&y;var v=h/4294967296*1e4&268435455;s[u++]=v>>>8&255,s[u++]=255&v,s[u++]=v>>>24&15|16,s[u++]=v>>>16&255,s[u++]=p>>>8|128,s[u++]=255&p;for(var g=0;g<6;++g)s[u+g]=f[g];return t||i(s)}},956:function(e,t,n){var r=n(899),o=n(900);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var c=0;c<16;++c)t[a+c]=i[c];return t||o(i)}},957:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicRoot=void 0;var c=i(n(12)),l=i(n(0)),u=n(879),s=n(958),f=n(901),p=n(881),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onResize=function(e,n,r){t.context.mosaicActions.updateTree([{path:n,spec:{splitPercentage:{$set:e}}}],r)},t}return o(t,e),t.prototype.render=function(){var e=this.props.root;return l.default.createElement("div",{className:"mosaic-root"},this.renderRecursively(e,f.BoundingBox.empty(),[]))},t.prototype.renderRecursively=function(e,t,n){if(p.isParent(e)){var r=null==e.splitPercentage?50:e.splitPercentage,o=f.BoundingBox.split(t,r,e.direction),i=o.first,u=o.second;return c.default([this.renderRecursively(e.first,i,n.concat("first")),this.renderSplit(e.direction,t,r,n),this.renderRecursively(e.second,u,n.concat("second"))].filter(h))}return l.default.createElement("div",{key:e,className:"mosaic-tile",style:a({},f.BoundingBox.asStyles(t))},this.props.renderTile(e,n))},t.prototype.renderSplit=function(e,t,n,r){var o=this,i=this.props.resize;return"DISABLED"!==i?l.default.createElement(s.Split,a({key:r.join(",")+"splitter"},i,{boundingBox:t,splitPercentage:n,direction:e,onChange:function(e){return o.onResize(e,r,!0)},onRelease:function(e){return o.onResize(e,r,!1)}})):null},t.contextType=u.MosaicContext,t}(l.default.PureComponent);function h(e){return null!==e}t.MosaicRoot=d},958:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Split=void 0;var c=i(n(50)),l=i(n(959)),u=i(n(961)),s=i(n(0)),f=n(901),p={capture:!0,passive:!1},d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElement=s.default.createRef(),t.listenersBound=!1,t.onMouseDown=function(e){(h(e)||0===e.button)&&(e.preventDefault(),t.bindListeners())},t.onMouseUp=function(e){t.unbindListeners();var n=t.calculateRelativePercentage(e);t.props.onRelease(n)},t.onMouseMove=function(e){e.preventDefault(),e.stopPropagation(),t.throttledUpdatePercentage(e)},t.throttledUpdatePercentage=u.default((function(e){var n=t.calculateRelativePercentage(e);n!==t.props.splitPercentage&&t.props.onChange(n)}),1e3/30),t}return o(t,e),t.prototype.render=function(){var e=this.props.direction;return s.default.createElement("div",{className:c.default("mosaic-split",{"-row":"row"===e,"-column":"column"===e}),ref:this.rootElement,onMouseDown:this.onMouseDown,style:this.computeStyle()},s.default.createElement("div",{className:"mosaic-split-line"}))},t.prototype.componentDidMount=function(){this.rootElement.current.addEventListener("touchstart",this.onMouseDown,p)},t.prototype.componentWillUnmount=function(){this.unbindListeners(),this.rootElement.current&&this.rootElement.current.ownerDocument.removeEventListener("touchstart",this.onMouseDown,p)},t.prototype.bindListeners=function(){this.listenersBound||(this.rootElement.current.ownerDocument.addEventListener("mousemove",this.onMouseMove,!0),this.rootElement.current.ownerDocument.addEventListener("touchmove",this.onMouseMove,p),this.rootElement.current.ownerDocument.addEventListener("mouseup",this.onMouseUp,!0),this.rootElement.current.ownerDocument.addEventListener("touchend",this.onMouseUp,!0),this.listenersBound=!0)},t.prototype.unbindListeners=function(){this.rootElement.current&&(this.rootElement.current.ownerDocument.removeEventListener("mousemove",this.onMouseMove,!0),this.rootElement.current.ownerDocument.removeEventListener("touchmove",this.onMouseMove,p),this.rootElement.current.ownerDocument.removeEventListener("mouseup",this.onMouseUp,!0),this.rootElement.current.ownerDocument.removeEventListener("touchend",this.onMouseUp,!0),this.listenersBound=!1)},t.prototype.computeStyle=function(){var e,t=this.props,n=t.boundingBox,r=t.direction,o=t.splitPercentage,i="column"===r?"top":"left",c=f.BoundingBox.getAbsoluteSplitPercentage(n,o,r);return a(a({},f.BoundingBox.asStyles(n)),((e={})[i]=c+"%",e))},t.prototype.calculateRelativePercentage=function(e){var t,n=this.props,r=n.minimumPaneSizePercentage,o=n.direction,a=n.boundingBox,i=this.rootElement.current.parentElement.getBoundingClientRect(),c=h(e)?e.changedTouches[0]:e;t="column"===o?(c.clientY-i.top)/i.height*100:(c.clientX-i.left)/i.width*100;var u=f.BoundingBox.getRelativeSplitPercentage(a,t,o);return l.default(u,r,100-r)},t.defaultProps={onChange:function(){},onRelease:function(){},minimumPaneSizePercentage:20},t}(s.default.PureComponent);function h(e){return null!=e.changedTouches}t.Split=d},959:function(e,t,n){var r=n(960),o=n(298);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=o(n))==n?n:0),void 0!==t&&(t=(t=o(t))==t?t:0),r(o(e),t,n)}},960:function(e,t){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},961:function(e,t,n){var r=n(294),o=n(52);e.exports=function(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),r(e,t,{leading:a,maxWait:t,trailing:i})}},962:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNever=void 0,t.assertNever=function(e){throw new Error("Unhandled case: "+JSON.stringify(e))}},963:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RootDropTargets=void 0;var i=a(n(50)),c=a(n(299)),l=a(n(0)),u=n(495),s=n(889),f=n(903),p=n(886),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return l.default.createElement("div",{className:i.default("drop-target-container",{"-dragging":this.props.isDragging})},c.default(s.MosaicDropTargetPosition).map((function(e){return l.default.createElement(f.MosaicDropTarget,{position:e,path:[],key:e})})))},t}(l.default.PureComponent);t.RootDropTargets=u.DropTarget(p.MosaicDragType.WINDOW,{},(function(e,t){return{isDragging:null!==t.getItem()&&t.getItemType()===p.MosaicDragType.WINDOW}}))(d)},964:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MosaicWindow=t.SourceDropConnectedInternalMosaicWindow=t.SourceConnectedInternalMosaicWindow=t.InternalMosaicWindow=void 0;var c=i(n(50)),l=i(n(965)),u=i(n(888)),s=i(n(154)),f=i(n(286)),p=i(n(299)),d=i(n(0)),h=n(495),m=n(904),b=n(909),y=n(879),v=n(889),g=n(903),w=n(886),O=n(885),j=n(881),E=n(880),C=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={additionalControlsOpen:!1},t.rootElement=null,t.renderDropTarget=function(e){var n=t.props.path;return d.default.createElement(g.MosaicDropTarget,{position:e,path:n,key:e})},t.split=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.checkCreateNode();var r=t.props,o=r.createNode,a=r.path,i=t.context.mosaicActions,c=i.getRoot(),l=t.rootElement.offsetWidth>t.rootElement.offsetHeight?"row":"column";return Promise.resolve(o.apply(void 0,e)).then((function(e){return i.replaceWith(a,{direction:l,second:e,first:j.getAndAssertNodeAtPathExists(c,a)})}))},t.swap=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.checkCreateNode();var r=t.context.mosaicActions,o=t.props,a=o.createNode,i=o.path;return Promise.resolve(a.apply(void 0,e)).then((function(e){return r.replaceWith(i,e)}))},t.setAdditionalControlsOpen=function(e){t.setState({additionalControlsOpen:e})},t.getPath=function(){return t.props.path},t.connectDragSource=function(e){return(0,t.props.connectDragSource)(e)},t.childContext={mosaicWindowActions:{split:t.split,replaceWithNew:t.swap,setAdditionalControlsOpen:t.setAdditionalControlsOpen,getPath:t.getPath,connectDragSource:t.connectDragSource}},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.isOver,o=t.renderPreview,a=t.additionalControls,i=t.connectDropTarget,l=t.connectDragPreview,u=t.draggedMosaicId;return d.default.createElement(y.MosaicWindowContext.Provider,{value:this.childContext},i(d.default.createElement("div",{className:c.default("mosaic-window mosaic-drop-target",n,{"drop-target-hover":r&&u===this.context.mosaicId,"additional-controls-open":this.state.additionalControlsOpen}),ref:function(t){return e.rootElement=t}},this.renderToolbar(),d.default.createElement("div",{className:"mosaic-window-body"},this.props.children),d.default.createElement("div",{className:"mosaic-window-body-overlay",onClick:function(){return e.setAdditionalControlsOpen(!1)}}),d.default.createElement("div",{className:"mosaic-window-additional-actions-bar"},a),l(o(this.props)),d.default.createElement("div",{className:"drop-target-container"},p.default(v.MosaicDropTargetPosition).map(this.renderDropTarget)))))},t.prototype.getToolbarControls=function(){var e=this.props,t=e.toolbarControls,n=e.createNode;return t||(n?m.DEFAULT_CONTROLS_WITH_CREATION:m.DEFAULT_CONTROLS_WITHOUT_CREATION)},t.prototype.renderToolbar=function(){var e,t=this,n=this.props,r=n.title,o=n.draggable,a=n.additionalControls,i=n.additionalControlButtonText,l=n.path,u=n.renderToolbar,f=this.state.additionalControlsOpen,p=this.getToolbarControls(),h=o&&l.length>0,m=h?this.props.connectDragSource:function(e){return e};if(u){var y=m(u(this.props,o));return d.default.createElement("div",{className:c.default("mosaic-window-toolbar",{draggable:h})},y)}var v=m(d.default.createElement("div",{title:r,className:"mosaic-window-title"},r)),g=!s.default(a);return d.default.createElement("div",{className:c.default("mosaic-window-toolbar",{draggable:h})},v,d.default.createElement("div",{className:c.default("mosaic-window-controls",E.OptionalBlueprint.getClasses("BUTTON_GROUP"))},g&&d.default.createElement("button",{onClick:function(){return t.setAdditionalControlsOpen(!f)},className:c.default(E.OptionalBlueprint.getClasses("BUTTON","MINIMAL"),E.OptionalBlueprint.getIconClass("MORE"),(e={},e[E.OptionalBlueprint.getClasses("ACTIVE")]=f,e))},d.default.createElement("span",{className:"control-text"},i)),g&&d.default.createElement(b.Separator,null),p))},t.prototype.checkCreateNode=function(){if(null==this.props.createNode)throw new Error("Operation invalid unless `createNode` is defined")},t.defaultProps={additionalControlButtonText:"More",draggable:!0,renderPreview:function(e){var t=e.title;return d.default.createElement("div",{className:"mosaic-preview"},d.default.createElement("div",{className:"mosaic-window-toolbar"},d.default.createElement("div",{className:"mosaic-window-title"},t)),d.default.createElement("div",{className:"mosaic-window-body"},d.default.createElement("h4",null,t),d.default.createElement(E.OptionalBlueprint.Icon,{iconSize:72,icon:"application"})))},renderToolbar:null},t.contextType=y.MosaicContext,t}(d.default.Component);t.InternalMosaicWindow=C;var k={beginDrag:function(e,t,n){e.onDragStart&&e.onDragStart();var r=l.default((function(){return n.context.mosaicActions.hide(n.props.path)}));return{mosaicId:n.context.mosaicId,hideTimer:r}},endDrag:function(e,t,n){var r=t.getItem().hideTimer;window.clearTimeout(r);var o=n.props.path,a=t.getDropResult()||{},i=n.context.mosaicActions,c=a.position,l=a.path;null==c||null==l||f.default(l,o)?(i.updateTree([{path:u.default(o),spec:{splitPercentage:{$set:null}}}]),e.onDragEnd&&e.onDragEnd("reset")):(i.updateTree(O.createDragToUpdates(i.getRoot(),o,l,c)),e.onDragEnd&&e.onDragEnd("drop"))}};t.SourceConnectedInternalMosaicWindow=h.DragSource(w.MosaicDragType.WINDOW,k,(function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview()}}))(C),t.SourceDropConnectedInternalMosaicWindow=h.DropTarget(w.MosaicDragType.WINDOW,{},(function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),draggedMosaicId:(t.getItem()||{}).mosaicId}}))(t.SourceConnectedInternalMosaicWindow);var P=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return o(n,e),n.prototype.render=function(){return d.default.createElement(t.SourceDropConnectedInternalMosaicWindow,a({},this.props))},n}(d.default.PureComponent);t.MosaicWindow=P},965:function(e,t,n){var r=n(966),o=n(285)((function(e,t){return r(e,1,t)}));e.exports=o},966:function(e,t){e.exports=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}},989:function(e,t,n){"use strict";n.r(t);var r=n(11),o=n(13),a=n(876),i=n(18),c=n(7),l=n(15),u=n(0),s=n.n(u),f=n(50),p=n.n(f),d=n(108),h=n.n(d),m=n(850),b=n(855),y=n(854),v=n(97),g=n(856),w=n(857),O=n(858);function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(a,e);var t,n,r,o=k(a);function a(){return j(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.error,n=e.removeError,r=e.t,o=!h()(t);return t?s.a.createElement(m.a,{"aria-labelledby":"error-dialog-title",id:"error-dialog",onClose:function(){return n(t.id)},open:o},s.a.createElement(y.a,{id:"error-dialog-title",disableTypography:!0},s.a.createElement(v.a,{variant:"h2"},r("errorDialogTitle"))),s.a.createElement(b.a,{disableTypography:!0},s.a.createElement(g.a,{variant:"body2",noWrap:!0,color:"inherit"},"".concat(t.message)),s.a.createElement(w.a,null,s.a.createElement(O.a,{onClick:function(){return n(t.id)},variant:"contained"},r("errorDialogConfirm"))))):null}}])&&E(t.prototype,n),r&&E(t,r),a}(u.Component);x.defaultProps={error:null,removeError:function(){},t:function(e){return e}};var R=n(385),I=n(192),T={removeError:R.b},S=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{error:Object(I.c)(e)}}),T),Object(l.a)("ErrorDialog"))(x),M=n(1),D=n(5),B=(n(2),n(4)),N=n(14),A=n(485),W=u.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,a=void 0===o?"primary":o,i=e.position,c=void 0===i?"fixed":i,l=Object(D.a)(e,["classes","className","color","position"]);return u.createElement(A.a,Object(M.a)({square:!0,component:"header",elevation:4,className:Object(B.a)(n.root,n["position".concat(Object(N.a)(c))],n["color".concat(Object(N.a)(a))],r,"fixed"===c&&"mui-fixed"),ref:t},l))})),L=Object(c.a)((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}}),{name:"MuiAppBar"})(W),z=n(862),H=n(853),V=n(142),F=n.n(V),U=n(53),Z=(n(312),n(486));function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(Z.a)(),r=Object(H.a)({theme:n,name:"MuiUseMediaQuery",props:{}});var o="function"==typeof e?e(n):e;o=o.replace(/^@media( ?)/m,"");var a="undefined"!=typeof window&&void 0!==window.matchMedia,i=Object(M.a)({},r,t),c=i.defaultMatches,l=void 0!==c&&c,s=i.matchMedia,f=void 0===s?a?window.matchMedia:null:s,p=i.noSsr,d=void 0!==p&&p,h=i.ssrMatchMedia,m=void 0===h?null:h,b=u.useState((function(){return d&&a?f(o).matches:m?m(o).matches:l})),y=b[0],v=b[1];return u.useEffect((function(){var e=!0;if(a){var t=f(o),n=function(){e&&v(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[o,f,a]),y}var q="undefined"==typeof window?u.useEffect:u.useLayoutEffect,G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.withTheme,r=void 0!==n&&n,o=e.noSSR,a=void 0!==o&&o,i=e.initialWidth;function c(e){var n=Object(U.a)(),o=e.theme||n,c=Object(H.a)({theme:o,name:"MuiWithWidth",props:Object(M.a)({},e)}),l=c.initialWidth,s=c.width,f=Object(D.a)(c,["initialWidth","width"]),p=u.useState(!1),d=p[0],h=p[1];q((function(){h(!0)}),[]);var m=o.breakpoints.keys.slice().reverse().reduce((function(e,t){var n=$(o.breakpoints.up(t));return!e&&n?t:e}),null),b=Object(M.a)({width:s||(d||a?m:void 0)||l||i},r?{theme:o}:{},f);return void 0===b.width?null:u.createElement(t,b)}return F()(c,t),c}},J=n(389),Y=n(27),X=n(218),K=u.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,a=e.color,i=void 0===a?"default":a,c=e.component,l=void 0===c?"button":c,s=e.disabled,f=void 0!==s&&s,p=e.disableFocusRipple,d=void 0!==p&&p,h=e.focusVisibleClassName,m=e.size,b=void 0===m?"large":m,y=e.variant,v=void 0===y?"round":y,g=Object(D.a)(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return u.createElement(X.a,Object(M.a)({className:Object(B.a)(r.root,o,"round"!==v&&r.extended,"large"!==b&&r["size".concat(Object(N.a)(b))],f&&r.disabled,{primary:r.primary,secondary:r.secondary,inherit:r.colorInherit}[i]),component:l,disabled:f,focusRipple:!d,focusVisibleClassName:Object(B.a)(r.focusVisible,h),ref:t},g),u.createElement("span",{className:r.label},n))})),Q=Object(c.a)((function(e){return{root:Object(M.a)({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(K),ee=n(807),te=n(890),ne=n.n(te),re=n(293),oe=n.n(re);function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ue(this,n)}}function ue(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ce(e,t)}(a,e);var t,n,r,o=le(a);function a(){return ae(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=e.setWorkspaceAddVisibility,o=e.isWorkspaceAddVisible,a=e.useExtendedFab;return s.a.createElement(ee.a,{title:n(o?"closeAddResourceMenu":"addResource")},s.a.createElement(Q,{size:"medium",color:"primary",id:"addBtn",disableRipple:!0,"aria-label":o?n("closeAddResourceMenu"):a&&n("startHere")||n("addResource"),className:t.fab,classes:{primary:t.fabPrimary,secondary:t.fabSecondary},variant:a?"extended":"round",onClick:function(){r(!o)}},o?s.a.createElement(oe.a,null):s.a.createElement(ne.a,null),a&&n("startHere")))}}])&&ie(t.prototype,n),r&&ie(t,r),a}(u.Component);fe.defaultProps={isWorkspaceAddVisible:!1,t:function(e){return e}};var pe={setWorkspaceAddVisibility:J.a},de=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{fab:{margin:e.spacing(1)},fabPrimary:{"&:focus":{backgroundColor:e.palette.primary.dark}},fabSecondary:{"&:focus":{backgroundColor:e.palette.secondary.dark}}}})),G(),Object(o.b)((function(e,t){var n=t.width,r=Object(Y.i)(e).isWorkspaceAddVisible;return{isWorkspaceAddVisible:r,useExtendedFab:"xs"!==n&&!r&&0===Object(Y.f)(e).length}}),pe),Object(l.a)("WorkspaceAddButton"))(fe),he=n(931),me=n.n(he),be=n(930),ye=n.n(be),ve=n(51);function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function we(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function je(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ce(e);if(t){var o=Ce(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ce(e){return(Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oe(e,t)}(a,e);var t,n,r,o=je(a);function a(){return ge(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.isFullscreenEnabled,r=e.setWorkspaceFullscreen,o=e.t;return s.a.createElement(ve.a,{className:t,"aria-label":o(n?"exitFullScreen":"workspaceFullScreen"),onClick:function(){return r(!n)}},n?s.a.createElement(ye.a,null):s.a.createElement(me.a,null))}}])&&we(t.prototype,n),r&&we(t,r),a}(u.Component);ke.defaultProps={className:void 0,isFullscreenEnabled:!1,t:function(e){return e}};var Pe={setWorkspaceFullscreen:J.b},_e=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{isFullscreenEnabled:Object(I.b)(e)}}),Pe),Object(l.a)("FullScreenButton"))(ke),xe=n(918),Re=n.n(xe),Ie=n(77),Te=n(455),Se=n(859),Me=n(193),De=n(860),Be=n(861),Ne=n(920),Ae=n.n(Ne);function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fe(e);if(t){var o=Fe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ve(this,n)}}function Ve(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}(a,e);var t,n,r,o=He(a);function a(){return We(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.handleClick,n=e.languages;return s.a.createElement(s.a.Fragment,null,n.map((function(e){return s.a.createElement(Se.a,{button:!e.current,key:e.locale,onClick:function(){t(e.locale)}},s.a.createElement(De.a,null,e.current&&s.a.createElement(Ae.a,null)),s.a.createElement(Be.a,{primaryTypographyProps:{variant:"body1"}},e.label))})))}}])&&Le(t.prototype,n),r&&Le(t,r),a}(u.Component),Ze=Object(r.compose)(Object(o.b)((function(e){return{languages:Object(Ie.d)(e)}}),(function(e,t){var n=t.afterSelect;return{handleClick:function(t){e(Me.d({language:t})),n&&n()}}})),Object(l.a)("LanguageSettings"))(Ue),$e=n(919),qe=n.n($e),Ge=n(891),Je=n.n(Ge),Ye=["children","icon","label"];function Xe(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var o=rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}function tt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?nt(e):t}function nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ot=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qe(e,t)}(a,e);var t,n,r,o=et(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={nestedMenuIsOpen:!1},t.handleMenuClick=t.handleMenuClick.bind(nt(t)),t}return t=a,(n=[{key:"handleMenuClick",value:function(){var e=this.state.nestedMenuIsOpen;this.setState({nestedMenuIsOpen:!e})}},{key:"render",value:function(){var e=this.state.nestedMenuIsOpen,t=this.props,n=t.children,r=t.icon,o=t.label,a=Xe(t,Ye);return s.a.createElement(s.a.Fragment,null,s.a.createElement(Se.a,Object.assign({onClick:this.handleMenuClick,divider:e},a),r&&s.a.createElement(De.a,null,r),s.a.createElement(Be.a,{primaryTypographyProps:{variant:"body1"}},o),e?s.a.createElement(qe.a,null):s.a.createElement(Je.a,null)),e&&n)}}])&&Ke(t.prototype,n),r&&Ke(t,r),a}(u.Component);ot.defaultProps={icon:null};var at=n(802),it=u.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.raised,a=void 0!==o&&o,i=Object(D.a)(e,["classes","className","raised"]);return u.createElement(A.a,Object(M.a)({className:Object(B.a)(n.root,r),elevation:a?8:1,ref:t},i))})),ct=Object(c.a)({root:{overflow:"hidden"}},{name:"MuiCard"})(it),lt=u.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,a=void 0===o?"div":o,i=Object(D.a)(e,["classes","className","component"]);return u.createElement(a,Object(M.a)({className:Object(B.a)(n.root,r),ref:t},i))})),ut=Object(c.a)({root:{padding:16,"&:last-child":{paddingBottom:24}}},{name:"MuiCardContent"})(lt),st=n(488);function ft(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"90",viewBox:"0 0 300 225"},s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"linear-gradient",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},s.a.createElement("stop",{offset:"0"}),s.a.createElement("stop",{offset:"0.14",stopOpacity:"0.631"}),s.a.createElement("stop",{offset:"1",stopOpacity:"0"})),s.a.createElement("linearGradient",{id:"linear-gradient-2",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},s.a.createElement("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0"}),s.a.createElement("stop",{offset:"0.23",stopColor:"#fff",stopOpacity:"0.012"}),s.a.createElement("stop",{offset:"0.36",stopColor:"#fff",stopOpacity:"0.039"}),s.a.createElement("stop",{offset:"0.47",stopColor:"#fff",stopOpacity:"0.102"}),s.a.createElement("stop",{offset:"0.57",stopColor:"#fff",stopOpacity:"0.18"}),s.a.createElement("stop",{offset:"0.67",stopColor:"#fff",stopOpacity:"0.278"}),s.a.createElement("stop",{offset:"0.75",stopColor:"#fff",stopOpacity:"0.412"}),s.a.createElement("stop",{offset:"0.83",stopColor:"#fff",stopOpacity:"0.561"}),s.a.createElement("stop",{offset:"0.91",stopColor:"#fff",stopOpacity:"0.741"}),s.a.createElement("stop",{offset:"0.98",stopColor:"#fff",stopOpacity:"0.929"}),s.a.createElement("stop",{offset:"1",stopColor:"#fff"})),s.a.createElement("clipPath",{id:"clip-elastic_icon"},s.a.createElement("rect",{width:"300",height:"225"}))),s.a.createElement("g",{id:"elastic_icon","data-name":"elastic icon",clipPath:"url(#clip-elastic_icon)"},s.a.createElement("rect",{width:"300",height:"225",fill:"#fff"}),s.a.createElement("g",{id:"Rectangle_278","data-name":"Rectangle 278",transform:"translate(232 159)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"54",height:"54",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"53",height:"53",fill:"none"})),s.a.createElement("g",{id:"Rectangle_8","data-name":"Rectangle 8",transform:"translate(7 148)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"70",height:"70",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"69",height:"69",fill:"none"})),s.a.createElement("g",{id:"Rectangle_258","data-name":"Rectangle 258",transform:"translate(224 6)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"70",height:"100",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"69",height:"99",fill:"none"})),s.a.createElement("g",{id:"Rectangle_259","data-name":"Rectangle 259",transform:"translate(71 64)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"115",height:"75",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"114",height:"74",fill:"none"})),s.a.createElement("g",{id:"Rectangle_260","data-name":"Rectangle 260",transform:"translate(99 87)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"115",height:"75",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"114",height:"74",fill:"none"})),s.a.createElement("g",{id:"Group_689","data-name":"Group 689"},s.a.createElement("g",{id:"Group_687","data-name":"Group 687",transform:"translate(0 3)"},s.a.createElement("path",{id:"checkbox",d:"M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",transform:"translate(1.164 -1.063)",fill:"#010101",fillRule:"evenodd",opacity:"0.246"}),s.a.createElement("g",{id:"Path_821","data-name":"Path 821",transform:"translate(40 36)",fill:"none"},s.a.createElement("path",{d:"M0,0H220V147H0Z",stroke:"none"}),s.a.createElement("path",{d:"M 2 2 L 2 145 L 218 145 L 218 2 L 172.9869689941406 2 L 2 2 M 0 0 L 172.9869689941406 0 L 220 0 L 220 147 L 0 147 L 0 0 Z",stroke:"none",fill:"#01579b"}))),s.a.createElement("g",{id:"Rectangle_257","data-name":"Rectangle 257",transform:"translate(40 39)",fill:"#fff",stroke:"#01579b",strokeWidth:"2"},s.a.createElement("rect",{width:"20",height:"147",stroke:"none"}),s.a.createElement("rect",{x:"1",y:"1",width:"18",height:"145",fill:"none"})),s.a.createElement("g",{id:"Group_688","data-name":"Group 688",transform:"translate(-27.5 -126)"},s.a.createElement("circle",{id:"teal_circle","data-name":"teal circle",cx:"7.5",cy:"7.5",r:"7.5",transform:"translate(70 171)",fill:"#009688"}),s.a.createElement("g",{id:"Group_333","data-name":"Group 333",transform:"translate(70 171)",opacity:"0.12"},s.a.createElement("path",{id:"gradient_border_2","data-name":"gradient border 2",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient)"}),s.a.createElement("path",{id:"gradient_border_1","data-name":"gradient border 1",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient-2)"})))))))}function pt(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"90",viewBox:"0 0 300 225"},s.a.createElement("defs",null,s.a.createElement("linearGradient",{id:"linear-gradient",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},s.a.createElement("stop",{offset:"0"}),s.a.createElement("stop",{offset:"0.14",stopOpacity:"0.631"}),s.a.createElement("stop",{offset:"1",stopOpacity:"0"})),s.a.createElement("linearGradient",{id:"linear-gradient-2",x1:"0.5",y1:"1",x2:"0.5",gradientUnits:"objectBoundingBox"},s.a.createElement("stop",{offset:"0",stopColor:"#fff",stopOpacity:"0"}),s.a.createElement("stop",{offset:"0.23",stopColor:"#fff",stopOpacity:"0.012"}),s.a.createElement("stop",{offset:"0.36",stopColor:"#fff",stopOpacity:"0.039"}),s.a.createElement("stop",{offset:"0.47",stopColor:"#fff",stopOpacity:"0.102"}),s.a.createElement("stop",{offset:"0.57",stopColor:"#fff",stopOpacity:"0.18"}),s.a.createElement("stop",{offset:"0.67",stopColor:"#fff",stopOpacity:"0.278"}),s.a.createElement("stop",{offset:"0.75",stopColor:"#fff",stopOpacity:"0.412"}),s.a.createElement("stop",{offset:"0.83",stopColor:"#fff",stopOpacity:"0.561"}),s.a.createElement("stop",{offset:"0.91",stopColor:"#fff",stopOpacity:"0.741"}),s.a.createElement("stop",{offset:"0.98",stopColor:"#fff",stopOpacity:"0.929"}),s.a.createElement("stop",{offset:"1",stopColor:"#fff"})),s.a.createElement("clipPath",{id:"clip-mosaic_icon"},s.a.createElement("rect",{width:"300",height:"225"}))),s.a.createElement("g",{id:"mosaic_icon","data-name":"mosaic icon",clipPath:"url(#clip-mosaic_icon)"},s.a.createElement("rect",{width:"300",height:"225",fill:"#fff"}),s.a.createElement("path",{id:"checkbox",d:"M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",transform:"translate(1.163 1.938)",fill:"#010101",fillRule:"evenodd",opacity:"0.5"}),s.a.createElement("path",{id:"checkbox-2","data-name":"checkbox",d:"M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",transform:"translate(1.164 1.938)",fill:"#010101",fillRule:"evenodd",opacity:"0.246"}),s.a.createElement("g",{id:"Path_821","data-name":"Path 821",transform:"translate(40 39)",fill:"none"},s.a.createElement("path",{d:"M0,0H220V147H0Z",stroke:"none"}),s.a.createElement("path",{d:"M 2 2 L 2 145 L 218 145 L 218 2 L 172.9869689941406 2 L 2 2 M 0 0 L 172.9869689941406 0 L 220 0 L 220 147 L 0 147 L 0 0 Z",stroke:"none",fill:"#01579b"})),s.a.createElement("g",{id:"Rectangle_257","data-name":"Rectangle 257",transform:"translate(40 39)",fill:"#fff",stroke:"#01579b",strokeWidth:"2"},s.a.createElement("rect",{width:"20",height:"147",stroke:"none"}),s.a.createElement("rect",{x:"1",y:"1",width:"18",height:"145",fill:"none"})),s.a.createElement("g",{id:"Group_688","data-name":"Group 688",transform:"translate(-27.5 -126)"},s.a.createElement("circle",{id:"teal_circle","data-name":"teal circle",cx:"7.5",cy:"7.5",r:"7.5",transform:"translate(70 171)",fill:"#009688"}),s.a.createElement("g",{id:"Group_333","data-name":"Group 333",transform:"translate(70 171)",opacity:"0.12"},s.a.createElement("path",{id:"gradient_border_2","data-name":"gradient border 2",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient)"}),s.a.createElement("path",{id:"gradient_border_1","data-name":"gradient border 1",d:"M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",transform:"translate(-3403 -959)",fill:"url(#linear-gradient-2)"}))),s.a.createElement("g",{id:"Rectangle_270","data-name":"Rectangle 270",transform:"translate(60 40.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"99",height:"72",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"98",height:"71",fill:"none"})),s.a.createElement("g",{id:"Rectangle_271","data-name":"Rectangle 271",transform:"translate(159 40.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"99",height:"72",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"98",height:"71",fill:"none"})),s.a.createElement("g",{id:"Rectangle_272","data-name":"Rectangle 272",transform:"translate(192 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})),s.a.createElement("g",{id:"Rectangle_284","data-name":"Rectangle 284",transform:"translate(60 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})),s.a.createElement("g",{id:"Rectangle_285","data-name":"Rectangle 285",transform:"translate(126 112.647)",fill:"#88c6c3",stroke:"#707070",strokeWidth:"1",opacity:"0.747"},s.a.createElement("rect",{width:"66",height:"71.45",stroke:"none"}),s.a.createElement("rect",{x:"0.5",y:"0.5",width:"65",height:"70.45",fill:"none"})))))}var dt=["classes","className"];function ht(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function mt(e){var t=e.classes,n=e.className,r=ht(e,dt),o=[n,t.shadowScrollDialog].join(" ");return s.a.createElement(b.a,Object.assign({className:o},r))}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}mt.defaultProps={className:""};var yt=Object(c.a)((function(e){var t;return{shadowScrollDialog:(t={background:"linear-gradient(".concat(e.palette.background.paper," 30%, rgba(255, 255, 255, 0)), ")+"linear-gradient(rgba(255, 255, 255, 0), ".concat(e.palette.background.paper," 70%) 0 100%, ")+"radial-gradient(50% 0, farthest-side, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)), radial-gradient(50% 100%, farthest-side, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%,"},bt(t,"background","linear-gradient(".concat(e.palette.background.paper," 30%, rgba(255, 255, 255, 0)), ")+"linear-gradient(rgba(255, 255, 255, 0), ".concat(e.palette.background.paper," 70%) 0 100%, ")+"radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%;"),bt(t,"backgroundAttachment","local, local, scroll, scroll"),bt(t,"backgroundRepeat","no-repeat"),bt(t,"backgroundSize","100% 40px, 100% 40px, 100% 14px, 100% 14px"),bt(t,"overflowY","auto"),t)}}))(mt);function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Et(e);if(t){var o=Et(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ot(this,n)}}function Ot(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?jt(e):t}function jt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Et(e){return(Et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ct=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&>(e,t)}(a,e);var t,n,r,o=wt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).handleWorkspaceTypeChange=t.handleWorkspaceTypeChange.bind(jt(t)),t}return t=a,r=[{key:"setInitialFocus",value:function(e,t){var n=e.querySelectorAll('li[value="'.concat(t,'"]'));n&&0!==n.length&&n[0].focus()}}],(n=[{key:"handleWorkspaceTypeChange",value:function(e){var t=this.props,n=t.handleClose;(0,t.updateWorkspace)({type:e}),n()}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.container,o=t.handleClose,i=t.open,c=t.children,l=t.t,u=t.workspaceType;return s.a.createElement(m.a,{"aria-labelledby":"workspace-selection-dialog-title",container:r,id:"workspace-selection-dialog",onClose:o,onEntered:function(e){return a.setInitialFocus(e,u)},onEscapeKeyDown:o,open:i},s.a.createElement(y.a,{id:"workspace-selection-dialog-title",disableTypography:!0},s.a.createElement(v.a,{variant:"h2"},l("workspaceSelectionTitle"))),s.a.createElement(yt,null,c,s.a.createElement(at.a,{classes:{root:n.list},selected:u},s.a.createElement(Se.a,{className:n.menuItem,onClick:function(){return e.handleWorkspaceTypeChange("elastic")},selected:"elastic"===u,value:"elastic"},s.a.createElement(ct,{className:n.card},s.a.createElement(ft,{className:n.svgIcon,viewBox:"0 0 120 90"}),s.a.createElement("div",{className:n.details},s.a.createElement(ut,{classes:{root:n.root},className:n.content},s.a.createElement(v.a,{className:n.headline,component:"p",variant:"h3"},l("elastic")),s.a.createElement(v.a,{variant:"body1"},l("elasticDescription")))))),s.a.createElement(Se.a,{className:n.menuItem,onClick:function(){return e.handleWorkspaceTypeChange("mosaic")},selected:"mosaic"===u,value:"mosaic"},s.a.createElement(ct,{className:n.card},s.a.createElement(pt,{className:n.svgIcon,viewBox:"0 0 120 90"}),s.a.createElement("div",{className:n.details},s.a.createElement(ut,{className:n.content,classes:{root:n.root}},s.a.createElement(v.a,{className:n.headline,component:"p",variant:"h3"},l("mosaic")),s.a.createElement(v.a,{variant:"body1"},l("mosaicDescription")))))))))}}])&&vt(t.prototype,n),r&&vt(t,r),a}(u.Component);Ct.defaultProps={children:null,container:null,open:!1,t:function(e){return e}};var kt={updateWorkspace:J.g},Pt=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{card:{backgroundColor:"transparent",borderRadius:"0",boxShadow:"0 0 transparent",display:"flex"},content:{flex:"1 0 auto"},details:{display:"flex",flexDirection:"column"},headline:{paddingBottom:"6px"},list:{"&active":{outline:"none"},"&focus":{outline:"none"},outline:"none"},media:{flex:"0 0 120px",height:"90px"},menuItem:{height:"auto",overflow:"auto",whiteSpace:"inherit"},root:{"&:last-child":{paddingBottom:"12px"},paddingBottom:0,paddingTop:0,textAlign:"left"},svgIcon:{flexShrink:0,height:"90px",width:"120px"}}})),Object(o.b)((function(e){return{workspaceType:Object(I.d)(e)}}),kt),Object(l.a)("WorkspaceSelectionDialog"))(Ct),_t=n(39),xt=n(921),Rt=n.n(xt);function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tt(e,t){return(Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function St(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bt(e);if(t){var o=Bt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Mt(this,n)}}function Mt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Dt(e):t}function Dt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bt(e){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}(a,e);var t,n,r,o=St(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).selectedItemRef=s.a.createRef(),t.handleThemeChange=t.handleThemeChange.bind(Dt(t)),t}return t=a,r=[{key:"setInitialFocus",value:function(e,t){var n=e.querySelectorAll('li[value="'.concat(t,'"]'));n&&0!==n.length&&n[0].focus()}}],(n=[{key:"handleThemeChange",value:function(e){var t=this.props,n=t.setSelectedTheme,r=t.handleClose;n(e),r()}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.handleClose,o=t.open,i=t.selectedTheme,c=t.t,l=t.themeIds;return s.a.createElement(m.a,{onClose:r,onEntered:function(e){return a.setInitialFocus(e,i)},open:o},s.a.createElement(y.a,{id:"change-the-dialog-title",disableTypography:!0},s.a.createElement(v.a,{variant:"h2"},c("changeTheme"))),s.a.createElement(b.a,{className:n.dialogContent},s.a.createElement(at.a,null,l.map((function(t){return s.a.createElement(Se.a,{key:t,className:n.listitem,onClick:function(){e.handleThemeChange(t)},selected:t===i,value:t},s.a.createElement(De.a,null,s.a.createElement(Rt.a,{className:n[t]})),s.a.createElement(Be.a,null,c(t)))})))))}}])&&It(t.prototype,n),r&&It(t,r),a}(u.Component);Nt.defaultProps={open:!1,themeIds:[]};var At=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{dark:{color:"#000000"},dialogContent:{padding:0},light:{color:"#BDBDBD"},listitem:{"&:focus":{backgroundColor:e.palette.action.focus},"&:hover":{backgroundColor:e.palette.action.hover},cursor:"pointer"}}})),Object(o.b)((function(e){return{selectedTheme:Object(Ie.a)(e).selectedTheme,themeIds:Object(Ie.i)(e)}}),(function(e,t){t.windowId;return{setSelectedTheme:function(t){return e(Me.d({selectedTheme:t}))}}})),Object(l.a)("ChangeThemeDialog"))(Nt),Wt=n(98);function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var o=Ut(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Vt(this,n)}}function Vt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Ft(e):t}function Ft(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zt(e,t)}(a,e);var t,n,r,o=Ht(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={changeTheme:{},toggleZoom:{},workspaceSelection:{}},t.handleMenuItemClick=t.handleMenuItemClick.bind(Ft(t)),t.handleMenuItemClose=t.handleMenuItemClose.bind(Ft(t)),t}return t=a,(n=[{key:"handleMenuItemClick",value:function(e,t){var n={};n[e]={},n[e].open=!0,n[e].anchorEl=t.currentTarget,this.setState(n)}},{key:"handleMenuItemClose",value:function(e){var t=this;return function(n){var r={};r[e]={},r[e].open=!1,r[e].anchorEl=null,t.setState(r)}}},{key:"handleZoomToggleClick",value:function(){var e=this.props;(0,e.toggleZoomControls)(!e.showZoomControls)}},{key:"render",value:function(){var e=this,t=this.props,n=t.containerId,r=t.handleClose,o=t.anchorEl,a=t.showThemePicker,i=t.isWorkspaceAddVisible,c=t.t,l=t.showZoomControls,u=this.state,f=u.changeTheme,p=u.toggleZoom,d=u.workspaceSelection,h=document.querySelector("#".concat(n," .").concat(Object(_t.a)("viewer")));return s.a.createElement(s.a.Fragment,null,s.a.createElement(Te.a,{id:"workspace-menu",container:h,anchorEl:o,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:Boolean(o),onClose:r},s.a.createElement(Se.a,{"aria-haspopup":"true",disabled:i,onClick:function(t){e.handleZoomToggleClick(t),r(t)},"aria-owns":p.anchorEl?"toggle-zoom-menu":void 0},s.a.createElement(v.a,{variant:"body1"},c(l?"hideZoomControls":"showZoomControls"))),s.a.createElement(Se.a,{"aria-haspopup":"true",onClick:function(t){e.handleMenuItemClick("workspaceSelection",t),r(t)},"aria-owns":d.anchorEl?"workspace-selection":void 0},s.a.createElement(v.a,{variant:"body1"},c("selectWorkspaceMenu"))),s.a.createElement(ot,{label:c("language")},s.a.createElement(Ze,{afterSelect:r})),a&&s.a.createElement(Se.a,{"aria-haspopup":"true",onClick:function(t){e.handleMenuItemClick("changeTheme",t),r(t)},"aria-owns":f.anchorEl?"change-theme":void 0},s.a.createElement(v.a,{variant:"body1"},c("changeTheme"))),s.a.createElement(Wt.a,this.props)),Boolean(f.open)&&s.a.createElement(At,{container:h,handleClose:this.handleMenuItemClose("changeTheme"),open:Boolean(f.open)}),Boolean(d.open)&&s.a.createElement(Pt,{open:Boolean(d.open),container:h,handleClose:this.handleMenuItemClose("workspaceSelection")}))}}])&&Lt(t.prototype,n),r&&Lt(t,r),a}(u.Component);Zt.defaultProps={anchorEl:null,isWorkspaceAddVisible:!1,showThemePicker:!1,showZoomControls:!1,t:function(e){return e},toggleZoomControls:function(){}};var $t={toggleZoomControls:J.f},qt=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{containerId:Object(Ie.b)(e),isWorkspaceAddVisible:Object(Y.i)(e).isWorkspaceAddVisible,showThemePicker:Object(Ie.i)(e).length>0,showZoomControls:Object(Ie.f)(e)}}),$t),Object(l.a)("WorkspaceMenu"))(Zt);function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jt(e,t){return(Jt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qt(e);if(t){var o=Qt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xt(this,n)}}function Xt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Kt(e):t}function Kt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qt(e){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jt(e,t)}(a,e);var t,n,r,o=Yt(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(Kt(t)),t.handleMenuClose=t.handleMenuClose.bind(Kt(t)),t}return t=a,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=this.state.anchorEl;return s.a.createElement(s.a.Fragment,null,s.a.createElement(ve.a,{"aria-haspopup":"true","aria-label":n("workspaceMenu"),"aria-owns":r?"workspace-menu":void 0,className:p()(t.ctrlBtn,r?t.ctrlBtnSelected:null),id:"menuBtn",onClick:this.handleMenuClick},s.a.createElement(Re.a,null)),s.a.createElement(qt,{anchorEl:r,handleClose:this.handleMenuClose}))}}])&&Gt(t.prototype,n),r&&Gt(t,r),a}(u.Component);en.defaultProps={t:function(e){return e}};var tn=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(l.a)("WorkspaceMenuButton"))(en),nn=n(922),rn=n.n(nn),on=n(924),an=n.n(on),cn=n(923),ln=n.n(cn),un=n(19),sn=n(82),fn=n(864),pn=n(36),dn=n(83),hn=n(489),mn=u.forwardRef((function(e,t){var n=e.action,r=e.classes,o=e.className,a=e.message,i=e.role,c=void 0===i?"alert":i,l=Object(D.a)(e,["action","classes","className","message","role"]);return u.createElement(A.a,Object(M.a)({role:c,square:!0,elevation:6,className:Object(B.a)(r.root,o),ref:t},l),u.createElement("div",{className:r.message},a),n?u.createElement("div",{className:r.action},n):null)})),bn=Object(c.a)((function(e){var t="light"===e.palette.type?.8:.98,n=Object(i.b)(e.palette.background.default,t);return{root:Object(M.a)({},e.typography.body2,Object(un.a)({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(mn),yn=u.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,o=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,a=r.horizontal,i=e.autoHideDuration,c=void 0===i?null:i,l=e.children,s=e.classes,f=e.className,p=e.ClickAwayListenerProps,d=e.ContentProps,h=e.disableWindowBlurListener,m=void 0!==h&&h,b=e.message,y=e.onClose,v=e.onEnter,g=e.onEntered,w=e.onEntering,O=e.onExit,j=e.onExited,E=e.onExiting,C=e.onMouseEnter,k=e.onMouseLeave,P=e.open,_=e.resumeHideDuration,x=e.TransitionComponent,R=void 0===x?hn.a:x,I=e.transitionDuration,T=void 0===I?{enter:sn.b.enteringScreen,exit:sn.b.leavingScreen}:I,S=e.TransitionProps,A=Object(D.a)(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),W=u.useRef(),L=u.useState(!0),z=L[0],H=L[1],V=Object(pn.a)((function(){y&&y.apply(void 0,arguments)})),F=Object(pn.a)((function(e){y&&null!=e&&(clearTimeout(W.current),W.current=setTimeout((function(){V(null,"timeout")}),e))}));u.useEffect((function(){return P&&F(c),function(){clearTimeout(W.current)}}),[P,c,F]);var U=function(){clearTimeout(W.current)},Z=u.useCallback((function(){null!=c&&F(null!=_?_:.5*c)}),[c,_,F]);return u.useEffect((function(){if(!m&&P)return window.addEventListener("focus",Z),window.addEventListener("blur",U),function(){window.removeEventListener("focus",Z),window.removeEventListener("blur",U)}}),[m,Z,P]),!P&&z?null:u.createElement(fn.a,Object(M.a)({onClickAway:function(e){y&&y(e,"clickaway")}},p),u.createElement("div",Object(M.a)({className:Object(B.a)(s.root,s["anchorOrigin".concat(Object(N.a)(o)).concat(Object(N.a)(a))],f),onMouseEnter:function(e){C&&C(e),U()},onMouseLeave:function(e){k&&k(e),Z()},ref:t},A),u.createElement(R,Object(M.a)({appear:!0,in:P,onEnter:Object(dn.a)((function(){H(!1)}),v),onEntered:g,onEntering:w,onExit:O,onExited:Object(dn.a)((function(){H(!0)}),j),onExiting:E,timeout:T,direction:"top"===o?"down":"up"},S),l||u.createElement(bn,Object(M.a)({message:b,action:n},d)))))})),vn=Object(c.a)((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},o={justifyContent:"flex-start"},a={top:24},i={bottom:24},c={right:24},l={left:24},u={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Object(M.a)({},t,Object(un.a)({},e.breakpoints.up("sm"),Object(M.a)({},a,u))),anchorOriginBottomCenter:Object(M.a)({},n,Object(un.a)({},e.breakpoints.up("sm"),Object(M.a)({},i,u))),anchorOriginTopRight:Object(M.a)({},t,r,Object(un.a)({},e.breakpoints.up("sm"),Object(M.a)({left:"auto"},a,c))),anchorOriginBottomRight:Object(M.a)({},n,r,Object(un.a)({},e.breakpoints.up("sm"),Object(M.a)({left:"auto"},i,c))),anchorOriginTopLeft:Object(M.a)({},t,o,Object(un.a)({},e.breakpoints.up("sm"),Object(M.a)({right:"auto"},a,l))),anchorOriginBottomLeft:Object(M.a)({},n,o,Object(un.a)({},e.breakpoints.up("sm"),Object(M.a)({right:"auto"},i,l)))}}),{flip:!1,name:"MuiSnackbar"})(yn),gn=n(805),wn=n(929),On=n.n(wn),jn=n(925);function En(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cn(e,t){return(Cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xn(e);if(t){var o=xn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pn(this,n)}}function Pn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_n(e):t}function _n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xn(e){return(xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cn(e,t)}(a,e);var t,n,r,o=kn(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={copied:!1},t.onCopy=t.onCopy.bind(_n(t)),t.handleClose=t.handleClose.bind(_n(t)),t}return t=a,(n=[{key:"handleClose",value:function(){var e=this.props.handleClose;e()}},{key:"onCopy",value:function(){this.setState({copied:!0})}},{key:"exportedState",value:function(){var e=this.props.exportableState;return JSON.stringify(e,null,2)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.container,r=e.open,o=e.t;return this.state.copied?s.a.createElement(vn,{anchorOrigin:{horizontal:"center",vertical:"top"},open:!0,autoHideDuration:6e3,onClose:this.handleClose,message:o("exportCopied"),action:s.a.createElement(gn.a,{size:"small","aria-label":o("dismiss"),color:"inherit",onClick:this.handleClose},s.a.createElement(On.a,{fontSize:"small"}))}):s.a.createElement(m.a,{id:"workspace-settings",container:n,open:r,onClose:this.handleClose,scroll:"paper",fullWidth:!0,maxWidth:"sm"},s.a.createElement(y.a,{id:"form-dialog-title",disableTypography:!0},s.a.createElement(v.a,{variant:"h2"},o("downloadExport"))),s.a.createElement(yt,null,t,s.a.createElement("pre",null,this.exportedState())),s.a.createElement(w.a,null,s.a.createElement(O.a,{onClick:this.handleClose},o("cancel")),s.a.createElement(jn.CopyToClipboard,{onCopy:this.onCopy,text:this.exportedState()},s.a.createElement(O.a,{variant:"contained",color:"primary"},o("copy")))))}}])&&En(t.prototype,n),r&&En(t,r),a}(u.Component);Rn.defaultProps={children:null,container:null,open:!1,t:function(e){return e}};var In=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{exportableState:Object(Ie.c)(e)}}),{}),Object(l.a)("WorkspaceExport"))(Rn),Tn=n(875);function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mn(e,t){return(Mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var o=An(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bn(this,n)}}function Bn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Nn(e):t}function Nn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function An(e){return(An=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mn(e,t)}(a,e);var t,n,r,o=Dn(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={configImportValue:""},t.handleImportConfig=t.handleImportConfig.bind(Nn(t)),t.handleChange=t.handleChange.bind(Nn(t)),t}return t=a,(n=[{key:"handleChange",value:function(e){e.preventDefault(),this.setState({configImportValue:e.target.value})}},{key:"handleImportConfig",value:function(e){var t=this.props,n=t.handleClose,r=t.importConfig,o=this.state.configImportValue;try{r(JSON.parse(o)),n()}catch(e){(0,this.props.addError)(e.toString())}}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.handleClose,r=e.open,o=e.t;return s.a.createElement(m.a,{"aria-labelledby":"workspace-import-title",id:"workspace-import",onEscapeKeyDown:n,onClose:n,open:r,fullWidth:!0,maxWidth:"sm"},s.a.createElement(y.a,{id:"workspace-import-title",disableTypography:!0},s.a.createElement(v.a,{variant:"h2"},o("importWorkspace"))),s.a.createElement(yt,null,s.a.createElement(Tn.a,{className:t.textField,id:"workspace-import-input",multiline:!0,onChange:this.handleChange,rows:"15",variant:"filled",inputProps:{autoFocus:"autofocus",className:t.textInput},helperText:o("importWorkspaceHint")})),s.a.createElement(w.a,null,s.a.createElement(O.a,{className:t.cancelBtn,onClick:n},o("cancel")),s.a.createElement(O.a,{color:"primary",onClick:this.handleImportConfig,variant:"contained"},o("import"))))}}])&&Sn(t.prototype,n),r&&Sn(t,r),a}(u.Component);Wn.defaultProps={classes:{},open:!1,t:function(e){return e}};var Ln={addError:R.a,importConfig:Me.b},zn=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{cancelBtn:{color:e.palette.text.primary},textField:{width:"100%"},textInput:{fontFamily:"monospace"}}})),Object(o.b)(null,Ln),Object(l.a)("WorkspaceImport"))(Wn);function Hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vn(e,t){return(Vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var o=$n(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Un(this,n)}}function Un(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Zn(e):t}function Zn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vn(e,t)}(a,e);var t,n,r,o=Fn(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={exportWorkspace:{},importWorkspace:{}},t.handleMenuItemClick=t.handleMenuItemClick.bind(Zn(t)),t.handleMenuItemClose=t.handleMenuItemClose.bind(Zn(t)),t}return t=a,(n=[{key:"handleMenuItemClick",value:function(e){var t={};t[e]={},t[e].open=!0,this.setState(t)}},{key:"handleMenuItemClose",value:function(e){var t=this;return function(n){var r={};r[e]={},r[e].open=!1,t.setState(r)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.anchorEl,r=t.containerId,o=t.handleClose,a=t.t,i=this.state,c=i.exportWorkspace,l=i.importWorkspace,u=document.querySelector("#".concat(r," .").concat(Object(_t.a)("viewer")));return s.a.createElement(s.a.Fragment,null,s.a.createElement(Te.a,{id:"workspace-options-menu",container:u,anchorEl:n,anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},open:Boolean(n),onClose:o},s.a.createElement(Se.a,{"aria-haspopup":"true",onClick:function(){e.handleMenuItemClick("exportWorkspace"),o()},"aria-owns":c.open?"workspace-export":void 0},s.a.createElement(De.a,null,s.a.createElement(ln.a,null)),s.a.createElement(v.a,{variant:"body1"},a("downloadExportWorkspace"))),s.a.createElement(Se.a,{"aria-haspopup":"true",id:"workspace-menu-import",onClick:function(){e.handleMenuItemClick("importWorkspace"),o()},"aria-owns":c.open?"workspace-import":void 0},s.a.createElement(De.a,null,s.a.createElement(an.a,null)),s.a.createElement(v.a,{variant:"body1"},a("importWorkspace"))),s.a.createElement(Wt.a,this.props)),Boolean(c.open)&&s.a.createElement(In,{open:Boolean(c.open),container:u,handleClose:this.handleMenuItemClose("exportWorkspace")}),Boolean(l.open)&&s.a.createElement(zn,{open:Boolean(l.open),container:u,handleClose:this.handleMenuItemClose("importWorkspace")}))}}])&&Hn(t.prototype,n),r&&Hn(t,r),a}(u.Component);qn.defaultProps={anchorEl:null};var Gn=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{containerId:Object(Ie.b)(e)}}),null))(qn);function Jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yn(e,t){return(Yn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=er(e);if(t){var o=er(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Kn(this,n)}}function Kn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Qn(e):t}function Qn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yn(e,t)}(a,e);var t,n,r,o=Xn(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(Qn(t)),t.handleMenuClose=t.handleMenuClose.bind(Qn(t)),t}return t=a,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=this.state.anchorEl;return s.a.createElement(s.a.Fragment,null,s.a.createElement(ve.a,{"aria-label":n("workspaceOptions"),className:p()(t.ctrlBtn,r?t.ctrlBtnSelected:null),onClick:this.handleMenuClick},s.a.createElement(rn.a,null)),s.a.createElement(Gn,{anchorEl:r,handleClose:this.handleMenuClose}))}}])&&Jn(t.prototype,n),r&&Jn(t,r),a}(u.Component),nr=Object(r.compose)(Object(c.a)((function(e){return{ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(a.a)(),Object(l.a)("WorkspaceOptionsButton"))(tr),rr=n(917),or=n.n(rr),ar=n(337),ir=n(191),cr=n(872);function lr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sr(e,t){return(sr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dr(e);if(t){var o=dr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pr(this,n)}}function pr(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dr(e){return(dr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sr(e,t)}(a,e);var t,n,r,o=fr(a);function a(){return lr(this,a),o.apply(this,arguments)}return t=a,r=[{key:"focus2ndListIitem",value:function(e){!e.querySelectorAll("li")||e.querySelectorAll("li").length<2||e.querySelectorAll("li")[1].focus()}}],(n=[{key:"titleContent",value:function(e){var t=this.props,n=t.titles,r=t.t;return n[e]||r("untitled")}},{key:"render",value:function(){var e=this,t=this.props,n=t.containerId,r=t.handleClose,o=t.anchorEl,i=t.windowIds,c=t.focusWindow,l=t.t;return s.a.createElement(Te.a,{anchorOrigin:{horizontal:"right",vertical:"top"},transformOrigin:{horizontal:"left",vertical:"top"},id:"window-list-menu",container:document.querySelector("#".concat(n," .").concat(Object(_t.a)("viewer"))),disableAutoFocusItem:!0,anchorEl:o,open:Boolean(o),onClose:r,onEntering:a.focus2ndListIitem},s.a.createElement(cr.a,{role:"presentation",selected:!1,disabled:!0,tabIndex:"-1"},l("openWindows")),i.map((function(t,n){return s.a.createElement(Se.a,{key:t,onClick:function(e){c(t,!0),r(e)}},s.a.createElement(Be.a,{primaryTypographyProps:{variant:"body1"}},e.titleContent(t)))})))}}])&&ur(t.prototype,n),r&&ur(t,r),a}(u.Component);hr.defaultProps={anchorEl:null,t:function(e){return e},titles:{}};var mr={focusWindow:ar.b},br=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{containerId:Object(Ie.b)(e),titles:Object(ir.e)(e),windowIds:Object(Y.f)(e)}}),mr),Object(l.a)("WindowList"))(hr);function yr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vr(e,t){return(vr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jr(e);if(t){var o=jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wr(this,n)}}function wr(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Or(e):t}function Or(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vr(e,t)}(a,e);var t,n,r,o=gr(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={windowListAnchor:null},t.handleClose=t.handleClose.bind(Or(t)),t.handleOpen=t.handleOpen.bind(Or(t)),t}return t=a,(n=[{key:"handleClose",value:function(){this.setState({windowListAnchor:null})}},{key:"handleOpen",value:function(e){this.setState({windowListAnchor:e.currentTarget})}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.disabled,o=t.t,a=t.windowCount,i=this.state.windowListAnchor;return s.a.createElement(s.a.Fragment,null,s.a.createElement(ve.a,{"aria-haspopup":"true","aria-label":o("listAllOpenWindows"),"aria-owns":i?"window-list":null,className:p()(n.ctrlBtn,i?n.ctrlBtnSelected:null),disabled:r,badge:!0,BadgeProps:{badgeContent:a,classes:{badge:n.badge}},onClick:function(t){return e.handleOpen(t)}},s.a.createElement(or.a,null)),Boolean(i)&&s.a.createElement(br,{anchorEl:i,id:"window-list",open:Boolean(i),handleClose:this.handleClose}))}}])&&yr(t.prototype,n),r&&yr(t,r),a}(u.Component);Er.defaultProps={classes:{},disabled:!1};var Cr=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{badge:{paddingLeft:12},ctrlBtn:{margin:e.spacing(1)},ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(o.b)((function(e){return{disabled:Object(Y.i)(e).isWorkspaceAddVisible,windowCount:Object(Y.f)(e).length}}),null),Object(l.a)("WindowListButton"))(Er);function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _r(e,t){return(_r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ir(e);if(t){var o=Ir(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rr(this,n)}}function Rr(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ir(e){return(Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_r(e,t)}(a,e);var t,n,r,o=xr(a);function a(){return kr(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props.classes;return s.a.createElement(s.a.Fragment,null,s.a.createElement(Cr,null),s.a.createElement(tn,null),s.a.createElement(nr,null),s.a.createElement(_e,{className:e.ctrlBtn}),s.a.createElement(Wt.a,this.props))}}])&&Pr(t.prototype,n),r&&Pr(t,r),a}(u.Component);Tr.defaultProps={classes:{}};var Sr=Object(r.compose)(Object(c.a)((function(e){return{ctrlBtn:{margin:e.spacing(1)}}})),Object(l.a)("WorkspaceControlPanelButtons"))(Tr);function Mr(e){return s.a.createElement(st.a,Object.assign({viewBox:"0 0 60 55"},e),s.a.createElement("rect",{width:"18",height:"55"}),s.a.createElement("rect",{width:"18",height:"55",transform:"translate(42)"}),s.a.createElement("rect",{width:"18",height:"34",transform:"translate(21)"}))}var Dr=["t","variant"];function Br(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Nr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ar(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wr(e,t){return(Wr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hr(e);if(t){var o=Hr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zr(this,n)}}function zr(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hr(e){return(Hr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wr(e,t)}(a,e);var t,n,r,o=Lr(a);function a(){return Nr(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.t,n=e.variant,r=Br(e,Dr);return s.a.createElement("div",r,"wide"===n&&s.a.createElement("div",null,s.a.createElement(v.a,{align:"center",component:"p",variant:"h3"},t("mirador"))),s.a.createElement(v.a,{align:"center"},s.a.createElement(gn.a,{component:"a",href:"https://projectmirador.org",target:"_blank",rel:"noopener"},s.a.createElement(Mr,{"aria-label":t("aboutMirador"),titleAccess:t("aboutMirador"),fontSize:"large"}))))}}])&&Ar(t.prototype,n),r&&Ar(t,r),a}(u.Component);Vr.defaultProps={t:function(e){return e},variant:"default"};var Fr=Object(l.a)("Branding")(Vr);function Ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $r(e,t){return($r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jr(e);if(t){var o=Jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gr(this,n)}}function Gr(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jr(e){return(Jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$r(e,t)}(a,e);var t,n,r,o=qr(a);function a(){return Ur(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=e.variant;return s.a.createElement(L,{className:p()(t.root,Object(_t.a)("workspace-control-panel"),"wide"===r?t.wide:null),color:"default",position:"absolute",component:"nav","aria-label":n("workspaceNavigation")},s.a.createElement(z.a,{disableGutters:!0,className:t.toolbar},s.a.createElement(de,null),s.a.createElement("div",{className:t.workspaceButtons},s.a.createElement(Sr,null))),s.a.createElement(Fr,{className:t.branding,t:n,variant:r}))}}])&&Zr(t.prototype,n),r&&Zr(t,r),a}(u.Component);function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Yr.defaultProps={variant:"default"};var Kr=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){var t;return{branding:(t={display:"flex",position:"absolute"},Xr(t,e.breakpoints.up("xs"),{display:"none"}),Xr(t,e.breakpoints.up("sm"),{bottom:0,display:"block",float:"none",right:"auto",width:"100%"}),Xr(t,"right",0),t),ctrlBtn:{margin:e.spacing(1)},drawer:{overflowX:"hidden"},root:Xr({height:64},e.breakpoints.up("sm"),{height:"100%",left:0,right:"auto",width:64}),toolbar:Xr({display:"flex",justifyContent:"space-between"},e.breakpoints.up("sm"),{flexDirection:"column",justifyContent:"flex-start",minHeight:0}),wide:{width:"auto"},workspaceButtons:Xr({},e.breakpoints.up("sm"),{display:"flex",flexDirection:"column"})}})),Object(l.a)("WorkspaceControlPanel"))(Yr),Qr=n(863),eo=n(879),to=n(897),no=n.n(to),ro=n(93),oo=n(86),ao=u.forwardRef((function(e,t){e.checked;var n=e.classes,r=e.className,o=e.control,a=e.disabled,i=(e.inputRef,e.label),c=e.labelPlacement,l=void 0===c?"end":c,s=(e.name,e.onChange,e.value,Object(D.a)(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"])),f=Object(oo.a)(),p=a;void 0===p&&void 0!==o.props.disabled&&(p=o.props.disabled),void 0===p&&f&&(p=f.disabled);var d={disabled:p};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===o.props[t]&&void 0!==e[t]&&(d[t]=e[t])})),u.createElement("label",Object(M.a)({className:Object(B.a)(n.root,r,"end"!==l&&n["labelPlacement".concat(Object(N.a)(l))],p&&n.disabled),ref:t},s),u.cloneElement(o,d),u.createElement(v.a,{component:"span",className:Object(B.a)(n.label,p&&n.disabled)},i))})),io=Object(c.a)((function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}}),{name:"MuiFormControlLabel"})(ao),co=n(936),lo=n.n(co);function uo(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M3,3H21V5H3Z",transform:"translate(0 16)"}),s.a.createElement("path",{d:"M21,5H3V19H21ZM19,17H5V7H19Z",transform:"translate(0 -2)"})))}function so(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M0,0H24V24H0Z",transform:"translate(24) rotate(90)",fill:"none"}),s.a.createElement("path",{d:"M3,3H21V5H3Z",transform:"translate(24) rotate(90)"}),s.a.createElement("path",{d:"M19,3H5V21H19ZM17,19H7V5H17Z",transform:"translate(-2)"})))}function fo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function po(e,t){return(po=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ho(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yo(e);if(t){var o=yo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mo(this,n)}}function mo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?bo(e):t}function bo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yo(e){return(yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&po(e,t)}(a,e);var t,n,r,o=ho(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).handleChange=t.handleChange.bind(bo(t)),t}return t=a,(n=[{key:"handleChange",value:function(e){var t=this.props,n=t.windowId;(0,t.setWindowThumbnailPosition)(n,e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.handleClose,o=t.t,a=t.thumbnailNavigationPosition,i=t.direction;return s.a.createElement(s.a.Fragment,null,s.a.createElement(cr.a,{role:"presentation",disableSticky:!0,tabIndex:"-1"},o("thumbnails")),s.a.createElement(Se.a,{className:n.MenuItem,onClick:function(){e.handleChange("off"),r()}},s.a.createElement(io,{value:"off",classes:{label:"off"===a?n.selectedLabel:n.label},control:s.a.createElement(lo.a,{color:"off"===a?"secondary":void 0}),label:o("off"),labelPlacement:"bottom"})),s.a.createElement(Se.a,{className:n.MenuItem,onClick:function(){e.handleChange("far-bottom"),r()}},s.a.createElement(io,{value:"far-bottom",classes:{label:"far-bottom"===a?n.selectedLabel:n.label},control:s.a.createElement(uo,{color:"far-bottom"===a?"secondary":void 0}),label:o("bottom"),labelPlacement:"bottom"})),s.a.createElement(Se.a,{className:n.MenuItem,onClick:function(){e.handleChange("far-right"),r()}},s.a.createElement(io,{value:"far-right",classes:{label:"far-right"===a?n.selectedLabel:n.label},control:s.a.createElement(so,{color:"far-right"===a?"secondary":void 0,style:"rtl"===i?{transform:"rotate(180deg)"}:{}}),label:o("right"),labelPlacement:"bottom"})))}}])&&fo(t.prototype,n),r&&fo(t,r),a}(u.Component);vo.defaultProps={handleClose:function(){},t:function(e){return e}};var go={setWindowThumbnailPosition:ar.h},wo=Object(r.compose)(Object(c.a)((function(e){return{label:{borderBottom:"2px solid transparent"},MenuItem:{display:"inline-block"},selectedLabel:{borderBottom:"2px solid ".concat(e.palette.secondary.main),color:e.palette.secondary.main}}})),Object(a.a)(null,{withRef:!0}),Object(o.b)((function(e,t){var n=t.windowId;return{direction:Object(Ie.h)(e),thumbnailNavigationPosition:Object(ro.g)(e,{windowId:n})}}),go,null,{forwardRef:!0}),Object(l.a)("WindowThumbnailSettings"))(vo),Oo=n(935),jo=n.n(Oo),Eo=n(934),Co=n.n(Eo);function ko(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8ZM14,9.5h6V11H14ZM14,12h6v1.5H14Zm0,2.5h6V16H14Z"})))}function Po(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M19.974,2H2V19.974H19.974V2ZM7.392,18.177H3.8V14.582H7.392Zm0-5.392H3.8V9.19H7.392Zm0-5.392H3.8V3.8H7.392Zm5.392,10.785H9.19V14.582h3.595Zm0-5.392H9.19V9.19h3.595Zm0-5.392H9.19V3.8h3.595Zm5.392,10.785H14.582V14.582h3.595Zm0-5.392H14.582V9.19h3.595Zm0-5.392H14.582V3.8h3.595Z",transform:"translate(1 1)"})))}function _o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xo(e,t){return(xo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ro(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=So(e);if(t){var o=So(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Io(this,n)}}function Io(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?To(e):t}function To(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function So(e){return(So=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xo(e,t)}(a,e);var t,n,r,o=Ro(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).handleChange=t.handleChange.bind(To(t)),t}return t=a,(n=[{key:"handleChange",value:function(e){var t=this.props,n=t.windowId;(0,t.setWindowViewType)(n,e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.handleClose,o=t.t,a=t.windowViewType,i=t.viewTypes,c={book:ko,gallery:Po,scroll:Co.a,single:jo.a};return 0===i.length?null:s.a.createElement(s.a.Fragment,null,s.a.createElement(cr.a,{role:"presentation",disableSticky:!0,tabIndex:"-1"},o("view")),i.map((function(t){return function(t){var i=t.value,c=t.Icon;return s.a.createElement(Se.a,{key:i,className:n.MenuItem,autoFocus:a===i,onClick:function(){e.handleChange(i),r()}},s.a.createElement(io,{value:i,classes:{label:a===i?n.selectedLabel:n.label},control:s.a.createElement(c,{color:a===i?"secondary":void 0}),label:o(i),labelPlacement:"bottom"}))}({Icon:c[t],value:t})})))}}])&&_o(t.prototype,n),r&&_o(t,r),a}(u.Component);Mo.defaultProps={handleClose:function(){},t:function(e){return e},viewTypes:[]};var Do={setWindowViewType:ar.i},Bo=Object(r.compose)(Object(c.a)((function(e){return{label:{borderBottom:"2px solid transparent"},MenuItem:{display:"inline-block"},selectedLabel:{borderBottom:"2px solid ".concat(e.palette.secondary.main),color:e.palette.secondary.main}}})),Object(a.a)(null,{withRef:!0}),Object(o.b)((function(e,t){var n=t.windowId;return{viewTypes:Object(ir.a)(e,{windowId:n}),windowViewType:Object(ir.f)(e,{windowId:n})}}),Do,null,{forwardRef:!0}),Object(l.a)("WindowViewSettings"))(Mo);function No(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ao(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wo(e,t){return(Wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ho(e);if(t){var o=Ho(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zo(this,n)}}function zo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vo(e){var t=e.PluginComponents,n=e.t;return t?s.a.createElement(s.a.Fragment,null,s.a.createElement(cr.a,{role:"presentation",disableSticky:!0,tabIndex:"-1"},n("windowPluginButtons")),s.a.createElement(Wt.a,e)):null}var Fo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wo(e,t)}(a,e);var t,n,r,o=Lo(a);function a(){return No(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.containerId,n=e.handleClose,r=e.anchorEl,o=e.showThumbnailNavigationSettings,a=e.toggleDraggingEnabled,i=e.windowId;return s.a.createElement(Te.a,{id:"window-menu_".concat(i),container:document.querySelector("#".concat(t," .").concat(Object(_t.a)("viewer"))),anchorEl:r,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},getContentAnchorEl:null,open:Boolean(r),onClose:n,onEntering:a,onExit:a,orientation:"horizontal"},s.a.createElement(Bo,{windowId:i,handleClose:n}),o&&s.a.createElement(wo,{windowId:i,handleClose:n}),s.a.createElement(Vo,this.props))}}])&&Ao(t.prototype,n),r&&Ao(t,r),a}(u.Component);Fo.defaultProps={anchorEl:null,showThumbnailNavigationSettings:!0};var Uo=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e){return{containerId:Object(Ie.b)(e),showThumbnailNavigationSettings:Object(Ie.a)(e).thumbnailNavigation.displaySettings}}),(function(e){return{toggleDraggingEnabled:function(){return e(J.e())}}})),Object(l.a)("WindowTopMenu"))(Fo);function Zo(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M0,0H24V24H0Z",fill:"none"}),s.a.createElement("path",{d:"M24.852,17.981,3,18V15.945l21.852-.019Z",transform:"translate(-2 5)"}),s.a.createElement("path",{d:"M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8Z",transform:"translate(0 -2)"})))}function $o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qo(e,t){return(qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Go(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xo(e);if(t){var o=Xo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jo(this,n)}}function Jo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Yo(e):t}function Yo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xo(e){return(Xo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ko=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qo(e,t)}(a,e);var t,n,r,o=Go(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(Yo(t)),t.handleMenuClose=t.handleMenuClose.bind(Yo(t)),t}return t=a,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.t,r=e.windowId,o=this.state.anchorEl;return s.a.createElement(s.a.Fragment,null,s.a.createElement(ve.a,{"aria-haspopup":"true","aria-label":n("windowMenu"),"aria-owns":o?"window-menu_".concat(r):void 0,className:o?t.ctrlBtnSelected:null,onClick:this.handleMenuClick},s.a.createElement(Zo,null)),s.a.createElement(Uo,{windowId:r,anchorEl:o,handleClose:this.handleMenuClose}))}}])&&$o(t.prototype,n),r&&$o(t,r),a}(u.Component);Ko.defaultProps={t:function(e){return e}};var Qo=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(l.a)("WindowTopMenuButton"))(Ko);function ea(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function na(e,t){return(na=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ra(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=aa(e);if(t){var o=aa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oa(this,n)}}function oa(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function aa(e){return(aa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ia=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&na(e,t)}(a,e);var t,n,r,o=ra(a);function a(){return ea(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){return s.a.createElement(s.a.Fragment,null,s.a.createElement(Wt.a,this.props))}}])&&ta(t.prototype,n),r&&ta(t,r),a}(u.Component),ca=Object(r.compose)(Object(a.a)(),Object(c.a)({}),Object(o.b)(null,null),Object(l.a)("WindowTopBarPluginArea"))(ia),la=n(937),ua=n.n(la);function sa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fa(e,t){return(fa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ma(e);if(t){var o=ma(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return da(this,n)}}function da(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?ha(e):t}function ha(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ma(e){return(ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ba=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fa(e,t)}(a,e);var t,n,r,o=pa(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={anchorEl:null},t.handleMenuClick=t.handleMenuClick.bind(ha(t)),t.handleMenuClose=t.handleMenuClose.bind(ha(t)),t}return t=a,(n=[{key:"handleMenuClick",value:function(e){this.setState({anchorEl:e.currentTarget})}},{key:"handleMenuClose",value:function(){this.setState({anchorEl:null})}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.containerId,o=t.PluginComponents,a=t.t,i=t.windowId,c=t.menuIcon,l=this.state.anchorEl;return o&&0!==o.length?s.a.createElement(s.a.Fragment,null,s.a.createElement(ve.a,{"aria-haspopup":"true","aria-label":a("windowPluginMenu"),"aria-owns":l?"window-plugin-menu_".concat(i):void 0,className:l?n.ctrlBtnSelected:null,onClick:this.handleMenuClick},c),s.a.createElement(Te.a,{id:"window-plugin-menu_".concat(i),container:document.querySelector("#".concat(r," .").concat(Object(_t.a)("viewer"))),anchorEl:l,anchorOrigin:{horizontal:"right",vertical:"bottom"},transformOrigin:{horizontal:"right",vertical:"top"},getContentAnchorEl:null,open:Boolean(l),onClose:function(){return e.handleMenuClose()}},s.a.createElement(Wt.a,Object.assign({handleClose:function(){return e.handleMenuClose()}},this.props)))):s.a.createElement(s.a.Fragment,null)}}])&&sa(t.prototype,n),r&&sa(t,r),a}(u.Component);ba.defaultProps={classes:{},menuIcon:s.a.createElement(ua.a,null),PluginComponents:[]};var ya=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{ctrlBtnSelected:{backgroundColor:e.palette.action.selected}}})),Object(o.b)((function(e){return{containerId:Object(Ie.b)(e)}}),null),Object(l.a)("WindowTopBarPluginMenu"))(ba),va=n(73),ga=n(866),wa=n(892),Oa=n.n(wa);function ja(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ea(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ca(e,t){return(Ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ka(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_a(e);if(t){var o=_a(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pa(this,n)}}function Pa(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _a(e){return(_a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ca(e,t)}(a,e);var t,n,r,o=ka(a);function a(){return ja(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.error,r=e.hideWindowTitle,o=e.isFetching,a=e.manifestTitle,i=function(e){return s.a.createElement(v.a,Object.assign({variant:"h2",noWrap:!0,color:"inherit",className:t.title},e),e.children)};return o?s.a.createElement(i,null,s.a.createElement(ga.a,{variant:"text"})):n?s.a.createElement(s.a.Fragment,null,s.a.createElement(Oa.a,{color:"error"}),s.a.createElement(i,{color:"textSecondary"},n)):r?s.a.createElement("div",{className:t.title}):s.a.createElement(i,null,a)}}])&&Ea(t.prototype,n),r&&Ea(t,r),a}(u.Component);function Ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ra(Object(n),!0).forEach((function(t){Ta(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ra(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}xa.defaultProps={error:null,hideWindowTitle:!1,isFetching:!1,manifestTitle:""};var Sa=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{title:Ia(Ia({},e.typography.h6),{},{flexGrow:1,paddingLeft:e.spacing(.5)})}})),Object(o.b)((function(e,t){var n=t.windowId;return{error:Object(va.m)(e,{windowId:n}).error,hideWindowTitle:Object(ir.c)(e,{windowId:n}).hideWindowTitle,isFetching:Object(va.m)(e,{windowId:n}).isFetching,manifestTitle:Object(va.o)(e,{windowId:n})}}),null),Object(l.a)("WindowTopBarTitle"))(xa);function Ma(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M7,14H5v5h5V17H7Zm7-9V7h3v3h2V5Z"}),s.a.createElement("path",{d:"M22.517,1.524H1.736V22.37H22.517Zm-2,18.845H3.736V3.524H20.517Z"})))}function Da(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M5,16H8v3h2V14H5ZM16,8V5H14v5h5V8Z"}),s.a.createElement("path",{d:"M22.517,1.524H1.736V22.37H22.517Zm-2,18.845H3.736V3.524H20.517Z"})))}function Ba(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Na(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Aa(e,t){return(Aa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=za(e);if(t){var o=za(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return La(this,n)}}function La(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function za(e){return(za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ha=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Aa(e,t)}(a,e);var t,n,r,o=Wa(a);function a(){return Ba(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.removeWindow,n=e.windowId,r=e.classes,o=e.toggleWindowSideBar,a=e.t,i=e.windowDraggable,c=e.maximizeWindow,l=e.maximized,u=e.minimizeWindow,f=e.focused,d=e.allowClose,h=e.allowMaximize,m=e.focusWindow,b=e.allowFullscreen,y=e.allowTopMenuButton,v=e.allowWindowSideBar;return s.a.createElement(L,{position:"relative",color:"default"},s.a.createElement("nav",{"aria-label":a("windowNavigation")},s.a.createElement(z.a,{disableGutters:!0,onMouseDown:m,className:p()(r.windowTopBarStyle,i?r.windowTopBarStyleDraggable:null,f?r.focused:null,Object(_t.a)("window-top-bar")),variant:"dense"},v&&s.a.createElement(ve.a,{"aria-label":a("toggleWindowSideBar"),onClick:o},s.a.createElement(no.a,null)),s.a.createElement(Sa,{windowId:n}),y&&s.a.createElement(Qo,{className:Object(_t.a)("window-menu-btn"),windowId:n}),s.a.createElement(ca,{windowId:n}),s.a.createElement(ya,{windowId:n}),h&&s.a.createElement(ve.a,{"aria-label":a(l?"minimizeWindow":"maximizeWindow"),className:Object(_t.a)("window-maximize"),onClick:l?u:c},l?s.a.createElement(Da,null):s.a.createElement(Ma,null)),b&&s.a.createElement(_e,null),d&&s.a.createElement(ve.a,{"aria-label":a("closeWindow"),className:Object(_t.a)("window-close"),onClick:t},s.a.createElement(oe.a,null)))))}}])&&Na(t.prototype,n),r&&Na(t,r),a}(u.Component);Ha.defaultProps={allowClose:!0,allowFullscreen:!1,allowMaximize:!0,allowTopMenuButton:!0,allowWindowSideBar:!0,focused:!1,focusWindow:function(){},maximized:!1,maximizeWindow:function(){},minimizeWindow:function(){},t:function(e){return e},windowDraggable:!0};var Va=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{focused:{},windowTopBarStyle:{"&$focused":{borderTop:"2px solid ".concat(e.palette.primary.main)},backgroundColor:e.palette.shades.main,borderTop:"2px solid transparent",minHeight:32,paddingLeft:e.spacing(.5),paddingRight:e.spacing(.5)},windowTopBarStyleDraggable:{cursor:"move"}}})),Object(o.b)((function(e,t){var n=t.windowId,r=Object(ir.c)(e,{windowId:n});return{allowClose:r.allowClose,allowFullscreen:r.allowFullscreen,allowMaximize:r.allowMaximize,allowTopMenuButton:r.allowTopMenuButton,allowWindowSideBar:r.allowWindowSideBar,focused:Object(I.e)(e,{windowId:n}),maximized:r.maximized}}),(function(e,t){var n=t.windowId;return{focusWindow:function(){return e(ar.b(n))},maximizeWindow:function(){return e(ar.d(n))},minimizeWindow:function(){return e(ar.e(n))},removeWindow:function(){return e(ar.f(n))},toggleWindowSideBar:function(){return e(ar.k(n))}}})),Object(l.a)("WindowTopBar"))(Ha),Fa=n(33),Ua=n(491),Za=n(801),$a=n(20),qa=n(76),Ga=n(284),Ja=n(16),Ya=n(78);function Xa(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var o=window.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,i=0;if(n&&"none"!==n&&"string"==typeof n){var c=n.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),i=parseInt(c[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(a-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-a,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(i-r.top,"px)"):"translateY(-".concat(r.top+r.height-i,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var Ka={enter:sn.b.enteringScreen,exit:sn.b.leavingScreen},Qa=u.forwardRef((function(e,t){var n=e.children,r=e.direction,o=void 0===r?"down":r,a=e.in,i=e.onEnter,c=e.onEntered,l=e.onEntering,s=e.onExit,f=e.onExited,p=e.onExiting,d=e.style,h=e.timeout,m=void 0===h?Ka:h,b=e.TransitionComponent,y=void 0===b?Ga.a:b,v=Object(D.a)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),g=Object(U.a)(),w=u.useRef(null),O=u.useCallback((function(e){w.current=$a.findDOMNode(e)}),[]),j=Object(Ja.a)(n.ref,O),E=Object(Ja.a)(j,t),C=function(e){return function(t){e&&(void 0===t?e(w.current):e(w.current,t))}},k=C((function(e,t){Xa(o,e),Object(Ya.b)(e),i&&i(e,t)})),P=C((function(e,t){var n=Object(Ya.a)({timeout:m,style:d},{mode:"enter"});e.style.webkitTransition=g.transitions.create("-webkit-transform",Object(M.a)({},n,{easing:g.transitions.easing.easeOut})),e.style.transition=g.transitions.create("transform",Object(M.a)({},n,{easing:g.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",l&&l(e,t)})),_=C(c),x=C(p),R=C((function(e){var t=Object(Ya.a)({timeout:m,style:d},{mode:"exit"});e.style.webkitTransition=g.transitions.create("-webkit-transform",Object(M.a)({},t,{easing:g.transitions.easing.sharp})),e.style.transition=g.transitions.create("transform",Object(M.a)({},t,{easing:g.transitions.easing.sharp})),Xa(o,e),s&&s(e)})),I=C((function(e){e.style.webkitTransition="",e.style.transition="",f&&f(e)})),T=u.useCallback((function(){w.current&&Xa(o,w.current)}),[o]);return u.useEffect((function(){if(!a&&"down"!==o&&"right"!==o){var e=Object(qa.a)((function(){w.current&&Xa(o,w.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[o,a]),u.useEffect((function(){a||T()}),[a,T]),u.createElement(y,Object(M.a)({nodeRef:w,onEnter:k,onEntered:_,onEntering:P,onExit:R,onExited:I,onExiting:x,appear:!0,in:a,timeout:m},v),(function(e,t){return u.cloneElement(n,Object(M.a)({ref:E,style:Object(M.a)({visibility:"exited"!==e||a?void 0:"hidden"},d,n.props.style)},t))}))})),ei={left:"right",right:"left",top:"down",bottom:"up"};var ti={enter:sn.b.enteringScreen,exit:sn.b.leavingScreen},ni=u.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,o=e.BackdropProps,a=e.children,i=e.classes,c=e.className,l=e.elevation,s=void 0===l?16:l,f=e.ModalProps,p=(f=void 0===f?{}:f).BackdropProps,d=Object(D.a)(f,["BackdropProps"]),h=e.onClose,m=e.open,b=void 0!==m&&m,y=e.PaperProps,v=void 0===y?{}:y,g=e.SlideProps,w=e.TransitionComponent,O=void 0===w?Qa:w,j=e.transitionDuration,E=void 0===j?ti:j,C=e.variant,k=void 0===C?"temporary":C,P=Object(D.a)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),_=Object(U.a)(),x=u.useRef(!1);u.useEffect((function(){x.current=!0}),[]);var R=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?ei[t]:t}(_,r),I=u.createElement(A.a,Object(M.a)({elevation:"temporary"===k?s:0,square:!0},v,{className:Object(B.a)(i.paper,i["paperAnchor".concat(Object(N.a)(R))],v.className,"temporary"!==k&&i["paperAnchorDocked".concat(Object(N.a)(R))])}),a);if("permanent"===k)return u.createElement("div",Object(M.a)({className:Object(B.a)(i.root,i.docked,c),ref:t},P),I);var T=u.createElement(O,Object(M.a)({in:b,direction:ei[R],timeout:E,appear:x.current},g),I);return"persistent"===k?u.createElement("div",Object(M.a)({className:Object(B.a)(i.root,i.docked,c),ref:t},P),T):u.createElement(Ua.a,Object(M.a)({BackdropProps:Object(M.a)({},o,p,{transitionDuration:E}),BackdropComponent:Za.a,className:Object(B.a)(i.root,i.modal,c),open:b,onClose:h,ref:t},P,d),T)})),ri=Object(c.a)((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(ni),oi=n(317),ai=n(42),ii=n(421),ci=n(412),li=n(806),ui=n(873),si=n(871),fi=n(940),pi=n.n(fi),di=n(898),hi=n.n(di),mi=n(941),bi=n.n(mi),yi=n(942),vi=n.n(yi),gi=n(302),wi=n.n(gi);function Oi(e){return s.a.createElement(st.a,e,s.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},s.a.createElement("path",{d:"M6.924,21H21V19H6.924ZM3,17H21V15H3Zm3.924-4H21V11H6.924Zm0-4H21V7H6.924ZM3,3V5H21V3Z"})))}function ji(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ei(e,t){return(Ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ci(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_i(e);if(t){var o=_i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ki(this,n)}}function ki(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Pi(e):t}function Pi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _i(e){return(_i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ei(e,t)}(a,e);var t,n,r,o=Ci(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).handleChange=t.handleChange.bind(Pi(t)),t}return t=a,(n=[{key:"handleChange",value:function(e,t){(0,this.props.addCompanionWindow)(t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.hasAnnotations,o=t.hasAnyAnnotations,a=t.hasAnyLayers,i=t.hasCurrentLayers,c=t.hasSearchResults,l=t.hasSearchService,u=t.panels,f=t.PluginComponents,p=t.sideBarPanel,d=t.t,h=function(t){return s.a.createElement(ee.a,{title:d("openCompanionWindow",{context:t.value})},s.a.createElement(si.a,Object.assign({},t,{classes:{root:n.tab,selected:n.tabSelected},"aria-label":d("openCompanionWindow",{context:t.value}),disableRipple:!0,onKeyUp:e.handleKeyUp})))};return s.a.createElement(ui.a,{classes:{flexContainer:n.tabsFlexContainer,indicator:n.tabsIndicator},value:"closed"!==p&&p,onChange:this.handleChange,variant:"fullWidth",indicatorColor:"primary",textColor:"primary",orientation:"vertical","aria-orientation":"vertical","aria-label":d("sidebarPanelsNavigation")},u.info&&s.a.createElement(h,{value:"info",icon:s.a.createElement(pi.a,null)}),u.attribution&&s.a.createElement(h,{value:"attribution",icon:s.a.createElement(bi.a,null)}),u.canvas&&s.a.createElement(h,{value:"canvas",icon:s.a.createElement(Oi,null)}),u.annotations&&(r||o)&&s.a.createElement(h,{value:"annotations",icon:s.a.createElement(li.a,{classes:{badge:n.badge},invisible:!r,variant:"dot"},s.a.createElement(hi.a,null))}),u.search&&l&&s.a.createElement(h,{value:"search",icon:s.a.createElement(li.a,{classes:{badge:n.badge},invisible:!c,variant:"dot"},s.a.createElement(wi.a,null))}),u.layers&&a&&s.a.createElement(h,{value:"layers",icon:s.a.createElement(li.a,{classes:{badge:n.badge},invisible:!i,variant:"dot"},s.a.createElement(vi.a,null))}),f&&f.map((function(e){return s.a.createElement(h,{key:e.value,value:e.value,icon:s.a.createElement(e,null)})})))}}])&&ji(t.prototype,n),r&&ji(t,r),a}(u.Component);xi.defaultProps={classes:{},hasAnnotations:!1,hasAnyAnnotations:!1,hasAnyLayers:!1,hasCurrentLayers:!1,hasSearchResults:!1,hasSearchService:!1,panels:[],PluginComponents:null,sideBarPanel:"closed",t:function(e){return e}};function Ri(e){return e&&e.some((function(e){return new ai.a(e).imageResources.length>1}))}var Ii=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{badge:{backgroundColor:e.palette.notification.main},tab:{"&:active":{backgroundColor:e.palette.action.active},"&:focus":{"@media (hover: none)":{backgroundColor:"transparent"},backgroundColor:e.palette.action.hover,textDecoration:"none"},"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"},backgroundColor:e.palette.action.hover,textDecoration:"none"},borderRight:"2px solid transparent",minWidth:"auto"},tabSelected:{borderRight:"2px solid ".concat(e.palette.primary.main)},tabsFlexContainer:{flexDirection:"column"},tabsIndicator:{display:"none"}}})),Object(o.b)((function(e,t){var n,r=t.windowId;return{hasAnnotations:Object(ii.a)(e,{windowId:r}).length>0,hasAnyAnnotations:(n=Object(Fa.f)(e,{windowId:r}),n&&n.some((function(e){var t=new ai.a(e);return t.annotationListUris.length>0||t.canvasAnnotationPages.length>0}))),hasAnyLayers:Ri(Object(Fa.f)(e,{windowId:r})),hasCurrentLayers:Ri(Object(Fa.o)(e,{windowId:r})),hasSearchResults:Object(Y.e)(e,{windowId:r}).suggestedSearches||Object(ci.j)(e,{companionWindowId:(Object(ro.f)(e,{position:"left",windowId:r})[0]||{}).id,windowId:r}),hasSearchService:null!==Object(va.l)(e,{windowId:r}),panels:Object(ir.c)(e,{windowId:r}).panels,sideBarPanel:(Object(ro.f)(e,{position:"left",windowId:r})[0]||{}).content}}),(function(e,t){var n=t.windowId;return{addCompanionWindow:function(t){return e(oi.b(n,{content:t,position:"left"}))}}})),Object(l.a)("WindowSideBarButtons"))(xi);function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mi(e,t){return(Mi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Di(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ni(e);if(t){var o=Ni(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bi(this,n)}}function Bi(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ni(e){return(Ni=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ai=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mi(e,t)}(a,e);var t,n,r,o=Di(a);function a(){return Ti(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.direction,r=e.t,o=e.windowId,a=e.sideBarOpen;return s.a.createElement(s.a.Fragment,null,s.a.createElement(ri,{variant:"persistent",className:p()(t.drawer),classes:{paper:p()(t.paper)},anchor:"rtl"===n?"right":"left",PaperProps:{"aria-label":r("sidebarPanelsNavigation"),component:"nav",style:{height:"100%",position:"relative"}},SlideProps:{direction:"rtl"===n?"left":"right",mountOnEnter:!0,unmountOnExit:!0},open:a},s.a.createElement(Ii,{windowId:o})))}}])&&Si(t.prototype,n),r&&Si(t,r),a}(u.Component);Ai.defaultProps={sideBarOpen:!1};var Wi=Object(r.compose)(Object(c.a)((function(e){return{drawer:{flexShrink:0,height:"100%",order:-1e3,zIndex:e.zIndex.appBar-1},grow:{flexGrow:1},paper:{borderInlineEnd:"1px solid ".concat(e.palette.divider),overflowX:"hidden",width:48},toolbar:e.mixins.toolbar}})),Object(a.a)(),Object(o.b)((function(e,t){var n=t.windowId;return{direction:Object(Ie.h)(e),sideBarOpen:(Object(Y.e)(e,{windowId:n})||{}).sideBarOpen,sideBarPanel:(Object(Y.e)(e,{windowId:n})||{}).sideBarPanel}}),null),Object(l.a)("WindowSideBar"))(Ai),Li=n(944),zi=n.n(Li),Hi=n(943),Vi=n.n(Hi),Fi=n(277),Ui=n(48),Zi=n(313),$i=n(311),qi=n(188),Gi=n(314);var Ji=n(44),Yi=(n(101),n(867));var Xi=u.createContext({}),Ki=n(102),Qi=u.forwardRef((function(e,t){var n,r=e.children,o=e.classes,a=e.className,i=e.defaultExpanded,c=void 0!==i&&i,l=e.disabled,s=void 0!==l&&l,f=e.expanded,p=e.onChange,d=e.square,h=void 0!==d&&d,m=e.TransitionComponent,b=void 0===m?Yi.a:m,y=e.TransitionProps,v=Object(D.a)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),g=Object(Ki.a)({controlled:f,default:c,name:"Accordion",state:"expanded"}),w=Object(Ji.a)(g,2),O=w[0],j=w[1],E=u.useCallback((function(e){j(!O),p&&p(e,!O)}),[O,p,j]),C=u.Children.toArray(r),k=(n=C,Object(Zi.a)(n)||Object($i.a)(n)||Object(qi.a)(n)||Object(Gi.a)()),P=k[0],_=k.slice(1),x=u.useMemo((function(){return{expanded:O,disabled:s,toggle:E}}),[O,s,E]);return u.createElement(A.a,Object(M.a)({className:Object(B.a)(o.root,a,O&&o.expanded,s&&o.disabled,!h&&o.rounded),ref:t,square:h},v),u.createElement(Xi.Provider,{value:x},P),u.createElement(b,Object(M.a)({in:O,timeout:"auto"},y),u.createElement("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region"},_)))})),ec=Object(c.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiAccordion"})(Qi),tc=u.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,a=e.expandIcon,i=e.IconButtonProps,c=e.onBlur,l=e.onClick,s=e.onFocusVisible,f=Object(D.a)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),p=u.useState(!1),d=p[0],h=p[1],m=u.useContext(Xi),b=m.disabled,y=void 0!==b&&b,v=m.expanded,g=m.toggle;return u.createElement(X.a,Object(M.a)({focusRipple:!1,disableRipple:!0,disabled:y,component:"div","aria-expanded":v,className:Object(B.a)(r.root,o,y&&r.disabled,v&&r.expanded,d&&r.focused),onFocusVisible:function(e){h(!0),s&&s(e)},onBlur:function(e){h(!1),c&&c(e)},onClick:function(e){g&&g(e),l&&l(e)},ref:t},f),u.createElement("div",{className:Object(B.a)(r.content,v&&r.expanded)},n),a&&u.createElement(gn.a,Object(M.a)({className:Object(B.a)(r.expandIcon,v&&r.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},i),a))})),nc=Object(c.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiAccordionSummary"})(tc),rc=u.forwardRef((function(e,t){var n=e.classes,r=e.className,o=Object(D.a)(e,["classes","className"]);return u.createElement("div",Object(M.a)({className:Object(B.a)(n.root,r),ref:t},o))})),oc=Object(c.a)((function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}}),{name:"MuiAccordionDetails"})(rc),ac=n(75),ic=Object(ac.a)(u.createElement("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),cc=Object(ac.a)(u.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),lc=Object(ac.a)(u.createElement("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),uc=Object(ac.a)(u.createElement("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),sc=n(415),fc={success:u.createElement(ic,{fontSize:"inherit"}),warning:u.createElement(cc,{fontSize:"inherit"}),error:u.createElement(lc,{fontSize:"inherit"}),info:u.createElement(uc,{fontSize:"inherit"})},pc=u.createElement(sc.a,{fontSize:"small"}),dc=u.forwardRef((function(e,t){var n=e.action,r=e.children,o=e.classes,a=e.className,i=e.closeText,c=void 0===i?"Close":i,l=e.color,s=e.icon,f=e.iconMapping,p=void 0===f?fc:f,d=e.onClose,h=e.role,m=void 0===h?"alert":h,b=e.severity,y=void 0===b?"success":b,v=e.variant,g=void 0===v?"standard":v,w=Object(D.a)(e,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return u.createElement(A.a,Object(M.a)({role:m,square:!0,elevation:0,className:Object(B.a)(o.root,o["".concat(g).concat(Object(N.a)(l||y))],a),ref:t},w),!1!==s?u.createElement("div",{className:o.icon},s||p[y]||fc[y]):null,u.createElement("div",{className:o.message},r),null!=n?u.createElement("div",{className:o.action},n):null,null==n&&d?u.createElement("div",{className:o.action},u.createElement(gn.a,{size:"small","aria-label":c,title:c,color:"inherit",onClick:d},pc)):null)})),hc=Object(c.a)((function(e){var t="light"===e.palette.type?i.a:i.e,n="light"===e.palette.type?i.e:i.a;return{root:Object(M.a)({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:t(e.palette.success.main,.6),backgroundColor:n(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:t(e.palette.info.main,.6),backgroundColor:n(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:t(e.palette.warning.main,.6),backgroundColor:n(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:t(e.palette.error.main,.6),backgroundColor:n(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:t(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:t(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:t(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:t(e.palette.error.main,.6),border:"1px solid ".concat(e.palette.error.main),"& $icon":{color:e.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.success.main},filledInfo:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.info.main},filledWarning:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.warning.main},filledError:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiAlert"})(dc),mc=n(414),bc=n.n(mc);function yc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gc(e,t){return(gc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jc(e);if(t){var o=jc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oc(this,n)}}function Oc(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jc(e){return(jc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ec=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gc(e,t)}(a,e);var t,n,r,o=wc(a);function a(){return yc(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.error,r=e.metadata,o=e.showJsError,a=e.t;return o?s.a.createElement(s.a.Fragment,null,s.a.createElement(hc,{elevation:6,variant:"filled",severity:"error"},a("errorDialogTitle")),o&&s.a.createElement(ec,{square:!0,className:t.alert},s.a.createElement(nc,{expandIcon:s.a.createElement(bc.a,null)},s.a.createElement(v.a,null,a("jsError",{message:n.message,name:n.name}))),s.a.createElement(oc,{className:t.details},s.a.createElement("pre",null,a("jsStack",{stack:n.stack})),r&&s.a.createElement("pre",null,JSON.stringify(r,null,2)))),s.a.createElement(Wt.a,this.props)):null}}])&&vc(t.prototype,n),r&&vc(t,r),a}(u.Component);Ec.defaultProps={metadata:null,showJsError:!0,t:function(e){return e}};var Cc=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{alert:{"& $icon":{color:e.palette.error.main},backgroundColor:e.palette.error.main,color:"#fff",fontWeight:e.typography.fontWeightMedium},details:{"& pre":{height:"100px",overflowY:"scroll"},flexDirection:"column"}}})),Object(o.b)((function(e,t){var n=t.companionWindowId,r=t.windowId;return{metadata:{companionWindow:n&&Object(ro.b)(e,{companionWindowId:n}),manifest:Object(Y.b)(e,{windowId:r}),viewer:Object(Y.d)(e,{windowId:r}),window:Object(Y.e)(e,{windowId:r})},showJsError:Object(Ie.a)(e).window.showJsError}})),Object(l.a)("ErrorContent"))(Ec);function kc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pc(e,t){return(Pc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rc(e);if(t){var o=Rc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xc(this,n)}}function xc(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rc(e){return(Rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ic=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pc(e,t)}(a,e);var t,n,r,o=_c(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={},t}return t=a,r=[{key:"getDerivedStateFromError",value:function(e){return{error:e,hasError:!0}}}],(n=[{key:"componentDidUpdate",value:function(e){this.props.content!==e.content&&this.setState({error:null,hasError:!1})}},{key:"render",value:function(){var e=this.props,t=e.content,n=e.windowId,r=e.id,o=e.t,a=this.state,i=a.error;if(a.hasError)return s.a.createElement(Ui.a,{title:o("error"),windowId:n,id:r},s.a.createElement(Cc,{error:i,windowId:n,companionWindowId:r}));var c=Fi.a[t];return c?s.a.createElement(c,{id:r,windowId:n}):s.a.createElement(s.a.Fragment,null)}}])&&kc(t.prototype,n),r&&kc(t,r),a}(u.Component);Ic.defaultProps={content:null,t:function(e){return e}};var Tc=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e,t){var n=t.id;return{content:Object(ro.b)(e,{companionWindowId:n}).content,id:n}})),Object(l.a)("CompanionWindowFactory"))(Ic);function Sc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dc(e,t){return(Dc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ac(e);if(t){var o=Ac(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Nc(this,n)}}function Nc(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ac(e){return(Ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dc(e,t)}(a,e);var t,n,r,o=Bc(a);function a(){return Sc(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"areaLayoutClass",value:function(){var e=this.props,t=e.classes,n=e.position;return"bottom"===n||"far-bottom"===n?t.horizontal:null}},{key:"collapseIcon",value:function(){var e=this.props,t=e.companionAreaOpen;return"rtl"===e.direction?t?s.a.createElement(Vi.a,null):s.a.createElement(zi.a,null):t?s.a.createElement(zi.a,null):s.a.createElement(Vi.a,null)}},{key:"slideDirection",value:function(){var e=this.props,t=e.direction,n="rtl"===t?"left":"right",r="rtl"===t?"right":"left";switch(e.position){case"right":case"far-right":return r;case"bottom":case"far-bottom":return"up";default:return n}}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.companionWindowIds,r=e.companionAreaOpen,o=e.setCompanionAreaOpen,a=e.position,i=e.sideBarOpen,c=e.t,l=e.windowId;return s.a.createElement("div",{className:[t.root,this.areaLayoutClass(),Object(_t.a)("companion-area-".concat(a))].join(" ")},s.a.createElement(Qa,{in:r,direction:this.slideDirection()},s.a.createElement("div",{className:[Object(_t.a)("companion-windows"),n.length>0&&t[a],this.areaLayoutClass()].join(" "),style:{display:r?"flex":"none"}},n.map((function(e){return s.a.createElement(Tc,{id:e,key:e,windowId:l})})))),o&&"left"===a&&i&&n.length>0&&s.a.createElement("div",{className:t.toggle},s.a.createElement(ve.a,{"aria-expanded":r,"aria-label":c(r?"collapseSidePanel":"expandSidePanel"),className:t.toggleButton,key:r?"collapse":"expand",onClick:function(){o(l,!r)},TooltipProps:{placement:"right"}},this.collapseIcon())))}}])&&Mc(t.prototype,n),r&&Mc(t,r),a}(u.Component);Wc.defaultProps={classes:{},setCompanionAreaOpen:function(){},sideBarOpen:!1};var Lc={setCompanionAreaOpen:ar.g},zc=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{horizontal:{flexDirection:"column",width:"100%"},left:{minWidth:235},root:{display:"flex",minHeight:0,position:"relative",zIndex:e.zIndex.appBar-2},toggle:{backgroundColor:e.palette.background.paper,border:"1px solid ".concat(e.palette.shades.dark),borderRadius:0,height:"48px",left:"100%",marginTop:"1rem",padding:2,position:"absolute",width:"23px",zIndex:e.zIndex.drawer},toggleButton:{marginBottom:12,marginTop:12,padding:0}}})),Object(o.b)((function(e,t){var n=t.windowId,r=t.position;return{companionAreaOpen:Object(ro.a)(e,{position:r,windowId:n}),companionWindowIds:Object(ro.c)(e,{position:r,windowId:n}),direction:Object(Ie.h)(e),sideBarOpen:(Object(Y.e)(e,{windowId:n})||{}).sideBarOpen}}),Lc),Object(l.a)("CompanionArea"))(Wc),Hc=n(55),Vc=n(865),Fc=n(878),Uc=n(416),Zc=n.n(Uc),$c=n(133),qc=n(105),Gc=n(423);function Jc(e){return function(e){if(Array.isArray(e))return Yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Yc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yc(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yc(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}function Xc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kc(e,t){return(Kc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nl(e);if(t){var o=nl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return el(this,n)}}function el(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?tl(e):t}function tl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nl(e){return(nl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rl(e){return Array.isArray(e)?e:[e]}var ol=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kc(e,t)}(a,e);var t,n,r,o=Qc(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={filter:null},t.hideDialog=t.hideDialog.bind(tl(t)),t}return t=a,r=[{key:"getUseableLabel",value:function(e,t){return e&&e.getLabel&&e.getLabel().length>0?e.getLabel().getValue():String(t+1)}}],(n=[{key:"setFilter",value:function(e){this.setState({filter:e})}},{key:"hideDialog",value:function(){var e=this.props;(0,e.hideCollectionDialog)(e.windowId)}},{key:"selectCollection",value:function(e){var t=this.props,n=t.collectionPath,r=t.manifestId,o=t.showCollectionDialog,a=t.windowId;o(e.id,[].concat(Jc(n),[r]),a)}},{key:"goToPreviousCollection",value:function(){var e=this.props,t=e.collectionPath,n=e.showCollectionDialog,r=e.windowId;n(t[t.length-1],t.slice(0,-1),r)}},{key:"selectManifest",value:function(e){var t=this.props,n=t.addWindow,r=t.collectionPath,o=t.manifestId,a=t.setWorkspaceAddVisibility,i=t.updateWindow,c=t.windowId;c?i(c,{canvasId:null,collectionPath:[].concat(Jc(r),[o]),manifestId:e.id}):n({collectionPath:[].concat(Jc(r),[o]),manifestId:e.id}),this.hideDialog(),a(!1)}},{key:"dialogContainer",value:function(){var e=this.props,t=e.containerId,n=e.windowId;return document.querySelector("#".concat(t," #").concat(n))}},{key:"placeholder",value:function(){var e=this.props.classes;return s.a.createElement(m.a,{className:e.dialog,onClose:this.hideDialog,open:!0,container:this.dialogContainer(),BackdropProps:this.backdropProps()},s.a.createElement(y.a,{id:"select-collection",disableTypography:!0},s.a.createElement(ga.a,{className:e.placeholder,variant:"text"})),s.a.createElement(yt,null,s.a.createElement(ga.a,{className:e.placeholder,variant:"text"}),s.a.createElement(ga.a,{className:e.placeholder,variant:"text"})))}},{key:"backdropProps",value:function(){return{classes:{root:this.props.classes.dialog}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.collection,o=t.error,i=t.isMultipart,c=t.manifest,l=t.ready,u=t.t,f=this.state.filter;if(o)return null;if(!this.dialogContainer())return this.forceUpdate(),s.a.createElement(s.a.Fragment,null);if(!l)return this.placeholder();var p=c&&rl(c.getProperty("rights")||c.getProperty("license")),d=c&&rl(c.getRequiredStatement()).filter((function(e){return e.getValue()})).map((function(e){return{label:null,values:e.getValues()}})),h=c.getCollections(),b=f||(h.length>0?"collections":"manifests");return s.a.createElement(m.a,{className:n.dialog,onClose:this.hideDialog,container:this.dialogContainer(),BackdropProps:this.backdropProps(),open:!0},s.a.createElement(y.a,{id:"select-collection",disableTypography:!0},s.a.createElement(v.a,{component:"div",variant:"overline"},u(i?"multipartCollection":"collection")),s.a.createElement(v.a,{variant:"h3"},a.getUseableLabel(c))),s.a.createElement(yt,{className:n.dialogContent},r&&s.a.createElement(O.a,{startIcon:s.a.createElement(Zc.a,null),onClick:function(){return e.goToPreviousCollection()}},a.getUseableLabel(r)),s.a.createElement("div",{className:n.collectionMetadata},s.a.createElement(Gc.a,{manifestId:c.id}),s.a.createElement(qc.a,{id:"select-collection-rights",label:u("attributionTitle")},d&&s.a.createElement($c.a,{labelValuePairs:d,defaultLabel:u("attribution")}),p&&p.length>0&&s.a.createElement(s.a.Fragment,null,s.a.createElement(v.a,{variant:"subtitle2",component:"dt"},u("rights")),p.map((function(e){return s.a.createElement(v.a,{variant:"body1",component:"dd",key:e},s.a.createElement(Vc.a,{target:"_blank",rel:"noopener noreferrer",href:e},e))}))))),s.a.createElement("div",{className:n.collectionFilter},c.getTotalCollections()>0&&s.a.createElement(Fc.a,{clickable:!0,color:"collections"===b?"primary":"default",onClick:function(){return e.setFilter("collections")},label:u("totalCollections",{count:c.getTotalCollections()})}),c.getTotalManifests()>0&&s.a.createElement(Fc.a,{clickable:!0,color:"manifests"===b?"primary":"default",onClick:function(){return e.setFilter("manifests")},label:u("totalManifests",{count:c.getTotalManifests()})})),"collections"===b&&s.a.createElement(at.a,null,h.map((function(t){return s.a.createElement(Se.a,{key:t.id,onClick:function(){e.selectCollection(t)},className:n.collectionItem},a.getUseableLabel(t))}))),"manifests"===b&&s.a.createElement(at.a,null,c.getManifests().map((function(t){return s.a.createElement(Se.a,{key:t.id,onClick:function(){e.selectManifest(t)},className:n.collectionItem},a.getUseableLabel(t))})))),s.a.createElement(w.a,null,s.a.createElement(O.a,{onClick:this.hideDialog},u("close"))))}}])&&Xc(t.prototype,n),r&&Xc(t,r),a}(u.Component);ol.defaultProps={collection:null,collectionPath:[],containerId:null,error:null,isMultipart:!1,ready:!1,windowId:null};var al={addWindow:ar.a,hideCollectionDialog:ar.c,setWorkspaceAddVisibility:J.a,showCollectionDialog:ar.j,updateWindow:ar.l},il=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{collectionFilter:{padding:"16px",paddingTop:0},collectionItem:{whiteSpace:"normal"},collectionMetadata:{padding:"16px"},dark:{color:"#000000"},dialog:{position:"absolute !important"},dialogContent:{padding:0},light:{color:e.palette.grey[400]},listitem:{"&:focus":{backgroundColor:e.palette.action.focus},"&:hover":{backgroundColor:e.palette.action.hover},cursor:"pointer"}}})),Object(o.b)((function(e,t){var n=t.windowId,r=Object(Y.e)(e,{windowId:n}),o=r.collectionPath,a=r.collectionManifestId,i=Object(Y.b)(e,{manifestId:a}),c=o&&o[o.length-1],l=c&&Object(Y.b)(e,{manifestId:c});return{collection:l&&Object(va.q)(e,{manifestId:l.id}),collectionPath:o,containerId:Object(Ie.b)(e),error:i&&i.error,isMultipart:Object(Hc.c)(e,{manifestId:a}).includes("multi-part"),manifest:i&&Object(va.q)(e,{manifestId:a}),manifestId:a,open:e.workspace.collectionDialogOn,ready:i&&!!i.json,windowId:n}}),al),Object(l.a)("CollectionDialog"))(ol);function cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ll(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ul(e,t){return(ul=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pl(e);if(t){var o=pl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fl(this,n)}}function fl(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pl(e){return(pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dl=Object(u.lazy)((function(){return n.e(6).then(n.bind(null,994))})),hl=Object(u.lazy)((function(){return n.e(7).then(n.bind(null,992))})),ml=Object(u.lazy)((function(){return n.e(5).then(n.bind(null,995))})),bl=Object(u.lazy)((function(){return n.e(4).then(n.bind(null,990))})),yl=Object(u.lazy)((function(){return n.e(8).then(n.bind(null,993))}));hl.displayName="GalleryView",ml.displayName="SelectCollection",bl.displayName="WindowViewer";var vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ul(e,t)}(a,e);var t,n,r,o=sl(a);function a(){return cl(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"renderViewer",value:function(){var e=this.props,t=e.audioResources,n=e.isCollection,r=e.isFetching,o=e.videoResources,a=e.view,i=e.windowId;return n?s.a.createElement(s.a.Fragment,null,s.a.createElement(ml,{windowId:i})):!1===r?"gallery"===a?s.a.createElement(hl,{windowId:i}):o.length>0?s.a.createElement(yl,{windowId:i}):t.length>0?s.a.createElement(dl,{windowId:i}):s.a.createElement(bl,{windowId:i}):null}},{key:"render",value:function(){var e=this.props,t=e.isCollectionDialogVisible,n=e.windowId,r=e.classes,o=e.children;return s.a.createElement("div",{className:p()(Object(_t.a)("primary-window"),r.primaryWindow)},s.a.createElement(Wi,{windowId:n}),s.a.createElement(zc,{windowId:n,position:"left"}),t&&s.a.createElement(il,{windowId:n}),s.a.createElement(u.Suspense,{fallback:s.a.createElement("div",null)},o||this.renderViewer()))}}])&&ll(t.prototype,n),r&&ll(t,r),a}(u.Component);vl.defaultProps={audioResources:[],children:void 0,isCollection:!1,isCollectionDialogVisible:!1,isFetching:!1,videoResources:[],view:void 0};var gl=Object(r.compose)(Object(c.a)({primaryWindow:{display:"flex",flex:1,position:"relative"}}),Object(o.b)((function(e,t){var n=t.windowId,r=Object(va.q)(e,{windowId:n});return{audioResources:Object(Fa.j)(e,{windowId:n})||[],isCollection:r&&r.isCollection(),isCollectionDialogVisible:Object(Y.e)(e,{windowId:n}).collectionDialogOn,videoResources:Object(Fa.n)(e,{windowId:n})||[]}}),null),Object(l.a)("PrimaryWindow"))(vl);function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jl(e,t){return(jl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function El(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kl(e);if(t){var o=kl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cl(this,n)}}function Cl(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kl(e){return(kl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jl(e,t)}(a,e);var t,n,r,o=El(a);function a(){return wl(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.allowClose,n=e.allowWindowSideBar,r=e.ariaLabel,o=e.children,a=e.classes,i=e.label,c=e.removeWindow,l=e.t,u=e.windowId;return s.a.createElement(A.a,{component:"section",elevation:1,id:u,className:p()(a.window,Object(_t.a)("placeholder-window")),"aria-label":i&&r?l("window",{label:i}):null},s.a.createElement(L,{position:"relative",color:"default"},s.a.createElement(z.a,{disableGutters:!0,className:p()(a.windowTopBarStyle,Object(_t.a)("window-top-bar")),variant:"dense"},n&&s.a.createElement(ve.a,{"aria-label":l("toggleWindowSideBar"),disabled:!0},s.a.createElement(no.a,null)),s.a.createElement(v.a,{variant:"h2",noWrap:!0,color:"inherit",className:a.title},i),t&&c&&s.a.createElement(ve.a,{"aria-label":l("closeWindow"),className:p()(a.button,Object(_t.a)("window-close")),onClick:c,TooltipProps:{tabIndex:r?"0":"-1"}},s.a.createElement(oe.a,null)))),o)}}])&&Ol(t.prototype,n),r&&Ol(t,r),a}(u.Component);function _l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_l(Object(n),!0).forEach((function(t){Rl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Pl.defaultProps={allowClose:!0,allowWindowSideBar:!0,ariaLabel:!0,children:null,classes:{},label:"",removeWindow:function(){},t:function(e){return e}};var Il=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{button:{marginLeft:"auto"},title:xl(xl({},e.typography.h6),{},{flexGrow:1,paddingLeft:e.spacing(.5)}),window:{backgroundColor:e.palette.shades.dark,borderRadius:0,display:"flex",flexDirection:"column",height:"100%",minHeight:0,overflow:"hidden",width:"100%"},windowTopBarStyle:{backgroundColor:e.palette.shades.main,borderTop:"2px solid transparent",minHeight:32,paddingLeft:e.spacing(.5),paddingRight:e.spacing(.5)}}})),Object(o.b)((function(e,t){var n=t.windowId;return{allowClose:Object(ir.c)(e,{windowId:n}).allowClose,allowWindowSideBar:Object(ir.c)(e,{windowId:n}).allowWindowSideBar}}),(function(e,t){var n=t.windowId;return{removeWindow:function(){return e(ar.f(n))}}})),Object(l.a)("MinimalWindow"))(Pl),Tl=n(35),Sl=n(390),Ml=n(411),Dl=n(939),Bl=n.n(Dl);function Nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Al(e,t){return(Al=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hl(e);if(t){var o=Hl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ll(this,n)}}function Ll(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?zl(e):t}function zl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hl(e){return(Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Al(e,t)}(a,e);var t,n,r,o=Wl(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).onReceiveAccessTokenMessage=t.onReceiveAccessTokenMessage.bind(zl(t)),t}return t=a,(n=[{key:"onReceiveAccessTokenMessage",value:function(e){var t=this.props,n=t.handleAccessTokenMessage,r=t.url;e.data&&e.data.messageId&&e.data.messageId===r&&n(e.data)}},{key:"render",value:function(){var e=this.props.url;return e?s.a.createElement(Bl.a,{attributes:{"aria-hidden":!0,height:1,src:"".concat(e,"?origin=").concat(window.origin,"&messageId=").concat(e),style:{visibility:"hidden"},width:1},handleReceiveMessage:this.onReceiveAccessTokenMessage}):s.a.createElement(s.a.Fragment,null)}}])&&Nl(t.prototype,n),r&&Nl(t,r),a}(u.Component);function Fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ul(e,t){return(Ul=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ql(e);if(t){var o=ql(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $l(this,n)}}function $l(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ql(e){return(ql=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Vl.defaultProps={url:void 0};var Gl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ul(e,t)}(a,e);var t,n,r,o=Zl(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).released=void 0,t.window=null,t.checkIfWindowClosed=null,t}return t=a,(n=[{key:"componentDidMount",value:function(){this.openWindow()}},{key:"componentWillUnmount",value:function(){this.window&&this.window.close()}},{key:"onClose",value:function(){var e=this.props,t=e.onClose,n=e.url;this.released||(this.released=!0,clearInterval(this.checkIfWindowClosed),t(n))}},{key:"openWindow",value:function(){var e=this,t=this.props,n=t.depWindow,r=t.features,o=t.name,a=t.url;this.window=(n||window).open(a,o,r),this.released=!1,this.checkIfWindowClosed=setInterval((function(){e.window&&!e.window.closed||e.onClose()}),250)}},{key:"render",value:function(){return null}}])&&Fl(t.prototype,n),r&&Fl(t,r),a}(u.Component);Gl.defaultProps={depWindow:void 0,features:void 0,name:void 0};var Jl=n(301),Yl=n(938),Xl=n.n(Yl),Kl=n(66);function Ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ql(Object(n),!0).forEach((function(t){tu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ql(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ru(e,t){return(ru=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ou(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cu(e);if(t){var o=cu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return au(this,n)}}function au(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?iu(e):t}function iu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cu(e){return(cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ru(e,t)}(a,e);var t,n,r,o=ou(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={open:!1},t.setOpen=t.setOpen.bind(iu(t)),t.onSubmit=t.onSubmit.bind(iu(t)),t}return t=a,(n=[{key:"onSubmit",value:function(){var e=this.props.onConfirm;this.setOpen(!1),e()}},{key:"setOpen",value:function(e){this.setState((function(t){return eu(eu({},t),{},{open:e})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.classes,r=t.confirmButton,o=t.continueLabel,a=t.header,i=t.description,c=t.icon,l=t.label,u=t.t,f=t.ruleSet,p=t.hasLogoutService,d=t.status,h=t.ConfirmProps;if("ok"===d&&!p)return null;var m=this.state.open,b=s.a.createElement(O.a,Object.assign({onClick:this.onSubmit,className:n.buttonInvert,color:"secondary"},h),r||u("login"));return i||a?s.a.createElement(A.a,{square:!0,elevation:4,color:"secondary",classes:{root:n.paper}},s.a.createElement(O.a,{fullWidth:!0,className:n.topBar,onClick:function(){return e.setOpen(!0)},component:"div",color:"inherit"},c||s.a.createElement(Xl.a,{className:n.icon}),s.a.createElement(v.a,{className:n.label,component:"h3",variant:"body1",color:"inherit"},f?s.a.createElement(Kl.a,{htmlString:l,ruleSet:f}):l),s.a.createElement(Wt.a,this.props),s.a.createElement("span",{className:n.fauxButton},!m&&s.a.createElement(v.a,{variant:"button",color:"inherit"},o||u("continue")))),s.a.createElement(Yi.a,{in:m,onClose:function(){return e.setOpen(!1)}},s.a.createElement(v.a,{variant:"body1",color:"inherit",className:n.expanded},f?s.a.createElement(Kl.a,{htmlString:a,ruleSet:f}):a,a&&i?": ":"",f?s.a.createElement(Kl.a,{htmlString:i,ruleSet:f}):i),s.a.createElement(w.a,null,s.a.createElement(O.a,{onClick:function(){return e.setOpen(!1)},color:"inherit"},u("cancel")),b))):s.a.createElement(A.a,{square:!0,elevation:4,color:"secondary",classes:{root:n.paper}},s.a.createElement("div",{className:n.topBar},c||s.a.createElement(Xl.a,{className:n.icon}),s.a.createElement(v.a,{className:n.label,component:"h3",variant:"body1",color:"inherit"},f?s.a.createElement(Kl.a,{htmlString:l,ruleSet:f}):l),s.a.createElement(Wt.a,this.props),b))}}])&&nu(t.prototype,n),r&&nu(t,r),a}(u.Component);lu.defaultProps={confirmButton:void 0,ConfirmProps:{},continueLabel:void 0,description:void 0,hasLogoutService:!0,header:void 0,icon:void 0,ruleSet:"iiif",status:void 0,t:function(e){return e}};var uu=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{buttonInvert:{"&:hover":{backgroundColor:Object(Jl.fade)(e.palette.secondary.contrastText,1-e.palette.action.hoverOpacity)},backgroundColor:e.palette.secondary.contrastText,marginLeft:e.spacing(5),paddingBottom:0,paddingTop:0},expanded:{paddingLeft:e.spacing(),paddingRight:e.spacing()},failure:{backgroundColor:e.palette.error.dark},fauxButton:{marginLeft:e.spacing(2.5)},icon:{marginRight:e.spacing(1.5),verticalAlign:"text-bottom"},label:{lineHeight:2.25},paper:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText,cursor:"pointer"},topBar:{"&:hover":{backgroundColor:e.palette.secondary.main},alignItems:"center",display:"flex",justifyContent:"inherit",padding:e.spacing(1),textTransform:"none"}}})),Object(l.a)("WindowAuthenticationBar"))(lu);function su(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fu(e,t){return(fu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mu(e);if(t){var o=mu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return du(this,n)}}function du(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?hu(e):t}function hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mu(e){return(mu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fu(e,t)}(a,e);var t,n,r,o=pu(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).performLogout=t.performLogout.bind(hu(t)),t.onReceiveAccessTokenMessage=t.onReceiveAccessTokenMessage.bind(hu(t)),t}return t=a,(n=[{key:"onReceiveAccessTokenMessage",value:function(e){var t=this.props,n=t.authServiceId,r=t.accessTokenServiceId;(0,t.resolveAccessTokenRequest)(n,r,e)}},{key:"defaultAuthBarProps",value:function(){var e=this.props,t=e.authServiceId,n=e.windowId,r=e.status;return{authServiceId:t,hasLogoutService:!!e.logoutServiceId,status:r,windowId:n}}},{key:"performLogout",value:function(){var e=this.props,t=e.accessTokenServiceId,n=e.authServiceId,r=e.features,o=e.logoutServiceId,a=e.resetAuthenticationState;(0,e.openWindow)(o,void 0,r),a({authServiceId:n,tokenServiceId:t})}},{key:"renderLoggedIn",value:function(){var e=this.props,t=e.isInteractive,n=e.logoutConfirm,r=e.t;return t?s.a.createElement(uu,Object.assign({confirmButton:n||r("logout"),onConfirm:this.performLogout},this.defaultAuthBarProps())):null}},{key:"renderFailure",value:function(){var e=this.props,t=e.handleAuthInteraction,n=e.failureHeader,r=e.failureDescription,o=e.t,a=e.authServiceId,i=e.windowId;return s.a.createElement(uu,Object.assign({header:n,description:r,confirmButton:o("retry"),onConfirm:function(){return t(i,a)}},this.defaultAuthBarProps()))}},{key:"renderLoggingInCookie",value:function(){var e=this.props,t=e.accessTokenServiceId,n=e.authServiceId,r=e.resolveAuthenticationRequest,o=e.features;return s.a.createElement(s.a.Fragment,null,this.renderLogin(),s.a.createElement(Gl,{name:"IiifLoginSender",url:"".concat(n,"?origin=").concat(window.origin),features:o,onClose:function(){return r(n,t)}}))}},{key:"renderLoggingInToken",value:function(){var e=this.props.accessTokenServiceId;return s.a.createElement(s.a.Fragment,null,this.renderLogin(),s.a.createElement(Vl,{handleAccessTokenMessage:this.onReceiveAccessTokenMessage,url:e}))}},{key:"renderLogin",value:function(){var e=this.props,t=e.confirm,n=e.description,r=e.handleAuthInteraction,o=e.header,a=e.isInteractive,i=e.label,c=e.authServiceId,l=e.windowId;return a?s.a.createElement(uu,Object.assign({header:o,description:n,label:i,confirmButton:t,onConfirm:function(){return r(l,c)}},this.defaultAuthBarProps())):null}},{key:"render",value:function(){var e=this.props,t=e.authServiceId,n=e.status;return t?null===n?this.renderLogin():"cookie"===n?this.renderLoggingInCookie():"token"===n?this.renderLoggingInToken():"failed"===n?this.renderFailure():"ok"===n?this.renderLoggedIn():null:null}}])&&su(t.prototype,n),r&&su(t,r),a}(u.Component);bu.defaultProps={confirm:void 0,description:void 0,failureDescription:void 0,failureHeader:void 0,features:"centerscreen",header:void 0,isInteractive:!0,label:void 0,logoutConfirm:void 0,logoutServiceId:void 0,openWindow:window.open,status:null,t:function(e){return e}};var yu={handleAuthInteraction:Sl.a,resetAuthenticationState:Sl.e,resolveAccessTokenRequest:Sl.f,resolveAuthenticationRequest:Sl.g},vu=Object(r.compose)(Object(a.a)(),Object(o.b)((function(e,t){var n=t.windowId,r=Object(Ml.d)(e,{windowId:n})[0],o=r&&(Tl.a.getService(r,"http://iiif.io/api/auth/1/token")||Tl.a.getService(r,"http://iiif.io/api/auth/0/token")),a=r&&(Tl.a.getService(r,"http://iiif.io/api/auth/1/logout")||Tl.a.getService(r,"http://iiif.io/api/auth/0/logout")),i=Object(Ml.b)(e),c=r&&i[r.id],l=Object(Ml.a)(e),u=o&&l[o.id],s=null;c?c.isFetching?c.windowId===n&&(s="cookie"):u&&u.isFetching?c.windowId===n&&(s="token"):c.ok?s="ok":!1===c.ok&&(s="failed"):s=null;var f=Object(Ml.c)(e),p=r&&r.getProfile(),d=f.some((function(e){return e.profile===p&&!(e.external||e.kiosk)}));return{accessTokenServiceId:o&&o.id,authServiceId:r&&r.id,confirm:r&&r.getConfirmLabel(),description:r&&r.getDescription(),failureDescription:r&&r.getFailureDescription(),failureHeader:r&&r.getFailureHeader(),header:r&&r.getHeader(),isInteractive:d,label:r&&r.getLabel()[0].value,logoutConfirm:a&&a.getLabel()[0]&&a.getLabel()[0].value,logoutServiceId:a&&a.id,profile:p,status:s}}),yu),Object(l.a)("IIIFAuthentication"))(bu);function gu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wu(e,t){return(wu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ou(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Eu(e);if(t){var o=Eu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ju(this,n)}}function ju(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Eu(e){return(Eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wu(e,t)}(a,e);var t,n,r,o=Ou(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={},t}return t=a,r=[{key:"getDerivedStateFromError",value:function(e){return{error:e,hasError:!0}}}],(n=[{key:"wrappedTopBar",value:function(){var e=this.props,t=e.windowId,n=e.workspaceType,r=e.windowDraggable,o=s.a.createElement("div",null,s.a.createElement(Va,{windowId:t,windowDraggable:r}),s.a.createElement(vu,{windowId:t}));return"mosaic"===n&&r?this.context.mosaicWindowActions.connectDragSource(o):o}},{key:"render",value:function(){var e=this.props,t=e.focusWindow,n=e.label,r=e.isFetching,o=e.maximized,a=e.sideBarOpen,i=e.view,c=e.windowId,l=e.classes,u=e.t,f=e.manifestError,d=this.state,h=d.error;return d.hasError?s.a.createElement(Il,{windowId:c},s.a.createElement(Cc,{error:h,windowId:c})):s.a.createElement(A.a,{onFocus:t,component:"section",elevation:1,id:c,className:p()(l.window,Object(_t.a)("window"),o?l.maximized:null),"aria-label":u("window",{label:n})},this.wrappedTopBar(),f&&s.a.createElement(Cc,{error:{stack:f},windowId:c}),s.a.createElement("div",{className:l.middle},s.a.createElement("div",{className:l.middleLeft},s.a.createElement("div",{className:l.primaryWindow},s.a.createElement(gl,{view:i,windowId:c,isFetching:r,sideBarOpen:a})),s.a.createElement("div",{className:l.companionAreaBottom},s.a.createElement(zc,{windowId:c,position:"bottom"}))),s.a.createElement("div",{className:l.companionAreaRight},s.a.createElement(zc,{windowId:c,position:"right"}),s.a.createElement(zc,{windowId:c,position:"far-right"}))),s.a.createElement(zc,{windowId:c,position:"far-bottom"}),s.a.createElement(Wt.a,this.props))}}])&&gu(t.prototype,n),r&&gu(t,r),a}(u.Component);Cu.contextType=eo.MosaicWindowContext,Cu.defaultProps={classes:{},focusWindow:function(){},isFetching:!1,label:null,manifestError:null,maximized:!1,sideBarOpen:!1,view:void 0,windowDraggable:null,workspaceType:null};var ku=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{companionAreaBottom:{display:"flex",flex:"0",flexBasis:"auto",minHeight:0},companionAreaRight:{display:"flex",flex:"0 1 auto",minHeight:0},maximized:{},middle:{display:"flex",flex:"1",flexDirection:"row",minHeight:0},middleLeft:{display:"flex",flex:"1",flexDirection:"column",minHeight:0},primaryWindow:{display:"flex",flex:"1",height:"300px",minHeight:0,position:"relative"},thumbnailArea:{backgroundColor:e.palette.shades.dark},thumbnailAreaBottom:{},thumbnailAreaRight:{minWidth:100},window:{"&$maximized":{left:0,position:"absolute",top:0,zIndex:e.zIndex.modal-1},backgroundColor:e.palette.shades.dark,borderRadius:0,display:"flex",flexDirection:"column",height:"100%",minHeight:0,overflow:"hidden",width:"100%"}}})),Object(o.b)((function(e,t){var n=t.windowId;return{isFetching:Object(va.m)(e,{windowId:n}).isFetching,label:Object(va.o)(e,{windowId:n}),manifestError:Object(va.d)(e,{windowId:n}),maximized:(Object(Y.e)(e,{windowId:n})||{}).maximized,sideBarOpen:(Object(Y.e)(e,{windowId:n})||{}).sideBarOpen,thumbnailNavigationPosition:Object(ro.g)(e,{windowId:n}),view:Object(ir.f)(e,{windowId:n}),window:Object(Y.e)(e,{windowId:n}),windowDraggable:Object(ir.d)(e,{windowId:n}),workspaceType:Object(I.d)(e)}}),(function(e,t){var n=t.windowId;return{focusWindow:function(){return e(ar.b(n))}}})),Object(l.a)("Window"))(Cu),Pu=n(949),_u=n(945),xu=n.n(_u),Ru=n(286),Iu=n.n(Ru);function Tu(e){var t=e.t,n=e.title,r=e.windowId;return s.a.createElement(Il,{windowId:"".concat(r,"-preview"),label:t("previewWindowTitle",{title:n}),ariaLabel:!1})}function Su(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Su(Object(n),!0).forEach((function(t){Du(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Su(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Tu.defaultProps={t:function(e){return e},title:""};var Bu=Object(r.compose)(Object(c.a)((function(e){return{preview:Mu({},e.typography.h4)}})),Object(a.a)(),Object(o.b)((function(e,t){var n=t.windowId;return{title:Object(va.o)(e,{windowId:n})}}),null),Object(l.a)("MosaicRenderPreview"))(Tu),Nu=n(885),Au=n(881),Wu=n(888),Lu=n.n(Wu);function zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Hu=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.layout=t}var t,n,r;return t=e,(n=[{key:"pathToCorner",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Au.Corner.TOP_RIGHT;return Object(Au.getPathToCorner)(this.layout,e)}},{key:"pathToParent",value:function(e){return Object(Au.getNodeAtPath)(this.layout,Lu()(e))}},{key:"nodeAtPath",value:function(e){return Object(Au.getNodeAtPath)(this.layout,e)}},{key:"addWindows",value:function(e){var t=this;e.forEach((function(n,r){var o,a,i=t.pathToCorner(),c=t.pathToParent(i),l=t.nodeAtPath(i),u=c?Object(Au.getOtherDirection)(c.direction):"row";"row"===u?(o=l,a=e[r]):(o=e[r],a=l);var s={path:i,spec:{$set:{direction:u,first:o,second:a}}};t.layout=Object(Nu.updateTree)(t.layout,[s])}))}},{key:"removeWindows",value:function(e,t){var n=this,r=e.map((function(e){return Object(Nu.createRemoveUpdate)(n.layout,t[e])}));this.layout=Object(Nu.updateTree)(this.layout,r)}}])&&zu(t.prototype,n),r&&zu(t,r),e}();function Vu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fu(e,t){return(Fu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Uu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qu(e);if(t){var o=qu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zu(this,n)}}function Zu(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?$u(e):t}function $u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(e){return(qu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fu(e,t)}(a,e);var t,n,r,o=Uu(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).tileRenderer=t.tileRenderer.bind($u(t)),t.mosaicChange=t.mosaicChange.bind($u(t)),t.determineWorkspaceLayout=t.determineWorkspaceLayout.bind($u(t)),t.zeroStateView=s.a.createElement("div",null),t.windowPaths={},t.toolbarControls=[],t.additionalControls=[],t}return t=a,r=[{key:"renderPreview",value:function(e){return s.a.createElement("div",{className:"mosaic-preview","aria-hidden":!0},s.a.createElement(Bu,{windowId:e.windowId}))}}],(n=[{key:"componentDidMount",value:function(){var e=this.props.updateWorkspaceMosaicLayout,t=this.determineWorkspaceLayout();t&&e(t)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.windowIds,r=t.layout,o=t.updateWorkspaceMosaicLayout,a=e.windowIds;if(n.every((function(e){return a.includes(e)}))){if(!a.every((function(e){return n.includes(e)}))){if(0===n.length)return void o(null);var i=xu()(a,n),c=new Hu(r);c.removeWindows(i,this.windowPaths),o(c.layout)}}else{var l=this.determineWorkspaceLayout();Iu()(l,r)||o(l)}}},{key:"bookkeepPath",value:function(e,t){this.windowPaths[e]=t}},{key:"determineWorkspaceLayout",value:function(){var e=this.props,t=e.windowIds,n=e.layout,r=Object(Pu.getLeaves)(n);if(!t.every((function(e){return r.includes(e)}))){if(r.length<2)return Object(Pu.createBalancedTreeFromLeaves)(t);var o=xu()(t,r),a=new Hu(n);return a.addWindows(o),a.layout}return r.every((function(e){return t.includes(e)}))?n:Object(Pu.createBalancedTreeFromLeaves)(t)}},{key:"tileRenderer",value:function(e,t){var n=this.props,r=n.windowIds,o=n.workspaceId;return r.includes(e)?(this.bookkeepPath(e,t),s.a.createElement(Pu.MosaicWindow,{toolbarControls:this.toolbarControls,additionalControls:this.additionalControls,path:t,windowId:e,renderPreview:a.renderPreview},s.a.createElement(ku,{key:"".concat(e,"-").concat(o),windowId:e}))):null}},{key:"mosaicChange",value:function(e){(0,this.props.updateWorkspaceMosaicLayout)(e)}},{key:"render",value:function(){var e=this.props,t=e.layout,n=e.classes;return s.a.createElement(Pu.MosaicWithoutDragDropContext,{renderTile:this.tileRenderer,initialValue:t||this.determineWorkspaceLayout(),onChange:this.mosaicChange,className:p()("mirador-mosaic",n.root),zeroStateView:this.zeroStateView})}}])&&Vu(t.prototype,n),r&&Vu(t,r),a}(s.a.Component);Gu.defaultProps={layout:void 0,windowIds:[]};var Ju={"@global":{".mosaic":{height:"100%",width:"100%"},".mosaic, .mosaic > *":{boxSizing:"border-box"},".mosaic .mosaic-zero-state":{position:"absolute",top:6,right:6,bottom:6,left:6,width:"auto",height:"auto",zIndex:"1"},".mosaic-root":{position:"absolute",top:3,right:3,bottom:3,left:3},".mosaic-split":{position:"absolute",zIndex:"1",touchAction:"none"},".mosaic-split:hover":{background:"black"},".mosaic-split .mosaic-split-line":{position:"absolute"},".mosaic-split.-row":{marginLeft:-3,width:6,cursor:"ew-resize"},".mosaic-split.-row .mosaic-split-line":{top:"0",bottom:"0",left:3,right:3},".mosaic-split.-column":{marginTop:-3,height:6,cursor:"ns-resize"},".mosaic-split.-column .mosaic-split-line":{top:3,bottom:3,left:"0",right:"0"},".mosaic-tile":{position:"absolute",margin:3},".mosaic-tile > *":{height:"100%",width:"100%"},".mosaic-drop-target":{position:"relative"},".mosaic-drop-target.drop-target-hover .drop-target-container":{display:"block"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.left":{right:"calc(100% - 10px )"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.right":{left:"calc(100% - 10px )"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.bottom":{top:"calc(100% - 10px )"},".mosaic-drop-target.mosaic > .drop-target-container .drop-target.top":{bottom:"calc(100% - 10px )"},".mosaic-drop-target .drop-target-container":{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"none"},".mosaic-drop-target .drop-target-container.-dragging":{display:"block"},".mosaic-drop-target .drop-target-container .drop-target":{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",background:"rgba(0, 0, 0, 0.2)",border:"2px solid black",opacity:"0",zIndex:"5"},".mosaic-drop-target .drop-target-container .drop-target.left":{right:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.right":{left:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.bottom":{top:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.top":{bottom:"calc(100% - 30% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover":{opacity:"1"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.left":{right:"calc(100% - 50% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.right":{left:"calc(100% - 50% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.bottom":{top:"calc(100% - 50% )"},".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.top":{bottom:"calc(100% - 50% )"},".mosaic-window, .mosaic-preview":{position:"relative",display:"flex",fallbacks:[{display:"-webkit-box"}],webkitBoxOrient:"vertical",webkitBoxDirection:"normal",flexDirection:"column",overflow:"hidden",boxShadow:"0 0 1px rgba(0, 0, 0, 0.2)"},".mosaic-window .mosaic-window-toolbar, .mosaic-preview .mosaic-window-toolbar":{zIndex:"4",display:"flex",fallbacks:[{display:"-webkit-box"}],webkitBoxPack:"justify",justifyContent:"space-between",webkitBoxAlign:"center",alignItems:"center",flexShrink:"0",height:30,background:"white",boxShadow:"0 1px 1px rgba(0, 0, 0, 0.2)"},".mosaic-window .mosaic-window-toolbar.draggable, .mosaic-preview .mosaic-window-toolbar.draggable":{cursor:"move"},".mosaic-window .mosaic-window-title, .mosaic-preview .mosaic-window-title":{paddingLeft:15,webkitBoxFlex:"1",flex:"1",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",minHeight:18},".mosaic-window .mosaic-window-controls, .mosaic-preview .mosaic-window-controls":{display:"flex",fallbacks:[{display:"-webkit-box"}],height:"100%"},".mosaic-window .mosaic-window-controls .separator, .mosaic-preview .mosaic-window-controls .separator":{height:20,borderLeft:"1px solid black",margin:"5px 4px"},".mosaic-window .mosaic-window-body, .mosaic-preview .mosaic-window-body":{position:"relative",webkitBoxFlex:"1",flex:"1",height:"0",background:"white",zIndex:"1",overflow:"hidden"},".mosaic-window .mosaic-window-additional-actions-bar, .mosaic-preview .mosaic-window-additional-actions-bar":{position:"absolute",top:30,right:"0",bottom:"initial",left:"0",height:"0",overflow:"hidden",background:"white",webkitBoxPack:"end",justifyContent:"flex-end",display:"flex",fallbacks:[{display:"-webkit-box"}],zIndex:"3"},".mosaic-window .mosaic-window-additional-actions-bar .bp3-button, .mosaic-preview .mosaic-window-additional-actions-bar .bp3-button":{margin:"0"},".mosaic-window .mosaic-window-additional-actions-bar .bp3-button:after, .mosaic-preview .mosaic-window-additional-actions-bar .bp3-button:after":{display:"none"},".mosaic-window .mosaic-window-body-overlay, .mosaic-preview .mosaic-window-body-overlay":{position:"absolute",top:"0",right:"0",bottom:"0",left:"0",opacity:"0",background:"white",display:"none",zIndex:"2"},".mosaic-window.additional-controls-open .mosaic-window-additional-actions-bar, .mosaic-preview.additional-controls-open .mosaic-window-additional-actions-bar":{height:30},".mosaic-window.additional-controls-open .mosaic-window-body-overlay, .mosaic-preview.additional-controls-open .mosaic-window-body-overlay":{display:"block"},".mosaic-window .mosaic-preview, .mosaic-preview .mosaic-preview":{height:"100%",width:"100%",position:"absolute",zIndex:"0",border:"1px solid black",maxHeight:400},".mosaic-window .mosaic-preview .mosaic-window-body, .mosaic-preview .mosaic-preview .mosaic-window-body":{display:"flex",fallbacks:[{display:"-webkit-box"}],webkitBoxOrient:"vertical",webkitBoxDirection:"normal",flexDirection:"column",webkitBoxAlign:"center",alignItems:"center",webkitBoxPack:"center",justifyContent:"center"},".mosaic-window .mosaic-preview h4, .mosaic-preview .mosaic-preview h4":{marginBottom:10},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.close-button:before":{content:"'Close'"},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.split-button:before":{content:"'Split'"},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.replace-button:before":{content:"'Replace'"},".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.expand-button:before":{content:"'Expand'"}}};function Yu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ku={updateWorkspaceMosaicLayout:J.h},Qu=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yu(Object(n),!0).forEach((function(t){Xu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({root:{"& .mosaic-preview":{boxShadow:"none"},"& .mosaic-tile":{boxShadow:"0 1px 3px 0 rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .2), 0 2px 1px -1px rgba(0, 0, 0, .2)"},"& .mosaic-window":{boxShadow:"none"},"& .mosaic-window-toolbar":{display:"none !important"}}},Ju),es=Object(r.compose)(Object(c.a)(Qu),Object(o.b)((function(e){return{layout:Object(Y.i)(e).layout,windowIds:Object(Y.i)(e).windowIds,workspaceId:Object(Y.i)(e).id}}),Ku),Object(l.a)("WorkspaceMosaic"))(Gu),ts=n(391),ns=n(304),rs=n(933),os=n.n(rs);function as(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function is(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cs(e,t){return(cs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ls(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ss(e);if(t){var o=ss(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return us(this,n)}}function us(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ss(e){return(ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cs(e,t)}(a,e);var t,n,r,o=ls(a);function a(){return as(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.companionWindowDimensions,r=e.focused,o=e.layout,a=e.workspace,i=e.updateElasticWindowLayout,c=a.width/2,l=a.height/2;return s.a.createElement(ns.a,{key:"".concat(o.windowId,"-").concat(a.id),size:{height:o.height+n.height,width:o.width+n.width},position:{x:o.x+c,y:o.y+l},bounds:"parent",onDragStop:function(e,t){i(o.windowId,{x:t.x-c,y:t.y-l})},onResize:function(e,t,r,a,u){i(o.windowId,{height:Number.parseInt(r.style.height,10)-n.height,width:Number.parseInt(r.style.width,10)-n.width,x:u.x-c,y:u.y-l})},dragHandleClassName:Object(_t.a)("window-top-bar"),className:r?t.focused:null},s.a.createElement(ku,{windowId:o.windowId}))}}])&&is(t.prototype,n),r&&is(t,r),a}(s.a.Component);fs.defaultProps={classes:{},companionWindowDimensions:{height:0,width:0},focused:!1};var ps=fs,ds=Object(r.compose)(Object(c.a)((function(e){return{focused:{zIndex:e.zIndex.modal-1}}})),Object(o.b)((function(e,t){var n=t.windowId;return{companionWindowDimensions:Object(ro.h)(e,{windowId:n}),focused:Object(I.e)(e,{windowId:n}),layout:Object(I.a)(e)[n],workspace:Object(Y.i)(e)}}),(function(e,t){return{updateElasticWindowLayout:function(t,n){e(ts.a(t,n))}}})))(ps);function hs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bs(e,t){return(bs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ys(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gs(e);if(t){var o=gs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vs(this,n)}}function vs(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gs(e){return(gs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ws=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bs(e,t)}(a,e);var t,n,r,o=ys(a);function a(){return hs(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.workspace,r=e.elasticLayout,o=e.setWorkspaceViewportDimensions,a=e.setWorkspaceViewportPosition,i=n.viewportPosition,c=n.width/2,l=n.height/2;return s.a.createElement("div",{style:{height:"100%",position:"relative",width:"100%"}},s.a.createElement(os.a,{onResize:function(e){o(e)}}),s.a.createElement(ns.a,{size:{height:n.height,width:n.width},position:{x:-1*i.x-c,y:-1*i.y-l},enableResizing:{bottom:!1,bottomLeft:!1,bottomRight:!1,left:!1,right:!1,top:!1,topLeft:!1,topRight:!1},onDragStop:function(e,t){a({x:-1*t.x-c,y:-1*t.y-l})},cancel:".".concat(Object(_t.a)("window")),className:p()(t.workspace,Object(_t.a)("workspace")),disableDragging:!n.draggingEnabled},Object.keys(r).map((function(e){return s.a.createElement(ds,{key:e,windowId:e})}))))}}])&&ms(t.prototype,n),r&&ms(t,r),a}(s.a.Component),Os=Object(r.compose)(Object(c.a)({workspace:{boxSizing:"border-box",margin:0,position:"absolute",transitionDuration:".7s","& .react-draggable-dragging":{transitionDuration:"unset"}}}),Object(o.b)((function(e){return{elasticLayout:Object(I.a)(e),workspace:Object(Y.i)(e)}}),(function(e,t){return{setWorkspaceViewportDimensions:function(t){e(J.c(t))},setWorkspaceViewportPosition:function(t){e(J.d(t))},updateElasticWindowLayout:function(t,n){e(ts.a(t,n))}}})),Object(l.a)("WorkspaceElastic"))(ws),js=n(932),Es=n.n(js),Cs=n(215),ks=n(111),Ps=n(515),_s=n(911);function xs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||Is(e,t)||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.")}()}function Rs(e){return function(e){if(Array.isArray(e))return Ts(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Is(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Is(e,t){if(e){if("string"==typeof e)return Ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ts(e,t):void 0}}function Ts(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}var Ss=function(e,t,n){var r=n.onDrop;if(e.urls&&e.urls.forEach((function(e){var o=new URL(e),a=o.searchParams.get("manifest"),i=o.searchParams.get("canvas");a&&r({canvasId:i,manifestId:a},n,t)})),e.files){var o,a=e.files.filter((function(e){return"application/json"===e.type})).map((function(e){return new Promise((function(o,a){var i=new FileReader;i.addEventListener("load",(function(){var e=i.result,a=Object(ks.a)();e&&r({manifestId:a,manifestJson:e},n,t),o()})),i.readAsText(e)}))})),i=e.files.filter((function(e){return e.type.startsWith("image/")}));if(i.length>0){var c=Object(ks.a)(),l=i.map((function(e){return function(e){return new Promise((function(t,n){var r=new FileReader;r.addEventListener("load",(function(){var n=new Image;n.addEventListener("load",(function(){t({height:n.height,name:e.name,type:e.type,url:r.result,width:n.width})})),n.src=r.result})),r.readAsDataURL(e)}))}(e)}));o=Promise.all(l).then((function(e){var o={"@context":"http://iiif.io/api/presentation/3/context.json",id:c,items:e.map((function(e,t){var n=e.name,r=e.type,o=e.width,a=e.height,i=e.url;return{height:a,id:"".concat(c,"/canvas/").concat(t),items:[{id:"".concat(c,"/canvas/").concat(t,"/1"),items:[{body:{format:r,id:i,type:"Image"},height:a,id:"".concat(c,"/canvas/").concat(t,"/1/image"),motivation:"painting",target:"".concat(c,"/canvas/").concat(t,"/1"),type:"Annotation",width:o}],type:"AnnotationPage"}],label:n,type:"Canvas",width:o}})),label:e[0].name,type:"Manifest"},a=Object(ks.a)();o&&r({manifestId:a,manifestJson:o},n,t)}))}return Promise.all([].concat(Rs(a),[o]))}},Ms=function(e){var t=e.children,n=e.onDrop,r=xs(Object(_s.a)({accept:[Ps.NativeTypes.URL,Ps.NativeTypes.FILE],collect:function(e){return{canDrop:e.canDrop(),isOver:e.isOver()}},drop:function(t,r){n&&Ss(t,r,e)}}),2),o=r[0],a=o.canDrop,i=o.isOver,c=r[1],l=a&&i;return s.a.createElement("div",{ref:c,onDrop:function(t){if(window.safari&&n&&t.dataTransfer&&t.dataTransfer.types.includes("Files")&&t.dataTransfer.types.includes("text/uri-list")){var r=t.dataTransfer.getData("text/uri-list");if(!r)return;Ss({urls:[r]},null,e)}},style:{height:"100%",width:"100%"}},t,s.a.createElement(Za.a,{open:l,style:{zIndex:9999}},s.a.createElement(Es.a,{style:{color:Cs.a[400],fontSize:256}})))};function Ds(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bs(e,t){return(Bs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ns(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ls(e);if(t){var o=Ls(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return As(this,n)}}function As(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Ws(e):t}function Ws(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ls(e){return(Ls=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bs(e,t)}(a,e);var t,n,r,o=Ns(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).handleDrop=t.handleDrop.bind(Ws(t)),t}return t=a,(n=[{key:"handleDrop",value:function(e,t,n){var r=e.canvasId,o=e.manifestId,a=e.manifestJson,i=this.props,c=i.addWindow;i.allowNewWindows&&c({canvasId:r,manifest:a,manifestId:o})}},{key:"workspaceByType",value:function(){var e=this.props,t=e.workspaceId,n=e.workspaceType,r=e.windowIds;if(this.maximizedWindows())return this.maximizedWindows();if(0===r.length)return this.zeroWindows();switch(n){case"elastic":return s.a.createElement(Os,null);case"mosaic":return s.a.createElement(es,null);default:return r.map((function(e){return s.a.createElement(ku,{key:"".concat(e,"-").concat(t),windowId:e})}))}}},{key:"zeroWindows",value:function(){var e=this.props.t;return s.a.createElement(Qr.a,{alignItems:"center",container:!0,style:{height:"100%"}},s.a.createElement(Qr.a,{xs:12,item:!0},s.a.createElement(v.a,{variant:"h1",component:"div",align:"center"},e("welcome"))))}},{key:"maximizedWindows",value:function(){var e=this.props,t=e.maximizedWindowIds,n=e.workspaceId;return t.length>0&&t.map((function(e){return s.a.createElement(ku,{key:"".concat(e,"-").concat(n),windowId:e,className:p()(Object(_t.a)("workspace-maximized-window"))})}))}},{key:"render",value:function(){var e=this.props,t=e.classes,n=e.isWorkspaceControlPanelVisible,r=e.t;return s.a.createElement(Ms,{onDrop:this.handleDrop},s.a.createElement("div",{className:p()(Object(_t.a)("workspace-viewport"),n&&Object(_t.a)("workspace-with-control-panel"),n&&t.workspaceWithControlPanel,t.workspaceViewport)},s.a.createElement(v.a,{variant:"srOnly",component:"h1"},r("miradorViewer")),this.workspaceByType()))}}])&&Ds(t.prototype,n),r&&Ds(t,r),a}(s.a.Component);zs.defaultProps={addWindow:function(){},allowNewWindows:!0,maximizedWindowIds:[],windowIds:[]};var Hs={addWindow:ar.a},Vs=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{workspaceViewport:{bottom:0,left:0,margin:0,overflow:"hidden",position:"absolute",right:0,top:0},workspaceWithControlPanel:{paddingTop:74},"@media (min-width: 600px)":{workspaceWithControlPanel:{paddingLeft:68,paddingTop:0}}}})),Object(o.b)((function(e){return{allowNewWindows:Object(Ie.a)(e).workspace.allowNewWindows,isWorkspaceControlPanelVisible:Object(Ie.a)(e).workspaceControlPanel.enabled,maximizedWindowIds:Object(ir.b)(e),windowIds:Object(Y.f)(e),workspaceId:Object(Y.i)(e).id,workspaceType:Object(I.d)(e)}}),Hs),Object(l.a)("Workspace"))(zs),Fs=n(394),Us=n(803);function Zs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $s(e,t){return($s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ys(e);if(t){var o=Ys(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gs(this,n)}}function Gs(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Js(e):t}function Js(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ys(e){return(Ys=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$s(e,t)}(a,e);var t,n,r,o=qs(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={formValue:""},t.formSubmit=t.formSubmit.bind(Js(t)),t.handleCancel=t.handleCancel.bind(Js(t)),t.handleInputChange=t.handleInputChange.bind(Js(t)),t}return t=a,(n=[{key:"handleCancel",value:function(){(0,this.props.onCancel)(),this.setState({formValue:""})}},{key:"handleInputChange",value:function(e){e.preventDefault(),this.setState({formValue:e.target.value})}},{key:"formSubmit",value:function(e){var t=this.props,n=t.addResource,r=t.onSubmit,o=this.state.formValue;e.preventDefault(),r(),n(o),this.setState({formValue:""})}},{key:"render",value:function(){var e=this.state.formValue,t=this.props,n=t.addResourcesOpen,r=t.classes,o=t.onCancel,a=t.t;return n?s.a.createElement("form",{onSubmit:this.formSubmit},s.a.createElement(Qr.a,{container:!0,spacing:2},s.a.createElement(Qr.a,{item:!0,xs:12,sm:8,md:9},s.a.createElement(Tn.a,{autoFocus:!0,fullWidth:!0,value:e,id:"manifestURL",type:"text",onChange:this.handleInputChange,variant:"filled",label:a("addManifestUrl"),helperText:a("addManifestUrlHelp"),InputLabelProps:{shrink:!0},InputProps:{className:r.input}})),s.a.createElement(Qr.a,{item:!0,xs:12,sm:4,md:3,className:r.buttons},o&&s.a.createElement(O.a,{onClick:this.handleCancel},a("cancel")),s.a.createElement(O.a,{id:"fetchBtn",type:"submit",variant:"contained",color:"primary"},a("fetchManifest"))))):null}}])&&Zs(t.prototype,n),r&&Zs(t,r),a}(u.Component);function Ks(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ks(Object(n),!0).forEach((function(t){ef(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ef(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xs.defaultProps={classes:{},onCancel:null,onSubmit:function(){},t:function(e){return e}};var tf={addResource:Fs.a},nf=Object(r.compose)(Object(c.a)((function(e){return{buttons:ef({textAlign:"right"},e.breakpoints.up("sm"),{textAlign:"inherit"}),input:Qs({},e.typography.body1)}})),Object(a.a)(),Object(o.b)(null,tf),Object(l.a)("ManifestForm"))(Xs),rf=n(386),of=n(804),af=n(413);function cf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uf(e,t){return(uf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pf(e);if(t){var o=pf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ff(this,n)}}function ff(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pf(e){return(pf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var df=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uf(e,t)}(a,e);var t,n,r,o=sf(a);function a(){return cf(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.manifestId,r=e.onDismissClick,o=e.onTryAgainClick,a=e.t;return s.a.createElement(Qr.a,{container:!0},s.a.createElement(Qr.a,{container:!0},s.a.createElement(Qr.a,{container:!0,item:!0,xs:12,sm:6},s.a.createElement(Qr.a,{item:!0,xs:4,sm:3},s.a.createElement(Qr.a,{container:!0,justify:"center"},s.a.createElement(Oa.a,{className:t.errorIcon}))),s.a.createElement(Qr.a,{item:!0,xs:8,sm:9},s.a.createElement(v.a,null,a("manifestError")),s.a.createElement(v.a,{className:t.manifestIdText},n)))),s.a.createElement(Qr.a,{container:!0},s.a.createElement(Qr.a,{container:!0,item:!0,xs:12,sm:6,justify:"flex-end"},s.a.createElement(Qr.a,{item:!0},s.a.createElement(O.a,{onClick:function(){r(n)}},a("dismiss")),s.a.createElement(O.a,{onClick:function(){o(n)}},a("tryAgain"))))))}}])&&lf(t.prototype,n),r&&lf(t,r),a}(u.Component),hf={onDismissClick:Fs.b,onTryAgainClick:rf.a},mf=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{errorIcon:{color:e.palette.error.main,height:"2rem",width:"2rem"},manifestIdText:{wordBreak:"break-all"}}})),Object(o.b)(null,hf),Object(l.a)("ManifestListItemError"))(df);function bf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yf(e,t){return(yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Of(e);if(t){var o=Of(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gf(this,n)}}function gf(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?wf(e):t}function wf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Of(e){return(Of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yf(e,t)}(a,e);var t,n,r,o=vf(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).handleOpenButtonClick=t.handleOpenButtonClick.bind(wf(t)),t}return t=a,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchManifest,n=e.manifestId,r=e.ready,o=e.isFetching,a=e.error,i=e.provider;r||a||o||"file"===i||t(n)}},{key:"handleOpenButtonClick",value:function(){var e=this.props,t=e.addWindow,n=e.handleClose;t({manifestId:e.manifestId}),n()}},{key:"render",value:function(){var e=this.props,t=e.active,n=e.buttonRef,r=e.manifestId,o=e.ready,a=e.title,i=e.thumbnail,c=e.manifestLogo,l=e.size,u=e.classes,f=e.provider,p=e.t,d=e.error,h=e.isCollection,m=e.isMultipart,b=s.a.createElement(Qr.a,{container:!0,className:Object(_t.a)("manifest-list-item"),spacing:2},s.a.createElement(Qr.a,{item:!0,xs:3,sm:2},s.a.createElement(ga.a,{className:u.placeholder,variant:"rect",height:80,width:120})),s.a.createElement(Qr.a,{item:!0,xs:9,sm:6},s.a.createElement(ga.a,{className:u.placeholder,variant:"text"})),s.a.createElement(Qr.a,{item:!0,xs:8,sm:2},s.a.createElement(ga.a,{className:u.placeholder,variant:"text"}),s.a.createElement(ga.a,{className:u.placeholder,variant:"text"})),s.a.createElement(Qr.a,{item:!0,xs:4,sm:2},s.a.createElement(ga.a,{className:u.placeholder,variant:"rect",height:60,width:60})));return d?s.a.createElement(of.a,{divider:!0,className:u.root,"data-manifestid":r},s.a.createElement(mf,{manifestId:r})):s.a.createElement(of.a,{divider:!0,className:[u.root,t?u.active:""].join(" "),"data-manifestid":r},o?s.a.createElement(Qr.a,{container:!0,className:Object(_t.a)("manifest-list-item"),spacing:2},s.a.createElement(Qr.a,{item:!0,xs:12,sm:6,className:u.buttonGrid},s.a.createElement(X.a,{ref:n,className:Object(_t.a)("manifest-list-item-title"),style:{width:"100%"},onClick:this.handleOpenButtonClick},s.a.createElement(Qr.a,{container:!0,spacing:2,className:u.label,component:"span"},s.a.createElement(Qr.a,{item:!0,xs:4,sm:3,component:"span"},s.a.createElement(af.Img,{className:[u.thumbnail,Object(_t.a)("manifest-list-item-thumb")].join(" "),src:[i],alt:"",height:"80",unloader:s.a.createElement(ga.a,{variant:"rect",animation:!1,className:u.placeholder,height:80,width:120})})),s.a.createElement(Qr.a,{item:!0,xs:8,sm:9,component:"span"},h&&s.a.createElement(v.a,{component:"div",variant:"overline"},p(m?"multipartCollection":"collection")),s.a.createElement(v.a,{component:"span",variant:"h6"},a||r))))),s.a.createElement(Qr.a,{item:!0,xs:8,sm:4},s.a.createElement(v.a,{className:Object(_t.a)("manifest-list-item-provider")},f||p("addedFromUrl")),s.a.createElement(v.a,null,p("numItems",{number:l}))),s.a.createElement(Qr.a,{item:!0,xs:4,sm:2},s.a.createElement(af.Img,{src:[c],alt:"",role:"presentation",className:u.logo,unloader:s.a.createElement(ga.a,{variant:"rect",animation:!1,className:u.placeholder,height:60,width:60})}))):b)}}])&&bf(t.prototype,n),r&&bf(t,r),a}(s.a.Component);function Ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ef(Object(n),!0).forEach((function(t){kf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ef(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}jf.defaultProps={active:!1,buttonRef:void 0,classes:{},error:null,handleClose:function(){},isCollection:!1,isFetching:!1,isMultipart:!1,manifestLogo:null,provider:null,ready:!1,size:0,t:function(e){return e},thumbnail:null,title:null};var Pf={addWindow:ar.a,fetchManifest:rf.a},_f=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{active:{},buttonGrid:{},label:{textAlign:"left",textTransform:"initial"},logo:{height:"2.5rem",maxWidth:"100%",objectFit:"contain",paddingRight:8},placeholder:{backgroundColor:e.palette.grey[300]},root:Cf(Cf({},e.mixins.gutters()),{},{"&$active":{borderLeft:"4px solid ".concat(e.palette.primary.main)},"&:hover,&:focus-within":{"&$active":{borderLeft:"4px solid ".concat(e.palette.primary.main)},backgroundColor:e.palette.action.hover,borderLeft:"4px solid ".concat(e.palette.action.hover)},borderLeft:"4px solid transparent"}),thumbnail:{maxWidth:"100%",objectFit:"contain"}}})),Object(o.b)((function(e,t){var n=t.manifestId,r=t.provider,o=Object(Y.b)(e,{manifestId:n})||{},a=Object(va.q)(e,{manifestId:n}),i=(a||{isCollection:function(){return!1}}).isCollection(),c=i?a.getTotalItems():Object(Fa.f)(e,{manifestId:n}).length;return{active:Object(Y.g)(e).includes(n),error:o.error,isCollection:i,isFetching:o.isFetching,isMultipart:i&&Object(Hc.c)(e,{manifestId:n}).includes("multi-part"),manifestLogo:Object(va.g)(e,{manifestId:n}),provider:r||Object(va.i)(e,{manifestId:n}),ready:!!o.json,size:c,thumbnail:Object(va.n)(e,{manifestId:n}),title:Object(va.o)(e,{manifestId:n})}}),Pf),Object(l.a)("ManifestListItem"))(jf);function xf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rf(e,t){return(Rf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function If(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mf(e);if(t){var o=Mf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Tf(this,n)}}function Tf(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Sf(e):t}function Sf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mf(e){return(Mf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Df=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rf(e,t)}(a,e);var t,n,r,o=If(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={addResourcesOpen:!1},t.ref=s.a.createRef(),t.onSubmit=t.onSubmit.bind(Sf(t)),t.setAddResourcesVisibility=t.setAddResourcesVisibility.bind(Sf(t)),t.handleDrop=t.handleDrop.bind(Sf(t)),t}return t=a,(n=[{key:"handleDrop",value:function(e,t,n){var r=e.manifestId,o=e.manifestJson,a=this.props.addResource;o?a(r,o,{provider:"file"}):a(r),this.scrollToTop()}},{key:"onSubmit",value:function(){this.setAddResourcesVisibility(!1),this.scrollToTop()}},{key:"setAddResourcesVisibility",value:function(e){this.setState({addResourcesOpen:e})}},{key:"scrollToTop",value:function(){this.ref.current&&this.ref.current.scrollTo({behavior:"smooth",left:0,top:0})}},{key:"render",value:function(){var e,t,n,r=this,o=this.props,a=o.catalog,i=o.setWorkspaceAddVisibility,c=o.t,l=o.classes,u=this.state.addResourcesOpen,f=a.map((function(e,t){return s.a.createElement(_f,Object.assign({},0===t&&{buttonRef:function(e){return e&&e.focus()}},{key:e.manifestId,manifestId:e.manifestId,provider:e.provider,handleClose:function(){return i(!1)}}))}));return s.a.createElement(Ms,{onDrop:this.handleDrop},s.a.createElement("div",{ref:this.ref,className:p()(Object(_t.a)("workspace-add"),l.workspaceAdd)},a.length<1?s.a.createElement(Qr.a,{alignItems:"center",container:!0,style:{height:"100%"}},s.a.createElement(Qr.a,{xs:12,item:!0},s.a.createElement(v.a,{variant:"h1",component:"div",align:"center"},c("emptyResourceList")))):s.a.createElement(A.a,{className:l.list},s.a.createElement(v.a,{variant:"srOnly",component:"h1"},c("miradorResources")),s.a.createElement(Wt.a,this.props),s.a.createElement(Us.a,{disablePadding:!0},f)),s.a.createElement(Q,{variant:"extended",disabled:u,className:p()(l.fab,Object(_t.a)("add-resource-button")),color:"primary",onClick:function(){return r.setAddResourcesVisibility(!0)}},s.a.createElement(ne.a,null),c("addResource")),s.a.createElement(ri,{className:p()((e={},t=l.displayNone,n=!u,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),classes:{paper:l.paper},variant:"persistent",anchor:"bottom",open:u,ModalProps:{disablePortal:!0,hideBackdrop:!0,style:{position:"absolute"}}},s.a.createElement(A.a,{className:l.form},s.a.createElement(L,{position:"absolute",color:"primary",onClick:function(){return r.setAddResourcesVisibility(!1)}},s.a.createElement(z.a,{variant:"dense"},s.a.createElement(ve.a,{"aria-label":c("closeAddResourceForm"),className:l.menuButton,color:"inherit"},s.a.createElement(Je.a,null)),s.a.createElement(v.a,{variant:"h2",noWrap:!0,color:"inherit",className:l.typographyBody},c("addResource")))),s.a.createElement(nf,{addResourcesOpen:u,onSubmit:this.onSubmit,onCancel:function(){return r.setAddResourcesVisibility(!1)}})))))}}])&&xf(t.prototype,n),r&&xf(t,r),a}(s.a.Component);function Bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bf(Object(n),!0).forEach((function(t){Af(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Af(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Df.defaultProps={addResource:function(){},catalog:[],classes:{},t:function(e){return e}};var Wf={addResource:Fs.a,setWorkspaceAddVisibility:J.a},Lf=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{displayNone:{display:"none"},fab:{bottom:e.spacing(2),position:"absolute",right:e.spacing(2)},form:Nf(Nf({},e.mixins.gutters()),{},{left:"0",marginTop:48,paddingBottom:e.spacing(2),paddingTop:e.spacing(2),right:"0"}),list:{margin:"16px"},menuButton:{marginLeft:-12,marginRight:20},paper:Af({borderTop:"0",left:"0"},e.breakpoints.up("sm"),{left:"65px"}),typographyBody:{flexGrow:1},workspaceAdd:{boxSizing:"border-box",height:"100%",overflowX:"hidden",overflowY:"auto",paddingTop:68},"@media (min-width: 600px)":{workspaceAdd:{paddingLeft:68,paddingTop:0}}}})),Object(o.b)((function(e){return{catalog:Object(Y.a)(e)}}),Wf),Object(l.a)("WorkspaceAdd"))(Df),zf=function(e){return s.a.createElement("div",{className:Object(_t.a)("background-plugin-area"),style:{display:"none"}},s.a.createElement(Wt.a,e))};zf.defaultProps={PluginComponents:[]};var Hf=Object(l.a)("BackgroundPluginArea")(zf);function Vf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uf(e,t){return(Uf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qf(e);if(t){var o=qf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $f(this,n)}}function $f(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qf(e){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uf(e,t)}(a,e);var t,n,r,o=Zf(a);function a(){return Vf(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props,t=e.classes,n=e.controlPanelVariant,r=e.isWorkspaceAddVisible,o=e.isWorkspaceControlPanelVisible,a=e.lang,i=e.t;return s.a.createElement(s.a.Fragment,null,o&&s.a.createElement(Kr,{variant:n}),s.a.createElement("main",{className:p()(t.viewer,Object(_t.a)("viewer")),lang:a,"aria-label":i("workspace")},r?s.a.createElement(Lf,null):s.a.createElement(Vs,null),s.a.createElement(S,null),s.a.createElement(Hf,null)))}}])&&Ff(t.prototype,n),r&&Ff(t,r),a}(u.Component);Gf.defaultProps={controlPanelVariant:void 0,isWorkspaceAddVisible:!1,lang:void 0};var Jf=Object(r.compose)(Object(a.a)(),Object(c.a)((function(e){return{viewer:{background:("light"===e.palette.type?i.a:i.e)(e.palette.shades.light,.1),bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0}}})),Object(o.b)((function(e){return{controlPanelVariant:Object(Y.i)(e).isWorkspaceAddVisible||Object(Y.f)(e).length>0?void 0:"wide",isWorkspaceAddVisible:Object(Y.i)(e).isWorkspaceAddVisible,isWorkspaceControlPanelVisible:Object(Ie.a)(e).workspaceControlPanel.enabled,lang:Object(Ie.a)(e).language}})),Object(l.a)("WorkspaceArea"));t.default=Jf(Gf)}}]);
//# sourceMappingURL=2.938bcfd1.js.map