From 33438aa9ebe6ec1ef17c8409148a70a0492ade63 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 23 Feb 2022 23:32:22 -0500 Subject: [PATCH] chore: rebuild web UI --- .../Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js | 1 - .../QSRiaQhndGNrvMGSHQWys/_buildManifest.js | 1 + .../_middlewareManifest.js | 1 + .../_ssgManifest.js | 0 .../static/chunks/145-170d45ccc7e94584.js | 1 + .../static/chunks/204.04ef0f70c11fb4c25e5c.js | 1 - .../static/chunks/291-3b847a192c168e5d.js | 1 + .../static/chunks/321-7f3df35ed02396a1.js | 1 + .../static/chunks/322-e03452a20da601e702f9.js | 1 - .../static/chunks/346-7248b9c59d3df20dd85d.js | 1 - .../static/chunks/460.91d31c8392f2cdc4.js | 1 + .../static/chunks/665.f31a7a875323621f.js | 1 + .../static/chunks/97.4025a661f871d4b5b823.js | 1 - .../chunks/framework-5f4595e5518b5600.js | 1 + .../chunks/framework-c93ed74a065331c4bd75.js | 1 - .../chunks/main-62b8caa3ccc47893b147.js | 1 - .../static/chunks/main-a054bbf31fb90f6a.js | 1 + .../chunks/pages/_app-572626eaa2005295.js | 1 + .../chunks/pages/_app-b3ca00281e90c029c955.js | 1 - ...63c9d162.js => _error-2280fa386d040b66.js} | 2 +- .../chunks/pages/index-a78fc9f55265c4ea.js | 1 + .../pages/index-bb493c5b52078039ce80.js | 1 - .../chunks/pages/server-b964c24fd9a69b1e.js | 1 + .../pages/server-e1f1621204ec662e510c.js | 1 - ...add70.js => polyfills-5cd94c89d3acac5f.js} | 0 .../chunks/webpack-0ccec27098eac6b2cd28.js | 1 - .../static/chunks/webpack-d36996bf972eb067.js | 1 + .../out/_next/static/css/4286c7561b54f86e.css | 1 + .../_next/static/css/9031dcffbc38ebde92c3.css | 1 - ... roboto-condensed-latin-300.e37d563b.woff} | Bin ...roboto-condensed-latin-300.e72abb27.woff2} | Bin ...o-condensed-latin-300italic.767ebf03.woff} | Bin ...-condensed-latin-300italic.ad9068a8.woff2} | Bin ... roboto-condensed-latin-400.6841361d.woff} | Bin ...roboto-condensed-latin-400.77331fef.woff2} | Bin ...o-condensed-latin-400italic.457b6a39.woff} | Bin ...-condensed-latin-400italic.5b2d2ae1.woff2} | Bin ... roboto-condensed-latin-700.60a98ff4.woff} | Bin ...roboto-condensed-latin-700.ec072346.woff2} | Bin ...o-condensed-latin-700italic.01517b98.woff} | Bin ...-condensed-latin-700italic.e740b04b.woff2} | Bin striker-ui/out/index.html | 288 +++++++++--------- striker-ui/out/server.html | 288 +++++++++--------- 43 files changed, 303 insertions(+), 301 deletions(-) delete mode 100644 striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js create mode 100644 striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_buildManifest.js create mode 100644 striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_middlewareManifest.js rename striker-ui/out/_next/static/{Eh-RgpskHOnoW5C2jVLyg => QSRiaQhndGNrvMGSHQWys}/_ssgManifest.js (100%) create mode 100644 striker-ui/out/_next/static/chunks/145-170d45ccc7e94584.js delete mode 100644 striker-ui/out/_next/static/chunks/204.04ef0f70c11fb4c25e5c.js create mode 100644 striker-ui/out/_next/static/chunks/291-3b847a192c168e5d.js create mode 100644 striker-ui/out/_next/static/chunks/321-7f3df35ed02396a1.js delete mode 100644 striker-ui/out/_next/static/chunks/322-e03452a20da601e702f9.js delete mode 100644 striker-ui/out/_next/static/chunks/346-7248b9c59d3df20dd85d.js create mode 100644 striker-ui/out/_next/static/chunks/460.91d31c8392f2cdc4.js create mode 100644 striker-ui/out/_next/static/chunks/665.f31a7a875323621f.js delete mode 100644 striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js create mode 100644 striker-ui/out/_next/static/chunks/framework-5f4595e5518b5600.js delete mode 100644 striker-ui/out/_next/static/chunks/framework-c93ed74a065331c4bd75.js delete mode 100644 striker-ui/out/_next/static/chunks/main-62b8caa3ccc47893b147.js create mode 100644 striker-ui/out/_next/static/chunks/main-a054bbf31fb90f6a.js create mode 100644 striker-ui/out/_next/static/chunks/pages/_app-572626eaa2005295.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/_app-b3ca00281e90c029c955.js rename striker-ui/out/_next/static/chunks/pages/{_error-737a04e9a0da63c9d162.js => _error-2280fa386d040b66.js} (71%) create mode 100644 striker-ui/out/_next/static/chunks/pages/index-a78fc9f55265c4ea.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/index-bb493c5b52078039ce80.js create mode 100644 striker-ui/out/_next/static/chunks/pages/server-b964c24fd9a69b1e.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/server-e1f1621204ec662e510c.js rename striker-ui/out/_next/static/chunks/{polyfills-a40ef1678bae11e696dba45124eadd70.js => polyfills-5cd94c89d3acac5f.js} (100%) delete mode 100644 striker-ui/out/_next/static/chunks/webpack-0ccec27098eac6b2cd28.js create mode 100644 striker-ui/out/_next/static/chunks/webpack-d36996bf972eb067.js create mode 100644 striker-ui/out/_next/static/css/4286c7561b54f86e.css delete mode 100644 striker-ui/out/_next/static/css/9031dcffbc38ebde92c3.css rename striker-ui/out/_next/static/media/{roboto-condensed-latin-300.c36c06cf5b267471cea2a745dfd4759a.woff => roboto-condensed-latin-300.e37d563b.woff} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-300.5d2da57e78ccb220d139d8c0ef27a907.woff2 => roboto-condensed-latin-300.e72abb27.woff2} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-300italic.e69e9185150b62b34889665da401d0ca.woff => roboto-condensed-latin-300italic.767ebf03.woff} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-300italic.4ecc699baadc90c3a2acbd6c135f292f.woff2 => roboto-condensed-latin-300italic.ad9068a8.woff2} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-400.4a6300dffff48f5dabd3a27b772d72eb.woff => roboto-condensed-latin-400.6841361d.woff} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-400.fd55075af28b340bce1ba9cf7f652bfd.woff2 => roboto-condensed-latin-400.77331fef.woff2} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-400italic.85b2f9813ec12e45cad12b26344db0eb.woff => roboto-condensed-latin-400italic.457b6a39.woff} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-400italic.53545bf0c95fb5bef17517d4ac17f983.woff2 => roboto-condensed-latin-400italic.5b2d2ae1.woff2} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-700.8b1204b2d4afe3341531c6a30ad9f59c.woff => roboto-condensed-latin-700.60a98ff4.woff} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-700.114cd18b478088cff3e422700eeea537.woff2 => roboto-condensed-latin-700.ec072346.woff2} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-700italic.d58264d95a88a19dca5b1cc58f877c07.woff => roboto-condensed-latin-700italic.01517b98.woff} (100%) rename striker-ui/out/_next/static/media/{roboto-condensed-latin-700italic.a4bca9febc2433c2f5f7aef68bc4e78e.woff2 => roboto-condensed-latin-700italic.e740b04b.woff2} (100%) diff --git a/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js b/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js deleted file mode 100644 index db6bbe14..00000000 --- a/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(e){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[e,"static/chunks/346-7248b9c59d3df20dd85d.js","static/chunks/pages/index-bb493c5b52078039ce80.js"],"/_error":["static/chunks/pages/_error-737a04e9a0da63c9d162.js"],"/server":[e,"static/chunks/pages/server-e1f1621204ec662e510c.js"],sortedPages:["/","/_app","/_error","/server"]}}("static/chunks/322-e03452a20da601e702f9.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_buildManifest.js b/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_buildManifest.js new file mode 100644 index 00000000..533c690c --- /dev/null +++ b/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(e){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[e,"static/chunks/291-3b847a192c168e5d.js","static/chunks/pages/index-a78fc9f55265c4ea.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/server":[e,"static/chunks/145-170d45ccc7e94584.js","static/chunks/pages/server-b964c24fd9a69b1e.js"],sortedPages:["/","/_app","/_error","/server"]}}("static/chunks/321-7f3df35ed02396a1.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_middlewareManifest.js b/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_middlewareManifest.js new file mode 100644 index 00000000..a17fc8bf --- /dev/null +++ b/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_middlewareManifest.js @@ -0,0 +1 @@ +self.__MIDDLEWARE_MANIFEST=[];self.__MIDDLEWARE_MANIFEST_CB&&self.__MIDDLEWARE_MANIFEST_CB() \ No newline at end of file diff --git a/striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_ssgManifest.js b/striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_ssgManifest.js similarity index 100% rename from striker-ui/out/_next/static/Eh-RgpskHOnoW5C2jVLyg/_ssgManifest.js rename to striker-ui/out/_next/static/QSRiaQhndGNrvMGSHQWys/_ssgManifest.js diff --git a/striker-ui/out/_next/static/chunks/145-170d45ccc7e94584.js b/striker-ui/out/_next/static/chunks/145-170d45ccc7e94584.js new file mode 100644 index 00000000..da14fed4 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/145-170d45ccc7e94584.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[145],{366:function(e,t,r){"use strict";var n=r(5318),u=r(862);t.Z=void 0;var a=u(r(7294)),o=(0,n(r(2108)).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.Z=o},306:function(e,t,r){"use strict";var n=r(5318),u=r(862);t.Z=void 0;var a=u(r(7294)),o=(0,n(r(2108)).default)(a.createElement("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"}),"DesktopWindows");t.Z=o},2617:function(e,t,r){"use strict";var n=r(5318),u=r(862);t.Z=void 0;var a=u(r(7294)),o=(0,n(r(2108)).default)(a.createElement("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"}),"Keyboard");t.Z=o},5358:function(e,t,r){"use strict";var n=r(5318),u=r(862);t.Z=void 0;var a=u(r(7294)),o=(0,n(r(2108)).default)(a.createElement("path",{d:"M10 3H8v1.88l2 2zm6 6v3.88l1.8 1.8.2-.2V9c0-1.1-.9-2-2-2V3h-2v4h-3.88l2 2H16zM4.12 3.84L2.71 5.25 6 8.54v5.96L9.5 18v3h5v-3l.48-.48 4.47 4.47 1.41-1.41L4.12 3.84zm8.38 13.33V19h-1v-1.83L8 13.65v-3.11l5.57 5.57-1.07 1.06z"}),"PowerOffOutlined");t.Z=o},638:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return new Promise((function(t){var r=function(){return d=!0,t()};b(f,e).then(r,r)}))},window.__NEXT_PRELOADREADY=p.preloadReady;var m=p;t.default=m},5152:function(e,t,r){e.exports=r(638)},1163:function(e,t,r){e.exports=r(387)},8217:function(e,t,r){"use strict";var n=r(6086),u=r(7294);t.useSubscription=function(e){var t=e.getCurrentValue,r=e.subscribe,a=u.useState((function(){return{getCurrentValue:t,subscribe:r,value:t()}}));e=a[0];var o=a[1];return a=e.value,e.getCurrentValue===t&&e.subscribe===r||(a=t(),o({getCurrentValue:t,subscribe:r,value:a})),u.useDebugValue(a),u.useEffect((function(){function e(){if(!u){var e=t();o((function(u){return u.getCurrentValue!==t||u.subscribe!==r||u.value===e?u:n({},u,{value:e})}))}}var u=!1,a=r(e);return e(),function(){u=!0,a()}}),[t,r]),a}},7161:function(e,t,r){"use strict";e.exports=r(8217)}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/204.04ef0f70c11fb4c25e5c.js b/striker-ui/out/_next/static/chunks/204.04ef0f70c11fb4c25e5c.js deleted file mode 100644 index 8351604f..00000000 --- a/striker-ui/out/_next/static/chunks/204.04ef0f70c11fb4c25e5c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[204],{8753:function(t,e,s){"use strict";function i(t){return 0|t}s.d(e,{Z:function(){return Sa}});let n="warn",r=()=>{},a=()=>{},h=()=>{},o=()=>{};function l(t,e=!1){try{return decodeURIComponent(escape(t))}catch(Ur){if(Ur instanceof URIError&&e)return t;throw Ur}}function c(t){return unescape(encodeURIComponent(t))}!function(t){if("undefined"===typeof t?t=n:n=t,r=a=h=o=()=>{},"undefined"!==typeof window.console)switch(t){case"debug":r=console.debug.bind(window.console);case"info":a=console.info.bind(window.console);case"warn":h=console.warn.bind(window.console);case"error":o=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+t+"'")}}();let d="ontouchstart"in document.documentElement||void 0!==document.ontouchstart||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.addEventListener("touchstart",(function t(){d=!0,window.removeEventListener("touchstart",t,!1)}),!1);let u=10*(window.devicePixelRatio||1),_=!1;try{const t=document.createElement("canvas");t.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',0===t.style.cursor.indexOf("url")?(a("Data URI scheme cursor supported"),_=!0):h("Data URI scheme cursor not supported")}catch(Qa){o("Data URI scheme cursor test exception: "+Qa)}const f=_;let p=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),p=!0}catch(Aa){}const g=p;let m=!0;try{const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const e=document.createElement("div");t.appendChild(e);const s=t.offsetWidth-e.offsetWidth;t.parentNode.removeChild(t),m=0!=s}catch(Qa){o("Scrollbar test exception: "+Qa)}function w(){return navigator&&!!/mac/i.exec(navigator.platform)}function b(){return navigator&&!!/win/i.exec(navigator.platform)}function v(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function k(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function y(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function C(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}function x(t,e,s){const i=s.getBoundingClientRect();let n={x:0,y:0};return t=i.right?n.x=i.width-1:n.x=t-i.left,e=i.bottom?n.y=i.height-1:n.y=e-i.top,n}function S(t){t.stopPropagation(),t.preventDefault()}let Q=!1,A=null;function E(t){if(Q)return;const e=new t.constructor(t.type,t);Q=!0,document.captureElement?document.captureElement.dispatchEvent(e):A.dispatchEvent(e),Q=!1,t.stopPropagation(),e.defaultPrevented&&t.preventDefault(),"mouseup"===t.type&&F()}function M(){document.getElementById("noVNC_mouse_capture_elem").style.cursor=window.getComputedStyle(document.captureElement).cursor}document.captureElement=null;const T=new MutationObserver(M);function F(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;A=document.captureElement,document.captureElement=null,T.disconnect();document.getElementById("noVNC_mouse_capture_elem").style.display="none",window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",E)}}var L={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode(t){let e="";const s=t.length,i=s%3;for(let r=0;r>2],e+=this.toBase64Table[((3&t[r])<<4)+(t[r+1]>>4)],e+=this.toBase64Table[((15&t[r+1])<<2)+(t[r+2]>>6)],e+=this.toBase64Table[63&t[r+2]];const n=s-i;return 2===i?(e+=this.toBase64Table[t[n]>>2],e+=this.toBase64Table[((3&t[n])<<4)+(t[n+1]>>4)],e+=this.toBase64Table[(15&t[n+1])<<2],e+=this.toBase64Table[64]):1===i&&(e+=this.toBase64Table[t[n]>>2],e+=this.toBase64Table[(3&t[n])<<4],e+=this.toBase64Table[64],e+=this.toBase64Table[64]),e},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode(t,e=0){let s=t.indexOf("=")-e;s<0&&(s=t.length-e);const i=3*(s>>2)+Math.floor(s%4/1.5),n=new Array(i);let r=0,a=0;for(let h=0,l=e;l=8&&(r-=8,s||(n[h++]=a>>r&255),a&=(1<> Display.constructor"),this._target=t,!this._target)throw new Error("Target must be set");if("string"===typeof this._target)throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},r("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),r("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=()=>{}}get scale(){return this._scale}set scale(t){this._rescale(t)}get clipViewport(){return this._clipViewport}set clipViewport(t){this._clipViewport=t;const e=this._viewportLoc;this.viewportChangeSize(e.w,e.h),this.viewportChangePos(0,0)}get width(){return this._fbWidth}get height(){return this._fbHeight}viewportChangePos(t,e){const s=this._viewportLoc;t=Math.floor(t),e=Math.floor(e),this._clipViewport||(t=-s.w,e=-s.h);const i=s.x+s.w-1,n=s.y+s.h-1;t<0&&s.x+t<0&&(t=-s.x),i+t>=this._fbWidth&&(t-=i+t-this._fbWidth+1),s.y+e<0&&(e=-s.y),n+e>=this._fbHeight&&(e-=n+e-this._fbHeight+1),0===t&&0===e||(r("viewportChange deltaX: "+t+", deltaY: "+e),s.x+=t,s.y+=e,this._damage(s.x,s.y,s.w,s.h),this.flip())}viewportChangeSize(t,e){this._clipViewport&&"undefined"!==typeof t&&"undefined"!==typeof e||(r("Setting viewport to full display region"),t=this._fbWidth,e=this._fbHeight),t=Math.floor(t),e=Math.floor(e),t>this._fbWidth&&(t=this._fbWidth),e>this._fbHeight&&(e=this._fbHeight);const s=this._viewportLoc;if(s.w!==t||s.h!==e){s.w=t,s.h=e;const i=this._target;i.width=t,i.height=e,this.viewportChangePos(0,0),this._damage(s.x,s.y,s.w,s.h),this.flip(),this._rescale(this._scale)}}absX(t){return 0===this._scale?0:i(t/this._scale+this._viewportLoc.x)}absY(t){return 0===this._scale?0:i(t/this._scale+this._viewportLoc.y)}resize(t,e){this._prevDrawStyle="",this._fbWidth=t,this._fbHeight=e;const s=this._backbuffer;if(s.width!==t||s.height!==e){let i=null;s.width>0&&s.height>0&&(i=this._drawCtx.getImageData(0,0,s.width,s.height)),s.width!==t&&(s.width=t),s.height!==e&&(s.height=e),i&&this._drawCtx.putImageData(i,0,0)}const i=this._viewportLoc;this.viewportChangeSize(i.w,i.h),this.viewportChangePos(0,0)}_damage(t,e,s,i){tthis._damageBounds.right&&(this._damageBounds.right=t+s),e+i>this._damageBounds.bottom&&(this._damageBounds.bottom=e+i)}flip(t){if(0===this._renderQ.length||t){let t=this._damageBounds.left,e=this._damageBounds.top,s=this._damageBounds.right-t,i=this._damageBounds.bottom-e,n=t-this._viewportLoc.x,r=e-this._viewportLoc.y;n<0&&(s+=n,t-=n,n=0),r<0&&(i+=r,e-=r,r=0),n+s>this._viewportLoc.w&&(s=this._viewportLoc.w-n),r+i>this._viewportLoc.h&&(i=this._viewportLoc.h-r),s>0&&i>0&&this._targetCtx.drawImage(this._backbuffer,t,e,s,i,n,r,s,i),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}else this._renderQPush({type:"flip"})}pending(){return this._renderQ.length>0}flush(){0===this._renderQ.length?this.onflush():this._flushing=!0}fillRect(t,e,s,i,n,r){0===this._renderQ.length||r?(this._setFillColor(n),this._drawCtx.fillRect(t,e,s,i),this._damage(t,e,s,i)):this._renderQPush({type:"fill",x:t,y:e,width:s,height:i,color:n})}copyImage(t,e,s,i,n,r,a){0===this._renderQ.length||a?(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,t,e,n,r,s,i,n,r),this._damage(s,i,n,r)):this._renderQPush({type:"copy",oldX:t,oldY:e,x:s,y:i,width:n,height:r})}imageRect(t,e,s,i,n,r){if(0===s||0===i)return;const a=new Image;a.src="data: "+n+";base64,"+L.encode(r),this._renderQPush({type:"img",img:a,x:t,y:e,width:s,height:i})}startTile(t,e,s,i,n){this._tileX=t,this._tileY=e,this._tile=16===s&&16===i?this._tile16x16:this._drawCtx.createImageData(s,i);const r=n[2],a=n[1],h=n[0],o=this._tile.data;for(let l=0;l=n?t/i.w:e/i.h}this._rescale(s)}_rescale(t){this._scale=t;const e=this._viewportLoc,s=t*e.w+"px",i=t*e.h+"px";this._target.style.width===s&&this._target.style.height===i||(this._target.style.width=s,this._target.style.height=i)}_setFillColor(t){const e="rgb("+t[2]+","+t[1]+","+t[0]+")";e!==this._prevDrawStyle&&(this._drawCtx.fillStyle=e,this._prevDrawStyle=e)}_rgbImageData(t,e,s,i,n,r){const a=this._drawCtx.createImageData(s,i),h=a.data;for(let o=0,l=r;o0;){const e=this._renderQ[0];switch(e.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(e.oldX,e.oldY,e.x,e.y,e.width,e.height,!0);break;case"fill":this.fillRect(e.x,e.y,e.width,e.height,e.color,!0);break;case"blit":this.blitImage(e.x,e.y,e.width,e.height,e.data,0,!0);break;case"blitRgb":this.blitRgbImage(e.x,e.y,e.width,e.height,e.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(e.x,e.y,e.width,e.height,e.data,0,!0);break;case"img":if(e.img.complete&&0!==e.img.width&&0!==e.img.height){if(e.img.width!==e.width||e.img.height!==e.height)return void o("Decoded image has incorrect dimensions. Got "+e.img.width+"x"+e.img.height+". Expected "+e.width+"x"+e.height+".");this.drawImage(e.img,e.x,e.y)}else e.img._noVNCDisplay=this,e.img.addEventListener("load",this._resumeRenderQ),t=!1}t&&this._renderQ.shift()}0===this._renderQ.length&&this._flushing&&(this._flushing=!1,this.onflush())}}function B(t,e,s,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(s,s+i),n);else for(var r=0;r>>16&65535|0,a=0;0!==s;){s-=a=s>2e3?2e3:s;do{r=r+(n=n+e[i++]|0)|0}while(--a);n%=65521,r%=65521}return n|r<<16|0}function N(){for(var t,e=[],s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e}N();function P(t,e){var s,i,n,r,a,h,o,l,c,d,u,_,f,p,g,m,w,b,v,k,y,C,x,S,Q;s=t.state,i=t.next_in,S=t.input,n=i+(t.avail_in-5),r=t.next_out,Q=t.output,a=r-(e-t.avail_out),h=r+(t.avail_out-257),o=s.dmax,l=s.wsize,c=s.whave,d=s.wnext,u=s.window,_=s.hold,f=s.bits,p=s.lencode,g=s.distcode,m=(1<>>=v=b>>>24,f-=v,0===(v=b>>>16&255))Q[r++]=65535&b;else{if(!(16&v)){if(0===(64&v)){b=p[(65535&b)+(_&(1<>>=v,f-=v),f<15&&(_+=S[i++]<>>=v=b>>>24,f-=v,!(16&(v=b>>>16&255))){if(0===(64&v)){b=g[(65535&b)+(_&(1<o){t.msg="invalid distance too far back",s.mode=30;break t}if(_>>>=v,f-=v,y>(v=r-a)){if((v=y-v)>c&&s.sane){t.msg="invalid distance too far back",s.mode=30;break t}if(C=0,x=u,0===d){if(C+=l-v,v2;)Q[r++]=x[C++],Q[r++]=x[C++],Q[r++]=x[C++],k-=3;k&&(Q[r++]=x[C++],k>1&&(Q[r++]=x[C++]))}else{C=r-y;do{Q[r++]=Q[C++],Q[r++]=Q[C++],Q[r++]=Q[C++],k-=3}while(k>2);k&&(Q[r++]=Q[C++],k>1&&(Q[r++]=Q[C++]))}break}}break}}while(i>3,_&=(1<<(f-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i=1&&0===T[k];k--);if(y>k&&(y=k),0===k)return n[r++]=20971520,n[r++]=20971520,h.bits=1,0;for(v=1;v0&&(0===t||1!==k))return-1;for(F[1]=0,w=1;w852||2===t&&Q>592)return 1;for(;;){f=w-x,a[b]<_?(p=0,g=a[b]):a[b]>_?(p=L[D+a[b]],g=E[M+a[b]]):(p=96,g=0),o=1<>x)+(l-=o)]=f<<24|p<<16|g|0}while(0!==l);for(o=1<>=1;if(0!==o?(A&=o-1,A+=o):A=0,b++,0===--T[w]){if(w===k)break;w=e[s+a[b]]}if(w>y&&(A&d)!==c){for(0===x&&(x=y),u+=v,S=1<<(C=w-x);C+x852||2===t&&Q>592)return 1;n[c=A&d]=y<<24|C<<16|u-r|0}}return 0!==A&&(n[u+A]=w-x<<24|64<<16|0),h.bits=y,0}const G=-2;var W=12,q=30;function j(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function Z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new U(320),this.work=new U(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function J(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,function(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new I(852),e.distcode=e.distdyn=new I(592),e.sane=1,e.back=-1,0):G}(t)):G}function $(t,e){var s,i;return t?(i=new Z,t.state=i,i.window=null,0!==(s=function(t,e){var s,i;return t&&t.state?(i=t.state,e<0?(s=0,e=-e):(s=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?G:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,J(t))):G}(t,e))&&(t.state=null),s):G}var tt,et,st=!0;function it(t){if(st){var e;for(tt=new I(512),et=new I(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(Y(1,t.lens,0,288,tt,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;Y(2,t.lens,0,32,et,0,t.work,{bits:5}),st=!1}t.lencode=tt,t.lenbits=9,t.distcode=et,t.distbits=5}function nt(t,e,s,i){var n,r=t.state;return null===r.window&&(r.wsize=1<=r.wsize?(B(r.window,e,s-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((n=r.wsize-r.wnext)>i&&(n=i),B(r.window,e,s-i,n,r.wnext),(i-=n)?(B(r.window,e,s-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whavethis.chunkSize&&(this.chunkSize=t,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=t,function(t,e){var s,i,n,r,a,h,o,l,c,d,u,_,f,p,g,m,w,b,v,k,y,C,x,S,Q=0,A=new z(4),E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return G;(s=t.state).mode===W&&(s.mode=13),a=t.next_out,n=t.output,o=t.avail_out,r=t.next_in,i=t.input,h=t.avail_in,l=s.hold,c=s.bits,d=h,u=o,C=0;t:for(;;)switch(s.mode){case 1:if(0===s.wrap){s.mode=13;break}for(;c<16;){if(0===h)break t;h--,l+=i[r++]<>>8&255,s.check=N(s.check),l=0,c=0,s.mode=2;break}if(s.flags=0,s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&l)<<8)+(l>>8))%31){t.msg="incorrect header check",s.mode=q;break}if(8!==(15&l)){t.msg="unknown compression method",s.mode=q;break}if(c-=4,y=8+(15&(l>>>=4)),0===s.wbits)s.wbits=y;else if(y>s.wbits){t.msg="invalid window size",s.mode=q;break}s.dmax=1<>8&1),512&s.flags&&(A[0]=255&l,A[1]=l>>>8&255,s.check=N(s.check)),l=0,c=0,s.mode=3;case 3:for(;c<32;){if(0===h)break t;h--,l+=i[r++]<>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,s.check=N(s.check)),l=0,c=0,s.mode=4;case 4:for(;c<16;){if(0===h)break t;h--,l+=i[r++]<>8),512&s.flags&&(A[0]=255&l,A[1]=l>>>8&255,s.check=N(s.check)),l=0,c=0,s.mode=5;case 5:if(1024&s.flags){for(;c<16;){if(0===h)break t;h--,l+=i[r++]<>>8&255,s.check=N(s.check)),l=0,c=0}else s.head&&(s.head.extra=null);s.mode=6;case 6:if(1024&s.flags&&((_=s.length)>h&&(_=h),_&&(s.head&&(y=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),B(s.head.extra,i,r,_,y)),512&s.flags&&(s.check=N(s.check)),h-=_,r+=_,s.length-=_),s.length))break t;s.length=0,s.mode=7;case 7:if(2048&s.flags){if(0===h)break t;_=0;do{y=i[r+_++],s.head&&y&&s.length<65536&&(s.head.name+=String.fromCharCode(y))}while(y&&_>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=W;break;case 10:for(;c<32;){if(0===h)break t;h--,l+=i[r++]<>>=7&c,c-=7&c,s.mode=27;break}for(;c<3;){if(0===h)break t;h--,l+=i[r++]<>>=1)){case 0:s.mode=14;break;case 1:if(it(s),s.mode=20,6===e){l>>>=2,c-=2;break t}break;case 2:s.mode=17;break;case 3:t.msg="invalid block type",s.mode=q}l>>>=2,c-=2;break;case 14:for(l>>>=7&c,c-=7&c;c<32;){if(0===h)break t;h--,l+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",s.mode=q;break}if(s.length=65535&l,l=0,c=0,s.mode=15,6===e)break t;case 15:s.mode=16;case 16:if(_=s.length){if(_>h&&(_=h),_>o&&(_=o),0===_)break t;B(n,i,r,_,a),h-=_,r+=_,o-=_,a+=_,s.length-=_;break}s.mode=W;break;case 17:for(;c<14;){if(0===h)break t;h--,l+=i[r++]<>>=5,c-=5,s.ndist=1+(31&l),l>>>=5,c-=5,s.ncode=4+(15&l),l>>>=4,c-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=q;break}s.have=0,s.mode=18;case 18:for(;s.have>>=3,c-=3}for(;s.have<19;)s.lens[E[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,x={bits:s.lenbits},C=Y(0,s.lens,0,19,s.lencode,0,s.work,x),s.lenbits=x.bits,C){t.msg="invalid code lengths set",s.mode=q;break}s.have=0,s.mode=19;case 19:for(;s.have>>16&255,w=65535&Q,!((g=Q>>>24)<=c);){if(0===h)break t;h--,l+=i[r++]<>>=g,c-=g,s.lens[s.have++]=w;else{if(16===w){for(S=g+2;c>>=g,c-=g,0===s.have){t.msg="invalid bit length repeat",s.mode=q;break}y=s.lens[s.have-1],_=3+(3&l),l>>>=2,c-=2}else if(17===w){for(S=g+3;c>>=g)),l>>>=3,c-=3}else{for(S=g+7;c>>=g)),l>>>=7,c-=7}if(s.have+_>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=q;break}for(;_--;)s.lens[s.have++]=y}}if(s.mode===q)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=q;break}if(s.lenbits=9,x={bits:s.lenbits},C=Y(1,s.lens,0,s.nlen,s.lencode,0,s.work,x),s.lenbits=x.bits,C){t.msg="invalid literal/lengths set",s.mode=q;break}if(s.distbits=6,s.distcode=s.distdyn,x={bits:s.distbits},C=Y(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,x),s.distbits=x.bits,C){t.msg="invalid distances set",s.mode=q;break}if(s.mode=20,6===e)break t;case 20:s.mode=21;case 21:if(h>=6&&o>=258){t.next_out=a,t.avail_out=o,t.next_in=r,t.avail_in=h,s.hold=l,s.bits=c,P(t,u),a=t.next_out,n=t.output,o=t.avail_out,r=t.next_in,i=t.input,h=t.avail_in,l=s.hold,c=s.bits,s.mode===W&&(s.back=-1);break}for(s.back=0;m=(Q=s.lencode[l&(1<>>16&255,w=65535&Q,!((g=Q>>>24)<=c);){if(0===h)break t;h--,l+=i[r++]<>b)])>>>16&255,w=65535&Q,!(b+(g=Q>>>24)<=c);){if(0===h)break t;h--,l+=i[r++]<>>=b,c-=b,s.back+=b}if(l>>>=g,c-=g,s.back+=g,s.length=w,0===m){s.mode=26;break}if(32&m){s.back=-1,s.mode=W;break}if(64&m){t.msg="invalid literal/length code",s.mode=q;break}s.extra=15&m,s.mode=22;case 22:if(s.extra){for(S=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=23;case 23:for(;m=(Q=s.distcode[l&(1<>>16&255,w=65535&Q,!((g=Q>>>24)<=c);){if(0===h)break t;h--,l+=i[r++]<>b)])>>>16&255,w=65535&Q,!(b+(g=Q>>>24)<=c);){if(0===h)break t;h--,l+=i[r++]<>>=b,c-=b,s.back+=b}if(l>>>=g,c-=g,s.back+=g,64&m){t.msg="invalid distance code",s.mode=q;break}s.offset=w,s.extra=15&m,s.mode=24;case 24:if(s.extra){for(S=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=q;break}s.mode=25;case 25:if(0===o)break t;if(_=u-o,s.offset>_){if((_=s.offset-_)>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=q;break}_>s.wnext?(_-=s.wnext,f=s.wsize-_):f=s.wnext-_,_>s.length&&(_=s.length),p=s.window}else p=n,f=a-s.offset,_=s.length;_>o&&(_=o),o-=_,s.length-=_;do{n[a++]=p[f++]}while(--_);0===s.length&&(s.mode=21);break;case 26:if(0===o)break t;n[a++]=s.length,o--,s.mode=21;break;case 27:if(s.wrap){for(;c<32;){if(0===h)break t;h--,l|=i[r++]<=0;)t[e]=0}var ot=256,lt=286,ct=30,dt=15,ut=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],_t=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ft=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],gt=new Array(576);ht(gt);var mt=new Array(60);ht(mt);var wt=new Array(512);ht(wt);var bt=new Array(256);ht(bt);var vt=new Array(29);ht(vt);var kt,yt,Ct,xt=new Array(ct);function St(t,e,s,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function Qt(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function At(t){return t<256?wt[t]:wt[256+(t>>>7)]}function Et(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Mt(t,e,s){t.bi_valid>16-s?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<>>=1,s<<=1}while(--e>0);return s>>>1}function Lt(t,e,s){var i,n,r=new Array(16),a=0;for(i=1;i<=dt;i++)r[i]=a=a+s[i-1]<<1;for(n=0;n<=e;n++){var h=t[2*n+1];0!==h&&(t[2*n]=Ft(r[h]++,h))}}function Dt(t){var e;for(e=0;e8?Et(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function zt(t,e,s,i){var n=2*e,r=2*s;return t[n]>1;s>=1;s--)Ut(t,r,s);n=o;do{s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Ut(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=i,r[2*n]=r[2*s]+r[2*i],t.depth[n]=(t.depth[s]>=t.depth[i]?t.depth[s]:t.depth[i])+1,r[2*s+1]=r[2*i+1]=n,t.heap[1]=n++,Ut(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var s,i,n,r,a,h,o=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,_=e.stat_desc.extra_base,f=e.stat_desc.max_length,p=0;for(r=0;r<=dt;r++)t.bl_count[r]=0;for(o[2*t.heap[t.heap_max]+1]=0,s=t.heap_max+1;s<573;s++)(r=o[2*o[2*(i=t.heap[s])+1]+1]+1)>f&&(r=f,p++),o[2*i+1]=r,i>l||(t.bl_count[r]++,a=0,i>=_&&(a=u[i-_]),h=o[2*i],t.opt_len+=h*(r+a),d&&(t.static_len+=h*(c[2*i+1]+a)));if(0!==p){do{for(r=f-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[f]--,p-=2}while(p>0);for(r=f;0!==r;r--)for(i=t.bl_count[r];0!==i;)(n=t.heap[--s])>l||(o[2*n+1]!==r&&(t.opt_len+=(r-o[2*n+1])*o[2*n],o[2*n+1]=r),i--)}}(t,e),Lt(r,l,t.bl_count)}function Nt(t,e,s){var i,n,r=-1,a=e[1],h=0,o=7,l=4;for(0===a&&(o=138,l=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)n=a,a=e[2*(i+1)+1],++h>=7;i=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}function Ot(t,e,s,i){var n,r,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*pt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=s+5,s+4<=n&&-1!==e?Kt(t,e,s,i):4===t.strategy||r===n?(Mt(t,2+(i?1:0),3),It(t,gt,mt)):(Mt(t,4+(i?1:0),3),function(t,e,s,i){var n;for(Mt(t,e-257,5),Mt(t,s-1,5),Mt(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&s,t.last_lit++,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[2*(bt[s]+ot+1)]++,t.dyn_dtree[2*At(e)]++),t.last_lit===t.lit_bufsize-1}var Gt={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const Wt=-2;var qt,jt=258,Zt=262,Jt=103,$t=113,te=666;function ee(t,e){return t.msg=Gt[e],e}function se(t){return(t<<1)-(t>4?9:0)}function ie(t){for(var e=t.length;--e>=0;)t[e]=0}function ne(t){var e=t.state,s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(B(t.output,e.pending_buf,e.pending_out,s,t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))}function re(t,e){Ot(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ne(t.strm)}function ae(t,e){t.pending_buf[t.pending++]=e}function he(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function oe(t,e,s,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,B(e,t.input,t.next_in,n,s),1===t.state.wrap?t.adler=R(t.adler,e,n,s):2===t.state.wrap&&(t.adler=N(t.adler)),t.next_in+=n,t.total_in+=n,n)}function le(t,e){var s,i,n=t.max_chain_length,r=t.strstart,a=t.prev_length,h=t.nice_match,o=t.strstart>t.w_size-Zt?t.strstart-(t.w_size-Zt):0,l=t.window,c=t.w_mask,d=t.prev,u=t.strstart+jt,_=l[r+a-1],f=l[r+a];t.prev_length>=t.good_match&&(n>>=2),h>t.lookahead&&(h=t.lookahead);do{if(l[(s=e)+a]===f&&l[s+a-1]===_&&l[s]===l[r]&&l[++s]===l[r+1]){r+=2,s++;do{}while(l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&ra){if(t.match_start=e,a=i,i>=h)break;_=l[r+a-1],f=l[r+a]}}}while((e=d[e&c])>o&&0!==--n);return a<=t.lookahead?a:t.lookahead}function ce(t){var e,s,i,n,r,a=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-Zt)){B(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=s=t.hash_size;do{i=t.head[--e],t.head[e]=i>=a?i-a:0}while(--s);e=s=a;do{i=t.prev[--e],t.prev[e]=i>=a?i-a:0}while(--s);n+=a}if(0===t.strm.avail_in)break;if(s=oe(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=s,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=Yt(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=Yt(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<15&&(a=2,i-=16),n<1||n>9||8!==s||i<8||i>15||e<0||e>9||r<0||r>4)return ee(t,Wt);8===i&&(i=9);var h=new fe;return t.state=h,h.strm=t,h.wrap=a,h.gzhead=null,h.w_bits=i,h.w_size=1<5||e<0)return t?ee(t,Wt):Wt;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===te&&4!==e)return ee(t,0===t.avail_out?-5:Wt);if(i.strm=t,s=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,ae(i,31),ae(i,139),ae(i,8),i.gzhead?(ae(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ae(i,255&i.gzhead.time),ae(i,i.gzhead.time>>8&255),ae(i,i.gzhead.time>>16&255),ae(i,i.gzhead.time>>24&255),ae(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),ae(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(ae(i,255&i.gzhead.extra.length),ae(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=N(t.adler,i.pending_buf,i.pending)),i.gzindex=0,i.status=69):(ae(i,0),ae(i,0),ae(i,0),ae(i,0),ae(i,0),ae(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),ae(i,3),i.status=$t);else{var a=8+(i.w_bits-8<<4)<<8;a|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=$t,he(i,a),0!==i.strstart&&(he(i,t.adler>>>16),he(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=N(t.adler,i.pending_buf,i.pending)),ne(t),n=i.pending,i.pending!==i.pending_buf_size));)ae(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=N(t.adler,i.pending_buf,i.pending)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=N(t.adler,i.pending_buf,i.pending)),ne(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(t.adler=N(t.adler,i.pending_buf,i.pending)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=N(t.adler,i.pending_buf,i.pending)),ne(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(t.adler=N(t.adler,i.pending_buf,i.pending)),0===r&&(i.status=Jt)}else i.status=Jt;if(i.status===Jt&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ne(t),i.pending+2<=i.pending_buf_size&&(ae(i,255&t.adler),ae(i,t.adler>>8&255),t.adler=0,i.status=$t)):i.status=$t),0!==i.pending){if(ne(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&se(e)<=se(s)&&4!==e)return ee(t,-5);if(i.status===te&&0!==t.avail_in)return ee(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&i.status!==te){var h=2===i.strategy?function(t,e){for(var s;;){if(0===t.lookahead&&(ce(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,s=Yt(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(re(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(re(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(re(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var s,i,n,r,a=t.window;;){if(t.lookahead<=jt){if(ce(t),t.lookahead<=jt&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){r=t.strstart+jt;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=Yt(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=Yt(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(re(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(re(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(re(t,!1),0===t.strm.avail_out)?1:2}(i,e):qt[i.level].func(i,e);if(3!==h&&4!==h||(i.status=te),1===h||3===h)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===h&&(1===e?Xt(i):5!==e&&(Kt(i,0,0,!1),3===e&&(ie(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ne(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(ae(i,255&t.adler),ae(i,t.adler>>8&255),ae(i,t.adler>>16&255),ae(i,t.adler>>24&255),ae(i,255&t.total_in),ae(i,t.total_in>>8&255),ae(i,t.total_in>>16&255),ae(i,t.total_in>>24&255)):(he(i,t.adler>>>16),he(i,65535&t.adler)),ne(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)}qt=[new _e(0,0,0,0,(function(t,e){var s=65535;for(s>t.pending_buf_size-5&&(s=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ce(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+s;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,re(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-Zt&&(re(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(re(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(re(t,!1),t.strm.avail_out),1)})),new _e(4,4,8,4,de),new _e(4,5,16,8,de),new _e(4,6,32,32,de),new _e(4,4,16,16,ue),new _e(8,16,32,32,ue),new _e(8,16,128,128,ue),new _e(8,32,128,256,ue),new _e(32,128,258,1024,ue),new _e(32,258,258,4096,ue)];class we{constructor(){this.strm=new rt,this.chunkSize=102400,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,ge(this.strm,this.windowBits)}deflate(t){this.strm.input=t,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;let e=me(this.strm,3),s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(e<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){let t=[s],i=s.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,e=me(this.strm,3),e<0)throw new Error("zlib deflate failed");let s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=s.length,t.push(s)}while(this.strm.avail_in>0);let n=new Uint8Array(i),r=0;for(let e=0;e=32&&t<=255)return t;const e=dr[t];return void 0!==e?e:16777216|t}},_r={8:"Backspace",9:"Tab",10:"NumpadClear",12:"Numpad5",13:"Enter",16:"ShiftLeft",17:"ControlLeft",18:"AltLeft",19:"Pause",20:"CapsLock",21:"Lang1",25:"Lang2",27:"Escape",28:"Convert",29:"NonConvert",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",44:"PrintScreen",45:"Insert",46:"Delete",47:"Help",48:"Digit0",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",95:"Sleep",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",108:"NumpadDecimal",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",144:"NumLock",145:"ScrollLock",166:"BrowserBack",167:"BrowserForward",168:"BrowserRefresh",169:"BrowserStop",170:"BrowserSearch",171:"BrowserFavorites",172:"BrowserHome",173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",180:"LaunchMail",181:"MediaSelect",182:"LaunchApp1",183:"LaunchApp2",225:"AltRight"},fr={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};const pr={};function gr(t,e){if(void 0===e)throw new Error('Undefined keysym for key "'+t+'"');if(t in pr)throw new Error('Duplicate entry for key "'+t+'"');pr[t]=[e,e,e,e]}function mr(t,e,s){if(void 0===e)throw new Error('Undefined keysym for key "'+t+'"');if(void 0===s)throw new Error('Undefined keysym for key "'+t+'"');if(t in pr)throw new Error('Duplicate entry for key "'+t+'"');pr[t]=[e,e,s,e]}function wr(t,e,s){if(void 0===e)throw new Error('Undefined keysym for key "'+t+'"');if(void 0===s)throw new Error('Undefined keysym for key "'+t+'"');if(t in pr)throw new Error('Duplicate entry for key "'+t+'"');pr[t]=[e,e,e,s]}mr("Alt",Mi,Ti),gr("AltGraph",Di),gr("CapsLock",Qi),mr("Control",xi,Si),mr("Meta",Fi,Li),gr("NumLock",cs),gr("ScrollLock",xe),mr("Shift",yi,Ci),wr("Enter",ye,us),gr("Tab",ve),wr(" ",Ri,ds),wr("ArrowDown",qe,ms),wr("ArrowUp",Ge,ps),wr("ArrowLeft",Ye,fs),wr("ArrowRight",We,gs),wr("End",Je,vs),wr("Home",Oe,_s),wr("PageDown",Ze,bs),wr("PageUp",je,ws),gr("Backspace",be),wr("Clear",ke,ks),gr("Copy",Nn),gr("Cut",Pn),wr("Delete",Qe,Cs),wr("Insert",ss,ys),gr("Paste",On),gr("Redo",ns),gr("Undo",is),gr("Cancel",hs),gr("ContextMenu",rs),gr("Escape",Se),gr("Execute",es),gr("Find",as),gr("Help",os),gr("Pause",Ce),gr("Select",$e),gr("ZoomIn",$n),gr("ZoomOut",tr),gr("BrightnessDown",hn),gr("BrightnessUp",an),gr("Eject",Mn),gr("LogOff",Hn),gr("Power",An),gr("PowerOff",yn),gr("PrintScreen",ts),gr("Hibernate",or),gr("Standby",on),gr("WakeUp",En),gr("AllCandidates",Te),gr("Alphanumeric",Ke),gr("CodeInput",Ee),gr("Compose",Ae),gr("Convert",Be),gr("GroupFirst",Ui),gr("GroupLast",Ii),gr("GroupNext",Bi),gr("GroupPrevious",zi),gr("NonConvert",De),gr("PreviousCandidate",Fe),gr("SingleCandidate",Me),gr("HangulMode",sn),gr("HanjaMode",nn),gr("JunjuaMode",rn),gr("Eisu",Xe),gr("Hankaku",Pe),gr("Hiragana",Ue),gr("HiraganaKatakana",Re),gr("KanaMode",He),gr("KanjiMode",Le),gr("Katakana",Ie),gr("Romaji",ze),gr("Zenkaku",Ne),gr("ZenkakuHanaku",Ve),gr("F1",Vs),gr("F2",Hs),gr("F3",Ks),gr("F4",Xs),gr("F5",Os),gr("F6",Ys),gr("F7",Gs),gr("F8",Ws),gr("F9",qs),gr("F10",js),gr("F11",Zs),gr("F12",Js),gr("F13",$s),gr("F14",ti),gr("F15",ei),gr("F16",si),gr("F17",ii),gr("F18",ni),gr("F19",ri),gr("F20",ai),gr("F21",hi),gr("F22",oi),gr("F23",li),gr("F24",ci),gr("F25",di),gr("F26",ui),gr("F27",_i),gr("F28",fi),gr("F29",pi),gr("F30",gi),gr("F31",mi),gr("F32",wi),gr("F33",bi),gr("F34",vi),gr("F35",ki),gr("Close",Rn),gr("MailForward",sr),gr("MailReply",Gn),gr("MailSend",qn),gr("MediaFastForward",nr),gr("MediaPause",Dn),gr("MediaPlay",un),gr("MediaRecord",bn),gr("MediaRewind",In),gr("MediaStop",_n),gr("MediaTrackNext",pn),gr("MediaTrackPrevious",fn),gr("New",Kn),gr("Open",Xn),gr("Print",ts),gr("Save",Wn),gr("SpellCheck",jn),gr("AudioVolumeDown",ln),gr("AudioVolumeUp",dn),gr("AudioVolumeMute",cn),gr("MicrophoneVolumeMute",lr),gr("LaunchApplication1",zn),gr("LaunchApplication2",vn),gr("LaunchCalendar",kn),gr("LaunchMail",mn),gr("LaunchMediaPlayer",Bn),gr("LaunchMusicPlayer",ir),gr("LaunchPhone",Yn),gr("LaunchScreenSaver",Tn),gr("LaunchSpreadsheet",Vn),gr("LaunchWebBrowser",Fn),gr("LaunchWebCam",er),gr("LaunchWordProcessor",Jn),gr("BrowserBack",Cn),gr("BrowserFavorites",Ln),gr("BrowserForward",xn),gr("BrowserHome",gn),gr("BrowserRefresh",Qn),gr("BrowserSearch",wn),gr("BrowserStop",Sn),gr("Dimmer",Un),gr("MediaAudioTrack",hr),gr("RandomToggle",rr),gr("SplitScreenToggle",Zn),gr("Subtitle",ar),gr("VideoModeNext",cr),wr("=",en,xs),wr("+",Pi,Qs),wr("-",Hi,Es),wr("*",Ni,Ss),wr("/",Xi,Ts),wr(".",Ki,Ms),wr(",",Vi,As),wr("0",Oi,Fs),wr("1",Yi,Ls),wr("2",Gi,Ds),wr("3",Wi,Bs),wr("4",qi,zs),wr("5",ji,Us),wr("6",Zi,Is),wr("7",Ji,Rs),wr("8",$i,Ns),wr("9",tn,Ps);var br=pr;function vr(t){if(t.code){switch(t.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return t.code}if("keypress"!==t.type&&t.keyCode in _r){let e=_r[t.keyCode];if(w()&&"ContextMenu"===e&&(e="MetaRight"),2===t.location)switch(e){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(3===t.location)switch(e){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return e}return"Unidentified"}function kr(t){const e=function(t){if(void 0!==t.key){switch(t.key){case"Spacebar":return" ";case"Esc":return"Escape";case"Scroll":return"ScrollLock";case"Win":return"Meta";case"Apps":return"ContextMenu";case"Up":return"ArrowUp";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Del":return"Delete";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Add":return"+";case"Decimal":return t.char}switch(t.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(t.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if("\0"===t.key&&"NumpadDecimal"===t.code)return"Delete";if(!k()&&!y())return t.key;if(1!==t.key.length&&"Unidentified"!==t.key)return t.key}const e=vr(t);return e in fr?fr[e]:t.charCode?String.fromCharCode(t.charCode):"Unidentified"}(t);if("Unidentified"===e)return null;if(e in br){let s=t.location;if("Meta"===e&&0===s&&(s=2),"Clear"===e&&3===s){"NumLock"===vr(t)&&(s=0)}if((void 0===s||s>3)&&(s=0),"Meta"===e){let e=vr(t);if("AltLeft"===e)return Ai;if("AltRight"===e)return Ei}if("Clear"===e){if("NumLock"===vr(t))return cs}return br[e][s]}if(1!==e.length)return null;const s=e.charCodeAt();return s?ur.lookup(s):null}class yr{constructor(t){this._target=t||null,this._keyDownList={},this._pendingKey=null,this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this),checkalt:this._checkAlt.bind(this)},this.onkeyevent=()=>{}}_sendKeyEvent(t,e,s){if(s)this._keyDownList[e]=t;else{if(!(e in this._keyDownList))return;delete this._keyDownList[e]}r("onkeyevent "+(s?"down":"up")+", keysym: "+t,", code: "+e),this.onkeyevent(t,e,s)}_getKeyCode(t){const e=vr(t);if("Unidentified"!==e)return e;if(t.keyCode&&"keypress"!==t.type&&229!==t.keyCode)return"Platform"+t.keyCode;if(t.keyIdentifier){if("U+"!==t.keyIdentifier.substr(0,2))return t.keyIdentifier;const e=parseInt(t.keyIdentifier.substr(2),16);return"Platform"+String.fromCharCode(e).toUpperCase().charCodeAt()}return"Unidentified"}_handleKeyDown(t){const e=this._getKeyCode(t);let s=kr(t);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),"AltRight"===e&&t.timeStamp-this._altGrCtrlTime<50?s=Di:this._sendKeyEvent(xi,"ControlLeft",!0)),"Unidentified"===e)return s&&(this._sendKeyEvent(s,e,!0),this._sendKeyEvent(s,e,!1)),void S(t);if(w()||v())switch(s){case Fi:s=Mi;break;case Li:s=Fi;break;case Mi:s=ls;break;case Ti:s=Di}return e in this._keyDownList&&(s=this._keyDownList[e]),(w()||v())&&"CapsLock"===e?(this._sendKeyEvent(Qi,"CapsLock",!0),this._sendKeyEvent(Qi,"CapsLock",!1),void S(t)):s||t.key&&!k()&&!y()?(this._pendingKey=null,S(t),"ControlLeft"===e&&b()&&!("ControlLeft"in this._keyDownList)?(this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),void(this._altGrCtrlTime=t.timeStamp)):void this._sendKeyEvent(s,e,!0)):(this._pendingKey=e,void setTimeout(this._handleKeyPressTimeout.bind(this),10,t))}_handleKeyPress(t){if(S(t),null===this._pendingKey)return;let e=this._getKeyCode(t);const s=kr(t);"Unidentified"!==e&&e!=this._pendingKey||(e=this._pendingKey,this._pendingKey=null,s?this._sendKeyEvent(s,e,!0):a("keypress with no keysym:",t))}_handleKeyPressTimeout(t){if(null===this._pendingKey)return;let e;const s=this._pendingKey;if(this._pendingKey=null,t.keyCode>=48&&t.keyCode<=57)e=t.keyCode;else if(t.keyCode>=65&&t.keyCode<=90){let s=String.fromCharCode(t.keyCode);s=t.shiftKey?s.toUpperCase():s.toLowerCase(),e=s.charCodeAt()}else e=0;this._sendKeyEvent(e,s,!0)}_handleKeyUp(t){S(t);const e=this._getKeyCode(t);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(xi,"ControlLeft",!0)),(w()||v())&&"CapsLock"===e)return this._sendKeyEvent(Qi,"CapsLock",!0),void this._sendKeyEvent(Qi,"CapsLock",!1);this._sendKeyEvent(this._keyDownList[e],e,!1),!b()||"ShiftLeft"!==e&&"ShiftRight"!==e||("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}_handleAltGrTimeout(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(xi,"ControlLeft",!0)}_allKeysUp(){r(">> Keyboard.allKeysUp");for(let t in this._keyDownList)this._sendKeyEvent(this._keyDownList[t],t,!1);r("<< Keyboard.allKeysUp")}_checkAlt(t){if(t.skipCheckAlt)return;if(t.altKey)return;const e=this._target,s=this._keyDownList;["AltLeft","AltRight"].forEach((t=>{if(!(t in s))return;const i=new KeyboardEvent("keyup",{key:s[t],code:t});i.skipCheckAlt=!0,e.dispatchEvent(i)}))}grab(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),b()&&C()){const t=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach((e=>document.addEventListener(e,t,{capture:!0,passive:!0})))}}ungrab(){if(b()&&C()){const t=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach((e=>document.removeEventListener(e,t)))}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}const Cr=32,xr=64;class Sr{constructor(){this._target=null,this._state=127,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}attach(t){this.detach(),this._target=t,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}detach(){this._target&&(this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null)}_eventHandler(t){let e;switch(t.stopPropagation(),t.preventDefault(),t.type){case"touchstart":e=this._touchStart;break;case"touchmove":e=this._touchMove;break;case"touchend":case"touchcancel":e=this._touchEnd}for(let s=0;s0&&Date.now()-this._tracked[0].started>250)return this._state=0,void this._ignored.push(t);if(this._waitingRelease)return this._state=0,void this._ignored.push(t);switch(this._tracked.push({id:t,started:Date.now(),active:!0,firstX:e,firstY:s,lastX:e,lastY:s,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=-26,this._stopLongpressTimeout();break;case 3:this._state&=-99;break;default:this._state=0}}}_touchMove(t,e,s){let i=this._tracked.find((e=>e.id===t));if(void 0===i)return;i.lastX=e,i.lastY=s;let n=e-i.firstX,r=s-i.firstY;if(i.firstX===i.lastX&&i.firstY===i.lastY||(i.angle=180*Math.atan2(r,n)/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(n,r)<50)return;if(this._state&=-24,this._stopLongpressTimeout(),1!==this._tracked.length&&(this._state&=-9),2!==this._tracked.length&&(this._state&=-97),2===this._tracked.length){let e=this._tracked.find((e=>e.id!==t));if(Math.hypot(e.firstX-e.lastX,e.firstY-e.lastY)>50){let t=Math.abs(i.angle-e.angle);t=Math.abs((t+180)%360-180),this._state&=t>90?-33:-65,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}_touchEnd(t,e,s){if(-1!==this._ignored.indexOf(t))return this._ignored.splice(this._ignored.indexOf(t),1),void(0===this._ignored.length&&0===this._tracked.length&&(this._state=127,this._waitingRelease=!1));if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=0),!this._hasDetectedGesture()&&(this._state&=-105,this._state&=-17,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=-7;break;case 2:this._state&=-6}if(this._waitingRelease){if(Date.now()-this._releaseStart>250&&(this._state=0),this._tracked.some((t=>Date.now()-t.started>1e3))&&(this._state=0),this._tracked.find((e=>e.id===t)).active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(0!==this._state)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(let i=0;it.active))))}_startLongpressTimeout(){this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout((()=>this._longpressTimeout()),1e3)}_stopLongpressTimeout(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}_longpressTimeout(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=16,this._pushEvent("gesturestart")}_startTwoTouchTimeout(){this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout((()=>this._twoTouchTimeout()),50)}_stopTwoTouchTimeout(){clearTimeout(this._twoTouchTimeoutId),this._twoTouchTimeoutId=null}_isTwoTouchTimeoutRunning(){return null!==this._twoTouchTimeoutId}_twoTouchTimeout(){if(0===this._tracked.length)throw new Error("A pinch or two drag gesture failed, no tracked touches");let t=this._getAverageMovement(),e=Math.abs(t.x),s=Math.abs(t.y),i=this._getAverageDistance(),n=Math.abs(Math.hypot(i.first.x,i.first.y)-Math.hypot(i.last.x,i.last.y));this._state=s{this._target&&(e=document.elementFromPoint(t.clientX,t.clientY),this._updateVisibility(e))}),0)}_showCursor(){"hidden"===this._canvas.style.visibility&&(this._canvas.style.visibility="")}_hideCursor(){"hidden"!==this._canvas.style.visibility&&(this._canvas.style.visibility="hidden")}_shouldShowCursor(t){return!!t&&(t===this._target||!!this._target.contains(t)&&"none"===window.getComputedStyle(t).cursor)}_updateVisibility(t){this._captureIsActive()&&(t=document.captureElement),this._shouldShowCursor(t)?this._showCursor():this._hideCursor()}_updatePosition(){this._canvas.style.left=this._position.x+"px",this._canvas.style.top=this._position.y+"px"}_captureIsActive(){return document.captureElement&&document.documentElement.contains(document.captureElement)}}const Er=41943040;class Mr{constructor(){this._websocket=null,this._rQi=0,this._rQlen=0,this._rQbufferSize=4194304,this._rQ=null,this._sQbufferSize=10240,this._sQlen=0,this._sQ=null,this._eventHandlers={message:()=>{},open:()=>{},close:()=>{},error:()=>{}}}get sQ(){return this._sQ}get rQ(){return this._rQ}get rQi(){return this._rQi}set rQi(t){this._rQi=t}get rQlen(){return this._rQlen-this._rQi}rQpeek8(){return this._rQ[this._rQi]}rQskipBytes(t){this._rQi+=t}rQshift8(){return this._rQshift(1)}rQshift16(){return this._rQshift(2)}rQshift32(){return this._rQshift(4)}_rQshift(t){let e=0;for(let s=t-1;s>=0;s--)e+=this._rQ[this._rQi++]<<8*s;return e}rQshiftStr(t){"undefined"===typeof t&&(t=this.rQlen);let e="";for(let s=0;s0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}send(t){this._sQ.set(t,this._sQlen),this._sQlen+=t.length,this.flush()}sendString(t){this.send(t.split("").map((t=>t.charCodeAt(0))))}off(t){this._eventHandlers[t]=()=>{}}on(t,e){this._eventHandlers[t]=e}_allocateBuffers(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}init(){this._allocateBuffers(),this._rQi=0,this._websocket=null}open(t,e){this.init(),this._websocket=new WebSocket(t,e),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=()=>{r(">> WebSock.onopen"),this._websocket.protocol&&a("Server choose sub-protocol: "+this._websocket.protocol),this._eventHandlers.open(),r("<< WebSock.onopen")},this._websocket.onclose=t=>{r(">> WebSock.onclose"),this._eventHandlers.close(t),r("<< WebSock.onclose")},this._websocket.onerror=t=>{r(">> WebSock.onerror: "+t),this._eventHandlers.error(t),r("<< WebSock.onerror: "+t)}}close(){this._websocket&&(this._websocket.readyState!==WebSocket.OPEN&&this._websocket.readyState!==WebSocket.CONNECTING||(a("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=()=>{})}_encodeMessage(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}_expandCompactRQ(t){const e=8*(this._rQlen-this._rQi+t),s=this._rQbufferSizeEr&&(this._rQbufferSize=Er,this._rQbufferSize-this.rQlenthis._rQbufferSize-this._rQlen&&this._expandCompactRQ(e.length),this._rQ.set(e,this._rQlen),this._rQlen+=e.length}_recvMessage(t){this._DecodeMessage(t.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):r("Ignoring empty message")}}const Tr=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],Fr=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28];let Lr,Dr,Br,zr,Ur,Ir;Lr=65536,Dr=1<<24,Br=Lr|Dr,zr=4,Ur=1024,Ir=zr|Ur;const Rr=[Br|Ur,0,0|Lr,Br|Ir,Br|zr,Lr|Ir,0|zr,0|Lr,0|Ur,Br|Ur,Br|Ir,0|Ur,Dr|Ir,Br|zr,0|Dr,0|zr,0|Ir,Dr|Ur,Dr|Ur,Lr|Ur,Lr|Ur,0|Br,0|Br,Dr|Ir,Lr|zr,Dr|zr,Dr|zr,Lr|zr,0,0|Ir,Lr|Ir,0|Dr,0|Lr,Br|Ir,0|zr,0|Br,Br|Ur,0|Dr,0|Dr,0|Ur,Br|zr,0|Lr,Lr|Ur,Dr|zr,0|Ur,0|zr,Dr|Ir,Lr|Ir,Br|Ir,Lr|zr,0|Br,Dr|Ir,Dr|zr,0|Ir,Lr|Ir,Br|Ur,0|Ir,Dr|Ur,Dr|Ur,0,Lr|zr,Lr|Ur,0,Br|zr];Lr=1<<20,Dr=1<<31,Br=Lr|Dr,zr=32,Ur=32768,Ir=zr|Ur;const Nr=[Br|Ir,Dr|Ur,0|Ur,Lr|Ir,0|Lr,0|zr,Br|zr,Dr|Ir,Dr|zr,Br|Ir,Br|Ur,0|Dr,Dr|Ur,0|Lr,0|zr,Br|zr,Lr|Ur,Lr|zr,Dr|Ir,0,0|Dr,0|Ur,Lr|Ir,0|Br,Lr|zr,Dr|zr,0,Lr|Ur,0|Ir,Br|Ur,0|Br,0|Ir,0,Lr|Ir,Br|zr,0|Lr,Dr|Ir,0|Br,Br|Ur,0|Ur,0|Br,Dr|Ur,0|zr,Br|Ir,Lr|Ir,0|zr,0|Ur,0|Dr,0|Ir,Br|Ur,0|Lr,Dr|zr,Lr|zr,Dr|Ir,Dr|zr,Lr|zr,Lr|Ur,0,Dr|Ur,0|Ir,0|Dr,Br|zr,Br|Ir,Lr|Ur];Lr=1<<17,Dr=1<<27,Br=Lr|Dr,zr=8,Ur=512,Ir=zr|Ur;const Pr=[0|Ir,Br|Ur,0,Br|zr,Dr|Ur,0,Lr|Ir,Dr|Ur,Lr|zr,Dr|zr,Dr|zr,0|Lr,Br|Ir,Lr|zr,0|Br,0|Ir,0|Dr,0|zr,Br|Ur,0|Ur,Lr|Ur,0|Br,Br|zr,Lr|Ir,Dr|Ir,Lr|Ur,0|Lr,Dr|Ir,0|zr,Br|Ir,0|Ur,0|Dr,Br|Ur,0|Dr,Lr|zr,0|Ir,0|Lr,Br|Ur,Dr|Ur,0,0|Ur,Lr|zr,Br|Ir,Dr|Ur,Dr|zr,0|Ur,0,Br|zr,Dr|Ir,0|Lr,0|Dr,Br|Ir,0|zr,Lr|Ir,Lr|Ur,Dr|zr,0|Br,Dr|Ir,0|Ir,0|Br,Lr|Ir,0|zr,Br|zr,Lr|Ur];Lr=8192,Dr=1<<23,Br=Lr|Dr,zr=1,Ur=128,Ir=zr|Ur;const Vr=[Br|zr,Lr|Ir,Lr|Ir,0|Ur,Br|Ur,Dr|Ir,Dr|zr,Lr|zr,0,0|Br,0|Br,Br|Ir,0|Ir,0,Dr|Ur,Dr|zr,0|zr,0|Lr,0|Dr,Br|zr,0|Ur,0|Dr,Lr|zr,Lr|Ur,Dr|Ir,0|zr,Lr|Ur,Dr|Ur,0|Lr,Br|Ur,Br|Ir,0|Ir,Dr|Ur,Dr|zr,0|Br,Br|Ir,0|Ir,0,0,0|Br,Lr|Ur,Dr|Ur,Dr|Ir,0|zr,Br|zr,Lr|Ir,Lr|Ir,0|Ur,Br|Ir,0|Ir,0|zr,0|Lr,Dr|zr,Lr|zr,Br|Ur,Dr|Ir,Lr|zr,Lr|Ur,0|Dr,Br|zr,0|Ur,0|Dr,0|Lr,Br|Ur];Lr=1<<25,Dr=1<<30,Br=Lr|Dr,zr=256,Ur=1<<19,Ir=zr|Ur;const Hr=[0|zr,Lr|Ir,Lr|Ur,Br|zr,0|Ur,0|zr,0|Dr,Lr|Ur,Dr|Ir,0|Ur,Lr|zr,Dr|Ir,Br|zr,Br|Ur,0|Ir,0|Dr,0|Lr,Dr|Ur,Dr|Ur,0,Dr|zr,Br|Ir,Br|Ir,Lr|zr,Br|Ur,Dr|zr,0,0|Br,Lr|Ir,0|Lr,0|Br,0|Ir,0|Ur,Br|zr,0|zr,0|Lr,0|Dr,Lr|Ur,Br|zr,Dr|Ir,Lr|zr,0|Dr,Br|Ur,Lr|Ir,Dr|Ir,0|zr,0|Lr,Br|Ur,Br|Ir,0|Ir,0|Br,Br|Ir,Lr|Ur,0,Dr|Ur,0|Br,0|Ir,Lr|zr,Dr|zr,0|Ur,0,Dr|Ur,Lr|Ir,Dr|zr];Lr=1<<22,Dr=1<<29,Br=Lr|Dr,zr=16,Ur=16384,Ir=zr|Ur;const Kr=[Dr|zr,0|Br,0|Ur,Br|Ir,0|Br,0|zr,Br|Ir,0|Lr,Dr|Ur,Lr|Ir,0|Lr,Dr|zr,Lr|zr,Dr|Ur,0|Dr,0|Ir,0,Lr|zr,Dr|Ir,0|Ur,Lr|Ur,Dr|Ir,0|zr,Br|zr,Br|zr,0,Lr|Ir,Br|Ur,0|Ir,Lr|Ur,Br|Ur,0|Dr,Dr|Ur,0|zr,Br|zr,Lr|Ur,Br|Ir,0|Lr,0|Ir,Dr|zr,0|Lr,Dr|Ur,0|Dr,0|Ir,Dr|zr,Br|Ir,Lr|Ur,0|Br,Lr|Ir,Br|Ur,0,Br|zr,0|zr,0|Ur,0|Br,Lr|Ir,0|Ur,Lr|zr,Dr|Ir,0,Br|Ur,0|Dr,Lr|zr,Dr|Ir];Lr=1<<21,Dr=1<<26,Br=Lr|Dr,zr=2,Ur=2048,Ir=zr|Ur;const Xr=[0|Lr,Br|zr,Dr|Ir,0,0|Ur,Dr|Ir,Lr|Ir,Br|Ur,Br|Ir,0|Lr,0,Dr|zr,0|zr,0|Dr,Br|zr,0|Ir,Dr|Ur,Lr|Ir,Lr|zr,Dr|Ur,Dr|zr,0|Br,Br|Ur,Lr|zr,0|Br,0|Ur,0|Ir,Br|Ir,Lr|Ur,0|zr,0|Dr,Lr|Ur,0|Dr,Lr|Ur,0|Lr,Dr|Ir,Dr|Ir,Br|zr,Br|zr,0|zr,Lr|zr,0|Dr,Dr|Ur,0|Lr,Br|Ur,0|Ir,Lr|Ir,Br|Ur,0|Ir,Dr|zr,Br|Ir,0|Br,Lr|Ur,0,0|zr,Br|Ir,0,Lr|Ir,0|Br,0|Ur,Dr|zr,Dr|Ur,0|Ur,Lr|zr];Lr=1<<18,Dr=1<<28,Br=Lr|Dr,zr=64,Ur=4096,Ir=zr|Ur;const Or=[Dr|Ir,0|Ur,0|Lr,Br|Ir,0|Dr,Dr|Ir,0|zr,0|Dr,Lr|zr,0|Br,Br|Ir,Lr|Ur,Br|Ur,Lr|Ir,0|Ur,0|zr,0|Br,Dr|zr,Dr|Ur,0|Ir,Lr|Ur,Lr|zr,Br|zr,Br|Ur,0|Ir,0,0,Br|zr,Dr|zr,Dr|Ur,Lr|Ir,0|Lr,Lr|Ir,0|Lr,Br|Ur,0|Ur,0|zr,Br|zr,0|Ur,Lr|Ir,Dr|Ur,0|zr,Dr|zr,0|Br,Br|zr,0|Dr,0|Lr,Dr|Ir,0,Br|Ir,Lr|zr,Dr|zr,0|Br,Dr|Ur,Dr|Ir,0,Br|Ir,Lr|Ur,Lr|Ur,0|Ir,0|Ir,Lr|zr,0|Dr,Br|Ur];class Yr{constructor(t){this.keys=[];const e=[],s=[],i=[];for(let n=0,r=56;n<56;++n,r-=8){r+=r<-5?65:r<-3?31:r<-1?63:27===r?35:0;const s=7&r;e[n]=0!==(t[r>>>3]&1<>>10,this.keys[a]|=(4032&e)>>>6,++a,this.keys[a]=(258048&t)<<12,this.keys[a]|=(63&t)<<16,this.keys[a]|=(258048&e)>>>4,this.keys[a]|=63&e,++a}}enc8(t){const e=t.slice();let s,i,n,r=0;s=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++],i=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++],n=252645135&(s>>>4^i),i^=n,s^=n<<4,n=65535&(s>>>16^i),i^=n,s^=n<<16,n=858993459&(i>>>2^s),s^=n,i^=n<<2,n=16711935&(i>>>8^s),s^=n,i^=n<<8,i=i<<1|i>>>31&1,n=2863311530&(s^i),s^=n,i^=n,s=s<<1|s>>>31&1;for(let a=0,h=0;a<8;++a){n=i<<28|i>>>4,n^=this.keys[h++];let t=Xr[63&n];t|=Hr[n>>>8&63],t|=Pr[n>>>16&63],t|=Rr[n>>>24&63],n=i^this.keys[h++],t|=Or[63&n],t|=Kr[n>>>8&63],t|=Vr[n>>>16&63],t|=Nr[n>>>24&63],s^=t,n=s<<28|s>>>4,n^=this.keys[h++],t=Xr[63&n],t|=Hr[n>>>8&63],t|=Pr[n>>>16&63],t|=Rr[n>>>24&63],n=s^this.keys[h++],t|=Or[63&n],t|=Kr[n>>>8&63],t|=Vr[n>>>16&63],t|=Nr[n>>>24&63],i^=t}for(i=i<<31|i>>>1,n=2863311530&(s^i),s^=n,i^=n,s=s<<31|s>>>1,n=16711935&(s>>>8^i),i^=n,s^=n<<8,n=858993459&(s>>>2^i),i^=n,s^=n<<2,n=65535&(i>>>16^s),s^=n,i^=n<<16,n=252645135&(i>>>4^s),s^=n,i^=n<<4,n=[i,s],r=0;r<8;r++)e[r]=(n[r>>>2]>>>8*(3-r%4))%256,e[r]<0&&(e[r]+=256);return e}encrypt(t){return this.enc8(t.slice(0,8)).concat(this.enc8(t.slice(8,16)))}}var Gr={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};const Wr=0,qr=1,jr=2,Zr=5,Jr=7,$r=-260,ta=-32,ea=-223,sa=-224,ia=-239,na=-258,ra=-307,aa=-308,ha=-309,oa=-312,la=-313,ca=-256,da=1464686180,ua=3231835598;s(2203);class _a{constructor(){this._lines=0}decodeRect(t,e,s,i,n,r,a){0===this._lines&&(this._lines=i);const h=s*(8==a?1:4);if(n.rQwait("RAW",h))return!1;const o=e+(i-this._lines),l=Math.min(this._lines,Math.floor(n.rQlen/h));let c=n.rQ,d=n.rQi;if(8==a){const t=s*l,e=new Uint8Array(4*t);for(let s=0;s>0&3)/3,e[4*s+1]=255*(c[d+s]>>2&3)/3,e[4*s+2]=255*(c[d+s]>>4&3)/3,e[4*s+4]=0;c=e,d=0}return r.blitImage(t,o,s,l,c,d),n.rQskipBytes(l*h),this._lines-=l,!(this._lines>0)}}class fa{decodeRect(t,e,s,i,n,r,a){if(n.rQwait("COPYRECT",4))return!1;let h=n.rQshift16(),o=n.rQshift16();return r.copyImage(h,o,t,e,s,i),!0}}class pa{constructor(){this._subrects=0}decodeRect(t,e,s,i,n,r,a){if(0===this._subrects){if(n.rQwait("RRE",8))return!1;this._subrects=n.rQshift32();let a=n.rQshiftBytes(4);r.fillRect(t,e,s,i,a)}for(;this._subrects>0;){if(n.rQwait("RRE",12))return!1;let s=n.rQshiftBytes(4),i=n.rQshift16(),a=n.rQshift16(),h=n.rQshift16(),o=n.rQshift16();r.fillRect(t+i,e+a,h,o,s),this._subrects--}return!0}}class ga{constructor(){this._tiles=0,this._lastsubencoding=0}decodeRect(t,e,s,i,n,a,h){for(0===this._tiles&&(this._tilesX=Math.ceil(s/16),this._tilesY=Math.ceil(i/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){let h=1;if(n.rQwait("HEXTILE",h))return!1;let o=n.rQ,l=n.rQi,c=o[l];if(c>30)throw new Error("Illegal hextile subencoding (subencoding: "+c+")");const d=this._totalTiles-this._tiles,u=t+16*(d%this._tilesX),_=e+16*Math.floor(d/this._tilesX),f=Math.min(16,t+s-u),p=Math.min(16,e+i-_);if(1&c)h+=f*p*4;else if(2&c&&(h+=4),4&c&&(h+=4),8&c){if(h++,n.rQwait("HEXTILE",h))return!1;let t=o[l+h-1];h+=16&c?6*t:2*t}if(n.rQwait("HEXTILE",h))return!1;if(l++,0===c)1&this._lastsubencoding?r(" Ignoring blank after RAW"):a.fillRect(u,_,f,p,this._background);else if(1&c)a.blitImage(u,_,f,p,o,l),l+=h-1;else{if(2&c&&(this._background=[o[l],o[l+1],o[l+2],o[l+3]],l+=4),4&c&&(this._foreground=[o[l],o[l+1],o[l+2],o[l+3]],l+=4),a.startTile(u,_,f,p,this._background),8&c){let t=o[l];l++;for(let e=0;e>4,i=15&e,n=o[l];l++;const r=1+(n>>4),h=1+(15&n);a.subTile(s,i,r,h,t)}}a.finishTile()}n.rQi=l,this._lastsubencoding=c,this._tiles--}return!0}}class ma{constructor(){this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(let t=0;t<4;t++)this._zlibs[t]=new at}decodeRect(t,e,s,i,n,r,h){if(null===this._ctl){if(n.rQwait("TIGHT compression-control",1))return!1;this._ctl=n.rQshift8();for(let t=0;t<4;t++)this._ctl>>t&1&&(this._zlibs[t].reset(),a("Reset zlib stream "+t));this._ctl=this._ctl>>4}let o;if(8===this._ctl)o=this._fillRect(t,e,s,i,n,r,h);else if(9===this._ctl)o=this._jpegRect(t,e,s,i,n,r,h);else if(10===this._ctl)o=this._pngRect(t,e,s,i,n,r,h);else{if(0!=(128&this._ctl))throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");o=this._basicRect(this._ctl,t,e,s,i,n,r,h)}return o&&(this._ctl=null),o}_fillRect(t,e,s,i,n,r,a){if(n.rQwait("TIGHT",3))return!1;const h=n.rQi,o=n.rQ;return r.fillRect(t,e,s,i,[o[h+2],o[h+1],o[h]],!1),n.rQskipBytes(3),!0}_jpegRect(t,e,s,i,n,r,a){let h=this._readData(n);return null!==h&&(r.imageRect(t,e,s,i,"image/jpeg",h),!0)}_pngRect(t,e,s,i,n,r,a){throw new Error("PNG received in standard Tight rect")}_basicRect(t,e,s,i,n,r,a,h){if(null===this._filter)if(4&t){if(r.rQwait("TIGHT",1))return!1;this._filter=r.rQshift8()}else this._filter=0;let o,l=3&t;switch(this._filter){case 0:o=this._copyFilter(l,e,s,i,n,r,a,h);break;case 1:o=this._paletteFilter(l,e,s,i,n,r,a,h);break;case 2:o=this._gradientFilter(l,e,s,i,n,r,a,h);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return o&&(this._filter=null),o}_copyFilter(t,e,s,i,n,r,a,h){const o=i*n*3;let l;if(o<12){if(r.rQwait("TIGHT",o))return!1;l=r.rQshiftBytes(o)}else{if(l=this._readData(r),null===l)return!1;this._zlibs[t].setInput(l),l=this._zlibs[t].inflate(o),this._zlibs[t].setInput(null)}return a.blitRgbImage(e,s,i,n,l,0,!1),!0}_paletteFilter(t,e,s,i,n,r,a,h){if(0===this._numColors){if(r.rQwait("TIGHT palette",1))return!1;const t=r.rQpeek8()+1,e=3*t;if(r.rQwait("TIGHT palette",1+e))return!1;this._numColors=t,r.rQskipBytes(1),r.rQshiftTo(this._palette,e)}const o=this._numColors<=2?1:8,l=Math.floor((i*o+7)/8)*n;let c;if(l<12){if(r.rQwait("TIGHT",l))return!1;c=r.rQshiftBytes(l)}else{if(c=this._readData(r),null===c)return!1;this._zlibs[t].setInput(c),c=this._zlibs[t].inflate(l),this._zlibs[t].setInput(null)}return 2==this._numColors?this._monoRect(e,s,i,n,c,this._palette,a):this._paletteRect(e,s,i,n,c,this._palette,a),this._numColors=0,!0}_monoRect(t,e,s,i,n,r,a){const h=this._getScratchBuffer(s*i*4),o=Math.floor((s+7)/8),l=Math.floor(s/8);for(let c=0;c=0;a--)t=4*(c*s+8*i+7-a),e=3*(n[c*o+i]>>a&1),h[t]=r[e],h[t+1]=r[e+1],h[t+2]=r[e+2],h[t+3]=255;for(let a=7;a>=8-s%8;a--)t=4*(c*s+8*i+7-a),e=3*(n[c*o+i]>>a&1),h[t]=r[e],h[t+1]=r[e+1],h[t+2]=r[e+2],h[t+3]=255}a.blitRgbxImage(t,e,s,i,h,0,!1)}_paletteRect(t,e,s,i,n,r,a){const h=this._getScratchBuffer(s*i*4),o=s*i*4;for(let l=0,c=0;le.call(this,t))),!t.defaultPrevented)}}{constructor(t,e,s){if(!t)throw new Error("Must specify target");if(!e)throw new Error("Must specify URL");super(),this._target=t,this._url=e,s=s||{},this._rfbCredentials=s.credentials||{},this._shared=!("shared"in s)||!!s.shared,this._repeaterID=s.repeaterID||"",this._wsProtocols=s.wsProtocols||[],this._rfbConnectionState="",this._rfbInitState="",this._rfbAuthScheme=-1,this._rfbCleanDisconnect=!0,this._rfbVersion=0,this._rfbMaxVersion=3.8,this._rfbTightVNC=!1,this._rfbVeNCryptState=0,this._rfbXvpVer=0,this._fbWidth=0,this._fbHeight=0,this._fbName="",this._capabilities={power:!1},this._supportsFence=!1,this._supportsContinuousUpdates=!1,this._enabledContinuousUpdates=!1,this._supportsSetDesktopSize=!1,this._screenID=0,this._screenFlags=0,this._qemuExtKeyEventSupported=!1,this._clipboardText=null,this._clipboardServerCapabilitiesActions={},this._clipboardServerCapabilitiesFormats={},this._sock=null,this._display=null,this._flushing=!1,this._keyboard=null,this._gestures=null,this._disconnTimer=null,this._resizeTimeout=null,this._mouseMoveTimer=null,this._decoders={},this._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},this._mousePos={},this._mouseButtonMask=0,this._mouseLastMoveTime=0,this._viewportDragging=!1,this._viewportDragPos={},this._viewportHasMoved=!1,this._accumulatedWheelDeltaX=0,this._accumulatedWheelDeltaY=0,this._gestureLastTapTime=null,this._gestureFirstDoubleTapEv=null,this._gestureLastMagnitudeX=0,this._gestureLastMagnitudeY=0,this._eventHandlers={focusCanvas:this._focusCanvas.bind(this),windowResize:this._windowResize.bind(this),handleMouse:this._handleMouse.bind(this),handleWheel:this._handleWheel.bind(this),handleGesture:this._handleGesture.bind(this)},r(">> RFB.constructor"),this._screen=document.createElement("div"),this._screen.style.display="flex",this._screen.style.width="100%",this._screen.style.height="100%",this._screen.style.overflow="auto",this._screen.style.background="rgb(40, 40, 40)",this._canvas=document.createElement("canvas"),this._canvas.style.margin="auto",this._canvas.style.outline="none",this._canvas.style.flexShrink="0",this._canvas.width=0,this._canvas.height=0,this._canvas.tabIndex=-1,this._screen.appendChild(this._canvas),this._cursor=new Ar,this._cursorImage=Sa.cursors.none,this._decoders[Wr]=new _a,this._decoders[qr]=new fa,this._decoders[jr]=new pa,this._decoders[Zr]=new ga,this._decoders[Jr]=new ma,this._decoders[$r]=new wa;try{this._display=new D(this._canvas)}catch(Qa){throw o("Display exception: "+Qa),Qa}this._display.onflush=this._onFlush.bind(this),this._keyboard=new yr(this._canvas),this._keyboard.onkeyevent=this._handleKeyEvent.bind(this),this._gestures=new Sr,this._sock=new Mr,this._sock.on("message",(()=>{this._handleMessage()})),this._sock.on("open",(()=>{"connecting"===this._rfbConnectionState&&""===this._rfbInitState?(this._rfbInitState="ProtocolVersion",r("Starting VNC handshake")):this._fail("Unexpected server connection while "+this._rfbConnectionState)})),this._sock.on("close",(t=>{r("WebSocket on-close event");let e="";switch(t.code&&(e="(code: "+t.code,t.reason&&(e+=", reason: "+t.reason),e+=")"),this._rfbConnectionState){case"connecting":this._fail("Connection closed "+e);break;case"connected":this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected");break;case"disconnecting":this._updateConnectionState("disconnected");break;case"disconnected":this._fail("Unexpected server disconnect when already disconnected "+e);break;default:this._fail("Unexpected server disconnect before connecting "+e)}this._sock.off("close")})),this._sock.on("error",(t=>h("WebSocket on-error event"))),setTimeout(this._updateConnectionState.bind(this,"connecting")),r("<< RFB.constructor"),this.dragViewport=!1,this.focusOnClick=!0,this._viewOnly=!1,this._clipViewport=!1,this._scaleViewport=!1,this._resizeSession=!1,this._showDotCursor=!1,void 0!==s.showDotCursor&&(h("Specifying showDotCursor as a RFB constructor argument is deprecated"),this._showDotCursor=s.showDotCursor),this._qualityLevel=6,this._compressionLevel=2}get viewOnly(){return this._viewOnly}set viewOnly(t){this._viewOnly=t,"connecting"!==this._rfbConnectionState&&"connected"!==this._rfbConnectionState||(t?this._keyboard.ungrab():this._keyboard.grab())}get capabilities(){return this._capabilities}get touchButton(){return 0}set touchButton(t){h("Using old API!")}get clipViewport(){return this._clipViewport}set clipViewport(t){this._clipViewport=t,this._updateClip()}get scaleViewport(){return this._scaleViewport}set scaleViewport(t){this._scaleViewport=t,t&&this._clipViewport&&this._updateClip(),this._updateScale(),!t&&this._clipViewport&&this._updateClip()}get resizeSession(){return this._resizeSession}set resizeSession(t){this._resizeSession=t,t&&this._requestRemoteResize()}get showDotCursor(){return this._showDotCursor}set showDotCursor(t){this._showDotCursor=t,this._refreshCursor()}get background(){return this._screen.style.background}set background(t){this._screen.style.background=t}get qualityLevel(){return this._qualityLevel}set qualityLevel(t){!Number.isInteger(t)||t<0||t>9?o("qualityLevel must be an integer between 0 and 9"):this._qualityLevel!==t&&(this._qualityLevel=t,"connected"===this._rfbConnectionState&&this._sendEncodings())}get compressionLevel(){return this._compressionLevel}set compressionLevel(t){!Number.isInteger(t)||t<0||t>9?o("compressionLevel must be an integer between 0 and 9"):this._compressionLevel!==t&&(this._compressionLevel=t,"connected"===this._rfbConnectionState&&this._sendEncodings())}disconnect(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}sendCredentials(t){this._rfbCredentials=t,setTimeout(this._initMsg.bind(this),0)}sendCtrlAltDel(){"connected"!==this._rfbConnectionState||this._viewOnly||(a("Sending Ctrl-Alt-Del"),this.sendKey(xi,"ControlLeft",!0),this.sendKey(Mi,"AltLeft",!0),this.sendKey(Qe,"Delete",!0),this.sendKey(Qe,"Delete",!1),this.sendKey(Mi,"AltLeft",!1),this.sendKey(xi,"ControlLeft",!1))}machineShutdown(){this._xvpOp(1,2)}machineReboot(){this._xvpOp(1,3)}machineReset(){this._xvpOp(1,4)}sendKey(t,e,s){if("connected"!==this._rfbConnectionState||this._viewOnly)return;if(void 0===s)return this.sendKey(t,e,!0),void this.sendKey(t,e,!1);const i=Gr[e];if(this._qemuExtKeyEventSupported&&i)a("Sending key ("+(s?"down":"up")+"): keysym "+(t=t||0)+", scancode "+i),Sa.messages.QEMUExtendedKeyEvent(this._sock,t,s,i);else{if(!t)return;a("Sending keysym ("+(s?"down":"up")+"): "+t),Sa.messages.keyEvent(this._sock,t,s?1:0)}}focus(){this._canvas.focus()}blur(){this._canvas.blur()}clipboardPasteFrom(t){if("connected"===this._rfbConnectionState&&!this._viewOnly)if(this._clipboardServerCapabilitiesFormats[1]&&this._clipboardServerCapabilitiesActions[134217728])this._clipboardText=t,Sa.messages.extendedClipboardNotify(this._sock,[1]);else{let e=new Uint8Array(t.length);for(let s=0;s> RFB.connect"),a("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(Ur){"SyntaxError"===Ur.name?this._fail("Invalid host or port ("+Ur+")"):this._fail("Error when opening socket ("+Ur+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("touchstart",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),r("<< RFB.connect")}_disconnect(){r(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(Ur){if("NotFoundError"!==Ur.name)throw Ur}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),r("<< RFB.disconnect")}_focusCanvas(t){this.focusOnClick&&this.focus()}_setDesktopName(t){this._fbName=t,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}_windowResize(t){window.requestAnimationFrame((()=>{this._updateClip(),this._updateScale()})),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}_updateClip(){const t=this._display.clipViewport;let e=this._clipViewport;if(this._scaleViewport&&(e=!1),t!==e&&(this._display.clipViewport=e),e){const t=this._screenSize();this._display.viewportChangeSize(t.w,t.h),this._fixScrollbars()}}_updateScale(){if(this._scaleViewport){const t=this._screenSize();this._display.autoscale(t.w,t.h)}else this._display.scale=1;this._fixScrollbars()}_requestRemoteResize(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;const t=this._screenSize();Sa.messages.setDesktopSize(this._sock,Math.floor(t.w),Math.floor(t.h),this._screenID,this._screenFlags),r("Requested new desktop size: "+t.w+"x"+t.h)}_screenSize(){let t=this._screen.getBoundingClientRect();return{w:t.width,h:t.height}}_fixScrollbars(){const t=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=t}_updateConnectionState(t){const e=this._rfbConnectionState;if(t!==e)if("disconnected"!==e){switch(t){case"connected":if("connecting"!==e)return void o("Bad transition to connected state, previous connection state: "+e);break;case"disconnected":if("disconnecting"!==e)return void o("Bad transition to disconnected state, previous connection state: "+e);break;case"connecting":if(""!==e)return void o("Bad transition to connecting state, previous connection state: "+e);break;case"disconnecting":if("connected"!==e&&"connecting"!==e)return void o("Bad transition to disconnecting state, previous connection state: "+e);break;default:return void o("Unknown connection state: "+t)}switch(this._rfbConnectionState=t,r("New state '"+t+"', was '"+e+"'."),this._disconnTimer&&"disconnecting"!==t&&(r("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),t){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout((()=>{o("Disconnection timed out."),this._updateConnectionState("disconnected")}),3e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}))}}else o("Tried changing state of a disconnected RFB object");else r("Already in state '"+t+"', ignoring")}_fail(t){switch(this._rfbConnectionState){case"disconnecting":o("Failed when disconnecting: "+t);break;case"connected":o("Failed while connected: "+t);break;case"connecting":o("Failed when connecting: "+t);break;default:o("RFB failure: "+t)}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}_setCapability(t,e){this._capabilities[t]=e,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}_handleMessage(){if(0!==this._sock.rQlen)switch(this._rfbConnectionState){case"disconnected":o("Got data while disconnected");break;case"connected":for(;!this._flushing&&this._normalMsg()&&0!==this._sock.rQlen;);break;default:this._initMsg()}else h("handleMessage called on an empty receive queue")}_handleKeyEvent(t,e,s){this.sendKey(t,e,s)}_handleMouse(t){if("click"===t.type&&t.target!==this._canvas)return;if(t.stopPropagation(),t.preventDefault(),"click"===t.type||"contextmenu"===t.type)return;let e=x(t.clientX,t.clientY,this._canvas);switch(t.type){case"mousedown":!function(t){if(t.setCapture)t.setCapture(),document.captureElement=t,t.addEventListener("mouseup",F);else{F();let e=document.getElementById("noVNC_mouse_capture_elem");null===e&&(e=document.createElement("div"),e.id="noVNC_mouse_capture_elem",e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1e4,e.style.display="none",document.body.appendChild(e),e.addEventListener("contextmenu",E),e.addEventListener("mousemove",E),e.addEventListener("mouseup",E)),document.captureElement=t,T.observe(t,{attributes:!0}),M(),e.style.display="",window.addEventListener("mousemove",E),window.addEventListener("mouseup",E)}}(this._canvas),this._handleMouseButton(e.x,e.y,!0,1<u||Math.abs(i)>u)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:t,y:e},this._display.viewportChangePos(s,i))}else if(this._mousePos={x:t,y:e},null==this._mouseMoveTimer){const s=Date.now()-this._mouseLastMoveTime;s>17?(this._sendMouse(t,e,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout((()=>{this._handleDelayedMouseMove()}),17-s)}}_handleDelayedMouseMove(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}_sendMouse(t,e,s){"connected"===this._rfbConnectionState&&(this._viewOnly||Sa.messages.pointerEvent(this._sock,this._display.absX(t),this._display.absY(e),s))}_handleWheel(t){if("connected"!==this._rfbConnectionState)return;if(this._viewOnly)return;t.stopPropagation(),t.preventDefault();let e=x(t.clientX,t.clientY,this._canvas),s=t.deltaX,i=t.deltaY;0!==t.deltaMode&&(s*=19,i*=19),this._accumulatedWheelDeltaX+=s,this._accumulatedWheelDeltaY+=i,Math.abs(this._accumulatedWheelDeltaX)>=50&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(e.x,e.y,!0,32),this._handleMouseButton(e.x,e.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(e.x,e.y,!0,64),this._handleMouseButton(e.x,e.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=50&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(e.x,e.y,!0,8),this._handleMouseButton(e.x,e.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(e.x,e.y,!0,16),this._handleMouseButton(e.x,e.y,!1,16)),this._accumulatedWheelDeltaY=0)}_fakeMouseMove(t,e,s){this._handleMouseMove(e,s),this._cursor.move(t.detail.clientX,t.detail.clientY)}_handleTapEvent(t,e){let s=x(t.detail.clientX,t.detail.clientY,this._canvas);if(null!==this._gestureLastTapTime&&Date.now()-this._gestureLastTapTime<1e3&&this._gestureFirstDoubleTapEv.detail.type===t.detail.type){let e=this._gestureFirstDoubleTapEv.detail.clientX-t.detail.clientX,i=this._gestureFirstDoubleTapEv.detail.clientY-t.detail.clientY;Math.hypot(e,i)<50?s=x(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=t}else this._gestureFirstDoubleTapEv=t;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,s.x,s.y),this._handleMouseButton(s.x,s.y,!0,e),this._handleMouseButton(s.x,s.y,!1,e)}_handleGesture(t){let e,s=x(t.detail.clientX,t.detail.clientY,this._canvas);switch(t.type){case"gesturestart":switch(t.detail.type){case"onetap":this._handleTapEvent(t,1);break;case"twotap":this._handleTapEvent(t,4);break;case"threetap":this._handleTapEvent(t,2);break;case"drag":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!0,1);break;case"longpress":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=t.detail.magnitudeX,this._gestureLastMagnitudeY=t.detail.magnitudeY,this._fakeMouseMove(t,s.x,s.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(t.detail.magnitudeX,t.detail.magnitudeY),this._fakeMouseMove(t,s.x,s.y)}break;case"gesturemove":switch(t.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(t,s.x,s.y);break;case"twodrag":for(this._fakeMouseMove(t,s.x,s.y);t.detail.magnitudeY-this._gestureLastMagnitudeY>ba;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeY+=ba;for(;t.detail.magnitudeY-this._gestureLastMagnitudeY<-50;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeY-=ba;for(;t.detail.magnitudeX-this._gestureLastMagnitudeX>ba;)this._handleMouseButton(s.x,s.y,!0,32),this._handleMouseButton(s.x,s.y,!1,32),this._gestureLastMagnitudeX+=ba;for(;t.detail.magnitudeX-this._gestureLastMagnitudeX<-50;)this._handleMouseButton(s.x,s.y,!0,64),this._handleMouseButton(s.x,s.y,!1,64),this._gestureLastMagnitudeX-=ba;break;case"pinch":if(this._fakeMouseMove(t,s.x,s.y),e=Math.hypot(t.detail.magnitudeX,t.detail.magnitudeY),Math.abs(e-this._gestureLastMagnitudeX)>75){for(this._handleKeyEvent(xi,"ControlLeft",!0);e-this._gestureLastMagnitudeX>75;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeX+=75;for(;e-this._gestureLastMagnitudeX<-75;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeX-=75}this._handleKeyEvent(xi,"ControlLeft",!1)}break;case"gestureend":switch(t.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,1);break;case"longpress":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,4)}}}_negotiateProtocolVersion(){if(this._sock.rQwait("version",12))return!1;const t=this._sock.rQshiftStr(12).substr(4,7);a("Server ProtocolVersion: "+t);let e=0;switch(t){case"000.000":e=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+t)}if(e){let t="ID:"+this._repeaterID;for(;t.length<250;)t+="\0";return this._sock.sendString(t),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);const s="00"+parseInt(this._rfbVersion,10)+".00"+10*this._rfbVersion%10;this._sock.sendString("RFB "+s+"\n"),r("Sent ProtocolVersion: "+s),this._rfbInitState="Security"}_negotiateSecurity(){function t(t,e){for(let s=0;s=3.7){const e=this._sock.rQshift8();if(this._sock.rQwait("security type",e,1))return!1;if(0===e)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();const s=this._sock.rQshiftBytes(e);if(r("Server security types: "+s),t(1,s))this._rfbAuthScheme=1;else if(t(22,s))this._rfbAuthScheme=22;else if(t(16,s))this._rfbAuthScheme=16;else if(t(2,s))this._rfbAuthScheme=2;else{if(!t(19,s))return this._fail("Unsupported security types (types: "+s+")");this._rfbAuthScheme=19}this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),0==this._rfbAuthScheme)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",r("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}_handleSecurityReason(){if(this._sock.rQwait("reason length",4))return!1;const t=this._sock.rQshift32();let e="";if(t>0){if(this._sock.rQwait("reason",t,4))return!1;e=this._sock.rQshiftStr(t)}return""!==e?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:e}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+e+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}_negotiateXvpAuth(){if(void 0===this._rfbCredentials.username||void 0===this._rfbCredentials.password||void 0===this._rfbCredentials.target)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;const t=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(t),this._rfbAuthScheme=2,this._negotiateAuthentication()}_negotiateVeNCryptAuth(){if(0==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt version",2))return!1;const t=this._sock.rQshift8(),e=this._sock.rQshift8();if(0!=t||2!=e)return this._fail("Unsupported VeNCrypt version "+t+"."+e);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(1==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt ack",1))return!1;const t=this._sock.rQshift8();if(0!=t)return this._fail("VeNCrypt failure "+t);this._rfbVeNCryptState=2}if(2==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;const t=this._sock.rQshift8();if(t<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=t,this._rfbVeNCryptState=3}if(3==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;const t=[];for(let e=0;e0&&this._sock.rQwait("tunnel capabilities",16*t,4))return!1;if(this._rfbTightVNC=!0,t>0)return this._negotiateTightTunnels(t),!1}if(this._sock.rQwait("sub auth count",4))return!1;const t=this._sock.rQshift32();if(0===t)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*t,4))return!1;const e={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},s=[];for(let i=0;i=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}_handleSecurityResult(){if(this._sock.rQwait("VNC auth response ",4))return!1;const t=this._sock.rQshift32();return 0===t?(this._rfbInitState="ClientInitialisation",r("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=t,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:t}})),this._fail("Security handshake failed"))}_negotiateServerInit(){if(this._sock.rQwait("server initialization",24))return!1;const t=this._sock.rQshift16(),e=this._sock.rQshift16(),s=this._sock.rQshift8(),i=this._sock.rQshift8(),n=this._sock.rQshift8(),r=this._sock.rQshift8(),o=this._sock.rQshift16(),c=this._sock.rQshift16(),d=this._sock.rQshift16(),u=this._sock.rQshift8(),_=this._sock.rQshift8(),f=this._sock.rQshift8();this._sock.rQskipBytes(3);const p=this._sock.rQshift32();if(this._sock.rQwait("server init name",p,24))return!1;let g=this._sock.rQshiftStr(p);if(g=l(g,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+p))return!1;const t=this._sock.rQshift16(),e=this._sock.rQshift16(),s=this._sock.rQshift16();this._sock.rQskipBytes(2);const i=16*(t+e+s);if(this._sock.rQwait("TightVNC extended server init header",i,32+p))return!1;this._sock.rQskipBytes(16*t),this._sock.rQskipBytes(16*e),this._sock.rQskipBytes(16*s)}return a("Screen: "+t+"x"+e+", bpp: "+s+", depth: "+i+", bigEndian: "+n+", trueColor: "+r+", redMax: "+o+", greenMax: "+c+", blueMax: "+d+", redShift: "+u+", greenShift: "+_+", blueShift: "+f),this._setDesktopName(g),this._resize(t,e),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,"Intel(r) AMT KVM"===this._fbName&&(h("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),Sa.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),Sa.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}_sendEncodings(){const t=[];t.push(qr),24==this._fbDepth&&(t.push(Jr),t.push($r),t.push(Zr),t.push(jr)),t.push(Wr),t.push(ta+this._qualityLevel),t.push(ca+this._compressionLevel),t.push(ea),t.push(sa),t.push(na),t.push(aa),t.push(ha),t.push(oa),t.push(la),t.push(ra),t.push(ua),24==this._fbDepth&&(t.push(da),t.push(ia)),Sa.messages.clientEncodings(this._sock,t)}_initMsg(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}_handleSetColourMapMsg(){return r("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}_handleServerCutText(){if(r("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);let t=this._sock.rQshift32();if(t=i(t),this._sock.rQwait("ServerCutText content",Math.abs(t),8))return!1;if(t>=0){const e=this._sock.rQshiftStr(t);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:e}}))}else{t=Math.abs(t);const e=this._sock.rQshift32();let s=65535&e,i=4278190080&e;if(!!(i&va)){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(let e=0;e<=15;e++){let t=1<0&&"\0"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),n=n.replace("\r\n","\n"),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:n}}))}}}}return!0}_handleServerFenceMsg(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);let t=this._sock.rQshift32(),e=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",e,9))return!1;e>64&&(h("Bad payload length ("+e+") in fence response"),e=64);const s=this._sock.rQshiftStr(e);return this._supportsFence=!0,t&1<<31?(t&=3,Sa.messages.clientFence(this._sock,t,s),!0):this._fail("Unexpected fence response")}_handleXvpMsg(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);const t=this._sock.rQshift8(),e=this._sock.rQshift8();switch(e){case 0:o("XVP Operation Failed");break;case 1:this._rfbXvpVer=t,a("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+e+")")}return!0}_normalMsg(){let t,e,s;switch(t=this._FBU.rects>0?0:this._sock.rQshift8(),t){case 0:return s=this._framebufferUpdate(),s&&!this._enabledContinuousUpdates&&Sa.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),s;case 1:return this._handleSetColourMapMsg();case 2:return r("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return e=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,e&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),a("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+t+")"),r("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}_onFlush(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}_framebufferUpdate(){if(0===this._FBU.rects){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(null===this._FBU.encoding){if(this._sock.rQwait("rect header",12))return!1;const t=this._sock.rQshiftBytes(12);this._FBU.x=(t[0]<<8)+t[1],this._FBU.y=(t[2]<<8)+t[3],this._FBU.width=(t[4]<<8)+t[5],this._FBU.height=(t[6]<<8)+t[7],this._FBU.encoding=parseInt((t[8]<<24)+(t[9]<<16)+(t[10]<<8)+t[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}_handleRect(){switch(this._FBU.encoding){case sa:return this._FBU.rects=1,!0;case da:return this._handleVMwareCursor();case ia:return this._handleCursor();case na:try{void 0!==document.createEvent("keyboardEvent").code&&(this._qemuExtKeyEventSupported=!0)}catch(ee){}return!0;case ra:return this._handleDesktopName();case ea:return this._resize(this._FBU.width,this._FBU.height),!0;case aa:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}_handleVMwareCursor(){const t=this._FBU.x,e=this._FBU.y,s=this._FBU.width,i=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;const n=this._sock.rQshift8();let r;this._sock.rQshift8();if(0==n){const t=-256;if(r=new Array(s*i*4),this._sock.rQwait("VMware cursor classic encoding",s*i*4*2,2))return!1;let e=new Array(s*i);for(let r=0;r>8&255,s=t>>16&255,i=t>>24&255;r[4*a]=e,r[4*a+1]=s,r[4*a+2]=i,r[4*a+3]=255}else(e[a]&t)==t?0==n[a]?(r[4*a]=0,r[4*a+1]=0,r[4*a+2]=0,r[4*a+3]=0):(n[a],r[4*a]=0,r[4*a+1]=0,r[4*a+2]=0,r[4*a+3]=255):(r[4*a]=0,r[4*a+1]=0,r[4*a+2]=0,r[4*a+3]=255)}else{if(1!=n)return h("The given cursor type is not supported: "+n+" given."),!1;if(this._sock.rQwait("VMware cursor alpha encoding",s*i*4,2))return!1;r=new Array(s*i*4);for(let t=0;t>24&255,r[4*t+1]=e>>16&255,r[4*t+2]=e>>8&255,r[4*t+3]=255&e}}return this._updateCursor(r,t,e,s,i),!0}_handleCursor(){const t=this._FBU.x,e=this._FBU.y,s=this._FBU.width,i=this._FBU.height,n=s*i*4,r=Math.ceil(s/8)*i;let a=n+r;if(this._sock.rQwait("cursor encoding",a))return!1;const h=this._sock.rQshiftBytes(n),o=this._sock.rQshiftBytes(r);let l=new Uint8Array(s*i*4),c=0;for(let d=0;dt.charCodeAt(0)));return new Yr(s).encrypt(e)}}Sa.messages={keyEvent(t,e,s){const i=t._sQ,n=t._sQlen;i[n]=4,i[n+1]=s,i[n+2]=0,i[n+3]=0,i[n+4]=e>>24,i[n+5]=e>>16,i[n+6]=e>>8,i[n+7]=e,t._sQlen+=8,t.flush()},QEMUExtendedKeyEvent(t,e,s,i){const n=t._sQ,r=t._sQlen;n[r]=255,n[r+1]=0,n[r+2]=s>>8,n[r+3]=s,n[r+4]=e>>24,n[r+5]=e>>16,n[r+6]=e>>8,n[r+7]=e;const a=function(t){const e=255&i;return 224===i>>8&&e<127?128|e:t}(i);n[r+8]=a>>24,n[r+9]=a>>16,n[r+10]=a>>8,n[r+11]=a,t._sQlen+=12,t.flush()},pointerEvent(t,e,s,i){const n=t._sQ,r=t._sQlen;n[r]=5,n[r+1]=i,n[r+2]=e>>8,n[r+3]=e,n[r+4]=s>>8,n[r+5]=s,t._sQlen+=6,t.flush()},_buildExtendedClipboardFlags(t,e){let s=new Uint8Array(4),i=0,n=0;for(let r=0;r>24,s[1]=0,s[2]=0,s[3]=i,s},extendedClipboardProvide(t,e,s){let i=new we,n=[];for(let h=0;h>24&255,t.length>>16&255,t.length>>8&255,255&t.length);for(let e=0;eparseInt(t))),i.sort(((t,e)=>t-e)),n.set(Sa.messages._buildExtendedClipboardFlags(e,[]));let r=4;for(let a=0;a>24,n[r+1]=s[i[a]]>>16,n[r+2]=s[i[a]]>>8,n[r+3]=s[i[a]]>>0,r+=4,n[3]|=1<>>0:e.length,i[n+4]=r>>24,i[n+5]=r>>16,i[n+6]=r>>8,i[n+7]=r,t._sQlen+=8;let a=0,h=e.length;for(;h>0;){let s=Math.min(h,t._sQbufferSize-t._sQlen);for(let n=0;n>8,r[a+3]=e,r[a+4]=s>>8,r[a+5]=s,r[a+6]=1,r[a+7]=0,r[a+8]=i>>24,r[a+9]=i>>16,r[a+10]=i>>8,r[a+11]=i,r[a+12]=0,r[a+13]=0,r[a+14]=0,r[a+15]=0,r[a+16]=e>>8,r[a+17]=e,r[a+18]=s>>8,r[a+19]=s,r[a+20]=n>>24,r[a+21]=n>>16,r[a+22]=n>>8,r[a+23]=n,t._sQlen+=24,t.flush()},clientFence(t,e,s){const i=t._sQ,n=t._sQlen;i[n]=248,i[n+1]=0,i[n+2]=0,i[n+3]=0,i[n+4]=e>>24,i[n+5]=e>>16,i[n+6]=e>>8,i[n+7]=e;const r=s.length;i[n+8]=r;for(let a=0;a>8,a[h+3]=s,a[h+4]=i>>8,a[h+5]=i,a[h+6]=n>>8,a[h+7]=n,a[h+8]=r>>8,a[h+9]=r,t._sQlen+=10,t.flush()},pixelFormat(t,e,s){const i=t._sQ,n=t._sQlen;let r;r=e>16?32:e>8?16:8;const a=Math.floor(e/3);i[n]=0,i[n+1]=0,i[n+2]=0,i[n+3]=0,i[n+4]=r,i[n+5]=e,i[n+6]=0,i[n+7]=s?1:0,i[n+8]=0,i[n+9]=(1<>8,s[i+3]=e.length;let n=i+4;for(let r=0;r>24,s[n+1]=t>>16,s[n+2]=t>>8,s[n+3]=t,n+=4}t._sQlen+=n-i,t.flush()},fbUpdateRequest(t,e,s,i,n,r){const a=t._sQ,h=t._sQlen;"undefined"===typeof s&&(s=0),"undefined"===typeof i&&(i=0),a[h]=3,a[h+1]=e?1:0,a[h+2]=s>>8&255,a[h+3]=255&s,a[h+4]=i>>8&255,a[h+5]=255&i,a[h+6]=n>>8&255,a[h+7]=255&n,a[h+8]=r>>8&255,a[h+9]=255&r,t._sQlen+=10,t.flush()},xvpOp(t,e,s){const i=t._sQ,n=t._sQlen;i[n]=250,i[n+1]=0,i[n+2]=e,i[n+3]=s,t._sQlen+=4,t.flush()}},Sa.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},2203:function(){"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){"use strict";if(null==t)throw new TypeError("Cannot convert undefined or null to object");const s=Object(t);for(let i=1;i{function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),s}t.prototype=window.Event.prototype,"function"!==typeof window.CustomEvent&&(window.CustomEvent=t)})(),Number.isInteger=Number.isInteger||function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/291-3b847a192c168e5d.js b/striker-ui/out/_next/static/chunks/291-3b847a192c168e5d.js new file mode 100644 index 00000000..b71489dc --- /dev/null +++ b/striker-ui/out/_next/static/chunks/291-3b847a192c168e5d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[291],{797:function(e,t,r){r.d(t,{Z:function(){return y}});var n=r(7462),i=r(5987),o=r(7294),a=r(6010),c=r(6496),u=r(594),s=(0,u.Z)(o.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),l=(0,u.Z)(o.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),d=r(9693),f=(0,u.Z)(o.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),p=r(3871),h=r(1591),m=o.createElement(l,null),v=o.createElement(s,null),b=o.createElement(f,null),g=o.forwardRef((function(e,t){var r=e.checkedIcon,u=void 0===r?m:r,s=e.classes,l=e.color,d=void 0===l?"secondary":l,f=e.icon,h=void 0===f?v:f,g=e.indeterminate,y=void 0!==g&&g,k=e.indeterminateIcon,w=void 0===k?b:k,x=e.inputProps,C=e.size,Z=void 0===C?"medium":C,E=(0,i.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),O=y?w:h,z=y?w:u;return o.createElement(c.Z,(0,n.Z)({type:"checkbox",classes:{root:(0,a.Z)(s.root,s["color".concat((0,p.Z)(d))],y&&s.indeterminate),checked:s.checked,disabled:s.disabled},color:d,inputProps:(0,n.Z)({"data-indeterminate":y},x),icon:o.cloneElement(O,{fontSize:void 0===O.props.fontSize&&"small"===Z?Z:O.props.fontSize}),checkedIcon:o.cloneElement(z,{fontSize:void 0===z.props.fontSize&&"small"===Z?Z:z.props.fontSize}),ref:t},E))})),y=(0,h.Z)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(g)},3681:function(e,t,r){var n=r(7462),i=r(5987),o=r(7294),a=r(6010),c=r(3871),u=r(1591),s=r(9693),l=r(8920),d=o.forwardRef((function(e,t){var r=e.classes,u=e.className,s=e.color,d=void 0===s?"primary":s,f=e.value,p=e.valueBuffer,h=e.variant,m=void 0===h?"indeterminate":h,v=(0,i.Z)(e,["classes","className","color","value","valueBuffer","variant"]),b=(0,l.Z)(),g={},y={bar1:{},bar2:{}};if("determinate"===m||"buffer"===m)if(void 0!==f){g["aria-valuenow"]=Math.round(f),g["aria-valuemin"]=0,g["aria-valuemax"]=100;var k=f-100;"rtl"===b.direction&&(k=-k),y.bar1.transform="translateX(".concat(k,"%)")}else 0;if("buffer"===m)if(void 0!==p){var w=(p||0)-100;"rtl"===b.direction&&(w=-w),y.bar2.transform="translateX(".concat(w,"%)")}else 0;return o.createElement("div",(0,n.Z)({className:(0,a.Z)(r.root,r["color".concat((0,c.Z)(d))],u,{determinate:r.determinate,indeterminate:r.indeterminate,buffer:r.buffer,query:r.query}[m]),role:"progressbar"},g,{ref:t},v),"buffer"===m?o.createElement("div",{className:(0,a.Z)(r.dashed,r["dashedColor".concat((0,c.Z)(d))])}):null,o.createElement("div",{className:(0,a.Z)(r.bar,r["barColor".concat((0,c.Z)(d))],("indeterminate"===m||"query"===m)&&r.bar1Indeterminate,{determinate:r.bar1Determinate,buffer:r.bar1Buffer}[m]),style:y.bar1}),"determinate"===m?null:o.createElement("div",{className:(0,a.Z)(r.bar,("indeterminate"===m||"query"===m)&&r.bar2Indeterminate,"buffer"===m?[r["color".concat((0,c.Z)(d))],r.bar2Buffer]:r["barColor".concat((0,c.Z)(d))]),style:y.bar2}))}));t.Z=(0,u.Z)((function(e){var t=function(t){return"light"===e.palette.type?(0,s.$n)(t,.62):(0,s._j)(t,.5)},r=t(e.palette.primary.main),n=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:r},colorSecondary:{backgroundColor:n},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(d)},9570:function(e,t,r){var n=r(7462),i=r(5987),o=r(7294),a=r(6010),c=r(1591),u=r(9693),s=r(3871),l=r(6496),d=o.forwardRef((function(e,t){var r=e.classes,c=e.className,u=e.color,d=void 0===u?"secondary":u,f=e.edge,p=void 0!==f&&f,h=e.size,m=void 0===h?"medium":h,v=(0,i.Z)(e,["classes","className","color","edge","size"]),b=o.createElement("span",{className:r.thumb});return o.createElement("span",{className:(0,a.Z)(r.root,c,{start:r.edgeStart,end:r.edgeEnd}[p],"small"===m&&r["size".concat((0,s.Z)(m))])},o.createElement(l.Z,(0,n.Z)({type:"checkbox",icon:b,checkedIcon:b,classes:{root:(0,a.Z)(r.switchBase,r["color".concat((0,s.Z)(d))]),input:r.input,checked:r.checked,disabled:r.disabled},ref:t},v)),o.createElement("span",{className:r.track}))}));t.Z=(0,c.Z)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,u.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,u.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(d)},6496:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(7462),i=r(6854),o=r(5987),a=r(7294),c=r(6010),u=r(2775),s=a.createContext();var l=s;var d=r(1591),f=r(7812),p=a.forwardRef((function(e,t){var r=e.autoFocus,s=e.checked,d=e.checkedIcon,p=e.classes,h=e.className,m=e.defaultChecked,v=e.disabled,b=e.icon,g=e.id,y=e.inputProps,k=e.inputRef,w=e.name,x=e.onBlur,C=e.onChange,Z=e.onFocus,E=e.readOnly,O=e.required,z=e.tabIndex,B=e.type,S=e.value,P=(0,o.Z)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),I=(0,u.Z)({controlled:s,default:Boolean(m),name:"SwitchBase",state:"checked"}),$=(0,i.Z)(I,2),R=$[0],M=$[1],F=a.useContext(l),T=v;F&&"undefined"===typeof T&&(T=F.disabled);var V="checkbox"===B||"radio"===B;return a.createElement(f.Z,(0,n.Z)({component:"span",className:(0,c.Z)(p.root,h,R&&p.checked,T&&p.disabled),disabled:T,tabIndex:null,role:void 0,onFocus:function(e){Z&&Z(e),F&&F.onFocus&&F.onFocus(e)},onBlur:function(e){x&&x(e),F&&F.onBlur&&F.onBlur(e)},ref:t},P),a.createElement("input",(0,n.Z)({autoFocus:r,checked:s,defaultChecked:m,className:p.input,disabled:T,id:V&&g,name:w,onChange:function(e){var t=e.target.checked;M(t),C&&C(e,t)},readOnly:E,ref:k,required:O,tabIndex:z,type:B,value:S},y)),R?d:b)})),h=(0,d.Z)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(p)},1959:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.Z=a},9067:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=a},8513:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.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"}),"MoreVert");t.Z=a},8600:function(e){const t=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],n=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],i=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],o=(e,t,r)=>{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):!0!==t&&void 0===r||(n=e.toLocaleString(void 0,r)),n};e.exports=(e,a)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const c=(a=Object.assign({bits:!1,binary:!1},a)).bits?a.binary?i:n:a.binary?r:t;if(a.signed&&0===e)return` 0 ${c[0]}`;const u=e<0,s=u?"-":a.signed?"+":"";let l;if(u&&(e=-e),void 0!==a.minimumFractionDigits&&(l={minimumFractionDigits:a.minimumFractionDigits}),void 0!==a.maximumFractionDigits&&(l=Object.assign({maximumFractionDigits:a.maximumFractionDigits},l)),e<1){return s+o(e,a.locale,l)+" "+c[0]}const d=Math.min(Math.floor(a.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),c.length-1);e/=Math.pow(a.binary?1024:1e3,d),l||(e=e.toPrecision(3));return s+o(Number(e),a.locale,l)+" "+c[d]}},2515:function(e,t,r){r.d(t,{ZP:function(){return F}});var n=r(7294),i=Object.prototype.hasOwnProperty;var o=new WeakMap,a=0;var c=function(){function e(e){void 0===e&&(e={}),this.cache=new Map(Object.entries(e)),this.subs=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.cache.get(t)},e.prototype.set=function(e,t){var r=this.serializeKey(e)[0];this.cache.set(r,t),this.notify()},e.prototype.keys=function(){return Array.from(this.cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.cache.has(t)},e.prototype.clear=function(){this.cache.clear(),this.notify()},e.prototype.delete=function(e){var t=this.serializeKey(e)[0];this.cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"===typeof e)try{e=e()}catch(r){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",r=0;r-1&&(t.subs[n]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;er.errorRetryCount)){var o=Math.min(i.retryCount,8),a=~~((Math.random()+.5)*(1<0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0));return Promise.all(l).then((function(){return d.get(n)}))}return Promise.resolve(d.get(n))},$=function(e,t,r,n){var i=O[e];if(e&&i)for(var o=0;o0));return[2,Promise.all(m).then((function(){if(s)throw s;return d.get(i)}))]}if(s)throw s;return[2,u]}}))}))};Object.defineProperty(y.Provider,"default",{value:h});y.Provider;var M=function(){for(var e=this,t=[],r=0;r2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),a=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,c=d.serializeKey(i),u=c[0],s=c[1],l=c[2],f=c[3],p=(0,n.useRef)(o);b((function(){p.current=o}));var g=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},P=function(){var e=d.get(u);return"undefined"===typeof e?o.initialData:e},I=function(){return!!d.get(f)||u&&g()},M=P(),F=d.get(l),T=I(),V=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),D=(0,n.useRef)({data:M,error:F,isValidating:T});(0,n.useDebugValue)(D.current.data);var L,N,j=(0,n.useState)({})[1],q=(0,n.useCallback)((function(e){var t=!1;for(var r in e)D.current[r]!==e[r]&&(D.current[r]=e[r],V.current[r]&&(t=!0));if(t){if(A.current||!K.current)return;j({})}}),[]),A=(0,n.useRef)(!1),H=(0,n.useRef)(u),K=(0,n.useRef)(!1),W=(0,n.useCallback)((function(e){for(var t,r=[],n=1;n=0&&(r[n]=r[r.length-1],r.pop())}},X=(0,n.useCallback)((function(t){return void 0===t&&(t={}),k(e,void 0,void 0,(function(){var e,r,n,i,c,h,m,v,b,g;return w(this,(function(y){switch(y.label){case 0:if(!u||!a)return[2,!1];if(A.current)return[2,!1];if(p.current.isPaused())return[2,!1];e=t.retryCount,r=void 0===e?0:e,n=t.dedupe,i=void 0!==n&&n,c=!0,h="undefined"!==typeof x[u]&&i,y.label=1;case 1:return y.trys.push([1,6,,7]),q({isValidating:!0}),d.set(f,!0),h||$(u,D.current.data,D.current.error,!0),m=void 0,v=void 0,h?(v=C[u],[4,x[u]]):[3,3];case 2:return m=y.sent(),[3,5];case 3:return o.loadingTimeout&&!d.get(u)&&setTimeout((function(){c&&W("onLoadingSlow",u,o)}),o.loadingTimeout),x[u]=null!==s?a.apply(void 0,s):a(u),C[u]=v=S(),[4,x[u]];case 4:m=y.sent(),setTimeout((function(){delete x[u],delete C[u]}),o.dedupingInterval),W("onSuccess",m,u,o),y.label=5;case 5:return C[u]>v?[2,!1]:z[u]&&(v<=z[u]||v<=B[u]||0===B[u])?(q({isValidating:!1}),[2,!1]):(d.set(l,void 0),d.set(f,!1),b={isValidating:!1},"undefined"!==typeof D.current.error&&(b.error=void 0),o.compare(D.current.data,m)||(b.data=m),o.compare(d.get(u),m)||d.set(u,m),q(b),h||$(u,m,b.error,!1),[3,7]);case 6:return g=y.sent(),delete x[u],delete C[u],p.current.isPaused()?(q({isValidating:!1}),[2,!1]):(d.set(l,g),D.current.error!==g&&(q({isValidating:!1,error:g}),h||$(u,void 0,g,!1)),W("onError",g,u,o),o.shouldRetryOnError&&W("onErrorRetry",g,u,o,X,{retryCount:r+1,dedupe:!0}),[3,7]);case 7:return c=!1,[2,!0]}}))}))}),[u]);if(b((function(){if(u){A.current=!1;var e=K.current;K.current=!0;var t=D.current.data,r=P();H.current=u,o.compare(t,r)||q({data:r});var n=function(){return X({dedupe:!0})};(e||g())&&("undefined"===typeof r||m?n():v(n));var i=!1,a=_(Z,(function(){!i&&p.current.revalidateOnFocus&&(i=!0,n(),setTimeout((function(){return i=!1}),p.current.focusThrottleInterval))})),c=_(E,(function(){p.current.revalidateOnReconnect&&n()})),s=_(O,(function(e,t,r,i,a){void 0===e&&(e=!0),void 0===a&&(a=!0);var c={},u=!1;return"undefined"===typeof t||o.compare(D.current.data,t)||(c.data=t,u=!0),D.current.error!==r&&(c.error=r,u=!0),"undefined"!==typeof i&&D.current.isValidating!==i&&(c.isValidating=i,u=!0),u&&q(c),!!e&&(a?n():X())}));return function(){q=function(){return null},A.current=!0,a(),c(),s()}}}),[u,X]),b((function(){var t=null,r=function(){return k(e,void 0,void 0,(function(){return w(this,(function(e){switch(e.label){case 0:return D.current.error||!p.current.refreshWhenHidden&&!p.current.isDocumentVisible()||!p.current.refreshWhenOffline&&!p.current.isOnline()?[3,2]:[4,X({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return p.current.refreshInterval&&t&&(t=setTimeout(r,p.current.refreshInterval)),[2]}}))}))};return p.current.refreshInterval&&(t=setTimeout(r,p.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,X]),o.suspense){if(L=d.get(u),N=d.get(l),"undefined"===typeof L&&(L=M),"undefined"===typeof N&&(N=F),"undefined"===typeof L&&"undefined"===typeof N){if(x[u]||X(),x[u]&&"function"===typeof x[u].then)throw x[u];L=x[u]}if("undefined"===typeof L&&N)throw N}var Y=(0,n.useMemo)((function(){var e={revalidate:X,mutate:G};return Object.defineProperties(e,{error:{get:function(){return V.current.error=!0,o.suspense?N:H.current===u?D.current.error:F},enumerable:!0},data:{get:function(){return V.current.data=!0,o.suspense?L:H.current===u?D.current.data:M},enumerable:!0},isValidating:{get:function(){return V.current.isValidating=!0,!!u&&D.current.isValidating},enumerable:!0}}),e}),[X,M,F,G,u,o.suspense,N,L]);return Y};var F=M}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/321-7f3df35ed02396a1.js b/striker-ui/out/_next/static/chunks/321-7f3df35ed02396a1.js new file mode 100644 index 00000000..4b203474 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/321-7f3df35ed02396a1.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[321],{5318:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},862:function(e,t,n){var r=n(8).default;function o(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(i,s,l):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i},e.exports.__esModule=!0,e.exports.default=e.exports},8:function(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},5258:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(3871),c=n(9895),u=i.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,d=void 0===u?"primary":u,p=e.position,f=void 0===p?"fixed":p,h=(0,o.Z)(e,["classes","className","color","position"]);return i.createElement(c.Z,(0,r.Z)({square:!0,component:"header",elevation:4,className:(0,a.Z)(n.root,n["position".concat((0,l.Z)(f))],n["color".concat((0,l.Z)(d))],s,"fixed"===f&&"mui-fixed"),ref:t},h))}));t.Z=(0,s.Z)((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"})(u)},253:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(1451),o=n(7462),i=n(9668);function a(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function s(e){var t=function(t){var n=e(t);return t.css?(0,o.Z)({},(0,i.Z)(n,e((0,o.Z)({theme:t.theme},t.css))),a(t.css,[e.filterProps])):t.sx?(0,o.Z)({},(0,i.Z)(n,e((0,o.Z)({theme:t.theme},t.sx))),a(t.sx,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css","sx"].concat((0,r.Z)(e.filterProps)),t}var l=s;var c=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,a=(0,O.Z)(r,["name"]),s=i,l="function"===typeof t?function(e){return{root:function(n){return t((0,o.Z)({theme:e},n))}}}:{root:t},c=(0,j.Z)(l,(0,o.Z)({Component:e,name:i||e.displayName,classNamePrefix:s},a));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=I.forwardRef((function(t,r){var i=t.children,a=t.className,s=t.clone,l=t.component,u=(0,O.Z)(t,["children","className","clone","component"]),d=c(t),p=(0,z.Z)(d.root,a),f=u;if(n&&(f=F(f,n)),s)return I.cloneElement(i,(0,o.Z)({className:(0,z.Z)(i.props.className,p)},f));if("function"===typeof i)return i((0,o.Z)({className:p},f));var h=l||e;return I.createElement(h,(0,o.Z)({ref:r,className:p},f),i)}));return D()(u,e),u}}(e);return function(e,n){return t(e,(0,o.Z)({defaultTheme:L.Z},n))}},B=l(c(m,v,y,g,b,x,k,T,M.Z,N)),V=$("div")(B,{name:"MuiBox"})},282:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=n(6010),s=n(1591),l=n(9693),c=n(1810),u=n(3871),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,d=e.color,p=void 0===d?"default":d,f=e.component,h=void 0===f?"button":f,m=e.disabled,v=void 0!==m&&m,y=e.disableElevation,g=void 0!==y&&y,b=e.disableFocusRipple,x=void 0!==b&&b,k=e.endIcon,Z=e.focusVisibleClassName,E=e.fullWidth,S=void 0!==E&&E,w=e.size,C=void 0===w?"medium":w,R=e.startIcon,P=e.type,T=void 0===P?"button":P,N=e.variant,M=void 0===N?"text":N,O=(0,r.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),I=R&&i.createElement("span",{className:(0,a.Z)(s.startIcon,s["iconSize".concat((0,u.Z)(C))])},R),z=k&&i.createElement("span",{className:(0,a.Z)(s.endIcon,s["iconSize".concat((0,u.Z)(C))])},k);return i.createElement(c.Z,(0,o.Z)({className:(0,a.Z)(s.root,s[M],l,"inherit"===p?s.colorInherit:"default"!==p&&s["".concat(M).concat((0,u.Z)(p))],"medium"!==C&&[s["".concat(M,"Size").concat((0,u.Z)(C))],s["size".concat((0,u.Z)(C))]],g&&s.disableElevation,v&&s.disabled,S&&s.fullWidth),component:h,disabled:v,focusRipple:!x,focusVisibleClassName:(0,a.Z)(s.focusVisible,Z),ref:t,type:T},O),i.createElement("span",{className:s.label},I,n,z))}));t.Z=(0,s.Z)((function(e){return{root:(0,o.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,l.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},1810:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(7462),o=n(5987),i=n(7294),a=n(3935),s=n(6010),l=n(3834),c=n(5192),u=n(1591),d=n(4896),p=n(1451),f=n(3366),h=n(7326),m=n(5068),v=n(220);function y(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var r=y(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var u,d,p,f=c?null:x.current,h=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(h.width/2),d=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,Z=m.clientY;u=Math.round(v-h.left),d=Math.round(Z-h.top)}if(s)(p=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(p+=1);else{var E=2*Math.max(Math.abs((f?f.clientWidth:0)-u),u)+2,S=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(E,2)+Math.pow(S,2))}e.touches?null===b.current&&(b.current=function(){k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})},g.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})}}),[a,k]),w=i.useCallback((function(){E({},{pulsate:!0})}),[E]),C=i.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(g.current=setTimeout((function(){C(e,t)})));b.current=null,h((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:w,start:E,stop:C}}),[w,E,C]),i.createElement("span",(0,r.Z)({className:(0,s.Z)(l.root,c),ref:x},u),i.createElement(Z,{component:null,exit:!0},f))})),C=(0,u.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(w)),R=i.forwardRef((function(e,t){var n=e.action,u=e.buttonRef,p=e.centerRipple,f=void 0!==p&&p,h=e.children,m=e.classes,v=e.className,y=e.component,g=void 0===y?"button":y,b=e.disabled,x=void 0!==b&&b,k=e.disableRipple,Z=void 0!==k&&k,E=e.disableTouchRipple,S=void 0!==E&&E,w=e.focusRipple,R=void 0!==w&&w,P=e.focusVisibleClassName,T=e.onBlur,N=e.onClick,M=e.onFocus,O=e.onFocusVisible,I=e.onKeyDown,z=e.onKeyUp,A=e.onMouseDown,D=e.onMouseLeave,j=e.onMouseUp,F=e.onTouchEnd,L=e.onTouchMove,$=e.onTouchStart,B=e.onDragLeave,V=e.tabIndex,W=void 0===V?0:V,K=e.TouchRippleProps,H=e.type,_=void 0===H?"button":H,q=(0,o.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),G=i.useRef(null);var U=i.useRef(null),X=i.useState(!1),Y=X[0],J=X[1];x&&Y&&J(!1);var Q=(0,d.Z)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,ne=Q.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:S;return(0,c.Z)((function(r){return t&&t(r),!n&&U.current&&U.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),G.current.focus()}}}),[]),i.useEffect((function(){Y&&R&&!Z&&U.current.pulsate()}),[Z,R,Y]);var oe=re("start",A),ie=re("stop",B),ae=re("stop",j),se=re("stop",(function(e){Y&&e.preventDefault(),D&&D(e)})),le=re("start",$),ce=re("stop",F),ue=re("stop",L),de=re("stop",(function(e){Y&&(te(e),J(!1)),T&&T(e)}),!1),pe=(0,c.Z)((function(e){G.current||(G.current=e.currentTarget),ee(e)&&(J(!0),O&&O(e)),M&&M(e)})),fe=function(){var e=a.findDOMNode(G.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},he=i.useRef(!1),me=(0,c.Z)((function(e){R&&!he.current&&Y&&U.current&&" "===e.key&&(he.current=!0,e.persist(),U.current.stop(e,(function(){U.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),I&&I(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!x&&(e.preventDefault(),N&&N(e))})),ve=(0,c.Z)((function(e){R&&" "===e.key&&U.current&&Y&&!e.defaultPrevented&&(he.current=!1,e.persist(),U.current.stop(e,(function(){U.current.pulsate(e)}))),z&&z(e),N&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&N(e)})),ye=g;"button"===ye&&q.href&&(ye="a");var ge={};"button"===ye?(ge.type=_,ge.disabled=x):("a"===ye&&q.href||(ge.role="button"),ge["aria-disabled"]=x);var be=(0,l.Z)(u,t),xe=(0,l.Z)(ne,G),ke=(0,l.Z)(be,xe),Ze=i.useState(!1),Ee=Ze[0],Se=Ze[1];i.useEffect((function(){Se(!0)}),[]);var we=Ee&&!Z&&!x;return i.createElement(ye,(0,r.Z)({className:(0,s.Z)(m.root,v,Y&&[m.focusVisible,P],x&&m.disabled),onBlur:de,onClick:N,onFocus:pe,onKeyDown:me,onKeyUp:ve,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:ke,tabIndex:x?-1:W},ge,q),h,we?i.createElement(C,(0,r.Z)({ref:U,center:f},K)):null)})),P=(0,u.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(R)},5477:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(3871),c=44,u=i.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,d=void 0===u?"primary":u,p=e.disableShrink,f=void 0!==p&&p,h=e.size,m=void 0===h?40:h,v=e.style,y=e.thickness,g=void 0===y?3.6:y,b=e.value,x=void 0===b?0:b,k=e.variant,Z=void 0===k?"indeterminate":k,E=(0,o.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),S={},w={},C={};if("determinate"===Z||"static"===Z){var R=2*Math.PI*((c-g)/2);S.strokeDasharray=R.toFixed(3),C["aria-valuenow"]=Math.round(x),S.strokeDashoffset="".concat(((100-x)/100*R).toFixed(3),"px"),w.transform="rotate(-90deg)"}return i.createElement("div",(0,r.Z)({className:(0,a.Z)(n.root,s,"inherit"!==d&&n["color".concat((0,l.Z)(d))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[Z]),style:(0,r.Z)({width:m,height:m},w,v),ref:t,role:"progressbar"},C,E),i.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(c," ").concat(c)},i.createElement("circle",{className:(0,a.Z)(n.circle,f&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[Z]),style:S,cx:c,cy:c,r:(c-g)/2,fill:"none",strokeWidth:g})))}));t.Z=(0,s.Z)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(u)},5517:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(9693),c=i.forwardRef((function(e,t){var n=e.absolute,s=void 0!==n&&n,l=e.classes,c=e.className,u=e.component,d=void 0===u?"hr":u,p=e.flexItem,f=void 0!==p&&p,h=e.light,m=void 0!==h&&h,v=e.orientation,y=void 0===v?"horizontal":v,g=e.role,b=void 0===g?"hr"!==d?"separator":void 0:g,x=e.variant,k=void 0===x?"fullWidth":x,Z=(0,o.Z)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return i.createElement(d,(0,r.Z)({className:(0,a.Z)(l.root,c,"fullWidth"!==k&&l[k],s&&l.absolute,f&&l.flexItem,m&&l.light,"vertical"===y&&l.vertical),role:b,ref:t},Z))}));t.Z=(0,s.Z)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,l.Fq)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(c)},8008:function(e,t,n){"use strict";n.d(t,{ZP:function(){return N}});var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(4987),l=n(1591),c=n(6854),u=n(8885),d=n(3291),p=n(8920),f=n(5653),h=n(3834),m={entering:{opacity:1},entered:{opacity:1}},v={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},y=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,d=e.onEnter,y=e.onEntered,g=e.onEntering,b=e.onExit,x=e.onExited,k=e.onExiting,Z=e.style,E=e.TransitionComponent,S=void 0===E?u.ZP:E,w=e.timeout,C=void 0===w?v:w,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),P=(0,p.Z)(),T=P.unstable_strictMode&&!s,N=i.useRef(null),M=(0,h.Z)(n.ref,t),O=(0,h.Z)(T?N:void 0,M),I=function(e){return function(t,n){if(e){var r=T?[N.current,t]:[t,n],o=(0,c.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},z=I(g),A=I((function(e,t){(0,f.n)(e);var n=(0,f.C)({style:Z,timeout:C},{mode:"enter"});e.style.webkitTransition=P.transitions.create("opacity",n),e.style.transition=P.transitions.create("opacity",n),d&&d(e,t)})),D=I(y),j=I(k),F=I((function(e){var t=(0,f.C)({style:Z,timeout:C},{mode:"exit"});e.style.webkitTransition=P.transitions.create("opacity",t),e.style.transition=P.transitions.create("opacity",t),b&&b(e)})),L=I(x);return i.createElement(S,(0,r.Z)({appear:!0,in:l,nodeRef:T?N:void 0,onEnter:A,onEntered:D,onEntering:z,onExit:F,onExited:L,onExiting:j,timeout:C},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},m[e],Z,n.props.style),ref:O},t))}))})),g=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,c=e.invisible,u=void 0!==c&&c,d=e.open,p=e.transitionDuration,f=e.TransitionComponent,h=void 0===f?y:f,m=(0,o.Z)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return i.createElement(h,(0,r.Z)({in:d,timeout:p},m),i.createElement("div",{className:(0,a.Z)(s.root,l,u&&s.invisible),"aria-hidden":!0,ref:t},n))})),b=(0,l.Z)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(g),x=n(3935),k=n(9437);function Z(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 i=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var s=n.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(i-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var E={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},S=i.forwardRef((function(e,t){var n=e.children,a=e.direction,s=void 0===a?"down":a,l=e.in,c=e.onEnter,d=e.onEntered,m=e.onEntering,v=e.onExit,y=e.onExited,g=e.onExiting,b=e.style,S=e.timeout,w=void 0===S?E:S,C=e.TransitionComponent,R=void 0===C?u.ZP:C,P=(0,o.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=(0,p.Z)(),N=i.useRef(null),M=i.useCallback((function(e){N.current=x.findDOMNode(e)}),[]),O=(0,h.Z)(n.ref,M),I=(0,h.Z)(O,t),z=function(e){return function(t){e&&(void 0===t?e(N.current):e(N.current,t))}},A=z((function(e,t){Z(s,e),(0,f.n)(e),c&&c(e,t)})),D=z((function(e,t){var n=(0,f.C)({timeout:w,style:b},{mode:"enter"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)})),j=z(d),F=z(g),L=z((function(e){var t=(0,f.C)({timeout:w,style:b},{mode:"exit"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),Z(s,e),v&&v(e)})),$=z((function(e){e.style.webkitTransition="",e.style.transition="",y&&y(e)})),B=i.useCallback((function(){N.current&&Z(s,N.current)}),[s]);return i.useEffect((function(){if(!l&&"down"!==s&&"right"!==s){var e=(0,k.Z)((function(){N.current&&Z(s,N.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[s,l]),i.useEffect((function(){l||B()}),[l,B]),i.createElement(R,(0,r.Z)({nodeRef:N,onEnter:A,onEntered:j,onEntering:D,onExit:L,onExited:$,onExiting:F,appear:!0,in:l,timeout:w},P),(function(e,t){return i.cloneElement(n,(0,r.Z)({ref:I,style:(0,r.Z)({visibility:"exited"!==e||l?void 0:"hidden"},b,n.props.style)},t))}))})),w=n(9895),C=n(3871),R={left:"right",right:"left",top:"down",bottom:"up"};var P={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},T=i.forwardRef((function(e,t){var n=e.anchor,l=void 0===n?"left":n,c=e.BackdropProps,u=e.children,d=e.classes,f=e.className,h=e.elevation,m=void 0===h?16:h,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,g=(0,o.Z)(v,["BackdropProps"]),x=e.onClose,k=e.open,Z=void 0!==k&&k,E=e.PaperProps,T=void 0===E?{}:E,N=e.SlideProps,M=e.TransitionComponent,O=void 0===M?S:M,I=e.transitionDuration,z=void 0===I?P:I,A=e.variant,D=void 0===A?"temporary":A,j=(0,o.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=(0,p.Z)(),L=i.useRef(!1);i.useEffect((function(){L.current=!0}),[]);var $=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?R[t]:t}(F,l),B=i.createElement(w.Z,(0,r.Z)({elevation:"temporary"===D?m:0,square:!0},T,{className:(0,a.Z)(d.paper,d["paperAnchor".concat((0,C.Z)($))],T.className,"temporary"!==D&&d["paperAnchorDocked".concat((0,C.Z)($))])}),u);if("permanent"===D)return i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),B);var V=i.createElement(O,(0,r.Z)({in:Z,direction:R[$],timeout:z,appear:L.current},N),B);return"persistent"===D?i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),V):i.createElement(s.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},c,y,{transitionDuration:z}),BackdropComponent:b,className:(0,a.Z)(d.root,d.modal,f),open:Z,onClose:x,ref:t},j,g),V)})),N=(0,l.Z)((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})(T)},7812:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(9693),c=n(1810),u=n(3871),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,l=e.children,d=e.classes,p=e.className,f=e.color,h=void 0===f?"default":f,m=e.disabled,v=void 0!==m&&m,y=e.disableFocusRipple,g=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,k=(0,o.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(c.Z,(0,r.Z)({className:(0,a.Z)(d.root,p,"default"!==h&&d["color".concat((0,u.Z)(h))],v&&d.disabled,"small"===x&&d["size".concat((0,u.Z)(x))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!g,disabled:v,ref:t},k),i.createElement("span",{className:d.label},l))}));t.Z=(0,s.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},2822:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(6987),c=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,u=e.component,d=void 0===u?"ul":u,p=e.dense,f=void 0!==p&&p,h=e.disablePadding,m=void 0!==h&&h,v=e.subheader,y=(0,o.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=i.useMemo((function(){return{dense:f}}),[f]);return i.createElement(l.Z.Provider,{value:g},i.createElement(d,(0,r.Z)({className:(0,a.Z)(s.root,c,f&&s.dense,!m&&s.padding,v&&s.subheader),ref:t},y),v,n))}));t.Z=(0,s.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(c)},6987:function(e,t,n){"use strict";var r=n(7294).createContext({});t.Z=r},998:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(1810),c=n(3711),u=n(3834),d=n(6987),p=n(3935),f="undefined"===typeof window?i.useEffect:i.useLayoutEffect,h=i.forwardRef((function(e,t){var n=e.alignItems,s=void 0===n?"center":n,h=e.autoFocus,m=void 0!==h&&h,v=e.button,y=void 0!==v&&v,g=e.children,b=e.classes,x=e.className,k=e.component,Z=e.ContainerComponent,E=void 0===Z?"li":Z,S=e.ContainerProps,w=(S=void 0===S?{}:S).className,C=(0,o.Z)(S,["className"]),R=e.dense,P=void 0!==R&&R,T=e.disabled,N=void 0!==T&&T,M=e.disableGutters,O=void 0!==M&&M,I=e.divider,z=void 0!==I&&I,A=e.focusVisibleClassName,D=e.selected,j=void 0!==D&&D,F=(0,o.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),L=i.useContext(d.Z),$={dense:P||L.dense||!1,alignItems:s},B=i.useRef(null);f((function(){m&&B.current&&B.current.focus()}),[m]);var V=i.Children.toArray(g),W=V.length&&(0,c.Z)(V[V.length-1],["ListItemSecondaryAction"]),K=i.useCallback((function(e){B.current=p.findDOMNode(e)}),[]),H=(0,u.Z)(K,t),_=(0,r.Z)({className:(0,a.Z)(b.root,x,$.dense&&b.dense,!O&&b.gutters,z&&b.divider,N&&b.disabled,y&&b.button,"center"!==s&&b.alignItemsFlexStart,W&&b.secondaryAction,j&&b.selected),disabled:N},F),q=k||"li";return y&&(_.component=k||"div",_.focusVisibleClassName=(0,a.Z)(b.focusVisible,A),q=l.Z),W?(q=_.component||k?q:"div","li"===E&&("li"===q?q="div":"li"===_.component&&(_.component="div")),i.createElement(d.Z.Provider,{value:$},i.createElement(E,(0,r.Z)({className:(0,a.Z)(b.container,w),ref:H},C),i.createElement(q,_,V),V.pop()))):i.createElement(d.Z.Provider,{value:$},i.createElement(q,(0,r.Z)({ref:H},_),V))}));t.Z=(0,s.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h)},5681:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(7462),o=n(5987),i=n(7294),a=(n(9864),n(6010)),s=n(1591),l=n(3935),c=n(9437),u=n(626),d=n(713),p=n(2568),f=n(4987),h=n(6854),m=n(8885),v=n(8920),y=n(5653),g=n(3834);function b(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var x={entering:{opacity:1,transform:b(1)},entered:{opacity:1,transform:"none"}},k=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,c=e.onEnter,u=e.onEntered,d=e.onEntering,p=e.onExit,f=e.onExited,k=e.onExiting,Z=e.style,E=e.timeout,S=void 0===E?"auto":E,w=e.TransitionComponent,C=void 0===w?m.ZP:w,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),P=i.useRef(),T=i.useRef(),N=(0,v.Z)(),M=N.unstable_strictMode&&!s,O=i.useRef(null),I=(0,g.Z)(n.ref,t),z=(0,g.Z)(M?O:void 0,I),A=function(e){return function(t,n){if(e){var r=M?[O.current,t]:[t,n],o=(0,h.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},D=A(d),j=A((function(e,t){(0,y.n)(e);var n,r=(0,y.C)({style:Z,timeout:S},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===S?(n=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=n):n=o,e.style.transition=[N.transitions.create("opacity",{duration:n,delay:i}),N.transitions.create("transform",{duration:.666*n,delay:i})].join(","),c&&c(e,t)})),F=A(u),L=A(k),$=A((function(e){var t,n=(0,y.C)({style:Z,timeout:S},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===S?(t=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=t):t=r,e.style.transition=[N.transitions.create("opacity",{duration:t,delay:o}),N.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=b(.75),p&&p(e)})),B=A(f);return i.useEffect((function(){return function(){clearTimeout(P.current)}}),[]),i.createElement(C,(0,r.Z)({appear:!0,in:l,nodeRef:M?O:void 0,onEnter:j,onEntered:F,onEntering:D,onExit:$,onExited:B,onExiting:L,addEndListener:function(e,t){var n=M?e:t;"auto"===S&&(P.current=setTimeout(n,T.current||0))},timeout:"auto"===S?null:S},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:b(.75),visibility:"exited"!==e||l?void 0:"hidden"},x[e],Z,n.props.style),ref:z},t))}))}));k.muiSupportAuto=!0;var Z=k,E=n(9895);function S(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function w(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function R(e){return"function"===typeof e?e():e}var P=i.forwardRef((function(e,t){var n=e.action,s=e.anchorEl,h=e.anchorOrigin,m=void 0===h?{vertical:"top",horizontal:"left"}:h,v=e.anchorPosition,y=e.anchorReference,g=void 0===y?"anchorEl":y,b=e.children,x=e.classes,k=e.className,P=e.container,T=e.elevation,N=void 0===T?8:T,M=e.getContentAnchorEl,O=e.marginThreshold,I=void 0===O?16:O,z=e.onEnter,A=e.onEntered,D=e.onEntering,j=e.onExit,F=e.onExited,L=e.onExiting,$=e.open,B=e.PaperProps,V=void 0===B?{}:B,W=e.transformOrigin,K=void 0===W?{vertical:"top",horizontal:"left"}:W,H=e.TransitionComponent,_=void 0===H?Z:H,q=e.transitionDuration,G=void 0===q?"auto":q,U=e.TransitionProps,X=void 0===U?{}:U,Y=(0,o.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),J=i.useRef(),Q=i.useCallback((function(e){if("anchorPosition"===g)return v;var t=R(s),n=(t&&1===t.nodeType?t:(0,u.Z)(J.current).body).getBoundingClientRect(),r=0===e?m.vertical:"center";return{top:n.top+S(n,r),left:n.left+w(n,m.horizontal)}}),[s,m.horizontal,m.vertical,v,g]),ee=i.useCallback((function(e){var t=0;if(M&&"anchorEl"===g){var n=M(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[m.vertical,g,M]),te=i.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:S(e,K.vertical)+t,horizontal:w(e,K.horizontal)}}),[K.horizontal,K.vertical]),ne=i.useCallback((function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===g)return{top:null,left:null,transformOrigin:C(r)};var o=Q(t),i=o.top-r.vertical,a=o.left-r.horizontal,l=i+n.height,c=a+n.width,u=(0,d.Z)(R(s)),p=u.innerHeight-I,f=u.innerWidth-I;if(ip){var m=l-p;i-=m,r.vertical+=m}if(af){var y=c-f;a-=y,r.horizontal+=y}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:C(r)}}),[s,g,Q,ee,te,I]),re=i.useCallback((function(){var e=J.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),oe=i.useCallback((function(e){J.current=l.findDOMNode(e)}),[]);i.useEffect((function(){$&&re()})),i.useImperativeHandle(n,(function(){return $?{updatePosition:function(){re()}}:null}),[$,re]),i.useEffect((function(){if($){var e=(0,c.Z)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[$,re]);var ie=G;"auto"!==G||_.muiSupportAuto||(ie=void 0);var ae=P||(s?(0,u.Z)(R(s)).body:void 0);return i.createElement(f.Z,(0,r.Z)({container:ae,open:$,ref:t,BackdropProps:{invisible:!0},className:(0,a.Z)(x.root,k)},Y),i.createElement(_,(0,r.Z)({appear:!0,in:$,onEnter:z,onEntered:A,onExit:j,onExited:F,onExiting:L,timeout:ie},X,{onEntering:(0,p.Z)((function(e,t){D&&D(e,t),re()}),X.onEntering)}),i.createElement(E.Z,(0,r.Z)({elevation:N,ref:oe},V,{className:(0,a.Z)(x.paper,V.className)}),b)))})),T=(0,s.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(P),N=n(2822),M=n(5840);function O(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function I(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function z(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function A(e,t,n,r,o,i){for(var a=!1,s=o(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&z(s,i)&&!l)return void s.focus();s=o(e,s,n)}}var D="undefined"===typeof window?i.useEffect:i.useLayoutEffect,j=i.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,s=void 0!==a&&a,c=e.autoFocusItem,d=void 0!==c&&c,p=e.children,f=e.className,h=e.disabledItemsFocusable,m=void 0!==h&&h,v=e.disableListWrap,y=void 0!==v&&v,b=e.onKeyDown,x=e.variant,k=void 0===x?"selectedMenu":x,Z=(0,o.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),E=i.useRef(null),S=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});D((function(){s&&E.current.focus()}),[s]),i.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!E.current.style.width;if(e.clientHeight0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&z(r,o);o.previousKeyMatched&&(s||A(t,r,!1,m,O,o))?e.preventDefault():o.previousKeyMatched=!1}b&&b(e)},tabIndex:s?0:-1},Z),P)})),F=n(4236),L={vertical:"top",horizontal:"right"},$={vertical:"top",horizontal:"left"},B=i.forwardRef((function(e,t){var n=e.autoFocus,s=void 0===n||n,c=e.children,u=e.classes,d=e.disableAutoFocusItem,p=void 0!==d&&d,f=e.MenuListProps,h=void 0===f?{}:f,m=e.onClose,y=e.onEntering,g=e.open,b=e.PaperProps,x=void 0===b?{}:b,k=e.PopoverClasses,Z=e.transitionDuration,E=void 0===Z?"auto":Z,S=e.TransitionProps,w=(S=void 0===S?{}:S).onEntering,C=(0,o.Z)(S,["onEntering"]),R=e.variant,P=void 0===R?"selectedMenu":R,N=(0,o.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),M=(0,v.Z)(),O=s&&!p&&g,I=i.useRef(null),z=i.useRef(null),A=-1;i.Children.map(c,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("menu"!==P&&e.props.selected||-1===A)&&(A=t))}));var D=i.Children.map(c,(function(e,t){return t===A?i.cloneElement(e,{ref:function(t){z.current=l.findDOMNode(t),(0,F.Z)(e.ref,t)}}):e}));return i.createElement(T,(0,r.Z)({getContentAnchorEl:function(){return z.current},classes:k,onClose:m,TransitionProps:(0,r.Z)({onEntering:function(e,t){I.current&&I.current.adjustStyleForScrollbar(e,M),y&&y(e,t),w&&w(e,t)}},C),anchorOrigin:"rtl"===M.direction?L:$,transformOrigin:"rtl"===M.direction?L:$,PaperProps:(0,r.Z)({},x,{classes:(0,r.Z)({},x.classes,{root:u.paper})}),open:g,ref:t,transitionDuration:E},N),i.createElement(j,(0,r.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:I,autoFocus:s&&(-1===A||p),autoFocusItem:O,variant:P},h,{className:(0,a.Z)(u.list,h.className)}),D))})),V=(0,s.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(B)},5639:function(e,t,n){"use strict";var r=n(5987),o=n(4942),i=n(7462),a=n(7294),s=n(6010),l=n(1591),c=n(998),u=a.forwardRef((function(e,t){var n,o=e.classes,l=e.className,u=e.component,d=void 0===u?"li":u,p=e.disableGutters,f=void 0!==p&&p,h=e.ListItemClasses,m=e.role,v=void 0===m?"menuitem":m,y=e.selected,g=e.tabIndex,b=(0,r.Z)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==g?g:-1),a.createElement(c.Z,(0,i.Z)({button:!0,role:v,tabIndex:n,component:d,selected:y,disableGutters:f,classes:(0,i.Z)({dense:o.dense},h),className:(0,s.Z)(o.root,l,y&&o.selected,!f&&o.gutters),ref:t},b))}));t.Z=(0,l.Z)((function(e){return{root:(0,i.Z)({},e.typography.body1,(0,o.Z)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,i.Z)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(u)},4987:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(5987),o=n(7462),i=n(7294),a=n(3935),s=n(159),l=n(3869),c=n(626),u=n(4236),d=n(3834);var p="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var f=i.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,s=void 0!==o&&o,l=e.onRendered,c=i.useState(null),f=c[0],h=c[1],m=(0,d.Z)(i.isValidElement(n)?n.ref:null,t);return p((function(){s||h(function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(r)||document.body)}),[r,s]),p((function(){if(f&&!s)return(0,u.Z)(t,f),function(){(0,u.Z)(t,null)}}),[t,f,s]),p((function(){l&&(f||s)&&l()}),[l,f,s]),s?i.isValidElement(n)?i.cloneElement(n,{ref:m}):n:f?a.createPortal(n,f):f})),h=n(2568),m=n(5192),v=n(2781);var y=n(3144),g=n(1451),b=n(5840),x=n(713);function k(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Z(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat((0,g.Z)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&k(e,o)}))}function S(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function w(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,c.Z)(e);return t.body===e?(0,x.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=(0,b.Z)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(Z(i)+a,"px"),n=(0,c.Z)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(Z(e)+a,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var C=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return(0,y.Z)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&k(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);E(t,e.mountNode,e.modalRef,r,!0);var o=S(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=S(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=w(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=S(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&k(e.modalRef,!0),E(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&k(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var R=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,s=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,p=e.getDoc,f=e.isEnabled,h=e.open,m=i.useRef(),v=i.useRef(null),y=i.useRef(null),g=i.useRef(),b=i.useRef(null),x=i.useCallback((function(e){b.current=a.findDOMNode(e)}),[]),k=(0,d.Z)(t.ref,x),Z=i.useRef();return i.useEffect((function(){Z.current=h}),[h]),!Z.current&&h&&"undefined"!==typeof window&&(g.current=p().activeElement),i.useEffect((function(){if(h){var e=(0,c.Z)(b.current);r||!b.current||b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),b.current.focus());var t=function(){null!==b.current&&(e.hasFocus()&&!s&&f()&&!m.current?b.current&&!b.current.contains(e.activeElement)&&b.current.focus():m.current=!1)},n=function(t){!s&&f()&&9===t.keyCode&&e.activeElement===b.current&&(m.current=!0,t.shiftKey?y.current.focus():v.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(g.current&&g.current.focus&&g.current.focus(),g.current=null)}}}),[r,s,u,f,h]),i.createElement(i.Fragment,null,i.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelStart"}),i.cloneElement(t,{ref:k}),i.createElement("div",{tabIndex:0,ref:y,"data-test":"sentinelEnd"}))},P={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},T=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,l=(0,r.Z)(e,["invisible","open"]);return s?i.createElement("div",(0,o.Z)({"aria-hidden":!0,ref:t},l,{style:(0,o.Z)({},P.root,a?P.invisible:{},l.style)})):null}));var N=new C,M=i.forwardRef((function(e,t){var n=(0,s.Z)(),u=(0,l.Z)({name:"MuiModal",props:(0,o.Z)({},e),theme:n}),p=u.BackdropComponent,y=void 0===p?T:p,g=u.BackdropProps,b=u.children,x=u.closeAfterTransition,Z=void 0!==x&&x,E=u.container,S=u.disableAutoFocus,w=void 0!==S&&S,C=u.disableBackdropClick,P=void 0!==C&&C,M=u.disableEnforceFocus,O=void 0!==M&&M,I=u.disableEscapeKeyDown,z=void 0!==I&&I,A=u.disablePortal,D=void 0!==A&&A,j=u.disableRestoreFocus,F=void 0!==j&&j,L=u.disableScrollLock,$=void 0!==L&&L,B=u.hideBackdrop,V=void 0!==B&&B,W=u.keepMounted,K=void 0!==W&&W,H=u.manager,_=void 0===H?N:H,q=u.onBackdropClick,G=u.onClose,U=u.onEscapeKeyDown,X=u.onRendered,Y=u.open,J=(0,r.Z)(u,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Q=i.useState(!0),ee=Q[0],te=Q[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=(0,d.Z)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(u),se=function(){return(0,c.Z)(re.current)},le=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},ce=function(){_.mount(le(),{disableScrollLock:$}),oe.current.scrollTop=0},ue=(0,m.Z)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(E)||se().body;_.add(le(),e),oe.current&&ce()})),de=i.useCallback((function(){return _.isTopModal(le())}),[_]),pe=(0,m.Z)((function(e){re.current=e,e&&(X&&X(),Y&&de()?ce():k(oe.current,!0))})),fe=i.useCallback((function(){_.remove(le())}),[_]);if(i.useEffect((function(){return function(){fe()}}),[fe]),i.useEffect((function(){Y?ue():ae&&Z||fe()}),[Y,fe,ae,Z,ue]),!K&&!Y&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:v.Z}),me={};return void 0===b.props.tabIndex&&(me.tabIndex=b.props.tabIndex||"-1"),ae&&(me.onEnter=(0,h.Z)((function(){te(!1)}),b.props.onEnter),me.onExited=(0,h.Z)((function(){te(!0),Z&&fe()}),b.props.onExited)),i.createElement(f,{ref:pe,container:E,disablePortal:D},i.createElement("div",(0,o.Z)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(U&&U(e),z||(e.stopPropagation(),G&&G(e,"escapeKeyDown")))},role:"presentation"},J,{style:(0,o.Z)({},he.root,!Y&&ee?he.hidden:{},J.style)}),V?null:i.createElement(y,(0,o.Z)({open:Y,onClick:function(e){e.target===e.currentTarget&&(q&&q(e),!P&&G&&G(e,"backdropClick"))}},g)),i.createElement(R,{disableEnforceFocus:O,disableAutoFocus:w,disableRestoreFocus:F,getDoc:se,isEnabled:de,open:Y},i.cloneElement(b,me))))}))},9895:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=n(6010),s=n(1591),l=i.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.square,d=void 0!==u&&u,p=e.elevation,f=void 0===p?1:p,h=e.variant,m=void 0===h?"elevation":h,v=(0,r.Z)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(c,(0,o.Z)({className:(0,a.Z)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(f)],!d&&n.rounded),ref:t},v))}));t.Z=(0,s.Z)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),(0,o.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(l)},2318:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=n(6010),s=n(1591),l=n(3871),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,p=e.color,f=void 0===p?"initial":p,h=e.component,m=e.display,v=void 0===m?"initial":m,y=e.gutterBottom,g=void 0!==y&&y,b=e.noWrap,x=void 0!==b&&b,k=e.paragraph,Z=void 0!==k&&k,E=e.variant,S=void 0===E?"body1":E,w=e.variantMapping,C=void 0===w?c:w,R=(0,o.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=h||(Z?"p":C[S]||c[S])||"span";return i.createElement(P,(0,r.Z)({className:(0,a.Z)(u.root,d,"inherit"!==S&&u[S],"initial"!==f&&u["color".concat((0,l.Z)(f))],x&&u.noWrap,g&&u.gutterBottom,Z&&u.paragraph,"inherit"!==s&&u["align".concat((0,l.Z)(s))],"initial"!==v&&u["display".concat((0,l.Z)(v))]),ref:t},R))}));t.Z=(0,s.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},5154:function(e,t,n){"use strict";function r(e){return e}n.d(t,{Z:function(){return r}})},9700:function(e,t,n){"use strict";var r=(0,n(3559).Z)();t.Z=r},1120:function(e,t,n){"use strict";var r=n(7462),o=n(2333),i=n(9700);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(e,(0,r.Z)({defaultTheme:i.Z},t))}},8920:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(159),o=(n(7294),n(9700));function i(){return(0,r.Z)()||o.Z}},1591:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7462),o=n(5987),i=n(7294),a=n(8679),s=n.n(a),l=n(2333),c=n(3869),u=n(159),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,d=t.withTheme,p=void 0!==d&&d,f=t.name,h=(0,o.Z)(t,["defaultTheme","withTheme","name"]);var m=f,v=(0,l.Z)(e,(0,r.Z)({defaultTheme:a,Component:n,name:f||n.displayName,classNamePrefix:m},h)),y=i.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,d=(0,o.Z)(e,["classes","innerRef"]),h=v((0,r.Z)({},n.defaultProps,e)),m=d;return("string"===typeof f||p)&&(s=(0,u.Z)()||a,f&&(m=(0,c.Z)({theme:s,name:f,props:d})),p&&!m.theme&&(m.theme=s)),i.createElement(n,(0,r.Z)({ref:l||t,classes:h},m))}));return s()(y,n),y}},p=n(9700);var f=function(e,t){return d(e,(0,r.Z)({defaultTheme:p.Z},t))}},5653:function(e,t,n){"use strict";n.d(t,{n:function(){return r},C:function(){return o}});var r=function(e){return e.scrollTop};function o(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}},3871:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(288);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},2568:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<+~=|^:(),"'`\s])/g,k="undefined"!==typeof CSS&&CSS.escape,Z=function(e){return k?k(e):e.replace(x,"\\$1")},E=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),S=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l((0,u.Z)((0,u.Z)(o)),s),o.selectorText="."+Z(o.id)),o}(0,c.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=v(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,o.Z)({},e,{allowEmpty:!0}):e;return b(this.selectorText,this.style,n)},(0,l.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(E),w={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new S(e,t,n)}},C={indent:1,children:!0},R=/@([\w-]+)/,P=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(R);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new J((0,o.Z)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=C);var t=y(e).linebreak;if(null==e.indent&&(e.indent=C.indent),null==e.children&&(e.children=C.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),T=/@media|@supports\s+/,N={onCreateRule:function(e,t,n){return T.test(e)?new P(e,t,n):null}},M={indent:1,children:!0},O=/@keyframes\s+([\w-]+)/,I=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(O);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===i?this.name:Z(s(this,a)),this.rules=new J((0,o.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,o.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=M);var t=y(e).linebreak;if(null==e.indent&&(e.indent=M.indent),null==e.children&&(e.children=M.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),z=/@keyframes\s+/,A=/\$([\w-]+)/g,D=function(e,t){return"string"===typeof e?e.replace(A,(function(e,n){return n in t?t[n]:e})):e},j=function(e,t,n){var r=e[t],o=D(r,n);o!==r&&(e[t]=o)},F={onCreateRule:function(e,t,n){return"string"===typeof e&&z.test(e)?new I(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&j(e,"animation-name",n.keyframes),"animation"in e&&j(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return D(e,r.keyframes);default:return e}}},L=function(e){function t(){return e.apply(this,arguments)||this}return(0,c.Z)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,o.Z)({},e,{allowEmpty:!0}):e;return b(this.key,this.style,n)},t}(E),$={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new L(e,t,n):null}},B=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=y(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,d.Z)(t,["attached"]),o=y(r).linebreak,i="",a=0;a0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=pe(),n=0;nn?n:t},ye=function(){function e(e){this.getPropertyValue=le,this.setProperty=ce,this.removeProperty=ue,this.setSelector=de,this.hasInsertedRules=!1,this.cssRules=[],e&&ne.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=he();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=fe(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else pe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=(0,o.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var Se={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},we=Se,Ce=n(159),Re=n(7076),Pe=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Te=Date.now(),Ne="fnValues"+Te,Me="fnStyle"+ ++Te,Oe=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=h(e,{},n);return r[Me]=t,r},onProcessStyle:function(e,t){if(Ne in t||Me in t)return e;var n={};for(var r in e){var o=e[r];"function"===typeof o&&(delete e[r],n[r]=o)}return t[Ne]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[Me];i&&(o.style=i(e)||{});var a=o[Ne];if(a)for(var s in a)o.prop(s,a[s](e),r)}}},Ie="@global",ze="@global ",Ae=function(){function e(e,t,n){for(var r in this.type="global",this.at=Ie,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new J((0,o.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),De=function(){function e(e,t,n){this.type="global",this.at=Ie,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(ze.length);this.rule=n.jss.createRule(r,t,(0,o.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),je=/\s*,\s*/g;function Fe(e,t){for(var n=e.split(je),r="",o=0;o-1){var o=Lt[e];if(!Array.isArray(o))return ft+Et(o)in t&&ht+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Pe.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Re.Z]&&""===a?"".concat(i,"-").concat(c()):i}return"".concat(s).concat(o).concat(c())}}(),sn={disableGeneration:!1,generateClassName:an,jss:on,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},ln=i.createContext(sn);var cn=-1e9;function un(){return cn+=1}var dn=n(5953);function pn(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.overrides||!n.overrides[r])return i;var a=n.overrides[r],s=(0,o.Z)({},i);return Object.keys(a).forEach((function(e){s[e]=(0,dn.Z)(s[e],a[e])})),s},options:{}}}var fn={};function hn(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=Ee({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function mn(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!i.disableGeneration){var l=we.get(i.sheetsManager,a,r);l||(l={refs:0,staticSheet:null,dynamicStyles:null},we.set(i.sheetsManager,a,r,l));var c=(0,o.Z)({},a.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var u=i.sheetsRegistry;if(0===l.refs){var d;i.sheetsCache&&(d=we.get(i.sheetsCache,a,r));var p=a.create(r,s);d||((d=i.jss.createStyleSheet(p,(0,o.Z)({link:!1},c))).attach(),i.sheetsCache&&we.set(i.sheetsCache,a,r,d)),u&&u.add(d),l.staticSheet=d,l.dynamicStyles=Ze(p)}if(l.dynamicStyles){var f=i.jss.createStyleSheet(l.dynamicStyles,(0,o.Z)({link:!0},c));f.update(t),f.attach(),n.dynamicSheet=f,n.classes=Ee({baseClasses:l.staticSheet.classes,newClasses:f.classes}),u&&u.add(f)}else n.classes=l.staticSheet.classes;l.refs+=1}}function vn(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function yn(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=we.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(we.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function gn(e,t){var n,r=i.useRef([]),o=i.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),i.useEffect((function(){return function(){n&&n()}}),[o])}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,s=t.Component,l=t.defaultTheme,c=void 0===l?fn:l,u=(0,r.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),d=pn(e),p=n||a||"makeStyles";d.options={index:un(),name:n,meta:p,classNamePrefix:p};var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ce.Z)()||c,r=(0,o.Z)({},i.useContext(ln),u),a=i.useRef(),l=i.useRef();gn((function(){var o={name:n,state:{},stylesCreator:d,stylesOptions:r,theme:t};return mn(o,e),l.current=!1,a.current=o,function(){yn(o)}}),[t,d]),i.useEffect((function(){l.current&&vn(a.current,e),l.current=!0}));var p=hn(a.current,e.classes,s);return p};return f}},6010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,a=(0,O.Z)(r,["name"]),s=i,l="function"===typeof t?function(e){return{root:function(n){return t((0,o.Z)({theme:e},n))}}}:{root:t},c=(0,j.Z)(l,(0,o.Z)({Component:e,name:i||e.displayName,classNamePrefix:s},a));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=I.forwardRef((function(t,r){var i=t.children,a=t.className,s=t.clone,l=t.component,u=(0,O.Z)(t,["children","className","clone","component"]),d=c(t),p=(0,z.Z)(d.root,a),f=u;if(n&&(f=F(f,n)),s)return I.cloneElement(i,(0,o.Z)({className:(0,z.Z)(i.props.className,p)},f));if("function"===typeof i)return i((0,o.Z)({className:p},f));var h=l||e;return I.createElement(h,(0,o.Z)({ref:r,className:p},f),i)}));return D()(u,e),u}}(e);return function(e,n){return t(e,(0,o.Z)({defaultTheme:L.Z},n))}},B=l(c(m,v,y,g,b,x,k,T,M.Z,N)),V=$("div")(B,{name:"MuiBox"})},282:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=n(4720),u=n(3871),d=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,d=e.color,p=void 0===d?"default":d,f=e.component,h=void 0===f?"button":f,m=e.disabled,v=void 0!==m&&m,y=e.disableElevation,g=void 0!==y&&y,b=e.disableFocusRipple,x=void 0!==b&&b,k=e.endIcon,Z=e.focusVisibleClassName,E=e.fullWidth,w=void 0!==E&&E,S=e.size,C=void 0===S?"medium":S,R=e.startIcon,P=e.type,T=void 0===P?"button":P,N=e.variant,M=void 0===N?"text":N,O=(0,r.Z)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),I=R&&i.createElement("span",{className:(0,a.Z)(s.startIcon,s["iconSize".concat((0,u.Z)(C))])},R),z=k&&i.createElement("span",{className:(0,a.Z)(s.endIcon,s["iconSize".concat((0,u.Z)(C))])},k);return i.createElement(c.Z,(0,o.Z)({className:(0,a.Z)(s.root,s[M],l,"inherit"===p?s.colorInherit:"default"!==p&&s["".concat(M).concat((0,u.Z)(p))],"medium"!==C&&[s["".concat(M,"Size").concat((0,u.Z)(C))],s["size".concat((0,u.Z)(C))]],g&&s.disableElevation,v&&s.disabled,w&&s.fullWidth),component:h,disabled:v,focusRipple:!x,focusVisibleClassName:(0,a.Z)(s.focusVisible,Z),ref:t,type:T},O),i.createElement("span",{className:s.label},I,n,z))}));t.Z=(0,s.Z)((function(e){return{root:(0,o.Z)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:(0,l.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat((0,l.Fq)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(d)},4720:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(3935)),s=n(6010),l=n(3834),c=n(5192),u=n(4670),d=n(4896),p=n(2982),f=n(3366),h=n(7326),m=n(1721),v=n(220);function y(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function g(e,t,n){return null!=n[t]?n[t]:e.props[t]}function b(e,t,n){var r=y(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,i=t.center,s=void 0===i?a||t.pulsate:i,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&y.current)y.current=!1;else{"touchstart"===e.type&&(y.current=!0);var u,d,p,f=c?null:x.current,h=f?f.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(h.width/2),d=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,v=m.clientX,Z=m.clientY;u=Math.round(v-h.left),d=Math.round(Z-h.top)}if(s)(p=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(p+=1);else{var E=2*Math.max(Math.abs((f?f.clientWidth:0)-u),u)+2,w=2*Math.max(Math.abs((f?f.clientHeight:0)-d),d)+2;p=Math.sqrt(Math.pow(E,2)+Math.pow(w,2))}e.touches?null===b.current&&(b.current=function(){k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})},g.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):k({pulsate:o,rippleX:u,rippleY:d,rippleSize:p,cb:n})}}),[a,k]),S=i.useCallback((function(){E({},{pulsate:!0})}),[E]),C=i.useCallback((function(e,t){if(clearTimeout(g.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(g.current=setTimeout((function(){C(e,t)})));b.current=null,h((function(e){return e.length>0?e.slice(1):e})),v.current=t}),[]);return i.useImperativeHandle(t,(function(){return{pulsate:S,start:E,stop:C}}),[S,E,C]),i.createElement("span",(0,r.Z)({className:(0,s.Z)(l.root,c),ref:x},u),i.createElement(Z,{component:null,exit:!0},f))})),C=(0,u.Z)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(i.memo(S)),R=i.forwardRef((function(e,t){var n=e.action,u=e.buttonRef,p=e.centerRipple,f=void 0!==p&&p,h=e.children,m=e.classes,v=e.className,y=e.component,g=void 0===y?"button":y,b=e.disabled,x=void 0!==b&&b,k=e.disableRipple,Z=void 0!==k&&k,E=e.disableTouchRipple,w=void 0!==E&&E,S=e.focusRipple,R=void 0!==S&&S,P=e.focusVisibleClassName,T=e.onBlur,N=e.onClick,M=e.onFocus,O=e.onFocusVisible,I=e.onKeyDown,z=e.onKeyUp,A=e.onMouseDown,D=e.onMouseLeave,j=e.onMouseUp,F=e.onTouchEnd,L=e.onTouchMove,$=e.onTouchStart,B=e.onDragLeave,V=e.tabIndex,W=void 0===V?0:V,K=e.TouchRippleProps,H=e.type,q=void 0===H?"button":H,_=(0,o.Z)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),G=i.useRef(null);var U=i.useRef(null),X=i.useState(!1),Y=X[0],J=X[1];x&&Y&&J(!1);var Q=(0,d.Z)(),ee=Q.isFocusVisible,te=Q.onBlurVisible,ne=Q.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;return(0,c.Z)((function(r){return t&&t(r),!n&&U.current&&U.current[e](r),!0}))}i.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),G.current.focus()}}}),[]),i.useEffect((function(){Y&&R&&!Z&&U.current.pulsate()}),[Z,R,Y]);var oe=re("start",A),ie=re("stop",B),ae=re("stop",j),se=re("stop",(function(e){Y&&e.preventDefault(),D&&D(e)})),le=re("start",$),ce=re("stop",F),ue=re("stop",L),de=re("stop",(function(e){Y&&(te(e),J(!1)),T&&T(e)}),!1),pe=(0,c.Z)((function(e){G.current||(G.current=e.currentTarget),ee(e)&&(J(!0),O&&O(e)),M&&M(e)})),fe=function(){var e=a.findDOMNode(G.current);return g&&"button"!==g&&!("A"===e.tagName&&e.href)},he=i.useRef(!1),me=(0,c.Z)((function(e){R&&!he.current&&Y&&U.current&&" "===e.key&&(he.current=!0,e.persist(),U.current.stop(e,(function(){U.current.start(e)}))),e.target===e.currentTarget&&fe()&&" "===e.key&&e.preventDefault(),I&&I(e),e.target===e.currentTarget&&fe()&&"Enter"===e.key&&!x&&(e.preventDefault(),N&&N(e))})),ve=(0,c.Z)((function(e){R&&" "===e.key&&U.current&&Y&&!e.defaultPrevented&&(he.current=!1,e.persist(),U.current.stop(e,(function(){U.current.pulsate(e)}))),z&&z(e),N&&e.target===e.currentTarget&&fe()&&" "===e.key&&!e.defaultPrevented&&N(e)})),ye=g;"button"===ye&&_.href&&(ye="a");var ge={};"button"===ye?(ge.type=q,ge.disabled=x):("a"===ye&&_.href||(ge.role="button"),ge["aria-disabled"]=x);var be=(0,l.Z)(u,t),xe=(0,l.Z)(ne,G),ke=(0,l.Z)(be,xe),Ze=i.useState(!1),Ee=Ze[0],we=Ze[1];i.useEffect((function(){we(!0)}),[]);var Se=Ee&&!Z&&!x;return i.createElement(ye,(0,r.Z)({className:(0,s.Z)(m.root,v,Y&&[m.focusVisible,P],x&&m.disabled),onBlur:de,onClick:N,onFocus:pe,onKeyDown:me,onKeyUp:ve,onMouseDown:oe,onMouseLeave:se,onMouseUp:ae,onDragLeave:ie,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:ke,tabIndex:x?-1:W},ge,_),h,Se?i.createElement(C,(0,r.Z)({ref:U,center:f},K)):null)})),P=(0,u.Z)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(R)},5477:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c=44,u=i.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.color,d=void 0===u?"primary":u,p=e.disableShrink,f=void 0!==p&&p,h=e.size,m=void 0===h?40:h,v=e.style,y=e.thickness,g=void 0===y?3.6:y,b=e.value,x=void 0===b?0:b,k=e.variant,Z=void 0===k?"indeterminate":k,E=(0,o.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),w={},S={},C={};if("determinate"===Z||"static"===Z){var R=2*Math.PI*((c-g)/2);w.strokeDasharray=R.toFixed(3),C["aria-valuenow"]=Math.round(x),w.strokeDashoffset="".concat(((100-x)/100*R).toFixed(3),"px"),S.transform="rotate(-90deg)"}return i.createElement("div",(0,r.Z)({className:(0,a.Z)(n.root,s,"inherit"!==d&&n["color".concat((0,l.Z)(d))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[Z]),style:(0,r.Z)({width:m,height:m},S,v),ref:t,role:"progressbar"},C,E),i.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(c," ").concat(c)},i.createElement("circle",{className:(0,a.Z)(n.circle,f&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[Z]),style:w,cx:c,cy:c,r:(c-g)/2,fill:"none",strokeWidth:g})))}));t.Z=(0,s.Z)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(u)},5517:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=i.forwardRef((function(e,t){var n=e.absolute,s=void 0!==n&&n,l=e.classes,c=e.className,u=e.component,d=void 0===u?"hr":u,p=e.flexItem,f=void 0!==p&&p,h=e.light,m=void 0!==h&&h,v=e.orientation,y=void 0===v?"horizontal":v,g=e.role,b=void 0===g?"hr"!==d?"separator":void 0:g,x=e.variant,k=void 0===x?"fullWidth":x,Z=(0,o.Z)(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return i.createElement(d,(0,r.Z)({className:(0,a.Z)(l.root,c,"fullWidth"!==k&&l[k],s&&l.absolute,f&&l.flexItem,m&&l.light,"vertical"===y&&l.vertical),role:b,ref:t},Z))}));t.Z=(0,s.Z)((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:(0,l.Fq)(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(c)},7159:function(e,t,n){"use strict";n.d(t,{ZP:function(){return N}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(3154),l=n(4670),c=n(885),u=n(2666),d=n(3291),p=n(8920),f=n(5653),h=n(3834),m={entering:{opacity:1},entered:{opacity:1}},v={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},y=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,d=e.onEnter,y=e.onEntered,g=e.onEntering,b=e.onExit,x=e.onExited,k=e.onExiting,Z=e.style,E=e.TransitionComponent,w=void 0===E?u.ZP:E,S=e.timeout,C=void 0===S?v:S,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),P=(0,p.Z)(),T=P.unstable_strictMode&&!s,N=i.useRef(null),M=(0,h.Z)(n.ref,t),O=(0,h.Z)(T?N:void 0,M),I=function(e){return function(t,n){if(e){var r=T?[N.current,t]:[t,n],o=(0,c.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},z=I(g),A=I((function(e,t){(0,f.n)(e);var n=(0,f.C)({style:Z,timeout:C},{mode:"enter"});e.style.webkitTransition=P.transitions.create("opacity",n),e.style.transition=P.transitions.create("opacity",n),d&&d(e,t)})),D=I(y),j=I(k),F=I((function(e){var t=(0,f.C)({style:Z,timeout:C},{mode:"exit"});e.style.webkitTransition=P.transitions.create("opacity",t),e.style.transition=P.transitions.create("opacity",t),b&&b(e)})),L=I(x);return i.createElement(w,(0,r.Z)({appear:!0,in:l,nodeRef:T?N:void 0,onEnter:A,onEntered:D,onEntering:z,onExit:F,onExited:L,onExiting:j,timeout:C},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},m[e],Z,n.props.style),ref:O},t))}))})),g=i.forwardRef((function(e,t){var n=e.children,s=e.classes,l=e.className,c=e.invisible,u=void 0!==c&&c,d=e.open,p=e.transitionDuration,f=e.TransitionComponent,h=void 0===f?y:f,m=(0,o.Z)(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return i.createElement(h,(0,r.Z)({in:d,timeout:p},m),i.createElement("div",{className:(0,a.Z)(s.root,l,u&&s.invisible),"aria-hidden":!0,ref:t},n))})),b=(0,l.Z)({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(g),x=n(3935),k=n(9437);function Z(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 i=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var s=n.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(i-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var E={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},w=i.forwardRef((function(e,t){var n=e.children,a=e.direction,s=void 0===a?"down":a,l=e.in,c=e.onEnter,d=e.onEntered,m=e.onEntering,v=e.onExit,y=e.onExited,g=e.onExiting,b=e.style,w=e.timeout,S=void 0===w?E:w,C=e.TransitionComponent,R=void 0===C?u.ZP:C,P=(0,o.Z)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=(0,p.Z)(),N=i.useRef(null),M=i.useCallback((function(e){N.current=x.findDOMNode(e)}),[]),O=(0,h.Z)(n.ref,M),I=(0,h.Z)(O,t),z=function(e){return function(t){e&&(void 0===t?e(N.current):e(N.current,t))}},A=z((function(e,t){Z(s,e),(0,f.n)(e),c&&c(e,t)})),D=z((function(e,t){var n=(0,f.C)({timeout:S,style:b},{mode:"enter"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},n,{easing:T.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)})),j=z(d),F=z(g),L=z((function(e){var t=(0,f.C)({timeout:S,style:b},{mode:"exit"});e.style.webkitTransition=T.transitions.create("-webkit-transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),e.style.transition=T.transitions.create("transform",(0,r.Z)({},t,{easing:T.transitions.easing.sharp})),Z(s,e),v&&v(e)})),$=z((function(e){e.style.webkitTransition="",e.style.transition="",y&&y(e)})),B=i.useCallback((function(){N.current&&Z(s,N.current)}),[s]);return i.useEffect((function(){if(!l&&"down"!==s&&"right"!==s){var e=(0,k.Z)((function(){N.current&&Z(s,N.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[s,l]),i.useEffect((function(){l||B()}),[l,B]),i.createElement(R,(0,r.Z)({nodeRef:N,onEnter:A,onEntered:j,onEntering:D,onExit:L,onExited:$,onExiting:F,appear:!0,in:l,timeout:S},P),(function(e,t){return i.cloneElement(n,(0,r.Z)({ref:I,style:(0,r.Z)({visibility:"exited"!==e||l?void 0:"hidden"},b,n.props.style)},t))}))})),S=n(9895),C=n(3871),R={left:"right",right:"left",top:"down",bottom:"up"};var P={enter:d.x9.enteringScreen,exit:d.x9.leavingScreen},T=i.forwardRef((function(e,t){var n=e.anchor,l=void 0===n?"left":n,c=e.BackdropProps,u=e.children,d=e.classes,f=e.className,h=e.elevation,m=void 0===h?16:h,v=e.ModalProps,y=(v=void 0===v?{}:v).BackdropProps,g=(0,o.Z)(v,["BackdropProps"]),x=e.onClose,k=e.open,Z=void 0!==k&&k,E=e.PaperProps,T=void 0===E?{}:E,N=e.SlideProps,M=e.TransitionComponent,O=void 0===M?w:M,I=e.transitionDuration,z=void 0===I?P:I,A=e.variant,D=void 0===A?"temporary":A,j=(0,o.Z)(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"]),F=(0,p.Z)(),L=i.useRef(!1);i.useEffect((function(){L.current=!0}),[]);var $=function(e,t){return"rtl"===e.direction&&function(e){return-1!==["left","right"].indexOf(e)}(t)?R[t]:t}(F,l),B=i.createElement(S.Z,(0,r.Z)({elevation:"temporary"===D?m:0,square:!0},T,{className:(0,a.Z)(d.paper,d["paperAnchor".concat((0,C.Z)($))],T.className,"temporary"!==D&&d["paperAnchorDocked".concat((0,C.Z)($))])}),u);if("permanent"===D)return i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),B);var V=i.createElement(O,(0,r.Z)({in:Z,direction:R[$],timeout:z,appear:L.current},N),B);return"persistent"===D?i.createElement("div",(0,r.Z)({className:(0,a.Z)(d.root,d.docked,f),ref:t},j),V):i.createElement(s.Z,(0,r.Z)({BackdropProps:(0,r.Z)({},c,y,{transitionDuration:z}),BackdropComponent:b,className:(0,a.Z)(d.root,d.modal,f),open:Z,onClose:x,ref:t},j,g),V)})),N=(0,l.Z)((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})(T)},7812:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(9693),c=n(4720),u=n(3871),d=i.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,l=e.children,d=e.classes,p=e.className,f=e.color,h=void 0===f?"default":f,m=e.disabled,v=void 0!==m&&m,y=e.disableFocusRipple,g=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,k=(0,o.Z)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(c.Z,(0,r.Z)({className:(0,a.Z)(d.root,p,"default"!==h&&d["color".concat((0,u.Z)(h))],v&&d.disabled,"small"===x&&d["size".concat((0,u.Z)(x))],{start:d.edgeStart,end:d.edgeEnd}[s]),centerRipple:!0,focusRipple:!g,disabled:v,ref:t},k),i.createElement("span",{className:d.label},l))}));t.Z=(0,s.Z)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:(0,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,l.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},2822:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(6987),c=i.forwardRef((function(e,t){var n=e.children,s=e.classes,c=e.className,u=e.component,d=void 0===u?"ul":u,p=e.dense,f=void 0!==p&&p,h=e.disablePadding,m=void 0!==h&&h,v=e.subheader,y=(0,o.Z)(e,["children","classes","className","component","dense","disablePadding","subheader"]),g=i.useMemo((function(){return{dense:f}}),[f]);return i.createElement(l.Z.Provider,{value:g},i.createElement(d,(0,r.Z)({className:(0,a.Z)(s.root,c,f&&s.dense,!m&&s.padding,v&&s.subheader),ref:t},y),v,n))}));t.Z=(0,s.Z)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(c)},6987:function(e,t,n){"use strict";var r=n(7294).createContext({});t.Z=r},998:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(4720),c=n(3711),u=n(3834),d=n(6987),p=n(3935),f="undefined"===typeof window?i.useEffect:i.useLayoutEffect,h=i.forwardRef((function(e,t){var n=e.alignItems,s=void 0===n?"center":n,h=e.autoFocus,m=void 0!==h&&h,v=e.button,y=void 0!==v&&v,g=e.children,b=e.classes,x=e.className,k=e.component,Z=e.ContainerComponent,E=void 0===Z?"li":Z,w=e.ContainerProps,S=(w=void 0===w?{}:w).className,C=(0,o.Z)(w,["className"]),R=e.dense,P=void 0!==R&&R,T=e.disabled,N=void 0!==T&&T,M=e.disableGutters,O=void 0!==M&&M,I=e.divider,z=void 0!==I&&I,A=e.focusVisibleClassName,D=e.selected,j=void 0!==D&&D,F=(0,o.Z)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),L=i.useContext(d.Z),$={dense:P||L.dense||!1,alignItems:s},B=i.useRef(null);f((function(){m&&B.current&&B.current.focus()}),[m]);var V=i.Children.toArray(g),W=V.length&&(0,c.Z)(V[V.length-1],["ListItemSecondaryAction"]),K=i.useCallback((function(e){B.current=p.findDOMNode(e)}),[]),H=(0,u.Z)(K,t),q=(0,r.Z)({className:(0,a.Z)(b.root,x,$.dense&&b.dense,!O&&b.gutters,z&&b.divider,N&&b.disabled,y&&b.button,"center"!==s&&b.alignItemsFlexStart,W&&b.secondaryAction,j&&b.selected),disabled:N},F),_=k||"li";return y&&(q.component=k||"div",q.focusVisibleClassName=(0,a.Z)(b.focusVisible,A),_=l.Z),W?(_=q.component||k?_:"div","li"===E&&("li"===_?_="div":"li"===q.component&&(q.component="div")),i.createElement(d.Z.Provider,{value:$},i.createElement(E,(0,r.Z)({className:(0,a.Z)(b.container,S),ref:H},C),i.createElement(_,q,V),V.pop()))):i.createElement(d.Z.Provider,{value:$},i.createElement(_,(0,r.Z)({ref:H},q),V))}));t.Z=(0,s.Z)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h)},5675:function(e,t,n){"use strict";n.d(t,{Z:function(){return V}});var r=n(7462),o=n(5987),i=n(7294),a=(n(9864),n(5697),n(6010)),s=n(4670),l=n(3935),c=n(9437),u=n(626),d=n(713),p=n(2568),f=n(3154),h=n(885),m=n(2666),v=n(8920),y=n(5653),g=n(3834);function b(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var x={entering:{opacity:1,transform:b(1)},entered:{opacity:1,transform:"none"}},k=i.forwardRef((function(e,t){var n=e.children,a=e.disableStrictModeCompat,s=void 0!==a&&a,l=e.in,c=e.onEnter,u=e.onEntered,d=e.onEntering,p=e.onExit,f=e.onExited,k=e.onExiting,Z=e.style,E=e.timeout,w=void 0===E?"auto":E,S=e.TransitionComponent,C=void 0===S?m.ZP:S,R=(0,o.Z)(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),P=i.useRef(),T=i.useRef(),N=(0,v.Z)(),M=N.unstable_strictMode&&!s,O=i.useRef(null),I=(0,g.Z)(n.ref,t),z=(0,g.Z)(M?O:void 0,I),A=function(e){return function(t,n){if(e){var r=M?[O.current,t]:[t,n],o=(0,h.Z)(r,2),i=o[0],a=o[1];void 0===a?e(i):e(i,a)}}},D=A(d),j=A((function(e,t){(0,y.n)(e);var n,r=(0,y.C)({style:Z,timeout:w},{mode:"enter"}),o=r.duration,i=r.delay;"auto"===w?(n=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=n):n=o,e.style.transition=[N.transitions.create("opacity",{duration:n,delay:i}),N.transitions.create("transform",{duration:.666*n,delay:i})].join(","),c&&c(e,t)})),F=A(u),L=A(k),$=A((function(e){var t,n=(0,y.C)({style:Z,timeout:w},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===w?(t=N.transitions.getAutoHeightDuration(e.clientHeight),T.current=t):t=r,e.style.transition=[N.transitions.create("opacity",{duration:t,delay:o}),N.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=b(.75),p&&p(e)})),B=A(f);return i.useEffect((function(){return function(){clearTimeout(P.current)}}),[]),i.createElement(C,(0,r.Z)({appear:!0,in:l,nodeRef:M?O:void 0,onEnter:j,onEntered:F,onEntering:D,onExit:$,onExited:B,onExiting:L,addEndListener:function(e,t){var n=M?e:t;"auto"===w&&(P.current=setTimeout(n,T.current||0))},timeout:"auto"===w?null:w},R),(function(e,t){return i.cloneElement(n,(0,r.Z)({style:(0,r.Z)({opacity:0,transform:b(.75),visibility:"exited"!==e||l?void 0:"hidden"},x[e],Z,n.props.style),ref:z},t))}))}));k.muiSupportAuto=!0;var Z=k,E=n(9895);function w(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function S(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function C(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function R(e){return"function"===typeof e?e():e}var P=i.forwardRef((function(e,t){var n=e.action,s=e.anchorEl,h=e.anchorOrigin,m=void 0===h?{vertical:"top",horizontal:"left"}:h,v=e.anchorPosition,y=e.anchorReference,g=void 0===y?"anchorEl":y,b=e.children,x=e.classes,k=e.className,P=e.container,T=e.elevation,N=void 0===T?8:T,M=e.getContentAnchorEl,O=e.marginThreshold,I=void 0===O?16:O,z=e.onEnter,A=e.onEntered,D=e.onEntering,j=e.onExit,F=e.onExited,L=e.onExiting,$=e.open,B=e.PaperProps,V=void 0===B?{}:B,W=e.transformOrigin,K=void 0===W?{vertical:"top",horizontal:"left"}:W,H=e.TransitionComponent,q=void 0===H?Z:H,_=e.transitionDuration,G=void 0===_?"auto":_,U=e.TransitionProps,X=void 0===U?{}:U,Y=(0,o.Z)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),J=i.useRef(),Q=i.useCallback((function(e){if("anchorPosition"===g)return v;var t=R(s),n=(t&&1===t.nodeType?t:(0,u.Z)(J.current).body).getBoundingClientRect(),r=0===e?m.vertical:"center";return{top:n.top+w(n,r),left:n.left+S(n,m.horizontal)}}),[s,m.horizontal,m.vertical,v,g]),ee=i.useCallback((function(e){var t=0;if(M&&"anchorEl"===g){var n=M(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[m.vertical,g,M]),te=i.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:w(e,K.vertical)+t,horizontal:S(e,K.horizontal)}}),[K.horizontal,K.vertical]),ne=i.useCallback((function(e){var t=ee(e),n={width:e.offsetWidth,height:e.offsetHeight},r=te(n,t);if("none"===g)return{top:null,left:null,transformOrigin:C(r)};var o=Q(t),i=o.top-r.vertical,a=o.left-r.horizontal,l=i+n.height,c=a+n.width,u=(0,d.Z)(R(s)),p=u.innerHeight-I,f=u.innerWidth-I;if(ip){var m=l-p;i-=m,r.vertical+=m}if(af){var y=c-f;a-=y,r.horizontal+=y}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:C(r)}}),[s,g,Q,ee,te,I]),re=i.useCallback((function(){var e=J.current;if(e){var t=ne(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[ne]),oe=i.useCallback((function(e){J.current=l.findDOMNode(e)}),[]);i.useEffect((function(){$&&re()})),i.useImperativeHandle(n,(function(){return $?{updatePosition:function(){re()}}:null}),[$,re]),i.useEffect((function(){if($){var e=(0,c.Z)((function(){re()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[$,re]);var ie=G;"auto"!==G||q.muiSupportAuto||(ie=void 0);var ae=P||(s?(0,u.Z)(R(s)).body:void 0);return i.createElement(f.Z,(0,r.Z)({container:ae,open:$,ref:t,BackdropProps:{invisible:!0},className:(0,a.Z)(x.root,k)},Y),i.createElement(q,(0,r.Z)({appear:!0,in:$,onEnter:z,onEntered:A,onExit:j,onExited:F,onExiting:L,timeout:ie},X,{onEntering:(0,p.Z)((function(e,t){D&&D(e,t),re()}),X.onEntering)}),i.createElement(E.Z,(0,r.Z)({elevation:N,ref:oe},V,{className:(0,a.Z)(x.paper,V.className)}),b)))})),T=(0,s.Z)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(P),N=n(2822),M=n(5840);function O(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function I(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function z(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function A(e,t,n,r,o,i){for(var a=!1,s=o(e,t,!!t&&n);s;){if(s===e.firstChild){if(a)return;a=!0}var l=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&z(s,i)&&!l)return void s.focus();s=o(e,s,n)}}var D="undefined"===typeof window?i.useEffect:i.useLayoutEffect,j=i.forwardRef((function(e,t){var n=e.actions,a=e.autoFocus,s=void 0!==a&&a,c=e.autoFocusItem,d=void 0!==c&&c,p=e.children,f=e.className,h=e.disabledItemsFocusable,m=void 0!==h&&h,v=e.disableListWrap,y=void 0!==v&&v,b=e.onKeyDown,x=e.variant,k=void 0===x?"selectedMenu":x,Z=(0,o.Z)(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),E=i.useRef(null),w=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});D((function(){s&&E.current.focus()}),[s]),i.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!E.current.style.width;if(e.clientHeight0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&z(r,o);o.previousKeyMatched&&(s||A(t,r,!1,m,O,o))?e.preventDefault():o.previousKeyMatched=!1}b&&b(e)},tabIndex:s?0:-1},Z),P)})),F=n(4236),L={vertical:"top",horizontal:"right"},$={vertical:"top",horizontal:"left"},B=i.forwardRef((function(e,t){var n=e.autoFocus,s=void 0===n||n,c=e.children,u=e.classes,d=e.disableAutoFocusItem,p=void 0!==d&&d,f=e.MenuListProps,h=void 0===f?{}:f,m=e.onClose,y=e.onEntering,g=e.open,b=e.PaperProps,x=void 0===b?{}:b,k=e.PopoverClasses,Z=e.transitionDuration,E=void 0===Z?"auto":Z,w=e.TransitionProps,S=(w=void 0===w?{}:w).onEntering,C=(0,o.Z)(w,["onEntering"]),R=e.variant,P=void 0===R?"selectedMenu":R,N=(0,o.Z)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),M=(0,v.Z)(),O=s&&!p&&g,I=i.useRef(null),z=i.useRef(null),A=-1;i.Children.map(c,(function(e,t){i.isValidElement(e)&&(e.props.disabled||("menu"!==P&&e.props.selected||-1===A)&&(A=t))}));var D=i.Children.map(c,(function(e,t){return t===A?i.cloneElement(e,{ref:function(t){z.current=l.findDOMNode(t),(0,F.Z)(e.ref,t)}}):e}));return i.createElement(T,(0,r.Z)({getContentAnchorEl:function(){return z.current},classes:k,onClose:m,TransitionProps:(0,r.Z)({onEntering:function(e,t){I.current&&I.current.adjustStyleForScrollbar(e,M),y&&y(e,t),S&&S(e,t)}},C),anchorOrigin:"rtl"===M.direction?L:$,transformOrigin:"rtl"===M.direction?L:$,PaperProps:(0,r.Z)({},x,{classes:(0,r.Z)({},x.classes,{root:u.paper})}),open:g,ref:t,transitionDuration:E},N),i.createElement(j,(0,r.Z)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),m&&m(e,"tabKeyDown"))},actions:I,autoFocus:s&&(-1===A||p),autoFocusItem:O,variant:P},h,{className:(0,a.Z)(u.list,h.className)}),D))})),V=(0,s.Z)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(B)},5639:function(e,t,n){"use strict";var r=n(5987),o=n(4942),i=n(7462),a=n(7294),s=(n(5697),n(6010)),l=n(4670),c=n(998),u=a.forwardRef((function(e,t){var n,o=e.classes,l=e.className,u=e.component,d=void 0===u?"li":u,p=e.disableGutters,f=void 0!==p&&p,h=e.ListItemClasses,m=e.role,v=void 0===m?"menuitem":m,y=e.selected,g=e.tabIndex,b=(0,r.Z)(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]);return e.disabled||(n=void 0!==g?g:-1),a.createElement(c.Z,(0,i.Z)({button:!0,role:v,tabIndex:n,component:d,selected:y,disableGutters:f,classes:(0,i.Z)({dense:o.dense},h),className:(0,s.Z)(o.root,l,y&&o.selected,!f&&o.gutters),ref:t},b))}));t.Z=(0,l.Z)((function(e){return{root:(0,i.Z)({},e.typography.body1,(0,o.Z)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:(0,i.Z)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(u)},3154:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(5987),o=n(7462),i=n(7294),a=n(3935),s=(n(5697),n(159)),l=n(3869),c=n(626),u=n(4236),d=n(3834);var p="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var f=i.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,s=void 0!==o&&o,l=e.onRendered,c=i.useState(null),f=c[0],h=c[1],m=(0,d.Z)(i.isValidElement(n)?n.ref:null,t);return p((function(){s||h(function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(r)||document.body)}),[r,s]),p((function(){if(f&&!s)return(0,u.Z)(t,f),function(){(0,u.Z)(t,null)}}),[t,f,s]),p((function(){l&&(f||s)&&l()}),[l,f,s]),s?i.isValidElement(n)?i.cloneElement(n,{ref:m}):n:f?a.createPortal(n,f):f})),h=n(2568),m=n(5192),v=n(2781);var y=n(3144),g=n(2982),b=n(5840),x=n(713);function k(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Z(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat((0,g.Z)(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&k(e,o)}))}function w(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function S(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){if(function(e){var t=(0,c.Z)(e);return t.body===e?(0,x.Z)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i)){var a=(0,b.Z)();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(Z(i)+a,"px"),n=(0,c.Z)(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(Z(e)+a,"px")}))}var s=i.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var C=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return(0,y.Z)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&k(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);E(t,e.mountNode,e.modalRef,r,!0);var o=w(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=w(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=S(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=w(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&k(e.modalRef,!0),E(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&k(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var R=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,s=void 0!==o&&o,l=e.disableRestoreFocus,u=void 0!==l&&l,p=e.getDoc,f=e.isEnabled,h=e.open,m=i.useRef(),v=i.useRef(null),y=i.useRef(null),g=i.useRef(),b=i.useRef(null),x=i.useCallback((function(e){b.current=a.findDOMNode(e)}),[]),k=(0,d.Z)(t.ref,x),Z=i.useRef();return i.useEffect((function(){Z.current=h}),[h]),!Z.current&&h&&"undefined"!==typeof window&&(g.current=p().activeElement),i.useEffect((function(){if(h){var e=(0,c.Z)(b.current);r||!b.current||b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex",-1),b.current.focus());var t=function(){null!==b.current&&(e.hasFocus()&&!s&&f()&&!m.current?b.current&&!b.current.contains(e.activeElement)&&b.current.focus():m.current=!1)},n=function(t){!s&&f()&&9===t.keyCode&&e.activeElement===b.current&&(m.current=!0,t.shiftKey?y.current.focus():v.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),u||(g.current&&g.current.focus&&g.current.focus(),g.current=null)}}}),[r,s,u,f,h]),i.createElement(i.Fragment,null,i.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelStart"}),i.cloneElement(t,{ref:k}),i.createElement("div",{tabIndex:0,ref:y,"data-test":"sentinelEnd"}))},P={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},T=i.forwardRef((function(e,t){var n=e.invisible,a=void 0!==n&&n,s=e.open,l=(0,r.Z)(e,["invisible","open"]);return s?i.createElement("div",(0,o.Z)({"aria-hidden":!0,ref:t},l,{style:(0,o.Z)({},P.root,a?P.invisible:{},l.style)})):null}));var N=new C,M=i.forwardRef((function(e,t){var n=(0,s.Z)(),u=(0,l.Z)({name:"MuiModal",props:(0,o.Z)({},e),theme:n}),p=u.BackdropComponent,y=void 0===p?T:p,g=u.BackdropProps,b=u.children,x=u.closeAfterTransition,Z=void 0!==x&&x,E=u.container,w=u.disableAutoFocus,S=void 0!==w&&w,C=u.disableBackdropClick,P=void 0!==C&&C,M=u.disableEnforceFocus,O=void 0!==M&&M,I=u.disableEscapeKeyDown,z=void 0!==I&&I,A=u.disablePortal,D=void 0!==A&&A,j=u.disableRestoreFocus,F=void 0!==j&&j,L=u.disableScrollLock,$=void 0!==L&&L,B=u.hideBackdrop,V=void 0!==B&&B,W=u.keepMounted,K=void 0!==W&&W,H=u.manager,q=void 0===H?N:H,_=u.onBackdropClick,G=u.onClose,U=u.onEscapeKeyDown,X=u.onRendered,Y=u.open,J=(0,r.Z)(u,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),Q=i.useState(!0),ee=Q[0],te=Q[1],ne=i.useRef({}),re=i.useRef(null),oe=i.useRef(null),ie=(0,d.Z)(oe,t),ae=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(u),se=function(){return(0,c.Z)(re.current)},le=function(){return ne.current.modalRef=oe.current,ne.current.mountNode=re.current,ne.current},ce=function(){q.mount(le(),{disableScrollLock:$}),oe.current.scrollTop=0},ue=(0,m.Z)((function(){var e=function(e){return e="function"===typeof e?e():e,a.findDOMNode(e)}(E)||se().body;q.add(le(),e),oe.current&&ce()})),de=i.useCallback((function(){return q.isTopModal(le())}),[q]),pe=(0,m.Z)((function(e){re.current=e,e&&(X&&X(),Y&&de()?ce():k(oe.current,!0))})),fe=i.useCallback((function(){q.remove(le())}),[q]);if(i.useEffect((function(){return function(){fe()}}),[fe]),i.useEffect((function(){Y?ue():ae&&Z||fe()}),[Y,fe,ae,Z,ue]),!K&&!Y&&(!ae||ee))return null;var he=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:v.Z}),me={};return void 0===b.props.tabIndex&&(me.tabIndex=b.props.tabIndex||"-1"),ae&&(me.onEnter=(0,h.Z)((function(){te(!1)}),b.props.onEnter),me.onExited=(0,h.Z)((function(){te(!0),Z&&fe()}),b.props.onExited)),i.createElement(f,{ref:pe,container:E,disablePortal:D},i.createElement("div",(0,o.Z)({ref:ie,onKeyDown:function(e){"Escape"===e.key&&de()&&(U&&U(e),z||(e.stopPropagation(),G&&G(e,"escapeKeyDown")))},role:"presentation"},J,{style:(0,o.Z)({},he.root,!Y&&ee?he.hidden:{},J.style)}),V?null:i.createElement(y,(0,o.Z)({open:Y,onClick:function(e){e.target===e.currentTarget&&(_&&_(e),!P&&G&&G(e,"backdropClick"))}},g)),i.createElement(R,{disableEnforceFocus:O,disableAutoFocus:S,disableRestoreFocus:F,getDoc:se,isEnabled:de,open:Y},i.cloneElement(b,me))))}))},9895:function(e,t,n){"use strict";var r=n(5987),o=n(7462),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=i.forwardRef((function(e,t){var n=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.square,d=void 0!==u&&u,p=e.elevation,f=void 0===p?1:p,h=e.variant,m=void 0===h?"elevation":h,v=(0,r.Z)(e,["classes","className","component","square","elevation","variant"]);return i.createElement(c,(0,o.Z)({className:(0,a.Z)(n.root,s,"outlined"===m?n.outlined:n["elevation".concat(f)],!d&&n.rounded),ref:t},v))}));t.Z=(0,s.Z)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),(0,o.Z)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(l)},2318:function(e,t,n){"use strict";var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(6010)),s=n(4670),l=n(3871),c={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},u=i.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,u=e.classes,d=e.className,p=e.color,f=void 0===p?"initial":p,h=e.component,m=e.display,v=void 0===m?"initial":m,y=e.gutterBottom,g=void 0!==y&&y,b=e.noWrap,x=void 0!==b&&b,k=e.paragraph,Z=void 0!==k&&k,E=e.variant,w=void 0===E?"body1":E,S=e.variantMapping,C=void 0===S?c:S,R=(0,o.Z)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=h||(Z?"p":C[w]||c[w])||"span";return i.createElement(P,(0,r.Z)({className:(0,a.Z)(u.root,d,"inherit"!==w&&u[w],"initial"!==f&&u["color".concat((0,l.Z)(f))],x&&u.noWrap,g&&u.gutterBottom,Z&&u.paragraph,"inherit"!==s&&u["align".concat((0,l.Z)(s))],"initial"!==v&&u["display".concat((0,l.Z)(v))]),ref:t},R))}));t.Z=(0,s.Z)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(u)},7623:function(e,t,n){"use strict";function r(e){return e}n.d(t,{Z:function(){return r}})},9700:function(e,t,n){"use strict";var r=(0,n(7850).Z)();t.Z=r},1120:function(e,t,n){"use strict";var r=n(7462),o=n(3746),i=n(9700);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.Z)(e,(0,r.Z)({defaultTheme:i.Z},t))}},8920:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(159),o=(n(7294),n(9700));function i(){return(0,r.Z)()||o.Z}},4670:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(7462),o=n(5987),i=n(7294),a=(n(5697),n(8679)),s=n.n(a),l=n(3746),c=n(3869),u=n(159),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,d=t.withTheme,p=void 0!==d&&d,f=t.name,h=(0,o.Z)(t,["defaultTheme","withTheme","name"]);var m=f,v=(0,l.Z)(e,(0,r.Z)({defaultTheme:a,Component:n,name:f||n.displayName,classNamePrefix:m},h)),y=i.forwardRef((function(e,t){e.classes;var s,l=e.innerRef,d=(0,o.Z)(e,["classes","innerRef"]),h=v((0,r.Z)({},n.defaultProps,e)),m=d;return("string"===typeof f||p)&&(s=(0,u.Z)()||a,f&&(m=(0,c.Z)({theme:s,name:f,props:d})),p&&!m.theme&&(m.theme=s)),i.createElement(n,(0,r.Z)({ref:l||t,classes:h},m))}));return s()(y,n),y}},p=n(9700);var f=function(e,t){return d(e,(0,r.Z)({defaultTheme:p.Z},t))}},5653:function(e,t,n){"use strict";n.d(t,{n:function(){return r},C:function(){return o}});var r=function(e){return e.scrollTop};function o(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}},3871:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(288);function o(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},2568:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<+~=|^:(),"'`\s])/g,x="undefined"!==typeof CSS&&CSS.escape,k=function(e){return x?x(e):e.replace(b,"\\$1")},Z=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),E=function(e){function t(t,n,r){var o;(o=e.call(this,t,n,r)||this).selectorText=void 0,o.id=void 0,o.renderable=void 0;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l((0,u.Z)((0,u.Z)(o)),s),o.selectorText="."+k(o.id)),o}(0,c.Z)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=v(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?(0,o.Z)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,n)},(0,l.Z)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Z),w={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new E(e,t,n)}},S={indent:1,children:!0},C=/@([\w-]+)/,R=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(C);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=S),null==e.indent&&(e.indent=S.indent),null==e.children&&(e.children=S.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),P=/@media|@supports\s+/,T={onCreateRule:function(e,t,n){return P.test(e)?new R(e,t,n):null}},N={indent:1,children:!0},M=/@keyframes\s+([\w-]+)/,O=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(M);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,a=n.sheet,s=n.generateId;for(var l in this.id=!1===i?this.name:k(s(this,a)),this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(l,t[l],(0,o.Z)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=N),null==e.indent&&(e.indent=N.indent),null==e.children&&(e.children=N.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),I=/@keyframes\s+/,z=/\$([\w-]+)/g,A=function(e,t){return"string"===typeof e?e.replace(z,(function(e,n){return n in t?t[n]:e})):e},D=function(e,t,n){var r=e[t],o=A(r,n);o!==r&&(e[t]=o)},j={onCreateRule:function(e,t,n){return"string"===typeof e&&I.test(e)?new O(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&D(e,"animation-name",n.keyframes),"animation"in e&&D(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return A(e,r.keyframes);default:return e}}},F=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=(0,d.Z)(t,["attached"]),o="",i=0;i0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var o=function(e){for(var t=ce(),n=0;nn?n:t},he=function(){function e(e){this.getPropertyValue=ie,this.setProperty=ae,this.removeProperty=se,this.setSelector=le,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&Q.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=de();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=ue(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else ce().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var r=(0,o.Z)({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}var ke={set:function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},Ze=n(159),Ee=(n(5697),n(7076)),we=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];var Se=Date.now(),Ce="fnValues"+Se,Re="fnStyle"+ ++Se,Pe=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=h(e,{},n);return r[Re]=t,r},onProcessStyle:function(e,t){if(Ce in t||Re in t)return e;var n={};for(var r in e){var o=e[r];"function"===typeof o&&(delete e[r],n[r]=o)}return t[Ce]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[Re];i&&(o.style=i(e)||{});var a=o[Ce];if(a)for(var s in a)o.prop(s,a[s](e),r)}}},Te="@global",Ne="@global ",Me=function(){function e(e,t,n){for(var r in this.type="global",this.at=Te,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new X((0,o.Z)({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),Oe=function(){function e(e,t,n){this.type="global",this.at=Te,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(Ne.length);this.rule=n.jss.createRule(r,t,(0,o.Z)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Ie=/\s*,\s*/g;function ze(e,t){for(var n=e.split(Ie),r="",o=0;o-1){var o=At[e];if(!Array.isArray(o))return ct+bt(o)in t&&ut+o;if(!r)return!1;for(var i=0;it?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==we.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Ee.Z]&&""===a?"".concat(i,"-").concat(c()):i}return"".concat(s).concat(o).concat(c())}}(),jss:Qt,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},tn=i.createContext(en);var nn=-1e9;function rn(){return nn+=1}var on=n(5953);function an(e){var t="function"===typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(l){throw l}if(!r||!n.overrides||!n.overrides[r])return i;var a=n.overrides[r],s=(0,o.Z)({},i);return Object.keys(a).forEach((function(e){s[e]=(0,on.Z)(s[e],a[e])})),s},options:{}}}var sn={};function ln(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=xe({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function cn(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,a=e.stylesCreator,s=e.name;if(!i.disableGeneration){var l=ke.get(i.sheetsManager,a,r);l||(l={refs:0,staticSheet:null,dynamicStyles:null},ke.set(i.sheetsManager,a,r,l));var c=(0,o.Z)({},a.options,i,{theme:r,flip:"boolean"===typeof i.flip?i.flip:"rtl"===r.direction});c.generateId=c.serverGenerateClassName||c.generateClassName;var u=i.sheetsRegistry;if(0===l.refs){var d;i.sheetsCache&&(d=ke.get(i.sheetsCache,a,r));var p=a.create(r,s);d||((d=i.jss.createStyleSheet(p,(0,o.Z)({link:!1},c))).attach(),i.sheetsCache&&ke.set(i.sheetsCache,a,r,d)),u&&u.add(d),l.staticSheet=d,l.dynamicStyles=ye(p)}if(l.dynamicStyles){var f=i.jss.createStyleSheet(l.dynamicStyles,(0,o.Z)({link:!0},c));f.update(t),f.attach(),n.dynamicSheet=f,n.classes=xe({baseClasses:l.staticSheet.classes,newClasses:f.classes}),u&&u.add(f)}else n.classes=l.staticSheet.classes;l.refs+=1}}function un(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function dn(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=ke.get(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(ke.delete(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function pn(e,t){var n,r=i.useRef([]),o=i.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),i.useEffect((function(){return function(){n&&n()}}),[o])}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,s=t.Component,l=t.defaultTheme,c=void 0===l?sn:l,u=(0,r.Z)(t,["name","classNamePrefix","Component","defaultTheme"]),d=an(e),p=n||a||"makeStyles";d.options={index:rn(),name:n,meta:p,classNamePrefix:p};var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,Ze.Z)()||c,r=(0,o.Z)({},i.useContext(tn),u),a=i.useRef(),l=i.useRef();pn((function(){var o={name:n,state:{},stylesCreator:d,stylesOptions:r,theme:t};return cn(o,e),l.current=!1,a.current=o,function(){dn(o)}}),[t,d]),i.useEffect((function(){l.current&&un(a.current,e),l.current=!0}));var p=ln(a.current,e.classes,s);return p};return f}},6010:function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):!0!==t&&void 0===r||(n=e.toLocaleString(void 0,r)),n};e.exports=(e,a)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const c=(a=Object.assign({bits:!1,binary:!1},a)).bits?a.binary?i:n:a.binary?r:t;if(a.signed&&0===e)return` 0 ${c[0]}`;const u=e<0,s=u?"-":a.signed?"+":"";let l;if(u&&(e=-e),void 0!==a.minimumFractionDigits&&(l={minimumFractionDigits:a.minimumFractionDigits}),void 0!==a.maximumFractionDigits&&(l=Object.assign({maximumFractionDigits:a.maximumFractionDigits},l)),e<1){return s+o(e,a.locale,l)+" "+c[0]}const d=Math.min(Math.floor(a.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),c.length-1);e/=Math.pow(a.binary?1024:1e3,d),l||(e=e.toPrecision(3));return s+o(Number(e),a.locale,l)+" "+c[d]}},8575:function(e,t,r){r.d(t,{ZP:function(){return R}});var n=r(7294),i=Object.prototype.hasOwnProperty;var o=new WeakMap,a=0;var c=function(){function e(e){void 0===e&&(e={}),this.cache=new Map(Object.entries(e)),this.subs=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.cache.get(t)},e.prototype.set=function(e,t){var r=this.serializeKey(e)[0];this.cache.set(r,t),this.notify()},e.prototype.keys=function(){return Array.from(this.cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.cache.has(t)},e.prototype.clear=function(){this.cache.clear(),this.notify()},e.prototype.delete=function(e){var t=this.serializeKey(e)[0];this.cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"===typeof e)try{e=e()}catch(r){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",r=0;r-1&&(t.subs[n]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;er.errorRetryCount)){var o=Math.min(i.retryCount,8),a=~~((Math.random()+.5)*(1<0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0));return Promise.all(l).then((function(){return d.get(n)}))}return Promise.resolve(d.get(n))},I=function(e,t,r,n){var i=E[e];if(e&&i)for(var o=0;o0));return[2,Promise.all(m).then((function(){if(s)throw s;return d.get(i)}))]}if(s)throw s;return[2,u]}}))}))};Object.defineProperty(g.Provider,"default",{value:p});g.Provider;var R=function(){for(var e=this,t=[],r=0;r2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),a=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,c=d.serializeKey(i),u=c[0],s=c[1],l=c[2],f=c[3],b=(0,n.useRef)(o);v((function(){b.current=o}));var S=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},P=function(){var e=d.get(u);return"undefined"===typeof e?o.initialData:e},R=function(){return!!d.get(f)||u&&S()},M=P(),F=d.get(l),T=R(),V=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),D=(0,n.useRef)({data:M,error:F,isValidating:T});(0,n.useDebugValue)(D.current.data);var L,N,j=(0,n.useState)({})[1],q=(0,n.useCallback)((function(e){var t=!1;for(var r in e)D.current[r]!==e[r]&&(D.current[r]=e[r],V.current[r]&&(t=!0));if(t){if(A.current||!K.current)return;j({})}}),[]),A=(0,n.useRef)(!1),H=(0,n.useRef)(u),K=(0,n.useRef)(!1),W=(0,n.useCallback)((function(e){for(var t,r=[],n=1;n=0&&(r[n]=r[r.length-1],r.pop())}},X=(0,n.useCallback)((function(t){return void 0===t&&(t={}),y(e,void 0,void 0,(function(){var e,r,n,i,c,p,h,m,v,g;return k(this,(function(y){switch(y.label){case 0:if(!u||!a)return[2,!1];if(A.current)return[2,!1];if(b.current.isPaused())return[2,!1];e=t.retryCount,r=void 0===e?0:e,n=t.dedupe,i=void 0!==n&&n,c=!0,p="undefined"!==typeof w[u]&&i,y.label=1;case 1:return y.trys.push([1,6,,7]),q({isValidating:!0}),d.set(f,!0),p||I(u,D.current.data,D.current.error,!0),h=void 0,m=void 0,p?(m=x[u],[4,w[u]]):[3,3];case 2:return h=y.sent(),[3,5];case 3:return o.loadingTimeout&&!d.get(u)&&setTimeout((function(){c&&W("onLoadingSlow",u,o)}),o.loadingTimeout),w[u]=null!==s?a.apply(void 0,s):a(u),x[u]=m=B(),[4,w[u]];case 4:h=y.sent(),setTimeout((function(){delete w[u],delete x[u]}),o.dedupingInterval),W("onSuccess",h,u,o),y.label=5;case 5:return x[u]>m?[2,!1]:O[u]&&(m<=O[u]||m<=z[u]||0===z[u])?(q({isValidating:!1}),[2,!1]):(d.set(l,void 0),d.set(f,!1),v={isValidating:!1},"undefined"!==typeof D.current.error&&(v.error=void 0),o.compare(D.current.data,h)||(v.data=h),o.compare(d.get(u),h)||d.set(u,h),q(v),p||I(u,h,v.error,!1),[3,7]);case 6:return g=y.sent(),delete w[u],delete x[u],b.current.isPaused()?(q({isValidating:!1}),[2,!1]):(d.set(l,g),D.current.error!==g&&(q({isValidating:!1,error:g}),p||I(u,void 0,g,!1)),W("onError",g,u,o),o.shouldRetryOnError&&W("onErrorRetry",g,u,o,X,{retryCount:r+1,dedupe:!0}),[3,7]);case 7:return c=!1,[2,!0]}}))}))}),[u]);if(v((function(){if(u){A.current=!1;var e=K.current;K.current=!0;var t=D.current.data,r=P();H.current=u,o.compare(t,r)||q({data:r});var n=function(){return X({dedupe:!0})};(e||S())&&("undefined"===typeof r||h?n():m(n));var i=!1,a=_(C,(function(){!i&&b.current.revalidateOnFocus&&(i=!0,n(),setTimeout((function(){return i=!1}),b.current.focusThrottleInterval))})),c=_(Z,(function(){b.current.revalidateOnReconnect&&n()})),s=_(E,(function(e,t,r,i,a){void 0===e&&(e=!0),void 0===a&&(a=!0);var c={},u=!1;return"undefined"===typeof t||o.compare(D.current.data,t)||(c.data=t,u=!0),D.current.error!==r&&(c.error=r,u=!0),"undefined"!==typeof i&&D.current.isValidating!==i&&(c.isValidating=i,u=!0),u&&q(c),!!e&&(a?n():X())}));return function(){q=function(){return null},A.current=!0,a(),c(),s()}}}),[u,X]),v((function(){var t=null,r=function(){return y(e,void 0,void 0,(function(){return k(this,(function(e){switch(e.label){case 0:return D.current.error||!b.current.refreshWhenHidden&&!b.current.isDocumentVisible()||!b.current.refreshWhenOffline&&!b.current.isOnline()?[3,2]:[4,X({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return b.current.refreshInterval&&t&&(t=setTimeout(r,b.current.refreshInterval)),[2]}}))}))};return b.current.refreshInterval&&(t=setTimeout(r,b.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,X]),o.suspense){if(L=d.get(u),N=d.get(l),"undefined"===typeof L&&(L=M),"undefined"===typeof N&&(N=F),"undefined"===typeof L&&"undefined"===typeof N){if(w[u]||X(),w[u]&&"function"===typeof w[u].then)throw w[u];L=w[u]}if("undefined"===typeof L&&N)throw N}var Y=(0,n.useMemo)((function(){var e={revalidate:X,mutate:G};return Object.defineProperties(e,{error:{get:function(){return V.current.error=!0,o.suspense?N:H.current===u?D.current.error:F},enumerable:!0},data:{get:function(){return V.current.data=!0,o.suspense?L:H.current===u?D.current.data:M},enumerable:!0},isValidating:{get:function(){return V.current.isValidating=!0,!!u&&D.current.isValidating},enumerable:!0}}),e}),[X,M,F,G,u,o.suspense,N,L]);return Y}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/460.91d31c8392f2cdc4.js b/striker-ui/out/_next/static/chunks/460.91d31c8392f2cdc4.js new file mode 100644 index 00000000..281fa9bc --- /dev/null +++ b/striker-ui/out/_next/static/chunks/460.91d31c8392f2cdc4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[460],{4460:function(t,e,s){function i(t){return 0|t}s.d(e,{Z:function(){return Sa}});let n="warn",r=()=>{},a=()=>{},o=()=>{},h=()=>{};function l(t,e=!1){try{return decodeURIComponent(escape(t))}catch(Ur){if(Ur instanceof URIError&&e)return t;throw Ur}}function c(t){return unescape(encodeURIComponent(t))}!function(t){if("undefined"===typeof t?t=n:n=t,r=a=o=h=()=>{},"undefined"!==typeof window.console)switch(t){case"debug":r=console.debug.bind(window.console);case"info":a=console.info.bind(window.console);case"warn":o=console.warn.bind(window.console);case"error":h=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+t+"'")}}();let d="ontouchstart"in document.documentElement||void 0!==document.ontouchstart||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;window.addEventListener("touchstart",(function t(){d=!0,window.removeEventListener("touchstart",t,!1)}),!1);let _=10*(window.devicePixelRatio||1),u=!1;try{const t=document.createElement("canvas");t.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',0===t.style.cursor.indexOf("url")?(a("Data URI scheme cursor supported"),u=!0):o("Data URI scheme cursor not supported")}catch(Qa){h("Data URI scheme cursor test exception: "+Qa)}const f=u;let p=!0;try{const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const e=document.createElement("div");t.appendChild(e);const s=t.offsetWidth-e.offsetWidth;t.parentNode.removeChild(t),p=0!=s}catch(Qa){h("Scrollbar test exception: "+Qa)}function g(){return navigator&&!!/mac/i.exec(navigator.platform)}function m(){return navigator&&!!/win/i.exec(navigator.platform)}function w(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function b(t,e,s){const i=s.getBoundingClientRect();let n={x:0,y:0};return t=i.right?n.x=i.width-1:n.x=t-i.left,e=i.bottom?n.y=i.height-1:n.y=e-i.top,n}function v(t){t.stopPropagation(),t.preventDefault()}let k=!1,y=null;function C(t){if(k)return;const e=new t.constructor(t.type,t);k=!0,document.captureElement?document.captureElement.dispatchEvent(e):y.dispatchEvent(e),k=!1,t.stopPropagation(),e.defaultPrevented&&t.preventDefault(),"mouseup"===t.type&&Q()}function x(){document.getElementById("noVNC_mouse_capture_elem").style.cursor=window.getComputedStyle(document.captureElement).cursor}document.captureElement=null;const S=new MutationObserver(x);function Q(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;y=document.captureElement,document.captureElement=null,S.disconnect();document.getElementById("noVNC_mouse_capture_elem").style.display="none",window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",C)}}var M={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode(t){let e="";const s=t.length,i=s%3;for(let r=0;r>2],e+=this.toBase64Table[((3&t[r])<<4)+(t[r+1]>>4)],e+=this.toBase64Table[((15&t[r+1])<<2)+(t[r+2]>>6)],e+=this.toBase64Table[63&t[r+2]];const n=s-i;return 2===i?(e+=this.toBase64Table[t[n]>>2],e+=this.toBase64Table[((3&t[n])<<4)+(t[n+1]>>4)],e+=this.toBase64Table[(15&t[n+1])<<2],e+=this.toBase64Table[64]):1===i&&(e+=this.toBase64Table[t[n]>>2],e+=this.toBase64Table[(3&t[n])<<4],e+=this.toBase64Table[64],e+=this.toBase64Table[64]),e},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode(t,e=0){let s=t.indexOf("=")-e;s<0&&(s=t.length-e);const i=3*(s>>2)+Math.floor(s%4/1.5),n=new Array(i);let r=0,a=0;for(let o=0,l=e;l=8&&(r-=8,s||(n[o++]=a>>r&255),a&=(1<> Display.constructor"),this._target=t,!this._target)throw new Error("Target must be set");if("string"===typeof this._target)throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},r("User Agent: "+navigator.userAgent),r("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=()=>{}}get scale(){return this._scale}set scale(t){this._rescale(t)}get clipViewport(){return this._clipViewport}set clipViewport(t){this._clipViewport=t;const e=this._viewportLoc;this.viewportChangeSize(e.w,e.h),this.viewportChangePos(0,0)}get width(){return this._fbWidth}get height(){return this._fbHeight}viewportChangePos(t,e){const s=this._viewportLoc;t=Math.floor(t),e=Math.floor(e),this._clipViewport||(t=-s.w,e=-s.h);const i=s.x+s.w-1,n=s.y+s.h-1;t<0&&s.x+t<0&&(t=-s.x),i+t>=this._fbWidth&&(t-=i+t-this._fbWidth+1),s.y+e<0&&(e=-s.y),n+e>=this._fbHeight&&(e-=n+e-this._fbHeight+1),0===t&&0===e||(r("viewportChange deltaX: "+t+", deltaY: "+e),s.x+=t,s.y+=e,this._damage(s.x,s.y,s.w,s.h),this.flip())}viewportChangeSize(t,e){this._clipViewport&&"undefined"!==typeof t&&"undefined"!==typeof e||(r("Setting viewport to full display region"),t=this._fbWidth,e=this._fbHeight),t=Math.floor(t),e=Math.floor(e),t>this._fbWidth&&(t=this._fbWidth),e>this._fbHeight&&(e=this._fbHeight);const s=this._viewportLoc;if(s.w!==t||s.h!==e){s.w=t,s.h=e;const i=this._target;i.width=t,i.height=e,this.viewportChangePos(0,0),this._damage(s.x,s.y,s.w,s.h),this.flip(),this._rescale(this._scale)}}absX(t){return 0===this._scale?0:i(t/this._scale+this._viewportLoc.x)}absY(t){return 0===this._scale?0:i(t/this._scale+this._viewportLoc.y)}resize(t,e){this._prevDrawStyle="",this._fbWidth=t,this._fbHeight=e;const s=this._backbuffer;if(s.width!==t||s.height!==e){let i=null;s.width>0&&s.height>0&&(i=this._drawCtx.getImageData(0,0,s.width,s.height)),s.width!==t&&(s.width=t),s.height!==e&&(s.height=e),i&&this._drawCtx.putImageData(i,0,0)}const i=this._viewportLoc;this.viewportChangeSize(i.w,i.h),this.viewportChangePos(0,0)}_damage(t,e,s,i){tthis._damageBounds.right&&(this._damageBounds.right=t+s),e+i>this._damageBounds.bottom&&(this._damageBounds.bottom=e+i)}flip(t){if(0===this._renderQ.length||t){let t=this._damageBounds.left,e=this._damageBounds.top,s=this._damageBounds.right-t,i=this._damageBounds.bottom-e,n=t-this._viewportLoc.x,r=e-this._viewportLoc.y;n<0&&(s+=n,t-=n,n=0),r<0&&(i+=r,e-=r,r=0),n+s>this._viewportLoc.w&&(s=this._viewportLoc.w-n),r+i>this._viewportLoc.h&&(i=this._viewportLoc.h-r),s>0&&i>0&&this._targetCtx.drawImage(this._backbuffer,t,e,s,i,n,r,s,i),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}else this._renderQPush({type:"flip"})}pending(){return this._renderQ.length>0}flush(){0===this._renderQ.length?this.onflush():this._flushing=!0}fillRect(t,e,s,i,n,r){0===this._renderQ.length||r?(this._setFillColor(n),this._drawCtx.fillRect(t,e,s,i),this._damage(t,e,s,i)):this._renderQPush({type:"fill",x:t,y:e,width:s,height:i,color:n})}copyImage(t,e,s,i,n,r,a){0===this._renderQ.length||a?(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,t,e,n,r,s,i,n,r),this._damage(s,i,n,r)):this._renderQPush({type:"copy",oldX:t,oldY:e,x:s,y:i,width:n,height:r})}imageRect(t,e,s,i,n,r){if(0===s||0===i)return;const a=new Image;a.src="data: "+n+";base64,"+M.encode(r),this._renderQPush({type:"img",img:a,x:t,y:e,width:s,height:i})}blitImage(t,e,s,i,n,r,a){if(0===this._renderQ.length||a){let a=new Uint8ClampedArray(n.buffer,n.byteOffset+r,s*i*4),o=new ImageData(a,s,i);this._drawCtx.putImageData(o,t,e),this._damage(t,e,s,i)}else{const r=new Uint8Array(s*i*4);r.set(new Uint8Array(n.buffer,0,r.length)),this._renderQPush({type:"blit",data:r,x:t,y:e,width:s,height:i})}}drawImage(t,e,s){this._drawCtx.drawImage(t,e,s),this._damage(e,s,t.width,t.height)}autoscale(t,e){let s;if(0===t||0===e)s=0;else{const i=this._viewportLoc,n=t/e;s=i.w/i.h>=n?t/i.w:e/i.h}this._rescale(s)}_rescale(t){this._scale=t;const e=this._viewportLoc,s=t*e.w+"px",i=t*e.h+"px";this._target.style.width===s&&this._target.style.height===i||(this._target.style.width=s,this._target.style.height=i)}_setFillColor(t){const e="rgb("+t[0]+","+t[1]+","+t[2]+")";e!==this._prevDrawStyle&&(this._drawCtx.fillStyle=e,this._prevDrawStyle=e)}_renderQPush(t){this._renderQ.push(t),1===this._renderQ.length&&this._scanRenderQ()}_resumeRenderQ(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}_scanRenderQ(){let t=!0;for(;t&&this._renderQ.length>0;){const e=this._renderQ[0];switch(e.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(e.oldX,e.oldY,e.x,e.y,e.width,e.height,!0);break;case"fill":this.fillRect(e.x,e.y,e.width,e.height,e.color,!0);break;case"blit":this.blitImage(e.x,e.y,e.width,e.height,e.data,0,!0);break;case"img":if(e.img.complete){if(e.img.width!==e.width||e.img.height!==e.height)return void h("Decoded image has incorrect dimensions. Got "+e.img.width+"x"+e.img.height+". Expected "+e.width+"x"+e.height+".");this.drawImage(e.img,e.x,e.y)}else e.img._noVNCDisplay=this,e.img.addEventListener("load",this._resumeRenderQ),t=!1}t&&this._renderQ.shift()}0===this._renderQ.length&&this._flushing&&(this._flushing=!1,this.onflush())}}function A(t,e,s,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(s,s+i),n);else for(var r=0;r>>16&65535|0,a=0;0!==s;){s-=a=s>2e3?2e3:s;do{r=r+(n=n+e[i++]|0)|0}while(--a);n%=65521,r%=65521}return n|r<<16|0}function D(){for(var t,e=[],s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e}D();function z(t,e){var s,i,n,r,a,o,h,l,c,d,_,u,f,p,g,m,w,b,v,k,y,C,x,S,Q;s=t.state,i=t.next_in,S=t.input,n=i+(t.avail_in-5),r=t.next_out,Q=t.output,a=r-(e-t.avail_out),o=r+(t.avail_out-257),h=s.dmax,l=s.wsize,c=s.whave,d=s.wnext,_=s.window,u=s.hold,f=s.bits,p=s.lencode,g=s.distcode,m=(1<>>=v=b>>>24,f-=v,0===(v=b>>>16&255))Q[r++]=65535&b;else{if(!(16&v)){if(0===(64&v)){b=p[(65535&b)+(u&(1<>>=v,f-=v),f<15&&(u+=S[i++]<>>=v=b>>>24,f-=v,!(16&(v=b>>>16&255))){if(0===(64&v)){b=g[(65535&b)+(u&(1<h){t.msg="invalid distance too far back",s.mode=30;break t}if(u>>>=v,f-=v,y>(v=r-a)){if((v=y-v)>c&&s.sane){t.msg="invalid distance too far back",s.mode=30;break t}if(C=0,x=_,0===d){if(C+=l-v,v2;)Q[r++]=x[C++],Q[r++]=x[C++],Q[r++]=x[C++],k-=3;k&&(Q[r++]=x[C++],k>1&&(Q[r++]=x[C++]))}else{C=r-y;do{Q[r++]=Q[C++],Q[r++]=Q[C++],Q[r++]=Q[C++],k-=3}while(k>2);k&&(Q[r++]=Q[C++],k>1&&(Q[r++]=Q[C++]))}break}}break}}while(i>3,u&=(1<<(f-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i=1&&0===T[k];k--);if(y>k&&(y=k),0===k)return n[r++]=20971520,n[r++]=20971520,o.bits=1,0;for(v=1;v0&&(0===t||1!==k))return-1;for(L[1]=0,w=1;w852||2===t&&Q>592)return 1;for(;;){f=w-x,a[b]u?(p=B[D+a[b]],g=E[A+a[b]]):(p=96,g=0),h=1<>x)+(l-=h)]=f<<24|p<<16|g|0}while(0!==l);for(h=1<>=1;if(0!==h?(M&=h-1,M+=h):M=0,b++,0===--T[w]){if(w===k)break;w=e[s+a[b]]}if(w>y&&(M&d)!==c){for(0===x&&(x=y),_+=v,S=1<<(C=w-x);C+x852||2===t&&Q>592)return 1;n[c=M&d]=y<<24|C<<16|_-r|0}}return 0!==M&&(n[_+M]=w-x<<24|64<<16|0),o.bits=y,0}const H=-2;var K=12,X=30;function O(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function G(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new F(320),this.work=new F(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function W(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,function(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new L(852),e.distcode=e.distdyn=new L(592),e.sane=1,e.back=-1,0):H}(t)):H}function Y(t,e){var s,i;return t?(i=new G,t.state=i,i.window=null,s=function(t,e){var s,i;return t&&t.state?(i=t.state,e<0?(s=0,e=-e):(s=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?H:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,W(t))):H}(t,e),0!==s&&(t.state=null),s):H}var q,j,Z=!0;function J(t){if(Z){var e;for(q=new L(512),j=new L(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(V(1,t.lens,0,288,q,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;V(2,t.lens,0,32,j,0,t.work,{bits:5}),Z=!1}t.lencode=q,t.lenbits=9,t.distcode=j,t.distbits=5}function $(t,e,s,i){var n,r=t.state;return null===r.window&&(r.wsize=1<=r.wsize?(A(r.window,e,s-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((n=r.wsize-r.wnext)>i&&(n=i),A(r.window,e,s-i,n,r.wnext),(i-=n)?(A(r.window,e,s-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whavethis.chunkSize&&(this.chunkSize=t,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=t,function(t,e){var s,i,n,r,a,o,h,l,c,d,_,u,f,p,g,m,w,b,v,k,y,C,x,S,Q=0,M=new T(4),E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return H;(s=t.state).mode===K&&(s.mode=13),a=t.next_out,n=t.output,h=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,l=s.hold,c=s.bits,d=o,_=h,C=0;t:for(;;)switch(s.mode){case 1:if(0===s.wrap){s.mode=13;break}for(;c<16;){if(0===o)break t;o--,l+=i[r++]<>>8&255,s.check=D(s.check),l=0,c=0,s.mode=2;break}if(s.flags=0,s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&l)<<8)+(l>>8))%31){t.msg="incorrect header check",s.mode=X;break}if(8!==(15&l)){t.msg="unknown compression method",s.mode=X;break}if(c-=4,y=8+(15&(l>>>=4)),0===s.wbits)s.wbits=y;else if(y>s.wbits){t.msg="invalid window size",s.mode=X;break}s.dmax=1<>8&1),512&s.flags&&(M[0]=255&l,M[1]=l>>>8&255,s.check=D(s.check)),l=0,c=0,s.mode=3;case 3:for(;c<32;){if(0===o)break t;o--,l+=i[r++]<>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,s.check=D(s.check)),l=0,c=0,s.mode=4;case 4:for(;c<16;){if(0===o)break t;o--,l+=i[r++]<>8),512&s.flags&&(M[0]=255&l,M[1]=l>>>8&255,s.check=D(s.check)),l=0,c=0,s.mode=5;case 5:if(1024&s.flags){for(;c<16;){if(0===o)break t;o--,l+=i[r++]<>>8&255,s.check=D(s.check)),l=0,c=0}else s.head&&(s.head.extra=null);s.mode=6;case 6:if(1024&s.flags&&((u=s.length)>o&&(u=o),u&&(s.head&&(y=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Array(s.head.extra_len)),A(s.head.extra,i,r,u,y)),512&s.flags&&(s.check=D(s.check)),o-=u,r+=u,s.length-=u),s.length))break t;s.length=0,s.mode=7;case 7:if(2048&s.flags){if(0===o)break t;u=0;do{y=i[r+u++],s.head&&y&&s.length<65536&&(s.head.name+=String.fromCharCode(y))}while(y&&u>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=K;break;case 10:for(;c<32;){if(0===o)break t;o--,l+=i[r++]<>>=7&c,c-=7&c,s.mode=27;break}for(;c<3;){if(0===o)break t;o--,l+=i[r++]<>>=1)){case 0:s.mode=14;break;case 1:if(J(s),s.mode=20,6===e){l>>>=2,c-=2;break t}break;case 2:s.mode=17;break;case 3:t.msg="invalid block type",s.mode=X}l>>>=2,c-=2;break;case 14:for(l>>>=7&c,c-=7&c;c<32;){if(0===o)break t;o--,l+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",s.mode=X;break}if(s.length=65535&l,l=0,c=0,s.mode=15,6===e)break t;case 15:s.mode=16;case 16:if(u=s.length){if(u>o&&(u=o),u>h&&(u=h),0===u)break t;A(n,i,r,u,a),o-=u,r+=u,h-=u,a+=u,s.length-=u;break}s.mode=K;break;case 17:for(;c<14;){if(0===o)break t;o--,l+=i[r++]<>>=5,c-=5,s.ndist=1+(31&l),l>>>=5,c-=5,s.ncode=4+(15&l),l>>>=4,c-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=X;break}s.have=0,s.mode=18;case 18:for(;s.have>>=3,c-=3}for(;s.have<19;)s.lens[E[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,x={bits:s.lenbits},C=V(0,s.lens,0,19,s.lencode,0,s.work,x),s.lenbits=x.bits,C){t.msg="invalid code lengths set",s.mode=X;break}s.have=0,s.mode=19;case 19:for(;s.have>>16&255,w=65535&Q,!((g=Q>>>24)<=c);){if(0===o)break t;o--,l+=i[r++]<>>=g,c-=g,s.lens[s.have++]=w;else{if(16===w){for(S=g+2;c>>=g,c-=g,0===s.have){t.msg="invalid bit length repeat",s.mode=X;break}y=s.lens[s.have-1],u=3+(3&l),l>>>=2,c-=2}else if(17===w){for(S=g+3;c>>=g)),l>>>=3,c-=3}else{for(S=g+7;c>>=g)),l>>>=7,c-=7}if(s.have+u>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=X;break}for(;u--;)s.lens[s.have++]=y}}if(s.mode===X)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=X;break}if(s.lenbits=9,x={bits:s.lenbits},C=V(1,s.lens,0,s.nlen,s.lencode,0,s.work,x),s.lenbits=x.bits,C){t.msg="invalid literal/lengths set",s.mode=X;break}if(s.distbits=6,s.distcode=s.distdyn,x={bits:s.distbits},C=V(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,x),s.distbits=x.bits,C){t.msg="invalid distances set",s.mode=X;break}if(s.mode=20,6===e)break t;case 20:s.mode=21;case 21:if(o>=6&&h>=258){t.next_out=a,t.avail_out=h,t.next_in=r,t.avail_in=o,s.hold=l,s.bits=c,z(t,_),a=t.next_out,n=t.output,h=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,l=s.hold,c=s.bits,s.mode===K&&(s.back=-1);break}for(s.back=0;m=(Q=s.lencode[l&(1<>>16&255,w=65535&Q,!((g=Q>>>24)<=c);){if(0===o)break t;o--,l+=i[r++]<>b)])>>>16&255,w=65535&Q,!(b+(g=Q>>>24)<=c);){if(0===o)break t;o--,l+=i[r++]<>>=b,c-=b,s.back+=b}if(l>>>=g,c-=g,s.back+=g,s.length=w,0===m){s.mode=26;break}if(32&m){s.back=-1,s.mode=K;break}if(64&m){t.msg="invalid literal/length code",s.mode=X;break}s.extra=15&m,s.mode=22;case 22:if(s.extra){for(S=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=23;case 23:for(;m=(Q=s.distcode[l&(1<>>16&255,w=65535&Q,!((g=Q>>>24)<=c);){if(0===o)break t;o--,l+=i[r++]<>b)])>>>16&255,w=65535&Q,!(b+(g=Q>>>24)<=c);){if(0===o)break t;o--,l+=i[r++]<>>=b,c-=b,s.back+=b}if(l>>>=g,c-=g,s.back+=g,64&m){t.msg="invalid distance code",s.mode=X;break}s.offset=w,s.extra=15&m,s.mode=24;case 24:if(s.extra){for(S=s.extra;c>>=s.extra,c-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=X;break}s.mode=25;case 25:if(0===h)break t;if(u=_-h,s.offset>u){if((u=s.offset-u)>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=X;break}u>s.wnext?(u-=s.wnext,f=s.wsize-u):f=s.wnext-u,u>s.length&&(u=s.length),p=s.window}else p=n,f=a-s.offset,u=s.length;u>h&&(u=h),h-=u,s.length-=u;do{n[a++]=p[f++]}while(--u);0===s.length&&(s.mode=21);break;case 26:if(0===h)break t;n[a++]=s.length,h--,s.mode=21;break;case 27:if(s.wrap){for(;c<32;){if(0===o)break t;o--,l|=i[r++]<=0;)t[e]=0}var it=256,nt=286,rt=30,at=15,ot=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ht=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],lt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],dt=new Array(576);st(dt);var _t=new Array(60);st(_t);var ut=new Array(512);st(ut);var ft=new Array(256);st(ft);var pt=new Array(29);st(pt);var gt,mt,wt,bt=new Array(rt);function vt(t,e,s,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function kt(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function yt(t){return t<256?ut[t]:ut[256+(t>>>7)]}function Ct(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function xt(t,e,s){t.bi_valid>16-s?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<>>=1,s<<=1}while(--e>0);return s>>>1}function Mt(t,e,s){var i,n,r=new Array(16),a=0;for(i=1;i<=at;i++)r[i]=a=a+s[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=Qt(r[o]++,o))}}function Et(t){var e;for(e=0;e8?Ct(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Tt(t,e,s,i){var n=2*e,r=2*s;return t[n]>1;s>=1;s--)Ft(t,r,s);n=h;do{s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Ft(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=i,r[2*n]=r[2*s]+r[2*i],t.depth[n]=(t.depth[s]>=t.depth[i]?t.depth[s]:t.depth[i])+1,r[2*s+1]=r[2*i+1]=n,t.heap[1]=n++,Ft(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var s,i,n,r,a,o,h=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,d=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,f=e.stat_desc.max_length,p=0;for(r=0;r<=at;r++)t.bl_count[r]=0;for(h[2*t.heap[t.heap_max]+1]=0,s=t.heap_max+1;s<573;s++)(r=h[2*h[2*(i=t.heap[s])+1]+1]+1)>f&&(r=f,p++),h[2*i+1]=r,i>l||(t.bl_count[r]++,a=0,i>=u&&(a=_[i-u]),o=h[2*i],t.opt_len+=o*(r+a),d&&(t.static_len+=o*(c[2*i+1]+a)));if(0!==p){do{for(r=f-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[f]--,p-=2}while(p>0);for(r=f;0!==r;r--)for(i=t.bl_count[r];0!==i;)(n=t.heap[--s])>l||(h[2*n+1]!==r&&(t.opt_len+=(r-h[2*n+1])*h[2*n],h[2*n+1]=r),i--)}}(t,e),Mt(r,l,t.bl_count)}function Dt(t,e,s){var i,n,r=-1,a=e[1],o=0,h=7,l=4;for(0===a&&(h=138,l=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)n=a,a=e[2*(i+1)+1],++o>=7;i=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}function Pt(t,e,s,i){var n,r,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,s=4093624447;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*ct[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=s+5,s+4<=n&&-1!==e?It(t,e,s,i):4===t.strategy||r===n?(xt(t,2+(i?1:0),3),Lt(t,dt,_t)):(xt(t,4+(i?1:0),3),function(t,e,s,i){var n;for(xt(t,e-257,5),xt(t,s-1,5),xt(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&s,t.last_lit++,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[2*(ft[s]+it+1)]++,t.dyn_dtree[2*yt(e)]++),t.last_lit===t.lit_bufsize-1}var Ht={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};const Kt=-2;var Xt,Ot=258,Gt=262,Wt=103,Yt=113,qt=666;function jt(t,e){return t.msg=Ht[e],e}function Zt(t){return(t<<1)-(t>4?9:0)}function Jt(t){for(var e=t.length;--e>=0;)t[e]=0}function $t(t){var e=t.state,s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(A(t.output,e.pending_buf,e.pending_out,s,t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))}function te(t,e){Pt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,$t(t.strm)}function ee(t,e){t.pending_buf[t.pending++]=e}function se(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ie(t,e,s,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,A(e,t.input,t.next_in,n,s),1===t.state.wrap?t.adler=B(t.adler,e,n,s):2===t.state.wrap&&(t.adler=D(t.adler)),t.next_in+=n,t.total_in+=n,n)}function ne(t,e){var s,i,n=t.max_chain_length,r=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-Gt?t.strstart-(t.w_size-Gt):0,l=t.window,c=t.w_mask,d=t.prev,_=t.strstart+Ot,u=l[r+a-1],f=l[r+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(l[(s=e)+a]===f&&l[s+a-1]===u&&l[s]===l[r]&&l[++s]===l[r+1]){r+=2,s++;do{}while(l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&l[++r]===l[++s]&&r<_);if(i=Ot-(_-r),r=_-Ot,i>a){if(t.match_start=e,a=i,i>=o)break;u=l[r+a-1],f=l[r+a]}}}while((e=d[e&c])>h&&0!==--n);return a<=t.lookahead?a:t.lookahead}function re(t){var e,s,i,n,r,a=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-Gt)){A(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=s=t.hash_size;do{i=t.head[--e],t.head[e]=i>=a?i-a:0}while(--s);e=s=a;do{i=t.prev[--e],t.prev[e]=i>=a?i-a:0}while(--s);n+=a}if(0===t.strm.avail_in)break;if(s=ie(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=s,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=Vt(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=Vt(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=(t.ins_h<15&&(a=2,i-=16),n<1||n>9||8!==s||i<8||i>15||e<0||e>9||r<0||r>4)return jt(t,Kt);8===i&&(i=9);var o=new le;return t.state=o,o.strm=t,o.wrap=a,o.gzhead=null,o.w_bits=i,o.w_size=1<5||e<0)return t?jt(t,Kt):Kt;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===qt&&4!==e)return jt(t,0===t.avail_out?-5:Kt);if(i.strm=t,s=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,ee(i,31),ee(i,139),ee(i,8),i.gzhead?(ee(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),ee(i,255&i.gzhead.time),ee(i,i.gzhead.time>>8&255),ee(i,i.gzhead.time>>16&255),ee(i,i.gzhead.time>>24&255),ee(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),ee(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(ee(i,255&i.gzhead.extra.length),ee(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=D(t.adler,i.pending_buf,i.pending)),i.gzindex=0,i.status=69):(ee(i,0),ee(i,0),ee(i,0),ee(i,0),ee(i,0),ee(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),ee(i,3),i.status=Yt);else{var a=8+(i.w_bits-8<<4)<<8;a|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=Yt,se(i,a),0!==i.strstart&&(se(i,t.adler>>>16),se(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=D(t.adler,i.pending_buf,i.pending)),$t(t),n=i.pending,i.pending!==i.pending_buf_size));)ee(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=D(t.adler,i.pending_buf,i.pending)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=D(t.adler,i.pending_buf,i.pending)),$t(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(t.adler=D(t.adler,i.pending_buf,i.pending)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=D(t.adler,i.pending_buf,i.pending)),$t(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(t.adler=D(t.adler,i.pending_buf,i.pending)),0===r&&(i.status=Wt)}else i.status=Wt;if(i.status===Wt&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&$t(t),i.pending+2<=i.pending_buf_size&&(ee(i,255&t.adler),ee(i,t.adler>>8&255),t.adler=0,i.status=Yt)):i.status=Yt),0!==i.pending){if($t(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&Zt(e)<=Zt(s)&&4!==e)return jt(t,-5);if(i.status===qt&&0!==t.avail_in)return jt(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&i.status!==qt){var o=2===i.strategy?function(t,e){for(var s;;){if(0===t.lookahead&&(re(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,s=Vt(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(te(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(te(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(te(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var s,i,n,r,a=t.window;;){if(t.lookahead<=Ot){if(re(t),t.lookahead<=Ot&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=a[n=t.strstart-1])===a[++n]&&i===a[++n]&&i===a[++n]){r=t.strstart+Ot;do{}while(i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&i===a[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=Vt(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=Vt(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(te(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(te(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(te(t,!1),0===t.strm.avail_out)?1:2}(i,e):Xt[i.level].func(i,e);if(3!==o&&4!==o||(i.status=qt),1===o||3===o)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===o&&(1===e?Nt(i):5!==e&&(It(i,0,0,!1),3===e&&(Jt(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),$t(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(ee(i,255&t.adler),ee(i,t.adler>>8&255),ee(i,t.adler>>16&255),ee(i,t.adler>>24&255),ee(i,255&t.total_in),ee(i,t.total_in>>8&255),ee(i,t.total_in>>16&255),ee(i,t.total_in>>24&255)):(se(i,t.adler>>>16),se(i,65535&t.adler)),$t(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)}Xt=[new he(0,0,0,0,(function(t,e){var s=65535;for(s>t.pending_buf_size-5&&(s=t.pending_buf_size-5);;){if(t.lookahead<=1){if(re(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+s;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,te(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-Gt&&(te(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(te(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(te(t,!1),t.strm.avail_out),1)})),new he(4,4,8,4,ae),new he(4,5,16,8,ae),new he(4,6,32,32,ae),new he(4,4,16,16,oe),new he(8,16,32,32,oe),new he(8,16,128,128,oe),new he(8,32,128,256,oe),new he(32,128,258,1024,oe),new he(32,258,258,4096,oe)];class ue{constructor(){this.strm=new tt,this.chunkSize=102400,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,de(this.strm,this.windowBits)}deflate(t){this.strm.input=t,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;let e=_e(this.strm,3),s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(e<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){let t=[s],i=s.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,e=_e(this.strm,3),e<0)throw new Error("zlib deflate failed");let s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=s.length,t.push(s)}while(this.strm.avail_in>0);let n=new Uint8Array(i),r=0;for(let e=0;e=32&&t<=255)return t;const e=rr[t];return void 0!==e?e:16777216|t}},or={8:"Backspace",9:"Tab",10:"NumpadClear",13:"Enter",16:"ShiftLeft",17:"ControlLeft",18:"AltLeft",19:"Pause",20:"CapsLock",21:"Lang1",25:"Lang2",27:"Escape",28:"Convert",29:"NonConvert",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",44:"PrintScreen",45:"Insert",46:"Delete",47:"Help",48:"Digit0",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",95:"Sleep",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",108:"NumpadDecimal",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",144:"NumLock",145:"ScrollLock",166:"BrowserBack",167:"BrowserForward",168:"BrowserRefresh",169:"BrowserStop",170:"BrowserSearch",171:"BrowserFavorites",172:"BrowserHome",173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",180:"LaunchMail",181:"MediaSelect",182:"LaunchApp1",183:"LaunchApp2",225:"AltRight"},hr={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};const lr={};function cr(t,e){if(void 0===e)throw new Error('Undefined keysym for key "'+t+'"');if(t in lr)throw new Error('Duplicate entry for key "'+t+'"');lr[t]=[e,e,e,e]}function dr(t,e,s){if(void 0===e)throw new Error('Undefined keysym for key "'+t+'"');if(void 0===s)throw new Error('Undefined keysym for key "'+t+'"');if(t in lr)throw new Error('Duplicate entry for key "'+t+'"');lr[t]=[e,e,s,e]}function _r(t,e,s){if(void 0===e)throw new Error('Undefined keysym for key "'+t+'"');if(void 0===s)throw new Error('Undefined keysym for key "'+t+'"');if(t in lr)throw new Error('Duplicate entry for key "'+t+'"');lr[t]=[e,e,e,s]}dr("Alt",Ci,xi),cr("AltGraph",Mi),cr("CapsLock",vi),dr("Control",wi,bi),dr("Meta",Si,Qi),cr("NumLock",ns),cr("ScrollLock",be),dr("Shift",gi,mi),_r("Enter",me,as),cr("Tab",pe),_r(" ",Li,rs),_r("ArrowDown",Ke,ds),_r("ArrowLeft",Pe,hs),_r("ArrowRight",He,cs),_r("ArrowUp",Ve,ls),_r("End",Ge,fs),_r("Home",Ne,os),_r("PageDown",Oe,us),_r("PageUp",Xe,_s),cr("Backspace",fe),_r("Clear",ge,ps),cr("Copy",Bn),cr("Cut",Dn),_r("Delete",ke,ms),_r("Insert",je,gs),cr("Paste",Nn),cr("Redo",Je),cr("Undo",Ze),cr("Cancel",es),cr("ContextMenu",$e),cr("Escape",ve),cr("Execute",qe),cr("Find",ts),cr("Help",ss),cr("Pause",we),cr("Select",We),cr("ZoomIn",Wn),cr("ZoomOut",Yn),cr("BrightnessDown",tn),cr("BrightnessUp",$i),cr("Eject",Cn),cr("LogOff",Un),cr("Power",kn),cr("PowerOff",gn),cr("PrintScreen",Ye),cr("Hibernate",sr),cr("Standby",en),cr("WakeUp",yn),cr("AllCandidates",Se),cr("Alphanumeric",Ie),cr("CodeInput",Ce),cr("Compose",ye),cr("Convert",Ae),cr("GroupFirst",Ti),cr("GroupLast",Fi),cr("GroupNext",Ei),cr("GroupPrevious",Ai),cr("NonConvert",Ee),cr("PreviousCandidate",Qe),cr("SingleCandidate",xe),cr("HangulMode",ji),cr("HanjaMode",Zi),cr("JunjaMode",Ji),cr("Eisu",Ie),cr("Hankaku",ze),cr("Hiragana",Fe),cr("HiraganaKatakana",Be),cr("KanaMode",Re),cr("KanjiMode",Me),cr("Katakana",Le),cr("Romaji",Te),cr("Zenkaku",De),cr("ZenkakuHankaku",Ue),cr("F1",zs),cr("F2",Us),cr("F3",Rs),cr("F4",Is),cr("F5",Ns),cr("F6",Ps),cr("F7",Vs),cr("F8",Hs),cr("F9",Ks),cr("F10",Xs),cr("F11",Os),cr("F12",Gs),cr("F13",Ws),cr("F14",Ys),cr("F15",qs),cr("F16",js),cr("F17",Zs),cr("F18",Js),cr("F19",$s),cr("F20",ti),cr("F21",ei),cr("F22",si),cr("F23",ii),cr("F24",ni),cr("F25",ri),cr("F26",ai),cr("F27",oi),cr("F28",hi),cr("F29",li),cr("F30",ci),cr("F31",di),cr("F32",_i),cr("F33",ui),cr("F34",fi),cr("F35",pi),cr("Close",Ln),cr("MailForward",jn),cr("MailReply",Vn),cr("MailSend",Kn),cr("MediaFastForward",Jn),cr("MediaPause",Mn),cr("MediaPlay",an),cr("MediaRecord",un),cr("MediaRewind",Fn),cr("MediaStop",on),cr("MediaTrackNext",ln),cr("MediaTrackPrevious",hn),cr("New",Rn),cr("Open",In),cr("Print",Ye),cr("Save",Hn),cr("SpellCheck",Xn),cr("AudioVolumeDown",sn),cr("AudioVolumeUp",rn),cr("AudioVolumeMute",nn),cr("MicrophoneVolumeMute",ir),cr("LaunchApplication1",An),cr("LaunchApplication2",fn),cr("LaunchCalendar",pn),cr("LaunchMail",dn),cr("LaunchMediaPlayer",En),cr("LaunchMusicPlayer",Zn),cr("LaunchPhone",Pn),cr("LaunchScreenSaver",xn),cr("LaunchSpreadsheet",zn),cr("LaunchWebBrowser",Sn),cr("LaunchWebCam",qn),cr("LaunchWordProcessor",Gn),cr("BrowserBack",mn),cr("BrowserFavorites",Qn),cr("BrowserForward",wn),cr("BrowserHome",cn),cr("BrowserRefresh",vn),cr("BrowserSearch",_n),cr("BrowserStop",bn),cr("Dimmer",Tn),cr("MediaAudioTrack",er),cr("RandomToggle",$n),cr("SplitScreenToggle",On),cr("Subtitle",tr),cr("VideoModeNext",nr),_r("=",qi,ws),_r("+",Di,vs),_r("-",Ui,ys),_r("*",Bi,bs),_r("/",Ii,xs),_r(".",Ri,Cs),_r(",",zi,ks),_r("0",Ni,Ss),_r("1",Pi,Qs),_r("2",Vi,Ms),_r("3",Hi,Es),_r("4",Ki,As),_r("5",Xi,Ts),_r("6",Oi,Fs),_r("7",Gi,Ls),_r("8",Wi,Bs),_r("9",Yi,Ds);var ur=lr;function fr(t){if(t.code){switch(t.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return t.code}if(t.keyCode in or){let e=or[t.keyCode];if(g()&&"ContextMenu"===e&&(e="MetaRight"),2===t.location)switch(e){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(3===t.location)switch(e){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return e}return"Unidentified"}function pr(t){const e=function(t){if(void 0!==t.key){switch(t.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(t.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}return"\0"===t.key&&"NumpadDecimal"===t.code?"Delete":t.key}const e=fr(t);return e in hr?hr[e]:t.charCode?String.fromCharCode(t.charCode):"Unidentified"}(t);if("Unidentified"===e)return null;if(e in ur){let s=t.location;if("Meta"===e&&0===s&&(s=2),"Clear"===e&&3===s){"NumLock"===fr(t)&&(s=0)}if((void 0===s||s>3)&&(s=0),"Meta"===e){let e=fr(t);if("AltLeft"===e)return ki;if("AltRight"===e)return yi}if("Clear"===e){if("NumLock"===fr(t))return ns}if(m())switch(e){case"Zenkaku":case"Hankaku":return Ue;case"Romaji":case"KanaMode":return Te}return ur[e][s]}if(1!==e.length)return null;const s=e.charCodeAt();return s?ar.lookup(s):null}class gr{constructor(t){this._target=t||null,this._keyDownList={},this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),blur:this._allKeysUp.bind(this)},this.onkeyevent=()=>{}}_sendKeyEvent(t,e,s){if(s)this._keyDownList[e]=t;else{if(!(e in this._keyDownList))return;delete this._keyDownList[e]}r("onkeyevent "+(s?"down":"up")+", keysym: "+t,", code: "+e),this.onkeyevent(t,e,s)}_getKeyCode(t){const e=fr(t);if("Unidentified"!==e)return e;if(t.keyCode&&229!==t.keyCode)return"Platform"+t.keyCode;if(t.keyIdentifier){if("U+"!==t.keyIdentifier.substr(0,2))return t.keyIdentifier;const e=parseInt(t.keyIdentifier.substr(2),16);return"Platform"+String.fromCharCode(e).toUpperCase().charCodeAt()}return"Unidentified"}_handleKeyDown(t){const e=this._getKeyCode(t);let s=pr(t);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),"AltRight"===e&&t.timeStamp-this._altGrCtrlTime<50?s=Mi:this._sendKeyEvent(wi,"ControlLeft",!0)),"Unidentified"===e)return s&&(this._sendKeyEvent(s,e,!0),this._sendKeyEvent(s,e,!1)),void v(t);if(g()||w())switch(s){case Si:s=Ci;break;case Qi:s=Si;break;case Ci:s=is;break;case xi:s=Mi}if(e in this._keyDownList&&(s=this._keyDownList[e]),(g()||w())&&"CapsLock"===e)return this._sendKeyEvent(vi,"CapsLock",!0),this._sendKeyEvent(vi,"CapsLock",!1),void v(t);const i=[Ue,Ie,Le,Fe,Te];return m()&&i.includes(s)?(this._sendKeyEvent(s,e,!0),this._sendKeyEvent(s,e,!1),void v(t)):(v(t),"ControlLeft"===e&&m()&&!("ControlLeft"in this._keyDownList)?(this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),void(this._altGrCtrlTime=t.timeStamp)):void this._sendKeyEvent(s,e,!0))}_handleKeyUp(t){v(t);const e=this._getKeyCode(t);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(wi,"ControlLeft",!0)),(g()||w())&&"CapsLock"===e)return this._sendKeyEvent(vi,"CapsLock",!0),void this._sendKeyEvent(vi,"CapsLock",!1);this._sendKeyEvent(this._keyDownList[e],e,!1),!m()||"ShiftLeft"!==e&&"ShiftRight"!==e||("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}_handleAltGrTimeout(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(wi,"ControlLeft",!0)}_allKeysUp(){r(">> Keyboard.allKeysUp");for(let t in this._keyDownList)this._sendKeyEvent(this._keyDownList[t],t,!1);r("<< Keyboard.allKeysUp")}grab(){this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),window.addEventListener("blur",this._eventHandlers.blur)}ungrab(){this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}const mr=32,wr=64;class br{constructor(){this._target=null,this._state=127,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}attach(t){this.detach(),this._target=t,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}detach(){this._target&&(this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null)}_eventHandler(t){let e;switch(t.stopPropagation(),t.preventDefault(),t.type){case"touchstart":e=this._touchStart;break;case"touchmove":e=this._touchMove;break;case"touchend":case"touchcancel":e=this._touchEnd}for(let s=0;s0&&Date.now()-this._tracked[0].started>250)return this._state=0,void this._ignored.push(t);if(this._waitingRelease)return this._state=0,void this._ignored.push(t);switch(this._tracked.push({id:t,started:Date.now(),active:!0,firstX:e,firstY:s,lastX:e,lastY:s,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=-26,this._stopLongpressTimeout();break;case 3:this._state&=-99;break;default:this._state=0}}}_touchMove(t,e,s){let i=this._tracked.find((e=>e.id===t));if(void 0===i)return;i.lastX=e,i.lastY=s;let n=e-i.firstX,r=s-i.firstY;if(i.firstX===i.lastX&&i.firstY===i.lastY||(i.angle=180*Math.atan2(r,n)/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(n,r)<50)return;if(this._state&=-24,this._stopLongpressTimeout(),1!==this._tracked.length&&(this._state&=-9),2!==this._tracked.length&&(this._state&=-97),2===this._tracked.length){let e=this._tracked.find((e=>e.id!==t));if(Math.hypot(e.firstX-e.lastX,e.firstY-e.lastY)>50){let t=Math.abs(i.angle-e.angle);t=Math.abs((t+180)%360-180),this._state&=t>90?-33:-65,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}_touchEnd(t,e,s){if(-1!==this._ignored.indexOf(t))return this._ignored.splice(this._ignored.indexOf(t),1),void(0===this._ignored.length&&0===this._tracked.length&&(this._state=127,this._waitingRelease=!1));if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=0),!this._hasDetectedGesture()&&(this._state&=-105,this._state&=-17,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=-7;break;case 2:this._state&=-6}if(this._waitingRelease){if(Date.now()-this._releaseStart>250&&(this._state=0),this._tracked.some((t=>Date.now()-t.started>1e3))&&(this._state=0),this._tracked.find((e=>e.id===t)).active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(0!==this._state)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(let i=0;it.active))))}_startLongpressTimeout(){this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout((()=>this._longpressTimeout()),1e3)}_stopLongpressTimeout(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}_longpressTimeout(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=16,this._pushEvent("gesturestart")}_startTwoTouchTimeout(){this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout((()=>this._twoTouchTimeout()),50)}_stopTwoTouchTimeout(){clearTimeout(this._twoTouchTimeoutId),this._twoTouchTimeoutId=null}_isTwoTouchTimeoutRunning(){return null!==this._twoTouchTimeoutId}_twoTouchTimeout(){if(0===this._tracked.length)throw new Error("A pinch or two drag gesture failed, no tracked touches");let t=this._getAverageMovement(),e=Math.abs(t.x),s=Math.abs(t.y),i=this._getAverageDistance(),n=Math.abs(Math.hypot(i.first.x,i.first.y)-Math.hypot(i.last.x,i.last.y));this._state=s{this._target&&(e=document.elementFromPoint(t.clientX,t.clientY),this._updateVisibility(e))}),0)}_showCursor(){"hidden"===this._canvas.style.visibility&&(this._canvas.style.visibility="")}_hideCursor(){"hidden"!==this._canvas.style.visibility&&(this._canvas.style.visibility="hidden")}_shouldShowCursor(t){return!!t&&(t===this._target||!!this._target.contains(t)&&"none"===window.getComputedStyle(t).cursor)}_updateVisibility(t){this._captureIsActive()&&(t=document.captureElement),this._shouldShowCursor(t)?this._showCursor():this._hideCursor()}_updatePosition(){this._canvas.style.left=this._position.x+"px",this._canvas.style.top=this._position.y+"px"}_captureIsActive(){return document.captureElement&&document.documentElement.contains(document.captureElement)}}const yr=41943040,Cr="connecting",xr="open",Sr="closing",Qr="closed",Mr={CONNECTING:[WebSocket.CONNECTING,Cr],OPEN:[WebSocket.OPEN,xr],CLOSING:[WebSocket.CLOSING,Sr],CLOSED:[WebSocket.CLOSED,Qr]},Er=["send","close","binaryType","onerror","onmessage","onopen","protocol","readyState"];class Ar{constructor(){this._websocket=null,this._rQi=0,this._rQlen=0,this._rQbufferSize=4194304,this._rQ=null,this._sQbufferSize=10240,this._sQlen=0,this._sQ=null,this._eventHandlers={message:()=>{},open:()=>{},close:()=>{},error:()=>{}}}get readyState(){let t;return null===this._websocket?"unused":(t=this._websocket.readyState,Mr.CONNECTING.includes(t)?"connecting":Mr.OPEN.includes(t)?"open":Mr.CLOSING.includes(t)?"closing":Mr.CLOSED.includes(t)?"closed":"unknown")}get sQ(){return this._sQ}get rQ(){return this._rQ}get rQi(){return this._rQi}set rQi(t){this._rQi=t}get rQlen(){return this._rQlen-this._rQi}rQpeek8(){return this._rQ[this._rQi]}rQskipBytes(t){this._rQi+=t}rQshift8(){return this._rQshift(1)}rQshift16(){return this._rQshift(2)}rQshift32(){return this._rQshift(4)}_rQshift(t){let e=0;for(let s=t-1;s>=0;s--)e+=this._rQ[this._rQi++]<<8*s;return e}rQshiftStr(t){"undefined"===typeof t&&(t=this.rQlen);let e="";for(let s=0;s0&&"open"===this.readyState&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}send(t){this._sQ.set(t,this._sQlen),this._sQlen+=t.length,this.flush()}sendString(t){this.send(t.split("").map((t=>t.charCodeAt(0))))}off(t){this._eventHandlers[t]=()=>{}}on(t,e){this._eventHandlers[t]=e}_allocateBuffers(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}init(){this._allocateBuffers(),this._rQi=0,this._websocket=null}open(t,e){this.attach(new WebSocket(t,e))}attach(t){this.init();const e=[...Object.keys(t),...Object.getOwnPropertyNames(Object.getPrototypeOf(t))];for(let s=0;s{r(">> WebSock.onopen"),this._websocket.protocol&&a("Server choose sub-protocol: "+this._websocket.protocol),this._eventHandlers.open(),r("<< WebSock.onopen")},this._websocket.onclose=t=>{r(">> WebSock.onclose"),this._eventHandlers.close(t),r("<< WebSock.onclose")},this._websocket.onerror=t=>{r(">> WebSock.onerror: "+t),this._eventHandlers.error(t),r("<< WebSock.onerror: "+t)}}close(){this._websocket&&("connecting"!==this.readyState&&"open"!==this.readyState||(a("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=()=>{})}_encodeMessage(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}_expandCompactRQ(t){const e=8*(this._rQlen-this._rQi+t),s=this._rQbufferSizeyr&&(this._rQbufferSize=yr,this._rQbufferSize-this.rQlenthis._rQbufferSize-this._rQlen&&this._expandCompactRQ(e.length),this._rQ.set(e,this._rQlen),this._rQlen+=e.length}_recvMessage(t){this._DecodeMessage(t.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):r("Ignoring empty message")}}const Tr=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],Fr=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28];let Lr,Br,Dr,zr,Ur,Rr;Lr=65536,Br=1<<24,Dr=Lr|Br,zr=4,Ur=1024,Rr=zr|Ur;const Ir=[Dr|Ur,0,0|Lr,Dr|Rr,Dr|zr,Lr|Rr,0|zr,0|Lr,0|Ur,Dr|Ur,Dr|Rr,0|Ur,Br|Rr,Dr|zr,0|Br,0|zr,0|Rr,Br|Ur,Br|Ur,Lr|Ur,Lr|Ur,0|Dr,0|Dr,Br|Rr,Lr|zr,Br|zr,Br|zr,Lr|zr,0,0|Rr,Lr|Rr,0|Br,0|Lr,Dr|Rr,0|zr,0|Dr,Dr|Ur,0|Br,0|Br,0|Ur,Dr|zr,0|Lr,Lr|Ur,Br|zr,0|Ur,0|zr,Br|Rr,Lr|Rr,Dr|Rr,Lr|zr,0|Dr,Br|Rr,Br|zr,0|Rr,Lr|Rr,Dr|Ur,0|Rr,Br|Ur,Br|Ur,0,Lr|zr,Lr|Ur,0,Dr|zr];Lr=1<<20,Br=1<<31,Dr=Lr|Br,zr=32,Ur=32768,Rr=zr|Ur;const Nr=[Dr|Rr,Br|Ur,0|Ur,Lr|Rr,0|Lr,0|zr,Dr|zr,Br|Rr,Br|zr,Dr|Rr,Dr|Ur,0|Br,Br|Ur,0|Lr,0|zr,Dr|zr,Lr|Ur,Lr|zr,Br|Rr,0,0|Br,0|Ur,Lr|Rr,0|Dr,Lr|zr,Br|zr,0,Lr|Ur,0|Rr,Dr|Ur,0|Dr,0|Rr,0,Lr|Rr,Dr|zr,0|Lr,Br|Rr,0|Dr,Dr|Ur,0|Ur,0|Dr,Br|Ur,0|zr,Dr|Rr,Lr|Rr,0|zr,0|Ur,0|Br,0|Rr,Dr|Ur,0|Lr,Br|zr,Lr|zr,Br|Rr,Br|zr,Lr|zr,Lr|Ur,0,Br|Ur,0|Rr,0|Br,Dr|zr,Dr|Rr,Lr|Ur];Lr=1<<17,Br=1<<27,Dr=Lr|Br,zr=8,Ur=512,Rr=zr|Ur;const Pr=[0|Rr,Dr|Ur,0,Dr|zr,Br|Ur,0,Lr|Rr,Br|Ur,Lr|zr,Br|zr,Br|zr,0|Lr,Dr|Rr,Lr|zr,0|Dr,0|Rr,0|Br,0|zr,Dr|Ur,0|Ur,Lr|Ur,0|Dr,Dr|zr,Lr|Rr,Br|Rr,Lr|Ur,0|Lr,Br|Rr,0|zr,Dr|Rr,0|Ur,0|Br,Dr|Ur,0|Br,Lr|zr,0|Rr,0|Lr,Dr|Ur,Br|Ur,0,0|Ur,Lr|zr,Dr|Rr,Br|Ur,Br|zr,0|Ur,0,Dr|zr,Br|Rr,0|Lr,0|Br,Dr|Rr,0|zr,Lr|Rr,Lr|Ur,Br|zr,0|Dr,Br|Rr,0|Rr,0|Dr,Lr|Rr,0|zr,Dr|zr,Lr|Ur];Lr=8192,Br=1<<23,Dr=Lr|Br,zr=1,Ur=128,Rr=zr|Ur;const Vr=[Dr|zr,Lr|Rr,Lr|Rr,0|Ur,Dr|Ur,Br|Rr,Br|zr,Lr|zr,0,0|Dr,0|Dr,Dr|Rr,0|Rr,0,Br|Ur,Br|zr,0|zr,0|Lr,0|Br,Dr|zr,0|Ur,0|Br,Lr|zr,Lr|Ur,Br|Rr,0|zr,Lr|Ur,Br|Ur,0|Lr,Dr|Ur,Dr|Rr,0|Rr,Br|Ur,Br|zr,0|Dr,Dr|Rr,0|Rr,0,0,0|Dr,Lr|Ur,Br|Ur,Br|Rr,0|zr,Dr|zr,Lr|Rr,Lr|Rr,0|Ur,Dr|Rr,0|Rr,0|zr,0|Lr,Br|zr,Lr|zr,Dr|Ur,Br|Rr,Lr|zr,Lr|Ur,0|Br,Dr|zr,0|Ur,0|Br,0|Lr,Dr|Ur];Lr=1<<25,Br=1<<30,Dr=Lr|Br,zr=256,Ur=1<<19,Rr=zr|Ur;const Hr=[0|zr,Lr|Rr,Lr|Ur,Dr|zr,0|Ur,0|zr,0|Br,Lr|Ur,Br|Rr,0|Ur,Lr|zr,Br|Rr,Dr|zr,Dr|Ur,0|Rr,0|Br,0|Lr,Br|Ur,Br|Ur,0,Br|zr,Dr|Rr,Dr|Rr,Lr|zr,Dr|Ur,Br|zr,0,0|Dr,Lr|Rr,0|Lr,0|Dr,0|Rr,0|Ur,Dr|zr,0|zr,0|Lr,0|Br,Lr|Ur,Dr|zr,Br|Rr,Lr|zr,0|Br,Dr|Ur,Lr|Rr,Br|Rr,0|zr,0|Lr,Dr|Ur,Dr|Rr,0|Rr,0|Dr,Dr|Rr,Lr|Ur,0,Br|Ur,0|Dr,0|Rr,Lr|zr,Br|zr,0|Ur,0,Br|Ur,Lr|Rr,Br|zr];Lr=1<<22,Br=1<<29,Dr=Lr|Br,zr=16,Ur=16384,Rr=zr|Ur;const Kr=[Br|zr,0|Dr,0|Ur,Dr|Rr,0|Dr,0|zr,Dr|Rr,0|Lr,Br|Ur,Lr|Rr,0|Lr,Br|zr,Lr|zr,Br|Ur,0|Br,0|Rr,0,Lr|zr,Br|Rr,0|Ur,Lr|Ur,Br|Rr,0|zr,Dr|zr,Dr|zr,0,Lr|Rr,Dr|Ur,0|Rr,Lr|Ur,Dr|Ur,0|Br,Br|Ur,0|zr,Dr|zr,Lr|Ur,Dr|Rr,0|Lr,0|Rr,Br|zr,0|Lr,Br|Ur,0|Br,0|Rr,Br|zr,Dr|Rr,Lr|Ur,0|Dr,Lr|Rr,Dr|Ur,0,Dr|zr,0|zr,0|Ur,0|Dr,Lr|Rr,0|Ur,Lr|zr,Br|Rr,0,Dr|Ur,0|Br,Lr|zr,Br|Rr];Lr=1<<21,Br=1<<26,Dr=Lr|Br,zr=2,Ur=2048,Rr=zr|Ur;const Xr=[0|Lr,Dr|zr,Br|Rr,0,0|Ur,Br|Rr,Lr|Rr,Dr|Ur,Dr|Rr,0|Lr,0,Br|zr,0|zr,0|Br,Dr|zr,0|Rr,Br|Ur,Lr|Rr,Lr|zr,Br|Ur,Br|zr,0|Dr,Dr|Ur,Lr|zr,0|Dr,0|Ur,0|Rr,Dr|Rr,Lr|Ur,0|zr,0|Br,Lr|Ur,0|Br,Lr|Ur,0|Lr,Br|Rr,Br|Rr,Dr|zr,Dr|zr,0|zr,Lr|zr,0|Br,Br|Ur,0|Lr,Dr|Ur,0|Rr,Lr|Rr,Dr|Ur,0|Rr,Br|zr,Dr|Rr,0|Dr,Lr|Ur,0,0|zr,Dr|Rr,0,Lr|Rr,0|Dr,0|Ur,Br|zr,Br|Ur,0|Ur,Lr|zr];Lr=1<<18,Br=1<<28,Dr=Lr|Br,zr=64,Ur=4096,Rr=zr|Ur;const Or=[Br|Rr,0|Ur,0|Lr,Dr|Rr,0|Br,Br|Rr,0|zr,0|Br,Lr|zr,0|Dr,Dr|Rr,Lr|Ur,Dr|Ur,Lr|Rr,0|Ur,0|zr,0|Dr,Br|zr,Br|Ur,0|Rr,Lr|Ur,Lr|zr,Dr|zr,Dr|Ur,0|Rr,0,0,Dr|zr,Br|zr,Br|Ur,Lr|Rr,0|Lr,Lr|Rr,0|Lr,Dr|Ur,0|Ur,0|zr,Dr|zr,0|Ur,Lr|Rr,Br|Ur,0|zr,Br|zr,0|Dr,Dr|zr,0|Br,0|Lr,Br|Rr,0,Dr|Rr,Lr|zr,Br|zr,0|Dr,Br|Ur,Br|Rr,0,Dr|Rr,Lr|Ur,Lr|Ur,0|Rr,0|Rr,Lr|zr,0|Br,Dr|Ur];class Gr{constructor(t){this.keys=[];const e=[],s=[],i=[];for(let n=0,r=56;n<56;++n,r-=8){r+=r<-5?65:r<-3?31:r<-1?63:27===r?35:0;const s=7&r;e[n]=0!==(t[r>>>3]&1<>>10,this.keys[a]|=(4032&e)>>>6,++a,this.keys[a]=(258048&t)<<12,this.keys[a]|=(63&t)<<16,this.keys[a]|=(258048&e)>>>4,this.keys[a]|=63&e,++a}}enc8(t){const e=t.slice();let s,i,n,r=0;s=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++],i=e[r++]<<24|e[r++]<<16|e[r++]<<8|e[r++],n=252645135&(s>>>4^i),i^=n,s^=n<<4,n=65535&(s>>>16^i),i^=n,s^=n<<16,n=858993459&(i>>>2^s),s^=n,i^=n<<2,n=16711935&(i>>>8^s),s^=n,i^=n<<8,i=i<<1|i>>>31&1,n=2863311530&(s^i),s^=n,i^=n,s=s<<1|s>>>31&1;for(let a=0,o=0;a<8;++a){n=i<<28|i>>>4,n^=this.keys[o++];let t=Xr[63&n];t|=Hr[n>>>8&63],t|=Pr[n>>>16&63],t|=Ir[n>>>24&63],n=i^this.keys[o++],t|=Or[63&n],t|=Kr[n>>>8&63],t|=Vr[n>>>16&63],t|=Nr[n>>>24&63],s^=t,n=s<<28|s>>>4,n^=this.keys[o++],t=Xr[63&n],t|=Hr[n>>>8&63],t|=Pr[n>>>16&63],t|=Ir[n>>>24&63],n=s^this.keys[o++],t|=Or[63&n],t|=Kr[n>>>8&63],t|=Vr[n>>>16&63],t|=Nr[n>>>24&63],i^=t}for(i=i<<31|i>>>1,n=2863311530&(s^i),s^=n,i^=n,s=s<<31|s>>>1,n=16711935&(s>>>8^i),i^=n,s^=n<<8,n=858993459&(s>>>2^i),i^=n,s^=n<<2,n=65535&(i>>>16^s),s^=n,i^=n<<16,n=252645135&(i>>>4^s),s^=n,i^=n<<4,n=[i,s],r=0;r<8;r++)e[r]=(n[r>>>2]>>>8*(3-r%4))%256,e[r]<0&&(e[r]+=256);return e}encrypt(t){return this.enc8(t.slice(0,8)).concat(this.enc8(t.slice(8,16)))}}var Wr={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang1:114,Lang2:113,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};const Yr=0,qr=1,jr=2,Zr=5,Jr=7,$r=-260,ta=-32,ea=-223,sa=-224,ia=-239,na=-258,ra=-307,aa=-308,oa=-309,ha=-312,la=-313,ca=-256,da=1464686180,_a=3231835598;class ua{constructor(){this._lines=0}decodeRect(t,e,s,i,n,r,a){if(0===s||0===i)return!0;0===this._lines&&(this._lines=i);const o=s*(8==a?1:4);if(n.rQwait("RAW",o))return!1;const h=e+(i-this._lines),l=Math.min(this._lines,Math.floor(n.rQlen/o)),c=s*l;let d=n.rQ,_=n.rQi;if(8==a){const t=new Uint8Array(4*c);for(let e=0;e>0&3)/3,t[4*e+1]=255*(d[_+e]>>2&3)/3,t[4*e+2]=255*(d[_+e]>>4&3)/3,t[4*e+3]=255;d=t,_=0}for(let u=0;u0)}}class fa{decodeRect(t,e,s,i,n,r,a){if(n.rQwait("COPYRECT",4))return!1;let o=n.rQshift16(),h=n.rQshift16();return 0===s||0===i||r.copyImage(o,h,t,e,s,i),!0}}class pa{constructor(){this._subrects=0}decodeRect(t,e,s,i,n,r,a){if(0===this._subrects){if(n.rQwait("RRE",8))return!1;this._subrects=n.rQshift32();let a=n.rQshiftBytes(4);r.fillRect(t,e,s,i,a)}for(;this._subrects>0;){if(n.rQwait("RRE",12))return!1;let s=n.rQshiftBytes(4),i=n.rQshift16(),a=n.rQshift16(),o=n.rQshift16(),h=n.rQshift16();r.fillRect(t+i,e+a,o,h,s),this._subrects--}return!0}}class ga{constructor(){this._tiles=0,this._lastsubencoding=0,this._tileBuffer=new Uint8Array(1024)}decodeRect(t,e,s,i,n,a,o){for(0===this._tiles&&(this._tilesX=Math.ceil(s/16),this._tilesY=Math.ceil(i/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){let o=1;if(n.rQwait("HEXTILE",o))return!1;let h=n.rQ,l=n.rQi,c=h[l];if(c>30)throw new Error("Illegal hextile subencoding (subencoding: "+c+")");const d=this._totalTiles-this._tiles,_=t+16*(d%this._tilesX),u=e+16*Math.floor(d/this._tilesX),f=Math.min(16,t+s-_),p=Math.min(16,e+i-u);if(1&c)o+=f*p*4;else if(2&c&&(o+=4),4&c&&(o+=4),8&c){if(o++,n.rQwait("HEXTILE",o))return!1;let t=h[l+o-1];o+=16&c?6*t:2*t}if(n.rQwait("HEXTILE",o))return!1;if(l++,0===c)1&this._lastsubencoding?r(" Ignoring blank after RAW"):a.fillRect(_,u,f,p,this._background);else if(1&c){let t=f*p;for(let e=0;e>4,i=15&e,n=h[l];l++;const r=1+(n>>4),a=1+(15&n);this._subTile(s,i,r,a,t)}}this._finishTile(a)}n.rQi=l,this._lastsubencoding=c,this._tiles--}return!0}_startTile(t,e,s,i,n){this._tileX=t,this._tileY=e,this._tileW=s,this._tileH=i;const r=n[0],a=n[1],o=n[2],h=this._tileBuffer;for(let l=0;l>t&1&&(this._zlibs[t].reset(),a("Reset zlib stream "+t));this._ctl=this._ctl>>4}let h;if(8===this._ctl)h=this._fillRect(t,e,s,i,n,r,o);else if(9===this._ctl)h=this._jpegRect(t,e,s,i,n,r,o);else if(10===this._ctl)h=this._pngRect(t,e,s,i,n,r,o);else{if(0!=(8&this._ctl))throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");h=this._basicRect(this._ctl,t,e,s,i,n,r,o)}return h&&(this._ctl=null),h}_fillRect(t,e,s,i,n,r,a){if(n.rQwait("TIGHT",3))return!1;const o=n.rQi,h=n.rQ;return r.fillRect(t,e,s,i,[h[o],h[o+1],h[o+2]],!1),n.rQskipBytes(3),!0}_jpegRect(t,e,s,i,n,r,a){let o=this._readData(n);return null!==o&&(r.imageRect(t,e,s,i,"image/jpeg",o),!0)}_pngRect(t,e,s,i,n,r,a){throw new Error("PNG received in standard Tight rect")}_basicRect(t,e,s,i,n,r,a,o){if(null===this._filter)if(4&t){if(r.rQwait("TIGHT",1))return!1;this._filter=r.rQshift8()}else this._filter=0;let h,l=3&t;switch(this._filter){case 0:h=this._copyFilter(l,e,s,i,n,r,a,o);break;case 1:h=this._paletteFilter(l,e,s,i,n,r,a,o);break;case 2:h=this._gradientFilter(l,e,s,i,n,r,a,o);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return h&&(this._filter=null),h}_copyFilter(t,e,s,i,n,r,a,o){const h=i*n*3;let l;if(0===h)return!0;if(h<12){if(r.rQwait("TIGHT",h))return!1;l=r.rQshiftBytes(h)}else{if(l=this._readData(r),null===l)return!1;this._zlibs[t].setInput(l),l=this._zlibs[t].inflate(h),this._zlibs[t].setInput(null)}let c=new Uint8Array(i*n*4);for(let d=0,_=0;d=0;a--)t=4*(c*s+8*i+7-a),e=3*(n[c*h+i]>>a&1),o[t]=r[e],o[t+1]=r[e+1],o[t+2]=r[e+2],o[t+3]=255;for(let a=7;a>=8-s%8;a--)t=4*(c*s+8*i+7-a),e=3*(n[c*h+i]>>a&1),o[t]=r[e],o[t+1]=r[e+1],o[t+2]=r[e+2],o[t+3]=255}a.blitImage(t,e,s,i,o,0,!1)}_paletteRect(t,e,s,i,n,r,a){const o=this._getScratchBuffer(s*i*4),h=s*i*4;for(let l=0,c=0;le.call(this,t))),!t.defaultPrevented)}}{constructor(t,e,s){if(!t)throw new Error("Must specify target");if(!e)throw new Error("Must specify URL, WebSocket or RTCDataChannel");super(),this._target=t,"string"===typeof e?this._url=e:(this._url=null,this._rawChannel=e),s=s||{},this._rfbCredentials=s.credentials||{},this._shared=!("shared"in s)||!!s.shared,this._repeaterID=s.repeaterID||"",this._wsProtocols=s.wsProtocols||[],this._rfbConnectionState="",this._rfbInitState="",this._rfbAuthScheme=-1,this._rfbCleanDisconnect=!0,this._rfbVersion=0,this._rfbMaxVersion=3.8,this._rfbTightVNC=!1,this._rfbVeNCryptState=0,this._rfbXvpVer=0,this._fbWidth=0,this._fbHeight=0,this._fbName="",this._capabilities={power:!1},this._supportsFence=!1,this._supportsContinuousUpdates=!1,this._enabledContinuousUpdates=!1,this._supportsSetDesktopSize=!1,this._screenID=0,this._screenFlags=0,this._qemuExtKeyEventSupported=!1,this._clipboardText=null,this._clipboardServerCapabilitiesActions={},this._clipboardServerCapabilitiesFormats={},this._sock=null,this._display=null,this._flushing=!1,this._keyboard=null,this._gestures=null,this._resizeObserver=null,this._disconnTimer=null,this._resizeTimeout=null,this._mouseMoveTimer=null,this._decoders={},this._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},this._mousePos={},this._mouseButtonMask=0,this._mouseLastMoveTime=0,this._viewportDragging=!1,this._viewportDragPos={},this._viewportHasMoved=!1,this._accumulatedWheelDeltaX=0,this._accumulatedWheelDeltaY=0,this._gestureLastTapTime=null,this._gestureFirstDoubleTapEv=null,this._gestureLastMagnitudeX=0,this._gestureLastMagnitudeY=0,this._eventHandlers={focusCanvas:this._focusCanvas.bind(this),handleResize:this._handleResize.bind(this),handleMouse:this._handleMouse.bind(this),handleWheel:this._handleWheel.bind(this),handleGesture:this._handleGesture.bind(this)},r(">> RFB.constructor"),this._screen=document.createElement("div"),this._screen.style.display="flex",this._screen.style.width="100%",this._screen.style.height="100%",this._screen.style.overflow="auto",this._screen.style.background="rgb(40, 40, 40)",this._canvas=document.createElement("canvas"),this._canvas.style.margin="auto",this._canvas.style.outline="none",this._canvas.width=0,this._canvas.height=0,this._canvas.tabIndex=-1,this._screen.appendChild(this._canvas),this._cursor=new kr,this._cursorImage=Sa.cursors.none,this._decoders[Yr]=new ua,this._decoders[qr]=new fa,this._decoders[jr]=new pa,this._decoders[Zr]=new ga,this._decoders[Jr]=new ma,this._decoders[$r]=new wa;try{this._display=new E(this._canvas)}catch(Qa){throw h("Display exception: "+Qa),Qa}this._display.onflush=this._onFlush.bind(this),this._keyboard=new gr(this._canvas),this._keyboard.onkeyevent=this._handleKeyEvent.bind(this),this._gestures=new br,this._sock=new Ar,this._sock.on("open",this._socketOpen.bind(this)),this._sock.on("close",this._socketClose.bind(this)),this._sock.on("message",this._handleMessage.bind(this)),this._sock.on("error",this._socketError.bind(this)),this._resizeObserver=new ResizeObserver(this._eventHandlers.handleResize),this._updateConnectionState("connecting"),r("<< RFB.constructor"),this.dragViewport=!1,this.focusOnClick=!0,this._viewOnly=!1,this._clipViewport=!1,this._scaleViewport=!1,this._resizeSession=!1,this._showDotCursor=!1,void 0!==s.showDotCursor&&(o("Specifying showDotCursor as a RFB constructor argument is deprecated"),this._showDotCursor=s.showDotCursor),this._qualityLevel=6,this._compressionLevel=2}get viewOnly(){return this._viewOnly}set viewOnly(t){this._viewOnly=t,"connecting"!==this._rfbConnectionState&&"connected"!==this._rfbConnectionState||(t?this._keyboard.ungrab():this._keyboard.grab())}get capabilities(){return this._capabilities}get touchButton(){return 0}set touchButton(t){o("Using old API!")}get clipViewport(){return this._clipViewport}set clipViewport(t){this._clipViewport=t,this._updateClip()}get scaleViewport(){return this._scaleViewport}set scaleViewport(t){this._scaleViewport=t,t&&this._clipViewport&&this._updateClip(),this._updateScale(),!t&&this._clipViewport&&this._updateClip()}get resizeSession(){return this._resizeSession}set resizeSession(t){this._resizeSession=t,t&&this._requestRemoteResize()}get showDotCursor(){return this._showDotCursor}set showDotCursor(t){this._showDotCursor=t,this._refreshCursor()}get background(){return this._screen.style.background}set background(t){this._screen.style.background=t}get qualityLevel(){return this._qualityLevel}set qualityLevel(t){!Number.isInteger(t)||t<0||t>9?h("qualityLevel must be an integer between 0 and 9"):this._qualityLevel!==t&&(this._qualityLevel=t,"connected"===this._rfbConnectionState&&this._sendEncodings())}get compressionLevel(){return this._compressionLevel}set compressionLevel(t){!Number.isInteger(t)||t<0||t>9?h("compressionLevel must be an integer between 0 and 9"):this._compressionLevel!==t&&(this._compressionLevel=t,"connected"===this._rfbConnectionState&&this._sendEncodings())}disconnect(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}sendCredentials(t){this._rfbCredentials=t,setTimeout(this._initMsg.bind(this),0)}sendCtrlAltDel(){"connected"!==this._rfbConnectionState||this._viewOnly||(a("Sending Ctrl-Alt-Del"),this.sendKey(wi,"ControlLeft",!0),this.sendKey(Ci,"AltLeft",!0),this.sendKey(ke,"Delete",!0),this.sendKey(ke,"Delete",!1),this.sendKey(Ci,"AltLeft",!1),this.sendKey(wi,"ControlLeft",!1))}machineShutdown(){this._xvpOp(1,2)}machineReboot(){this._xvpOp(1,3)}machineReset(){this._xvpOp(1,4)}sendKey(t,e,s){if("connected"!==this._rfbConnectionState||this._viewOnly)return;if(void 0===s)return this.sendKey(t,e,!0),void this.sendKey(t,e,!1);const i=Wr[e];if(this._qemuExtKeyEventSupported&&i)a("Sending key ("+(s?"down":"up")+"): keysym "+(t=t||0)+", scancode "+i),Sa.messages.QEMUExtendedKeyEvent(this._sock,t,s,i);else{if(!t)return;a("Sending keysym ("+(s?"down":"up")+"): "+t),Sa.messages.keyEvent(this._sock,t,s?1:0)}}focus(){this._canvas.focus()}blur(){this._canvas.blur()}clipboardPasteFrom(t){if("connected"===this._rfbConnectionState&&!this._viewOnly)if(this._clipboardServerCapabilitiesFormats[1]&&this._clipboardServerCapabilitiesActions[134217728])this._clipboardText=t,Sa.messages.extendedClipboardNotify(this._sock,[1]);else{let e=new Uint8Array(t.length);for(let s=0;s> RFB.connect"),this._url)a(`connecting to ${this._url}`),this._sock.open(this._url,this._wsProtocols);else{if(a(`attaching ${this._rawChannel} to Websock`),this._sock.attach(this._rawChannel),"closed"===this._sock.readyState)throw Error("Cannot use already closed WebSocket/RTCDataChannel");"open"===this._sock.readyState&&this._socketOpen()}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),this._resizeObserver.observe(this._screen),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("touchstart",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),r("<< RFB.connect")}_disconnect(){r(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),this._resizeObserver.disconnect(),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(Ur){if("NotFoundError"!==Ur.name)throw Ur}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),r("<< RFB.disconnect")}_socketOpen(){"connecting"===this._rfbConnectionState&&""===this._rfbInitState?(this._rfbInitState="ProtocolVersion",r("Starting VNC handshake")):this._fail("Unexpected server connection while "+this._rfbConnectionState)}_socketClose(t){r("WebSocket on-close event");let e="";switch(t.code&&(e="(code: "+t.code,t.reason&&(e+=", reason: "+t.reason),e+=")"),this._rfbConnectionState){case"connecting":this._fail("Connection closed "+e);break;case"connected":this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected");break;case"disconnecting":this._updateConnectionState("disconnected");break;case"disconnected":this._fail("Unexpected server disconnect when already disconnected "+e);break;default:this._fail("Unexpected server disconnect before connecting "+e)}this._sock.off("close"),this._rawChannel=null}_socketError(t){o("WebSocket on-error event")}_focusCanvas(t){this.focusOnClick&&this.focus()}_setDesktopName(t){this._fbName=t,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}_handleResize(){window.requestAnimationFrame((()=>{this._updateClip(),this._updateScale()})),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}_updateClip(){const t=this._display.clipViewport;let e=this._clipViewport;if(this._scaleViewport&&(e=!1),t!==e&&(this._display.clipViewport=e),e){const t=this._screenSize();this._display.viewportChangeSize(t.w,t.h),this._fixScrollbars()}}_updateScale(){if(this._scaleViewport){const t=this._screenSize();this._display.autoscale(t.w,t.h)}else this._display.scale=1;this._fixScrollbars()}_requestRemoteResize(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;const t=this._screenSize();Sa.messages.setDesktopSize(this._sock,Math.floor(t.w),Math.floor(t.h),this._screenID,this._screenFlags),r("Requested new desktop size: "+t.w+"x"+t.h)}_screenSize(){let t=this._screen.getBoundingClientRect();return{w:t.width,h:t.height}}_fixScrollbars(){const t=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=t}_updateConnectionState(t){const e=this._rfbConnectionState;if(t!==e)if("disconnected"!==e){switch(t){case"connected":if("connecting"!==e)return void h("Bad transition to connected state, previous connection state: "+e);break;case"disconnected":if("disconnecting"!==e)return void h("Bad transition to disconnected state, previous connection state: "+e);break;case"connecting":if(""!==e)return void h("Bad transition to connecting state, previous connection state: "+e);break;case"disconnecting":if("connected"!==e&&"connecting"!==e)return void h("Bad transition to disconnecting state, previous connection state: "+e);break;default:return void h("Unknown connection state: "+t)}switch(this._rfbConnectionState=t,r("New state '"+t+"', was '"+e+"'."),this._disconnTimer&&"disconnecting"!==t&&(r("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),t){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout((()=>{h("Disconnection timed out."),this._updateConnectionState("disconnected")}),3e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}))}}else h("Tried changing state of a disconnected RFB object");else r("Already in state '"+t+"', ignoring")}_fail(t){switch(this._rfbConnectionState){case"disconnecting":h("Failed when disconnecting: "+t);break;case"connected":h("Failed while connected: "+t);break;case"connecting":h("Failed when connecting: "+t);break;default:h("RFB failure: "+t)}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}_setCapability(t,e){this._capabilities[t]=e,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}_handleMessage(){if(0!==this._sock.rQlen)switch(this._rfbConnectionState){case"disconnected":h("Got data while disconnected");break;case"connected":for(;!this._flushing&&this._normalMsg()&&0!==this._sock.rQlen;);break;default:this._initMsg()}else o("handleMessage called on an empty receive queue")}_handleKeyEvent(t,e,s){this.sendKey(t,e,s)}_handleMouse(t){if("click"===t.type&&t.target!==this._canvas)return;if(t.stopPropagation(),t.preventDefault(),"click"===t.type||"contextmenu"===t.type)return;let e=b(t.clientX,t.clientY,this._canvas);switch(t.type){case"mousedown":!function(t){if(t.setCapture)t.setCapture(),document.captureElement=t;else{Q();let e=document.getElementById("noVNC_mouse_capture_elem");null===e&&(e=document.createElement("div"),e.id="noVNC_mouse_capture_elem",e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1e4,e.style.display="none",document.body.appendChild(e),e.addEventListener("contextmenu",C),e.addEventListener("mousemove",C),e.addEventListener("mouseup",C)),document.captureElement=t,S.observe(t,{attributes:!0}),x(),e.style.display="",window.addEventListener("mousemove",C),window.addEventListener("mouseup",C)}}(this._canvas),this._handleMouseButton(e.x,e.y,!0,1<_||Math.abs(i)>_)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:t,y:e},this._display.viewportChangePos(s,i))}else if(this._mousePos={x:t,y:e},null==this._mouseMoveTimer){const s=Date.now()-this._mouseLastMoveTime;s>17?(this._sendMouse(t,e,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout((()=>{this._handleDelayedMouseMove()}),17-s)}}_handleDelayedMouseMove(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}_sendMouse(t,e,s){"connected"===this._rfbConnectionState&&(this._viewOnly||Sa.messages.pointerEvent(this._sock,this._display.absX(t),this._display.absY(e),s))}_handleWheel(t){if("connected"!==this._rfbConnectionState)return;if(this._viewOnly)return;t.stopPropagation(),t.preventDefault();let e=b(t.clientX,t.clientY,this._canvas),s=t.deltaX,i=t.deltaY;0!==t.deltaMode&&(s*=19,i*=19),this._accumulatedWheelDeltaX+=s,this._accumulatedWheelDeltaY+=i,Math.abs(this._accumulatedWheelDeltaX)>=50&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(e.x,e.y,!0,32),this._handleMouseButton(e.x,e.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(e.x,e.y,!0,64),this._handleMouseButton(e.x,e.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=50&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(e.x,e.y,!0,8),this._handleMouseButton(e.x,e.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(e.x,e.y,!0,16),this._handleMouseButton(e.x,e.y,!1,16)),this._accumulatedWheelDeltaY=0)}_fakeMouseMove(t,e,s){this._handleMouseMove(e,s),this._cursor.move(t.detail.clientX,t.detail.clientY)}_handleTapEvent(t,e){let s=b(t.detail.clientX,t.detail.clientY,this._canvas);if(null!==this._gestureLastTapTime&&Date.now()-this._gestureLastTapTime<1e3&&this._gestureFirstDoubleTapEv.detail.type===t.detail.type){let e=this._gestureFirstDoubleTapEv.detail.clientX-t.detail.clientX,i=this._gestureFirstDoubleTapEv.detail.clientY-t.detail.clientY;Math.hypot(e,i)<50?s=b(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=t}else this._gestureFirstDoubleTapEv=t;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,s.x,s.y),this._handleMouseButton(s.x,s.y,!0,e),this._handleMouseButton(s.x,s.y,!1,e)}_handleGesture(t){let e,s=b(t.detail.clientX,t.detail.clientY,this._canvas);switch(t.type){case"gesturestart":switch(t.detail.type){case"onetap":this._handleTapEvent(t,1);break;case"twotap":this._handleTapEvent(t,4);break;case"threetap":this._handleTapEvent(t,2);break;case"drag":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!0,1);break;case"longpress":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=t.detail.magnitudeX,this._gestureLastMagnitudeY=t.detail.magnitudeY,this._fakeMouseMove(t,s.x,s.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(t.detail.magnitudeX,t.detail.magnitudeY),this._fakeMouseMove(t,s.x,s.y)}break;case"gesturemove":switch(t.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(t,s.x,s.y);break;case"twodrag":for(this._fakeMouseMove(t,s.x,s.y);t.detail.magnitudeY-this._gestureLastMagnitudeY>ba;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeY+=ba;for(;t.detail.magnitudeY-this._gestureLastMagnitudeY<-50;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeY-=ba;for(;t.detail.magnitudeX-this._gestureLastMagnitudeX>ba;)this._handleMouseButton(s.x,s.y,!0,32),this._handleMouseButton(s.x,s.y,!1,32),this._gestureLastMagnitudeX+=ba;for(;t.detail.magnitudeX-this._gestureLastMagnitudeX<-50;)this._handleMouseButton(s.x,s.y,!0,64),this._handleMouseButton(s.x,s.y,!1,64),this._gestureLastMagnitudeX-=ba;break;case"pinch":if(this._fakeMouseMove(t,s.x,s.y),e=Math.hypot(t.detail.magnitudeX,t.detail.magnitudeY),Math.abs(e-this._gestureLastMagnitudeX)>75){for(this._handleKeyEvent(wi,"ControlLeft",!0);e-this._gestureLastMagnitudeX>75;)this._handleMouseButton(s.x,s.y,!0,8),this._handleMouseButton(s.x,s.y,!1,8),this._gestureLastMagnitudeX+=75;for(;e-this._gestureLastMagnitudeX<-75;)this._handleMouseButton(s.x,s.y,!0,16),this._handleMouseButton(s.x,s.y,!1,16),this._gestureLastMagnitudeX-=75}this._handleKeyEvent(wi,"ControlLeft",!1)}break;case"gestureend":switch(t.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,1);break;case"longpress":this._fakeMouseMove(t,s.x,s.y),this._handleMouseButton(s.x,s.y,!1,4)}}}_negotiateProtocolVersion(){if(this._sock.rQwait("version",12))return!1;const t=this._sock.rQshiftStr(12).substr(4,7);a("Server ProtocolVersion: "+t);let e=0;switch(t){case"000.000":e=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+t)}if(e){let t="ID:"+this._repeaterID;for(;t.length<250;)t+="\0";return this._sock.sendString(t),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);const s="00"+parseInt(this._rfbVersion,10)+".00"+10*this._rfbVersion%10;this._sock.sendString("RFB "+s+"\n"),r("Sent ProtocolVersion: "+s),this._rfbInitState="Security"}_negotiateSecurity(){if(this._rfbVersion>=3.7){const t=this._sock.rQshift8();if(this._sock.rQwait("security type",t,1))return!1;if(0===t)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();const e=this._sock.rQshiftBytes(t);if(r("Server security types: "+e),e.includes(1))this._rfbAuthScheme=1;else if(e.includes(22))this._rfbAuthScheme=22;else if(e.includes(16))this._rfbAuthScheme=16;else if(e.includes(2))this._rfbAuthScheme=2;else{if(!e.includes(19))return this._fail("Unsupported security types (types: "+e+")");this._rfbAuthScheme=19}this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),0==this._rfbAuthScheme)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",r("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}_handleSecurityReason(){if(this._sock.rQwait("reason length",4))return!1;const t=this._sock.rQshift32();let e="";if(t>0){if(this._sock.rQwait("reason",t,4))return!1;e=this._sock.rQshiftStr(t)}return""!==e?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:e}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+e+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}_negotiateXvpAuth(){if(void 0===this._rfbCredentials.username||void 0===this._rfbCredentials.password||void 0===this._rfbCredentials.target)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;const t=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(t),this._rfbAuthScheme=2,this._negotiateAuthentication()}_negotiateVeNCryptAuth(){if(0==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt version",2))return!1;const t=this._sock.rQshift8(),e=this._sock.rQshift8();if(0!=t||2!=e)return this._fail("Unsupported VeNCrypt version "+t+"."+e);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(1==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt ack",1))return!1;const t=this._sock.rQshift8();if(0!=t)return this._fail("VeNCrypt failure "+t);this._rfbVeNCryptState=2}if(2==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;const t=this._sock.rQshift8();if(t<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=t,this._rfbVeNCryptState=3}if(3==this._rfbVeNCryptState){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;const t=[];for(let e=0;e>24&255,t.length>>16&255,t.length>>8&255,255&t.length]),this._sock.send([e.length>>24&255,e.length>>16&255,e.length>>8&255,255&e.length]),this._sock.sendString(t),this._sock.sendString(e),this._rfbInitState="SecurityResult",!0}}_negotiateStdVNCAuth(){if(this._sock.rQwait("auth challenge",16))return!1;if(void 0===this._rfbCredentials.password)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["password"]}})),!1;const t=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),e=Sa.genDES(this._rfbCredentials.password,t);return this._sock.send(e),this._rfbInitState="SecurityResult",!0}_negotiateTightUnixAuth(){return void 0===this._rfbCredentials.username||void 0===this._rfbCredentials.password?(this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1):(this._sock.send([0,0,0,this._rfbCredentials.username.length]),this._sock.send([0,0,0,this._rfbCredentials.password.length]),this._sock.sendString(this._rfbCredentials.username),this._sock.sendString(this._rfbCredentials.password),this._rfbInitState="SecurityResult",!0)}_negotiateTightTunnels(t){const e={vendor:"TGHT",signature:"NOTUNNEL"},s={};for(let i=0;i0&&this._sock.rQwait("tunnel capabilities",16*t,4))return!1;if(this._rfbTightVNC=!0,t>0)return this._negotiateTightTunnels(t),!1}if(this._sock.rQwait("sub auth count",4))return!1;const t=this._sock.rQshift32();if(0===t)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*t,4))return!1;const e={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},s=[];for(let i=0;i=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}_handleSecurityResult(){if(this._sock.rQwait("VNC auth response ",4))return!1;const t=this._sock.rQshift32();return 0===t?(this._rfbInitState="ClientInitialisation",r("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=t,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:t}})),this._fail("Security handshake failed"))}_negotiateServerInit(){if(this._sock.rQwait("server initialization",24))return!1;const t=this._sock.rQshift16(),e=this._sock.rQshift16(),s=this._sock.rQshift8(),i=this._sock.rQshift8(),n=this._sock.rQshift8(),r=this._sock.rQshift8(),h=this._sock.rQshift16(),c=this._sock.rQshift16(),d=this._sock.rQshift16(),_=this._sock.rQshift8(),u=this._sock.rQshift8(),f=this._sock.rQshift8();this._sock.rQskipBytes(3);const p=this._sock.rQshift32();if(this._sock.rQwait("server init name",p,24))return!1;let g=this._sock.rQshiftStr(p);if(g=l(g,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+p))return!1;const t=this._sock.rQshift16(),e=this._sock.rQshift16(),s=this._sock.rQshift16();this._sock.rQskipBytes(2);const i=16*(t+e+s);if(this._sock.rQwait("TightVNC extended server init header",i,32+p))return!1;this._sock.rQskipBytes(16*t),this._sock.rQskipBytes(16*e),this._sock.rQskipBytes(16*s)}return a("Screen: "+t+"x"+e+", bpp: "+s+", depth: "+i+", bigEndian: "+n+", trueColor: "+r+", redMax: "+h+", greenMax: "+c+", blueMax: "+d+", redShift: "+_+", greenShift: "+u+", blueShift: "+f),this._setDesktopName(g),this._resize(t,e),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,"Intel(r) AMT KVM"===this._fbName&&(o("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),Sa.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),Sa.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}_sendEncodings(){const t=[];t.push(qr),24==this._fbDepth&&(t.push(Jr),t.push($r),t.push(Zr),t.push(jr)),t.push(Yr),t.push(ta+this._qualityLevel),t.push(ca+this._compressionLevel),t.push(ea),t.push(sa),t.push(na),t.push(aa),t.push(oa),t.push(ha),t.push(la),t.push(ra),t.push(_a),24==this._fbDepth&&(t.push(da),t.push(ia)),Sa.messages.clientEncodings(this._sock,t)}_initMsg(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}_handleSetColourMapMsg(){return r("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}_handleServerCutText(){if(r("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);let t=this._sock.rQshift32();if(t=i(t),this._sock.rQwait("ServerCutText content",Math.abs(t),8))return!1;if(t>=0){const e=this._sock.rQshiftStr(t);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:e}}))}else{t=Math.abs(t);const e=this._sock.rQshift32();let s=65535&e,i=4278190080&e;if(!!(i&va)){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(let e=0;e<=15;e++){let t=1<0&&"\0"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),n=n.replace("\r\n","\n"),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:n}}))}}}}return!0}_handleServerFenceMsg(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);let t=this._sock.rQshift32(),e=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",e,9))return!1;e>64&&(o("Bad payload length ("+e+") in fence response"),e=64);const s=this._sock.rQshiftStr(e);return this._supportsFence=!0,t&1<<31?(t&=3,Sa.messages.clientFence(this._sock,t,s),!0):this._fail("Unexpected fence response")}_handleXvpMsg(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);const t=this._sock.rQshift8(),e=this._sock.rQshift8();switch(e){case 0:h("XVP Operation Failed");break;case 1:this._rfbXvpVer=t,a("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+e+")")}return!0}_normalMsg(){let t,e,s;switch(t=this._FBU.rects>0?0:this._sock.rQshift8(),t){case 0:return s=this._framebufferUpdate(),s&&!this._enabledContinuousUpdates&&Sa.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),s;case 1:return this._handleSetColourMapMsg();case 2:return r("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return e=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,e&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),a("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+t+")"),r("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}_onFlush(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}_framebufferUpdate(){if(0===this._FBU.rects){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(null===this._FBU.encoding){if(this._sock.rQwait("rect header",12))return!1;const t=this._sock.rQshiftBytes(12);this._FBU.x=(t[0]<<8)+t[1],this._FBU.y=(t[2]<<8)+t[3],this._FBU.width=(t[4]<<8)+t[5],this._FBU.height=(t[6]<<8)+t[7],this._FBU.encoding=parseInt((t[8]<<24)+(t[9]<<16)+(t[10]<<8)+t[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}_handleRect(){switch(this._FBU.encoding){case sa:return this._FBU.rects=1,!0;case da:return this._handleVMwareCursor();case ia:return this._handleCursor();case na:return this._qemuExtKeyEventSupported=!0,!0;case ra:return this._handleDesktopName();case ea:return this._resize(this._FBU.width,this._FBU.height),!0;case aa:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}_handleVMwareCursor(){const t=this._FBU.x,e=this._FBU.y,s=this._FBU.width,i=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;const n=this._sock.rQshift8();let r;this._sock.rQshift8();if(0==n){const t=-256;if(r=new Array(s*i*4),this._sock.rQwait("VMware cursor classic encoding",s*i*4*2,2))return!1;let e=new Array(s*i);for(let r=0;r>8&255,s=t>>16&255,i=t>>24&255;r[4*a]=e,r[4*a+1]=s,r[4*a+2]=i,r[4*a+3]=255}else(e[a]&t)==t?0==n[a]?(r[4*a]=0,r[4*a+1]=0,r[4*a+2]=0,r[4*a+3]=0):(n[a],r[4*a]=0,r[4*a+1]=0,r[4*a+2]=0,r[4*a+3]=255):(r[4*a]=0,r[4*a+1]=0,r[4*a+2]=0,r[4*a+3]=255)}else{if(1!=n)return o("The given cursor type is not supported: "+n+" given."),!1;if(this._sock.rQwait("VMware cursor alpha encoding",s*i*4,2))return!1;r=new Array(s*i*4);for(let t=0;t>24&255,r[4*t+1]=e>>16&255,r[4*t+2]=e>>8&255,r[4*t+3]=255&e}}return this._updateCursor(r,t,e,s,i),!0}_handleCursor(){const t=this._FBU.x,e=this._FBU.y,s=this._FBU.width,i=this._FBU.height,n=s*i*4,r=Math.ceil(s/8)*i;let a=n+r;if(this._sock.rQwait("cursor encoding",a))return!1;const o=this._sock.rQshiftBytes(n),h=this._sock.rQshiftBytes(r);let l=new Uint8Array(s*i*4),c=0;for(let d=0;dt.charCodeAt(0)));return new Gr(s).encrypt(e)}}Sa.messages={keyEvent(t,e,s){const i=t._sQ,n=t._sQlen;i[n]=4,i[n+1]=s,i[n+2]=0,i[n+3]=0,i[n+4]=e>>24,i[n+5]=e>>16,i[n+6]=e>>8,i[n+7]=e,t._sQlen+=8,t.flush()},QEMUExtendedKeyEvent(t,e,s,i){const n=t._sQ,r=t._sQlen;n[r]=255,n[r+1]=0,n[r+2]=s>>8,n[r+3]=s,n[r+4]=e>>24,n[r+5]=e>>16,n[r+6]=e>>8,n[r+7]=e;const a=function(t){const e=255&i;return 224===i>>8&&e<127?128|e:t}(i);n[r+8]=a>>24,n[r+9]=a>>16,n[r+10]=a>>8,n[r+11]=a,t._sQlen+=12,t.flush()},pointerEvent(t,e,s,i){const n=t._sQ,r=t._sQlen;n[r]=5,n[r+1]=i,n[r+2]=e>>8,n[r+3]=e,n[r+4]=s>>8,n[r+5]=s,t._sQlen+=6,t.flush()},_buildExtendedClipboardFlags(t,e){let s=new Uint8Array(4),i=0,n=0;for(let r=0;r>24,s[1]=0,s[2]=0,s[3]=i,s},extendedClipboardProvide(t,e,s){let i=new ue,n=[];for(let o=0;o>24&255,t.length>>16&255,t.length>>8&255,255&t.length);for(let e=0;eparseInt(t))),i.sort(((t,e)=>t-e)),n.set(Sa.messages._buildExtendedClipboardFlags(e,[]));let r=4;for(let a=0;a>24,n[r+1]=s[i[a]]>>16,n[r+2]=s[i[a]]>>8,n[r+3]=s[i[a]]>>0,r+=4,n[3]|=1<>>0:e.length,i[n+4]=r>>24,i[n+5]=r>>16,i[n+6]=r>>8,i[n+7]=r,t._sQlen+=8;let a=0,o=e.length;for(;o>0;){let s=Math.min(o,t._sQbufferSize-t._sQlen);for(let n=0;n>8,r[a+3]=e,r[a+4]=s>>8,r[a+5]=s,r[a+6]=1,r[a+7]=0,r[a+8]=i>>24,r[a+9]=i>>16,r[a+10]=i>>8,r[a+11]=i,r[a+12]=0,r[a+13]=0,r[a+14]=0,r[a+15]=0,r[a+16]=e>>8,r[a+17]=e,r[a+18]=s>>8,r[a+19]=s,r[a+20]=n>>24,r[a+21]=n>>16,r[a+22]=n>>8,r[a+23]=n,t._sQlen+=24,t.flush()},clientFence(t,e,s){const i=t._sQ,n=t._sQlen;i[n]=248,i[n+1]=0,i[n+2]=0,i[n+3]=0,i[n+4]=e>>24,i[n+5]=e>>16,i[n+6]=e>>8,i[n+7]=e;const r=s.length;i[n+8]=r;for(let a=0;a>8,a[o+3]=s,a[o+4]=i>>8,a[o+5]=i,a[o+6]=n>>8,a[o+7]=n,a[o+8]=r>>8,a[o+9]=r,t._sQlen+=10,t.flush()},pixelFormat(t,e,s){const i=t._sQ,n=t._sQlen;let r;r=e>16?32:e>8?16:8;const a=Math.floor(e/3);i[n]=0,i[n+1]=0,i[n+2]=0,i[n+3]=0,i[n+4]=r,i[n+5]=e,i[n+6]=0,i[n+7]=s?1:0,i[n+8]=0,i[n+9]=(1<>8,s[i+3]=e.length;let n=i+4;for(let r=0;r>24,s[n+1]=t>>16,s[n+2]=t>>8,s[n+3]=t,n+=4}t._sQlen+=n-i,t.flush()},fbUpdateRequest(t,e,s,i,n,r){const a=t._sQ,o=t._sQlen;"undefined"===typeof s&&(s=0),"undefined"===typeof i&&(i=0),a[o]=3,a[o+1]=e?1:0,a[o+2]=s>>8&255,a[o+3]=255&s,a[o+4]=i>>8&255,a[o+5]=255&i,a[o+6]=n>>8&255,a[o+7]=255&n,a[o+8]=r>>8&255,a[o+9]=255&r,t._sQlen+=10,t.flush()},xvpOp(t,e,s){const i=t._sQ,n=t._sQlen;i[n]=250,i[n+1]=0,i[n+2]=e,i[n+3]=s,t._sQlen+=4,t.flush()}},Sa.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/665.f31a7a875323621f.js b/striker-ui/out/_next/static/chunks/665.f31a7a875323621f.js new file mode 100644 index 00000000..36ceee72 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/665.f31a7a875323621f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[665],{4665:function(e,r,n){n.r(r);var t=n(5893),c=n(7294),u=n(4460);var o=function(e){var r=(0,c.useRef)(null),n=e.rfb,o=e.url,i=e.viewOnly,s=e.focusOnClick,l=e.clipViewport,a=e.dragViewport,v=e.scaleViewport,d=e.resizeSession,f=e.showDotCursor,m=e.background,p=e.qualityLevel,w=e.compressionLevel;(0,c.useEffect)((function(){return r.current?(n.current||(r.current.innerHTML="",n.current=new u.Z(r.current,o),n.current.viewOnly=i,n.current.focusOnClick=s,n.current.clipViewport=l,n.current.dragViewport=a,n.current.resizeSession=d,n.current.scaleViewport=v,n.current.showDotCursor=f,n.current.background=m,n.current.qualityLevel=p,n.current.compressionLevel=w),n.current?function(){n.current&&(n.current.disconnect(),n.current=void 0)}:void 0):function(){n.current&&(null===n||void 0===n||n.current.disconnect(),n.current=void 0)}}),[n]);return(0,t.jsx)("div",{style:{width:"100%",height:"75vh"},ref:r,onMouseEnter:function(){var e,r;document.activeElement&&(e=document.activeElement,null!=(r=HTMLElement)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](e):e instanceof r)&&document.activeElement.blur(),(null===n||void 0===n?void 0:n.current)&&n.current.focus()}})};r.default=(0,c.memo)(o)}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js b/striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js deleted file mode 100644 index 107f4392..00000000 --- a/striker-ui/out/_next/static/chunks/97.4025a661f871d4b5b823.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[97],{7097:function(e,r,n){n.r(r);var t=n(7294),c=n(8753),u=n(5893),o=function(e){var r=(0,t.useRef)(null),n=e.rfb,o=e.url,i=e.viewOnly,s=e.focusOnClick,l=e.clipViewport,f=e.dragViewport,v=e.scaleViewport,a=e.resizeSession,d=e.showDotCursor,w=e.background,p=e.qualityLevel,m=e.compressionLevel;(0,t.useEffect)((function(){return r.current?(n.current||(r.current.innerHTML="",n.current=new c.Z(r.current,o),n.current.viewOnly=i,n.current.focusOnClick=s,n.current.clipViewport=l,n.current.dragViewport=f,n.current.resizeSession=a,n.current.scaleViewport=v,n.current.showDotCursor=d,n.current.background=w,n.current.qualityLevel=p,n.current.compressionLevel=m),n.current?function(){n.current&&(n.current.disconnect(),n.current=void 0)}:void 0):function(){n.current&&(null===n||void 0===n||n.current.disconnect(),n.current=void 0)}}),[n]);return(0,u.jsx)("div",{style:{width:"100%",height:"75vh"},ref:r,onMouseEnter:function(){document.activeElement&&document.activeElement instanceof HTMLElement&&document.activeElement.blur(),null!==n&&void 0!==n&&n.current&&n.current.focus()}})};r.default=(0,t.memo)(o)}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/framework-5f4595e5518b5600.js b/striker-ui/out/_next/static/chunks/framework-5f4595e5518b5600.js new file mode 100644 index 00000000..4792da33 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/framework-5f4595e5518b5600.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[774],{4448:function(e,t,n){var r=n(7294),l=n(6086),a=n(3840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n