/*! For license information please see main.eeceaaf6.js.LICENSE.txt */
!function(){var e={4569:function(e,t,n){e.exports=n(8036)},3381:function(e,t,n){"use strict";var r=n(3589),o=n(7297),i=n(9301),a=n(9774),s=n(1804),u=n(9145),l=n(5411),c=n(6789),d=n(4531),f=n(6569),p=n(6261);e.exports=function(e){return new Promise((function(t,n){var h,m=e.data,v=e.headers,g=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete v["Content-Type"];var w=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(b+":"+_)}var E=s(e.baseURL,e.url);function x(){if(w){var r="getAllResponseHeaders"in w?u(w.getAllResponseHeaders()):null,i={data:g&&"text"!==g&&"json"!==g?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:r,config:e,request:w};o((function(e){t(e),y()}),(function(e){n(e),y()}),i),w=null}}if(w.open(e.method.toUpperCase(),a(E,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=x:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(x)},w.onabort=function(){w&&(n(new d("Request aborted",d.ECONNABORTED,e,w)),w=null)},w.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,w,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||c;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,r.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,w)),w=null},r.isStandardBrowserEnv()){var S=(e.withCredentials||l(E))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;S&&(v[e.xsrfHeaderName]=S)}"setRequestHeader"in w&&r.forEach(v,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete v[t]:w.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),g&&"json"!==g&&(w.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&w.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){w&&(n(!e||e&&e.type?new f:e),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null);var C=p(E);C&&-1===["http","https","file"].indexOf(C)?n(new d("Unsupported protocol "+C+":",d.ERR_BAD_REQUEST,e)):w.send(m)}))}},8036:function(e,t,n){"use strict";var r=n(3589),o=n(4049),i=n(3773),a=n(777);var s=function e(t){var n=new i(t),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(1709));s.Axios=i,s.CanceledError=n(6569),s.CancelToken=n(6857),s.isCancel=n(5517),s.VERSION=n(7600).version,s.toFormData=n(1397),s.AxiosError=n(4531),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(8089),s.isAxiosError=n(9580),e.exports=s,e.exports.default=s},6857:function(e,t,n){"use strict";var r=n(6569);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6569:function(e,t,n){"use strict";var r=n(4531);function o(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}n(3589).inherits(o,r,{__CANCEL__:!0}),e.exports=o},5517:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},3773:function(e,t,n){"use strict";var r=n(3589),o=n(9774),i=n(7470),a=n(2733),s=n(777),u=n(1804),l=n(7835),c=l.validators;function d(e){this.defaults=e,this.interceptors={request:new i,response:new i}}d.prototype.request=function(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!o){var d=[a,void 0];for(Array.prototype.unshift.apply(d,r),d=d.concat(u),i=Promise.resolve(t);d.length;)i=i.then(d.shift(),d.shift());return i}for(var f=t;r.length;){var p=r.shift(),h=r.shift();try{f=p(f)}catch(m){h(m);break}}try{i=a(f)}catch(m){return Promise.reject(m)}for(;u.length;)i=i.then(u.shift(),u.shift());return i},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=u(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(s(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},4531:function(e,t,n){"use strict";var r=n(3589);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,n,a,s,u){var l=Object.create(i);return r.toFlatObject(e,l,(function(e){return e!==Error.prototype})),o.call(l,e.message,t,n,a,s),l.name=e.name,u&&Object.assign(l,u),l},e.exports=o},7470:function(e,t,n){"use strict";var r=n(3589);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},1804:function(e,t,n){"use strict";var r=n(4044),o=n(9549);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},2733:function(e,t,n){"use strict";var r=n(3589),o=n(2693),i=n(5517),a=n(1709),s=n(6569);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},777:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function u(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,o=t(e);r.isUndefined(o)&&t!==u||(n[e]=o)})),n}},7297:function(e,t,n){"use strict";var r=n(4531);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},2693:function(e,t,n){"use strict";var r=n(3589),o=n(1709);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},1709:function(e,t,n){"use strict";var r=n(3589),o=n(4341),i=n(4531),a=n(6789),s=n(1397),u={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c={transitional:a,adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(3381)),e}(),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=r.isObject(e),a=t&&t["Content-Type"];if((n=r.isFileList(e))||i&&"multipart/form-data"===a){var u=this.env&&this.env.FormData;return s(n?{"files[]":e}:e,u&&new u)}return i||"application/json"===a?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(o){if("SyntaxError"!==o.name)throw o}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw i.from(s,i.ERR_BAD_RESPONSE,this,null,this.response);throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(3035)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(u)})),e.exports=c},6789:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7600:function(e){e.exports={version:"0.27.2"}},4049:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},9774:function(e,t,n){"use strict";var r=n(3589);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},9549:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},9301:function(e,t,n){"use strict";var r=n(3589);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4044:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},9580:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},5411:function(e,t,n){"use strict";var r=n(3589);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4341:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},3035:function(e){e.exports=null},9145:function(e,t,n){"use strict";var r=n(3589),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},6261:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},8089:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},1397:function(e,t,n){"use strict";var r=n(3589);e.exports=function(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,a){if(r.isPlainObject(i)||r.isArray(i)){if(-1!==n.indexOf(i))throw Error("Circular reference detected in "+a);n.push(i),r.forEach(i,(function(n,i){if(!r.isUndefined(n)){var s,u=a?a+"."+i:i;if(n&&!a&&"object"===typeof n)if(r.endsWith(i,"{}"))n=JSON.stringify(n);else if(r.endsWith(i,"[]")&&(s=r.toArray(n)))return void s.forEach((function(e){!r.isUndefined(e)&&t.append(u,o(e))}));e(n,u)}})),n.pop()}else t.append(a,o(i))}(e),t}},7835:function(e,t,n){"use strict";var r=n(7600).version,o=n(4531),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if("object"!==typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],s=t[a];if(s){var u=e[a],l=void 0===u||s(u,a,e);if(!0!==l)throw new o("option "+a+" must be "+l,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:i}},3589:function(e,t,n){"use strict";var r,o=n(4049),i=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=i.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function u(e){return Array.isArray(e)}function l(e){return"undefined"===typeof e}var c=s("ArrayBuffer");function d(e){return null!==e&&"object"===typeof e}function f(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),h=s("File"),m=s("Blob"),v=s("FileList");function g(e){return"[object Function]"===i.call(e)}var y=s("URLSearchParams");function w(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),u(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var b,_=(b="undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return b&&e instanceof b});e.exports={isArray:u,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||i.call(e)===t||g(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:d,isPlainObject:f,isUndefined:l,isDate:p,isFile:h,isBlob:m,isFunction:g,isStream:function(e){return d(e)&&g(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:w,merge:function e(){var t={};function n(n,r){f(t[r])&&f(n)?t[r]=e(t[r],n):f(n)?t[r]=e({},n):u(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)w(arguments[r],n);return t},extend:function(e,t,n){return w(t,(function(t,r){e[r]=n&&"function"===typeof t?o(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,o,i,a={};t=t||{};do{for(o=(r=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=r[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(l(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:_,isFileList:v}},2110:function(e,t,n){"use strict";var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=u(t),m=u(n),v=0;v<a.length;++v){var g=a[v];if(!i[g]&&(!r||!r[g])&&(!m||!m[g])&&(!s||!s[g])){var y=f(n,g);try{l(t,g,y)}catch(w){}}}}return t}},746:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case l:case f:case v:case m:case u:return e;default:return t}}case o:return t}}}function E(e){return _(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=u,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||_(e)===c},t.isConcurrentMode=E,t.isContextConsumer=function(e){return _(e)===l},t.isContextProvider=function(e){return _(e)===u},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===a||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b||e.$$typeof===g)},t.typeOf=_},8309:function(e,t,n){"use strict";e.exports=n(746)},1725:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),l=1;l<arguments.length;l++){for(var c in a=Object(arguments[l]))n.call(a,c)&&(u[c]=a[c]);if(t){s=t(a);for(var d=0;d<s.length;d++)r.call(a,s[d])&&(u[s[d]]=a[s[d]])}}return u}},888:function(e,t,n){"use strict";var r=n(9047);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},2007:function(e,t,n){e.exports=n(888)()},9047:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4463:function(e,t,n){"use strict";var r=n(2791),o=n(1725),i=n(5296);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,u={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(u[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},m={};function v(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function w(e){return e[1].toUpperCase()}function b(e,t,n,r){var o=g.hasOwnProperty(t)?g[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(m,e)||!p.call(h,e)&&(f.test(e)?m[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(y,w);g[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(y,w);g[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(y,w);g[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,x=60106,S=60107,C=60108,I=60114,A=60109,O=60110,N=60112,T=60113,k=60120,R=60115,j=60116,D=60121,P=60128,M=60129,L=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var B=Symbol.for;E=B("react.element"),x=B("react.portal"),S=B("react.fragment"),C=B("react.strict_mode"),I=B("react.profiler"),A=B("react.provider"),O=B("react.context"),N=B("react.forward_ref"),T=B("react.suspense"),k=B("react.suspense_list"),R=B("react.memo"),j=B("react.lazy"),D=B("react.block"),B("react.scope"),P=B("react.opaque.id"),M=B("react.debug_trace_mode"),L=B("react.offscreen"),F=B("react.legacy_hidden")}var V,U="function"===typeof Symbol&&Symbol.iterator;function H(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function z(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||""}return"\n"+V+e}var G=!1;function W(e,t){if(!e||G)return"";G=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{G=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function X(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=W(e.type,!1);case 11:return e=W(e.type.render,!1);case 22:return e=W(e.type._render,!1);case 1:return e=W(e.type,!0);default:return""}}function Y(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case x:return"Portal";case I:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case k:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case A:return(e._context.displayName||"Context")+".Provider";case N:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return Y(e.type);case D:return Y(e._render);case j:t=e._payload,e=e._init;try{return Y(e(t))}catch(n){}}return null}function q(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function K(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=K(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=K(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=q(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=q(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,q(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&$(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+q(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ue(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:q(n)}}function le(e,t){var n=q(t.value),r=q(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var me,ve,ge=(ve=function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((me=me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ve(e,t)}))}:ve);function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var we={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function _e(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||we.hasOwnProperty(e)&&we[e]?(""+t).trim():t+"px"}function Ee(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=_e(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(we).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),we[t]=we[e]}))}));var xe=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(xe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ie(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,Oe=null,Ne=null;function Te(e){if(e=ro(e)){if("function"!==typeof Ae)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),Ae(e.stateNode,e.type,t))}}function ke(e){Oe?Ne?Ne.push(e):Ne=[e]:Oe=e}function Re(){if(Oe){var e=Oe,t=Ne;if(Ne=Oe=null,Te(e),t)for(e=0;e<t.length;e++)Te(t[e])}}function je(e,t){return e(t)}function De(e,t,n,r,o){return e(t,n,r,o)}function Pe(){}var Me=je,Le=!1,Fe=!1;function Be(){null===Oe&&null===Ne||(Pe(),Re())}function Ve(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var Ue=!1;if(d)try{var He={};Object.defineProperty(He,"passive",{get:function(){Ue=!0}}),window.addEventListener("test",He,He),window.removeEventListener("test",He,He)}catch(ve){Ue=!1}function ze(e,t,n,r,o,i,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(c){this.onError(c)}}var Ge=!1,We=null,Xe=!1,Ye=null,qe={onError:function(e){Ge=!0,We=e}};function Ke(e,t,n,r,o,i,a,s,u){Ge=!1,We=null,ze.apply(qe,arguments)}function Ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Je(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function $e(e){if(Ze(e)!==e)throw Error(a(188))}function Qe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ze(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return $e(o),e;if(i===r)return $e(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,ut=null,lt=null,ct=new Map,dt=new Map,ft=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ct.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dt.delete(t.pointerId)}}function vt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function gt(e){var t=no(e.target);if(null!==t){var n=Ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Je(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function wt(e,t,n){yt(e)&&n.delete(t)}function bt(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==ut&&yt(ut)&&(ut=null),null!==lt&&yt(lt)&&(lt=null),ct.forEach(wt),dt.forEach(wt)}function _t(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,bt)))}function Et(e){function t(t){return _t(t,e)}if(0<at.length){_t(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&_t(st,e),null!==ut&&_t(ut,e),null!==lt&&_t(lt,e),ct.forEach(t),dt.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)gt(n),null===n.blockedOn&&ft.shift()}function xt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:xt("Animation","AnimationEnd"),animationiteration:xt("Animation","AnimationIteration"),animationstart:xt("Animation","AnimationStart"),transitionend:xt("Transition","TransitionEnd")},Ct={},It={};function At(e){if(Ct[e])return Ct[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in It)return Ct[e]=n[t];return e}d&&(It=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Ot=At("animationend"),Nt=At("animationiteration"),Tt=At("animationstart"),kt=At("transitionend"),Rt=new Map,jt=new Map,Dt=["abort","abort",Ot,"animationEnd",Nt,"animationIteration",Tt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",kt,"transitionEnd","waiting","waiting"];function Pt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),jt.set(r,t),Rt.set(r,o),l(o,[r])}}(0,i.unstable_now)();var Mt=8;function Lt(e){if(0!==(1&e))return Mt=15,1;if(0!==(2&e))return Mt=14,2;if(0!==(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!==(32&e)?(Mt=11,32):0!==(t=192&e)?(Mt=10,t):0!==(256&e)?(Mt=9,256):0!==(t=3584&e)?(Mt=8,t):0!==(4096&e)?(Mt=7,4096):0!==(t=4186112&e)?(Mt=6,t):0!==(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!==(134217728&e)?(Mt=3,134217728):0!==(t=805306368&e)?(Mt=2,t):0!==(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function Ft(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Mt=15;else if(0!==(i=134217727&n)){var u=i&~a;0!==u?(r=Lt(u),o=Mt):0!==(s&=i)&&(r=Lt(s),o=Mt)}else 0!==(i=n&~a)?(r=Lt(i),o=Mt):0!==s&&(r=Lt(s),o=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Gt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(Lt(t),o<=Mt)return t;Mt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Gt(t)),r|=e[n],t&=~o;return r}function Bt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Vt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ut(24&~t))?Vt(10,t):e;case 10:return 0===(e=Ut(192&~t))?Vt(8,t):e;case 8:return 0===(e=Ut(3584&~t))&&(0===(e=Ut(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ut(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Ut(e){return e&-e}function Ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Gt(t)]=n}var Gt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Xt|0)|0},Wt=Math.log,Xt=Math.LN2;var Yt=i.unstable_UserBlockingPriority,qt=i.unstable_runWithPriority,Kt=!0;function Zt(e,t,n,r){Le||Pe();var o=$t,i=Le;Le=!0;try{De(o,e,t,n,r)}finally{(Le=i)||Be()}}function Jt(e,t,n,r){qt(Yt,$t.bind(null,e,t,n,r))}function $t(e,t,n,r){var o;if(Kt)if((o=0===(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Qt(e,t,n,r);if(null===i)o&&mt(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=vt(st,e,t,n,r,o),!0;case"dragenter":return ut=vt(ut,e,t,n,r,o),!0;case"mouseover":return lt=vt(lt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ct.set(i,vt(ct.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,dt.set(i,vt(dt.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;mt(e,r)}Pr(e,t,r,null,n)}}}function Qt(e,t,n,r){var o=Ie(r);if(null!==(o=no(o))){var i=Ze(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Je(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Pr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var ln,cn,dn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=un(fn),hn=o({},fn,{view:0,detail:0}),mn=un(hn),vn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dn&&(dn&&"mousemove"===e.type?(ln=e.screenX-dn.screenX,cn=e.screenY-dn.screenY):cn=ln=0,dn=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:cn}}),gn=un(vn),yn=un(o({},vn,{dataTransfer:0})),wn=un(o({},hn,{relatedTarget:0})),bn=un(o({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),_n=o({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),En=un(_n),xn=un(o({},fn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},In={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=In[e])&&!!t[e]}function On(){return An}var Nn=o({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Tn=un(Nn),kn=un(o({},vn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),jn=un(o({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Dn=o({},vn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=un(Dn),Mn=[9,13,27,32],Ln=d&&"CompositionEvent"in window,Fn=null;d&&"documentMode"in document&&(Fn=document.documentMode);var Bn=d&&"TextEvent"in window&&!Fn,Vn=d&&(!Ln||Fn&&8<Fn&&11>=Fn),Un=String.fromCharCode(32),Hn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Xn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Xn[e.type]:"textarea"===t}function qn(e,t,n,r){ke(r),0<(t=Lr(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kn=null,Zn=null;function Jn(e){Nr(e,0)}function $n(e){if(J(oo(e)))return e}function Qn(e,t){if("change"===e)return t}var er=!1;if(d){var tr;if(d){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"===typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){Kn&&(Kn.detachEvent("onpropertychange",ir),Zn=Kn=null)}function ir(e){if("value"===e.propertyName&&$n(Zn)){var t=[];if(qn(t,Zn,e,Ie(e)),e=Jn,Le)e(t);else{Le=!0;try{je(e,t)}finally{Le=!1,Be()}}}}function ar(e,t,n){"focusin"===e?(or(),Zn=n,(Kn=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return $n(Zn)}function ur(e,t){if("click"===e)return $n(t)}function lr(e,t){if("input"===e||"change"===e)return $n(t)}var cr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},dr=Object.prototype.hasOwnProperty;function fr(e,t){if(cr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!dr.call(t,n[r])||!cr(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function mr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?mr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vr(){for(var e=window,t=$();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=$((e=t.contentWindow).document)}return t}function gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var yr=d&&"documentMode"in document&&11>=document.documentMode,wr=null,br=null,_r=null,Er=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Er||null==wr||wr!==$(r)||("selectionStart"in(r=wr)&&gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},_r&&fr(_r,r)||(_r=r,0<(r=Lr(br,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wr)))}Pt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Pt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Pt(Dt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Cr=0;Cr<Sr.length;Cr++)jt.set(Sr[Cr],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ar=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ir));function Or(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,u,l){if(Ke.apply(this,arguments),Ge){if(!Ge)throw Error(a(198));var c=We;Ge=!1,We=null,Xe||(Xe=!0,Ye=c)}}(r,t,void 0,e),e.currentTarget=null}function Nr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==i&&o.isPropagationStopped())break e;Or(o,s,l),i=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,l=s.currentTarget,s=s.listener,u!==i&&o.isPropagationStopped())break e;Or(o,s,l),i=u}}}if(Xe)throw e=Ye,Xe=!1,Ye=null,e}function Tr(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Dr(t,e,2,!1),n.add(r))}var kr="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[kr]||(e[kr]=!0,s.forEach((function(t){Ar.has(t)||jr(t,!1,e,null),jr(t,!0,e,null)})))}function jr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Ar.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Dr(i,e,o,t),a.add(s))}function Dr(e,t,n,r){var o=jt.get(t);switch(void 0===o?2:o){case 0:o=Zt;break;case 1:o=Jt;break;default:o=$t}n=o.bind(null,t,n,e),o=void 0,!Ue||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Pr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Fe)return e(t,n);Fe=!0;try{Me(e,t,n)}finally{Fe=!1,Be()}}((function(){var r=i,o=Ie(n),a=[];e:{var s=Rt.get(e);if(void 0!==s){var u=pn,l=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":u=Tn;break;case"focusin":l="focus",u=wn;break;case"focusout":l="blur",u=wn;break;case"beforeblur":case"afterblur":u=wn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Rn;break;case Ot:case Nt:case Tt:u=bn;break;case kt:u=jn;break;case"scroll":u=mn;break;case"wheel":u=Pn;break;case"copy":case"cut":case"paste":u=En;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=kn}var c=0!==(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ve(h,f))&&c.push(Mr(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new u(s,l,null,n,o),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(l=n.relatedTarget||n.fromElement)||!no(l)&&!l[eo])&&(u||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?no(l):null)&&(l!==(d=Ze(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=gn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=kn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==u?s:oo(u),p=null==l?s:oo(l),(s=new c(m,h+"leave",u,n,o)).target=d,s.relatedTarget=p,m=null,no(o)===r&&((c=new c(f,h+"enter",l,n,o)).target=p,c.relatedTarget=d,m=c),d=m,u&&l)e:{for(f=l,h=0,p=c=u;p;p=Fr(p))h++;for(p=0,m=f;m;m=Fr(m))p++;for(;0<h-p;)c=Fr(c),h--;for(;0<p-h;)f=Fr(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Fr(c),f=Fr(f)}c=null}else c=null;null!==u&&Br(a,s,u,c,!1),null!==l&&null!==d&&Br(a,d,l,c,!0)}if("select"===(u=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var v=Qn;else if(Yn(s))if(er)v=lr;else{v=sr;var g=ar}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=ur);switch(v&&(v=v(e,r))?qn(a,v,n,o):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&oe(s,"number",s.value)),g=r?oo(r):window,e){case"focusin":(Yn(g)||"true"===g.contentEditable)&&(wr=g,br=r,_r=null);break;case"focusout":_r=br=wr=null;break;case"mousedown":Er=!0;break;case"contextmenu":case"mouseup":case"dragend":Er=!1,xr(a,n,o);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":xr(a,n,o)}var y;if(Ln)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Wn?zn(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Vn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Wn&&(y=rn()):(tn="value"in(en=o)?en.value:en.textContent,Wn=!0)),0<(g=Lr(r,w)).length&&(w=new xn(w,e,null,n,o),a.push({event:w,listeners:g}),y?w.data=y:null!==(y=Gn(n))&&(w.data=y))),(y=Bn?function(e,t){switch(e){case"compositionend":return Gn(t);case"keypress":return 32!==t.which?null:(Hn=!0,Un);case"textInput":return(e=t.data)===Un&&Hn?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Ln&&zn(e,t)?(e=rn(),nn=tn=en=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Lr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Nr(a,t)}))}function Mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ve(e,n))&&r.unshift(Mr(e,i,o)),null!=(i=Ve(e,t))&&r.push(Mr(e,i,o))),e=e.return}return r}function Fr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,o?null!=(u=Ve(n,i))&&a.unshift(Mr(n,u,s)):o||null!=(u=Ve(n,i))&&a.push(Mr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Vr(){}var Ur=null,Hr=null;function zr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Gr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Wr="function"===typeof setTimeout?setTimeout:void 0,Xr="function"===typeof clearTimeout?clearTimeout:void 0;function Yr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function qr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Kr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Zr=0;var Jr=Math.random().toString(36).slice(2),$r="__reactFiber$"+Jr,Qr="__reactProps$"+Jr,eo="__reactContainer$"+Jr,to="__reactEvents$"+Jr;function no(e){var t=e[$r];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[$r]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Kr(e);null!==e;){if(n=e[$r])return n;e=Kr(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[$r]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Qr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],uo=-1;function lo(e){return{current:e}}function co(e){0>uo||(e.current=so[uo],so[uo]=null,uo--)}function fo(e,t){uo++,so[uo]=e.current,e.current=t}var po={},ho=lo(po),mo=lo(!1),vo=po;function go(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function yo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function wo(){co(mo),co(ho)}function bo(e,t,n){if(ho.current!==po)throw Error(a(168));fo(ho,t),fo(mo,n)}function _o(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,Y(t)||"Unknown",i));return o({},n,r)}function Eo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,vo=ho.current,fo(ho,e),fo(mo,mo.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=_o(e,t,vo),r.__reactInternalMemoizedMergedChildContext=e,co(mo),co(ho),fo(ho,e)):co(mo),fo(mo,n)}var So=null,Co=null,Io=i.unstable_runWithPriority,Ao=i.unstable_scheduleCallback,Oo=i.unstable_cancelCallback,No=i.unstable_shouldYield,To=i.unstable_requestPaint,ko=i.unstable_now,Ro=i.unstable_getCurrentPriorityLevel,jo=i.unstable_ImmediatePriority,Do=i.unstable_UserBlockingPriority,Po=i.unstable_NormalPriority,Mo=i.unstable_LowPriority,Lo=i.unstable_IdlePriority,Fo={},Bo=void 0!==To?To:function(){},Vo=null,Uo=null,Ho=!1,zo=ko(),Go=1e4>zo?ko:function(){return ko()-zo};function Wo(){switch(Ro()){case jo:return 99;case Do:return 98;case Po:return 97;case Mo:return 96;case Lo:return 95;default:throw Error(a(332))}}function Xo(e){switch(e){case 99:return jo;case 98:return Do;case 97:return Po;case 96:return Mo;case 95:return Lo;default:throw Error(a(332))}}function Yo(e,t){return e=Xo(e),Io(e,t)}function qo(e,t,n){return e=Xo(e),Ao(e,t,n)}function Ko(){if(null!==Uo){var e=Uo;Uo=null,Oo(e)}Zo()}function Zo(){if(!Ho&&null!==Vo){Ho=!0;var e=0;try{var t=Vo;Yo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Vo=null}catch(n){throw null!==Vo&&(Vo=Vo.slice(e+1)),Ao(jo,Ko),n}finally{Ho=!1}}}var Jo=_.ReactCurrentBatchConfig;function $o(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Qo=lo(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Qo.current;co(Qo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(La=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var ui=!1;function li(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ci(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function di(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,u=i.shared.pending;if(null!==u){i.shared.pending=null;var l=u,c=l.next;l.next=null,null===s?a=c:s.next=c,s=l;var d=e.alternate;if(null!==d){var f=(d=d.updateQueue).lastBaseUpdate;f!==s&&(null===f?d.firstBaseUpdate=c:f.next=c,d.lastBaseUpdate=l)}}if(null!==a){for(f=i.baseState,s=0,d=c=l=null;;){u=a.lane;var p=a.eventTime;if((r&u)===u){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,m=a;switch(u=t,p=n,m.tag){case 1:if("function"===typeof(h=m.payload)){f=h.call(p,f,u);break e}f=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null===(u="function"===typeof(h=m.payload)?h.call(p,f,u):h)||void 0===u)break e;f=o({},f,u);break e;case 2:ui=!0}}null!==a.callback&&(e.flags|=32,null===(u=i.effects)?i.effects=[a]:u.push(a))}else p={eventTime:p,lane:u,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(c=d=p,l=f):d=d.next=p,s|=u;if(null===(a=a.next)){if(null===(u=i.shared.pending))break;a=u.next,u.next=null,i.lastBaseUpdate=u,i.shared.pending=null}}null===d&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,Us|=s,e.lanes=s,e.memoizedState=f}}function mi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(a(191,o));o.call(r)}}}var vi=(new r.Component).refs;function gi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var yi={isMounted:function(e){return!!(e=e._reactInternals)&&Ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),o=pu(e),i=di(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fi(e,i),hu(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),o=pu(e),i=di(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),fi(e,i),hu(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=pu(e),o=di(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),fi(e,o),hu(e,r,n)}};function wi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!fr(n,r)||!fr(o,i))}function bi(e,t,n){var r=!1,o=po,i=t.contextType;return"object"===typeof i&&null!==i?i=si(i):(o=yo(t)?vo:ho.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?go(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=yi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _i(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yi.enqueueReplaceState(t,t.state,null)}function Ei(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=vi,li(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=si(i):(i=yo(t)?vo:ho.current,o.context=go(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(gi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&yi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4)}var xi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===vi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!==typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ci(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Ii(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Xu(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Zu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Yu(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ju(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=qu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Zu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Yu(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case x:return(t=Ju(t,e.mode,n)).return=e,t}if(xi(t)||H(t))return(t=qu(t,e.mode,n,null)).return=e,t;Ci(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==o?null:u(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===o?n.type===S?d(e,t,n.props.children,r,o):l(e,t,n,r):null;case x:return n.key===o?c(e,t,n,r):null}if(xi(n)||H(n))return null!==o?null:d(e,t,n,r,null);Ci(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r||"number"===typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,o,r.key):l(t,e,r,o);case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||H(r))return d(t,e=e.get(n)||null,r,o,null);Ci(t,r)}return null}function m(o,a,s,u){for(var l=null,c=null,d=a,m=a=0,v=null;null!==d&&m<s.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=p(o,d,s[m],u);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(o,d),a=i(g,a,m),null===c?l=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(o,d),l;if(null===d){for(;m<s.length;m++)null!==(d=f(o,s[m],u))&&(a=i(d,a,m),null===c?l=d:c.sibling=d,c=d);return l}for(d=r(o,d);m<s.length;m++)null!==(v=h(d,o,m,s[m],u))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),a=i(v,a,m),null===c?l=v:c.sibling=v,c=v);return e&&d.forEach((function(e){return t(o,e)})),l}function v(o,s,u,l){var c=H(u);if("function"!==typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var d=c=null,m=s,v=s=0,g=null,y=u.next();null!==m&&!y.done;v++,y=u.next()){m.index>v?(g=m,m=null):g=m.sibling;var w=p(o,m,y.value,l);if(null===w){null===m&&(m=g);break}e&&m&&null===w.alternate&&t(o,m),s=i(w,s,v),null===d?c=w:d.sibling=w,d=w,m=g}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;v++,y=u.next())null!==(y=f(o,y.value,l))&&(s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return c}for(m=r(o,m);!y.done;v++,y=u.next())null!==(y=h(m,o,v,y.value,l))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=i(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(o,e)})),c}return function(e,r,i,u){var l="object"===typeof i&&null!==i&&i.type===S&&null===i.key;l&&(i=i.props.children);var c="object"===typeof i&&null!==i;if(c)switch(i.$$typeof){case E:e:{for(c=i.key,l=r;null!==l;){if(l.key===c){if(7===l.tag){if(i.type===S){n(e,l.sibling),(r=o(l,i.props.children)).return=e,e=r;break e}}else if(l.elementType===i.type){n(e,l.sibling),(r=o(l,i.props)).ref=Si(e,l,i),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}i.type===S?((r=qu(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Yu(i.type,i.key,i.props,null,e.mode,u)).ref=Si(e,r,i),u.return=e,e=u)}return s(e);case x:e:{for(l=i.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ju(i,e.mode,u)).return=e,e=r}return s(e)}if("string"===typeof i||"number"===typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Zu(i,e.mode,u)).return=e,e=r),s(e);if(xi(i))return m(e,r,i,u);if(H(i))return v(e,r,i,u);if(c&&Ci(e,i),"undefined"===typeof i&&!l)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,Y(e.type)||"Component"))}return n(e,r)}}var Ai=Ii(!0),Oi=Ii(!1),Ni={},Ti=lo(Ni),ki=lo(Ni),Ri=lo(Ni);function ji(e){if(e===Ni)throw Error(a(174));return e}function Di(e,t){switch(fo(Ri,t),fo(ki,e),fo(Ti,Ni),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}co(Ti),fo(Ti,t)}function Pi(){co(Ti),co(ki),co(Ri)}function Mi(e){ji(Ri.current);var t=ji(Ti.current),n=he(t,e.type);t!==n&&(fo(ki,e),fo(Ti,n))}function Li(e){ki.current===e&&(co(Ti),co(ki))}var Fi=lo(0);function Bi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vi=null,Ui=null,Hi=!1;function zi(e,t){var n=Gu(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Gi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(Hi){var t=Ui;if(t){var n=t;if(!Gi(e,t)){if(!(t=qr(n.nextSibling))||!Gi(e,t))return e.flags=-1025&e.flags|2,Hi=!1,void(Vi=e);zi(Vi,n)}Vi=e,Ui=qr(t.firstChild)}else e.flags=-1025&e.flags|2,Hi=!1,Vi=e}}function Xi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Vi=e}function Yi(e){if(e!==Vi)return!1;if(!Hi)return Xi(e),Hi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Gr(t,e.memoizedProps))for(t=Ui;t;)zi(e,t),t=qr(t.nextSibling);if(Xi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ui=qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ui=null}}else Ui=Vi?qr(e.stateNode.nextSibling):null;return!0}function qi(){Ui=Vi=null,Hi=!1}var Ki=[];function Zi(){for(var e=0;e<Ki.length;e++)Ki[e]._workInProgressVersionPrimary=null;Ki.length=0}var Ji=_.ReactCurrentDispatcher,$i=_.ReactCurrentBatchConfig,Qi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Qi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ji.current=null===e||null===e.memoizedState?ja:Da,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Ji.current=Pa,e=n(r,o)}while(oa)}if(Ji.current=Ra,t=null!==ta&&null!==ta.next,Qi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function la(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function ca(e,t){return"function"===typeof t?t(e):t}function da(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,l=o;do{var c=l.lane;if((Qi&c)===c)null!==u&&(u=u.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var d={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=d,i=r):u=u.next=d,ea.lanes|=c,Us|=c}l=l.next}while(null!==l&&l!==o);null===u?i=r:u.next=s,cr(r,t.memoizedState)||(La=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fa(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);cr(i,t.memoizedState)||(La=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Qi&e)===e)&&(t._workInProgressVersionPrimary=r,Ki.push(t))),e)return n(t._source);throw Ki.push(t),Error(a(350))}function ha(e,t,n,r){var o=js;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),u=Ji.current,l=u.useState((function(){return pa(o,t,n)})),c=l[1],d=l[0];l=na;var f=e.memoizedState,p=f.refs,h=p.getSnapshot,m=f.source;f=f.subscribe;var v=ea;return e.memoizedState={refs:p,source:t,subscribe:r},u.useEffect((function(){p.getSnapshot=n,p.setSnapshot=c;var e=i(t._source);if(!cr(s,e)){e=n(t._source),cr(d,e)||(c(e),e=pu(v),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var u=31-Gt(a),l=1<<u;r[u]|=e,a&=~l}}}),[n,t,r]),u.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pu(v);o.mutableReadLanes|=r&o.pendingLanes}catch(i){n((function(){throw i}))}}))}),[t,r]),cr(h,n)&&cr(m,t)&&cr(f,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:d}).dispatch=c=ka.bind(null,ea,e),l.queue=e,l.baseQueue=null,d=pa(o,t,n),l.memoizedState=l.baseState=d),d}function ma(e,t,n){return ha(la(),e,t,n)}function va(e){var t=ua();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e}).dispatch=ka.bind(null,ea,e),[t.memoizedState,e]}function ga(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ya(e){return e={current:e},ua().memoizedState=e}function wa(){return la().memoizedState}function ba(e,t,n,r){var o=ua();ea.flags|=e,o.memoizedState=ga(1|t,n,void 0,void 0===r?null:r)}function _a(e,t,n,r){var o=la();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void ga(t,n,i,r)}ea.flags|=e,o.memoizedState=ga(1|t,n,i,r)}function Ea(e,t){return ba(516,4,e,t)}function xa(e,t){return _a(516,4,e,t)}function Sa(e,t){return _a(4,2,e,t)}function Ca(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ia(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,_a(4,2,Ca.bind(null,t,e),n)}function Aa(){}function Oa(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Na(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ta(e,t){var n=Wo();Yo(98>n?98:n,(function(){e(!0)})),Yo(97<n?97:n,(function(){var n=$i.transition;$i.transition=1;try{e(!1),t()}finally{$i.transition=n}}))}function ka(e,t,n){var r=fu(),o=pu(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,u=a(s,n);if(i.eagerReducer=a,i.eagerState=u,cr(u,s))return}catch(l){}hu(e,o,r)}}var Ra={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},ja={readContext:si,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:Ea,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ba(4,2,Ca.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ba(4,2,e,t)},useMemo:function(e,t){var n=ua();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ua();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ka.bind(null,ea,e),[r.memoizedState,e]},useRef:ya,useState:va,useDebugValue:Aa,useDeferredValue:function(e){var t=va(e),n=t[0],r=t[1];return Ea((function(){var t=$i.transition;$i.transition=1;try{r(e)}finally{$i.transition=t}}),[e]),n},useTransition:function(){var e=va(!1),t=e[0];return ya(e=Ta.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ua();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Hi){var e=!1,t=function(e){return{$$typeof:P,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Zr++).toString(36))),Error(a(355))})),n=va(t)[1];return 0===(2&ea.mode)&&(ea.flags|=516,ga(5,(function(){n("r:"+(Zr++).toString(36))}),void 0,null)),t}return va(t="r:"+(Zr++).toString(36)),t},unstable_isNewReconciler:!1},Da={readContext:si,useCallback:Oa,useContext:si,useEffect:xa,useImperativeHandle:Ia,useLayoutEffect:Sa,useMemo:Na,useReducer:da,useRef:wa,useState:function(){return da(ca)},useDebugValue:Aa,useDeferredValue:function(e){var t=da(ca),n=t[0],r=t[1];return xa((function(){var t=$i.transition;$i.transition=1;try{r(e)}finally{$i.transition=t}}),[e]),n},useTransition:function(){var e=da(ca)[0];return[wa().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return da(ca)[0]},unstable_isNewReconciler:!1},Pa={readContext:si,useCallback:Oa,useContext:si,useEffect:xa,useImperativeHandle:Ia,useLayoutEffect:Sa,useMemo:Na,useReducer:fa,useRef:wa,useState:function(){return fa(ca)},useDebugValue:Aa,useDeferredValue:function(e){var t=fa(ca),n=t[0],r=t[1];return xa((function(){var t=$i.transition;$i.transition=1;try{r(e)}finally{$i.transition=t}}),[e]),n},useTransition:function(){var e=fa(ca)[0];return[wa().current,e]},useMutableSource:ma,useOpaqueIdentifier:function(){return fa(ca)[0]},unstable_isNewReconciler:!1},Ma=_.ReactCurrentOwner,La=!1;function Fa(e,t,n,r){t.child=null===e?Oi(t,null,n,r):Ai(t,e.child,n,r)}function Ba(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||La?(t.flags|=1,Fa(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Va(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!==typeof a||Wu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Yu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ua(e,t,a,r,o,i))}return a=e.child,0===(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:fr)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Xu(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ua(e,t,n,r,o,i){if(null!==e&&fr(e.memoizedProps,r)&&e.ref===t.ref){if(La=!1,0===(i&o))return t.lanes=e.lanes,is(e,t,i);0!==(16384&e.flags)&&(La=!0)}return Ga(e,t,n,r,i)}function Ha(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},Eu(t,n);else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Eu(t,e),null;t.memoizedState={baseLanes:0},Eu(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Eu(t,r);return Fa(e,t,o,n),t.child}function za(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ga(e,t,n,r,o){var i=yo(n)?vo:ho.current;return i=go(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||La?(t.flags|=1,Fa(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Wa(e,t,n,r,o){if(yo(n)){var i=!0;Eo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),bi(t,n,r),Ei(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;"object"===typeof l&&null!==l?l=si(l):l=go(t,l=yo(n)?vo:ho.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||u!==l)&&_i(t,a,r,l),ui=!1;var f=t.memoizedState;a.state=f,hi(t,r,a,o),u=t.memoizedState,s!==r||f!==u||mo.current||ui?("function"===typeof c&&(gi(t,n,c,r),u=t.memoizedState),(s=ui||wi(t,n,s,r,f,u,l))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ci(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:$o(t.type,s),a.props=l,d=t.pendingProps,f=a.context,"object"===typeof(u=n.contextType)&&null!==u?u=si(u):u=go(t,u=yo(n)?vo:ho.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==u)&&_i(t,a,r,u),ui=!1,f=t.memoizedState,a.state=f,hi(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||mo.current||ui?("function"===typeof p&&(gi(t,n,p,r),h=t.memoizedState),(l=ui||wi(t,n,l,r,f,h,u))?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,u),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,u)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=u,r=l):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=256),r=!1)}return Xa(e,t,n,r,i,o)}function Xa(e,t,n,r,o,i){za(e,t);var a=0!==(64&t.flags);if(!r&&!a)return o&&xo(t,n,!1),is(e,t,i);r=t.stateNode,Ma.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Ai(t,e.child,null,i),t.child=Ai(t,null,s,i)):Fa(e,t,s,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function Ya(e){var t=e.stateNode;t.pendingContext?bo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bo(0,t.context,!1),Di(e,t.containerInfo)}var qa,Ka,Za,Ja={dehydrated:null,retryLane:0};function $a(e,t,n){var r,o=t.pendingProps,i=Fi.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),fo(Fi,1&i),null===e?(void 0!==o.fallback&&Wi(t),e=o.children,i=o.fallback,a?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ja,e):"number"===typeof o.unstable_expectedLoadTime?(e=Qa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ja,t.lanes=33554432,e):((n=Ku({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Ja,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Qa(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0===(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=Ku(t,o,0,null),n=qu(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Xu(o,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Xu(a,s),null!==e?r=Xu(e,r):(r=qu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Fa(e,t,r.children,n),0!==(2&(r=Fi.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fo(Fi,r),0===(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Bi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Bi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Us|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Xu(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xu(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Hi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return yo(t.type)&&wo(),null;case 3:return Pi(),co(mo),co(ho),Zi(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Yi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Li(t);var i=ji(Ri.current);if(n=t.type,null!==e&&null!=t.stateNode)Ka(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=ji(Ti.current),Yi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[$r]=t,r[Qr]=s,n){case"dialog":Tr("cancel",r),Tr("close",r);break;case"iframe":case"object":case"embed":Tr("load",r);break;case"video":case"audio":for(e=0;e<Ir.length;e++)Tr(Ir[e],r);break;case"source":Tr("error",r);break;case"img":case"image":case"link":Tr("error",r),Tr("load",r);break;case"details":Tr("toggle",r);break;case"input":ee(r,s),Tr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Tr("invalid",r);break;case"textarea":ue(r,s),Tr("invalid",r)}for(var l in Se(n,s),e=null,s)s.hasOwnProperty(l)&&(i=s[l],"children"===l?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):u.hasOwnProperty(l)&&null!=i&&"onScroll"===l&&Tr("scroll",r));switch(n){case"input":Z(r),re(r,s,!0);break;case"textarea":Z(r),ce(r);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(r.onclick=Vr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[$r]=t,e[Qr]=r,qa(e,t),t.stateNode=e,l=Ce(n,r),n){case"dialog":Tr("cancel",e),Tr("close",e),i=r;break;case"iframe":case"object":case"embed":Tr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ir.length;i++)Tr(Ir[i],e);i=r;break;case"source":Tr("error",e),i=r;break;case"img":case"image":case"link":Tr("error",e),Tr("load",e),i=r;break;case"details":Tr("toggle",e),i=r;break;case"input":ee(e,r),i=Q(e,r),Tr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Tr("invalid",e);break;case"textarea":ue(e,r),i=se(e,r),Tr("invalid",e);break;default:i=r}Se(n,i);var c=i;for(s in c)if(c.hasOwnProperty(s)){var d=c[s];"style"===s?Ee(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ge(e,d):"children"===s?"string"===typeof d?("textarea"!==n||""!==d)&&ye(e,d):"number"===typeof d&&ye(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(u.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Tr("scroll",e):null!=d&&b(e,s,d,l))}switch(n){case"input":Z(e),re(e,r,!1);break;case"textarea":Z(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+q(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Vr)}zr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Za(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));n=ji(Ri.current),ji(Ti.current),Yi(t)?(r=t.stateNode,n=t.memoizedProps,r[$r]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[$r]=t,t.stateNode=r)}return null;case 13:return co(Fi),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Yi(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Fi.current)?0===Fs&&(Fs=3):(0!==Fs&&3!==Fs||(Fs=4),null===js||0===(134217727&Us)&&0===(134217727&Hs)||yu(js,Ps))),(r||n)&&(t.flags|=4),null);case 4:return Pi(),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(co(Fi),null===(r=t.memoizedState))return null;if(s=0!==(64&t.flags),null===(l=r.rendering))if(s)as(r,!1);else{if(0!==Fs||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Bi(e))){for(t.flags|=64,as(r,!1),null!==(s=l.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fo(Fi,1&Fi.current|2),t.child}e=e.sibling}null!==r.tail&&Go()>Xs&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Bi(l))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!Hi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Go()-r.renderingStartTime>Xs&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Go(),n.sibling=null,t=Fi.current,fo(Fi,s?1&t|2:1&t),n):null;case 23:case 24:return xu(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function us(e){switch(e.tag){case 1:yo(e.type)&&wo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Pi(),co(mo),co(ho),Zi(),0!==(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Li(e),null;case 13:return co(Fi),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return co(Fi),null;case 4:return Pi(),null;case 10:return oi(e),null;case 23:case 24:return xu(),null;default:return null}}function ls(e,t){try{var n="",r=t;do{n+=X(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function cs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ka=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ji(Ti.current);var a,s=null;switch(n){case"input":i=Q(e,i),r=Q(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Vr)}for(d in Se(n,r),n=null,i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&null!=i[d])if("style"===d){var l=i[d];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(u.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var c=r[d];if(l=null!=i?i[d]:void 0,r.hasOwnProperty(d)&&c!==l&&(null!=c||null!=l))if("style"===d)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(d,n)),n=c;else"dangerouslySetInnerHTML"===d?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(d,c)):"children"===d?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(d,""+c):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(u.hasOwnProperty(d)?(null!=c&&"onScroll"===d&&Tr("scroll",e),s||l===c||(s=[])):"object"===typeof c&&null!==c&&c.$$typeof===P?c.toString():(s=s||[]).push(d,c))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Za=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=di(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zs||(Zs=!0,Js=r),cs(0,t)},n}function ps(e,t,n){(n=di(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return cs(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===$s?$s=new Set([this]):$s.add(this),cs(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"===typeof WeakSet?WeakSet:Set;function ms(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Vu(e,n)}else t.current=null}function vs(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:$o(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Yr(t.stateNode.containerInfo))}throw Error(a(163))}function gs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!==(4&(o=o.tag))&&0!==(1&o)&&(Lu(n,e),Mu(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:$o(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&mi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}mi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&zr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))))}throw Error(a(163))}function ys(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=_e("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ws(e,t){if(Co&&"function"===typeof Co.onCommitFiberUnmount)try{Co.onCommitFiberUnmount(So,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!==(4&r))Lu(t,n);else{r=t;try{o()}catch(i){Vu(r,i)}}n=n.next}while(n!==e)}break;case 1:if(ms(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Vu(t,i)}break;case 5:ms(t);break;case 4:Cs(e,t)}}function bs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function _s(e){return 5===e.tag||3===e.tag||4===e.tag}function Es(e){e:{for(var t=e.return;null!==t;){if(_s(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||_s(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?xs(e,n,t):Ss(e,n,t)}function xs(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Vr));else if(4!==r&&null!==(e=e.child))for(xs(e,t,n),e=e.sibling;null!==e;)xs(e,t,n),e=e.sibling}function Ss(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Cs(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,u=o,l=u;;)if(ws(s,l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===u)break e;for(;null===l.sibling;){if(null===l.return||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(s=n,u=o.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(ws(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Is(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Qr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Ce(e,o),t=Ce(e,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?Ee(n,u):"dangerouslySetInnerHTML"===s?ge(n,u):"children"===s?ye(n,u):b(n,s,u,t)}switch(e){case"input":ne(n,r);break;case"textarea":le(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,Et(n.containerInfo)));case 13:return null!==t.memoizedState&&(Ws=Go(),ys(t.child,!0)),void As(t);case 19:return void As(t);case 23:case 24:return void ys(t,null!==t.memoizedState)}throw Error(a(163))}function As(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Hu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Os(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ns=Math.ceil,Ts=_.ReactCurrentDispatcher,ks=_.ReactCurrentOwner,Rs=0,js=null,Ds=null,Ps=0,Ms=0,Ls=lo(0),Fs=0,Bs=null,Vs=0,Us=0,Hs=0,zs=0,Gs=null,Ws=0,Xs=1/0;function Ys(){Xs=Go()+500}var qs,Ks=null,Zs=!1,Js=null,$s=null,Qs=!1,eu=null,tu=90,nu=[],ru=[],ou=null,iu=0,au=null,su=-1,uu=0,lu=0,cu=null,du=!1;function fu(){return 0!==(48&Rs)?Go():-1!==su?su:su=Go()}function pu(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===Wo()?1:2;if(0===uu&&(uu=Vs),0!==Jo.transition){0!==lu&&(lu=null!==Gs?Gs.pendingLanes:0),e=uu;var t=4186112&~lu;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Wo(),0!==(4&Rs)&&98===e?e=Vt(12,uu):e=Vt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),uu),e}function hu(e,t,n){if(50<iu)throw iu=0,au=null,Error(a(185));if(null===(e=mu(e,t)))return null;zt(e,t,n),e===js&&(Hs|=t,4===Fs&&yu(e,Ps));var r=Wo();1===t?0!==(8&Rs)&&0===(48&Rs)?wu(e):(vu(e,n),0===Rs&&(Ys(),Ko())):(0===(4&Rs)||98!==r&&99!==r||(null===ou?ou=new Set([e]):ou.add(e)),vu(e,n)),Gs=e}function mu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function vu(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var u=31-Gt(s),l=1<<u,c=i[u];if(-1===c){if(0===(l&r)||0!==(l&o)){c=t,Lt(l);var d=Mt;i[u]=10<=d?c+250:6<=d?c+5e3:-1}}else c<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ft(e,e===js?Ps:0),t=Mt,0===r)null!==n&&(n!==Fo&&Oo(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Fo&&Oo(n)}15===t?(n=wu.bind(null,e),null===Vo?(Vo=[n],Uo=Ao(jo,Zo)):Vo.push(n),n=Fo):14===t?n=qo(99,wu.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=qo(n,gu.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function gu(e){if(su=-1,lu=uu=0,0!==(48&Rs))throw Error(a(327));var t=e.callbackNode;if(Pu()&&e.callbackNode!==t)return null;var n=Ft(e,e===js?Ps:0);if(0===n)return null;var r=n,o=Rs;Rs|=16;var i=Iu();for(js===e&&Ps===r||(Ys(),Su(e,r));;)try{Nu();break}catch(u){Cu(e,u)}if(ri(),Ts.current=i,Rs=o,null!==Ds?r=0:(js=null,Ps=0,r=Fs),0!==(Vs&Hs))Su(e,0);else if(0!==r){if(2===r&&(Rs|=64,e.hydrate&&(e.hydrate=!1,Yr(e.containerInfo)),0!==(n=Bt(e))&&(r=Au(e,n))),1===r)throw t=Bs,Su(e,0),yu(e,n),vu(e,Go()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Ru(e);break;case 3:if(yu(e,n),(62914560&n)===n&&10<(r=Ws+500-Go())){if(0!==Ft(e,0))break;if(((o=e.suspendedLanes)&n)!==n){fu(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Wr(Ru.bind(null,e),r);break}Ru(e);break;case 4:if(yu(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Gt(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Go()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ns(n/1960))-n)){e.timeoutHandle=Wr(Ru.bind(null,e),n);break}Ru(e);break;default:throw Error(a(329))}}return vu(e,Go()),e.callbackNode===t?gu.bind(null,e):null}function yu(e,t){for(t&=~zs,t&=~Hs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function wu(e){if(0!==(48&Rs))throw Error(a(327));if(Pu(),e===js&&0!==(e.expiredLanes&Ps)){var t=Ps,n=Au(e,t);0!==(Vs&Hs)&&(n=Au(e,t=Ft(e,t)))}else n=Au(e,t=Ft(e,0));if(0!==e.tag&&2===n&&(Rs|=64,e.hydrate&&(e.hydrate=!1,Yr(e.containerInfo)),0!==(t=Bt(e))&&(n=Au(e,t))),1===n)throw n=Bs,Su(e,0),yu(e,t),vu(e,Go()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ru(e),vu(e,Go()),null}function bu(e,t){var n=Rs;Rs|=1;try{return e(t)}finally{0===(Rs=n)&&(Ys(),Ko())}}function _u(e,t){var n=Rs;Rs&=-2,Rs|=8;try{return e(t)}finally{0===(Rs=n)&&(Ys(),Ko())}}function Eu(e,t){fo(Ls,Ms),Ms|=t,Vs|=t}function xu(){Ms=Ls.current,co(Ls)}function Su(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Xr(n)),null!==Ds)for(n=Ds.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&wo();break;case 3:Pi(),co(mo),co(ho),Zi();break;case 5:Li(r);break;case 4:Pi();break;case 13:case 19:co(Fi);break;case 10:oi(r);break;case 23:case 24:xu()}n=n.return}js=e,Ds=Xu(e.current,null),Ps=Ms=Vs=t,Fs=0,Bs=null,zs=Hs=Us=0}function Cu(e,t){for(;;){var n=Ds;try{if(ri(),Ji.current=Ra,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Qi=0,na=ta=ea=null,oa=!1,ks.current=null,null===n||null===n.return){Fs=1,Bs=t,Ds=null;break}e:{var i=e,a=n.return,s=n,u=t;if(t=Ps,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==u&&"object"===typeof u&&"function"===typeof u.then){var l=u;if(0===(2&s.mode)){var c=s.alternate;c?(s.updateQueue=c.updateQueue,s.memoizedState=c.memoizedState,s.lanes=c.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!==(1&Fi.current),f=a;do{var p;if(p=13===f.tag){var h=f.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var m=f.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var v=f.updateQueue;if(null===v){var g=new Set;g.add(l),f.updateQueue=g}else v.add(l);if(0===(2&f.mode)){if(f.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=di(-1,1);y.tag=2,fi(s,y)}s.lanes|=1;break e}u=void 0,s=t;var w=i.pingCache;if(null===w?(w=i.pingCache=new ds,u=new Set,w.set(l,u)):void 0===(u=w.get(l))&&(u=new Set,w.set(l,u)),!u.has(s)){u.add(s);var b=Uu.bind(null,i,l,s);l.then(b,b)}f.flags|=4096,f.lanes=t;break e}f=f.return}while(null!==f);u=Error((Y(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Fs&&(Fs=2),u=ls(u,s),f=a;do{switch(f.tag){case 3:i=u,f.flags|=4096,t&=-t,f.lanes|=t,pi(f,fs(0,i,t));break e;case 1:i=u;var _=f.type,E=f.stateNode;if(0===(64&f.flags)&&("function"===typeof _.getDerivedStateFromError||null!==E&&"function"===typeof E.componentDidCatch&&(null===$s||!$s.has(E)))){f.flags|=4096,t&=-t,f.lanes|=t,pi(f,ps(f,i,t));break e}}f=f.return}while(null!==f)}ku(n)}catch(x){t=x,Ds===n&&null!==n&&(Ds=n=n.return);continue}break}}function Iu(){var e=Ts.current;return Ts.current=Ra,null===e?Ra:e}function Au(e,t){var n=Rs;Rs|=16;var r=Iu();for(js===e&&Ps===t||Su(e,t);;)try{Ou();break}catch(o){Cu(e,o)}if(ri(),Rs=n,Ts.current=r,null!==Ds)throw Error(a(261));return js=null,Ps=0,Fs}function Ou(){for(;null!==Ds;)Tu(Ds)}function Nu(){for(;null!==Ds&&!No();)Tu(Ds)}function Tu(e){var t=qs(e.alternate,e,Ms);e.memoizedProps=e.pendingProps,null===t?ku(e):Ds=t,ks.current=null}function ku(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=ss(n,t,Ms)))return void(Ds=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Ms)||0===(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=us(t)))return n.flags&=2047,void(Ds=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ds=t);Ds=t=e}while(null!==t);0===Fs&&(Fs=5)}function Ru(e){var t=Wo();return Yo(99,ju.bind(null,e,t)),null}function ju(e,t){do{Pu()}while(null!==eu);if(0!==(48&Rs))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,u=e.expirationTimes;0<i;){var l=31-Gt(i),c=1<<l;o[l]=0,s[l]=-1,u[l]=-1,i&=~c}if(null!==ou&&0===(24&r)&&ou.has(e)&&ou.delete(e),e===js&&(Ds=js=null,Ps=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Rs,Rs|=32,ks.current=null,Ur=Kt,gr(s=vr())){if("selectionStart"in s)u={start:s.selectionStart,end:s.selectionEnd};else e:if(u=(u=s.ownerDocument)&&u.defaultView||window,(c=u.getSelection&&u.getSelection())&&0!==c.rangeCount){u=c.anchorNode,i=c.anchorOffset,l=c.focusNode,c=c.focusOffset;try{u.nodeType,l.nodeType}catch(I){u=null;break e}var d=0,f=-1,p=-1,h=0,m=0,v=s,g=null;t:for(;;){for(var y;v!==u||0!==i&&3!==v.nodeType||(f=d+i),v!==l||0!==c&&3!==v.nodeType||(p=d+c),3===v.nodeType&&(d+=v.nodeValue.length),null!==(y=v.firstChild);)g=v,v=y;for(;;){if(v===s)break t;if(g===u&&++h===i&&(f=d),g===l&&++m===c&&(p=d),null!==(y=v.nextSibling))break;g=(v=g).parentNode}v=y}u=-1===f||-1===p?null:{start:f,end:p}}else u=null;u=u||{start:0,end:0}}else u=null;Hr={focusedElem:s,selectionRange:u},Kt=!1,cu=null,du=!1,Ks=r;do{try{Du()}catch(I){if(null===Ks)throw Error(a(330));Vu(Ks,I),Ks=Ks.nextEffect}}while(null!==Ks);cu=null,Ks=r;do{try{for(s=e;null!==Ks;){var w=Ks.flags;if(16&w&&ye(Ks.stateNode,""),128&w){var b=Ks.alternate;if(null!==b){var _=b.ref;null!==_&&("function"===typeof _?_(null):_.current=null)}}switch(1038&w){case 2:Es(Ks),Ks.flags&=-3;break;case 6:Es(Ks),Ks.flags&=-3,Is(Ks.alternate,Ks);break;case 1024:Ks.flags&=-1025;break;case 1028:Ks.flags&=-1025,Is(Ks.alternate,Ks);break;case 4:Is(Ks.alternate,Ks);break;case 8:Cs(s,u=Ks);var E=u.alternate;bs(u),null!==E&&bs(E)}Ks=Ks.nextEffect}}catch(I){if(null===Ks)throw Error(a(330));Vu(Ks,I),Ks=Ks.nextEffect}}while(null!==Ks);if(_=Hr,b=vr(),w=_.focusedElem,s=_.selectionRange,b!==w&&w&&w.ownerDocument&&mr(w.ownerDocument.documentElement,w)){null!==s&&gr(w)&&(b=s.start,void 0===(_=s.end)&&(_=b),"selectionStart"in w?(w.selectionStart=b,w.selectionEnd=Math.min(_,w.value.length)):(_=(b=w.ownerDocument||document)&&b.defaultView||window).getSelection&&(_=_.getSelection(),u=w.textContent.length,E=Math.min(s.start,u),s=void 0===s.end?E:Math.min(s.end,u),!_.extend&&E>s&&(u=s,s=E,E=u),u=hr(w,E),i=hr(w,s),u&&i&&(1!==_.rangeCount||_.anchorNode!==u.node||_.anchorOffset!==u.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&((b=b.createRange()).setStart(u.node,u.offset),_.removeAllRanges(),E>s?(_.addRange(b),_.extend(i.node,i.offset)):(b.setEnd(i.node,i.offset),_.addRange(b))))),b=[];for(_=w;_=_.parentNode;)1===_.nodeType&&b.push({element:_,left:_.scrollLeft,top:_.scrollTop});for("function"===typeof w.focus&&w.focus(),w=0;w<b.length;w++)(_=b[w]).element.scrollLeft=_.left,_.element.scrollTop=_.top}Kt=!!Ur,Hr=Ur=null,e.current=n,Ks=r;do{try{for(w=e;null!==Ks;){var x=Ks.flags;if(36&x&&gs(w,Ks.alternate,Ks),128&x){b=void 0;var S=Ks.ref;if(null!==S){var C=Ks.stateNode;Ks.tag,b=C,"function"===typeof S?S(b):S.current=b}}Ks=Ks.nextEffect}}catch(I){if(null===Ks)throw Error(a(330));Vu(Ks,I),Ks=Ks.nextEffect}}while(null!==Ks);Ks=null,Bo(),Rs=o}else e.current=n;if(Qs)Qs=!1,eu=e,tu=t;else for(Ks=r;null!==Ks;)t=Ks.nextEffect,Ks.nextEffect=null,8&Ks.flags&&((x=Ks).sibling=null,x.stateNode=null),Ks=t;if(0===(r=e.pendingLanes)&&($s=null),1===r?e===au?iu++:(iu=0,au=e):iu=0,n=n.stateNode,Co&&"function"===typeof Co.onCommitFiberRoot)try{Co.onCommitFiberRoot(So,n,void 0,64===(64&n.current.flags))}catch(I){}if(vu(e,Go()),Zs)throw Zs=!1,e=Js,Js=null,e;return 0!==(8&Rs)||Ko(),null}function Du(){for(;null!==Ks;){var e=Ks.alternate;du||null===cu||(0!==(8&Ks.flags)?et(Ks,cu)&&(du=!0):13===Ks.tag&&Os(e,Ks)&&et(Ks,cu)&&(du=!0));var t=Ks.flags;0!==(256&t)&&vs(e,Ks),0===(512&t)||Qs||(Qs=!0,qo(97,(function(){return Pu(),null}))),Ks=Ks.nextEffect}}function Pu(){if(90!==tu){var e=97<tu?97:tu;return tu=90,Yo(e,Fu)}return!1}function Mu(e,t){nu.push(t,e),Qs||(Qs=!0,qo(97,(function(){return Pu(),null})))}function Lu(e,t){ru.push(t,e),Qs||(Qs=!0,qo(97,(function(){return Pu(),null})))}function Fu(){if(null===eu)return!1;var e=eu;if(eu=null,0!==(48&Rs))throw Error(a(331));var t=Rs;Rs|=32;var n=ru;ru=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"===typeof s)try{s()}catch(l){if(null===i)throw Error(a(330));Vu(i,l)}}for(n=nu,nu=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var u=o.create;o.destroy=u()}catch(l){if(null===i)throw Error(a(330));Vu(i,l)}}for(u=e.current.firstEffect;null!==u;)e=u.nextEffect,u.nextEffect=null,8&u.flags&&(u.sibling=null,u.stateNode=null),u=e;return Rs=t,Ko(),!0}function Bu(e,t,n){fi(e,t=fs(0,t=ls(n,t),1)),t=fu(),null!==(e=mu(e,1))&&(zt(e,1,t),vu(e,t))}function Vu(e,t){if(3===e.tag)Bu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Bu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===$s||!$s.has(r))){var o=ps(n,e=ls(t,e),1);if(fi(n,o),o=fu(),null!==(n=mu(n,1)))zt(n,1,o),vu(n,o);else if("function"===typeof r.componentDidCatch&&(null===$s||!$s.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function Uu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fu(),e.pingedLanes|=e.suspendedLanes&n,js===e&&(Ps&n)===n&&(4===Fs||3===Fs&&(62914560&Ps)===Ps&&500>Go()-Ws?Su(e,0):zs|=n),vu(e,t)}function Hu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===Wo()?1:2:(0===uu&&(uu=Vs),0===(t=Ut(62914560&~uu))&&(t=4194304))),n=fu(),null!==(e=mu(e,t))&&(zt(e,t,n),vu(e,n))}function zu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Gu(e,t,n,r){return new zu(e,t,n,r)}function Wu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xu(e,t){var n=e.alternate;return null===n?((n=Gu(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Yu(e,t,n,r,o,i){var s=2;if(r=e,"function"===typeof e)Wu(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return qu(n.children,o,i,t);case M:s=8,o|=16;break;case C:s=8,o|=1;break;case I:return(e=Gu(12,n,t,8|o)).elementType=I,e.type=I,e.lanes=i,e;case T:return(e=Gu(13,n,t,o)).type=T,e.elementType=T,e.lanes=i,e;case k:return(e=Gu(19,n,t,o)).elementType=k,e.lanes=i,e;case L:return Ku(n,o,i,t);case F:return(e=Gu(24,n,t,o)).elementType=F,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case A:s=10;break e;case O:s=9;break e;case N:s=11;break e;case R:s=14;break e;case j:s=16,r=null;break e;case D:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Gu(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function qu(e,t,n,r){return(e=Gu(7,e,r,t)).lanes=n,e}function Ku(e,t,n,r){return(e=Gu(23,e,r,t)).elementType=L,e.lanes=n,e}function Zu(e,t,n){return(e=Gu(6,e,null,t)).lanes=n,e}function Ju(e,t,n){return(t=Gu(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $u(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function Qu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function el(e,t,n,r){var o=t.current,i=fu(),s=pu(o);e:if(n){t:{if(Ze(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(yo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var l=n.type;if(yo(l)){n=_o(n,l,u);break e}}n=u}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=di(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),hu(o,s,i),s}function tl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rl(e,t){nl(e,t),(e=e.alternate)&&nl(e,t)}function ol(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new $u(e,t,null!=n&&!0===n.hydrate),t=Gu(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,li(t),e[eo]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function il(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function al(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"===typeof o){var s=o;o=function(){var e=tl(a);s.call(e)}}el(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ol(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"===typeof o){var u=o;o=function(){var e=tl(a);u.call(e)}}_u((function(){el(t,a,e,o)}))}return tl(a)}function sl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!il(t))throw Error(a(200));return Qu(e,t,null,n)}qs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||mo.current)La=!0;else{if(0===(n&r)){switch(La=!1,t.tag){case 3:Ya(t),qi();break;case 5:Mi(t);break;case 1:yo(t.type)&&Eo(t);break;case 4:Di(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fo(Qo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?$a(e,t,n):(fo(Fi,1&Fi.current),null!==(t=is(e,t,n))?t.sibling:null);fo(Fi,1&Fi.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),fo(Fi,Fi.current),r)break;return null;case 23:case 24:return t.lanes=0,Ha(e,t,n)}return is(e,t,n)}La=0!==(16384&e.flags)}else La=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=go(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,yo(r)){var i=!0;Eo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,li(t);var s=r.getDerivedStateFromProps;"function"===typeof s&&gi(t,r,s,e),o.updater=yi,t.stateNode=o,o._reactInternals=t,Ei(t,r,e,n),t=Xa(null,t,r,!0,i,n)}else t.tag=0,Fa(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"===typeof e)return Wu(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===N)return 11;if(e===R)return 14}return 2}(o),e=$o(o,e),i){case 0:t=Ga(null,t,o,e,n);break e;case 1:t=Wa(null,t,o,e,n);break e;case 11:t=Ba(null,t,o,e,n);break e;case 14:t=Va(null,t,o,$o(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ga(e,t,r,o=t.elementType===r?o:$o(r,o),n);case 1:return r=t.type,o=t.pendingProps,Wa(e,t,r,o=t.elementType===r?o:$o(r,o),n);case 3:if(Ya(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ci(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)qi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Ui=qr(t.stateNode.containerInfo.firstChild),Vi=t,i=Hi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Ki.push(i);for(n=Oi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Fa(e,t,r,n),qi();t=t.child}return t;case 5:return Mi(t),null===e&&Wi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,Gr(r,o)?s=null:null!==i&&Gr(r,i)&&(t.flags|=16),za(e,t),Fa(e,t,s,n),t.child;case 6:return null===e&&Wi(t),null;case 13:return $a(e,t,n);case 4:return Di(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ai(t,null,r,n):Fa(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ba(e,t,r,o=t.elementType===r?o:$o(r,o),n);case 7:return Fa(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fa(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var u=t.type._context;if(fo(Qo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=cr(u,i)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!mo.current){t=is(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var l=u.dependencies;if(null!==l){s=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!==(c.observedBits&i)){1===u.tag&&((c=di(-1,n&-n)).tag=2,fi(u,c)),u.lanes|=n,null!==(c=u.alternate)&&(c.lanes|=n),ii(u.return,n),l.lanes|=n;break}c=c.next}}else s=10===u.tag&&u.type===t.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===t){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Fa(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,Fa(e,t,r,n),t.child;case 14:return i=$o(o=t.type,t.pendingProps),Va(e,t,o,i=$o(o.type,i),r,n);case 15:return Ua(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:$o(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,yo(r)?(e=!0,Eo(t)):e=!1,ai(t,n),bi(t,r,o),Ei(t,r,o,n),Xa(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Ha(e,t,n)}throw Error(a(156,t.tag))},ol.prototype.render=function(e){el(e,this._internalRoot,null,null)},ol.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;el(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hu(e,4,fu()),rl(e,4))},nt=function(e){13===e.tag&&(hu(e,67108864,fu()),rl(e,67108864))},rt=function(e){if(13===e.tag){var t=fu(),n=pu(e);hu(e,n,t),rl(e,n)}},ot=function(e,t){return t()},Ae=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));J(r),ne(r,o)}}}break;case"textarea":le(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},je=bu,De=function(e,t,n,r,o){var i=Rs;Rs|=4;try{return Yo(98,e.bind(null,t,n,r,o))}finally{0===(Rs=i)&&(Ys(),Ko())}},Pe=function(){0===(49&Rs)&&(function(){if(null!==ou){var e=ou;ou=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,vu(e,Go())}))}Ko()}(),Pu())},Me=function(e,t){var n=Rs;Rs|=2;try{return e(t)}finally{0===(Rs=n)&&(Ys(),Ko())}};var ul={Events:[ro,oo,io,ke,Re,Pu,{current:!1}]},ll={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},cl={bundleType:ll.bundleType,version:ll.version,rendererPackageName:ll.rendererPackageName,rendererConfig:ll.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Qe(e))?null:e.stateNode},findFiberByHostInstance:ll.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dl.isDisabled&&dl.supportsFiber)try{So=dl.inject(cl),Co=dl}catch(ve){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ul,t.createPortal=sl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Qe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Rs;if(0!==(48&n))return e(t);Rs|=1;try{if(e)return Yo(99,e.bind(null,t))}finally{Rs=n,Ko()}},t.hydrate=function(e,t,n){if(!il(t))throw Error(a(200));return al(null,e,t,!0,n)},t.render=function(e,t,n){if(!il(t))throw Error(a(200));return al(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!il(e))throw Error(a(40));return!!e._reactRootContainer&&(_u((function(){al(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=bu,t.unstable_createPortal=function(e,t){return sl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!il(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return al(e,t,n,!1,r)},t.version="17.0.2"},4164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4463)},1276:function(e,t,n){e.exports=function(e,t,n,r){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=r(n(1)),d=n(2),f=r(d),p=r(n(3)),h=r(n(4)),m=function(e){function t(){var e,n,r;i(this,t);for(var s=arguments.length,u=Array(s),l=0;l<s;l++)u[l]=arguments[l];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r._sigPad=null,r._excludeOurProps=function(){var e=r.props;return e.canvasProps,e.clearOnResize,o(e,["canvasProps","clearOnResize"])},r.getCanvas=function(){return r._canvas},r.getTrimmedCanvas=function(){var e=document.createElement("canvas");return e.width=r._canvas.width,e.height=r._canvas.height,e.getContext("2d").drawImage(r._canvas,0,0),(0,h.default)(e)},r.getSignaturePad=function(){return r._sigPad},r._checkClearOnResize=function(){r.props.clearOnResize&&r._resizeCanvas()},r._resizeCanvas=function(){var e=r.props.canvasProps||{},t=e.width,n=e.height;if(!t||!n){var o=r._canvas,i=Math.max(window.devicePixelRatio||1,1);t||(o.width=o.offsetWidth*i),n||(o.height=o.offsetHeight*i),o.getContext("2d").scale(i,i),r.clear()}},r.on=function(){return window.addEventListener("resize",r._checkClearOnResize),r._sigPad.on()},r.off=function(){return window.removeEventListener("resize",r._checkClearOnResize),r._sigPad.off()},r.clear=function(){return r._sigPad.clear()},r.isEmpty=function(){return r._sigPad.isEmpty()},r.fromDataURL=function(e,t){return r._sigPad.fromDataURL(e,t)},r.toDataURL=function(e,t){return r._sigPad.toDataURL(e,t)},r.fromData=function(e){return r._sigPad.fromData(e)},r.toData=function(){return r._sigPad.toData()},a(r,n)}return s(t,e),l(t,[{key:"componentDidMount",value:function(){this._sigPad=new p.default(this._canvas,this._excludeOurProps()),this._resizeCanvas(),this.on()}},{key:"componentWillUnmount",value:function(){this.off()}},{key:"componentDidUpdate",value:function(){Object.assign(this._sigPad,this._excludeOurProps())}},{key:"render",value:function(){var e=this,t=this.props.canvasProps;return f.default.createElement("canvas",u({ref:function(t){e._canvas=t}},t))}}]),t}(d.Component);m.propTypes={velocityFilterWeight:c.default.number,minWidth:c.default.number,maxWidth:c.default.number,minDistance:c.default.number,dotSize:c.default.oneOfType([c.default.number,c.default.func]),penColor:c.default.string,throttle:c.default.number,onEnd:c.default.func,onBegin:c.default.func,canvasProps:c.default.object,clearOnResize:c.default.bool},m.defaultProps={clearOnResize:!0},t.default=m},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r}])}(n(2007),n(2791),n(354),n(9590))},6374:function(e,t,n){"use strict";n(1725);var r=n(2791),o=60103;if(t.Fragment=60107,"function"===typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:c,props:i,_owner:a.current}}t.jsx=l,t.jsxs=l},9117:function(e,t,n){"use strict";var r=n(1725),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var l=60115,c=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;o=d("react.element"),i=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),u=d("react.forward_ref"),t.Suspense=d("react.suspense"),l=d("react.memo"),c=d("react.lazy")}var f="function"===typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=v.prototype;var w=y.prototype=new g;w.constructor=y,r(w,v.prototype),w.isPureReactComponent=!0;var b={current:null},_=Object.prototype.hasOwnProperty,E={key:!0,ref:!0,__self:!0,__source:!0};function x(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!E.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:b.current}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var C=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+I(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(C,"$&/")+"/"),A(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(C,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=r+I(s=e[l],l);u+=A(s,t,n,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),l=0;!(s=e.next()).done;)u+=A(s=s.value,t,n,c=r+I(s,l++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function O(e,t,n){if(null==e)return e;var r=[],o=0;return A(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function N(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var T={current:null};function k(){var e=T.current;if(null===e)throw Error(p(321));return e}var R={ReactCurrentDispatcher:T,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:b,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(p(143));return e}},t.Component=v,t.PureComponent=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=b.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)_.call(t,c)&&!E.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var d=0;d<c;d++)l[d]=arguments[d+2];i.children=l}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=x,t.createFactory=function(e){var t=x.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return k().useCallback(e,t)},t.useContext=function(e,t){return k().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return k().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return k().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return k().useLayoutEffect(e,t)},t.useMemo=function(e,t){return k().useMemo(e,t)},t.useReducer=function(e,t,n){return k().useReducer(e,t,n)},t.useRef=function(e){return k().useRef(e)},t.useState=function(e){return k().useState(e)},t.version="17.0.2"},2791:function(e,t,n){"use strict";e.exports=n(9117)},184:function(e,t,n){"use strict";e.exports=n(6374)},6813:function(e,t){"use strict";var n,r,o,i;if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var l=null,c=null,d=function e(){if(null!==l)try{var n=t.unstable_now();l(!0,n),l=null}catch(r){throw setTimeout(e,0),r}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(d,0))},r=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var h=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,v=null,g=-1,y=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<e?Math.floor(1e3/e):5};var b=new MessageChannel,_=b.port2;b.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();w=e+y;try{v(!0,e)?_.postMessage(null):(m=!1,v=null)}catch(n){throw _.postMessage(null),n}}else m=!1},n=function(e){v=e,m||(m=!0,_.postMessage(null))},r=function(e,n){g=f((function(){e(t.unstable_now())}),n)},o=function(){p(g),g=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<C(o,t)))break e;e[r]=t,e[n]=o,n=r}}function x(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,u=e[s];if(void 0!==a&&0>C(a,n))void 0!==u&&0>C(u,a)?(e[r]=u,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>C(u,n)))break e;e[r]=u,e[s]=n,r=s}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var I=[],A=[],O=1,N=null,T=3,k=!1,R=!1,j=!1;function D(e){for(var t=x(A);null!==t;){if(null===t.callback)S(A);else{if(!(t.startTime<=e))break;S(A),t.sortIndex=t.expirationTime,E(I,t)}t=x(A)}}function P(e){if(j=!1,D(e),!R)if(null!==x(I))R=!0,n(M);else{var t=x(A);null!==t&&r(P,t.startTime-e)}}function M(e,n){R=!1,j&&(j=!1,o()),k=!0;var i=T;try{for(D(n),N=x(I);null!==N&&(!(N.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=N.callback;if("function"===typeof a){N.callback=null,T=N.priorityLevel;var s=a(N.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?N.callback=s:N===x(I)&&S(I),D(n)}else S(I);N=x(I)}if(null!==N)var u=!0;else{var l=x(A);null!==l&&r(P,l.startTime-n),u=!1}return u}finally{N=null,T=i,k=!1}}var L=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||k||(R=!0,n(M))},t.unstable_getCurrentPriorityLevel=function(){return T},t.unstable_getFirstCallbackNode=function(){return x(I)},t.unstable_next=function(e){switch(T){case 1:case 2:case 3:var t=3;break;default:t=T}var n=T;T=t;try{return e()}finally{T=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=L,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=T;T=e;try{return t()}finally{T=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var u=-1;break;case 2:u=250;break;case 5:u=1073741823;break;case 4:u=1e4;break;default:u=5e3}return e={id:O++,callback:i,priorityLevel:e,startTime:a,expirationTime:u=a+u,sortIndex:-1},a>s?(e.sortIndex=a,E(A,e),null===x(I)&&e===x(A)&&(j?o():j=!0,r(P,a-s))):(e.sortIndex=u,E(I,e),R||k||(R=!0,n(M))),e},t.unstable_wrapCallback=function(e){var t=T;return function(){var n=T;T=t;try{return e.apply(this,arguments)}finally{T=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},9590:function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";function n(e){var t=e.getContext("2d"),n=e.width,r=e.height,o=t.getImageData(0,0,n,r).data,s=i(!0,n,r,o),u=i(!1,n,r,o),l=a(!0,n,r,o),c=a(!1,n,r,o)-l+1,d=u-s+1,f=t.getImageData(l,s,c,d);return e.width=c,e.height=d,t.clearRect(0,0,c,d),t.putImageData(f,0,0),e}function r(e,t,n,r){return{red:r[4*(n*t+e)],green:r[4*(n*t+e)+1],blue:r[4*(n*t+e)+2],alpha:r[4*(n*t+e)+3]}}function o(e,t,n,o){return r(e,t,n,o).alpha}function i(e,t,n,r){for(var i=e?1:-1,a=e?0:n-1;e?a<n:a>-1;a+=i)for(var s=0;s<t;s++)if(o(s,a,t,r))return a;return null}function a(e,t,n,r){for(var i=e?1:-1,a=e?0:t-1;e?a<t:a>-1;a+=i)for(var s=0;s<n;s++)if(o(a,s,t,r))return a;return null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n}])},9890:function(e,t,n){var r={"./document-icon-excel.jpg":8726,"./document-icon-file.jpg":5353,"./document-icon-pdf.jpg":315,"./document-icon-ppt.jpg":2381,"./document-icon-txt.jpg":2837,"./document-icon-word.jpg":6981,"./document-icon-zip.jpg":7622};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=9890},8726:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-excel.77e30da891dfbfa014c1.jpg"},5353:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-file.cae254a7a075bb2c68ec.jpg"},315:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-pdf.59d1e8a2af873c48ccc8.jpg"},2381:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-ppt.4d30fbf0d7f525e9e881.jpg"},2837:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-txt.78c309be9595a9798779.jpg"},6981:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-word.a179ffd31e68eb452774.jpg"},7622:function(e,t,n){"use strict";e.exports=n.p+"static/media/document-icon-zip.abe41cf81c1dc63275a9.jpg"},354:function(e,t,n){"use strict";function r(e,t,n){this.x=e,this.y=t,this.time=n||(new Date).getTime()}function o(e,t,n,r){this.startPoint=e,this.control1=t,this.control2=n,this.endPoint=r}function i(e,t){var n=this,r=t||{};this.velocityFilterWeight=r.velocityFilterWeight||.7,this.minWidth=r.minWidth||.5,this.maxWidth=r.maxWidth||2.5,this.throttle="throttle"in r?r.throttle:16,this.minDistance="minDistance"in r?r.minDistance:5,this.throttle?this._strokeMoveUpdate=function(e,t,n){var r,o,i,a=null,s=0;n||(n={});var u=function(){s=!1===n.leading?0:Date.now(),a=null,i=e.apply(r,o),a||(r=o=null)};return function(){var l=Date.now();s||!1!==n.leading||(s=l);var c=t-(l-s);return r=this,o=arguments,c<=0||c>t?(a&&(clearTimeout(a),a=null),s=l,i=e.apply(r,o),a||(r=o=null)):a||!1===n.trailing||(a=setTimeout(u,c)),i}}(i.prototype._strokeUpdate,this.throttle):this._strokeMoveUpdate=i.prototype._strokeUpdate,this.dotSize=r.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=r.penColor||"black",this.backgroundColor=r.backgroundColor||"rgba(0,0,0,0)",this.onBegin=r.onBegin,this.onEnd=r.onEnd,this._canvas=e,this._ctx=e.getContext("2d"),this.clear(),this._handleMouseDown=function(e){1===e.which&&(n._mouseButtonDown=!0,n._strokeBegin(e))},this._handleMouseMove=function(e){n._mouseButtonDown&&n._strokeMoveUpdate(e)},this._handleMouseUp=function(e){1===e.which&&n._mouseButtonDown&&(n._mouseButtonDown=!1,n._strokeEnd(e))},this._handleTouchStart=function(e){if(1===e.targetTouches.length){var t=e.changedTouches[0];n._strokeBegin(t)}},this._handleTouchMove=function(e){e.preventDefault();var t=e.targetTouches[0];n._strokeMoveUpdate(t)},this._handleTouchEnd=function(e){e.target===n._canvas&&(e.preventDefault(),n._strokeEnd(e))},this.on()}n.r(t),r.prototype.velocityFrom=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):1},r.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},r.prototype.equals=function(e){return this.x===e.x&&this.y===e.y&&this.time===e.time},o.prototype.length=function(){for(var e=0,t=void 0,n=void 0,r=0;r<=10;r+=1){var o=r/10,i=this._point(o,this.startPoint.x,this.control1.x,this.control2.x,this.endPoint.x),a=this._point(o,this.startPoint.y,this.control1.y,this.control2.y,this.endPoint.y);if(r>0){var s=i-t,u=a-n;e+=Math.sqrt(s*s+u*u)}t=i,n=a}return e},o.prototype._point=function(e,t,n,r,o){return t*(1-e)*(1-e)*(1-e)+3*n*(1-e)*(1-e)*e+3*r*(1-e)*e*e+o*e*e*e},i.prototype.clear=function(){var e=this._ctx,t=this._canvas;e.fillStyle=this.backgroundColor,e.clearRect(0,0,t.width,t.height),e.fillRect(0,0,t.width,t.height),this._data=[],this._reset(),this._isEmpty=!0},i.prototype.fromDataURL=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Image,o=n.ratio||window.devicePixelRatio||1,i=n.width||this._canvas.width/o,a=n.height||this._canvas.height/o;this._reset(),r.src=e,r.onload=function(){t._ctx.drawImage(r,0,0,i,a)},this._isEmpty=!1},i.prototype.toDataURL=function(e){var t;if("image/svg+xml"===e)return this._toSVG();for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=this._canvas).toDataURL.apply(t,[e].concat(r))},i.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},i.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),document.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},i.prototype.isEmpty=function(){return this._isEmpty},i.prototype._strokeBegin=function(e){this._data.push([]),this._reset(),this._strokeUpdate(e),"function"===typeof this.onBegin&&this.onBegin(e)},i.prototype._strokeUpdate=function(e){var t=e.clientX,n=e.clientY,r=this._createPoint(t,n),o=this._data[this._data.length-1],i=o&&o[o.length-1],a=i&&r.distanceTo(i)<this.minDistance;if(!i||!a){var s=this._addPoint(r),u=s.curve,l=s.widths;u&&l&&this._drawCurve(u,l.start,l.end),this._data[this._data.length-1].push({x:r.x,y:r.y,time:r.time,color:this.penColor})}},i.prototype._strokeEnd=function(e){var t=this.points.length>2,n=this.points[0];if(!t&&n&&this._drawDot(n),n){var r=this._data[this._data.length-1],o=r[r.length-1];n.equals(o)||r.push({x:n.x,y:n.y,time:n.time,color:this.penColor})}"function"===typeof this.onEnd&&this.onEnd(e)},i.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),document.addEventListener("mouseup",this._handleMouseUp)},i.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},i.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._ctx.fillStyle=this.penColor},i.prototype._createPoint=function(e,t,n){var o=this._canvas.getBoundingClientRect();return new r(e-o.left,t-o.top,n||(new Date).getTime())},i.prototype._addPoint=function(e){var t=this.points;if(t.push(e),t.length>2){3===t.length&&t.unshift(t[0]);var n=this._calculateCurveControlPoints(t[0],t[1],t[2]).c2,r=this._calculateCurveControlPoints(t[1],t[2],t[3]).c1,i=new o(t[1],n,r,t[2]),a=this._calculateCurveWidths(i);return t.shift(),{curve:i,widths:a}}return{}},i.prototype._calculateCurveControlPoints=function(e,t,n){var o=e.x-t.x,i=e.y-t.y,a=t.x-n.x,s=t.y-n.y,u=(e.x+t.x)/2,l=(e.y+t.y)/2,c=(t.x+n.x)/2,d=(t.y+n.y)/2,f=Math.sqrt(o*o+i*i),p=Math.sqrt(a*a+s*s),h=p/(f+p),m=c+(u-c)*h,v=d+(l-d)*h,g=t.x-m,y=t.y-v;return{c1:new r(u+g,l+y),c2:new r(c+g,d+y)}},i.prototype._calculateCurveWidths=function(e){var t=e.startPoint,n=e.endPoint,r={start:null,end:null},o=this.velocityFilterWeight*n.velocityFrom(t)+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(o);return r.start=this._lastWidth,r.end=i,this._lastVelocity=o,this._lastWidth=i,r},i.prototype._strokeWidth=function(e){return Math.max(this.maxWidth/(e+1),this.minWidth)},i.prototype._drawPoint=function(e,t,n){var r=this._ctx;r.moveTo(e,t),r.arc(e,t,n,0,2*Math.PI,!1),this._isEmpty=!1},i.prototype._drawCurve=function(e,t,n){var r=this._ctx,o=n-t,i=Math.floor(e.length());r.beginPath();for(var a=0;a<i;a+=1){var s=a/i,u=s*s,l=u*s,c=1-s,d=c*c,f=d*c,p=f*e.startPoint.x;p+=3*d*s*e.control1.x,p+=3*c*u*e.control2.x,p+=l*e.endPoint.x;var h=f*e.startPoint.y;h+=3*d*s*e.control1.y,h+=3*c*u*e.control2.y,h+=l*e.endPoint.y;var m=t+l*o;this._drawPoint(p,h,m)}r.closePath(),r.fill()},i.prototype._drawDot=function(e){var t=this._ctx,n="function"===typeof this.dotSize?this.dotSize():this.dotSize;t.beginPath(),this._drawPoint(e.x,e.y,n),t.closePath(),t.fill()},i.prototype._fromData=function(e,t,n){for(var o=0;o<e.length;o+=1){var i=e[o];if(i.length>1)for(var a=0;a<i.length;a+=1){var s=i[a],u=new r(s.x,s.y,s.time),l=s.color;if(0===a)this.penColor=l,this._reset(),this._addPoint(u);else if(a!==i.length-1){var c=this._addPoint(u),d=c.curve,f=c.widths;d&&f&&t(d,f,l)}}else this._reset(),n(i[0])}},i.prototype._toSVG=function(){var e=this,t=this._data,n=this._canvas,r=Math.max(window.devicePixelRatio||1,1),o=n.width/r,i=n.height/r,a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"width",n.width),a.setAttributeNS(null,"height",n.height),this._fromData(t,(function(e,t,n){var r=document.createElement("path");if(!isNaN(e.control1.x)&&!isNaN(e.control1.y)&&!isNaN(e.control2.x)&&!isNaN(e.control2.y)){var o="M "+e.startPoint.x.toFixed(3)+","+e.startPoint.y.toFixed(3)+" C "+e.control1.x.toFixed(3)+","+e.control1.y.toFixed(3)+" "+e.control2.x.toFixed(3)+","+e.control2.y.toFixed(3)+" "+e.endPoint.x.toFixed(3)+","+e.endPoint.y.toFixed(3);r.setAttribute("d",o),r.setAttribute("stroke-width",(2.25*t.end).toFixed(3)),r.setAttribute("stroke",n),r.setAttribute("fill","none"),r.setAttribute("stroke-linecap","round"),a.appendChild(r)}}),(function(t){var n=document.createElement("circle"),r="function"===typeof e.dotSize?e.dotSize():e.dotSize;n.setAttribute("r",r),n.setAttribute("cx",t.x),n.setAttribute("cy",t.y),n.setAttribute("fill",t.color),a.appendChild(n)}));var s='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+o+" "+i+'" width="'+o+'" height="'+i+'">',u=a.innerHTML;if(void 0===u){var l=document.createElement("dummy"),c=a.childNodes;l.innerHTML="";for(var d=0;d<c.length;d+=1)l.appendChild(c[d].cloneNode(!0));u=l.innerHTML}return"data:image/svg+xml;base64,"+btoa(s+u+"</svg>")},i.prototype.fromData=function(e){var t=this;this.clear(),this._fromData(e,(function(e,n){return t._drawCurve(e,n.start,n.end)}),(function(e){return t._drawDot(e)})),this._data=e},i.prototype.toData=function(){return this._data},t.default=i}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},n.d(i,a),i}}(),n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".6711d82f.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="customer-portal:";n.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var s,u;if(void 0!==i)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var d=l[c];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){s=d;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var f=function(t,n){s.onerror=s.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),u&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){var e={179:0};n.f.j=function(t,r){var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise((function(n,r){o=e[t]=[n,r]}));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var o,i,a=r[0],s=r[1],u=r[2],l=0;if(a.some((function(t){return 0!==e[t]}))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(u)u(n)}for(t&&t(r);l<a.length;l++)i=a[l],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkcustomer_portal=self.webpackChunkcustomer_portal||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e,t=n(2791),r=n.t(t,2),o=n(4164);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(e){if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function v(e){return v="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},v(e)}function g(e,t){if(t&&("object"===v(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){var t=m();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function w(e,t,n){return w=m()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&f(o,n.prototype),o},w.apply(null,arguments)}function b(e){var t="function"===typeof Map?new Map:void 0;return b=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return w(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},b(e)}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));var E,x="popstate";function S(e){return{usr:e.state,key:e.key}}function C(e,t,n,r){return void 0===n&&(n=null),_({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?A(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function I(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,o=void 0===r?"":r,i=e.hash,a=void 0===i?"":i;return o&&"?"!==o&&(n+="?"===o.charAt(0)?o:"?"+o),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function A(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function O(t,n,r,o){void 0===o&&(o={});var i=o,a=i.window,s=void 0===a?document.defaultView:a,u=i.v5Compat,l=void 0!==u&&u,c=s.history,d=e.Pop,f=null;function p(){d=e.Pop,f&&f({action:d,location:h.location})}var h={get action(){return d},get location(){return t(s,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(x,p),f=e,function(){s.removeEventListener(x,p),f=null}},createHref:function(e){return n(s,e)},push:function(t,n){d=e.Push;var o=C(h.location,t,n);r&&r(o,t);var i=S(o),a=h.createHref(o);try{c.pushState(i,"",a)}catch(u){s.location.assign(a)}l&&f&&f({action:d,location:o})},replace:function(t,n){d=e.Replace;var o=C(h.location,t,n);r&&r(o,t);var i=S(o),a=h.createHref(o);c.replaceState(i,"",a),l&&f&&f({action:d,location:o})},go:function(e){return c.go(e)}};return h}function N(e,t,n){void 0===n&&(n="/");var r=M(("string"===typeof t?A(t):t).pathname||"/",n);if(null==r)return null;var o=T(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var i=null,a=0;null==i&&a<o.length;++a)i=D(o[a],r);return i}function T(e,t,n,r){return void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=""),e.forEach((function(e,o){var i={relativePath:e.path||"",caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(L(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));var a=U([r,i.relativePath]),s=n.concat(i);e.children&&e.children.length>0&&(L(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),T(e.children,t,s,a)),(null!=e.path||e.index)&&t.push({path:a,score:j(a,e.index),routesMeta:s})})),t}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(E||(E={}));var k=/^:\w+$/,R=function(e){return"*"===e};function j(e,t){var n=e.split("/"),r=n.length;return n.some(R)&&(r+=-2),t&&(r+=2),n.filter((function(e){return!R(e)})).reduce((function(e,t){return e+(k.test(t)?3:""===t?1:10)}),r)}function D(e,t){for(var n=e.routesMeta,r={},o="/",i=[],a=0;a<n.length;++a){var s=n[a],u=a===n.length-1,l="/"===o?t:t.slice(o.length)||"/",c=P({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!c)return null;Object.assign(r,c.params);var d=s.route;i.push({params:r,pathname:U([o,c.pathname]),pathnameBase:H(U([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=U([o,c.pathnameBase]))}return i}function P(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);F("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(function(e,t){return r.push(t),"([^\\/]+)"}));e.endsWith("*")?(r.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");return[new RegExp(o,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),r=s(n,2),o=r[0],i=r[1],a=t.match(o);if(!a)return null;var u=a[0],l=u.replace(/(.)\/+$/,"$1"),c=a.slice(1),d=i.reduce((function(e,t,n){if("*"===t){var r=c[n]||"";l=u.slice(0,u.length-r.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return F(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(c[n]||"",t),e}),{});return{params:d,pathname:u,pathnameBase:l,pattern:e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function L(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function F(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function B(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function V(e,t,n,r){var o;void 0===r&&(r=!1),"string"===typeof e?o=A(e):(L(!(o=_({},e)).pathname||!o.pathname.includes("?"),B("?","pathname","search",o)),L(!o.pathname||!o.pathname.includes("#"),B("#","pathname","hash",o)),L(!o.search||!o.search.includes("#"),B("#","search","hash",o)));var i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(r||null==s)i=n;else{var u=t.length-1;if(s.startsWith("..")){for(var l=s.split("/");".."===l[0];)l.shift(),u-=1;o.pathname=l.join("/")}i=u>=0?t[u]:"/"}var c=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?A(e):e,r=n.pathname,o=n.search,i=void 0===o?"":o,a=n.hash,s=void 0===a?"":a,u=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:u,search:z(i),hash:G(s)}}(o,i),d=s&&"/"!==s&&s.endsWith("/"),f=(a||"."===s)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!f||(c.pathname+="/"),c}var U=function(e){return e.join("/").replace(/\/\/+/g,"/")},H=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},z=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},G=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},W=function(e){p(n,e);var t=y(n);function n(){return l(this,n),t.apply(this,arguments)}return d(n)}(b(Error));var X=d((function e(t,n,r){l(this,e),this.status=t,this.statusText=n||"",this.data=r}));function Y(e){return e instanceof X}function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q.apply(this,arguments)}var K="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},Z=t.useState,J=t.useEffect,$=t.useLayoutEffect,Q=t.useDebugValue;function ee(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!K(n,r)}catch(o){return!0}}"undefined"===typeof window||"undefined"===typeof window.document||window.document.createElement;var te=t.createContext(null);var ne=t.createContext(null);var re=t.createContext(null);var oe=t.createContext(null);var ie=t.createContext(null);var ae=t.createContext(null);var se=t.createContext({outlet:null,matches:[]});var ue=t.createContext(null);function le(){return null!=t.useContext(ae)}function ce(){return le()||L(!1),t.useContext(ae).location}function de(e){return e.filter((function(t,n){return 0===n||!t.route.index&&t.pathnameBase!==e[n-1].pathnameBase}))}function fe(){le()||L(!1);var e=t.useContext(ie),n=e.basename,r=e.navigator,o=t.useContext(se).matches,i=ce().pathname,a=JSON.stringify(de(o).map((function(e){return e.pathnameBase}))),s=t.useRef(!1);t.useEffect((function(){s.current=!0}));var u=t.useCallback((function(e,t){if(void 0===t&&(t={}),s.current)if("number"!==typeof e){var o=V(e,JSON.parse(a),i,"path"===t.relative);"/"!==n&&(o.pathname="/"===o.pathname?n:U([n,o.pathname])),(t.replace?r.replace:r.push)(o,t.state,t)}else r.go(e)}),[n,r,a,i]);return u}var pe=t.createContext(null);function he(){var e=t.useContext(se).matches,n=e[e.length-1];return n?n.params:{}}function me(e,n){var r=(void 0===n?{}:n).relative,o=t.useContext(se).matches,i=ce().pathname,a=JSON.stringify(de(o).map((function(e){return e.pathnameBase})));return t.useMemo((function(){return V(e,JSON.parse(a),i,"path"===r)}),[e,a,i,r])}function ve(){var e=function(){var e,n=t.useContext(ue),r=Ee(ye.UseRouteError),o=t.useContext(se),i=o.matches[o.matches.length-1];if(n)return n;return o||L(!1),!i.route.id&&L(!1),null==(e=r.errors)?void 0:e[i.route.id]}(),n=Y(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},a={padding:"2px 4px",backgroundColor:o};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unhandled Thrown Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),r?t.createElement("pre",{style:i},r):null,t.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),t.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own\xa0",t.createElement("code",{style:a},"errorElement")," props on\xa0",t.createElement("code",{style:a},"<Route>")))}var ge,ye,we=function(e){p(r,e);var n=y(r);function r(e){var t;return l(this,r),(t=n.call(this,e)).state={location:e.location,error:e.error},t}return d(r,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?t.createElement(ue.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}}]),r}(t.Component);function be(e){var n=e.routeContext,r=e.match,o=e.children,i=t.useContext(te);return i&&r.route.errorElement&&(i._deepestRenderedBoundaryId=r.route.id),t.createElement(se.Provider,{value:n},o)}function _e(e,n,r){if(void 0===n&&(n=[]),null==e){if(null==r||!r.errors)return null;e=r.matches}var o=e,i=null==r?void 0:r.errors;if(null!=i){var a=o.findIndex((function(e){return e.route.id&&(null==i?void 0:i[e.route.id])}));a>=0||L(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((function(e,a,s){var u=a.route.id?null==i?void 0:i[a.route.id]:null,l=r?a.route.errorElement||t.createElement(ve,null):null,c=function(){return t.createElement(be,{match:a,routeContext:{outlet:e,matches:n.concat(o.slice(0,s+1))}},u?l:void 0!==a.route.element?a.route.element:e)};return r&&(a.route.errorElement||0===s)?t.createElement(we,{location:r.location,component:l,error:u,children:c()}):c()}),null)}function Ee(e){var n=t.useContext(re);return n||L(!1),n}!function(e){e.UseRevalidator="useRevalidator"}(ge||(ge={})),function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(ye||(ye={}));var xe;function Se(e){var n=e.to,r=e.replace,o=e.state,i=e.relative;le()||L(!1);var a=t.useContext(re),s=fe();return t.useEffect((function(){a&&"idle"!==a.navigation.state||s(n,{replace:r,state:o,relative:i})})),null}function Ce(e){return function(e){var n=t.useContext(se).outlet;return n?t.createElement(pe.Provider,{value:e},n):n}(e.context)}function Ie(e){L(!1)}function Ae(n){var r=n.basename,o=void 0===r?"/":r,i=n.children,a=void 0===i?null:i,s=n.location,u=n.navigationType,l=void 0===u?e.Pop:u,c=n.navigator,d=n.static,f=void 0!==d&&d;le()&&L(!1);var p=o.replace(/^\/*/,"/"),h=t.useMemo((function(){return{basename:p,navigator:c,static:f}}),[p,c,f]);"string"===typeof s&&(s=A(s));var m=s,v=m.pathname,g=void 0===v?"/":v,y=m.search,w=void 0===y?"":y,b=m.hash,_=void 0===b?"":b,E=m.state,x=void 0===E?null:E,S=m.key,C=void 0===S?"default":S,I=t.useMemo((function(){var e=M(g,p);return null==e?null:{pathname:e,search:w,hash:_,state:x,key:C}}),[p,g,w,_,x,C]);return null==I?null:t.createElement(ie.Provider,{value:h},t.createElement(ae.Provider,{children:a,value:{location:I,navigationType:l}}))}function Oe(n){var r=n.children,o=n.location,i=t.useContext(ne);return function(n,r){le()||L(!1);var o,i=t.useContext(re),a=t.useContext(se).matches,s=a[a.length-1],u=s?s.params:{},l=(s&&s.pathname,s?s.pathnameBase:"/"),c=(s&&s.route,ce());if(r){var d,f="string"===typeof r?A(r):r;"/"===l||(null==(d=f.pathname)?void 0:d.startsWith(l))||L(!1),o=f}else o=c;var p=o.pathname||"/",h=N(n,{pathname:"/"===l?p:p.slice(l.length)||"/"}),m=_e(h&&h.map((function(e){return Object.assign({},e,{params:Object.assign({},u,e.params),pathname:U([l,e.pathname]),pathnameBase:"/"===e.pathnameBase?l:U([l,e.pathnameBase])})})),a,i||void 0);return r?t.createElement(ae.Provider,{value:{location:q({pathname:"/",search:"",hash:"",state:null,key:"default"},o),navigationType:e.Pop}},m):m}(i&&!r?i.router.routes:Te(r),o)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(xe||(xe={}));var Ne=new Promise((function(){}));t.Component;function Te(e,n){void 0===n&&(n=[]);var r=[];return t.Children.forEach(e,(function(e,o){if(t.isValidElement(e))if(e.type!==t.Fragment){e.type!==Ie&&L(!1),e.props.index&&e.props.children&&L(!1);var i=[].concat(u(n),[o]),a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(a.children=Te(e.props.children,i)),r.push(a)}else r.push.apply(r,Te(e.props.children,n))})),r}function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}function Re(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var je=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],De=["aria-current","caseSensitive","className","end","style","to","children"];function Pe(e){var n=e.basename,r=e.children,o=e.window,i=t.useRef();null==i.current&&(i.current=function(e){return void 0===e&&(e={}),O((function(e,t){var n=e.location;return C("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:I(t)}),null,e)}({window:o,v5Compat:!0}));var a=i.current,u=s(t.useState({action:a.action,location:a.location}),2),l=u[0],c=u[1];return t.useLayoutEffect((function(){return a.listen(c)}),[a]),t.createElement(Ae,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a})}var Me=t.forwardRef((function(e,n){var r=e.onClick,o=e.relative,i=e.reloadDocument,a=e.replace,s=e.state,u=e.target,l=e.to,c=e.preventScrollReset,d=Re(e,je),f=function(e,n){var r=(void 0===n?{}:n).relative;le()||L(!1);var o=t.useContext(ie),i=o.basename,a=o.navigator,s=me(e,{relative:r}),u=s.hash,l=s.pathname,c=s.search,d=l;return"/"!==i&&(d="/"===l?i:U([i,l])),a.createHref({pathname:d,search:c,hash:u})}(l,{relative:o}),p=function(e,n){var r=void 0===n?{}:n,o=r.target,i=r.replace,a=r.state,s=r.preventScrollReset,u=r.relative,l=fe(),c=ce(),d=me(e,{relative:u});return t.useCallback((function(t){if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,o)){t.preventDefault();var n=void 0!==i?i:I(c)===I(d);l(e,{replace:n,state:a,preventScrollReset:s,relative:u})}}),[c,l,d,i,a,o,e,s,u])}(l,{replace:a,state:s,target:u,preventScrollReset:c,relative:o});return t.createElement("a",ke({},d,{href:f,onClick:i?r:function(e){r&&r(e),e.defaultPrevented||p(e)},ref:n,target:u}))}));var Le=t.forwardRef((function(e,n){var r,o=e["aria-current"],i=void 0===o?"page":o,a=e.caseSensitive,s=void 0!==a&&a,u=e.className,l=void 0===u?"":u,c=e.end,d=void 0!==c&&c,f=e.style,p=e.to,h=e.children,m=Re(e,De),v=me(p),g=function(e){le()||L(!1);var n=ce().pathname;return t.useMemo((function(){return P(e,n)}),[n,e])}({path:v.pathname,end:d,caseSensitive:s}),y=t.useContext(re),w=null==y?void 0:y.navigation.location,b=me(w||""),_=null!=t.useMemo((function(){return w?P({path:v.pathname,end:d,caseSensitive:s},b.pathname):null}),[w,v.pathname,s,d,b.pathname]),E=null!=g,x=E?i:void 0;r="function"===typeof l?l({isActive:E,isPending:_}):[l,E?"active":null,_?"pending":null].filter(Boolean).join(" ");var S="function"===typeof f?f({isActive:E,isPending:_}):f;return t.createElement(Me,ke({},m,{"aria-current":x,className:r,ref:n,style:S,to:p}),"function"===typeof h?h({isActive:E,isPending:_}):h)}));var Fe,Be;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Fe||(Fe={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Be||(Be={}));function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){Ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ze=n(4569),Ge=n.n(ze),We=null,Xe=null;Xe=(We="https://api.vandermarkzorghulpmiddelen.nl/Rest/Pwa")+"/image.php";var Ye=We,qe=Xe,Ke=function(){var e={"Content-Type":"application/json"},t=JSON.parse(localStorage.getItem("auth"));return t&&t.token&&(e=He(He({},e),{},{"X-Auth-Token":t.token})),{headers:e}},Ze=n.p+"static/media/logo-vandermark.2520de625e0d894b490e.jpg",Je=n(184);function $e(e){var n=e.parents,r=e.current,o=s((0,t.useState)(),2),i=o[0],a=o[1],u=s((0,t.useState)(!1),2),l=u[0],c=u[1],d=JSON.parse(localStorage.getItem("auth")),f=JSON.parse(localStorage.getItem("routes-tree")),p=JSON.parse(localStorage.getItem("main-menu"));void 0!==f&&void 0===i&&function(){if(void 0!==r){var e=[],t=void 0===n?[]:n.split("/"),o=void 0===n?r:n.replace("/","_")+"_"+r;if("home"!==r&&void 0!==r){void 0!==r&&t.push(r);var i=[];t.forEach((function(t){i.push(t);var n=i.join("_");void 0!==f[n]&&n!==o&&void 0!==f[n].pageTitle&&null!==f[n].pageTitle&&e.push({path:"/"+i.join("/"),title:f[n].pageTitle,segment:t})})),a(e)}else a(e)}else a([])}();var h=function(){c(!1)};return(0,Je.jsx)("div",{className:"topbar",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("div",{className:"row",children:(0,Je.jsx)("div",{className:"col-12",children:(0,Je.jsxs)("div",{className:"topbar__inner",children:[void 0!==i&&0===i.length&&(0,Je.jsx)("div",{className:"topbar__logo",children:(0,Je.jsx)("img",{src:Ze,alt:"Logo Van der Mark",height:"24"})}),null!==d&&(0,Je.jsxs)(Je.Fragment,{children:[void 0!==i&&null!==i&&i.length>0&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("a",{href:"/home",className:"trail-segment topbar__home",children:"\xa0"},"bread-crumb-home"),(0,Je.jsx)("div",{className:"bread-crumb-trail",children:i.map((function(e,t){return(0,Je.jsx)("a",{href:e.path,className:"trail-segment topbar__previous",children:(0,Je.jsx)("div",{className:"topbar__title topbar__title--"+(0===t?"icon topbar__title--"+e.segment:"segment"),children:e.title})},"bread-crumb-"+e.segment)}))})]}),(0,Je.jsx)("div",{className:"topbar__right",children:(0,Je.jsx)("div",{className:"topbar__user",children:(0,Je.jsxs)("nav",{className:"user-dropdown ".concat(l?"user-dropdown--active":""),children:[(0,Je.jsxs)("div",{className:"user-dropdown__top",onClick:function(){c(!l)},children:[(0,Je.jsx)("div",{className:"icon icon--user"}),(0,Je.jsx)("div",{className:"user-dropdown__name",children:d.fullName})]}),(0,Je.jsx)("nav",{className:"user-dropdown__bottom",children:(0,Je.jsx)("nav",{className:"user-dropdown__bottom__items",id:"user-dropdown__bottom__items",children:void 0!==p&&null!==p&&p.length>0&&(0,Je.jsxs)("ul",{className:"main-menu",children:[p.map((function(e,t){return(0,Je.jsx)("li",{children:(0,Je.jsx)(Le,{to:e.path,onClick:function(){return h()},children:e.title})},e.path.replace("/","-"))})),(0,Je.jsx)("li",{children:(0,Je.jsx)(Le,{to:"https://www.vandermarkzorghulpmiddelen.nl/aanvraag/",onClick:function(){return h()},children:"Aanvraag ZVW"})}),(0,Je.jsx)("li",{children:(0,Je.jsx)(Le,{to:"/auth/logout",onClick:function(){return h()},children:"Uitloggen"})})]})})})]})})})]})]})})})})})}function Qe(){Qe=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(A){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=u;var c={};function d(){}function f(){}function p(){}var h={};s(h,o,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(C([])));g&&g!==t&&n.call(g,o)&&(h=g);var y=p.prototype=d.prototype=Object.create(h);function w(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function r(o,i,a,s){var u=l(e[o],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==v(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var o;this._invoke=function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=p,s(y,"constructor",p),s(p,"constructor",f),f.displayName=s(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,s(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},w(b.prototype),s(b.prototype,i,(function(){return this})),e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(u(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(y),s(y,a,"Generator"),s(y,o,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function et(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(l){return void n(l)}s.done?t(u):Promise.resolve(u).then(r,o)}function tt(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){et(i,r,o,a,s,"next",e)}function s(e){et(i,r,o,a,s,"throw",e)}a(void 0)}))}}function nt(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw i}}}}function rt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ot=["name"],it=["_f"],at=["_f"],st=function(e){return"checkbox"===e.type},ut=function(e){return e instanceof Date},lt=function(e){return null==e},ct=function(e){return"object"===typeof e},dt=function(e){return!lt(e)&&!Array.isArray(e)&&ct(e)&&!ut(e)},ft=function(e){return dt(e)&&e.target?st(e.target)?e.target.checked:e.target.value:e},pt=function(e,t){return e.has(function(e){return e.substring(0,e.search(/\.\d+(\.|$)/))||e}(t))},ht=function(e){return Array.isArray(e)?e.filter(Boolean):[]},mt=function(e){return void 0===e},vt=function(e,t,n){if(!t||!dt(e))return n;var r=ht(t.split(/[,[\].]+?/)).reduce((function(e,t){return lt(e)?e:e[t]}),e);return mt(r)||r===e?mt(e[t])?n:e[t]:r},gt="blur",yt="focusout",wt="change",bt="onBlur",_t="onChange",Et="onSubmit",xt="onTouched",St="all",Ct="max",It="min",At="maxLength",Ot="minLength",Nt="pattern",Tt="required",kt="validate",Rt=t.createContext(null),jt=function(){return t.useContext(Rt)},Dt=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o={},i=function(i){Object.defineProperty(o,i,{get:function(){var o=i;return t[o]!==St&&(t[o]=!r||St),n&&(n[o]=!0),e[o]}})};for(var a in e)i(a);return o},Pt=function(e){return dt(e)&&!Object.keys(e).length},Mt=function(e,t,n){e.name;var r=rt(e,ot);return Pt(r)||Object.keys(r).length>=Object.keys(t).length||Object.keys(r).find((function(e){return t[e]===(!n||St)}))},Lt=function(e){return Array.isArray(e)?e:[e]},Ft=function(e,t,n){return n&&t?e===t:!e||!t||e===t||Lt(e).some((function(e){return e&&(e.startsWith(t)||t.startsWith(e))}))};function Bt(e){var n=t.useRef(e);n.current=e,t.useEffect((function(){var t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return function(){return function(e){e&&e.unsubscribe()}(t)}}),[e.disabled])}var Vt=function(e){return"string"===typeof e},Ut=function(e,t,n,r){var o=Array.isArray(e);return Vt(e)?(r&&t.watch.add(e),vt(n,e)):o?e.map((function(e){return r&&t.watch.add(e),vt(n,e)})):(r&&(t.watchAll=!0),n)},Ht=function(e){return"function"===typeof e},zt=function(e){for(var t in e)if(Ht(e[t]))return!0;return!1};function Gt(e){var n=jt(),r=e.name,o=e.control,i=void 0===o?n.control:o,a=e.shouldUnregister,l=pt(i._names.array,r),c=function(e){var n=jt(),r=e||{},o=r.control,i=void 0===o?n.control:o,a=r.name,l=r.defaultValue,c=r.disabled,d=r.exact,f=t.useRef(a);f.current=a;var p=t.useCallback((function(e){if(Ft(f.current,e.name,d)){var t=Ut(f.current,i._names,e.values||i._formValues);v(mt(f.current)||dt(t)&&!zt(t)?He({},t):Array.isArray(t)?u(t):mt(t)?l:t)}}),[i,d,l]);Bt({disabled:c,subject:i._subjects.watch,callback:p});var h=s(t.useState(mt(l)?i._getWatch(a):l),2),m=h[0],v=h[1];return t.useEffect((function(){i._removeUnmounted()})),m}({control:i,name:r,defaultValue:vt(i._formValues,r,vt(i._defaultValues,r,e.defaultValue)),exact:!0}),d=function(e){var n=jt(),r=e||{},o=r.control,i=void 0===o?n.control:o,a=r.disabled,u=r.name,l=r.exact,c=s(t.useState(i._formState),2),d=c[0],f=c[1],p=t.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),h=t.useRef(u),m=t.useRef(!0);return h.current=u,Bt({disabled:a,callback:t.useCallback((function(e){return m.current&&Ft(h.current,e.name,l)&&Mt(e,p.current)&&f(He(He({},i._formState),e))}),[i,l]),subject:i._subjects.state}),t.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]),Dt(d,i._proxyFormState,p.current,!1)}({control:i,name:r}),f=t.useRef(i.register(r,He(He({},e.rules),{},{value:c})));return t.useEffect((function(){var e=function(e,t){var n=vt(i._fields,e);n&&(n._f.mount=t)};return e(r,!0),function(){var t=i._options.shouldUnregister||a;(l?t&&!i._stateFlags.action:t)?i.unregister(r):e(r,!1)}}),[r,i,l,a]),{field:{name:r,value:c,onChange:t.useCallback((function(e){f.current.onChange({target:{value:ft(e),name:r},type:wt})}),[r]),onBlur:t.useCallback((function(){f.current.onBlur({target:{value:vt(i._formValues,r),name:r},type:gt})}),[r,i]),ref:t.useCallback((function(e){var t=vt(i._fields,r);e&&t&&e.focus&&(t._f.ref={focus:function(){return e.focus()},select:function(){return e.select()},setCustomValidity:function(t){return e.setCustomValidity(t)},reportValidity:function(){return e.reportValidity()}})}),[r,i._fields])},formState:d,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:function(){return!!vt(d.errors,r)}},isDirty:{enumerable:!0,get:function(){return!!vt(d.dirtyFields,r)}},isTouched:{enumerable:!0,get:function(){return!!vt(d.touchedFields,r)}},error:{enumerable:!0,get:function(){return vt(d.errors,r)}}})}}var Wt=function(e){return e.render(Gt(e))},Xt=function(e,t,n,r,o){return t?He(He({},n[e]),{},{types:He(He({},n[e]&&n[e].types?n[e].types:{}),{},Ve({},r,o||!0))}):{}},Yt=function(e){return/^\w*$/.test(e)},qt=function(e){return ht(e.replace(/["|']|\]/g,"").split(/\.|\[/))};function Kt(e,t,n){for(var r=-1,o=Yt(t)?[t]:qt(t),i=o.length,a=i-1;++r<i;){var s=o[r],u=n;if(r!==a){var l=e[s];u=dt(l)||Array.isArray(l)?l:isNaN(+o[r+1])?{}:[]}e[s]=u,e=e[s]}return e}var Zt=function e(t,n,r){var o,i=nt(r||Object.keys(t));try{for(i.s();!(o=i.n()).done;){var a=o.value,s=vt(t,a);if(s){var u=s._f,l=rt(s,it);if(u&&n(u.name)){if(u.ref.focus&&mt(u.ref.focus()))break;if(u.refs){u.refs[0].focus();break}}else dt(l)&&e(l,n)}}}catch(c){i.e(c)}finally{i.f()}},Jt=function(e,t,n){return!n&&(t.watchAll||t.watch.has(e)||u(t.watch).some((function(t){return e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))})))},$t=function(e,t,n){var r=ht(vt(e,n));return Kt(r,"root",t[n]),Kt(e,n,r),e},Qt=function(e){return"boolean"===typeof e},en=function(e){return"file"===e.type},tn=function(e){return Vt(e)||t.isValidElement(e)},nn=function(e){return"radio"===e.type},rn=function(e){return e instanceof RegExp},on={value:!1,isValid:!1},an={value:!0,isValid:!0},sn=function(e){if(Array.isArray(e)){if(e.length>1){var t=e.filter((function(e){return e&&e.checked&&!e.disabled})).map((function(e){return e.value}));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!mt(e[0].attributes.value)?mt(e[0].value)||""===e[0].value?an:{value:e[0].value,isValid:!0}:an:on}return on},un={isValid:!1,value:null},ln=function(e){return Array.isArray(e)?e.reduce((function(e,t){return t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e}),un):un};function cn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"validate";if(tn(e)||Array.isArray(e)&&e.every(tn)||Qt(e)&&!e)return{type:n,message:tn(e)?e:"",ref:t}}var dn=function(e){return dt(e)&&!rn(e)?e:{value:e,message:""}},fn=function(){var e=tt(Qe().mark((function e(t,n,r,o,i){var a,s,u,l,c,d,f,p,h,m,v,g,y,w,b,_,E,x,S,C,I,A,O,N,T,k,R,j,D,P,M,L,F,B,V,U,H,z,G,W,X,Y,q,K;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t._f,s=a.ref,u=a.refs,l=a.required,c=a.maxLength,d=a.minLength,f=a.min,p=a.max,h=a.pattern,m=a.validate,v=a.name,g=a.valueAsNumber,y=a.mount,w=a.disabled,y&&!w){e.next=3;break}return e.abrupt("return",{});case 3:if(b=u?u[0]:s,_=function(e){o&&b.reportValidity&&(b.setCustomValidity(Qt(e)?"":e||" "),b.reportValidity())},E={},x=nn(s),S=st(s),C=x||S,I=(g||en(s))&&!s.value||""===n||Array.isArray(n)&&!n.length,A=Xt.bind(null,v,r,E),O=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:At,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Ot,i=e?t:n;E[v]=He({type:e?r:o,message:i,ref:s},A(e?r:o,i))},!(i?!Array.isArray(n)||!n.length:l&&(!C&&(I||lt(n))||Qt(n)&&!n||S&&!sn(u).isValid||x&&!ln(u).isValid))){e.next=19;break}if(N=tn(l)?{value:!!l,message:l}:dn(l),T=N.value,k=N.message,!T){e.next=19;break}if(E[v]=He({type:Tt,message:k,ref:b},A(Tt,k)),r){e.next=19;break}return _(k),e.abrupt("return",E);case 19:if(I||lt(f)&&lt(p)){e.next=28;break}if(D=dn(p),P=dn(f),lt(n)||isNaN(n)?(L=s.valueAsDate||new Date(n),Vt(D.value)&&(R=L>new Date(D.value)),Vt(P.value)&&(j=L<new Date(P.value))):(M=s.valueAsNumber||(n?+n:n),lt(D.value)||(R=M>D.value),lt(P.value)||(j=M<P.value)),!R&&!j){e.next=28;break}if(O(!!R,D.message,P.message,Ct,It),r){e.next=28;break}return _(E[v].message),e.abrupt("return",E);case 28:if(!c&&!d||I||!(Vt(n)||i&&Array.isArray(n))){e.next=38;break}if(F=dn(c),B=dn(d),V=!lt(F.value)&&n.length>F.value,U=!lt(B.value)&&n.length<B.value,!V&&!U){e.next=38;break}if(O(V,F.message,B.message),r){e.next=38;break}return _(E[v].message),e.abrupt("return",E);case 38:if(!h||I||!Vt(n)){e.next=45;break}if(H=dn(h),z=H.value,G=H.message,!rn(z)||n.match(z)){e.next=45;break}if(E[v]=He({type:Nt,message:G,ref:s},A(Nt,G)),r){e.next=45;break}return _(G),e.abrupt("return",E);case 45:if(!m){e.next=79;break}if(!Ht(m)){e.next=58;break}return e.next=49,m(n);case 49:if(W=e.sent,!(X=cn(W,b))){e.next=56;break}if(E[v]=He(He({},X),A(kt,X.message)),r){e.next=56;break}return _(X.message),e.abrupt("return",E);case 56:e.next=79;break;case 58:if(!dt(m)){e.next=79;break}Y={},e.t0=Qe().keys(m);case 61:if((e.t1=e.t0()).done){e.next=75;break}if(q=e.t1.value,Pt(Y)||r){e.next=65;break}return e.abrupt("break",75);case 65:return e.t2=cn,e.next=68,m[q](n);case 68:e.t3=e.sent,e.t4=b,e.t5=q,(K=(0,e.t2)(e.t3,e.t4,e.t5))&&(Y=He(He({},K),A(q,K.message)),_(K.message),r&&(E[v]=Y)),e.next=61;break;case 75:if(Pt(Y)){e.next=79;break}if(E[v]=He({ref:b},Y),r){e.next=79;break}return e.abrupt("return",E);case 79:return _(!0),e.abrupt("return",E);case 81:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i){return e.apply(this,arguments)}}();var pn="undefined"!==typeof window&&"undefined"!==typeof window.HTMLElement&&"undefined"!==typeof document;function hn(e){var t,n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(pn&&(e instanceof Blob||e instanceof FileList)||!n&&!dt(e))return e;for(var r in t=n?[]:{},e){if(Ht(e[r])){t=e;break}t[r]=hn(e[r])}}return t}var mn=function(e){return{isOnSubmit:!e||e===Et,isOnBlur:e===bt,isOnChange:e===_t,isOnAll:e===St,isOnTouch:e===xt}};function vn(e){for(var t in e)if(!mt(e[t]))return!1;return!0}function gn(e,t){var n,r=Yt(t)?[t]:qt(t),o=1==r.length?e:function(e,t){for(var n=t.slice(0,-1).length,r=0;r<n;)e=mt(e)?r++:e[t[r++]];return e}(e,r),i=r[r.length-1];o&&delete o[i];for(var a=0;a<r.slice(0,-1).length;a++){var s=-1,u=void 0,l=r.slice(0,-(a+1)),c=l.length-1;for(a>0&&(n=e);++s<l.length;){var d=l[s];u=u?u[d]:e[d],c===s&&(dt(u)&&Pt(u)||Array.isArray(u)&&vn(u))&&(n?delete n[d]:delete e[d]),n=u}}return e}function yn(){var e=[];return{get observers(){return e},next:function(t){var n,r=nt(e);try{for(r.s();!(n=r.n()).done;){n.value.next(t)}}catch(o){r.e(o)}finally{r.f()}},subscribe:function(t){return e.push(t),{unsubscribe:function(){e=e.filter((function(e){return e!==t}))}}},unsubscribe:function(){e=[]}}}var wn=function(e){return lt(e)||!ct(e)};function bn(e,t){if(wn(e)||wn(t))return e===t;if(ut(e)&&ut(t))return e.getTime()===t.getTime();var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0,i=n;o<i.length;o++){var a=i[o],s=e[a];if(!r.includes(a))return!1;if("ref"!==a){var u=t[a];if(ut(s)&&ut(u)||dt(s)&&dt(u)||Array.isArray(s)&&Array.isArray(u)?!bn(s,u):s!==u)return!1}}return!0}var _n=function(e){var t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},En=function(e){return"select-multiple"===e.type},xn=function(e){return nn(e)||st(e)},Sn=function(e){return _n(e)&&e.isConnected};function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(e);if(dt(e)||n)for(var r in e)Array.isArray(e[r])||dt(e[r])&&!zt(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Cn(e[r],t[r])):lt(e[r])||(t[r]=!0);return t}function In(e,t,n){var r=Array.isArray(e);if(dt(e)||r)for(var o in e)Array.isArray(e[o])||dt(e[o])&&!zt(e[o])?mt(t)||wn(n[o])?n[o]=Array.isArray(e[o])?Cn(e[o],[]):He({},Cn(e[o])):In(e[o],lt(t)?{}:t[o],n[o]):n[o]=!bn(e[o],t[o]);return n}var An=function(e,t){return In(e,t,Cn(t))},On=function(e,t){var n=t.valueAsNumber,r=t.valueAsDate,o=t.setValueAs;return mt(e)?e:n?""===e?NaN:e?+e:e:r&&Vt(e)?new Date(e):o?o(e):e};function Nn(e){var t=e.ref;if(!(e.refs?e.refs.every((function(e){return e.disabled})):t.disabled))return en(t)?t.files:nn(t)?ln(e.refs).value:En(t)?u(t.selectedOptions).map((function(e){return e.value})):st(t)?sn(e.refs).value:On(mt(t.value)?e.ref.value:t.value,e)}var Tn=function(e,t,n,r){var o,i={},a=nt(e);try{for(a.s();!(o=a.n()).done;){var s=o.value,l=vt(t,s);l&&Kt(i,s,l._f)}}catch(c){a.e(c)}finally{a.f()}return{criteriaMode:n,names:u(e),fields:i,shouldUseNativeValidation:r}},kn=function(e){return mt(e)?void 0:rn(e)?e.source:dt(e)?rn(e.value)?e.value.source:e.value:e},Rn=function(e){return e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate)};function jn(e,t,n){var r=vt(e,n);if(r||Yt(n))return{error:r,name:n};for(var o=n.split(".");o.length;){var i=o.join("."),a=vt(t,i),s=vt(e,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:n}}var Dn=function(e,t,n,r,o){return!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e)},Pn=function(e,t){return!ht(vt(e,t)).length&&gn(e,t)},Mn={mode:Et,reValidateMode:_t,shouldFocusError:!0};function Ln(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=He(He({},Mn),t),r={isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}},o={},i=hn(n.defaultValues)||{},a=n.shouldUnregister?{}:hn(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c=0,d={},f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={watch:yn(),array:yn(),state:yn()},h=mn(n.mode),m=mn(n.reValidateMode),v=n.criteriaMode===St,g=function(e){return function(t){clearTimeout(c),c=window.setTimeout(e,t)}},y=function(){var e=tt(Qe().mark((function e(t){var i;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!1,!f.isValid){e.next=15;break}if(!n.resolver){e.next=10;break}return e.t1=Pt,e.next=6,S();case 6:e.t2=e.sent.errors,e.t0=(0,e.t1)(e.t2),e.next=13;break;case 10:return e.next=12,I(o,!0);case 12:e.t0=e.sent;case 13:i=e.t0,t||i===r.isValid||(r.isValid=i,p.state.next({isValid:i}));case 15:return e.abrupt("return",i);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0,l=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],c=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(u&&n){if(s.action=!0,c&&Array.isArray(vt(o,e))){var d=n(vt(o,e),u.argA,u.argB);l&&Kt(o,e,d)}if(f.errors&&c&&Array.isArray(vt(r.errors,e))){var h=n(vt(r.errors,e),u.argA,u.argB);l&&Kt(r.errors,e,h),Pn(r.errors,e)}if(f.touchedFields&&c&&Array.isArray(vt(r.touchedFields,e))){var m=n(vt(r.touchedFields,e),u.argA,u.argB);l&&Kt(r.touchedFields,e,m)}f.dirtyFields&&(r.dirtyFields=An(i,a)),p.state.next({isDirty:O(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Kt(a,e,t)},b=function(e,t){Kt(r.errors,e,t),p.state.next({errors:r.errors})},_=function(e,t,n,r){var u=vt(o,e);if(u){var l=vt(a,e,mt(n)?vt(i,e):n);mt(l)||r&&r.defaultChecked||t?Kt(a,e,t?l:Nn(u._f)):k(e,l),s.mount&&y()}},E=function(e,t,n,o,a){var s=!1,u={name:e},l=vt(r.touchedFields,e);if(f.isDirty){var c=r.isDirty;r.isDirty=u.isDirty=O(),s=c!==u.isDirty}if(f.dirtyFields&&(!n||o)){var d=vt(r.dirtyFields,e);bn(vt(i,e),t)?gn(r.dirtyFields,e):Kt(r.dirtyFields,e,!0),u.dirtyFields=r.dirtyFields,s=s||d!==vt(r.dirtyFields,e)}return n&&!l&&(Kt(r.touchedFields,e,n),u.touchedFields=r.touchedFields,s=s||f.touchedFields&&l!==n),s&&a&&p.state.next(u),s?u:{}},x=function(){var n=tt(Qe().mark((function n(o,i,a,s){var u,l,h;return Qe().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:u=vt(r.errors,o),l=f.isValid&&r.isValid!==i,t.delayError&&a?(e=g((function(){return b(o,a)})))(t.delayError):(clearTimeout(c),e=null,a?Kt(r.errors,o,a):gn(r.errors,o)),(a?bn(u,a):!u)&&Pt(s)&&!l||(h=He(He(He({},s),l?{isValid:i}:{}),{},{errors:r.errors,name:o}),r=He(He({},r),h),p.state.next(h)),d[o]--,f.isValidating&&!Object.values(d).some((function(e){return e}))&&(p.state.next({isValidating:!1}),d={});case 6:case"end":return n.stop()}}),n)})));return function(e,t,r,o){return n.apply(this,arguments)}}(),S=function(){var e=tt(Qe().mark((function e(t){return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.resolver){e.next=6;break}return e.next=3,n.resolver(He({},a),n.context,Tn(t||l.mount,o,n.criteriaMode,n.shouldUseNativeValidation));case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0={};case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=tt(Qe().mark((function e(t){var n,o,i,a,s,u;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S();case 2:if(n=e.sent,o=n.errors,t){i=nt(t);try{for(i.s();!(a=i.n()).done;)s=a.value,(u=vt(o,s))?Kt(r.errors,s,u):gn(r.errors,s)}catch(l){i.e(l)}finally{i.f()}}else r.errors=o;return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),I=function(){var e=tt(Qe().mark((function e(t,o){var i,s,u,c,d,f,p,h=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h.length>2&&void 0!==h[2]?h[2]:{valid:!0},e.t0=Qe().keys(t);case 2:if((e.t1=e.t0()).done){e.next=23;break}if(s=e.t1.value,!(u=t[s])){e.next=21;break}if(c=u._f,d=rt(u,at),!c){e.next=17;break}return f=l.array.has(c.name),e.next=11,fn(u,vt(a,c.name),v,n.shouldUseNativeValidation,f);case 11:if(!(p=e.sent)[c.name]){e.next=16;break}if(i.valid=!1,!o){e.next=16;break}return e.abrupt("break",23);case 16:!o&&(vt(p,c.name)?f?$t(r.errors,p,c.name):Kt(r.errors,c.name,p[c.name]):gn(r.errors,c.name));case 17:if(e.t2=d,!e.t2){e.next=21;break}return e.next=21,I(d,o,i);case 21:e.next=2;break;case 23:return e.abrupt("return",i.valid);case 24:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),A=function(){var e,t=nt(l.unMount);try{for(t.s();!(e=t.n()).done;){var n=e.value,r=vt(o,n);r&&(r._f.refs?r._f.refs.every((function(e){return!Sn(e)})):!Sn(r._f.ref))&&U(n)}}catch(i){t.e(i)}finally{t.f()}l.unMount=new Set},O=function(e,t){return e&&t&&Kt(a,e,t),!bn(M(),i)},N=function(e,t,n){var r=He({},s.mount?a:mt(t)?i:Vt(e)?Ve({},e,t):t);return Ut(e,l,r,n)},T=function(e){return ht(vt(s.mount?a:i,e,t.shouldUnregister?vt(i,e,[]):[]))},k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vt(o,e),i=t;if(r){var s=r._f;s&&(!s.disabled&&Kt(a,e,On(t,s)),i=pn&&_n(s.ref)&&lt(t)?"":t,En(s.ref)?u(s.ref.options).forEach((function(e){return e.selected=i.includes(e.value)})):s.refs?st(s.ref)?s.refs.length>1?s.refs.forEach((function(e){return(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((function(t){return t===e.value})):i===e.value)})):s.refs[0]&&(s.refs[0].checked=!!i):s.refs.forEach((function(e){return e.checked=e.value===i})):en(s.ref)?s.ref.value="":(s.ref.value=i,s.ref.type||p.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&E(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(e)},R=function e(t,n,r){for(var i in n){var a=n[i],s="".concat(t,".").concat(i),u=vt(o,s);!l.array.has(t)&&wn(a)&&(!u||u._f)||ut(a)?k(s,a,r):e(s,a,r)}},j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=vt(o,e),u=l.array.has(e),c=hn(t);Kt(a,e,c),u?(p.array.next({name:e,values:a}),(f.isDirty||f.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=An(i,a),p.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:O(e,c)}))):!s||s._f||lt(c)?k(e,c,n):R(e,c,n),Jt(e,l)&&p.state.next({}),p.watch.next({name:e})},D=function(){var t=tt(Qe().mark((function t(i){var s,u,c,f,g,w,b,_,C,I,A,O,N,T,k;return Qe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=i.target,u=s.name,!(c=vt(o,u))){t.next=39;break}if(w=s.type?Nn(c._f):ft(i),b=i.type===gt||i.type===yt,_=!Rn(c._f)&&!n.resolver&&!vt(r.errors,u)&&!c._f.deps||Dn(b,vt(r.touchedFields,u),r.isSubmitted,m,h),C=Jt(u,l,b),Kt(a,u,w),b?(c._f.onBlur&&c._f.onBlur(i),e&&e(0)):c._f.onChange&&c._f.onChange(i),I=E(u,w,b,!1),A=!Pt(I)||C,!b&&p.watch.next({name:u,type:i.type}),!_){t.next=15;break}return t.abrupt("return",A&&p.state.next(He({name:u},C?{}:I)));case 15:if(!b&&C&&p.state.next({}),d[u]=(d[u],1),p.state.next({isValidating:!0}),!n.resolver){t.next=30;break}return t.next=21,S([u]);case 21:O=t.sent,N=O.errors,T=jn(r.errors,o,u),k=jn(N,o,T.name||u),f=k.error,u=k.name,g=Pt(N),t.next=37;break;case 30:return t.next=32,fn(c,vt(a,u),v,n.shouldUseNativeValidation);case 32:return t.t0=u,f=t.sent[t.t0],t.next=36,y(!0);case 36:g=t.sent;case 37:c._f.deps&&P(c._f.deps),x(u,g,f,I);case 39:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),P=function(){var e=tt(Qe().mark((function e(t){var i,a,s,u,c,d=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=d.length>1&&void 0!==d[1]?d[1]:{},u=Lt(t),p.state.next({isValidating:!0}),!n.resolver){e.next=11;break}return e.next=6,C(mt(t)?t:u);case 6:c=e.sent,a=Pt(c),s=t?!u.some((function(e){return vt(c,e)})):a,e.next=21;break;case 11:if(!t){e.next=18;break}return e.next=14,Promise.all(u.map(function(){var e=tt(Qe().mark((function e(t){var n;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=vt(o,t),e.next=3,I(n&&n._f?Ve({},t,n):n);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 14:((s=e.sent.every(Boolean))||r.isValid)&&y(),e.next=21;break;case 18:return e.next=20,I(o);case 20:s=a=e.sent;case 21:return p.state.next(He(He(He({},!Vt(t)||f.isValid&&a!==r.isValid?{}:{name:t}),n.resolver?{isValid:a}:{}),{},{errors:r.errors,isValidating:!1})),i.shouldFocus&&!s&&Zt(o,(function(e){return vt(r.errors,e)}),t?u:l.mount),e.abrupt("return",s);case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(e){var t=He(He({},i),s.mount?a:{});return mt(e)?t:Vt(e)?vt(t,e):e.map((function(e){return vt(t,e)}))},L=function(e,t){return{invalid:!!vt((t||r).errors,e),isDirty:!!vt((t||r).dirtyFields,e),isTouched:!!vt((t||r).touchedFields,e),error:vt((t||r).errors,e)}},F=function(e){e?Lt(e).forEach((function(e){return gn(r.errors,e)})):r.errors={},p.state.next({errors:r.errors})},B=function(e,t,n){var i=(vt(o,e,{_f:{}})._f||{}).ref;Kt(r.errors,e,He(He({},t),{},{ref:i})),p.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},V=function(e,t){return Ht(e)?p.watch.subscribe({next:function(n){return e(N(void 0,t),n)}}):N(e,t,!0)},U=function(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=nt(e?Lt(e):l.mount);try{for(u.s();!(t=u.n()).done;){var c=t.value;l.mount.delete(c),l.array.delete(c),vt(o,c)&&(s.keepValue||(gn(o,c),gn(a,c)),!s.keepError&&gn(r.errors,c),!s.keepDirty&&gn(r.dirtyFields,c),!s.keepTouched&&gn(r.touchedFields,c),!n.shouldUnregister&&!s.keepDefaultValue&&gn(i,c))}}catch(d){u.e(d)}finally{u.f()}p.watch.next({}),p.state.next(He(He({},r),s.keepDirty?{isDirty:O()}:{})),!s.keepIsValid&&y()},H=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=vt(o,t),d=Qt(r.disabled);return Kt(o,t,He(He({},c||{}),{},{_f:He(He({},c&&c._f?c._f:{ref:{name:t}}),{},{name:t,mount:!0},r)})),l.mount.add(t),c?d&&Kt(a,t,r.disabled?void 0:vt(a,t,Nn(c._f))):_(t,!0,r.value),He(He(He({},d?{disabled:r.disabled}:{}),n.shouldUseNativeValidation?{required:!!r.required,min:kn(r.min),max:kn(r.max),minLength:kn(r.minLength),maxLength:kn(r.maxLength),pattern:kn(r.pattern)}:{}),{},{name:t,onChange:D,onBlur:D,ref:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(a){if(a){e(t,r),c=vt(o,t);var d=mt(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,f=xn(d),p=c._f.refs||[];if(f?p.find((function(e){return e===d})):d===c._f.ref)return;Kt(o,t,{_f:He(He({},c._f),f?{refs:[].concat(u(p.filter(Sn)),[d],u(Array.isArray(vt(i,t))?[{}]:[])),ref:{type:d.type,name:t}}:{ref:d})}),_(t,!1,void 0,d)}else(c=vt(o,t,{}))._f&&(c._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!pt(l.array,t)||!s.action)&&l.unMount.add(t)}))})},z=function(e,t){return function(){var i=tt(Qe().mark((function i(s){var u,c,d,f,h;return Qe().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist()),u=!0,c=hn(a),p.state.next({isSubmitting:!0}),i.prev=4,!n.resolver){i.next=15;break}return i.next=8,S();case 8:d=i.sent,f=d.errors,h=d.values,r.errors=f,c=h,i.next=17;break;case 15:return i.next=17,I(o);case 17:if(!Pt(r.errors)){i.next=23;break}return p.state.next({errors:{},isSubmitting:!0}),i.next=21,e(c,s);case 21:i.next=27;break;case 23:if(!t){i.next=26;break}return i.next=26,t(He({},r.errors),s);case 26:n.shouldFocusError&&Zt(o,(function(e){return vt(r.errors,e)}),l.mount);case 27:i.next=33;break;case 29:throw i.prev=29,i.t0=i.catch(4),u=!1,i.t0;case 33:return i.prev=33,r.isSubmitted=!0,p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Pt(r.errors)&&u,submitCount:r.submitCount+1,errors:r.errors}),i.finish(33);case 37:case"end":return i.stop()}}),i,null,[[4,29,33,37]])})));return function(e){return i.apply(this,arguments)}}()},G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vt(o,e)&&(mt(t.defaultValue)?j(e,vt(i,e)):(j(e,t.defaultValue),Kt(i,e,t.defaultValue)),t.keepTouched||gn(r.touchedFields,e),t.keepDirty||(gn(r.dirtyFields,e),r.isDirty=t.defaultValue?O(e,vt(i,e)):O()),t.keepError||(gn(r.errors,e),f.isValid&&y()),p.state.next(He({},r)))},W=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=e||i,c=hn(u),d=e&&!Pt(e)?c:i;if(n.keepDefaultValues||(i=u),!n.keepValues){if(n.keepDirtyValues){var h,m=nt(l.mount);try{for(m.s();!(h=m.n()).done;){var v=h.value;vt(r.dirtyFields,v)?Kt(d,v,vt(a,v)):j(v,vt(d,v))}}catch(E){m.e(E)}finally{m.f()}}else{if(pn&&mt(e)){var g,y=nt(l.mount);try{for(y.s();!(g=y.n()).done;){var w=g.value,b=vt(o,w);if(b&&b._f){var _=Array.isArray(b._f.refs)?b._f.refs[0]:b._f.ref;try{if(_n(_)){_.closest("form").reset();break}}catch(x){}}}}catch(E){y.e(E)}finally{y.f()}}o={}}a=t.shouldUnregister?n.keepDefaultValues?hn(i):{}:c,p.array.next({values:d}),p.watch.next({values:d})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!n.keepIsValid,s.watch=!!t.shouldUnregister,p.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||bn(e,i)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&e?An(i,e):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},X=function(e,t){return W(Ht(e)?e(a):e,t)},Y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=vt(o,e),r=n&&n._f;if(r){var i=r.refs?r.refs[0]:r.ref;i.focus(),t.shouldSelect&&i.select()}};return{control:{register:H,unregister:U,getFieldState:L,_executeSchema:S,_getWatch:N,_getDirty:O,_updateValid:y,_removeUnmounted:A,_updateFieldArray:w,_getFieldArray:T,_subjects:p,_proxyFormState:f,get _fields(){return o},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return i},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n=He(He({},n),e)}},trigger:P,register:H,handleSubmit:z,watch:V,setValue:j,getValues:M,reset:X,resetField:G,clearErrors:F,unregister:U,setError:B,setFocus:Y,getFieldState:L}}function Fn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.useRef(),r=t.useState({isDirty:!1,isValidating:!1,dirtyFields:{},isSubmitted:!1,submitCount:0,touchedFields:{},isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,errors:{}}),o=s(r,2),i=o[0],a=o[1];n.current?n.current.control._options=e:n.current=He(He({},Ln(e)),{},{formState:i});var u=n.current.control,l=t.useCallback((function(e){Mt(e,u._proxyFormState,!0)&&(u._formState=He(He({},u._formState),e),a(He({},u._formState)))}),[u]);return Bt({subject:u._subjects.state,callback:l}),t.useEffect((function(){u._stateFlags.mount||(u._proxyFormState.isValid&&u._updateValid(),u._stateFlags.mount=!0),u._stateFlags.watch&&(u._stateFlags.watch=!1,u._subjects.state.next({})),u._removeUnmounted()})),n.current.formState=Dt(i,u._proxyFormState),n.current}function Bn(e){var t=e.message,n=e.type,r=e.title,o=ce();if("state"===n&&(t=null!==o.state?o.state.message:null,n=null!=o.state?o.state.type:null),"SESSION_EXPIRED"===t)return(0,Je.jsx)(Se,{to:"/auth/logout",state:{message:"Sessie is verlopen",type:"error"}});if("FORBIDDEN"===t)return(0,Je.jsx)(Se,{to:"/noaccess",state:{message:"U heeft geen toegang tot deze pagina",type:"error"}});var i=" outline-box";if("loading"===n||"downloading"===n){var a=!0;return void 0===t&&(t="De data wordt opgehaald."),"downloading"===n&&(a=!1,t="Download wordt opgehaald"),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("div",{className:"loader fade-in",children:(0,Je.jsxs)("div",{className:"loader-wrapper outline-box",children:[(0,Je.jsx)("div",{className:"loader-text",children:t}),(0,Je.jsxs)("div",{className:"lds-ellipsis",children:[(0,Je.jsx)("div",{}),(0,Je.jsx)("div",{}),(0,Je.jsx)("div",{}),(0,Je.jsx)("div",{})]}),!0===a&&(0,Je.jsx)("div",{className:"loader-text",children:(0,Je.jsx)("a",{href:window.location.href,children:"Pagina opnieuw laden"})})]})})})}return"pageNotfound"===n?t="De pagina die u probeert te openen is niet gevonden":"noData"===n&&(t="Er zijn geen resultaten gevonden"),"genaral_error_api"===t&&(t="Er is iets misgegaan met het ophalen van de data, probeer het later nog een keer."),void 0!==n&&null!==n&&(i+=" outline-box--"+n),"inline-error"===n&&void 0!==t&&null!==t?(0,Je.jsx)("div",{className:"component",children:(0,Je.jsxs)("div",{className:"text-component outline-box outline-box--error",children:[r&&(0,Je.jsx)("h3",{children:r}),(0,Je.jsx)("span",{children:t})]})}):(0,Je.jsx)(Je.Fragment,{children:void 0!==t&&null!==t&&""!==t&&(0,Je.jsx)("div",{className:"container",children:(0,Je.jsxs)("div",{className:"row",children:[(0,Je.jsx)("div",{className:"col-12",children:(0,Je.jsxs)("div",{className:"component",children:[(0,Je.jsx)("br",{}),(0,Je.jsxs)("div",{className:"text-component"+i,children:[r&&(0,Je.jsx)("h3",{children:r}),(0,Je.jsx)("span",{children:t})]})]})}),(0,Je.jsx)("div",{className:"spacer"})]})})})}function Vn(e){var t,n,r,o=e.content,i=e.type,a=e.className,s=void 0===a?"":a,u=e.handleFunction,l=e.params,c=void 0===l?{}:l;return(0,Je.jsx)(Je.Fragment,{children:void 0!==o&&null!==o&&(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("div",{className:"row",children:(0,Je.jsxs)("div",{className:"col-12",children:[void 0===i&&(0,Je.jsx)(Je.Fragment,{children:alert("Wrapper type is required!")}),"page-component"===i&&(0,Je.jsx)("div",{className:"components",children:o}),"title"===i&&(0,Je.jsx)("div",{className:"components",children:(0,Je.jsx)("div",{className:"col-auto text-component "+s,children:(0,Je.jsxs)("h3",{children:[" ",o," "]})})}),("title-button"===i||"buttons"===i)&&(0,Je.jsx)("div",{className:"components",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsxs)("div",{className:"col-12",style:{paddingRight:"0px"},children:["title-button"===i&&(0,Je.jsxs)("div",{className:"row align-items-center justify-content-between",children:[(0,Je.jsx)("h3",{children:o}),(0,Je.jsx)("button",{type:null!==(t=c.type)&&void 0!==t?t:"submit",onClick:null!==u&&void 0!==u?u:null,className:"button button--primary "+(null!==(n=c.type)&&void 0!==n?n:"submit"),children:null!==(r=c.label)&&void 0!==r?r:""})]}),"buttons"===i&&void 0!==c.buttons&&(0,Je.jsx)("div",{className:"buttons-row-wrapper",children:c.buttons.map((function(e,t){var n,r,o,i,a;return(0,Je.jsx)("button",{"data-value":null!==(r=e.value)&&void 0!==r?r:null,type:null!==(o=e.type)&&void 0!==o?o:"submit",onClick:null!==u&&void 0!==u?u:null,className:"button button--primary "+(null!==(i=e.type)&&void 0!==i?i:"submit"),children:null!==(a=e.label)&&void 0!==a?a:""},null!==(n=e.key)&&void 0!==n?n:"button-"+t)}))})]})})}),"outline-box"===i&&(0,Je.jsx)("div",{className:"components",children:(0,Je.jsx)("div",{className:"outline-box "+s,children:o})}),"tiles-secondary"===i&&(0,Je.jsx)("div",{className:"tiles-details",children:(0,Je.jsx)("div",{className:"tiles__wrapper",children:o})}),"centred"===i&&(0,Je.jsx)("div",{className:"container centred",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsx)("div",{className:"col-12 col-md-8 col-lg-7",children:(0,Je.jsx)("div",{className:"component",children:o})})})})]})})})})}function Un(){var e=fe(),n=s((0,t.useState)(),2),r=n[0],o=n[1],i=s((0,t.useState)(!1),2),a=i[0],u=i[1],l=Fn(),c=l.register,d=l.handleSubmit,f=l.formState.errors,p=function(t){var n={};if(["emailaddress","password"].forEach((function(e){void 0!==t[e]&&null!==t[e]&&0!==t[e].length||(n[e]="Verplicht veld")})),0===Object.keys(n).length){var r={emailaddress:t.emailaddress,password:btoa(t.password)},i="Er is iets foutgegaan, probeer het later nog een keer of neem contact op met van der Mark Zorghulpmiddelen.";ym(r).then((function(t){var n,r=t.data;"success"===r.status&&null!==r.auth.token?(localStorage.setItem("auth",JSON.stringify(r.auth)),Cm(r.auth),e("/home")):o(null!==(n=r.message)&&void 0!==n?n:i)})).catch((function(e){console.log(e),o(i)}))}},h=function(){u(!a)};return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(Vn,{type:"centred",content:(0,Je.jsxs)("div",{className:"outline-box text-component",children:[(0,Je.jsx)(Bn,{type:"error",message:r}),(0,Je.jsx)("h3",{children:"Inloggen"}),(0,Je.jsxs)("form",{className:"form",onSubmit:d(p),children:[(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"emailaddress",className:"form__label",children:[f.emailaddress&&(0,Je.jsx)("span",{style:{color:"red"},children:"Verplicht veld: "}),"Gebruikersnaam of e-mail"]}),(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("input",He({placeholder:"Je gebruikersnaam",type:"text",id:"emailaddress",className:"form-control"},c("emailaddress",{required:!0})))})]})}),(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"password",className:"form__label",children:[f.password&&(0,Je.jsx)("span",{style:{color:"red"},children:"Verplicht veld: "}),"Wachtwoord"]}),(0,Je.jsxs)("div",{className:"form__element form__element--password",children:[(0,Je.jsx)("input",He({className:"form-control",id:"password",type:a?"text":"password",placeholder:"Je wachtwoord"},c("password",{required:!0}))),(0,Je.jsx)("div",{className:"toggle-password",onClick:h})]})]})}),(0,Je.jsxs)("div",{className:"form__row form__row--buttons",children:[(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)("button",{type:"submit",className:"button button--primary",children:[(0,Je.jsx)("span",{className:"me-1"}),"Inloggen"]})})}),(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)(Me,{to:"/auth/forgot",className:"button button--readmore",children:[(0,Je.jsx)("span",{className:"read-more"}),"Wachtwoord vergeten?"]})})})]})]})]}),className:"outline-box--form"})})}function Hn(e){var t=e.parents,n=e.current;return localStorage.clear(),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(Un,{})]})}function zn(){return localStorage.clear(),(0,Je.jsx)(Se,{to:"/auth/login"})}function Gn(e){var n=e.token,r=s((0,t.useState)(!1),2),o=r[0],i=r[1],a=Fn(),u=a.register,l=a.handleSubmit,c=a.formState.errors,d=s((0,t.useState)(),2),f=d[0],p=d[1],h=s((0,t.useState)(),2),m=h[0],v=h[1],g=s((0,t.useState)(),2),y=g[0],w=g[1],b="Er is iets misgegaan met het verwerken van uw verzoek";(0,t.useEffect)((function(){null!=n&&bm({guid:n}).then((function(e){var t;"success"!==e.data.status&&v(null!==(t=e.data.message)&&void 0!==t?t:b)})).catch((function(e){console.log(e),v(b)}))}),[n,b]);var _=function(e){if(e.password===e.passwordconfirm){if(e.password===e.passwordconfirm&&null!=n){var t={guid:n,password:btoa(e.password)};_m(t).then((function(e){var t;"success"===e.data.status?w("Uw account is succesvol aangemaakt"):v(null!==(t=e.data.message)&&void 0!==t?t:b)})).catch((function(e){console.log(e),v(b)}))}}else p("De wachtwoord velden zijn niet identiek")};if(void 0===n||null===n)return(0,Je.jsx)(Bn,{type:"error",message:b});var E,x=function(){i(!o)},S=function(e,t){return(0,Je.jsxs)("div",{className:"outline-box text-component",children:[(0,Je.jsx)(Bn,{type:e,message:t}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)(Me,{to:"/auth/login",className:"button button--readmore",children:[(0,Je.jsx)("span",{className:"read-more"}),"Naar inlogpagina"]})})})]})};return void 0!==m?E=S("error",m):void 0!==y?E=S("success",y):void 0!==n&&(E=(0,Je.jsxs)("div",{className:"outline-box text-component",children:[(0,Je.jsx)(Bn,{type:"error",message:f}),(0,Je.jsx)("h3",{children:"Registratie voltooien"}),(0,Je.jsx)("div",{id:"result",style:{color:"red"}}),(0,Je.jsxs)("form",{className:"form",onSubmit:l(_),children:[(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"password",className:"form__label",children:[c.password&&(0,Je.jsx)("span",{style:{color:"red"},children:"Verplicht veld: "}),"Wachtwoord"]}),(0,Je.jsxs)("div",{className:"form__element form__element--password",children:[(0,Je.jsx)("input",He({className:"form-control",id:"password",type:o?"text":"password",placeholder:"Nieuw wachtwoord"},u("password",{required:!0}))),(0,Je.jsx)("div",{className:"toggle-password",onClick:x})]})]})}),(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"passwordconfirm",className:"form__label",children:[c.passwordconfirm&&(0,Je.jsx)("span",{style:{color:"red"},children:"Verplicht veld: "}),"Bevestig wachtwoord"]}),(0,Je.jsxs)("div",{className:"form__element form__element--password",children:[(0,Je.jsx)("input",He({className:"form-control",id:"passwordconfirm",type:o?"text":"password",placeholder:"Bevestig wachtwoord"},u("passwordconfirm",{required:!0}))),(0,Je.jsx)("div",{className:"toggle-password",onClick:x})]})]})}),(0,Je.jsx)("div",{className:"form__row form__row--buttons",children:(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)("button",{type:"submit",className:"button button--primary",children:[(0,Je.jsx)("span",{className:"me-1"}),"Opslaan"]})})})})]})]})),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(Vn,{type:"centred",content:E,className:"outline-box--form"})})}function Wn(e){var t=e.parents,n=e.current,r=he().token;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(Gn,{token:r})]})}function Xn(){var e=s((0,t.useState)(!1),2),n=e[0],r=e[1],o=s((0,t.useState)(),2),i=o[0],a=o[1],u=Fn(),l=u.register,c=u.handleSubmit,d=function(e){a(null),wm(e).then((function(e){"handled"===e.data.status?r(!0):a("Er is iets foutgegaan met het verzenden van uw verzoek (1)")})).catch((function(e){console.log(e),a("Er is iets foutgegaan met het verzenden van uw verzoek (2)")}))},f=!0===n?(0,Je.jsx)("div",{className:"component",children:(0,Je.jsxs)("div",{className:"outline-box outline-box--details","data-match":"",children:[(0,Je.jsx)(Bn,{type:"success",message:"Wachtwoord herstel verzoek verzonden"}),(0,Je.jsx)("p",{children:"Indien uw gebruikersnaam bekend is ontvangt u binnen enkele minuten een e-mail waarmee u uw wachtwoord kunt resetten."}),(0,Je.jsxs)(Me,{to:"/auth/login",className:"button button--readmore",children:[(0,Je.jsx)("span",{className:"read-more"}),"Terug naar inloggen"]})]})}):(0,Je.jsxs)("div",{className:"outline-box text-component",children:[(0,Je.jsx)(Bn,{type:"error",message:i}),(0,Je.jsx)("h3",{children:"Wachtwoord vergeten"}),(0,Je.jsx)("div",{id:"result",style:{color:"red"}}),(0,Je.jsxs)("form",{className:"form",onSubmit:c(d),children:[(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsx)("label",{htmlFor:"emailaddress",className:"form__label",children:"Gebruikersnaam of e-mail"}),(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("input",He({id:"emailaddress",placeholder:"Je emailadres",type:"text",className:"form-control"},l("userName",{required:!0})))})]})}),(0,Je.jsxs)("div",{className:"form__row form__row--buttons",children:[(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)("button",{type:"submit",className:"button button--primary",children:[(0,Je.jsx)("span",{className:"me-1"}),"Versturen"]})})}),(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)(Me,{to:"/auth/login",className:"button button--readmore",children:[(0,Je.jsx)("span",{className:"read-more"}),"Terug naar inloggen"]})})})]})]})]});return(0,Je.jsx)(Vn,{type:"centred",content:f,className:"outline-box--form"})}function Yn(e){var t=e.parents,n=e.current;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(Xn,{})]})}function qn(e){var n=e.token,r=s((0,t.useState)(!1),2),o=r[0],i=r[1],a=Fn(),u=a.register,l=a.handleSubmit,c=a.formState.errors,d=s((0,t.useState)(),2),f=d[0],p=d[1],h=s((0,t.useState)(),2),m=h[0],v=h[1],g=s((0,t.useState)(),2),y=g[0],w=g[1],b="Er is iets misgegaan met het verwerken van uw verzoek";(0,t.useEffect)((function(){null!=n&&bm({guid:n}).then((function(e){var t;"success"!==e.data.status&&v(null!==(t=e.data.message)&&void 0!==t?t:b)})).catch((function(e){console.log(e),v(b)}))}),[n,b]);var _=function(e){if(e.password===e.passwordconfirm){if(e.password===e.passwordconfirm&&null!=n){var t={guid:n,password:btoa(e.password)};_m(t).then((function(e){var t;"success"===e.data.status?w("Uw wachtwoord is succesvol gewijzigd"):v(null!==(t=e.data.message)&&void 0!==t?t:b)})).catch((function(e){console.log(e),v(b)}))}}else p("De wachtwoord velden zijn niet identiek")};if(void 0===n||null===n)return(0,Je.jsx)(Bn,{type:"error",message:b});var E,x=function(){i(!o)},S=function(e,t){return(0,Je.jsxs)("div",{className:"outline-box text-component",children:[(0,Je.jsx)(Bn,{type:e,message:t}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)(Me,{to:"/auth/login",className:"button button--readmore",children:[(0,Je.jsx)("span",{className:"read-more"}),"Naar inlogpagina"]})})})]})};return void 0!==m?E=S("error",m):void 0!==y?E=S("success",y):void 0!==n&&(E=(0,Je.jsxs)("div",{className:"outline-box text-component",children:[(0,Je.jsx)(Bn,{type:"error",message:f}),(0,Je.jsx)("h3",{children:"Wachtwoord wijzigen"}),(0,Je.jsx)("div",{id:"result",style:{color:"red"}}),(0,Je.jsxs)("form",{className:"form",onSubmit:l(_),children:[(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"password",className:"form__label",children:[c.password&&(0,Je.jsx)("span",{style:{color:"red"},children:"Verplicht veld: "}),"Wachtwoord"]}),(0,Je.jsxs)("div",{className:"form__element form__element--password",children:[(0,Je.jsx)("input",He({id:"password",className:"form-control",type:o?"text":"password",placeholder:"Nieuw wachtwoord"},u("password",{required:!0}))),(0,Je.jsx)("div",{className:"toggle-password",onClick:x})]})]})}),(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"passwordconfirm",className:"form__label",children:[c.passwordconfirm&&(0,Je.jsx)("span",{style:{color:"red"},children:"Verplicht veld: "}),"Bevestig wachtwoord"]}),(0,Je.jsxs)("div",{className:"form__element form__element--password",children:[(0,Je.jsx)("input",He({className:"form-control",id:"passwordconfirm",type:o?"text":"password",placeholder:"Bevestig wachtwoord"},u("passwordconfirm",{required:!0}))),(0,Je.jsx)("div",{className:"toggle-password",onClick:x})]})]})}),(0,Je.jsx)("div",{className:"form__row form__row--buttons",children:(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)("button",{type:"submit",className:"button button--primary",children:[(0,Je.jsx)("span",{className:"me-1"}),"Opslaan"]})})})})]})]})),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(Vn,{type:"centred",content:E,className:"outline-box--form"})})}function Kn(e){var t=e.parents,n=e.current,r=he().token;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(qn,{token:r})]})}var Zn=[{path:"/auth",pageTitle:"Autorisatie",redirect:(0,Je.jsx)(Se,{to:"/auth/login"}),children:[{path:"/login",pageTitle:"Inloggen",component:(0,Je.jsx)(Hn,{})},{path:"/logout",pageTitle:"Uitloggen",component:(0,Je.jsx)(zn,{})},{path:"/register/:token",pageTitle:"Registreren",component:(0,Je.jsx)(Wn,{})},{path:"/forgot",pageTitle:"Wachtwoord vergeten",component:(0,Je.jsx)(Yn,{})},{path:"/reset/:token",pageTitle:"Wachtwoord veranderen",component:(0,Je.jsx)(Kn,{})}]},{path:"/login",redirect:(0,Je.jsx)(Se,{to:"/auth/login"})},{path:"/logout",redirect:(0,Je.jsx)(Se,{to:"/auth/logout"})}];function Jn(){var e=JSON.parse(localStorage.getItem("auth"));return(0,Je.jsx)("div",{className:"main",children:(0,Je.jsx)("div",{className:"main__right",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsx)("div",{className:"col-12 col-md-8 col-lg-6",children:(0,Je.jsxs)("div",{className:"component",style:{maxWidth:"600px"},children:[(0,Je.jsx)("div",{className:"tiles-home-title",children:(0,Je.jsxs)("h3",{children:["Welkom ",(0,Je.jsx)("strong",{children:e.fullName})]})}),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("div",{className:"tiles__wrapper",children:[!0===Am("/scan")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/scan",className:"tile tile__scannen active",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Scannen"})]})}),!0===Am("/rentals/actions")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/rentals/actions",className:"tile tile__verhuur",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Verhuur"})]})}),!0===Am("/management")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/management",className:"tile tile__management",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Management-informatie"})]})}),!0===Am("/articles/actions")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/articles/actions",className:"tile tile__hulpmiddelen",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Hulpmiddelen-beheer"})]})}),!0===Am("/requests")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/requests",className:"tile tile__aanvragen",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Lopende aanvragen"})]})}),(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)("a",{href:"https://www.vandermarkzorghulpmiddelen.nl/aanvraag/",target:"_blank",rel:"noreferrer",className:"tile tile__aanvragen",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Aanvraag ZVW"})]})})]})}),(0,Je.jsx)("div",{className:"tiles-home-footer",children:(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("div",{className:"outline-box outline-box--grey text-component",children:[(0,Je.jsx)("h4",{children:"Support"}),(0,Je.jsxs)("div",{className:"buttons flex-nowrap",children:[(0,Je.jsx)("button",{type:"submit",className:"button button--outline button--grey button--icon button--icon--phone",children:"Bel"}),(0,Je.jsx)("button",{type:"submit",className:"button button--outline button--grey button--icon button--icon--email",children:"Mail"})]})]})})})]})})})})})}function $n(e){var t=e.parents,n=e.current;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(Jn,{})]})}var Qn,er,tr=(Qn=function(e,t){return Qn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Qn(e,t)},function(e,t){function n(){this.constructor=e}Qn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),nr=function(e){function t(t){var n,r,o,i=this.constructor,a=e.call(this,t)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),n=a,r=i.prototype,(o=Object.setPrototypeOf)?o(n,r):n.__proto__=r,function(e,t){void 0===t&&(t=e.constructor);var n=Error.captureStackTrace;n&&n(e,t)}(a),a}return tr(t,e),t}(Error),rr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),or=function(e){function t(t){void 0===t&&(t=void 0);var n=e.call(this,t)||this;return n.message=t,n}return rr(t,e),t.prototype.getKind=function(){return this.constructor.kind},t.kind="Exception",t}(nr),ir=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ir(t,e),t.kind="ArgumentException",t}(or),sr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return sr(t,e),t.kind="IllegalArgumentException",t}(or),lr=function(){function e(e){if(this.binarizer=e,null===e)throw new ur("Binarizer must be non-null.")}return e.prototype.getWidth=function(){return this.binarizer.getWidth()},e.prototype.getHeight=function(){return this.binarizer.getHeight()},e.prototype.getBlackRow=function(e,t){return this.binarizer.getBlackRow(e,t)},e.prototype.getBlackMatrix=function(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},e.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},e.prototype.crop=function(t,n,r,o){var i=this.binarizer.getLuminanceSource().crop(t,n,r,o);return new e(this.binarizer.createBinarizer(i))},e.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},e.prototype.rotateCounterClockwise=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new e(this.binarizer.createBinarizer(t))},e.prototype.rotateCounterClockwise45=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new e(this.binarizer.createBinarizer(t))},e.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch(e){return""}},e}(),cr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return cr(t,e),t.getChecksumInstance=function(){return new t},t.kind="ChecksumException",t}(or),fr=function(){function e(e){this.source=e}return e.prototype.getLuminanceSource=function(){return this.source},e.prototype.getWidth=function(){return this.source.getWidth()},e.prototype.getHeight=function(){return this.source.getHeight()},e}(),pr=function(){function e(){}return e.arraycopy=function(e,t,n,r,o){for(;o--;)n[r++]=e[t++]},e.currentTimeMillis=function(){return Date.now()},e}(),hr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hr(t,e),t.kind="IndexOutOfBoundsException",t}(or),vr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gr=function(e){function t(t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var r=e.call(this,n)||this;return r.index=t,r.message=n,r}return vr(t,e),t.kind="ArrayIndexOutOfBoundsException",t}(mr),yr=function(){function e(){}return e.fill=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n]=t},e.fillWithin=function(t,n,r,o){e.rangeCheck(t.length,n,r);for(var i=n;i<r;i++)t[i]=o},e.rangeCheck=function(e,t,n){if(t>n)throw new ur("fromIndex("+t+") > toIndex("+n+")");if(t<0)throw new gr(t);if(n>e)throw new gr(n)},e.asList=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e},e.create=function(e,t,n){return Array.from({length:e}).map((function(e){return Array.from({length:t}).fill(n)}))},e.createInt32Array=function(e,t,n){return Array.from({length:e}).map((function(e){return Int32Array.from({length:t}).fill(n)}))},e.equals=function(e,t){if(!e)return!1;if(!t)return!1;if(!e.length)return!1;if(!t.length)return!1;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0},e.hashCode=function(e){var t,n;if(null===e)return 0;var r=1;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next())r=31*r+i.value}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},e.fillUint8Array=function(e,t){for(var n=0;n!==e.length;n++)e[n]=t},e.copyOf=function(e,t){return e.slice(0,t)},e.copyOfUint8Array=function(e,t){if(e.length<=t){var n=new Uint8Array(t);return n.set(e),n}return e.slice(0,t)},e.copyOfRange=function(e,t,n){var r=n-t,o=new Int32Array(r);return pr.arraycopy(e,t,o,0,r),o},e.binarySearch=function(t,n,r){void 0===r&&(r=e.numberComparator);for(var o=0,i=t.length-1;o<=i;){var a=i+o>>1,s=r(n,t[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},e.numberComparator=function(e,t){return e-t},e}(),wr=function(){function e(){}return e.numberOfTrailingZeros=function(e){var t;if(0===e)return 32;var n=31;return 0!==(t=e<<16)&&(n-=16,e=t),0!==(t=e<<8)&&(n-=8,e=t),0!==(t=e<<4)&&(n-=4,e=t),0!==(t=e<<2)&&(n-=2,e=t),n-(e<<1>>>31)},e.numberOfLeadingZeros=function(e){if(0===e)return 32;var t=1;return e>>>16==0&&(t+=16,e<<=16),e>>>24==0&&(t+=8,e<<=8),e>>>28==0&&(t+=4,e<<=4),e>>>30==0&&(t+=2,e<<=2),t-(e>>>31)},e.toHexString=function(e){return e.toString(16)},e.toBinaryString=function(e){return String(parseInt(String(e),2))},e.bitCount=function(e){return e=(e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135,63&(e+=e>>>8)+(e>>>16)},e.truncDivision=function(e,t){return Math.trunc(e/t)},e.parseInt=function(e,t){return void 0===t&&(t=void 0),parseInt(e,t)},e.MIN_VALUE_32_BITS=-2147483648,e.MAX_VALUE=Number.MAX_SAFE_INTEGER,e}(),br=function(){function e(t,n){void 0===t?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=null==n?e.makeArray(t):n)}return e.prototype.getSize=function(){return this.size},e.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},e.prototype.ensureCapacity=function(t){if(t>32*this.bits.length){var n=e.makeArray(t);pr.arraycopy(this.bits,0,n,0,this.bits.length),this.bits=n}},e.prototype.get=function(e){return 0!=(this.bits[Math.floor(e/32)]&1<<(31&e))},e.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(31&e)},e.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(31&e)},e.prototype.getNextSet=function(e){var t=this.size;if(e>=t)return t;var n=this.bits,r=Math.floor(e/32),o=n[r];o&=~((1<<(31&e))-1);for(var i=n.length;0===o;){if(++r===i)return t;o=n[r]}var a=32*r+wr.numberOfTrailingZeros(o);return a>t?t:a},e.prototype.getNextUnset=function(e){var t=this.size;if(e>=t)return t;var n=this.bits,r=Math.floor(e/32),o=~n[r];o&=~((1<<(31&e))-1);for(var i=n.length;0===o;){if(++r===i)return t;o=~n[r]}var a=32*r+wr.numberOfTrailingZeros(o);return a>t?t:a},e.prototype.setBulk=function(e,t){this.bits[Math.floor(e/32)]=t},e.prototype.setRange=function(e,t){if(t<e||e<0||t>this.size)throw new ur;if(t!==e){t--;for(var n=Math.floor(e/32),r=Math.floor(t/32),o=this.bits,i=n;i<=r;i++){var a=(2<<(i<r?31:31&t))-(1<<(i>n?0:31&e));o[i]|=a}}},e.prototype.clear=function(){for(var e=this.bits.length,t=this.bits,n=0;n<e;n++)t[n]=0},e.prototype.isRange=function(e,t,n){if(t<e||e<0||t>this.size)throw new ur;if(t===e)return!0;t--;for(var r=Math.floor(e/32),o=Math.floor(t/32),i=this.bits,a=r;a<=o;a++){var s=(2<<(a<o?31:31&t))-(1<<(a>r?0:31&e))&4294967295;if((i[a]&s)!==(n?s:0))return!1}return!0},e.prototype.appendBit=function(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},e.prototype.appendBits=function(e,t){if(t<0||t>32)throw new ur("Num bits must be between 0 and 32");this.ensureCapacity(this.size+t);for(var n=t;n>0;n--)this.appendBit(1==(e>>n-1&1))},e.prototype.appendBitArray=function(e){var t=e.size;this.ensureCapacity(this.size+t);for(var n=0;n<t;n++)this.appendBit(e.get(n))},e.prototype.xor=function(e){if(this.size!==e.size)throw new ur("Sizes don't match");for(var t=this.bits,n=0,r=t.length;n<r;n++)t[n]^=e.bits[n]},e.prototype.toBytes=function(e,t,n,r){for(var o=0;o<r;o++){for(var i=0,a=0;a<8;a++)this.get(e)&&(i|=1<<7-a),e++;t[n+o]=i}},e.prototype.getBitArray=function(){return this.bits},e.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),t=Math.floor((this.size-1)/32),n=t+1,r=this.bits,o=0;o<n;o++){var i=r[o];i=(i=(i=(i=(i=i>>1&1431655765|(1431655765&i)<<1)>>2&858993459|(858993459&i)<<2)>>4&252645135|(252645135&i)<<4)>>8&16711935|(16711935&i)<<8)>>16&65535|(65535&i)<<16,e[t-o]=i}if(this.size!==32*n){var a=32*n-this.size,s=e[0]>>>a;for(o=1;o<n;o++){var u=e[o];s|=u<<32-a,e[o-1]=s,s=u>>>a}e[n-1]=s}this.bits=e},e.makeArray=function(e){return new Int32Array(Math.floor((e+31)/32))},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.size===n.size&&yr.equals(this.bits,n.bits)},e.prototype.hashCode=function(){return 31*this.size+yr.hashCode(this.bits)},e.prototype.toString=function(){for(var e="",t=0,n=this.size;t<n;t++)0==(7&t)&&(e+=" "),e+=this.get(t)?"X":".";return e},e.prototype.clone=function(){return new e(this.size,this.bits.slice())},e}();!function(e){e[e.OTHER=0]="OTHER",e[e.PURE_BARCODE=1]="PURE_BARCODE",e[e.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",e[e.TRY_HARDER=3]="TRY_HARDER",e[e.CHARACTER_SET=4]="CHARACTER_SET",e[e.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",e[e.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",e[e.ASSUME_GS1=7]="ASSUME_GS1",e[e.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",e[e.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",e[e.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"}(er||(er={}));var _r,Er=er,xr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xr(t,e),t.getFormatInstance=function(){return new t},t.kind="FormatException",t}(or),Cr=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(e){e[e.Cp437=0]="Cp437",e[e.ISO8859_1=1]="ISO8859_1",e[e.ISO8859_2=2]="ISO8859_2",e[e.ISO8859_3=3]="ISO8859_3",e[e.ISO8859_4=4]="ISO8859_4",e[e.ISO8859_5=5]="ISO8859_5",e[e.ISO8859_6=6]="ISO8859_6",e[e.ISO8859_7=7]="ISO8859_7",e[e.ISO8859_8=8]="ISO8859_8",e[e.ISO8859_9=9]="ISO8859_9",e[e.ISO8859_10=10]="ISO8859_10",e[e.ISO8859_11=11]="ISO8859_11",e[e.ISO8859_13=12]="ISO8859_13",e[e.ISO8859_14=13]="ISO8859_14",e[e.ISO8859_15=14]="ISO8859_15",e[e.ISO8859_16=15]="ISO8859_16",e[e.SJIS=16]="SJIS",e[e.Cp1250=17]="Cp1250",e[e.Cp1251=18]="Cp1251",e[e.Cp1252=19]="Cp1252",e[e.Cp1256=20]="Cp1256",e[e.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",e[e.UTF8=22]="UTF8",e[e.ASCII=23]="ASCII",e[e.Big5=24]="Big5",e[e.GB18030=25]="GB18030",e[e.EUC_KR=26]="EUC_KR"}(_r||(_r={}));var Ir,Ar=function(){function e(t,n,r){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=t,this.name=r,this.values="number"==typeof n?Int32Array.from([n]):n,this.otherEncodingNames=a,e.VALUE_IDENTIFIER_TO_ECI.set(t,this),e.NAME_TO_ECI.set(r,this);for(var u=this.values,l=0,c=u.length;l!==c;l++){var d=u[l];e.VALUES_TO_ECI.set(d,this)}try{for(var f=Cr(a),p=f.next();!p.done;p=f.next()){var h=p.value;e.NAME_TO_ECI.set(h,this)}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}return e.prototype.getValueIdentifier=function(){return this.valueIdentifier},e.prototype.getName=function(){return this.name},e.prototype.getValue=function(){return this.values[0]},e.getCharacterSetECIByValue=function(t){if(t<0||t>=900)throw new Sr("incorect value");var n=e.VALUES_TO_ECI.get(t);if(void 0===n)throw new Sr("incorect value");return n},e.getCharacterSetECIByName=function(t){var n=e.NAME_TO_ECI.get(t);if(void 0===n)throw new Sr("incorect value");return n},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.getName()===n.getName()},e.VALUE_IDENTIFIER_TO_ECI=new Map,e.VALUES_TO_ECI=new Map,e.NAME_TO_ECI=new Map,e.Cp437=new e(_r.Cp437,Int32Array.from([0,2]),"Cp437"),e.ISO8859_1=new e(_r.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),e.ISO8859_2=new e(_r.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),e.ISO8859_3=new e(_r.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),e.ISO8859_4=new e(_r.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),e.ISO8859_5=new e(_r.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),e.ISO8859_6=new e(_r.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),e.ISO8859_7=new e(_r.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),e.ISO8859_8=new e(_r.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),e.ISO8859_9=new e(_r.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),e.ISO8859_10=new e(_r.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),e.ISO8859_11=new e(_r.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),e.ISO8859_13=new e(_r.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),e.ISO8859_14=new e(_r.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),e.ISO8859_15=new e(_r.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),e.ISO8859_16=new e(_r.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),e.SJIS=new e(_r.SJIS,20,"SJIS","Shift_JIS"),e.Cp1250=new e(_r.Cp1250,21,"Cp1250","windows-1250"),e.Cp1251=new e(_r.Cp1251,22,"Cp1251","windows-1251"),e.Cp1252=new e(_r.Cp1252,23,"Cp1252","windows-1252"),e.Cp1256=new e(_r.Cp1256,24,"Cp1256","windows-1256"),e.UnicodeBigUnmarked=new e(_r.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),e.UTF8=new e(_r.UTF8,26,"UTF8","UTF-8"),e.ASCII=new e(_r.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),e.Big5=new e(_r.Big5,28,"Big5"),e.GB18030=new e(_r.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),e.EUC_KR=new e(_r.EUC_KR,30,"EUC_KR","EUC-KR"),e}(),Or=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Or(t,e),t.kind="UnsupportedOperationException",t}(or),Tr=function(){function e(){}return e.decode=function(e,t){var n=this.encodingName(t);return this.customDecoder?this.customDecoder(e,n):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)},e.shouldDecodeOnFallback=function(t){return!e.isBrowser()&&"ISO-8859-1"===t},e.encode=function(e,t){var n=this.encodingName(t);return this.customEncoder?this.customEncoder(e,n):"undefined"==typeof TextEncoder?this.encodeFallback(e):(new TextEncoder).encode(e)},e.isBrowser=function(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)},e.encodingName=function(e){return"string"==typeof e?e:e.getName()},e.encodingCharacterSet=function(e){return e instanceof Ar?e:Ar.getCharacterSetECIByName(e)},e.decodeFallback=function(t,n){var r=this.encodingCharacterSet(n);if(e.isDecodeFallbackSupported(r)){for(var o="",i=0,a=t.length;i<a;i++){var s=t[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(r.equals(Ar.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(t.buffer));throw new Nr("Encoding "+this.encodingName(n)+" not supported by fallback.")},e.isDecodeFallbackSupported=function(e){return e.equals(Ar.UTF8)||e.equals(Ar.ISO8859_1)||e.equals(Ar.ASCII)},e.encodeFallback=function(e){for(var t=btoa(unescape(encodeURIComponent(e))).split(""),n=[],r=0;r<t.length;r++)n.push(t[r].charCodeAt(0));return new Uint8Array(n)},e}(),kr=function(){function e(){}return e.castAsNonUtf8Char=function(e,t){void 0===t&&(t=null);var n=t?t.getName():this.ISO88591;return Tr.decode(new Uint8Array([e]),n)},e.guessEncoding=function(t,n){if(null!=n&&void 0!==n.get(Er.CHARACTER_SET))return n.get(Er.CHARACTER_SET).toString();for(var r=t.length,o=!0,i=!0,a=!0,s=0,u=0,l=0,c=0,d=0,f=0,p=0,h=0,m=0,v=0,g=0,y=t.length>3&&239===t[0]&&187===t[1]&&191===t[2],w=0;w<r&&(o||i||a);w++){var b=255&t[w];a&&(s>0?0==(128&b)?a=!1:s--:0!=(128&b)&&(0==(64&b)?a=!1:(s++,0==(32&b)?u++:(s++,0==(16&b)?l++:(s++,0==(8&b)?c++:a=!1))))),o&&(b>127&&b<160?o=!1:b>159&&(b<192||215===b||247===b)&&g++),i&&(d>0?b<64||127===b||b>252?i=!1:d--:128===b||160===b||b>239?i=!1:b>160&&b<224?(f++,h=0,++p>m&&(m=p)):b>127?(d++,p=0,++h>v&&(v=h)):(p=0,h=0))}return a&&s>0&&(a=!1),i&&d>0&&(i=!1),a&&(y||u+l+c>0)?e.UTF8:i&&(e.ASSUME_SHIFT_JIS||m>=3||v>=3)?e.SHIFT_JIS:o&&i?2===m&&2===f||10*g>=r?e.SHIFT_JIS:e.ISO88591:o?e.ISO88591:i?e.SHIFT_JIS:a?e.UTF8:e.PLATFORM_DEFAULT_ENCODING},e.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=-1;function o(e,n,o,i,a,s){if("%%"===e)return"%";if(void 0!==t[++r]){e=i?parseInt(i.substr(1)):void 0;var u,l=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=t[r];break;case"c":u=t[r][0];break;case"f":u=parseFloat(t[r]).toFixed(e);break;case"p":u=parseFloat(t[r]).toPrecision(e);break;case"e":u=parseFloat(t[r]).toExponential(e);break;case"x":u=parseInt(t[r]).toString(l||16);break;case"d":u=parseFloat(parseInt(t[r],l||10).toPrecision(e)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(l);for(var c=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<c;)u=void 0!==n?u+d:d+u;return u}}var i=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(i,o)},e.getBytes=function(e,t){return Tr.encode(e,t)},e.getCharCode=function(e,t){return void 0===t&&(t=0),e.charCodeAt(t)},e.getCharAt=function(e){return String.fromCharCode(e)},e.SHIFT_JIS=Ar.SJIS.getName(),e.GB2312="GB2312",e.ISO88591=Ar.ISO8859_1.getName(),e.EUC_JP="EUC_JP",e.UTF8=Ar.UTF8.getName(),e.PLATFORM_DEFAULT_ENCODING=e.UTF8,e.ASSUME_SHIFT_JIS=!1,e}(),Rr=function(){function e(e){void 0===e&&(e=""),this.value=e}return e.prototype.enableDecoding=function(e){return this.encoding=e,this},e.prototype.append=function(e){return"string"==typeof e?this.value+=e.toString():this.encoding?this.value+=kr.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},e.prototype.appendChars=function(e,t,n){for(var r=t;t<t+n;r++)this.append(e[r]);return this},e.prototype.length=function(){return this.value.length},e.prototype.charAt=function(e){return this.value.charAt(e)},e.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},e.prototype.setCharAt=function(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+1)},e.prototype.substring=function(e,t){return this.value.substring(e,t)},e.prototype.setLengthToZero=function(){this.value=""},e.prototype.toString=function(){return this.value},e.prototype.insert=function(e,t){this.value=this.value.substr(0,e)+t+this.value.substr(e+t.length)},e}(),jr=function(){function e(e,t,n,r){if(this.width=e,this.height=t,this.rowSize=n,this.bits=r,null==t&&(t=e),this.height=t,e<1||t<1)throw new ur("Both dimensions must be greater than 0");null==n&&(n=Math.floor((e+31)/32)),this.rowSize=n,null==r&&(this.bits=new Int32Array(this.rowSize*this.height))}return e.parseFromBooleanArray=function(t){for(var n=t.length,r=t[0].length,o=new e(r,n),i=0;i<n;i++)for(var a=t[i],s=0;s<r;s++)a[s]&&o.set(s,i);return o},e.parseFromString=function(t,n,r){if(null===t)throw new ur("stringRepresentation cannot be null");for(var o=new Array(t.length),i=0,a=0,s=-1,u=0,l=0;l<t.length;)if("\n"===t.charAt(l)||"\r"===t.charAt(l)){if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new ur("row lengths do not match");a=i,u++}l++}else if(t.substring(l,l+n.length)===n)l+=n.length,o[i]=!0,i++;else{if(t.substring(l,l+r.length)!==r)throw new ur("illegal character encountered: "+t.substring(l));l+=r.length,o[i]=!1,i++}if(i>a){if(-1===s)s=i-a;else if(i-a!==s)throw new ur("row lengths do not match");u++}for(var c=new e(s,u),d=0;d<i;d++)o[d]&&c.set(Math.floor(d%s),Math.floor(d/s));return c},e.prototype.get=function(e,t){var n=t*this.rowSize+Math.floor(e/32);return 0!=(this.bits[n]>>>(31&e)&1)},e.prototype.set=function(e,t){var n=t*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(31&e)&4294967295},e.prototype.unset=function(e,t){var n=t*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(31&e)&4294967295)},e.prototype.flip=function(e,t){var n=t*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(31&e)&4294967295},e.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new ur("input matrix dimensions do not match");for(var t=new br(Math.floor(this.width/32)+1),n=this.rowSize,r=this.bits,o=0,i=this.height;o<i;o++)for(var a=o*n,s=e.getRow(o,t).getBitArray(),u=0;u<n;u++)r[a+u]^=s[u]},e.prototype.clear=function(){for(var e=this.bits,t=e.length,n=0;n<t;n++)e[n]=0},e.prototype.setRegion=function(e,t,n,r){if(t<0||e<0)throw new ur("Left and top must be nonnegative");if(r<1||n<1)throw new ur("Height and width must be at least 1");var o=e+n,i=t+r;if(i>this.height||o>this.width)throw new ur("The region must fit inside the matrix");for(var a=this.rowSize,s=this.bits,u=t;u<i;u++)for(var l=u*a,c=e;c<o;c++)s[l+Math.floor(c/32)]|=1<<(31&c)&4294967295},e.prototype.getRow=function(e,t){null==t||t.getSize()<this.width?t=new br(this.width):t.clear();for(var n=this.rowSize,r=this.bits,o=e*n,i=0;i<n;i++)t.setBulk(32*i,r[o+i]);return t},e.prototype.setRow=function(e,t){pr.arraycopy(t.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},e.prototype.rotate180=function(){for(var e=this.getWidth(),t=this.getHeight(),n=new br(e),r=new br(e),o=0,i=Math.floor((t+1)/2);o<i;o++)n=this.getRow(o,n),r=this.getRow(t-1-o,r),n.reverse(),r.reverse(),this.setRow(o,r),this.setRow(t-1-o,n)},e.prototype.getEnclosingRectangle=function(){for(var e=this.width,t=this.height,n=this.rowSize,r=this.bits,o=e,i=t,a=-1,s=-1,u=0;u<t;u++)for(var l=0;l<n;l++){var c=r[u*n+l];if(0!==c){if(u<i&&(i=u),u>s&&(s=u),32*l<o){for(var d=0;0==(c<<31-d&4294967295);)d++;32*l+d<o&&(o=32*l+d)}if(32*l+31>a){for(d=31;c>>>d==0;)d--;32*l+d>a&&(a=32*l+d)}}}return a<o||s<i?null:Int32Array.from([o,i,a-o+1,s-i+1])},e.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,t=this.bits,n=0;n<t.length&&0===t[n];)n++;if(n===t.length)return null;for(var r=n/e,o=n%e*32,i=t[n],a=0;0==(i<<31-a&4294967295);)a++;return o+=a,Int32Array.from([o,r])},e.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,t=this.bits,n=t.length-1;n>=0&&0===t[n];)n--;if(n<0)return null;for(var r=Math.floor(n/e),o=32*Math.floor(n%e),i=t[n],a=31;i>>>a==0;)a--;return o+=a,Int32Array.from([o,r])},e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.getRowSize=function(){return this.rowSize},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.width===n.width&&this.height===n.height&&this.rowSize===n.rowSize&&yr.equals(this.bits,n.bits)},e.prototype.hashCode=function(){var e=this.width;return 31*(e=31*(e=31*(e=31*e+this.width)+this.height)+this.rowSize)+yr.hashCode(this.bits)},e.prototype.toString=function(e,t,n){return void 0===e&&(e="X "),void 0===t&&(t="  "),void 0===n&&(n="\n"),this.buildToString(e,t,n)},e.prototype.buildToString=function(e,t,n){for(var r=new Rr,o=0,i=this.height;o<i;o++){for(var a=0,s=this.width;a<s;a++)r.append(this.get(a,o)?e:t);r.append(n)}return r.toString()},e.prototype.clone=function(){return new e(this.width,this.height,this.rowSize,this.bits.slice())},e}(),Dr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dr(t,e),t.getNotFoundInstance=function(){return new t},t.kind="NotFoundException",t}(or),Mr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lr=function(e){function t(n){var r=e.call(this,n)||this;return r.luminances=t.EMPTY,r.buckets=new Int32Array(t.LUMINANCE_BUCKETS),r}return Mr(t,e),t.prototype.getBlackRow=function(e,n){var r=this.getLuminanceSource(),o=r.getWidth();null==n||n.getSize()<o?n=new br(o):n.clear(),this.initArrays(o);for(var i=r.getRow(e,this.luminances),a=this.buckets,s=0;s<o;s++)a[(255&i[s])>>t.LUMINANCE_SHIFT]++;var u=t.estimateBlackPoint(a);if(o<3)for(s=0;s<o;s++)(255&i[s])<u&&n.set(s);else{var l=255&i[0],c=255&i[1];for(s=1;s<o-1;s++){var d=255&i[s+1];(4*c-l-d)/2<u&&n.set(s),l=c,c=d}}return n},t.prototype.getBlackMatrix=function(){var e=this.getLuminanceSource(),n=e.getWidth(),r=e.getHeight(),o=new jr(n,r);this.initArrays(n);for(var i=this.buckets,a=1;a<5;a++)for(var s=Math.floor(r*a/5),u=e.getRow(s,this.luminances),l=Math.floor(4*n/5),c=Math.floor(n/5);c<l;c++)i[(255&u[c])>>t.LUMINANCE_SHIFT]++;var d=t.estimateBlackPoint(i),f=e.getMatrix();for(a=0;a<r;a++){var p=a*n;for(c=0;c<n;c++)(255&f[p+c])<d&&o.set(c,a)}return o},t.prototype.createBinarizer=function(e){return new t(e)},t.prototype.initArrays=function(e){this.luminances.length<e&&(this.luminances=new Uint8ClampedArray(e));for(var n=this.buckets,r=0;r<t.LUMINANCE_BUCKETS;r++)n[r]=0},t.estimateBlackPoint=function(e){for(var n=e.length,r=0,o=0,i=0,a=0;a<n;a++)e[a]>i&&(o=a,i=e[a]),e[a]>r&&(r=e[a]);var s=0,u=0;for(a=0;a<n;a++){var l=a-o;(p=e[a]*l*l)>u&&(s=a,u=p)}if(o>s){var c=o;o=s,s=c}if(s-o<=n/16)throw new Pr;var d=s-1,f=-1;for(a=s-1;a>o;a--){var p,h=a-o;(p=h*h*(s-a)*(r-e[a]))>f&&(d=a,f=p)}return d<<t.LUMINANCE_SHIFT},t.LUMINANCE_BITS=5,t.LUMINANCE_SHIFT=8-t.LUMINANCE_BITS,t.LUMINANCE_BUCKETS=1<<t.LUMINANCE_BITS,t.EMPTY=Uint8ClampedArray.from([0]),t}(fr),Fr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=function(e){function t(t){var n=e.call(this,t)||this;return n.matrix=null,n}return Fr(t,e),t.prototype.getBlackMatrix=function(){if(null!==this.matrix)return this.matrix;var n=this.getLuminanceSource(),r=n.getWidth(),o=n.getHeight();if(r>=t.MINIMUM_DIMENSION&&o>=t.MINIMUM_DIMENSION){var i=n.getMatrix(),a=r>>t.BLOCK_SIZE_POWER;0!=(r&t.BLOCK_SIZE_MASK)&&a++;var s=o>>t.BLOCK_SIZE_POWER;0!=(o&t.BLOCK_SIZE_MASK)&&s++;var u=t.calculateBlackPoints(i,a,s,r,o),l=new jr(r,o);t.calculateThresholdForBlock(i,a,s,r,o,u,l),this.matrix=l}else this.matrix=e.prototype.getBlackMatrix.call(this);return this.matrix},t.prototype.createBinarizer=function(e){return new t(e)},t.calculateThresholdForBlock=function(e,n,r,o,i,a,s){for(var u=i-t.BLOCK_SIZE,l=o-t.BLOCK_SIZE,c=0;c<r;c++){var d=c<<t.BLOCK_SIZE_POWER;d>u&&(d=u);for(var f=t.cap(c,2,r-3),p=0;p<n;p++){var h=p<<t.BLOCK_SIZE_POWER;h>l&&(h=l);for(var m=t.cap(p,2,n-3),v=0,g=-2;g<=2;g++){var y=a[f+g];v+=y[m-2]+y[m-1]+y[m]+y[m+1]+y[m+2]}var w=v/25;t.thresholdBlock(e,h,d,w,o,s)}}},t.cap=function(e,t,n){return e<t?t:e>n?n:e},t.thresholdBlock=function(e,n,r,o,i,a){for(var s=0,u=r*i+n;s<t.BLOCK_SIZE;s++,u+=i)for(var l=0;l<t.BLOCK_SIZE;l++)(255&e[u+l])<=o&&a.set(n+l,r+s)},t.calculateBlackPoints=function(e,n,r,o,i){for(var a=i-t.BLOCK_SIZE,s=o-t.BLOCK_SIZE,u=new Array(r),l=0;l<r;l++){u[l]=new Int32Array(n);var c=l<<t.BLOCK_SIZE_POWER;c>a&&(c=a);for(var d=0;d<n;d++){var f=d<<t.BLOCK_SIZE_POWER;f>s&&(f=s);for(var p=0,h=255,m=0,v=0,g=c*o+f;v<t.BLOCK_SIZE;v++,g+=o){for(var y=0;y<t.BLOCK_SIZE;y++){var w=255&e[g+y];p+=w,w<h&&(h=w),w>m&&(m=w)}if(m-h>t.MIN_DYNAMIC_RANGE)for(v++,g+=o;v<t.BLOCK_SIZE;v++,g+=o)for(y=0;y<t.BLOCK_SIZE;y++)p+=255&e[g+y]}var b=p>>2*t.BLOCK_SIZE_POWER;if(m-h<=t.MIN_DYNAMIC_RANGE&&(b=h/2,l>0&&d>0)){var _=(u[l-1][d]+2*u[l][d-1]+u[l-1][d-1])/4;h<_&&(b=_)}u[l][d]=b}}return u},t.BLOCK_SIZE_POWER=3,t.BLOCK_SIZE=1<<t.BLOCK_SIZE_POWER,t.BLOCK_SIZE_MASK=t.BLOCK_SIZE-1,t.MINIMUM_DIMENSION=5*t.BLOCK_SIZE,t.MIN_DYNAMIC_RANGE=24,t}(Lr),Vr=function(){function e(e,t){this.width=e,this.height=t}return e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.isCropSupported=function(){return!1},e.prototype.crop=function(e,t,n,r){throw new Nr("This luminance source does not support cropping.")},e.prototype.isRotateSupported=function(){return!1},e.prototype.rotateCounterClockwise=function(){throw new Nr("This luminance source does not support rotation by 90 degrees.")},e.prototype.rotateCounterClockwise45=function(){throw new Nr("This luminance source does not support rotation by 45 degrees.")},e.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),t=new Rr,n=0;n<this.height;n++){for(var r=this.getRow(n,e),o=0;o<this.width;o++){var i,a=255&r[o];i=a<64?"#":a<128?"+":a<192?".":" ",t.append(i)}t.append("\n")}return t.toString()},e}(),Ur=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hr=function(e){function t(t){var n=e.call(this,t.getWidth(),t.getHeight())||this;return n.delegate=t,n}return Ur(t,e),t.prototype.getRow=function(e,t){for(var n=this.delegate.getRow(e,t),r=this.getWidth(),o=0;o<r;o++)n[o]=255-(255&n[o]);return n},t.prototype.getMatrix=function(){for(var e=this.delegate.getMatrix(),t=this.getWidth()*this.getHeight(),n=new Uint8ClampedArray(t),r=0;r<t;r++)n[r]=255-(255&e[r]);return n},t.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},t.prototype.crop=function(e,n,r,o){return new t(this.delegate.crop(e,n,r,o))},t.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},t.prototype.invert=function(){return this.delegate},t.prototype.rotateCounterClockwise=function(){return new t(this.delegate.rotateCounterClockwise())},t.prototype.rotateCounterClockwise45=function(){return new t(this.delegate.rotateCounterClockwise45())},t}(Vr),zr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gr=function(e){function t(n){var r=e.call(this,n.width,n.height)||this;return r.canvas=n,r.tempCanvasElement=null,r.buffer=t.makeBufferFromCanvasImageData(n),r}return zr(t,e),t.makeBufferFromCanvasImageData=function(e){var n=e.getContext("2d").getImageData(0,0,e.width,e.height);return t.toGrayscaleBuffer(n.data,e.width,e.height)},t.toGrayscaleBuffer=function(e,t,n){for(var r=new Uint8ClampedArray(t*n),o=0,i=0,a=e.length;o<a;o+=4,i++){var s=void 0;s=0===e[o+3]?255:306*e[o]+601*e[o+1]+117*e[o+2]+512>>10,r[i]=s}return r},t.prototype.getRow=function(e,t){if(e<0||e>=this.getHeight())throw new ur("Requested row is outside the image: "+e);var n=this.getWidth(),r=e*n;return null===t?t=this.buffer.slice(r,r+n):(t.length<n&&(t=new Uint8ClampedArray(n)),t.set(this.buffer.slice(r,r+n))),t},t.prototype.getMatrix=function(){return this.buffer},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(t,n,r,o){return e.prototype.crop.call(this,t,n,r,o),this},t.prototype.isRotateSupported=function(){return!0},t.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},t.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},t.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var e=this.canvas.ownerDocument.createElement("canvas");e.width=this.canvas.width,e.height=this.canvas.height,this.tempCanvasElement=e}return this.tempCanvasElement},t.prototype.rotate=function(e){var n=this.getTempCanvasElement(),r=n.getContext("2d"),o=e*t.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),u=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);return n.width=s,n.height=u,r.translate(s/2,u/2),r.rotate(o),r.drawImage(this.canvas,i/-2,a/-2),this.buffer=t.makeBufferFromCanvasImageData(n),this},t.prototype.invert=function(){return new Hr(this)},t.DEGREE_TO_RADIANS=Math.PI/180,t}(Vr),Wr=function(){function e(e,t,n){this.deviceId=e,this.label=t,this.kind="videoinput",this.groupId=n||void 0}return e.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},e}(),Xr=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Yr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},qr=function(){function e(e,t,n){void 0===t&&(t=500),this.reader=e,this.timeBetweenScansMillis=t,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(e.prototype,"hasNavigator",{get:function(){return"undefined"!=typeof navigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canEnumerateDevices",{get:function(){return!(!this.isMediaDevicesSuported||!navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(e){this._timeBetweenDecodingAttempts=e<0?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hints",{get:function(){return this._hints},set:function(e){this._hints=e||null},enumerable:!1,configurable:!0}),e.prototype.listVideoInputDevices=function(){return Xr(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u,l,c,d;return Yr(this,(function(f){switch(f.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=f.sent(),t=[];try{for(n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r=n.next();!r.done;r=n.next())o=r.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(t.length+1),u=o.groupId,l={deviceId:a,label:s,kind:i,groupId:u},t.push(l))}catch(e){c={error:e}}finally{try{r&&!r.done&&(d=n.return)&&d.call(n)}finally{if(c)throw c.error}}return[2,t]}}))}))},e.prototype.getVideoInputDevices=function(){return Xr(this,void 0,void 0,(function(){return Yr(this,(function(e){switch(e.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,e.sent().map((function(e){return new Wr(e.deviceId,e.label)}))]}}))}))},e.prototype.findDeviceById=function(e){return Xr(this,void 0,void 0,(function(){var t;return Yr(this,(function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(t=n.sent())?[2,t.find((function(t){return t.deviceId===e}))]:[2,null]}}))}))},e.prototype.decodeFromInputVideoDevice=function(e,t){return Xr(this,void 0,void 0,(function(){return Yr(this,(function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.decodeOnceFromVideoDevice=function(e,t){return Xr(this,void 0,void 0,(function(){var n;return Yr(this,(function(r){switch(r.label){case 0:return this.reset(),n={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(n,t)];case 1:return[2,r.sent()]}}))}))},e.prototype.decodeOnceFromConstraints=function(e,t){return Xr(this,void 0,void 0,(function(){var n;return Yr(this,(function(r){switch(r.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=r.sent(),[4,this.decodeOnceFromStream(n,t)];case 2:return[2,r.sent()]}}))}))},e.prototype.decodeOnceFromStream=function(e,t){return Xr(this,void 0,void 0,(function(){var n;return Yr(this,(function(r){switch(r.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,t)];case 1:return n=r.sent(),[4,this.decodeOnce(n)];case 2:return[2,r.sent()]}}))}))},e.prototype.decodeFromInputVideoDeviceContinuously=function(e,t,n){return Xr(this,void 0,void 0,(function(){return Yr(this,(function(r){switch(r.label){case 0:return[4,this.decodeFromVideoDevice(e,t,n)];case 1:return[2,r.sent()]}}))}))},e.prototype.decodeFromVideoDevice=function(e,t,n){return Xr(this,void 0,void 0,(function(){var r;return Yr(this,(function(o){switch(o.label){case 0:return r={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(r,t,n)];case 1:return[2,o.sent()]}}))}))},e.prototype.decodeFromConstraints=function(e,t,n){return Xr(this,void 0,void 0,(function(){var r;return Yr(this,(function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=o.sent(),[4,this.decodeFromStream(r,t,n)];case 2:return[2,o.sent()]}}))}))},e.prototype.decodeFromStream=function(e,t,n){return Xr(this,void 0,void 0,(function(){var r;return Yr(this,(function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,t)];case 1:return r=o.sent(),[4,this.decodeContinuously(r,n)];case 2:return[2,o.sent()]}}))}))},e.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},e.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},e.prototype.attachStreamToVideo=function(e,t){return Xr(this,void 0,void 0,(function(){var n;return Yr(this,(function(r){switch(r.label){case 0:return n=this.prepareVideoElement(t),this.addVideoSource(n,e),this.videoElement=n,this.stream=e,[4,this.playVideoOnLoadAsync(n)];case 1:return r.sent(),[2,n]}}))}))},e.prototype.playVideoOnLoadAsync=function(e){var t=this;return new Promise((function(n,r){return t.playVideoOnLoad(e,(function(){return n()}))}))},e.prototype.playVideoOnLoad=function(e,t){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",t),this.tryPlayVideo(e)},e.prototype.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2},e.prototype.tryPlayVideo=function(e){return Xr(this,void 0,void 0,(function(){return Yr(this,(function(t){switch(t.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,e.play()];case 2:return t.sent(),[3,4];case 3:return t.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}}))}))},e.prototype.getMediaElement=function(e,t){var n=document.getElementById(e);if(!n)throw new ar("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==t.toLowerCase())throw new ar("element with id '"+e+"' must be an "+t+" element");return n},e.prototype.decodeFromImage=function(e,t){if(!e&&!t)throw new ar("either imageElement with a src set or an url must be provided");return t&&!e?this.decodeFromImageUrl(t):this.decodeFromImageElement(e)},e.prototype.decodeFromVideo=function(e,t){if(!e&&!t)throw new ar("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrl(t):this.decodeFromVideoElement(e)},e.prototype.decodeFromVideoContinuously=function(e,t,n){if(void 0===e&&void 0===t)throw new ar("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrlContinuously(t,n):this.decodeFromVideoElementContinuously(e,n)},e.prototype.decodeFromImageElement=function(e){if(!e)throw new ar("An image element must be provided.");this.reset();var t=this.prepareImageElement(e);return this.imageElement=t,this.isImageLoaded(t)?this.decodeOnce(t,!1,!0):this._decodeOnLoadImage(t)},e.prototype.decodeFromVideoElement=function(e){var t=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(t)},e.prototype.decodeFromVideoElementContinuously=function(e,t){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,t)},e.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new ar("A video element must be provided.");this.reset();var t=this.prepareVideoElement(e);return this.videoElement=t,t},e.prototype.decodeFromImageUrl=function(e){if(!e)throw new ar("An URL must be provided.");this.reset();var t=this.prepareImageElement();this.imageElement=t;var n=this._decodeOnLoadImage(t);return t.src=e,n},e.prototype.decodeFromVideoUrl=function(e){if(!e)throw new ar("An URL must be provided.");this.reset();var t=this.prepareVideoElement(),n=this.decodeFromVideoElement(t);return t.src=e,n},e.prototype.decodeFromVideoUrlContinuously=function(e,t){if(!e)throw new ar("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),r=this.decodeFromVideoElementContinuously(n,t);return n.src=e,r},e.prototype._decodeOnLoadImage=function(e){var t=this;return new Promise((function(n,r){t.imageLoadedListener=function(){return t.decodeOnce(e,!1,!0).then(n,r)},e.addEventListener("load",t.imageLoadedListener)}))},e.prototype._decodeOnLoadVideo=function(e){return Xr(this,void 0,void 0,(function(){return Yr(this,(function(t){switch(t.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return t.sent(),[4,this.decodeOnce(e)];case 2:return[2,t.sent()]}}))}))},e.prototype._decodeOnLoadVideoContinuously=function(e,t){return Xr(this,void 0,void 0,(function(){return Yr(this,(function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),this.decodeContinuously(e,t),[2]}}))}))},e.prototype.isImageLoaded=function(e){return!!e.complete&&0!==e.naturalWidth},e.prototype.prepareImageElement=function(e){var t;return void 0===e&&((t=document.createElement("img")).width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(t=e),t},e.prototype.prepareVideoElement=function(e){var t;return e||"undefined"==typeof document||((t=document.createElement("video")).width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(t=e),t.setAttribute("autoplay","true"),t.setAttribute("muted","true"),t.setAttribute("playsinline","true"),t},e.prototype.decodeOnce=function(e,t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=!0),this._stopAsyncDecode=!1;var o=function o(i,a){if(r._stopAsyncDecode)return a(new Pr("Video stream has ended before any code could be detected.")),void(r._stopAsyncDecode=void 0);try{i(r.decode(e))}catch(e){if(t&&e instanceof Pr||(e instanceof dr||e instanceof Sr)&&n)return setTimeout(o,r._timeBetweenDecodingAttempts,i,a);a(e)}};return new Promise((function(e,t){return o(e,t)}))},e.prototype.decodeContinuously=function(e,t){var n=this;this._stopContinuousDecode=!1;!function r(){if(n._stopContinuousDecode)n._stopContinuousDecode=void 0;else try{var o=n.decode(e);t(o,null),setTimeout(r,n.timeBetweenScansMillis)}catch(e){t(null,e),(e instanceof dr||e instanceof Sr||e instanceof Pr)&&setTimeout(r,n._timeBetweenDecodingAttempts)}}()},e.prototype.decode=function(e){var t=this.createBinaryBitmap(e);return this.decodeBitmap(t)},e.prototype.createBinaryBitmap=function(e){var t=this.getCaptureCanvasContext(e);this.drawImageOnCanvas(t,e);var n=this.getCaptureCanvas(e),r=new Gr(n),o=new Br(r);return new lr(o)},e.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var t=this.getCaptureCanvas(e).getContext("2d");this.captureCanvasContext=t}return this.captureCanvasContext},e.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var t=this.createCaptureCanvas(e);this.captureCanvas=t}return this.captureCanvas},e.prototype.drawImageOnCanvas=function(e,t){e.drawImage(t,0,0)},e.prototype.decodeBitmap=function(e){return this.reader.decode(e,this._hints)},e.prototype.createCaptureCanvas=function(e){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;var t,n,r=document.createElement("canvas");return void 0!==e&&(e instanceof HTMLVideoElement?(t=e.videoWidth,n=e.videoHeight):e instanceof HTMLImageElement&&(t=e.naturalWidth||e.width,n=e.naturalHeight||e.height)),r.style.width=t+"px",r.style.height=n+"px",r.width=t,r.height=n,r},e.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach((function(e){return e.stop()})),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()},e.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},e.prototype._destroyVideoElement=function(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},e.prototype._destroyImageElement=function(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},e.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},e.prototype.addVideoSource=function(e,t){try{e.srcObject=t}catch(n){e.src=URL.createObjectURL(t)}},e.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch(t){e.src=""}this.videoElement.removeAttribute("src")},e}(),Kr=function(){function e(e,t,n,r,o,i){void 0===n&&(n=null==t?0:8*t.length),void 0===i&&(i=pr.currentTimeMillis()),this.text=e,this.rawBytes=t,this.numBits=n,this.resultPoints=r,this.format=o,this.timestamp=i,this.text=e,this.rawBytes=t,this.numBits=null==n?null==t?0:8*t.length:n,this.resultPoints=r,this.format=o,this.resultMetadata=null,this.timestamp=null==i?pr.currentTimeMillis():i}return e.prototype.getText=function(){return this.text},e.prototype.getRawBytes=function(){return this.rawBytes},e.prototype.getNumBits=function(){return this.numBits},e.prototype.getResultPoints=function(){return this.resultPoints},e.prototype.getBarcodeFormat=function(){return this.format},e.prototype.getResultMetadata=function(){return this.resultMetadata},e.prototype.putMetadata=function(e,t){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(e,t)},e.prototype.putAllMetadata=function(e){null!==e&&(null===this.resultMetadata?this.resultMetadata=e:this.resultMetadata=new Map(e))},e.prototype.addResultPoints=function(e){var t=this.resultPoints;if(null===t)this.resultPoints=e;else if(null!==e&&e.length>0){var n=new Array(t.length+e.length);pr.arraycopy(t,0,n,0,t.length),pr.arraycopy(e,0,n,t.length,e.length),this.resultPoints=n}},e.prototype.getTimestamp=function(){return this.timestamp},e.prototype.toString=function(){return this.text},e}();!function(e){e[e.AZTEC=0]="AZTEC",e[e.CODABAR=1]="CODABAR",e[e.CODE_39=2]="CODE_39",e[e.CODE_93=3]="CODE_93",e[e.CODE_128=4]="CODE_128",e[e.DATA_MATRIX=5]="DATA_MATRIX",e[e.EAN_8=6]="EAN_8",e[e.EAN_13=7]="EAN_13",e[e.ITF=8]="ITF",e[e.MAXICODE=9]="MAXICODE",e[e.PDF_417=10]="PDF_417",e[e.QR_CODE=11]="QR_CODE",e[e.RSS_14=12]="RSS_14",e[e.RSS_EXPANDED=13]="RSS_EXPANDED",e[e.UPC_A=14]="UPC_A",e[e.UPC_E=15]="UPC_E",e[e.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(Ir||(Ir={}));var Zr,Jr=Ir;!function(e){e[e.OTHER=0]="OTHER",e[e.ORIENTATION=1]="ORIENTATION",e[e.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",e[e.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",e[e.ISSUE_NUMBER=4]="ISSUE_NUMBER",e[e.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",e[e.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",e[e.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",e[e.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",e[e.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",e[e.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(Zr||(Zr={}));var $r,Qr=Zr,eo=function(){function e(e,t,n,r,o,i){void 0===o&&(o=-1),void 0===i&&(i=-1),this.rawBytes=e,this.text=t,this.byteSegments=n,this.ecLevel=r,this.structuredAppendSequenceNumber=o,this.structuredAppendParity=i,this.numBits=null==e?0:8*e.length}return e.prototype.getRawBytes=function(){return this.rawBytes},e.prototype.getNumBits=function(){return this.numBits},e.prototype.setNumBits=function(e){this.numBits=e},e.prototype.getText=function(){return this.text},e.prototype.getByteSegments=function(){return this.byteSegments},e.prototype.getECLevel=function(){return this.ecLevel},e.prototype.getErrorsCorrected=function(){return this.errorsCorrected},e.prototype.setErrorsCorrected=function(e){this.errorsCorrected=e},e.prototype.getErasures=function(){return this.erasures},e.prototype.setErasures=function(e){this.erasures=e},e.prototype.getOther=function(){return this.other},e.prototype.setOther=function(e){this.other=e},e.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},e.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},e.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},e}(),to=function(){function e(){}return e.prototype.exp=function(e){return this.expTable[e]},e.prototype.log=function(e){if(0===e)throw new ur;return this.logTable[e]},e.addOrSubtract=function(e,t){return e^t},e}(),no=function(){function e(e,t){if(0===t.length)throw new ur;this.field=e;var n=t.length;if(n>1&&0===t[0]){for(var r=1;r<n&&0===t[r];)r++;r===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-r),pr.arraycopy(t,r,this.coefficients,0,this.coefficients.length))}else this.coefficients=t}return e.prototype.getCoefficients=function(){return this.coefficients},e.prototype.getDegree=function(){return this.coefficients.length-1},e.prototype.isZero=function(){return 0===this.coefficients[0]},e.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},e.prototype.evaluateAt=function(e){if(0===e)return this.getCoefficient(0);var t,n=this.coefficients;if(1===e){t=0;for(var r=0,o=n.length;r!==o;r++){var i=n[r];t=to.addOrSubtract(t,i)}return t}t=n[0];var a=n.length,s=this.field;for(r=1;r<a;r++)t=to.addOrSubtract(s.multiply(e,t),n[r]);return t},e.prototype.addOrSubtract=function(t){if(!this.field.equals(t.field))throw new ur("GenericGFPolys do not have same GenericGF field");if(this.isZero())return t;if(t.isZero())return this;var n=this.coefficients,r=t.coefficients;if(n.length>r.length){var o=n;n=r,r=o}var i=new Int32Array(r.length),a=r.length-n.length;pr.arraycopy(r,0,i,0,a);for(var s=a;s<r.length;s++)i[s]=to.addOrSubtract(n[s-a],r[s]);return new e(this.field,i)},e.prototype.multiply=function(t){if(!this.field.equals(t.field))throw new ur("GenericGFPolys do not have same GenericGF field");if(this.isZero()||t.isZero())return this.field.getZero();for(var n=this.coefficients,r=n.length,o=t.coefficients,i=o.length,a=new Int32Array(r+i-1),s=this.field,u=0;u<r;u++)for(var l=n[u],c=0;c<i;c++)a[u+c]=to.addOrSubtract(a[u+c],s.multiply(l,o[c]));return new e(s,a)},e.prototype.multiplyScalar=function(t){if(0===t)return this.field.getZero();if(1===t)return this;for(var n=this.coefficients.length,r=this.field,o=new Int32Array(n),i=this.coefficients,a=0;a<n;a++)o[a]=r.multiply(i[a],t);return new e(r,o)},e.prototype.multiplyByMonomial=function(t,n){if(t<0)throw new ur;if(0===n)return this.field.getZero();for(var r=this.coefficients,o=r.length,i=new Int32Array(o+t),a=this.field,s=0;s<o;s++)i[s]=a.multiply(r[s],n);return new e(a,i)},e.prototype.divide=function(e){if(!this.field.equals(e.field))throw new ur("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new ur("Divide by 0");for(var t=this.field,n=t.getZero(),r=this,o=e.getCoefficient(e.getDegree()),i=t.inverse(o);r.getDegree()>=e.getDegree()&&!r.isZero();){var a=r.getDegree()-e.getDegree(),s=t.multiply(r.getCoefficient(r.getDegree()),i),u=e.multiplyByMonomial(a,s),l=t.buildMonomial(a,s);n=n.addOrSubtract(l),r=r.addOrSubtract(u)}return[n,r]},e.prototype.toString=function(){for(var e="",t=this.getDegree();t>=0;t--){var n=this.getCoefficient(t);if(0!==n){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),0===t||1!==n){var r=this.field.log(n);0===r?e+="1":1===r?e+="a":(e+="a^",e+=r)}0!==t&&(1===t?e+="x":(e+="x^",e+=t))}}return e},e}(),ro=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.kind="ArithmeticException",t}(or),io=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ao=function(e){function t(t,n,r){var o=e.call(this)||this;o.primitive=t,o.size=n,o.generatorBase=r;for(var i=new Int32Array(n),a=1,s=0;s<n;s++)i[s]=a,(a*=2)>=n&&(a^=t,a&=n-1);o.expTable=i;var u=new Int32Array(n);for(s=0;s<n-1;s++)u[i[s]]=s;return o.logTable=u,o.zero=new no(o,Int32Array.from([0])),o.one=new no(o,Int32Array.from([1])),o}return io(t,e),t.prototype.getZero=function(){return this.zero},t.prototype.getOne=function(){return this.one},t.prototype.buildMonomial=function(e,t){if(e<0)throw new ur;if(0===t)return this.zero;var n=new Int32Array(e+1);return n[0]=t,new no(this,n)},t.prototype.inverse=function(e){if(0===e)throw new oo;return this.expTable[this.size-this.logTable[e]-1]},t.prototype.multiply=function(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.size-1)]},t.prototype.getSize=function(){return this.size},t.prototype.getGeneratorBase=function(){return this.generatorBase},t.prototype.toString=function(){return"GF(0x"+wr.toHexString(this.primitive)+","+this.size+")"},t.prototype.equals=function(e){return e===this},t.AZTEC_DATA_12=new t(4201,4096,1),t.AZTEC_DATA_10=new t(1033,1024,1),t.AZTEC_DATA_6=new t(67,64,1),t.AZTEC_PARAM=new t(19,16,1),t.QR_CODE_FIELD_256=new t(285,256,0),t.DATA_MATRIX_FIELD_256=new t(301,256,1),t.AZTEC_DATA_8=t.DATA_MATRIX_FIELD_256,t.MAXICODE_FIELD_64=t.AZTEC_DATA_6,t}(to),so=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return so(t,e),t.kind="ReedSolomonException",t}(or),lo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lo(t,e),t.kind="IllegalStateException",t}(or),fo=function(){function e(e){this.field=e}return e.prototype.decode=function(e,t){for(var n=this.field,r=new no(n,e),o=new Int32Array(t),i=!0,a=0;a<t;a++){var s=r.evaluateAt(n.exp(a+n.getGeneratorBase()));o[o.length-1-a]=s,0!==s&&(i=!1)}if(!i){var u=new no(n,o),l=this.runEuclideanAlgorithm(n.buildMonomial(t,1),u,t),c=l[0],d=l[1],f=this.findErrorLocations(c),p=this.findErrorMagnitudes(d,f);for(a=0;a<f.length;a++){var h=e.length-1-n.log(f[a]);if(h<0)throw new uo("Bad error location");e[h]=ao.addOrSubtract(e[h],p[a])}}},e.prototype.runEuclideanAlgorithm=function(e,t,n){if(e.getDegree()<t.getDegree()){var r=e;e=t,t=r}for(var o=this.field,i=e,a=t,s=o.getZero(),u=o.getOne();a.getDegree()>=(n/2|0);){var l=i,c=s;if(s=u,(i=a).isZero())throw new uo("r_{i-1} was zero");a=l;for(var d=o.getZero(),f=i.getCoefficient(i.getDegree()),p=o.inverse(f);a.getDegree()>=i.getDegree()&&!a.isZero();){var h=a.getDegree()-i.getDegree(),m=o.multiply(a.getCoefficient(a.getDegree()),p);d=d.addOrSubtract(o.buildMonomial(h,m)),a=a.addOrSubtract(i.multiplyByMonomial(h,m))}if(u=d.multiply(s).addOrSubtract(c),a.getDegree()>=i.getDegree())throw new co("Division algorithm failed to reduce polynomial?")}var v=u.getCoefficient(0);if(0===v)throw new uo("sigmaTilde(0) was zero");var g=o.inverse(v);return[u.multiplyScalar(g),a.multiplyScalar(g)]},e.prototype.findErrorLocations=function(e){var t=e.getDegree();if(1===t)return Int32Array.from([e.getCoefficient(1)]);for(var n=new Int32Array(t),r=0,o=this.field,i=1;i<o.getSize()&&r<t;i++)0===e.evaluateAt(i)&&(n[r]=o.inverse(i),r++);if(r!==t)throw new uo("Error locator degree does not match number of roots");return n},e.prototype.findErrorMagnitudes=function(e,t){for(var n=t.length,r=new Int32Array(n),o=this.field,i=0;i<n;i++){for(var a=o.inverse(t[i]),s=1,u=0;u<n;u++)if(i!==u){var l=o.multiply(t[u],a),c=0==(1&l)?1|l:-2&l;s=o.multiply(s,c)}r[i]=o.multiply(e.evaluateAt(a),o.inverse(s)),0!==o.getGeneratorBase()&&(r[i]=o.multiply(r[i],a))}return r},e}();!function(e){e[e.UPPER=0]="UPPER",e[e.LOWER=1]="LOWER",e[e.MIXED=2]="MIXED",e[e.DIGIT=3]="DIGIT",e[e.PUNCT=4]="PUNCT",e[e.BINARY=5]="BINARY"}($r||($r={}));var po=function(){function e(){}return e.prototype.decode=function(t){this.ddata=t;var n=t.getBits(),r=this.extractBits(n),o=this.correctBits(r),i=e.convertBoolArrayToByteArray(o),a=e.getEncodedData(o),s=new eo(i,a,null,null);return s.setNumBits(o.length),s},e.highLevelDecode=function(e){return this.getEncodedData(e)},e.getEncodedData=function(t){for(var n=t.length,r=$r.UPPER,o=$r.UPPER,i="",a=0;a<n;)if(o===$r.BINARY){if(n-a<5)break;var s=e.readCode(t,a,5);if(a+=5,0===s){if(n-a<11)break;s=e.readCode(t,a,11)+31,a+=11}for(var u=0;u<s;u++){if(n-a<8){a=n;break}var l=e.readCode(t,a,8);i+=kr.castAsNonUtf8Char(l),a+=8}o=r}else{var c=o===$r.DIGIT?4:5;if(n-a<c)break;l=e.readCode(t,a,c),a+=c;var d=e.getCharacter(o,l);d.startsWith("CTRL_")?(r=o,o=e.getTable(d.charAt(5)),"L"===d.charAt(6)&&(r=o)):(i+=d,o=r)}return i},e.getTable=function(e){switch(e){case"L":return $r.LOWER;case"P":return $r.PUNCT;case"M":return $r.MIXED;case"D":return $r.DIGIT;case"B":return $r.BINARY;default:return $r.UPPER}},e.getCharacter=function(t,n){switch(t){case $r.UPPER:return e.UPPER_TABLE[n];case $r.LOWER:return e.LOWER_TABLE[n];case $r.MIXED:return e.MIXED_TABLE[n];case $r.PUNCT:return e.PUNCT_TABLE[n];case $r.DIGIT:return e.DIGIT_TABLE[n];default:throw new co("Bad table")}},e.prototype.correctBits=function(t){var n,r;this.ddata.getNbLayers()<=2?(r=6,n=ao.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(r=8,n=ao.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(r=10,n=ao.AZTEC_DATA_10):(r=12,n=ao.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=t.length/r;if(i<o)throw new Sr;for(var a=t.length%r,s=new Int32Array(i),u=0;u<i;u++,a+=r)s[u]=e.readCode(t,a,r);try{new fo(n).decode(s,i-o)}catch(e){throw new Sr(e)}var l=(1<<r)-1,c=0;for(u=0;u<o;u++){if(0===(p=s[u])||p===l)throw new Sr;1!==p&&p!==l-1||c++}var d=new Array(o*r-c),f=0;for(u=0;u<o;u++){var p;if(1===(p=s[u])||p===l-1)d.fill(p>1,f,f+r-1),f+=r-1;else for(var h=r-1;h>=0;--h)d[f++]=0!=(p&1<<h)}return d},e.prototype.extractBits=function(e){var t=this.ddata.isCompact(),n=this.ddata.getNbLayers(),r=(t?11:14)+4*n,o=new Int32Array(r),i=new Array(this.totalBitsInLayer(n,t));if(t)for(var a=0;a<o.length;a++)o[a]=a;else{var s=r+1+2*wr.truncDivision(wr.truncDivision(r,2)-1,15),u=r/2,l=wr.truncDivision(s,2);for(a=0;a<u;a++){var c=a+wr.truncDivision(a,15);o[u-a-1]=l-c-1,o[u+a]=l+c+1}}a=0;for(var d=0;a<n;a++){for(var f=4*(n-a)+(t?9:12),p=2*a,h=r-1-p,m=0;m<f;m++)for(var v=2*m,g=0;g<2;g++)i[d+v+g]=e.get(o[p+g],o[p+m]),i[d+2*f+v+g]=e.get(o[p+m],o[h-g]),i[d+4*f+v+g]=e.get(o[h-g],o[h-m]),i[d+6*f+v+g]=e.get(o[h-m],o[p+g]);d+=8*f}return i},e.readCode=function(e,t,n){for(var r=0,o=t;o<t+n;o++)r<<=1,e[o]&&(r|=1);return r},e.readByte=function(t,n){var r=t.length-n;return r>=8?e.readCode(t,n,8):e.readCode(t,n,r)<<8-r},e.convertBoolArrayToByteArray=function(t){for(var n=new Uint8Array((t.length+7)/8),r=0;r<n.length;r++)n[r]=e.readByte(t,8*r);return n},e.prototype.totalBitsInLayer=function(e,t){return((t?88:112)+16*e)*e},e.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],e.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],e.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b","\t","\n","\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],e.PUNCT_TABLE=["","\r","\r\n",". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],e.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],e}(),ho=function(){function e(){}return e.round=function(e){return NaN===e?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0},e.distance=function(e,t,n,r){var o=e-n,i=t-r;return Math.sqrt(o*o+i*i)},e.sum=function(e){for(var t=0,n=0,r=e.length;n!==r;n++)t+=e[n];return t},e}(),mo=function(){function e(){}return e.floatToIntBits=function(e){return e},e.MAX_VALUE=Number.MAX_SAFE_INTEGER,e}(),vo=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.equals=function(t){if(t instanceof e){var n=t;return this.x===n.x&&this.y===n.y}return!1},e.prototype.hashCode=function(){return 31*mo.floatToIntBits(this.x)+mo.floatToIntBits(this.y)},e.prototype.toString=function(){return"("+this.x+","+this.y+")"},e.orderBestPatterns=function(e){var t,n,r,o=this.distance(e[0],e[1]),i=this.distance(e[1],e[2]),a=this.distance(e[0],e[2]);if(i>=o&&i>=a?(n=e[0],t=e[1],r=e[2]):a>=i&&a>=o?(n=e[1],t=e[0],r=e[2]):(n=e[2],t=e[0],r=e[1]),this.crossProductZ(t,n,r)<0){var s=t;t=r,r=s}e[0]=t,e[1]=n,e[2]=r},e.distance=function(e,t){return ho.distance(e.x,e.y,t.x,t.y)},e.crossProductZ=function(e,t,n){var r=t.x,o=t.y;return(n.x-r)*(e.y-o)-(n.y-o)*(e.x-r)},e}(),go=function(){function e(e,t){this.bits=e,this.points=t}return e.prototype.getBits=function(){return this.bits},e.prototype.getPoints=function(){return this.points},e}(),yo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wo=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n)||this;return a.compact=r,a.nbDatablocks=o,a.nbLayers=i,a}return yo(t,e),t.prototype.getNbLayers=function(){return this.nbLayers},t.prototype.getNbDatablocks=function(){return this.nbDatablocks},t.prototype.isCompact=function(){return this.compact},t}(go),bo=function(){function e(t,n,r,o){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),null==n&&(n=e.INIT_SIZE),null==r&&(r=t.getWidth()/2|0),null==o&&(o=t.getHeight()/2|0);var i=n/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new Pr}return e.prototype.detect=function(){for(var e=this.leftInit,t=this.rightInit,n=this.upInit,r=this.downInit,o=!1,i=!0,a=!1,s=!1,u=!1,l=!1,c=!1,d=this.width,f=this.height;i;){i=!1;for(var p=!0;(p||!s)&&t<d;)(p=this.containsBlackPoint(n,r,t,!1))?(t++,i=!0,s=!0):s||t++;if(t>=d){o=!0;break}for(var h=!0;(h||!u)&&r<f;)(h=this.containsBlackPoint(e,t,r,!0))?(r++,i=!0,u=!0):u||r++;if(r>=f){o=!0;break}for(var m=!0;(m||!l)&&e>=0;)(m=this.containsBlackPoint(n,r,e,!1))?(e--,i=!0,l=!0):l||e--;if(e<0){o=!0;break}for(var v=!0;(v||!c)&&n>=0;)(v=this.containsBlackPoint(e,t,n,!0))?(n--,i=!0,c=!0):c||n--;if(n<0){o=!0;break}i&&(a=!0)}if(!o&&a){for(var g=t-e,y=null,w=1;null===y&&w<g;w++)y=this.getBlackPointOnSegment(e,r-w,e+w,r);if(null==y)throw new Pr;var b=null;for(w=1;null===b&&w<g;w++)b=this.getBlackPointOnSegment(e,n+w,e+w,n);if(null==b)throw new Pr;var _=null;for(w=1;null===_&&w<g;w++)_=this.getBlackPointOnSegment(t,n+w,t-w,n);if(null==_)throw new Pr;var E=null;for(w=1;null===E&&w<g;w++)E=this.getBlackPointOnSegment(t,r-w,t-w,r);if(null==E)throw new Pr;return this.centerEdges(E,y,_,b)}throw new Pr},e.prototype.getBlackPointOnSegment=function(e,t,n,r){for(var o=ho.round(ho.distance(e,t,n,r)),i=(n-e)/o,a=(r-t)/o,s=this.image,u=0;u<o;u++){var l=ho.round(e+u*i),c=ho.round(t+u*a);if(s.get(l,c))return new vo(l,c)}return null},e.prototype.centerEdges=function(t,n,r,o){var i=t.getX(),a=t.getY(),s=n.getX(),u=n.getY(),l=r.getX(),c=r.getY(),d=o.getX(),f=o.getY(),p=e.CORR;return i<this.width/2?[new vo(d-p,f+p),new vo(s+p,u+p),new vo(l-p,c-p),new vo(i+p,a-p)]:[new vo(d+p,f+p),new vo(s+p,u-p),new vo(l-p,c+p),new vo(i-p,a-p)]},e.prototype.containsBlackPoint=function(e,t,n,r){var o=this.image;if(r){for(var i=e;i<=t;i++)if(o.get(i,n))return!0}else for(var a=e;a<=t;a++)if(o.get(n,a))return!0;return!1},e.INIT_SIZE=10,e.CORR=1,e}(),_o=function(){function e(){}return e.checkAndNudgePoints=function(e,t){for(var n=e.getWidth(),r=e.getHeight(),o=!0,i=0;i<t.length&&o;i+=2){var a=Math.floor(t[i]),s=Math.floor(t[i+1]);if(a<-1||a>n||s<-1||s>r)throw new Pr;o=!1,-1===a?(t[i]=0,o=!0):a===n&&(t[i]=n-1,o=!0),-1===s?(t[i+1]=0,o=!0):s===r&&(t[i+1]=r-1,o=!0)}for(o=!0,i=t.length-2;i>=0&&o;i-=2){if(a=Math.floor(t[i]),s=Math.floor(t[i+1]),a<-1||a>n||s<-1||s>r)throw new Pr;o=!1,-1===a?(t[i]=0,o=!0):a===n&&(t[i]=n-1,o=!0),-1===s?(t[i+1]=0,o=!0):s===r&&(t[i+1]=r-1,o=!0)}},e}(),Eo=function(){function e(e,t,n,r,o,i,a,s,u){this.a11=e,this.a21=t,this.a31=n,this.a12=r,this.a22=o,this.a32=i,this.a13=a,this.a23=s,this.a33=u}return e.quadrilateralToQuadrilateral=function(t,n,r,o,i,a,s,u,l,c,d,f,p,h,m,v){var g=e.quadrilateralToSquare(t,n,r,o,i,a,s,u);return e.squareToQuadrilateral(l,c,d,f,p,h,m,v).times(g)},e.prototype.transformPoints=function(e){for(var t=e.length,n=this.a11,r=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,l=this.a32,c=this.a33,d=0;d<t;d+=2){var f=e[d],p=e[d+1],h=o*f+s*p+c;e[d]=(n*f+i*p+u)/h,e[d+1]=(r*f+a*p+l)/h}},e.prototype.transformPointsWithValues=function(e,t){for(var n=this.a11,r=this.a12,o=this.a13,i=this.a21,a=this.a22,s=this.a23,u=this.a31,l=this.a32,c=this.a33,d=e.length,f=0;f<d;f++){var p=e[f],h=t[f],m=o*p+s*h+c;e[f]=(n*p+i*h+u)/m,t[f]=(r*p+a*h+l)/m}},e.squareToQuadrilateral=function(t,n,r,o,i,a,s,u){var l=t-r+i-s,c=n-o+a-u;if(0===l&&0===c)return new e(r-t,i-r,t,o-n,a-o,n,0,0,1);var d=r-i,f=s-i,p=o-a,h=u-a,m=d*h-f*p,v=(l*h-f*c)/m,g=(d*c-l*p)/m;return new e(r-t+v*r,s-t+g*s,t,o-n+v*o,u-n+g*u,n,v,g,1)},e.quadrilateralToSquare=function(t,n,r,o,i,a,s,u){return e.squareToQuadrilateral(t,n,r,o,i,a,s,u).buildAdjoint()},e.prototype.buildAdjoint=function(){return new e(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},e.prototype.times=function(t){return new e(this.a11*t.a11+this.a21*t.a12+this.a31*t.a13,this.a11*t.a21+this.a21*t.a22+this.a31*t.a23,this.a11*t.a31+this.a21*t.a32+this.a31*t.a33,this.a12*t.a11+this.a22*t.a12+this.a32*t.a13,this.a12*t.a21+this.a22*t.a22+this.a32*t.a23,this.a12*t.a31+this.a22*t.a32+this.a32*t.a33,this.a13*t.a11+this.a23*t.a12+this.a33*t.a13,this.a13*t.a21+this.a23*t.a22+this.a33*t.a23,this.a13*t.a31+this.a23*t.a32+this.a33*t.a33)},e}(),xo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xo(t,e),t.prototype.sampleGrid=function(e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,m,v,g,y){var w=Eo.quadrilateralToQuadrilateral(r,o,i,a,s,u,l,c,d,f,p,h,m,v,g,y);return this.sampleGridWithTransform(e,t,n,w)},t.prototype.sampleGridWithTransform=function(e,t,n,r){if(t<=0||n<=0)throw new Pr;for(var o=new jr(t,n),i=new Float32Array(2*t),a=0;a<n;a++){for(var s=i.length,u=a+.5,l=0;l<s;l+=2)i[l]=l/2+.5,i[l+1]=u;r.transformPoints(i),_o.checkAndNudgePoints(e,i);try{for(l=0;l<s;l+=2)e.get(Math.floor(i[l]),Math.floor(i[l+1]))&&o.set(l/2,a)}catch(e){throw new Pr}}return o},t}(_o),Co=function(){function e(){}return e.setGridSampler=function(t){e.gridSampler=t},e.getInstance=function(){return e.gridSampler},e.gridSampler=new So,e}(),Io=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toResultPoint=function(){return new vo(this.getX(),this.getY())},e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e}(),Ao=function(){function e(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}return e.prototype.detect=function(){return this.detectMirror(!1)},e.prototype.detectMirror=function(e){var t=this.getMatrixCenter(),n=this.getBullsEyeCorners(t);if(e){var r=n[0];n[0]=n[2],n[2]=r}this.extractParameters(n);var o=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),i=this.getMatrixCornerPoints(n);return new wo(o,i,this.compact,this.nbDataBlocks,this.nbLayers)},e.prototype.extractParameters=function(e){if(!(this.isValidPoint(e[0])&&this.isValidPoint(e[1])&&this.isValidPoint(e[2])&&this.isValidPoint(e[3])))throw new Pr;var t=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],t),this.sampleLine(e[1],e[2],t),this.sampleLine(e[2],e[3],t),this.sampleLine(e[3],e[0],t)]);this.shift=this.getRotation(n,t);for(var r=0,o=0;o<4;o++){var i=n[(this.shift+o)%4];this.compact?(r<<=7,r+=i>>1&127):(r<<=10,r+=(i>>2&992)+(i>>1&31))}var a=this.getCorrectedParameterData(r,this.compact);this.compact?(this.nbLayers=1+(a>>6),this.nbDataBlocks=1+(63&a)):(this.nbLayers=1+(a>>11),this.nbDataBlocks=1+(2047&a))},e.prototype.getRotation=function(e,t){var n=0;e.forEach((function(e,r,o){n=(e>>t-2<<1)+(1&e)+(n<<3)})),n=((1&n)<<11)+(n>>1);for(var r=0;r<4;r++)if(wr.bitCount(n^this.EXPECTED_CORNER_BITS[r])<=2)return r;throw new Pr},e.prototype.getCorrectedParameterData=function(e,t){var n,r;t?(n=7,r=2):(n=10,r=4);for(var o=n-r,i=new Int32Array(n),a=n-1;a>=0;--a)i[a]=15&e,e>>=4;try{new fo(ao.AZTEC_PARAM).decode(i,o)}catch(e){throw new Pr}var s=0;for(a=0;a<r;a++)s=(s<<4)+i[a];return s},e.prototype.getBullsEyeCorners=function(e){var t=e,n=e,r=e,o=e,i=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var a=this.getFirstDifferent(t,i,1,-1),s=this.getFirstDifferent(n,i,1,1),u=this.getFirstDifferent(r,i,-1,1),l=this.getFirstDifferent(o,i,-1,-1);if(this.nbCenterLayers>2){var c=this.distancePoint(l,a)*this.nbCenterLayers/(this.distancePoint(o,t)*(this.nbCenterLayers+2));if(c<.75||c>1.25||!this.isWhiteOrBlackRectangle(a,s,u,l))break}t=a,n=s,r=u,o=l,i=!i}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new Pr;this.compact=5===this.nbCenterLayers;var d=new vo(t.getX()+.5,t.getY()-.5),f=new vo(n.getX()+.5,n.getY()+.5),p=new vo(r.getX()-.5,r.getY()+.5),h=new vo(o.getX()-.5,o.getY()-.5);return this.expandSquare([d,f,p,h],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},e.prototype.getMatrixCenter=function(){var e,t,n,r;try{e=(u=new bo(this.image).detect())[0],t=u[1],n=u[2],r=u[3]}catch(a){var o=this.image.getWidth()/2,i=this.image.getHeight()/2;e=this.getFirstDifferent(new Io(o+7,i-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new Io(o+7,i+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Io(o-7,i+7),!1,-1,1).toResultPoint(),r=this.getFirstDifferent(new Io(o-7,i-7),!1,-1,-1).toResultPoint()}var a=ho.round((e.getX()+r.getX()+t.getX()+n.getX())/4),s=ho.round((e.getY()+r.getY()+t.getY()+n.getY())/4);try{var u;e=(u=new bo(this.image,15,a,s).detect())[0],t=u[1],n=u[2],r=u[3]}catch(o){e=this.getFirstDifferent(new Io(a+7,s-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new Io(a+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Io(a-7,s+7),!1,-1,1).toResultPoint(),r=this.getFirstDifferent(new Io(a-7,s-7),!1,-1,-1).toResultPoint()}return a=ho.round((e.getX()+r.getX()+t.getX()+n.getX())/4),s=ho.round((e.getY()+r.getY()+t.getY()+n.getY())/4),new Io(a,s)},e.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},e.prototype.sampleGrid=function(e,t,n,r,o){var i=Co.getInstance(),a=this.getDimension(),s=a/2-this.nbCenterLayers,u=a/2+this.nbCenterLayers;return i.sampleGrid(e,a,a,s,s,u,s,u,u,s,u,t.getX(),t.getY(),n.getX(),n.getY(),r.getX(),r.getY(),o.getX(),o.getY())},e.prototype.sampleLine=function(e,t,n){for(var r=0,o=this.distanceResultPoint(e,t),i=o/n,a=e.getX(),s=e.getY(),u=i*(t.getX()-e.getX())/o,l=i*(t.getY()-e.getY())/o,c=0;c<n;c++)this.image.get(ho.round(a+c*u),ho.round(s+c*l))&&(r|=1<<n-c-1);return r},e.prototype.isWhiteOrBlackRectangle=function(e,t,n,r){e=new Io(e.getX()-3,e.getY()+3),t=new Io(t.getX()-3,t.getY()-3),n=new Io(n.getX()+3,n.getY()-3),r=new Io(r.getX()+3,r.getY()+3);var o=this.getColor(r,e);if(0===o)return!1;var i=this.getColor(e,t);return i===o&&(i=this.getColor(t,n))===o&&(i=this.getColor(n,r))===o},e.prototype.getColor=function(e,t){for(var n=this.distancePoint(e,t),r=(t.getX()-e.getX())/n,o=(t.getY()-e.getY())/n,i=0,a=e.getX(),s=e.getY(),u=this.image.get(e.getX(),e.getY()),l=Math.ceil(n),c=0;c<l;c++)a+=r,s+=o,this.image.get(ho.round(a),ho.round(s))!==u&&i++;var d=i/n;return d>.1&&d<.9?0:d<=.1===u?1:-1},e.prototype.getFirstDifferent=function(e,t,n,r){for(var o=e.getX()+n,i=e.getY()+r;this.isValid(o,i)&&this.image.get(o,i)===t;)o+=n,i+=r;for(o-=n,i-=r;this.isValid(o,i)&&this.image.get(o,i)===t;)o+=n;for(o-=n;this.isValid(o,i)&&this.image.get(o,i)===t;)i+=r;return new Io(o,i-=r)},e.prototype.expandSquare=function(e,t,n){var r=n/(2*t),o=e[0].getX()-e[2].getX(),i=e[0].getY()-e[2].getY(),a=(e[0].getX()+e[2].getX())/2,s=(e[0].getY()+e[2].getY())/2,u=new vo(a+r*o,s+r*i),l=new vo(a-r*o,s-r*i);return o=e[1].getX()-e[3].getX(),i=e[1].getY()-e[3].getY(),a=(e[1].getX()+e[3].getX())/2,s=(e[1].getY()+e[3].getY())/2,[u,new vo(a+r*o,s+r*i),l,new vo(a-r*o,s-r*i)]},e.prototype.isValid=function(e,t){return e>=0&&e<this.image.getWidth()&&t>0&&t<this.image.getHeight()},e.prototype.isValidPoint=function(e){var t=ho.round(e.getX()),n=ho.round(e.getY());return this.isValid(t,n)},e.prototype.distancePoint=function(e,t){return ho.distance(e.getX(),e.getY(),t.getX(),t.getY())},e.prototype.distanceResultPoint=function(e,t){return ho.distance(e.getX(),e.getY(),t.getX(),t.getY())},e.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(wr.truncDivision(this.nbLayers-4,8)+1)+15},e}(),Oo=function(){function e(){}return e.prototype.decode=function(e,t){void 0===t&&(t=null);var n=null,r=new Ao(e.getBlackMatrix()),o=null,i=null;try{o=(a=r.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(t,o),i=(new po).decode(a)}catch(e){n=e}if(null==i)try{var a;o=(a=r.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(t,o),i=(new po).decode(a)}catch(e){if(null!=n)throw n;throw e}var s=new Kr(i.getText(),i.getRawBytes(),i.getNumBits(),o,Jr.AZTEC,pr.currentTimeMillis()),u=i.getByteSegments();null!=u&&s.putMetadata(Qr.BYTE_SEGMENTS,u);var l=i.getECLevel();return null!=l&&s.putMetadata(Qr.ERROR_CORRECTION_LEVEL,l),s},e.prototype.reportFoundResultPoints=function(e,t){if(null!=e){var n=e.get(Er.NEED_RESULT_POINT_CALLBACK);null!=n&&t.forEach((function(e,t,r){n.foundPossibleResultPoint(e)}))}},e.prototype.reset=function(){},e}(),No=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){No((function(t){return void 0===t&&(t=500),e.call(this,new Oo,t)||this}),e)}(qr);var To=function(){function e(){}return e.prototype.decode=function(e,t){try{return this.doDecode(e,t)}catch(ir){if(t&&!0===t.get(Er.TRY_HARDER)&&e.isRotateSupported()){var n=e.rotateCounterClockwise(),r=this.doDecode(n,t),o=r.getResultMetadata(),i=270;null!==o&&!0===o.get(Qr.ORIENTATION)&&(i+=o.get(Qr.ORIENTATION)%360),r.putMetadata(Qr.ORIENTATION,i);var a=r.getResultPoints();if(null!==a)for(var s=n.getHeight(),u=0;u<a.length;u++)a[u]=new vo(s-a[u].getY()-1,a[u].getX());return r}throw new Pr}},e.prototype.reset=function(){},e.prototype.doDecode=function(e,t){var n,r=e.getWidth(),o=e.getHeight(),i=new br(r),a=t&&!0===t.get(Er.TRY_HARDER),s=Math.max(1,o>>(a?8:5));n=a?o:15;for(var u=Math.trunc(o/2),l=0;l<n;l++){var c=Math.trunc((l+1)/2),d=u+s*(0==(1&l)?c:-c);if(d<0||d>=o)break;try{i=e.getBlackRow(d,i)}catch(e){continue}for(var f=function(e){if(1===e&&(i.reverse(),t&&!0===t.get(Er.NEED_RESULT_POINT_CALLBACK))){var n=new Map;t.forEach((function(e,t){return n.set(t,e)})),n.delete(Er.NEED_RESULT_POINT_CALLBACK),t=n}try{var o=p.decodeRow(d,i,t);if(1===e){o.putMetadata(Qr.ORIENTATION,180);var a=o.getResultPoints();null!==a&&(a[0]=new vo(r-a[0].getX()-1,a[0].getY()),a[1]=new vo(r-a[1].getX()-1,a[1].getY()))}return{value:o}}catch(e){}},p=this,h=0;h<2;h++){var m=f(h);if("object"==typeof m)return m.value}}throw new Pr},e.recordPattern=function(e,t,n){for(var r=n.length,o=0;o<r;o++)n[o]=0;var i=e.getSize();if(t>=i)throw new Pr;for(var a=!e.get(t),s=0,u=t;u<i;){if(e.get(u)!==a)n[s]++;else{if(++s===r)break;n[s]=1,a=!a}u++}if(s!==r&&(s!==r-1||u!==i))throw new Pr},e.recordPatternInReverse=function(t,n,r){for(var o=r.length,i=t.get(n);n>0&&o>=0;)t.get(--n)!==i&&(o--,i=!i);if(o>=0)throw new Pr;e.recordPattern(t,n+1,r)},e.patternMatchVariance=function(e,t,n){for(var r=e.length,o=0,i=0,a=0;a<r;a++)o+=e[a],i+=t[a];if(o<i)return Number.POSITIVE_INFINITY;var s=o/i;n*=s;for(var u=0,l=0;l<r;l++){var c=e[l],d=t[l]*s,f=c>d?c-d:d-c;if(f>n)return Number.POSITIVE_INFINITY;u+=f}return u/o},e}(),ko=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ko(t,e),t.findStartPattern=function(e){for(var n=e.getSize(),r=e.getNextSet(0),o=0,i=Int32Array.from([0,0,0,0,0,0]),a=r,s=!1,u=r;u<n;u++)if(e.get(u)!==s)i[o]++;else{if(5===o){for(var l=t.MAX_AVG_VARIANCE,c=-1,d=t.CODE_START_A;d<=t.CODE_START_C;d++){var f=To.patternMatchVariance(i,t.CODE_PATTERNS[d],t.MAX_INDIVIDUAL_VARIANCE);f<l&&(l=f,c=d)}if(c>=0&&e.isRange(Math.max(0,a-(u-a)/2),a,!1))return Int32Array.from([a,u,c]);a+=i[0]+i[1],(i=i.slice(2,i.length-1))[o-1]=0,i[o]=0,o--}else o++;i[o]=1,s=!s}throw new Pr},t.decodeCode=function(e,n,r){To.recordPattern(e,r,n);for(var o=t.MAX_AVG_VARIANCE,i=-1,a=0;a<t.CODE_PATTERNS.length;a++){var s=t.CODE_PATTERNS[a],u=this.patternMatchVariance(n,s,t.MAX_INDIVIDUAL_VARIANCE);u<o&&(o=u,i=a)}if(i>=0)return i;throw new Pr},t.prototype.decodeRow=function(e,n,r){var o,i=r&&!0===r.get(Er.ASSUME_GS1),a=t.findStartPattern(n),s=a[2],u=0,l=new Uint8Array(20);switch(l[u++]=s,s){case t.CODE_START_A:o=t.CODE_CODE_A;break;case t.CODE_START_B:o=t.CODE_CODE_B;break;case t.CODE_START_C:o=t.CODE_CODE_C;break;default:throw new Sr}for(var c=!1,d=!1,f="",p=a[0],h=a[1],m=Int32Array.from([0,0,0,0,0,0]),v=0,g=0,y=s,w=0,b=!0,_=!1,E=!1;!c;){var x=d;switch(d=!1,v=g,g=t.decodeCode(n,m,h),l[u++]=g,g!==t.CODE_STOP&&(b=!0),g!==t.CODE_STOP&&(y+=++w*g),p=h,h+=m.reduce((function(e,t){return e+t}),0),g){case t.CODE_START_A:case t.CODE_START_B:case t.CODE_START_C:throw new Sr}switch(o){case t.CODE_CODE_A:if(g<64)f+=E===_?String.fromCharCode(" ".charCodeAt(0)+g):String.fromCharCode(" ".charCodeAt(0)+g+128),E=!1;else if(g<96)f+=E===_?String.fromCharCode(g-64):String.fromCharCode(g+64),E=!1;else switch(g!==t.CODE_STOP&&(b=!1),g){case t.CODE_FNC_1:i&&(0===f.length?f+="]C1":f+=String.fromCharCode(29));break;case t.CODE_FNC_2:case t.CODE_FNC_3:break;case t.CODE_FNC_4_A:!_&&E?(_=!0,E=!1):_&&E?(_=!1,E=!1):E=!0;break;case t.CODE_SHIFT:d=!0,o=t.CODE_CODE_B;break;case t.CODE_CODE_B:o=t.CODE_CODE_B;break;case t.CODE_CODE_C:o=t.CODE_CODE_C;break;case t.CODE_STOP:c=!0}break;case t.CODE_CODE_B:if(g<96)f+=E===_?String.fromCharCode(" ".charCodeAt(0)+g):String.fromCharCode(" ".charCodeAt(0)+g+128),E=!1;else switch(g!==t.CODE_STOP&&(b=!1),g){case t.CODE_FNC_1:i&&(0===f.length?f+="]C1":f+=String.fromCharCode(29));break;case t.CODE_FNC_2:case t.CODE_FNC_3:break;case t.CODE_FNC_4_B:!_&&E?(_=!0,E=!1):_&&E?(_=!1,E=!1):E=!0;break;case t.CODE_SHIFT:d=!0,o=t.CODE_CODE_A;break;case t.CODE_CODE_A:o=t.CODE_CODE_A;break;case t.CODE_CODE_C:o=t.CODE_CODE_C;break;case t.CODE_STOP:c=!0}break;case t.CODE_CODE_C:if(g<100)g<10&&(f+="0"),f+=g;else switch(g!==t.CODE_STOP&&(b=!1),g){case t.CODE_FNC_1:i&&(0===f.length?f+="]C1":f+=String.fromCharCode(29));break;case t.CODE_CODE_A:o=t.CODE_CODE_A;break;case t.CODE_CODE_B:o=t.CODE_CODE_B;break;case t.CODE_STOP:c=!0}}x&&(o=o===t.CODE_CODE_A?t.CODE_CODE_B:t.CODE_CODE_A)}var S=h-p;if(h=n.getNextUnset(h),!n.isRange(h,Math.min(n.getSize(),h+(h-p)/2),!1))throw new Pr;if((y-=w*v)%103!==v)throw new dr;var C=f.length;if(0===C)throw new Pr;C>0&&b&&(f=o===t.CODE_CODE_C?f.substring(0,C-2):f.substring(0,C-1));for(var I=(a[1]+a[0])/2,A=p+S/2,O=l.length,N=new Uint8Array(O),T=0;T<O;T++)N[T]=l[T];var k=[new vo(I,e),new vo(A,e)];return new Kr(f,N,0,k,Jr.CODE_128,(new Date).getTime())},t.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],t.MAX_AVG_VARIANCE=.25,t.MAX_INDIVIDUAL_VARIANCE=.7,t.CODE_SHIFT=98,t.CODE_CODE_C=99,t.CODE_CODE_B=100,t.CODE_CODE_A=101,t.CODE_FNC_1=102,t.CODE_FNC_2=97,t.CODE_FNC_3=96,t.CODE_FNC_4_A=101,t.CODE_FNC_4_B=100,t.CODE_START_A=103,t.CODE_START_B=104,t.CODE_START_C=105,t.CODE_STOP=106,t}(To),jo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Do=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Po=function(e){function t(t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.call(this)||this;return r.usingCheckDigit=t,r.extendedMode=n,r.decodeRowResult="",r.counters=new Int32Array(9),r}return jo(t,e),t.prototype.decodeRow=function(e,n,r){var o,i,a,s,u=this.counters;u.fill(0),this.decodeRowResult="";var l,c,d=t.findAsteriskPattern(n,u),f=n.getNextSet(d[1]),p=n.getSize();do{t.recordPattern(n,f,u);var h=t.toNarrowWidePattern(u);if(h<0)throw new Pr;l=t.patternToChar(h),this.decodeRowResult+=l,c=f;try{for(var m=(o=void 0,Do(u)),v=m.next();!v.done;v=m.next())f+=v.value}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}f=n.getNextSet(f)}while("*"!==l);this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var g,y=0;try{for(var w=Do(u),b=w.next();!b.done;b=w.next())y+=b.value}catch(e){a={error:e}}finally{try{b&&!b.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}if(f!==p&&2*(f-c-y)<y)throw new Pr;if(this.usingCheckDigit){for(var _=this.decodeRowResult.length-1,E=0,x=0;x<_;x++)E+=t.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(x));if(this.decodeRowResult.charAt(_)!==t.ALPHABET_STRING.charAt(E%43))throw new dr;this.decodeRowResult=this.decodeRowResult.substring(0,_)}if(0===this.decodeRowResult.length)throw new Pr;g=this.extendedMode?t.decodeExtended(this.decodeRowResult):this.decodeRowResult;var S=(d[1]+d[0])/2,C=c+y/2;return new Kr(g,null,0,[new vo(S,e),new vo(C,e)],Jr.CODE_39,(new Date).getTime())},t.findAsteriskPattern=function(e,n){for(var r=e.getSize(),o=e.getNextSet(0),i=0,a=o,s=!1,u=n.length,l=o;l<r;l++)if(e.get(l)!==s)n[i]++;else{if(i===u-1){if(this.toNarrowWidePattern(n)===t.ASTERISK_ENCODING&&e.isRange(Math.max(0,a-Math.floor((l-a)/2)),a,!1))return[a,l];a+=n[0]+n[1],n.copyWithin(0,2,2+i-1),n[i-1]=0,n[i]=0,i--}else i++;n[i]=1,s=!s}throw new Pr},t.toNarrowWidePattern=function(e){var t,n,r,o=e.length,i=0;do{var a=2147483647;try{for(var s=(t=void 0,Do(e)),u=s.next();!u.done;u=s.next())(f=u.value)<a&&f>i&&(a=f)}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}i=a,r=0;for(var l=0,c=0,d=0;d<o;d++)(f=e[d])>i&&(c|=1<<o-1-d,r++,l+=f);if(3===r){for(d=0;d<o&&r>0;d++){var f;if((f=e[d])>i&&(r--,2*f>=l))return-1}return c}}while(r>3);return-1},t.patternToChar=function(e){for(var n=0;n<t.CHARACTER_ENCODINGS.length;n++)if(t.CHARACTER_ENCODINGS[n]===e)return t.ALPHABET_STRING.charAt(n);if(e===t.ASTERISK_ENCODING)return"*";throw new Pr},t.decodeExtended=function(e){for(var t=e.length,n="",r=0;r<t;r++){var o=e.charAt(r);if("+"===o||"$"===o||"%"===o||"/"===o){var i=e.charAt(r+1),a="\0";switch(o){case"+":if(!(i>="A"&&i<="Z"))throw new Sr;a=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new Sr;a=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")a=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")a=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")a=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)a="\0";else if("V"===i)a="@";else if("W"===i)a="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new Sr;a="\x7f"}break;case"/":if(i>="A"&&i<="O")a=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new Sr;a=":"}}n+=a,r++}else n+=o}return n},t.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],t.ASTERISK_ENCODING=148,t}(To),Mo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.narrowLineWidth=-1,t}return Mo(t,e),t.prototype.decodeRow=function(e,n,r){var o,i,a=this.decodeStart(n),s=this.decodeEnd(n),u=new Rr;t.decodeMiddle(n,a[1],s[0],u);var l=u.toString(),c=null;null!=r&&(c=r.get(Er.ALLOWED_LENGTHS)),null==c&&(c=t.DEFAULT_ALLOWED_LENGTHS);var d=l.length,f=!1,p=0;try{for(var h=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),m=h.next();!m.done;m=h.next()){var v=m.value;if(d===v){f=!0;break}v>p&&(p=v)}}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(!f&&d>p&&(f=!0),!f)throw new Sr;var g=[new vo(a[1],e),new vo(s[0],e)];return new Kr(l,null,0,g,Jr.ITF,(new Date).getTime())},t.decodeMiddle=function(e,n,r,o){var i=new Int32Array(10),a=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),a.fill(0),s.fill(0);n<r;){To.recordPattern(e,n,i);for(var u=0;u<5;u++){var l=2*u;a[u]=i[l],s[u]=i[l+1]}var c=t.decodeDigit(a);o.append(c.toString()),c=this.decodeDigit(s),o.append(c.toString()),i.forEach((function(e){n+=e}))}},t.prototype.decodeStart=function(e){var n=t.skipWhiteSpace(e),r=t.findGuardPattern(e,n,t.START_PATTERN);return this.narrowLineWidth=(r[1]-r[0])/4,this.validateQuietZone(e,r[0]),r},t.prototype.validateQuietZone=function(e,t){var n=10*this.narrowLineWidth;n=n<t?n:t;for(var r=t-1;n>0&&r>=0&&!e.get(r);r--)n--;if(0!==n)throw new Pr},t.skipWhiteSpace=function(e){var t=e.getSize(),n=e.getNextSet(0);if(n===t)throw new Pr;return n},t.prototype.decodeEnd=function(e){e.reverse();try{var n=t.skipWhiteSpace(e),r=void 0;try{r=t.findGuardPattern(e,n,t.END_PATTERN_REVERSED[0])}catch(o){o instanceof Pr&&(r=t.findGuardPattern(e,n,t.END_PATTERN_REVERSED[1]))}this.validateQuietZone(e,r[0]);var o=r[0];return r[0]=e.getSize()-r[1],r[1]=e.getSize()-o,r}finally{e.reverse()}},t.findGuardPattern=function(e,n,r){var o=r.length,i=new Int32Array(o),a=e.getSize(),s=!1,u=0,l=n;i.fill(0);for(var c=n;c<a;c++)if(e.get(c)!==s)i[u]++;else{if(u===o-1){if(To.patternMatchVariance(i,r,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return[l,c];l+=i[0]+i[1],pr.arraycopy(i,2,i,0,u-1),i[u-1]=0,i[u]=0,u--}else u++;i[u]=1,s=!s}throw new Pr},t.decodeDigit=function(e){for(var n=t.MAX_AVG_VARIANCE,r=-1,o=t.PATTERNS.length,i=0;i<o;i++){var a=t.PATTERNS[i],s=To.patternMatchVariance(e,a,t.MAX_INDIVIDUAL_VARIANCE);s<n?(n=s,r=i):s===n&&(r=-1)}if(r>=0)return r%10;throw new Pr},t.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],t.MAX_AVG_VARIANCE=.38,t.MAX_INDIVIDUAL_VARIANCE=.5,t.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],t.START_PATTERN=Int32Array.from([1,1,1,1]),t.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],t}(To),Fo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.decodeRowStringBuffer="",t}return Fo(t,e),t.findStartGuardPattern=function(e){for(var n,r=!1,o=0,i=Int32Array.from([0,0,0]);!r;){i=Int32Array.from([0,0,0]);var a=(n=t.findGuardPattern(e,o,!1,this.START_END_PATTERN,i))[0],s=a-((o=n[1])-a);s>=0&&(r=e.isRange(s,a,!1))}return n},t.checkChecksum=function(e){return t.checkStandardUPCEANChecksum(e)},t.checkStandardUPCEANChecksum=function(e){var n=e.length;if(0===n)return!1;var r=parseInt(e.charAt(n-1),10);return t.getStandardUPCEANChecksum(e.substring(0,n-1))===r},t.getStandardUPCEANChecksum=function(e){for(var t=e.length,n=0,r=t-1;r>=0;r-=2){if((o=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Sr;n+=o}for(n*=3,r=t-2;r>=0;r-=2){var o;if((o=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Sr;n+=o}return(1e3-n)%10},t.decodeEnd=function(e,n){return t.findGuardPattern(e,n,!1,t.START_END_PATTERN,new Int32Array(t.START_END_PATTERN.length).fill(0))},t.findGuardPatternWithoutCounters=function(e,t,n,r){return this.findGuardPattern(e,t,n,r,new Int32Array(r.length))},t.findGuardPattern=function(e,n,r,o,i){for(var a=e.getSize(),s=0,u=n=r?e.getNextUnset(n):e.getNextSet(n),l=o.length,c=r,d=n;d<a;d++)if(e.get(d)!==c)i[s]++;else{if(s===l-1){if(To.patternMatchVariance(i,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return Int32Array.from([u,d]);u+=i[0]+i[1];for(var f=i.slice(2,i.length-1),p=0;p<s-1;p++)i[p]=f[p];i[s-1]=0,i[s]=0,s--}else s++;i[s]=1,c=!c}throw new Pr},t.decodeDigit=function(e,n,r,o){this.recordPattern(e,r,n);for(var i=this.MAX_AVG_VARIANCE,a=-1,s=o.length,u=0;u<s;u++){var l=o[u],c=To.patternMatchVariance(n,l,t.MAX_INDIVIDUAL_VARIANCE);c<i&&(i=c,a=u)}if(a>=0)return a;throw new Pr},t.MAX_AVG_VARIANCE=.48,t.MAX_INDIVIDUAL_VARIANCE=.7,t.START_END_PATTERN=Int32Array.from([1,1,1]),t.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),t.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),t.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],t}(To),Vo=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uo=function(){function e(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return e.prototype.decodeRow=function(t,n,r){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(n,r,o),a=o.toString(),s=e.parseExtensionString(a),u=[new vo((r[0]+r[1])/2,t),new vo(i,t)],l=new Kr(a,null,0,u,Jr.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&l.putAllMetadata(s),l},e.prototype.decodeMiddle=function(t,n,r){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=t.getSize(),u=n[1],l=0,c=0;c<5&&u<s;c++){var d=Bo.decodeDigit(t,a,u,Bo.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var f=(o=void 0,Vo(a)),p=f.next();!p.done;p=f.next())u+=p.value}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}d>=10&&(l|=1<<4-c),4!==c&&(u=t.getNextSet(u),u=t.getNextUnset(u))}if(5!==r.length)throw new Pr;var h=this.determineCheckDigit(l);if(e.extensionChecksum(r.toString())!==h)throw new Pr;return u},e.extensionChecksum=function(e){for(var t=e.length,n=0,r=t-2;r>=0;r-=2)n+=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);for(n*=3,r=t-1;r>=0;r-=2)n+=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0);return(n*=3)%10},e.prototype.determineCheckDigit=function(e){for(var t=0;t<10;t++)if(e===this.CHECK_DIGIT_ENCODINGS[t])return t;throw new Pr},e.parseExtensionString=function(t){if(5!==t.length)return null;var n=e.parseExtension5String(t);return null==n?null:new Map([[Qr.SUGGESTED_PRICE,n]])},e.parseExtension5String=function(e){var t;switch(e.charAt(0)){case"0":t="\xa3";break;case"5":t="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}t="";break;default:t=""}var n=parseInt(e.substring(1)),r=n%100;return t+(n/100).toString()+"."+(r<10?"0"+r:r.toString())},e}(),Ho=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zo=function(){function e(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return e.prototype.decodeRow=function(t,n,r){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(n,r,o),a=o.toString(),s=e.parseExtensionString(a),u=[new vo((r[0]+r[1])/2,t),new vo(i,t)],l=new Kr(a,null,0,u,Jr.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&l.putAllMetadata(s),l},e.prototype.decodeMiddle=function(e,t,n){var r,o,i=this.decodeMiddleCounters;i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=e.getSize(),s=t[1],u=0,l=0;l<2&&s<a;l++){var c=Bo.decodeDigit(e,i,s,Bo.L_AND_G_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+c%10);try{for(var d=(r=void 0,Ho(i)),f=d.next();!f.done;f=d.next())s+=f.value}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}c>=10&&(u|=1<<1-l),1!==l&&(s=e.getNextSet(s),s=e.getNextUnset(s))}if(2!==n.length)throw new Pr;if(parseInt(n.toString())%4!==u)throw new Pr;return s},e.parseExtensionString=function(e){return 2!==e.length?null:new Map([[Qr.ISSUE_NUMBER,parseInt(e)]])},e}(),Go=function(){function e(){}return e.decodeRow=function(e,t,n){var r=Bo.findGuardPattern(t,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new Uo).decodeRow(e,t,r)}catch(n){return(new zo).decodeRow(e,t,r)}},e.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),e}(),Wo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xo=function(e){function t(){var n=e.call(this)||this;n.decodeRowStringBuffer="",t.L_AND_G_PATTERNS=t.L_PATTERNS.map((function(e){return Int32Array.from(e)}));for(var r=10;r<20;r++){for(var o=t.L_PATTERNS[r-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];t.L_AND_G_PATTERNS[r]=i}return n}return Wo(t,e),t.prototype.decodeRow=function(e,n,r){var o=t.findStartGuardPattern(n),i=null==r?null:r.get(Er.NEED_RESULT_POINT_CALLBACK);if(null!=i){var a=new vo((o[0]+o[1])/2,e);i.foundPossibleResultPoint(a)}var s=this.decodeMiddle(n,o,this.decodeRowStringBuffer),u=s.rowOffset,l=s.resultString;if(null!=i){var c=new vo(u,e);i.foundPossibleResultPoint(c)}var d=t.decodeEnd(n,u);if(null!=i){var f=new vo((d[0]+d[1])/2,e);i.foundPossibleResultPoint(f)}var p=d[1],h=p+(p-d[0]);if(h>=n.getSize()||!n.isRange(p,h,!1))throw new Pr;var m=l.toString();if(m.length<8)throw new Sr;if(!t.checkChecksum(m))throw new dr;var v=(o[1]+o[0])/2,g=(d[1]+d[0])/2,y=this.getBarcodeFormat(),w=[new vo(v,e),new vo(g,e)],b=new Kr(m,null,0,w,y,(new Date).getTime()),_=0;try{var E=Go.decodeRow(e,n,d[1]);b.putMetadata(Qr.UPC_EAN_EXTENSION,E.getText()),b.putAllMetadata(E.getResultMetadata()),b.addResultPoints(E.getResultPoints()),_=E.getText().length}catch(e){}var x=null==r?null:r.get(Er.ALLOWED_EAN_EXTENSIONS);if(null!=x){var S=!1;for(var C in x)if(_.toString()===C){S=!0;break}if(!S)throw new Pr}return y===Jr.EAN_13||Jr.UPC_A,b},t.checkChecksum=function(e){return t.checkStandardUPCEANChecksum(e)},t.checkStandardUPCEANChecksum=function(e){var n=e.length;if(0===n)return!1;var r=parseInt(e.charAt(n-1),10);return t.getStandardUPCEANChecksum(e.substring(0,n-1))===r},t.getStandardUPCEANChecksum=function(e){for(var t=e.length,n=0,r=t-1;r>=0;r-=2){if((o=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Sr;n+=o}for(n*=3,r=t-2;r>=0;r-=2){var o;if((o=e.charAt(r).charCodeAt(0)-"0".charCodeAt(0))<0||o>9)throw new Sr;n+=o}return(1e3-n)%10},t.decodeEnd=function(e,n){return t.findGuardPattern(e,n,!1,t.START_END_PATTERN,new Int32Array(t.START_END_PATTERN.length).fill(0))},t}(Bo),Yo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qo=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ko=function(e){function t(){var t=e.call(this)||this;return t.decodeMiddleCounters=Int32Array.from([0,0,0,0]),t}return Yo(t,e),t.prototype.decodeMiddle=function(e,n,r){var o,i,a,s,u=this.decodeMiddleCounters;u[0]=0,u[1]=0,u[2]=0,u[3]=0;for(var l=e.getSize(),c=n[1],d=0,f=0;f<6&&c<l;f++){var p=Xo.decodeDigit(e,u,c,Xo.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+p%10);try{for(var h=(o=void 0,qo(u)),m=h.next();!m.done;m=h.next())c+=m.value}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}p>=10&&(d|=1<<5-f)}for(r=t.determineFirstDigit(r,d),c=Xo.findGuardPattern(e,c,!0,Xo.MIDDLE_PATTERN,new Int32Array(Xo.MIDDLE_PATTERN.length).fill(0))[1],f=0;f<6&&c<l;f++){p=Xo.decodeDigit(e,u,c,Xo.L_PATTERNS),r+=String.fromCharCode("0".charCodeAt(0)+p);try{for(var v=(a=void 0,qo(u)),g=v.next();!g.done;g=v.next())c+=g.value}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}}return{rowOffset:c,resultString:r}},t.prototype.getBarcodeFormat=function(){return Jr.EAN_13},t.determineFirstDigit=function(e,t){for(var n=0;n<10;n++)if(t===this.FIRST_DIGIT_ENCODINGS[n])return String.fromCharCode("0".charCodeAt(0)+n)+e;throw new Pr},t.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],t}(Xo),Zo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jo=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},$o=function(e){function t(){var t=e.call(this)||this;return t.decodeMiddleCounters=Int32Array.from([0,0,0,0]),t}return Zo(t,e),t.prototype.decodeMiddle=function(e,t,n){var r,o,i,a,s=this.decodeMiddleCounters;s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var u=e.getSize(),l=t[1],c=0;c<4&&l<u;c++){var d=Xo.decodeDigit(e,s,l,Xo.L_PATTERNS);n+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var f=(r=void 0,Jo(s)),p=f.next();!p.done;p=f.next())l+=p.value}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}}for(l=Xo.findGuardPattern(e,l,!0,Xo.MIDDLE_PATTERN,new Int32Array(Xo.MIDDLE_PATTERN.length).fill(0))[1],c=0;c<4&&l<u;c++){d=Xo.decodeDigit(e,s,l,Xo.L_PATTERNS),n+=String.fromCharCode("0".charCodeAt(0)+d);try{for(var h=(i=void 0,Jo(s)),m=h.next();!m.done;m=h.next())l+=m.value}catch(e){i={error:e}}finally{try{m&&!m.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}}return{rowOffset:l,resultString:n}},t.prototype.getBarcodeFormat=function(){return Jr.EAN_8},t}(Xo),Qo=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ean13Reader=new Ko,t}return Qo(t,e),t.prototype.getBarcodeFormat=function(){return Jr.UPC_A},t.prototype.decode=function(e,t){return this.maybeReturnResult(this.ean13Reader.decode(e))},t.prototype.decodeRow=function(e,t,n){return this.maybeReturnResult(this.ean13Reader.decodeRow(e,t,n))},t.prototype.decodeMiddle=function(e,t,n){return this.ean13Reader.decodeMiddle(e,t,n)},t.prototype.maybeReturnResult=function(e){var t=e.getText();if("0"===t.charAt(0)){var n=new Kr(t.substring(1),null,null,e.getResultPoints(),Jr.UPC_A);return null!=e.getResultMetadata()&&n.putAllMetadata(e.getResultMetadata()),n}throw new Pr},t.prototype.reset=function(){this.ean13Reader.reset()},t}(Xo),ti=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ni=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ri=function(e){function t(){var t=e.call(this)||this;return t.decodeMiddleCounters=new Int32Array(4),t}return ti(t,e),t.prototype.decodeMiddle=function(e,n,r){var o,i,a=this.decodeMiddleCounters.map((function(e){return e}));a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),u=n[1],l=0,c=0;c<6&&u<s;c++){var d=t.decodeDigit(e,a,u,t.L_AND_G_PATTERNS);r+=String.fromCharCode("0".charCodeAt(0)+d%10);try{for(var f=(o=void 0,ni(a)),p=f.next();!p.done;p=f.next())u+=p.value}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}d>=10&&(l|=1<<5-c)}return t.determineNumSysAndCheckDigit(new Rr(r),l),u},t.prototype.decodeEnd=function(e,n){return t.findGuardPatternWithoutCounters(e,n,!0,t.MIDDLE_END_PATTERN)},t.prototype.checkChecksum=function(e){return Xo.checkChecksum(t.convertUPCEtoUPCA(e))},t.determineNumSysAndCheckDigit=function(e,t){for(var n=0;n<=1;n++)for(var r=0;r<10;r++)if(t===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[n][r])return e.insert(0,"0"+n),void e.append("0"+r);throw Pr.getNotFoundInstance()},t.prototype.getBarcodeFormat=function(){return Jr.UPC_E},t.convertUPCEtoUPCA=function(e){var t=e.slice(1,7).split("").map((function(e){return e.charCodeAt(0)})),n=new Rr;n.append(e.charAt(0));var r=t[5];switch(r){case 0:case 1:case 2:n.appendChars(t,0,2),n.append(r),n.append("0000"),n.appendChars(t,2,3);break;case 3:n.appendChars(t,0,3),n.append("00000"),n.appendChars(t,3,2);break;case 4:n.appendChars(t,0,4),n.append("00000"),n.append(t[4]);break;default:n.appendChars(t,0,5),n.append("0000"),n.append(r)}return e.length>=8&&n.append(e.charAt(7)),n.toString()},t.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),t.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],t}(Xo),oi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ii=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ai=function(e){function t(t){var n=e.call(this)||this,r=null==t?null:t.get(Er.POSSIBLE_FORMATS),o=[];return null!=r&&(r.indexOf(Jr.EAN_13)>-1?o.push(new Ko):r.indexOf(Jr.UPC_A)>-1&&o.push(new ei),r.indexOf(Jr.EAN_8)>-1&&o.push(new $o),r.indexOf(Jr.UPC_E)>-1&&o.push(new ri)),0===o.length&&(o.push(new Ko),o.push(new $o),o.push(new ri)),n.readers=o,n}return oi(t,e),t.prototype.decodeRow=function(e,t,n){var r,o;try{for(var i=ii(this.readers),a=i.next();!a.done;a=i.next()){var s=a.value;try{var u=s.decodeRow(e,t,n),l=u.getBarcodeFormat()===Jr.EAN_13&&"0"===u.getText().charAt(0),c=null==n?null:n.get(Er.POSSIBLE_FORMATS),d=null==c||c.includes(Jr.UPC_A);if(l&&d){var f=u.getRawBytes(),p=new Kr(u.getText().substring(1),f,f.length,u.getResultPoints(),Jr.UPC_A);return p.putAllMetadata(u.getResultMetadata()),p}return u}catch(e){}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}throw new Pr},t.prototype.reset=function(){var e,t;try{for(var n=ii(this.readers),r=n.next();!r.done;r=n.next())r.value.reset()}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t}(To),si=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ui=function(e){function t(){var t=e.call(this)||this;return t.decodeFinderCounters=new Int32Array(4),t.dataCharacterCounters=new Int32Array(8),t.oddRoundingErrors=new Array(4),t.evenRoundingErrors=new Array(4),t.oddCounts=new Array(t.dataCharacterCounters.length/2),t.evenCounts=new Array(t.dataCharacterCounters.length/2),t}return si(t,e),t.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},t.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},t.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},t.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},t.prototype.getOddCounts=function(){return this.oddCounts},t.prototype.getEvenCounts=function(){return this.evenCounts},t.prototype.parseFinderValue=function(e,n){for(var r=0;r<n.length;r++)if(To.patternMatchVariance(e,n[r],t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return r;throw new Pr},t.count=function(e){return ho.sum(new Int32Array(e))},t.increment=function(e,t){for(var n=0,r=t[0],o=1;o<e.length;o++)t[o]>r&&(r=t[o],n=o);e[n]++},t.decrement=function(e,t){for(var n=0,r=t[0],o=1;o<e.length;o++)t[o]<r&&(r=t[o],n=o);e[n]--},t.isFinderPattern=function(e){var n,r,o=e[0]+e[1],i=o/(o+e[2]+e[3]);if(i>=t.MIN_FINDER_PATTERN_RATIO&&i<=t.MAX_FINDER_PATTERN_RATIO){var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),l=u.next();!l.done;l=u.next()){var c=l.value;c>s&&(s=c),c<a&&(a=c)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return s<10*a}return!1},t.MAX_AVG_VARIANCE=.2,t.MAX_INDIVIDUAL_VARIANCE=.45,t.MIN_FINDER_PATTERN_RATIO=9.5/12,t.MAX_FINDER_PATTERN_RATIO=12.5/14,t}(To),li=function(){function e(e,t){this.value=e,this.checksumPortion=t}return e.prototype.getValue=function(){return this.value},e.prototype.getChecksumPortion=function(){return this.checksumPortion},e.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.value===n.value&&this.checksumPortion===n.checksumPortion},e.prototype.hashCode=function(){return this.value^this.checksumPortion},e}(),ci=function(){function e(e,t,n,r,o){this.value=e,this.startEnd=t,this.value=e,this.startEnd=t,this.resultPoints=new Array,this.resultPoints.push(new vo(n,o)),this.resultPoints.push(new vo(r,o))}return e.prototype.getValue=function(){return this.value},e.prototype.getStartEnd=function(){return this.startEnd},e.prototype.getResultPoints=function(){return this.resultPoints},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.value===n.value},e.prototype.hashCode=function(){return this.value},e}(),di=function(){function e(){}return e.getRSSvalue=function(t,n,r){var o,i,a=0;try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),u=s.next();!u.done;u=s.next())a+=u.value}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var l=0,c=0,d=t.length,f=0;f<d-1;f++){var p=void 0;for(p=1,c|=1<<f;p<t[f];p++,c&=~(1<<f)){var h=e.combins(a-p-1,d-f-2);if(r&&0===c&&a-p-(d-f-1)>=d-f-1&&(h-=e.combins(a-p-(d-f),d-f-2)),d-f-1>1){for(var m=0,v=a-p-(d-f-2);v>n;v--)m+=e.combins(a-p-v-1,d-f-3);h-=m*(d-1-f)}else a-p>n&&h--;l+=h}a-=p}return l},e.combins=function(e,t){var n,r;e-t>t?(r=t,n=e-t):(r=e-t,n=t);for(var o=1,i=1,a=e;a>n;a--)o*=a,i<=r&&(o/=i,i++);for(;i<=r;)o/=i,i++;return o},e}(),fi=function(){function e(){}return e.buildBitArray=function(e){var t=2*e.length-1;null==e[e.length-1].getRightChar()&&(t-=1);for(var n=new br(12*t),r=0,o=e[0].getRightChar().getValue(),i=11;i>=0;--i)0!=(o&1<<i)&&n.set(r),r++;for(i=1;i<e.length;++i){for(var a=e[i],s=a.getLeftChar().getValue(),u=11;u>=0;--u)0!=(s&1<<u)&&n.set(r),r++;if(null!=a.getRightChar()){var l=a.getRightChar().getValue();for(u=11;u>=0;--u)0!=(l&1<<u)&&n.set(r),r++}}return n},e}(),pi=function(){function e(e,t){t?this.decodedInformation=null:(this.finished=e,this.decodedInformation=t)}return e.prototype.getDecodedInformation=function(){return this.decodedInformation},e.prototype.isFinished=function(){return this.finished},e}(),hi=function(){function e(e){this.newPosition=e}return e.prototype.getNewPosition=function(){return this.newPosition},e}(),mi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vi=function(e){function t(t,n){var r=e.call(this,t)||this;return r.value=n,r}return mi(t,e),t.prototype.getValue=function(){return this.value},t.prototype.isFNC1=function(){return this.value===t.FNC1},t.FNC1="$",t}(hi),gi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),yi=function(e){function t(t,n,r){var o=e.call(this,t)||this;return r?(o.remaining=!0,o.remainingValue=o.remainingValue):(o.remaining=!1,o.remainingValue=0),o.newString=n,o}return gi(t,e),t.prototype.getNewString=function(){return this.newString},t.prototype.isRemaining=function(){return this.remaining},t.prototype.getRemainingValue=function(){return this.remainingValue},t}(hi),wi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bi=function(e){function t(t,n,r){var o=e.call(this,t)||this;if(n<0||n>10||r<0||r>10)throw new Sr;return o.firstDigit=n,o.secondDigit=r,o}return wi(t,e),t.prototype.getFirstDigit=function(){return this.firstDigit},t.prototype.getSecondDigit=function(){return this.secondDigit},t.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},t.prototype.isFirstDigitFNC1=function(){return this.firstDigit===t.FNC1},t.prototype.isSecondDigitFNC1=function(){return this.secondDigit===t.FNC1},t.prototype.isAnyFNC1=function(){return this.firstDigit===t.FNC1||this.secondDigit===t.FNC1},t.FNC1=10,t}(hi),_i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ei=function(){function e(){}return e.parseFieldsInGeneralPurpose=function(t){var n,r,o,i,a,s,u,l;if(!t)return null;if(t.length<2)throw new Pr;var c=t.substring(0,2);try{for(var d=_i(e.TWO_DIGIT_DATA_LENGTH),f=d.next();!f.done;f=d.next())if((_=f.value)[0]===c)return _[1]===e.VARIABLE_LENGTH?e.processVariableAI(2,_[2],t):e.processFixedAI(2,_[1],t)}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}if(t.length<3)throw new Pr;var p=t.substring(0,3);try{for(var h=_i(e.THREE_DIGIT_DATA_LENGTH),m=h.next();!m.done;m=h.next())if((_=m.value)[0]===p)return _[1]===e.VARIABLE_LENGTH?e.processVariableAI(3,_[2],t):e.processFixedAI(3,_[1],t)}catch(e){o={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}try{for(var v=_i(e.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),g=v.next();!g.done;g=v.next())if((_=g.value)[0]===p)return _[1]===e.VARIABLE_LENGTH?e.processVariableAI(4,_[2],t):e.processFixedAI(4,_[1],t)}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}if(t.length<4)throw new Pr;var y=t.substring(0,4);try{for(var w=_i(e.FOUR_DIGIT_DATA_LENGTH),b=w.next();!b.done;b=w.next()){var _;if((_=b.value)[0]===y)return _[1]===e.VARIABLE_LENGTH?e.processVariableAI(4,_[2],t):e.processFixedAI(4,_[1],t)}}catch(e){u={error:e}}finally{try{b&&!b.done&&(l=w.return)&&l.call(w)}finally{if(u)throw u.error}}throw new Pr},e.processFixedAI=function(t,n,r){if(r.length<t)throw new Pr;var o=r.substring(0,t);if(r.length<t+n)throw new Pr;var i=r.substring(t,t+n),a=r.substring(t+n),s="("+o+")"+i,u=e.parseFieldsInGeneralPurpose(a);return null==u?s:s+u},e.processVariableAI=function(t,n,r){var o,i=r.substring(0,t);o=r.length<t+n?r.length:t+n;var a=r.substring(t,o),s=r.substring(o),u="("+i+")"+a,l=e.parseFieldsInGeneralPurpose(s);return null==l?u:u+l},e.VARIABLE_LENGTH=[],e.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",e.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",e.VARIABLE_LENGTH,20],["22",e.VARIABLE_LENGTH,29],["30",e.VARIABLE_LENGTH,8],["37",e.VARIABLE_LENGTH,8],["90",e.VARIABLE_LENGTH,30],["91",e.VARIABLE_LENGTH,30],["92",e.VARIABLE_LENGTH,30],["93",e.VARIABLE_LENGTH,30],["94",e.VARIABLE_LENGTH,30],["95",e.VARIABLE_LENGTH,30],["96",e.VARIABLE_LENGTH,30],["97",e.VARIABLE_LENGTH,3],["98",e.VARIABLE_LENGTH,30],["99",e.VARIABLE_LENGTH,30]],e.THREE_DIGIT_DATA_LENGTH=[["240",e.VARIABLE_LENGTH,30],["241",e.VARIABLE_LENGTH,30],["242",e.VARIABLE_LENGTH,6],["250",e.VARIABLE_LENGTH,30],["251",e.VARIABLE_LENGTH,30],["253",e.VARIABLE_LENGTH,17],["254",e.VARIABLE_LENGTH,20],["400",e.VARIABLE_LENGTH,30],["401",e.VARIABLE_LENGTH,30],["402",17],["403",e.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",e.VARIABLE_LENGTH,20],["421",e.VARIABLE_LENGTH,15],["422",3],["423",e.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],e.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",e.VARIABLE_LENGTH,15],["391",e.VARIABLE_LENGTH,18],["392",e.VARIABLE_LENGTH,15],["393",e.VARIABLE_LENGTH,18],["703",e.VARIABLE_LENGTH,30]],e.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",e.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",e.VARIABLE_LENGTH,20],["8003",e.VARIABLE_LENGTH,30],["8004",e.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",e.VARIABLE_LENGTH,30],["8008",e.VARIABLE_LENGTH,12],["8018",18],["8020",e.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",e.VARIABLE_LENGTH,70],["8200",e.VARIABLE_LENGTH,70]],e}(),xi=function(){function e(e){this.buffer=new Rr,this.information=e}return e.prototype.decodeAllCodes=function(e,t){for(var n=t,r=null;;){var o=this.decodeGeneralPurposeField(n,r),i=Ei.parseFieldsInGeneralPurpose(o.getNewString());if(null!=i&&e.append(i),r=o.isRemaining()?""+o.getRemainingValue():null,n===o.getNewPosition())break;n=o.getNewPosition()}return e.toString()},e.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var t=e;t<e+3;++t)if(this.information.get(t))return!0;return this.information.get(e+3)},e.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var t=this.extractNumericValueFromBitArray(e,4);return new bi(this.information.getSize(),0===t?bi.FNC1:t-1,bi.FNC1)}var n=this.extractNumericValueFromBitArray(e,7);return new bi(e+7,(n-8)/11,(n-8)%11)},e.prototype.extractNumericValueFromBitArray=function(t,n){return e.extractNumericValueFromBitArray(this.information,t,n)},e.extractNumericValueFromBitArray=function(e,t,n){for(var r=0,o=0;o<n;++o)e.get(t+o)&&(r|=1<<n-o-1);return r},e.prototype.decodeGeneralPurposeField=function(e,t){this.buffer.setLengthToZero(),null!=t&&this.buffer.append(t),this.current.setPosition(e);var n=this.parseBlocks();return null!=n&&n.isRemaining()?new yi(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new yi(this.current.getPosition(),this.buffer.toString())},e.prototype.parseBlocks=function(){var e,t;do{var n=this.current.getPosition();if(e=this.current.isAlpha()?(t=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(t=this.parseIsoIec646Block()).isFinished():(t=this.parseNumericBlock()).isFinished(),n===this.current.getPosition()&&!e)break}while(!e);return t.getDecodedInformation()},e.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){var t=void 0;return t=e.isSecondDigitFNC1()?new yi(this.current.getPosition(),this.buffer.toString()):new yi(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new pi(!0,t)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1())return t=new yi(this.current.getPosition(),this.buffer.toString()),new pi(!0,t);this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new pi(!1)},e.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var t=new yi(this.current.getPosition(),this.buffer.toString());return new pi(!0,t)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new pi(!1)},e.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var t=new yi(this.current.getPosition(),this.buffer.toString());return new pi(!0,t)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new pi(!1)},e.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,8);return r>=232&&r<253},e.prototype.decodeIsoIec646=function(e){var t=this.extractNumericValueFromBitArray(e,5);if(15===t)return new vi(e+5,vi.FNC1);if(t>=5&&t<15)return new vi(e+5,"0"+(t-5));var n,r=this.extractNumericValueFromBitArray(e,7);if(r>=64&&r<90)return new vi(e+7,""+(r+1));if(r>=90&&r<116)return new vi(e+7,""+(r+7));switch(this.extractNumericValueFromBitArray(e,8)){case 232:n="!";break;case 233:n='"';break;case 234:n="%";break;case 235:n="&";break;case 236:n="'";break;case 237:n="(";break;case 238:n=")";break;case 239:n="*";break;case 240:n="+";break;case 241:n=",";break;case 242:n="-";break;case 243:n=".";break;case 244:n="/";break;case 245:n=":";break;case 246:n=";";break;case 247:n="<";break;case 248:n="=";break;case 249:n=">";break;case 250:n="?";break;case 251:n="_";break;case 252:n=" ";break;default:throw new Sr}return new vi(e+8,n)},e.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63},e.prototype.decodeAlphanumeric=function(e){var t=this.extractNumericValueFromBitArray(e,5);if(15===t)return new vi(e+5,vi.FNC1);if(t>=5&&t<15)return new vi(e+5,"0"+(t-5));var n,r=this.extractNumericValueFromBitArray(e,6);if(r>=32&&r<58)return new vi(e+6,""+(r+33));switch(r){case 58:n="*";break;case 59:n=",";break;case 60:n="-";break;case 61:n=".";break;case 62:n="/";break;default:throw new co("Decoding invalid alphanumeric value: "+r)}return new vi(e+6,n)},e.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var t=0;t<5&&t+e<this.information.getSize();++t)if(2===t){if(!this.information.get(e+2))return!1}else if(this.information.get(e+t))return!1;return!0},e.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var t=e;t<e+3;++t)if(this.information.get(t))return!1;return!0},e.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var t=0;t<4&&t+e<this.information.getSize();++t)if(this.information.get(e+t))return!1;return!0},e}(),Si=function(){function e(e){this.information=e,this.generalDecoder=new xi(e)}return e.prototype.getInformation=function(){return this.information},e.prototype.getGeneralDecoder=function(){return this.generalDecoder},e}(),Ci=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ii=function(e){function t(t){return e.call(this,t)||this}return Ci(t,e),t.prototype.encodeCompressedGtin=function(e,t){e.append("(01)");var n=e.length();e.append("9"),this.encodeCompressedGtinWithoutAI(e,t,n)},t.prototype.encodeCompressedGtinWithoutAI=function(e,n,r){for(var o=0;o<4;++o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*o,10);i/100==0&&e.append("0"),i/10==0&&e.append("0"),e.append(i)}t.appendCheckDigit(e,r)},t.appendCheckDigit=function(e,t){for(var n=0,r=0;r<13;r++){var o=e.charAt(r+t).charCodeAt(0)-"0".charCodeAt(0);n+=0==(1&r)?3*o:o}10===(n=10-n%10)&&(n=0),e.append(n)},t.GTIN_SIZE=40,t}(Si),Ai=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Oi=function(e){function t(t){return e.call(this,t)||this}return Ai(t,e),t.prototype.parseInformation=function(){var e=new Rr;e.append("(01)");var n=e.length(),r=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE,4);return e.append(r),this.encodeCompressedGtinWithoutAI(e,t.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(e,t.HEADER_SIZE+44)},t.HEADER_SIZE=4,t}(Ii),Ni=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ti=function(e){function t(t){return e.call(this,t)||this}return Ni(t,e),t.prototype.parseInformation=function(){var e=new Rr;return this.getGeneralDecoder().decodeAllCodes(e,t.HEADER_SIZE)},t.HEADER_SIZE=5,t}(Si),ki=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ri=function(e){function t(t){return e.call(this,t)||this}return ki(t,e),t.prototype.encodeCompressedWeight=function(e,t,n){var r=this.getGeneralDecoder().extractNumericValueFromBitArray(t,n);this.addWeightCode(e,r);for(var o=this.checkWeight(r),i=1e5,a=0;a<5;++a)o/i==0&&e.append("0"),i/=10;e.append(o)},t}(Ii),ji=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Di=function(e){function t(t){return e.call(this,t)||this}return ji(t,e),t.prototype.parseInformation=function(){if(this.getInformation().getSize()!=t.HEADER_SIZE+Ri.GTIN_SIZE+t.WEIGHT_SIZE)throw new Pr;var e=new Rr;return this.encodeCompressedGtin(e,t.HEADER_SIZE),this.encodeCompressedWeight(e,t.HEADER_SIZE+Ri.GTIN_SIZE,t.WEIGHT_SIZE),e.toString()},t.HEADER_SIZE=5,t.WEIGHT_SIZE=15,t}(Ri),Pi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mi=function(e){function t(t){return e.call(this,t)||this}return Pi(t,e),t.prototype.addWeightCode=function(e,t){e.append("(3103)")},t.prototype.checkWeight=function(e){return e},t}(Di),Li=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fi=function(e){function t(t){return e.call(this,t)||this}return Li(t,e),t.prototype.addWeightCode=function(e,t){t<1e4?e.append("(3202)"):e.append("(3203)")},t.prototype.checkWeight=function(e){return e<1e4?e:e-1e4},t}(Di),Bi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vi=function(e){function t(t){return e.call(this,t)||this}return Bi(t,e),t.prototype.parseInformation=function(){if(this.getInformation().getSize()<t.HEADER_SIZE+Ii.GTIN_SIZE)throw new Pr;var e=new Rr;this.encodeCompressedGtin(e,t.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE+Ii.GTIN_SIZE,t.LAST_DIGIT_SIZE);e.append("(392"),e.append(n),e.append(")");var r=this.getGeneralDecoder().decodeGeneralPurposeField(t.HEADER_SIZE+Ii.GTIN_SIZE+t.LAST_DIGIT_SIZE,null);return e.append(r.getNewString()),e.toString()},t.HEADER_SIZE=8,t.LAST_DIGIT_SIZE=2,t}(Ii),Ui=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hi=function(e){function t(t){return e.call(this,t)||this}return Ui(t,e),t.prototype.parseInformation=function(){if(this.getInformation().getSize()<t.HEADER_SIZE+Ii.GTIN_SIZE)throw new Pr;var e=new Rr;this.encodeCompressedGtin(e,t.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE+Ii.GTIN_SIZE,t.LAST_DIGIT_SIZE);e.append("(393"),e.append(n),e.append(")");var r=this.getGeneralDecoder().extractNumericValueFromBitArray(t.HEADER_SIZE+Ii.GTIN_SIZE+t.LAST_DIGIT_SIZE,t.FIRST_THREE_DIGITS_SIZE);r/100==0&&e.append("0"),r/10==0&&e.append("0"),e.append(r);var o=this.getGeneralDecoder().decodeGeneralPurposeField(t.HEADER_SIZE+Ii.GTIN_SIZE+t.LAST_DIGIT_SIZE+t.FIRST_THREE_DIGITS_SIZE,null);return e.append(o.getNewString()),e.toString()},t.HEADER_SIZE=8,t.LAST_DIGIT_SIZE=2,t.FIRST_THREE_DIGITS_SIZE=10,t}(Ii),zi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gi=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.dateCode=r,o.firstAIdigits=n,o}return zi(t,e),t.prototype.parseInformation=function(){if(this.getInformation().getSize()!=t.HEADER_SIZE+t.GTIN_SIZE+t.WEIGHT_SIZE+t.DATE_SIZE)throw new Pr;var e=new Rr;return this.encodeCompressedGtin(e,t.HEADER_SIZE),this.encodeCompressedWeight(e,t.HEADER_SIZE+t.GTIN_SIZE,t.WEIGHT_SIZE),this.encodeCompressedDate(e,t.HEADER_SIZE+t.GTIN_SIZE+t.WEIGHT_SIZE),e.toString()},t.prototype.encodeCompressedDate=function(e,n){var r=this.getGeneralDecoder().extractNumericValueFromBitArray(n,t.DATE_SIZE);if(38400!=r){e.append("("),e.append(this.dateCode),e.append(")");var o=r%32,i=(r/=32)%12+1,a=r/=12;a/10==0&&e.append("0"),e.append(a),i/10==0&&e.append("0"),e.append(i),o/10==0&&e.append("0"),e.append(o)}},t.prototype.addWeightCode=function(e,t){e.append("("),e.append(this.firstAIdigits),e.append(t/1e5),e.append(")")},t.prototype.checkWeight=function(e){return e%1e5},t.HEADER_SIZE=8,t.WEIGHT_SIZE=20,t.DATE_SIZE=16,t}(Ri),Wi=function(){function e(e,t,n,r){this.leftchar=e,this.rightchar=t,this.finderpattern=n,this.maybeLast=r}return e.prototype.mayBeLast=function(){return this.maybeLast},e.prototype.getLeftChar=function(){return this.leftchar},e.prototype.getRightChar=function(){return this.rightchar},e.prototype.getFinderPattern=function(){return this.finderpattern},e.prototype.mustBeLast=function(){return null==this.rightchar},e.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(null==this.finderpattern?"null":this.finderpattern.getValue())+" ]"},e.equals=function(t,n){return t instanceof e&&e.equalsOrNull(t.leftchar,n.leftchar)&&e.equalsOrNull(t.rightchar,n.rightchar)&&e.equalsOrNull(t.finderpattern,n.finderpattern)},e.equalsOrNull=function(t,n){return null===t?null===n:e.equals(t,n)},e.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},e}(),Xi=function(){function e(e,t,n){this.pairs=e,this.rowNumber=t,this.wasReversed=n}return e.prototype.getPairs=function(){return this.pairs},e.prototype.getRowNumber=function(){return this.rowNumber},e.prototype.isReversed=function(){return this.wasReversed},e.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},e.prototype.toString=function(){return"{ "+this.pairs+" }"},e.prototype.equals=function(t,n){return t instanceof e&&this.checkEqualitity(t,n)&&t.wasReversed===n.wasReversed},e.prototype.checkEqualitity=function(e,t){var n;if(e&&t)return e.forEach((function(e,r){t.forEach((function(t){e.getLeftChar().getValue()===t.getLeftChar().getValue()&&e.getRightChar().getValue()===t.getRightChar().getValue()&&e.getFinderPatter().getValue()===t.getFinderPatter().getValue()&&(n=!0)}))})),n},e}(),Yi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qi=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ki=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.pairs=new Array(t.MAX_PAIRS),n.rows=new Array,n.startEnd=[2],n}return Yi(t,e),t.prototype.decodeRow=function(e,n,r){this.pairs.length=0,this.startFromEven=!1;try{return t.constructResult(this.decodeRow2pairs(e,n))}catch(e){}return this.pairs.length=0,this.startFromEven=!0,t.constructResult(this.decodeRow2pairs(e,n))},t.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},t.prototype.decodeRow2pairs=function(e,t){for(var n,r=!1;!r;)try{this.pairs.push(this.retrieveNextPair(t,this.pairs,e))}catch(e){if(e instanceof Pr){if(!this.pairs.length)throw new Pr;r=!0}}if(this.checkChecksum())return this.pairs;if(n=!!this.rows.length,this.storeRow(e,!1),n){var o=this.checkRowsBoolean(!1);if(null!=o)return o;if(null!=(o=this.checkRowsBoolean(!0)))return o}throw new Pr},t.prototype.checkRowsBoolean=function(e){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,e&&(this.rows=this.rows.reverse());var t=null;try{t=this.checkRows(new Array,0)}catch(e){console.log(e)}return e&&(this.rows=this.rows.reverse()),t},t.prototype.checkRows=function(e,n){for(var r,o,i=n;i<this.rows.length;i++){var a=this.rows[i];this.pairs.length=0;try{for(var s=(r=void 0,qi(e)),u=s.next();!u.done;u=s.next()){var l=u.value;this.pairs.push(l.getPairs())}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}if(this.pairs.push(a.getPairs()),t.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var c=new Array(e);c.push(a);try{return this.checkRows(c,i+1)}catch(e){console.log(e)}}}throw new Pr},t.isValidSequence=function(e){var n,r;try{for(var o=qi(t.FINDER_PATTERN_SEQUENCES),i=o.next();!i.done;i=o.next()){var a=i.value;if(!(e.length>a.length)){for(var s=!0,u=0;u<e.length;u++)if(e[u].getFinderPattern().getValue()!=a[u]){s=!1;break}if(s)return!0}}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},t.prototype.storeRow=function(e,n){for(var r=0,o=!1,i=!1;r<this.rows.length;){var a=this.rows[r];if(a.getRowNumber()>e){i=a.isEquivalent(this.pairs);break}o=a.isEquivalent(this.pairs),r++}i||o||t.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new Xi(this.pairs,e,n)),this.removePartialRows(this.pairs,this.rows))},t.prototype.removePartialRows=function(e,t){var n,r,o,i,a,s;try{for(var u=qi(t),l=u.next();!l.done;l=u.next()){var c=l.value;if(c.getPairs().length!==e.length)try{for(var d=(o=void 0,qi(c.getPairs())),f=d.next();!f.done;f=d.next()){var p=f.value;try{for(var h=(a=void 0,qi(e)),m=h.next();!m.done;m=h.next()){var v=m.value;if(Wi.equals(p,v)){!0;break}}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}}}catch(e){o={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},t.isPartialRow=function(e,t){var n,r,o,i,a,s;try{for(var u=qi(t),l=u.next();!l.done;l=u.next()){var c=l.value,d=!0;try{for(var f=(o=void 0,qi(e)),p=f.next();!p.done;p=f.next()){var h=p.value,m=!1;try{for(var v=(a=void 0,qi(c.getPairs())),g=v.next();!g.done;g=v.next()){var y=g.value;if(h.equals(y)){m=!0;break}}}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}if(!m){d=!1;break}}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}if(d)return!0}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return!1},t.prototype.getRows=function(){return this.rows},t.constructResult=function(e){var t=function(e){try{if(e.get(1))return new Oi(e);if(!e.get(2))return new Ti(e);switch(xi.extractNumericValueFromBitArray(e,1,4)){case 4:return new Mi(e);case 5:return new Fi(e)}switch(xi.extractNumericValueFromBitArray(e,1,5)){case 12:return new Vi(e);case 13:return new Hi(e)}switch(xi.extractNumericValueFromBitArray(e,1,7)){case 56:return new Gi(e,"310","11");case 57:return new Gi(e,"320","11");case 58:return new Gi(e,"310","13");case 59:return new Gi(e,"320","13");case 60:return new Gi(e,"310","15");case 61:return new Gi(e,"320","15");case 62:return new Gi(e,"310","17");case 63:return new Gi(e,"320","17")}}catch(t){throw console.log(t),new co("unknown decoder: "+e)}}(fi.buildBitArray(e)).parseInformation(),n=e[0].getFinderPattern().getResultPoints(),r=e[e.length-1].getFinderPattern().getResultPoints(),o=[n[0],n[1],r[0],r[1]];return new Kr(t,null,null,o,Jr.RSS_EXPANDED,null)},t.prototype.checkChecksum=function(){var e=this.pairs.get(0),t=e.getLeftChar(),n=e.getRightChar();if(null==n)return!1;for(var r=n.getChecksumPortion(),o=2,i=1;i<this.pairs.size();++i){var a=this.pairs.get(i);r+=a.getLeftChar().getChecksumPortion(),o++;var s=a.getRightChar();null!=s&&(r+=s.getChecksumPortion(),o++)}return 211*(o-4)+(r%=211)==t.getValue()},t.getNextSecondBar=function(e,t){var n;return e.get(t)?(n=e.getNextUnset(t),n=e.getNextSet(n)):(n=e.getNextSet(t),n=e.getNextUnset(n)),n},t.prototype.retrieveNextPair=function(e,n,r){var o,i=n.length%2==0;this.startFromEven&&(i=!i);var a=!0,s=-1;do{this.findNextPair(e,n,s),null==(o=this.parseFoundFinderPattern(e,r,i))?s=t.getNextSecondBar(e,this.startEnd[0]):a=!1}while(a);var u,l=this.decodeDataCharacter(e,o,i,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new Pr;try{u=this.decodeDataCharacter(e,o,i,!1)}catch(e){u=null,console.log(e)}return new Wi(l,u,o,!0)},t.prototype.isEmptyPair=function(e){return 0===e.length},t.prototype.findNextPair=function(e,n,r){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;var i,a=e.getSize();i=r>=0?r:this.isEmptyPair(n)?0:n[n.length-1].getFinderPattern().getStartEnd()[1];var s=n.length%2!=0;this.startFromEven&&(s=!s);for(var u=!1;i<a&&(u=!e.get(i));)i++;for(var l=0,c=i,d=i;d<a;d++)if(e.get(d)!=u)o[l]++;else{if(3==l){if(s&&t.reverseCounters(o),t.isFinderPattern(o))return this.startEnd[0]=c,void(this.startEnd[1]=d);s&&t.reverseCounters(o),c+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,l--}else l++;o[l]=1,u=!u}throw new Pr},t.reverseCounters=function(e){for(var t=e.length,n=0;n<t/2;++n){var r=e[n];e[n]=e[t-n-1],e[t-n-1]=r}},t.prototype.parseFoundFinderPattern=function(e,n,r){var o,i,a;if(r){for(var s=this.startEnd[0]-1;s>=0&&!e.get(s);)s--;s++,o=this.startEnd[0]-s,i=s,a=this.startEnd[1]}else i=this.startEnd[0],o=(a=e.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var u,l=this.getDecodeFinderCounters();pr.arraycopy(l,0,l,1,l.length-1),l[0]=o;try{u=this.parseFinderValue(l,t.FINDER_PATTERNS)}catch(e){return null}return new ci(u,[i,a],i,a,n)},t.prototype.decodeDataCharacter=function(e,n,r,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)t.recordPatternInReverse(e,n.getStartEnd()[0],i);else{t.recordPattern(e,n.getStartEnd()[1],i);for(var s=0,u=i.length-1;s<u;s++,u--){var l=i[s];i[s]=i[u],i[u]=l}}var c=ho.sum(new Int32Array(i))/17,d=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(c-d)/d>.3)throw new Pr;var f=this.getOddCounts(),p=this.getEvenCounts(),h=this.getOddRoundingErrors(),m=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var v=1*i[s]/c,g=v+.5;if(g<1){if(v<.3)throw new Pr;g=1}else if(g>8){if(v>8.7)throw new Pr;g=8}var y=s/2;0==(1&s)?(f[y]=g,h[y]=v-g):(p[y]=g,m[y]=v-g)}this.adjustOddEvenCounts(17);var w=4*n.getValue()+(r?0:2)+(o?0:1)-1,b=0,_=0;for(s=f.length-1;s>=0;s--){if(t.isNotA1left(n,r,o)){var E=t.WEIGHTS[w][2*s];_+=f[s]*E}b+=f[s]}var x=0;for(s=p.length-1;s>=0;s--)t.isNotA1left(n,r,o)&&(E=t.WEIGHTS[w][2*s+1],x+=p[s]*E);var S=_+x;if(0!=(1&b)||b>13||b<4)throw new Pr;var C=(13-b)/2,I=t.SYMBOL_WIDEST[C],A=9-I,O=di.getRSSvalue(f,I,!0),N=di.getRSSvalue(p,A,!1),T=t.EVEN_TOTAL_SUBSET[C],k=t.GSUM[C];return new li(O*T+N+k,S)},t.isNotA1left=function(e,t,n){return!(0==e.getValue()&&t&&n)},t.prototype.adjustOddEvenCounts=function(e){var n=ho.sum(new Int32Array(this.getOddCounts())),r=ho.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1;n>13?i=!0:n<4&&(o=!0);var a=!1,s=!1;r>13?s=!0:r<4&&(a=!0);var u=n+r-e,l=1==(1&n),c=0==(1&r);if(1==u)if(l){if(c)throw new Pr;i=!0}else{if(!c)throw new Pr;s=!0}else if(-1==u)if(l){if(c)throw new Pr;o=!0}else{if(!c)throw new Pr;a=!0}else{if(0!=u)throw new Pr;if(l){if(!c)throw new Pr;n<r?(o=!0,s=!0):(i=!0,a=!0)}else if(c)throw new Pr}if(o){if(i)throw new Pr;t.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&t.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new Pr;t.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&t.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},t.SYMBOL_WIDEST=[7,5,4,3,1],t.EVEN_TOTAL_SUBSET=[4,20,52,104,204],t.GSUM=[0,348,1388,2948,3988],t.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],t.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],t.FINDER_PAT_A=0,t.FINDER_PAT_B=1,t.FINDER_PAT_C=2,t.FINDER_PAT_D=3,t.FINDER_PAT_E=4,t.FINDER_PAT_F=5,t.FINDER_PATTERN_SEQUENCES=[[t.FINDER_PAT_A,t.FINDER_PAT_A],[t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B],[t.FINDER_PAT_A,t.FINDER_PAT_C,t.FINDER_PAT_B,t.FINDER_PAT_D],[t.FINDER_PAT_A,t.FINDER_PAT_E,t.FINDER_PAT_B,t.FINDER_PAT_D,t.FINDER_PAT_C],[t.FINDER_PAT_A,t.FINDER_PAT_E,t.FINDER_PAT_B,t.FINDER_PAT_D,t.FINDER_PAT_D,t.FINDER_PAT_F],[t.FINDER_PAT_A,t.FINDER_PAT_E,t.FINDER_PAT_B,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_F,t.FINDER_PAT_F],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_D],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_E],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_F,t.FINDER_PAT_F],[t.FINDER_PAT_A,t.FINDER_PAT_A,t.FINDER_PAT_B,t.FINDER_PAT_B,t.FINDER_PAT_C,t.FINDER_PAT_D,t.FINDER_PAT_D,t.FINDER_PAT_E,t.FINDER_PAT_E,t.FINDER_PAT_F,t.FINDER_PAT_F]],t.MAX_PAIRS=11,t}(ui),Zi=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ji=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.count=0,o.finderPattern=r,o}return Zi(t,e),t.prototype.getFinderPattern=function(){return this.finderPattern},t.prototype.getCount=function(){return this.count},t.prototype.incrementCount=function(){this.count++},t}(li),$i=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qi=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ea=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.possibleLeftPairs=[],t.possibleRightPairs=[],t}return $i(t,e),t.prototype.decodeRow=function(e,n,r){var o,i,a,s,u=this.decodePair(n,!1,e,r);t.addOrTally(this.possibleLeftPairs,u),n.reverse();var l=this.decodePair(n,!0,e,r);t.addOrTally(this.possibleRightPairs,l),n.reverse();try{for(var c=Qi(this.possibleLeftPairs),d=c.next();!d.done;d=c.next()){var f=d.value;if(f.getCount()>1)try{for(var p=(a=void 0,Qi(this.possibleRightPairs)),h=p.next();!h.done;h=p.next()){var m=h.value;if(m.getCount()>1&&t.checkChecksum(f,m))return t.constructResult(f,m)}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}throw new Pr},t.addOrTally=function(e,t){var n,r;if(null!=t){var o=!1;try{for(var i=Qi(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.getValue()===t.getValue()){s.incrementCount(),o=!0;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}o||e.push(t)}},t.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},t.constructResult=function(e,t){for(var n=4537077*e.getValue()+t.getValue(),r=new String(n).toString(),o=new Rr,i=13-r.length;i>0;i--)o.append("0");o.append(r);var a=0;for(i=0;i<13;i++){var s=o.charAt(i).charCodeAt(0)-"0".charCodeAt(0);a+=0==(1&i)?3*s:s}10===(a=10-a%10)&&(a=0),o.append(a.toString());var u=e.getFinderPattern().getResultPoints(),l=t.getFinderPattern().getResultPoints();return new Kr(o.toString(),null,0,[u[0],u[1],l[0],l[1]],Jr.RSS_14,(new Date).getTime())},t.checkChecksum=function(e,t){var n=(e.getChecksumPortion()+16*t.getChecksumPortion())%79,r=9*e.getFinderPattern().getValue()+t.getFinderPattern().getValue();return r>72&&r--,r>8&&r--,n===r},t.prototype.decodePair=function(e,t,n,r){try{var o=this.findFinderPattern(e,t),i=this.parseFoundFinderPattern(e,n,t,o),a=null==r?null:r.get(Er.NEED_RESULT_POINT_CALLBACK);if(null!=a){var s=(o[0]+o[1])/2;t&&(s=e.getSize()-1-s),a.foundPossibleResultPoint(new vo(s,n))}var u=this.decodeDataCharacter(e,i,!0),l=this.decodeDataCharacter(e,i,!1);return new Ji(1597*u.getValue()+l.getValue(),u.getChecksumPortion()+4*l.getChecksumPortion(),i)}catch(e){return null}},t.prototype.decodeDataCharacter=function(e,n,r){for(var o=this.getDataCharacterCounters(),i=0;i<o.length;i++)o[i]=0;if(r)To.recordPatternInReverse(e,n.getStartEnd()[0],o);else{To.recordPattern(e,n.getStartEnd()[1]+1,o);for(var a=0,s=o.length-1;a<s;a++,s--){var u=o[a];o[a]=o[s],o[s]=u}}var l=r?16:15,c=ho.sum(new Int32Array(o))/l,d=this.getOddCounts(),f=this.getEvenCounts(),p=this.getOddRoundingErrors(),h=this.getEvenRoundingErrors();for(a=0;a<o.length;a++){var m=o[a]/c,v=Math.floor(m+.5);v<1?v=1:v>8&&(v=8);var g=Math.floor(a/2);0==(1&a)?(d[g]=v,p[g]=m-v):(f[g]=v,h[g]=m-v)}this.adjustOddEvenCounts(r,l);var y=0,w=0;for(a=d.length-1;a>=0;a--)w*=9,w+=d[a],y+=d[a];var b=0,_=0;for(a=f.length-1;a>=0;a--)b*=9,b+=f[a],_+=f[a];var E=w+3*b;if(r){if(0!=(1&y)||y>12||y<4)throw new Pr;var x=(12-y)/2,S=9-(N=t.OUTSIDE_ODD_WIDEST[x]),C=di.getRSSvalue(d,N,!1),I=di.getRSSvalue(f,S,!0),A=t.OUTSIDE_EVEN_TOTAL_SUBSET[x],O=t.OUTSIDE_GSUM[x];return new li(C*A+I+O,E)}if(0!=(1&_)||_>10||_<4)throw new Pr;x=(10-_)/2,S=9-(N=t.INSIDE_ODD_WIDEST[x]),C=di.getRSSvalue(d,N,!0),I=di.getRSSvalue(f,S,!1);var N,T=t.INSIDE_ODD_TOTAL_SUBSET[x];return O=t.INSIDE_GSUM[x],new li(I*T+C+O,E)},t.prototype.findFinderPattern=function(e,t){var n=this.getDecodeFinderCounters();n[0]=0,n[1]=0,n[2]=0,n[3]=0;for(var r=e.getSize(),o=!1,i=0;i<r&&t!==(o=!e.get(i));)i++;for(var a=0,s=i,u=i;u<r;u++)if(e.get(u)!==o)n[a]++;else{if(3===a){if(ui.isFinderPattern(n))return[s,u];s+=n[0]+n[1],n[0]=n[2],n[1]=n[3],n[2]=0,n[3]=0,a--}else a++;n[a]=1,o=!o}throw new Pr},t.prototype.parseFoundFinderPattern=function(e,n,r,o){for(var i=e.get(o[0]),a=o[0]-1;a>=0&&i!==e.get(a);)a--;a++;var s=o[0]-a,u=this.getDecodeFinderCounters(),l=new Int32Array(u.length);pr.arraycopy(u,0,l,1,u.length-1),l[0]=s;var c=this.parseFinderValue(l,t.FINDER_PATTERNS),d=a,f=o[1];return r&&(d=e.getSize()-1-d,f=e.getSize()-1-f),new ci(c,[a,o[1]],d,f,n)},t.prototype.adjustOddEvenCounts=function(e,t){var n=ho.sum(new Int32Array(this.getOddCounts())),r=ho.sum(new Int32Array(this.getEvenCounts())),o=!1,i=!1,a=!1,s=!1;e?(n>12?i=!0:n<4&&(o=!0),r>12?s=!0:r<4&&(a=!0)):(n>11?i=!0:n<5&&(o=!0),r>10?s=!0:r<4&&(a=!0));var u=n+r-t,l=(1&n)==(e?1:0),c=1==(1&r);if(1===u)if(l){if(c)throw new Pr;i=!0}else{if(!c)throw new Pr;s=!0}else if(-1===u)if(l){if(c)throw new Pr;o=!0}else{if(!c)throw new Pr;a=!0}else{if(0!==u)throw new Pr;if(l){if(!c)throw new Pr;n<r?(o=!0,s=!0):(i=!0,a=!0)}else if(c)throw new Pr}if(o){if(i)throw new Pr;ui.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(i&&ui.decrement(this.getOddCounts(),this.getOddRoundingErrors()),a){if(s)throw new Pr;ui.increment(this.getEvenCounts(),this.getOddRoundingErrors())}s&&ui.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},t.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],t.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],t.OUTSIDE_GSUM=[0,161,961,2015,2715],t.INSIDE_GSUM=[0,336,1036,1516],t.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],t.INSIDE_ODD_WIDEST=[2,4,6,8],t.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],t}(ui),ta=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),na=function(e){function t(t){var n=e.call(this)||this;n.readers=[];var r=t?t.get(Er.POSSIBLE_FORMATS):null,o=t&&void 0!==t.get(Er.ASSUME_CODE_39_CHECK_DIGIT);return r&&((r.includes(Jr.EAN_13)||r.includes(Jr.UPC_A)||r.includes(Jr.EAN_8)||r.includes(Jr.UPC_E))&&n.readers.push(new ai(t)),r.includes(Jr.CODE_39)&&n.readers.push(new Po(o)),r.includes(Jr.CODE_128)&&n.readers.push(new Ro),r.includes(Jr.ITF)&&n.readers.push(new Lo),r.includes(Jr.RSS_14)&&n.readers.push(new ea),r.includes(Jr.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new Ki))),0===n.readers.length&&(n.readers.push(new ai(t)),n.readers.push(new Po),n.readers.push(new ai(t)),n.readers.push(new Ro),n.readers.push(new Lo),n.readers.push(new ea)),n}return ta(t,e),t.prototype.decodeRow=function(e,t,n){for(var r=0;r<this.readers.length;r++)try{return this.readers[r].decodeRow(e,t,n)}catch(e){}throw new Pr},t.prototype.reset=function(){this.readers.forEach((function(e){return e.reset()}))},t}(To),ra=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){ra((function(t,n){return void 0===t&&(t=500),e.call(this,new na(n),t,n)||this}),e)}(qr);var oa,ia=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},aa=function(){function e(e,t,n){this.ecCodewords=e,this.ecBlocks=[t],n&&this.ecBlocks.push(n)}return e.prototype.getECCodewords=function(){return this.ecCodewords},e.prototype.getECBlocks=function(){return this.ecBlocks},e}(),sa=function(){function e(e,t){this.count=e,this.dataCodewords=t}return e.prototype.getCount=function(){return this.count},e.prototype.getDataCodewords=function(){return this.dataCodewords},e}(),ua=function(){function e(e,t,n,r,o,i){var a,s;this.versionNumber=e,this.symbolSizeRows=t,this.symbolSizeColumns=n,this.dataRegionSizeRows=r,this.dataRegionSizeColumns=o,this.ecBlocks=i;var u=0,l=i.getECCodewords(),c=i.getECBlocks();try{for(var d=ia(c),f=d.next();!f.done;f=d.next()){var p=f.value;u+=p.getCount()*(p.getDataCodewords()+l)}}catch(e){a={error:e}}finally{try{f&&!f.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}this.totalCodewords=u}return e.prototype.getVersionNumber=function(){return this.versionNumber},e.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},e.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},e.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},e.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},e.prototype.getTotalCodewords=function(){return this.totalCodewords},e.prototype.getECBlocks=function(){return this.ecBlocks},e.getVersionForDimensions=function(t,n){var r,o;if(0!=(1&t)||0!=(1&n))throw new Sr;try{for(var i=ia(e.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===t&&s.symbolSizeColumns===n)return s}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}throw new Sr},e.prototype.toString=function(){return""+this.versionNumber},e.buildVersions=function(){return[new e(1,10,10,8,8,new aa(5,new sa(1,3))),new e(2,12,12,10,10,new aa(7,new sa(1,5))),new e(3,14,14,12,12,new aa(10,new sa(1,8))),new e(4,16,16,14,14,new aa(12,new sa(1,12))),new e(5,18,18,16,16,new aa(14,new sa(1,18))),new e(6,20,20,18,18,new aa(18,new sa(1,22))),new e(7,22,22,20,20,new aa(20,new sa(1,30))),new e(8,24,24,22,22,new aa(24,new sa(1,36))),new e(9,26,26,24,24,new aa(28,new sa(1,44))),new e(10,32,32,14,14,new aa(36,new sa(1,62))),new e(11,36,36,16,16,new aa(42,new sa(1,86))),new e(12,40,40,18,18,new aa(48,new sa(1,114))),new e(13,44,44,20,20,new aa(56,new sa(1,144))),new e(14,48,48,22,22,new aa(68,new sa(1,174))),new e(15,52,52,24,24,new aa(42,new sa(2,102))),new e(16,64,64,14,14,new aa(56,new sa(2,140))),new e(17,72,72,16,16,new aa(36,new sa(4,92))),new e(18,80,80,18,18,new aa(48,new sa(4,114))),new e(19,88,88,20,20,new aa(56,new sa(4,144))),new e(20,96,96,22,22,new aa(68,new sa(4,174))),new e(21,104,104,24,24,new aa(56,new sa(6,136))),new e(22,120,120,18,18,new aa(68,new sa(6,175))),new e(23,132,132,20,20,new aa(62,new sa(8,163))),new e(24,144,144,22,22,new aa(62,new sa(8,156),new sa(2,155))),new e(25,8,18,6,16,new aa(7,new sa(1,5))),new e(26,8,32,6,14,new aa(11,new sa(1,10))),new e(27,12,26,10,24,new aa(14,new sa(1,16))),new e(28,12,36,10,16,new aa(18,new sa(1,22))),new e(29,16,36,14,16,new aa(24,new sa(1,32))),new e(30,16,48,14,22,new aa(28,new sa(1,49)))]},e.VERSIONS=e.buildVersions(),e}(),la=function(){function e(t){var n=t.getHeight();if(n<8||n>144||0!=(1&n))throw new Sr;this.version=e.readVersion(t),this.mappingBitMatrix=this.extractDataRegion(t),this.readMappingMatrix=new jr(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return e.prototype.getVersion=function(){return this.version},e.readVersion=function(e){var t=e.getHeight(),n=e.getWidth();return ua.getVersionForDimensions(t,n)},e.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),t=0,n=4,r=0,o=this.mappingBitMatrix.getHeight(),i=this.mappingBitMatrix.getWidth(),a=!1,s=!1,u=!1,l=!1;do{if(n!==o||0!==r||a)if(n!==o-2||0!==r||0==(3&i)||s)if(n!==o+4||2!==r||0!=(7&i)||u)if(n!==o-2||0!==r||4!=(7&i)||l){do{n<o&&r>=0&&!this.readMappingMatrix.get(r,n)&&(e[t++]=255&this.readUtah(n,r,o,i)),n-=2,r+=2}while(n>=0&&r<i);n+=1,r+=3;do{n>=0&&r<i&&!this.readMappingMatrix.get(r,n)&&(e[t++]=255&this.readUtah(n,r,o,i)),n+=2,r-=2}while(n<o&&r>=0);n+=3,r+=1}else e[t++]=255&this.readCorner4(o,i),n-=2,r+=2,l=!0;else e[t++]=255&this.readCorner3(o,i),n-=2,r+=2,u=!0;else e[t++]=255&this.readCorner2(o,i),n-=2,r+=2,s=!0;else e[t++]=255&this.readCorner1(o,i),n-=2,r+=2,a=!0}while(n<o||r<i);if(t!==this.version.getTotalCodewords())throw new Sr;return e},e.prototype.readModule=function(e,t,n,r){return e<0&&(e+=n,t+=4-(n+4&7)),t<0&&(t+=r,e+=4-(r+4&7)),this.readMappingMatrix.set(t,e),this.mappingBitMatrix.get(t,e)},e.prototype.readUtah=function(e,t,n,r){var o=0;return this.readModule(e-2,t-2,n,r)&&(o|=1),o<<=1,this.readModule(e-2,t-1,n,r)&&(o|=1),o<<=1,this.readModule(e-1,t-2,n,r)&&(o|=1),o<<=1,this.readModule(e-1,t-1,n,r)&&(o|=1),o<<=1,this.readModule(e-1,t,n,r)&&(o|=1),o<<=1,this.readModule(e,t-2,n,r)&&(o|=1),o<<=1,this.readModule(e,t-1,n,r)&&(o|=1),o<<=1,this.readModule(e,t,n,r)&&(o|=1),o},e.prototype.readCorner1=function(e,t){var n=0;return this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,1,e,t)&&(n|=1),n<<=1,this.readModule(e-1,2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(2,t-1,e,t)&&(n|=1),n<<=1,this.readModule(3,t-1,e,t)&&(n|=1),n},e.prototype.readCorner2=function(e,t){var n=0;return this.readModule(e-3,0,e,t)&&(n|=1),n<<=1,this.readModule(e-2,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(0,t-4,e,t)&&(n|=1),n<<=1,this.readModule(0,t-3,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n},e.prototype.readCorner3=function(e,t){var n=0;return this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(0,t-3,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-3,e,t)&&(n|=1),n<<=1,this.readModule(1,t-2,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n},e.prototype.readCorner4=function(e,t){var n=0;return this.readModule(e-3,0,e,t)&&(n|=1),n<<=1,this.readModule(e-2,0,e,t)&&(n|=1),n<<=1,this.readModule(e-1,0,e,t)&&(n|=1),n<<=1,this.readModule(0,t-2,e,t)&&(n|=1),n<<=1,this.readModule(0,t-1,e,t)&&(n|=1),n<<=1,this.readModule(1,t-1,e,t)&&(n|=1),n<<=1,this.readModule(2,t-1,e,t)&&(n|=1),n<<=1,this.readModule(3,t-1,e,t)&&(n|=1),n},e.prototype.extractDataRegion=function(e){var t=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==t)throw new ur("Dimension of bitMatrix must match the version size");for(var r=this.version.getDataRegionSizeRows(),o=this.version.getDataRegionSizeColumns(),i=t/r|0,a=n/o|0,s=new jr(a*o,i*r),u=0;u<i;++u)for(var l=u*r,c=0;c<a;++c)for(var d=c*o,f=0;f<r;++f)for(var p=u*(r+2)+1+f,h=l+f,m=0;m<o;++m){var v=c*(o+2)+1+m;if(e.get(v,p)){var g=d+m;s.set(g,h)}}return s},e}(),ca=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},da=function(){function e(e,t){this.numDataCodewords=e,this.codewords=t}return e.getDataBlocks=function(t,n){var r,o,i,a,s=n.getECBlocks(),u=0,l=s.getECBlocks();try{for(var c=ca(l),d=c.next();!d.done;d=c.next())u+=(v=d.value).getCount()}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}var f=new Array(u),p=0;try{for(var h=ca(l),m=h.next();!m.done;m=h.next())for(var v=m.value,g=0;g<v.getCount();g++){var y=v.getDataCodewords(),w=s.getECCodewords()+y;f[p++]=new e(y,new Uint8Array(w))}}catch(e){i={error:e}}finally{try{m&&!m.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}var b=f[0].codewords.length-s.getECCodewords(),_=b-1,E=0;for(g=0;g<_;g++)for(var x=0;x<p;x++)f[x].codewords[g]=t[E++];var S=24===n.getVersionNumber(),C=S?8:p;for(x=0;x<C;x++)f[x].codewords[b-1]=t[E++];var I=f[0].codewords.length;for(g=b;g<I;g++)for(x=0;x<p;x++){var A=S?(x+8)%p:x,O=S&&A>7?g-1:g;f[A].codewords[O]=t[E++]}if(E!==t.length)throw new ur;return f},e.prototype.getNumDataCodewords=function(){return this.numDataCodewords},e.prototype.getCodewords=function(){return this.codewords},e}(),fa=function(){function e(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}return e.prototype.getBitOffset=function(){return this.bitOffset},e.prototype.getByteOffset=function(){return this.byteOffset},e.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new ur(""+e);var t=0,n=this.bitOffset,r=this.byteOffset,o=this.bytes;if(n>0){var i=8-n,a=e<i?e:i,s=255>>8-a<<(u=i-a);t=(o[r]&s)>>u,e-=a,8===(n+=a)&&(n=0,r++)}if(e>0){for(;e>=8;)t=t<<8|255&o[r],r++,e-=8;var u;if(e>0)s=255>>(u=8-e)<<u,t=t<<e|(o[r]&s)>>u,n+=e}return this.bitOffset=n,this.byteOffset=r,t},e.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},e}();!function(e){e[e.PAD_ENCODE=0]="PAD_ENCODE",e[e.ASCII_ENCODE=1]="ASCII_ENCODE",e[e.C40_ENCODE=2]="C40_ENCODE",e[e.TEXT_ENCODE=3]="TEXT_ENCODE",e[e.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",e[e.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",e[e.BASE256_ENCODE=6]="BASE256_ENCODE"}(oa||(oa={}));var pa,ha=function(){function e(){}return e.decode=function(e){var t=new fa(e),n=new Rr,r=new Rr,o=new Array,i=oa.ASCII_ENCODE;do{if(i===oa.ASCII_ENCODE)i=this.decodeAsciiSegment(t,n,r);else{switch(i){case oa.C40_ENCODE:this.decodeC40Segment(t,n);break;case oa.TEXT_ENCODE:this.decodeTextSegment(t,n);break;case oa.ANSIX12_ENCODE:this.decodeAnsiX12Segment(t,n);break;case oa.EDIFACT_ENCODE:this.decodeEdifactSegment(t,n);break;case oa.BASE256_ENCODE:this.decodeBase256Segment(t,n,o);break;default:throw new Sr}i=oa.ASCII_ENCODE}}while(i!==oa.PAD_ENCODE&&t.available()>0);return r.length()>0&&n.append(r.toString()),new eo(e,n.toString(),0===o.length?null:o,null)},e.decodeAsciiSegment=function(e,t,n){var r=!1;do{var o=e.readBits(8);if(0===o)throw new Sr;if(o<=128)return r&&(o+=128),t.append(String.fromCharCode(o-1)),oa.ASCII_ENCODE;if(129===o)return oa.PAD_ENCODE;if(o<=229){var i=o-130;i<10&&t.append("0"),t.append(""+i)}else switch(o){case 230:return oa.C40_ENCODE;case 231:return oa.BASE256_ENCODE;case 232:t.append(String.fromCharCode(29));break;case 233:case 234:case 241:break;case 235:r=!0;break;case 236:t.append("[)>\x1e05\x1d"),n.insert(0,"\x1e\x04");break;case 237:t.append("[)>\x1e06\x1d"),n.insert(0,"\x1e\x04");break;case 238:return oa.ANSIX12_ENCODE;case 239:return oa.TEXT_ENCODE;case 240:return oa.EDIFACT_ENCODE;default:if(254!==o||0!==e.available())throw new Sr}}while(e.available()>0);return oa.ASCII_ENCODE},e.decodeC40Segment=function(e,t){var n=!1,r=[],o=0;do{if(8===e.available())return;var i=e.readBits(8);if(254===i)return;this.parseTwoBytes(i,e.readBits(8),r);for(var a=0;a<3;a++){var s=r[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.C40_BASIC_SET_CHARS.length))throw new Sr;var u=this.C40_BASIC_SET_CHARS[s];n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u)}break;case 1:n?(t.append(String.fromCharCode(s+128)),n=!1):t.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.C40_SHIFT2_SET_CHARS.length)u=this.C40_SHIFT2_SET_CHARS[s],n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u);else switch(s){case 27:t.append(String.fromCharCode(29));break;case 30:n=!0;break;default:throw new Sr}o=0;break;case 3:n?(t.append(String.fromCharCode(s+224)),n=!1):t.append(String.fromCharCode(s+96)),o=0;break;default:throw new Sr}}}while(e.available()>0)},e.decodeTextSegment=function(e,t){var n=!1,r=[],o=0;do{if(8===e.available())return;var i=e.readBits(8);if(254===i)return;this.parseTwoBytes(i,e.readBits(8),r);for(var a=0;a<3;a++){var s=r[a];switch(o){case 0:if(s<3)o=s+1;else{if(!(s<this.TEXT_BASIC_SET_CHARS.length))throw new Sr;var u=this.TEXT_BASIC_SET_CHARS[s];n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u)}break;case 1:n?(t.append(String.fromCharCode(s+128)),n=!1):t.append(String.fromCharCode(s)),o=0;break;case 2:if(s<this.TEXT_SHIFT2_SET_CHARS.length)u=this.TEXT_SHIFT2_SET_CHARS[s],n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u);else switch(s){case 27:t.append(String.fromCharCode(29));break;case 30:n=!0;break;default:throw new Sr}o=0;break;case 3:if(!(s<this.TEXT_SHIFT3_SET_CHARS.length))throw new Sr;u=this.TEXT_SHIFT3_SET_CHARS[s],n?(t.append(String.fromCharCode(u.charCodeAt(0)+128)),n=!1):t.append(u),o=0;break;default:throw new Sr}}}while(e.available()>0)},e.decodeAnsiX12Segment=function(e,t){var n=[];do{if(8===e.available())return;var r=e.readBits(8);if(254===r)return;this.parseTwoBytes(r,e.readBits(8),n);for(var o=0;o<3;o++){var i=n[o];switch(i){case 0:t.append("\r");break;case 1:t.append("*");break;case 2:t.append(">");break;case 3:t.append(" ");break;default:if(i<14)t.append(String.fromCharCode(i+44));else{if(!(i<40))throw new Sr;t.append(String.fromCharCode(i+51))}}}}while(e.available()>0)},e.parseTwoBytes=function(e,t,n){var r=(e<<8)+t-1,o=Math.floor(r/1600);n[0]=o,r-=1600*o,o=Math.floor(r/40),n[1]=o,n[2]=r-40*o},e.decodeEdifactSegment=function(e,t){do{if(e.available()<=16)return;for(var n=0;n<4;n++){var r=e.readBits(6);if(31===r){var o=8-e.getBitOffset();return void(8!==o&&e.readBits(o))}0==(32&r)&&(r|=64),t.append(String.fromCharCode(r))}}while(e.available()>0)},e.decodeBase256Segment=function(e,t,n){var r,o=1+e.getByteOffset(),i=this.unrandomize255State(e.readBits(8),o++);if((r=0===i?e.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(e.readBits(8),o++))<0)throw new Sr;for(var a=new Uint8Array(r),s=0;s<r;s++){if(e.available()<8)throw new Sr;a[s]=this.unrandomize255State(e.readBits(8),o++)}n.push(a);try{t.append(Tr.decode(a,kr.ISO88591))}catch(e){throw new co("Platform does not support required encoding: "+e.message)}},e.unrandomize255State=function(e,t){var n=e-(149*t%255+1);return n>=0?n:n+256},e.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],e.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],e.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],e.TEXT_SHIFT2_SET_CHARS=e.C40_SHIFT2_SET_CHARS,e.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",String.fromCharCode(127)],e}(),ma=function(){function e(){this.rsDecoder=new fo(ao.DATA_MATRIX_FIELD_256)}return e.prototype.decode=function(e){var t,n,r=new la(e),o=r.getVersion(),i=r.readCodewords(),a=da.getDataBlocks(i,o),s=0;try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(a),l=u.next();!l.done;l=u.next())s+=l.value.getNumDataCodewords()}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}for(var c=new Uint8Array(s),d=a.length,f=0;f<d;f++){var p=a[f],h=p.getCodewords(),m=p.getNumDataCodewords();this.correctErrors(h,m);for(var v=0;v<m;v++)c[v*d+f]=h[v]}return ha.decode(c)},e.prototype.correctErrors=function(e,t){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-t)}catch(e){throw new dr}for(var r=0;r<t;r++)e[r]=n[r]},e}(),va=function(){function e(e){this.image=e,this.rectangleDetector=new bo(this.image)}return e.prototype.detect=function(){var t=this.rectangleDetector.detect(),n=this.detectSolid1(t);if((n=this.detectSolid2(n))[3]=this.correctTopRight(n),!n[3])throw new Pr;var r=(n=this.shiftToModuleCenter(n))[0],o=n[1],i=n[2],a=n[3],s=this.transitionsBetween(r,a)+1,u=this.transitionsBetween(i,a)+1;1==(1&s)&&(s+=1),1==(1&u)&&(u+=1),4*s<7*u&&4*u<7*s&&(s=u=Math.max(s,u));var l=e.sampleGrid(this.image,r,o,i,a,s,u);return new go(l,[r,o,i,a])},e.shiftPoint=function(e,t,n){var r=(t.getX()-e.getX())/(n+1),o=(t.getY()-e.getY())/(n+1);return new vo(e.getX()+r,e.getY()+o)},e.moveAway=function(e,t,n){var r=e.getX(),o=e.getY();return r<t?r-=1:r+=1,o<n?o-=1:o+=1,new vo(r,o)},e.prototype.detectSolid1=function(e){var t=e[0],n=e[1],r=e[3],o=e[2],i=this.transitionsBetween(t,n),a=this.transitionsBetween(n,r),s=this.transitionsBetween(r,o),u=this.transitionsBetween(o,t),l=i,c=[o,t,n,r];return l>a&&(l=a,c[0]=t,c[1]=n,c[2]=r,c[3]=o),l>s&&(l=s,c[0]=n,c[1]=r,c[2]=o,c[3]=t),l>u&&(c[0]=r,c[1]=o,c[2]=t,c[3]=n),c},e.prototype.detectSolid2=function(t){var n=t[0],r=t[1],o=t[2],i=t[3],a=this.transitionsBetween(n,i),s=e.shiftPoint(r,o,4*(a+1)),u=e.shiftPoint(o,r,4*(a+1));return this.transitionsBetween(s,n)<this.transitionsBetween(u,i)?(t[0]=n,t[1]=r,t[2]=o,t[3]=i):(t[0]=r,t[1]=o,t[2]=i,t[3]=n),t},e.prototype.correctTopRight=function(t){var n=t[0],r=t[1],o=t[2],i=t[3],a=this.transitionsBetween(n,i),s=this.transitionsBetween(r,i),u=e.shiftPoint(n,r,4*(s+1)),l=e.shiftPoint(o,r,4*(a+1));a=this.transitionsBetween(u,i),s=this.transitionsBetween(l,i);var c=new vo(i.getX()+(o.getX()-r.getX())/(a+1),i.getY()+(o.getY()-r.getY())/(a+1)),d=new vo(i.getX()+(n.getX()-r.getX())/(s+1),i.getY()+(n.getY()-r.getY())/(s+1));return this.isValid(c)?this.isValid(d)?this.transitionsBetween(u,c)+this.transitionsBetween(l,c)>this.transitionsBetween(u,d)+this.transitionsBetween(l,d)?c:d:c:this.isValid(d)?d:null},e.prototype.shiftToModuleCenter=function(t){var n=t[0],r=t[1],o=t[2],i=t[3],a=this.transitionsBetween(n,i)+1,s=this.transitionsBetween(o,i)+1,u=e.shiftPoint(n,r,4*s),l=e.shiftPoint(o,r,4*a);1==(1&(a=this.transitionsBetween(u,i)+1))&&(a+=1),1==(1&(s=this.transitionsBetween(l,i)+1))&&(s+=1);var c,d,f=(n.getX()+r.getX()+o.getX()+i.getX())/4,p=(n.getY()+r.getY()+o.getY()+i.getY())/4;return n=e.moveAway(n,f,p),r=e.moveAway(r,f,p),o=e.moveAway(o,f,p),i=e.moveAway(i,f,p),u=e.shiftPoint(n,r,4*s),u=e.shiftPoint(u,i,4*a),c=e.shiftPoint(r,n,4*s),c=e.shiftPoint(c,o,4*a),l=e.shiftPoint(o,i,4*s),l=e.shiftPoint(l,r,4*a),d=e.shiftPoint(i,o,4*s),[u,c,l,d=e.shiftPoint(d,n,4*a)]},e.prototype.isValid=function(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()},e.sampleGrid=function(e,t,n,r,o,i,a){return Co.getInstance().sampleGrid(e,i,a,.5,.5,i-.5,.5,i-.5,a-.5,.5,a-.5,t.getX(),t.getY(),o.getX(),o.getY(),r.getX(),r.getY(),n.getX(),n.getY())},e.prototype.transitionsBetween=function(e,t){var n=Math.trunc(e.getX()),r=Math.trunc(e.getY()),o=Math.trunc(t.getX()),i=Math.trunc(t.getY()),a=Math.abs(i-r)>Math.abs(o-n);if(a){var s=n;n=r,r=s,s=o,o=i,i=s}for(var u=Math.abs(o-n),l=Math.abs(i-r),c=-u/2,d=r<i?1:-1,f=n<o?1:-1,p=0,h=this.image.get(a?r:n,a?n:r),m=n,v=r;m!==o;m+=f){var g=this.image.get(a?v:m,a?m:v);if(g!==h&&(p++,h=g),(c+=l)>0){if(v===i)break;v+=d,c-=u}}return p},e}(),ga=function(){function e(){this.decoder=new ma}return e.prototype.decode=function(t,n){var r,o;if(void 0===n&&(n=null),null!=n&&n.has(Er.PURE_BARCODE)){var i=e.extractPureBits(t.getBlackMatrix());r=this.decoder.decode(i),o=e.NO_POINTS}else{var a=new va(t.getBlackMatrix()).detect();r=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=r.getRawBytes(),u=new Kr(r.getText(),s,8*s.length,o,Jr.DATA_MATRIX,pr.currentTimeMillis()),l=r.getByteSegments();null!=l&&u.putMetadata(Qr.BYTE_SEGMENTS,l);var c=r.getECLevel();return null!=c&&u.putMetadata(Qr.ERROR_CORRECTION_LEVEL,c),u},e.prototype.reset=function(){},e.extractPureBits=function(e){var t=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(null==t||null==n)throw new Pr;var r=this.moduleSize(t,e),o=t[1],i=n[1],a=t[0],s=(n[0]-a+1)/r,u=(i-o+1)/r;if(s<=0||u<=0)throw new Pr;var l=r/2;o+=l,a+=l;for(var c=new jr(s,u),d=0;d<u;d++)for(var f=o+d*r,p=0;p<s;p++)e.get(a+p*r,f)&&c.set(p,d);return c},e.moduleSize=function(e,t){for(var n=t.getWidth(),r=e[0],o=e[1];r<n&&t.get(r,o);)r++;if(r===n)throw new Pr;var i=r-e[0];if(0===i)throw new Pr;return i},e.NO_POINTS=[],e}(),ya=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){ya((function(t){return void 0===t&&(t=500),e.call(this,new ga,t)||this}),e)}(qr),function(e){e[e.L=0]="L",e[e.M=1]="M",e[e.Q=2]="Q",e[e.H=3]="H"}(pa||(pa={}));var wa,ba=function(){function e(t,n,r){this.value=t,this.stringValue=n,this.bits=r,e.FOR_BITS.set(r,this),e.FOR_VALUE.set(t,this)}return e.prototype.getValue=function(){return this.value},e.prototype.getBits=function(){return this.bits},e.fromString=function(t){switch(t){case"L":return e.L;case"M":return e.M;case"Q":return e.Q;case"H":return e.H;default:throw new ar(t+"not available")}},e.prototype.toString=function(){return this.stringValue},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.value===n.value},e.forBits=function(t){if(t<0||t>=e.FOR_BITS.size)throw new ur;return e.FOR_BITS.get(t)},e.FOR_BITS=new Map,e.FOR_VALUE=new Map,e.L=new e(pa.L,"L",1),e.M=new e(pa.M,"M",0),e.Q=new e(pa.Q,"Q",3),e.H=new e(pa.H,"H",2),e}(),_a=function(){function e(e){this.errorCorrectionLevel=ba.forBits(e>>3&3),this.dataMask=7&e}return e.numBitsDiffering=function(e,t){return wr.bitCount(e^t)},e.decodeFormatInformation=function(t,n){var r=e.doDecodeFormatInformation(t,n);return null!==r?r:e.doDecodeFormatInformation(t^e.FORMAT_INFO_MASK_QR,n^e.FORMAT_INFO_MASK_QR)},e.doDecodeFormatInformation=function(t,n){var r,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.FORMAT_INFO_DECODE_LOOKUP),u=s.next();!u.done;u=s.next()){var l=u.value,c=l[0];if(c===t||c===n)return new e(l[1]);var d=e.numBitsDiffering(t,c);d<i&&(a=l[1],i=d),t!==n&&(d=e.numBitsDiffering(n,c))<i&&(a=l[1],i=d)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i<=3?new e(a):null},e.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},e.prototype.getDataMask=function(){return this.dataMask},e.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.errorCorrectionLevel===n.errorCorrectionLevel&&this.dataMask===n.dataMask},e.FORMAT_INFO_MASK_QR=21522,e.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],e}(),Ea=function(){function e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=t}return e.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},e.prototype.getNumBlocks=function(){var e,t,n=0,r=this.ecBlocks;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=o.next();!i.done;i=o.next())n+=i.value.getCount()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},e.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},e.prototype.getECBlocks=function(){return this.ecBlocks},e}(),xa=function(){function e(e,t){this.count=e,this.dataCodewords=t}return e.prototype.getCount=function(){return this.count},e.prototype.getDataCodewords=function(){return this.dataCodewords},e}(),Sa=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ca=function(){function e(e,t){for(var n,r,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];this.versionNumber=e,this.alignmentPatternCenters=t,this.ecBlocks=o;var a=0,s=o[0].getECCodewordsPerBlock(),u=o[0].getECBlocks();try{for(var l=Sa(u),c=l.next();!c.done;c=l.next()){var d=c.value;a+=d.getCount()*(d.getDataCodewords()+s)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}this.totalCodewords=a}return e.prototype.getVersionNumber=function(){return this.versionNumber},e.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},e.prototype.getTotalCodewords=function(){return this.totalCodewords},e.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},e.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.getValue()]},e.getProvisionalVersionForDimension=function(e){if(e%4!=1)throw new Sr;try{return this.getVersionForNumber((e-17)/4)}catch(e){throw new Sr}},e.getVersionForNumber=function(t){if(t<1||t>40)throw new ur;return e.VERSIONS[t-1]},e.decodeVersionInformation=function(t){for(var n=Number.MAX_SAFE_INTEGER,r=0,o=0;o<e.VERSION_DECODE_INFO.length;o++){var i=e.VERSION_DECODE_INFO[o];if(i===t)return e.getVersionForNumber(o+7);var a=_a.numBitsDiffering(t,i);a<n&&(r=o+7,n=a)}return n<=3?e.getVersionForNumber(r):null},e.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),t=new jr(e);t.setRegion(0,0,9,9),t.setRegion(e-8,0,8,9),t.setRegion(0,e-8,9,8);for(var n=this.alignmentPatternCenters.length,r=0;r<n;r++)for(var o=this.alignmentPatternCenters[r]-2,i=0;i<n;i++)0===r&&(0===i||i===n-1)||r===n-1&&0===i||t.setRegion(this.alignmentPatternCenters[i]-2,o,5,5);return t.setRegion(6,9,1,e-17),t.setRegion(9,6,e-17,1),this.versionNumber>6&&(t.setRegion(e-11,0,3,6),t.setRegion(0,e-11,6,3)),t},e.prototype.toString=function(){return""+this.versionNumber},e.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),e.VERSIONS=[new e(1,new Int32Array(0),new Ea(7,new xa(1,19)),new Ea(10,new xa(1,16)),new Ea(13,new xa(1,13)),new Ea(17,new xa(1,9))),new e(2,Int32Array.from([6,18]),new Ea(10,new xa(1,34)),new Ea(16,new xa(1,28)),new Ea(22,new xa(1,22)),new Ea(28,new xa(1,16))),new e(3,Int32Array.from([6,22]),new Ea(15,new xa(1,55)),new Ea(26,new xa(1,44)),new Ea(18,new xa(2,17)),new Ea(22,new xa(2,13))),new e(4,Int32Array.from([6,26]),new Ea(20,new xa(1,80)),new Ea(18,new xa(2,32)),new Ea(26,new xa(2,24)),new Ea(16,new xa(4,9))),new e(5,Int32Array.from([6,30]),new Ea(26,new xa(1,108)),new Ea(24,new xa(2,43)),new Ea(18,new xa(2,15),new xa(2,16)),new Ea(22,new xa(2,11),new xa(2,12))),new e(6,Int32Array.from([6,34]),new Ea(18,new xa(2,68)),new Ea(16,new xa(4,27)),new Ea(24,new xa(4,19)),new Ea(28,new xa(4,15))),new e(7,Int32Array.from([6,22,38]),new Ea(20,new xa(2,78)),new Ea(18,new xa(4,31)),new Ea(18,new xa(2,14),new xa(4,15)),new Ea(26,new xa(4,13),new xa(1,14))),new e(8,Int32Array.from([6,24,42]),new Ea(24,new xa(2,97)),new Ea(22,new xa(2,38),new xa(2,39)),new Ea(22,new xa(4,18),new xa(2,19)),new Ea(26,new xa(4,14),new xa(2,15))),new e(9,Int32Array.from([6,26,46]),new Ea(30,new xa(2,116)),new Ea(22,new xa(3,36),new xa(2,37)),new Ea(20,new xa(4,16),new xa(4,17)),new Ea(24,new xa(4,12),new xa(4,13))),new e(10,Int32Array.from([6,28,50]),new Ea(18,new xa(2,68),new xa(2,69)),new Ea(26,new xa(4,43),new xa(1,44)),new Ea(24,new xa(6,19),new xa(2,20)),new Ea(28,new xa(6,15),new xa(2,16))),new e(11,Int32Array.from([6,30,54]),new Ea(20,new xa(4,81)),new Ea(30,new xa(1,50),new xa(4,51)),new Ea(28,new xa(4,22),new xa(4,23)),new Ea(24,new xa(3,12),new xa(8,13))),new e(12,Int32Array.from([6,32,58]),new Ea(24,new xa(2,92),new xa(2,93)),new Ea(22,new xa(6,36),new xa(2,37)),new Ea(26,new xa(4,20),new xa(6,21)),new Ea(28,new xa(7,14),new xa(4,15))),new e(13,Int32Array.from([6,34,62]),new Ea(26,new xa(4,107)),new Ea(22,new xa(8,37),new xa(1,38)),new Ea(24,new xa(8,20),new xa(4,21)),new Ea(22,new xa(12,11),new xa(4,12))),new e(14,Int32Array.from([6,26,46,66]),new Ea(30,new xa(3,115),new xa(1,116)),new Ea(24,new xa(4,40),new xa(5,41)),new Ea(20,new xa(11,16),new xa(5,17)),new Ea(24,new xa(11,12),new xa(5,13))),new e(15,Int32Array.from([6,26,48,70]),new Ea(22,new xa(5,87),new xa(1,88)),new Ea(24,new xa(5,41),new xa(5,42)),new Ea(30,new xa(5,24),new xa(7,25)),new Ea(24,new xa(11,12),new xa(7,13))),new e(16,Int32Array.from([6,26,50,74]),new Ea(24,new xa(5,98),new xa(1,99)),new Ea(28,new xa(7,45),new xa(3,46)),new Ea(24,new xa(15,19),new xa(2,20)),new Ea(30,new xa(3,15),new xa(13,16))),new e(17,Int32Array.from([6,30,54,78]),new Ea(28,new xa(1,107),new xa(5,108)),new Ea(28,new xa(10,46),new xa(1,47)),new Ea(28,new xa(1,22),new xa(15,23)),new Ea(28,new xa(2,14),new xa(17,15))),new e(18,Int32Array.from([6,30,56,82]),new Ea(30,new xa(5,120),new xa(1,121)),new Ea(26,new xa(9,43),new xa(4,44)),new Ea(28,new xa(17,22),new xa(1,23)),new Ea(28,new xa(2,14),new xa(19,15))),new e(19,Int32Array.from([6,30,58,86]),new Ea(28,new xa(3,113),new xa(4,114)),new Ea(26,new xa(3,44),new xa(11,45)),new Ea(26,new xa(17,21),new xa(4,22)),new Ea(26,new xa(9,13),new xa(16,14))),new e(20,Int32Array.from([6,34,62,90]),new Ea(28,new xa(3,107),new xa(5,108)),new Ea(26,new xa(3,41),new xa(13,42)),new Ea(30,new xa(15,24),new xa(5,25)),new Ea(28,new xa(15,15),new xa(10,16))),new e(21,Int32Array.from([6,28,50,72,94]),new Ea(28,new xa(4,116),new xa(4,117)),new Ea(26,new xa(17,42)),new Ea(28,new xa(17,22),new xa(6,23)),new Ea(30,new xa(19,16),new xa(6,17))),new e(22,Int32Array.from([6,26,50,74,98]),new Ea(28,new xa(2,111),new xa(7,112)),new Ea(28,new xa(17,46)),new Ea(30,new xa(7,24),new xa(16,25)),new Ea(24,new xa(34,13))),new e(23,Int32Array.from([6,30,54,78,102]),new Ea(30,new xa(4,121),new xa(5,122)),new Ea(28,new xa(4,47),new xa(14,48)),new Ea(30,new xa(11,24),new xa(14,25)),new Ea(30,new xa(16,15),new xa(14,16))),new e(24,Int32Array.from([6,28,54,80,106]),new Ea(30,new xa(6,117),new xa(4,118)),new Ea(28,new xa(6,45),new xa(14,46)),new Ea(30,new xa(11,24),new xa(16,25)),new Ea(30,new xa(30,16),new xa(2,17))),new e(25,Int32Array.from([6,32,58,84,110]),new Ea(26,new xa(8,106),new xa(4,107)),new Ea(28,new xa(8,47),new xa(13,48)),new Ea(30,new xa(7,24),new xa(22,25)),new Ea(30,new xa(22,15),new xa(13,16))),new e(26,Int32Array.from([6,30,58,86,114]),new Ea(28,new xa(10,114),new xa(2,115)),new Ea(28,new xa(19,46),new xa(4,47)),new Ea(28,new xa(28,22),new xa(6,23)),new Ea(30,new xa(33,16),new xa(4,17))),new e(27,Int32Array.from([6,34,62,90,118]),new Ea(30,new xa(8,122),new xa(4,123)),new Ea(28,new xa(22,45),new xa(3,46)),new Ea(30,new xa(8,23),new xa(26,24)),new Ea(30,new xa(12,15),new xa(28,16))),new e(28,Int32Array.from([6,26,50,74,98,122]),new Ea(30,new xa(3,117),new xa(10,118)),new Ea(28,new xa(3,45),new xa(23,46)),new Ea(30,new xa(4,24),new xa(31,25)),new Ea(30,new xa(11,15),new xa(31,16))),new e(29,Int32Array.from([6,30,54,78,102,126]),new Ea(30,new xa(7,116),new xa(7,117)),new Ea(28,new xa(21,45),new xa(7,46)),new Ea(30,new xa(1,23),new xa(37,24)),new Ea(30,new xa(19,15),new xa(26,16))),new e(30,Int32Array.from([6,26,52,78,104,130]),new Ea(30,new xa(5,115),new xa(10,116)),new Ea(28,new xa(19,47),new xa(10,48)),new Ea(30,new xa(15,24),new xa(25,25)),new Ea(30,new xa(23,15),new xa(25,16))),new e(31,Int32Array.from([6,30,56,82,108,134]),new Ea(30,new xa(13,115),new xa(3,116)),new Ea(28,new xa(2,46),new xa(29,47)),new Ea(30,new xa(42,24),new xa(1,25)),new Ea(30,new xa(23,15),new xa(28,16))),new e(32,Int32Array.from([6,34,60,86,112,138]),new Ea(30,new xa(17,115)),new Ea(28,new xa(10,46),new xa(23,47)),new Ea(30,new xa(10,24),new xa(35,25)),new Ea(30,new xa(19,15),new xa(35,16))),new e(33,Int32Array.from([6,30,58,86,114,142]),new Ea(30,new xa(17,115),new xa(1,116)),new Ea(28,new xa(14,46),new xa(21,47)),new Ea(30,new xa(29,24),new xa(19,25)),new Ea(30,new xa(11,15),new xa(46,16))),new e(34,Int32Array.from([6,34,62,90,118,146]),new Ea(30,new xa(13,115),new xa(6,116)),new Ea(28,new xa(14,46),new xa(23,47)),new Ea(30,new xa(44,24),new xa(7,25)),new Ea(30,new xa(59,16),new xa(1,17))),new e(35,Int32Array.from([6,30,54,78,102,126,150]),new Ea(30,new xa(12,121),new xa(7,122)),new Ea(28,new xa(12,47),new xa(26,48)),new Ea(30,new xa(39,24),new xa(14,25)),new Ea(30,new xa(22,15),new xa(41,16))),new e(36,Int32Array.from([6,24,50,76,102,128,154]),new Ea(30,new xa(6,121),new xa(14,122)),new Ea(28,new xa(6,47),new xa(34,48)),new Ea(30,new xa(46,24),new xa(10,25)),new Ea(30,new xa(2,15),new xa(64,16))),new e(37,Int32Array.from([6,28,54,80,106,132,158]),new Ea(30,new xa(17,122),new xa(4,123)),new Ea(28,new xa(29,46),new xa(14,47)),new Ea(30,new xa(49,24),new xa(10,25)),new Ea(30,new xa(24,15),new xa(46,16))),new e(38,Int32Array.from([6,32,58,84,110,136,162]),new Ea(30,new xa(4,122),new xa(18,123)),new Ea(28,new xa(13,46),new xa(32,47)),new Ea(30,new xa(48,24),new xa(14,25)),new Ea(30,new xa(42,15),new xa(32,16))),new e(39,Int32Array.from([6,26,54,82,110,138,166]),new Ea(30,new xa(20,117),new xa(4,118)),new Ea(28,new xa(40,47),new xa(7,48)),new Ea(30,new xa(43,24),new xa(22,25)),new Ea(30,new xa(10,15),new xa(67,16))),new e(40,Int32Array.from([6,30,58,86,114,142,170]),new Ea(30,new xa(19,118),new xa(6,119)),new Ea(28,new xa(18,47),new xa(31,48)),new Ea(30,new xa(34,24),new xa(34,25)),new Ea(30,new xa(20,15),new xa(61,16)))],e}();!function(e){e[e.DATA_MASK_000=0]="DATA_MASK_000",e[e.DATA_MASK_001=1]="DATA_MASK_001",e[e.DATA_MASK_010=2]="DATA_MASK_010",e[e.DATA_MASK_011=3]="DATA_MASK_011",e[e.DATA_MASK_100=4]="DATA_MASK_100",e[e.DATA_MASK_101=5]="DATA_MASK_101",e[e.DATA_MASK_110=6]="DATA_MASK_110",e[e.DATA_MASK_111=7]="DATA_MASK_111"}(wa||(wa={}));var Ia,Aa=function(){function e(e,t){this.value=e,this.isMasked=t}return e.prototype.unmaskBitMatrix=function(e,t){for(var n=0;n<t;n++)for(var r=0;r<t;r++)this.isMasked(n,r)&&e.flip(r,n)},e.values=new Map([[wa.DATA_MASK_000,new e(wa.DATA_MASK_000,(function(e,t){return 0==(e+t&1)}))],[wa.DATA_MASK_001,new e(wa.DATA_MASK_001,(function(e,t){return 0==(1&e)}))],[wa.DATA_MASK_010,new e(wa.DATA_MASK_010,(function(e,t){return t%3==0}))],[wa.DATA_MASK_011,new e(wa.DATA_MASK_011,(function(e,t){return(e+t)%3==0}))],[wa.DATA_MASK_100,new e(wa.DATA_MASK_100,(function(e,t){return 0==(Math.floor(e/2)+Math.floor(t/3)&1)}))],[wa.DATA_MASK_101,new e(wa.DATA_MASK_101,(function(e,t){return e*t%6==0}))],[wa.DATA_MASK_110,new e(wa.DATA_MASK_110,(function(e,t){return e*t%6<3}))],[wa.DATA_MASK_111,new e(wa.DATA_MASK_111,(function(e,t){return 0==(e+t+e*t%3&1)}))]]),e}(),Oa=function(){function e(e){var t=e.getHeight();if(t<21||1!=(3&t))throw new Sr;this.bitMatrix=e}return e.prototype.readFormatInformation=function(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;for(var e=0,t=0;t<6;t++)e=this.copyBit(t,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var n=5;n>=0;n--)e=this.copyBit(8,n,e);var r=this.bitMatrix.getHeight(),o=0,i=r-7;for(n=r-1;n>=i;n--)o=this.copyBit(8,n,o);for(t=r-8;t<r;t++)o=this.copyBit(t,8,o);if(this.parsedFormatInfo=_a.decodeFormatInformation(e,o),null!==this.parsedFormatInfo)return this.parsedFormatInfo;throw new Sr},e.prototype.readVersion=function(){if(null!==this.parsedVersion&&void 0!==this.parsedVersion)return this.parsedVersion;var e=this.bitMatrix.getHeight(),t=Math.floor((e-17)/4);if(t<=6)return Ca.getVersionForNumber(t);for(var n=0,r=e-11,o=5;o>=0;o--)for(var i=e-9;i>=r;i--)n=this.copyBit(i,o,n);var a=Ca.decodeVersionInformation(n);if(null!==a&&a.getDimensionForVersion()===e)return this.parsedVersion=a,a;for(n=0,i=5;i>=0;i--)for(o=e-9;o>=r;o--)n=this.copyBit(i,o,n);if(null!==(a=Ca.decodeVersionInformation(n))&&a.getDimensionForVersion()===e)return this.parsedVersion=a,a;throw new Sr},e.prototype.copyBit=function(e,t,n){return(this.isMirror?this.bitMatrix.get(t,e):this.bitMatrix.get(e,t))?n<<1|1:n<<1},e.prototype.readCodewords=function(){var e=this.readFormatInformation(),t=this.readVersion(),n=Aa.values.get(e.getDataMask()),r=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,r);for(var o=t.buildFunctionPattern(),i=!0,a=new Uint8Array(t.getTotalCodewords()),s=0,u=0,l=0,c=r-1;c>0;c-=2){6===c&&c--;for(var d=0;d<r;d++)for(var f=i?r-1-d:d,p=0;p<2;p++)o.get(c-p,f)||(l++,u<<=1,this.bitMatrix.get(c-p,f)&&(u|=1),8===l&&(a[s++]=u,l=0,u=0));i=!i}if(s!==t.getTotalCodewords())throw new Sr;return a},e.prototype.remask=function(){if(null!==this.parsedFormatInfo){var e=Aa.values[this.parsedFormatInfo.getDataMask()],t=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,t)}},e.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},e.prototype.mirror=function(){for(var e=this.bitMatrix,t=0,n=e.getWidth();t<n;t++)for(var r=t+1,o=e.getHeight();r<o;r++)e.get(t,r)!==e.get(r,t)&&(e.flip(r,t),e.flip(t,r))},e}(),Na=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ta=function(){function e(e,t){this.numDataCodewords=e,this.codewords=t}return e.getDataBlocks=function(t,n,r){var o,i,a,s;if(t.length!==n.getTotalCodewords())throw new ur;var u=n.getECBlocksForLevel(r),l=0,c=u.getECBlocks();try{for(var d=Na(c),f=d.next();!f.done;f=d.next())l+=(g=f.value).getCount()}catch(e){o={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var p=new Array(l),h=0;try{for(var m=Na(c),v=m.next();!v.done;v=m.next())for(var g=v.value,y=0;y<g.getCount();y++){var w=g.getDataCodewords(),b=u.getECCodewordsPerBlock()+w;p[h++]=new e(w,new Uint8Array(b))}}catch(e){a={error:e}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}for(var _=p[0].codewords.length,E=p.length-1;E>=0&&p[E].codewords.length!==_;)E--;E++;var x=_-u.getECCodewordsPerBlock(),S=0;for(y=0;y<x;y++)for(var C=0;C<h;C++)p[C].codewords[y]=t[S++];for(C=E;C<h;C++)p[C].codewords[x]=t[S++];var I=p[0].codewords.length;for(y=x;y<I;y++)for(C=0;C<h;C++){var A=C<E?y:y+1;p[C].codewords[A]=t[S++]}return p},e.prototype.getNumDataCodewords=function(){return this.numDataCodewords},e.prototype.getCodewords=function(){return this.codewords},e}();!function(e){e[e.TERMINATOR=0]="TERMINATOR",e[e.NUMERIC=1]="NUMERIC",e[e.ALPHANUMERIC=2]="ALPHANUMERIC",e[e.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",e[e.BYTE=4]="BYTE",e[e.ECI=5]="ECI",e[e.KANJI=6]="KANJI",e[e.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",e[e.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",e[e.HANZI=9]="HANZI"}(Ia||(Ia={}));var ka,Ra,ja=function(){function e(t,n,r,o){this.value=t,this.stringValue=n,this.characterCountBitsForVersions=r,this.bits=o,e.FOR_BITS.set(o,this),e.FOR_VALUE.set(t,this)}return e.forBits=function(t){var n=e.FOR_BITS.get(t);if(void 0===n)throw new ur;return n},e.prototype.getCharacterCountBits=function(e){var t,n=e.getVersionNumber();return t=n<=9?0:n<=26?1:2,this.characterCountBitsForVersions[t]},e.prototype.getValue=function(){return this.value},e.prototype.getBits=function(){return this.bits},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.value===n.value},e.prototype.toString=function(){return this.stringValue},e.FOR_BITS=new Map,e.FOR_VALUE=new Map,e.TERMINATOR=new e(Ia.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),e.NUMERIC=new e(Ia.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),e.ALPHANUMERIC=new e(Ia.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),e.STRUCTURED_APPEND=new e(Ia.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),e.BYTE=new e(Ia.BYTE,"BYTE",Int32Array.from([8,16,16]),4),e.ECI=new e(Ia.ECI,"ECI",Int32Array.from([0,0,0]),7),e.KANJI=new e(Ia.KANJI,"KANJI",Int32Array.from([8,10,12]),8),e.FNC1_FIRST_POSITION=new e(Ia.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),e.FNC1_SECOND_POSITION=new e(Ia.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),e.HANZI=new e(Ia.HANZI,"HANZI",Int32Array.from([8,10,12]),13),e}(),Da=function(){function e(){}return e.decode=function(t,n,r,o){var i=new fa(t),a=new Rr,s=new Array,u=-1,l=-1;try{var c=null,d=!1,f=void 0;do{if(i.available()<4)f=ja.TERMINATOR;else{var p=i.readBits(4);f=ja.forBits(p)}switch(f){case ja.TERMINATOR:break;case ja.FNC1_FIRST_POSITION:case ja.FNC1_SECOND_POSITION:d=!0;break;case ja.STRUCTURED_APPEND:if(i.available()<16)throw new Sr;u=i.readBits(8),l=i.readBits(8);break;case ja.ECI:var h=e.parseECIValue(i);if(null===(c=Ar.getCharacterSetECIByValue(h)))throw new Sr;break;case ja.HANZI:var m=i.readBits(4),v=i.readBits(f.getCharacterCountBits(n));m===e.GB2312_SUBSET&&e.decodeHanziSegment(i,a,v);break;default:var g=i.readBits(f.getCharacterCountBits(n));switch(f){case ja.NUMERIC:e.decodeNumericSegment(i,a,g);break;case ja.ALPHANUMERIC:e.decodeAlphanumericSegment(i,a,g,d);break;case ja.BYTE:e.decodeByteSegment(i,a,g,c,s,o);break;case ja.KANJI:e.decodeKanjiSegment(i,a,g);break;default:throw new Sr}}}while(f!==ja.TERMINATOR)}catch(e){throw new Sr}return new eo(t,a.toString(),0===s.length?null:s,null===r?null:r.toString(),u,l)},e.decodeHanziSegment=function(e,t,n){if(13*n>e.available())throw new Sr;for(var r=new Uint8Array(2*n),o=0;n>0;){var i=e.readBits(13),a=i/96<<8&4294967295|i%96;a+=a<959?41377:42657,r[o]=a>>8&255,r[o+1]=255&a,o+=2,n--}try{t.append(Tr.decode(r,kr.GB2312))}catch(e){throw new Sr(e)}},e.decodeKanjiSegment=function(e,t,n){if(13*n>e.available())throw new Sr;for(var r=new Uint8Array(2*n),o=0;n>0;){var i=e.readBits(13),a=i/192<<8&4294967295|i%192;a+=a<7936?33088:49472,r[o]=a>>8,r[o+1]=a,o+=2,n--}try{t.append(Tr.decode(r,kr.SHIFT_JIS))}catch(e){throw new Sr(e)}},e.decodeByteSegment=function(e,t,n,r,o,i){if(8*n>e.available())throw new Sr;for(var a,s=new Uint8Array(n),u=0;u<n;u++)s[u]=e.readBits(8);a=null===r?kr.guessEncoding(s,i):r.getName();try{t.append(Tr.decode(s,a))}catch(e){throw new Sr(e)}o.push(s)},e.toAlphaNumericChar=function(t){if(t>=e.ALPHANUMERIC_CHARS.length)throw new Sr;return e.ALPHANUMERIC_CHARS[t]},e.decodeAlphanumericSegment=function(t,n,r,o){for(var i=n.length();r>1;){if(t.available()<11)throw new Sr;var a=t.readBits(11);n.append(e.toAlphaNumericChar(Math.floor(a/45))),n.append(e.toAlphaNumericChar(a%45)),r-=2}if(1===r){if(t.available()<6)throw new Sr;n.append(e.toAlphaNumericChar(t.readBits(6)))}if(o)for(var s=i;s<n.length();s++)"%"===n.charAt(s)&&(s<n.length()-1&&"%"===n.charAt(s+1)?n.deleteCharAt(s+1):n.setCharAt(s,String.fromCharCode(29)))},e.decodeNumericSegment=function(t,n,r){for(;r>=3;){if(t.available()<10)throw new Sr;var o=t.readBits(10);if(o>=1e3)throw new Sr;n.append(e.toAlphaNumericChar(Math.floor(o/100))),n.append(e.toAlphaNumericChar(Math.floor(o/10)%10)),n.append(e.toAlphaNumericChar(o%10)),r-=3}if(2===r){if(t.available()<7)throw new Sr;var i=t.readBits(7);if(i>=100)throw new Sr;n.append(e.toAlphaNumericChar(Math.floor(i/10))),n.append(e.toAlphaNumericChar(i%10))}else if(1===r){if(t.available()<4)throw new Sr;var a=t.readBits(4);if(a>=10)throw new Sr;n.append(e.toAlphaNumericChar(a))}},e.parseECIValue=function(e){var t=e.readBits(8);if(0==(128&t))return 127&t;if(128==(192&t))return(63&t)<<8&4294967295|e.readBits(8);if(192==(224&t))return(31&t)<<16&4294967295|e.readBits(16);throw new Sr},e.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.GB2312_SUBSET=1,e}(),Pa=function(){function e(e){this.mirrored=e}return e.prototype.isMirrored=function(){return this.mirrored},e.prototype.applyMirroredCorrection=function(e){if(this.mirrored&&null!==e&&!(e.length<3)){var t=e[0];e[0]=e[2],e[2]=t}},e}(),Ma=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},La=function(){function e(){this.rsDecoder=new fo(ao.QR_CODE_FIELD_256)}return e.prototype.decodeBooleanArray=function(e,t){return this.decodeBitMatrix(jr.parseFromBooleanArray(e),t)},e.prototype.decodeBitMatrix=function(e,t){var n=new Oa(e),r=null;try{return this.decodeBitMatrixParser(n,t)}catch(e){r=e}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var o=this.decodeBitMatrixParser(n,t);return o.setOther(new Pa(!0)),o}catch(e){if(null!==r)throw r;throw e}},e.prototype.decodeBitMatrixParser=function(e,t){var n,r,o,i,a=e.readVersion(),s=e.readFormatInformation().getErrorCorrectionLevel(),u=e.readCodewords(),l=Ta.getDataBlocks(u,a,s),c=0;try{for(var d=Ma(l),f=d.next();!f.done;f=d.next())c+=(g=f.value).getNumDataCodewords()}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}var p=new Uint8Array(c),h=0;try{for(var m=Ma(l),v=m.next();!v.done;v=m.next()){var g,y=(g=v.value).getCodewords(),w=g.getNumDataCodewords();this.correctErrors(y,w);for(var b=0;b<w;b++)p[h++]=y[b]}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}return Da.decode(p,a,s,t)},e.prototype.correctErrors=function(e,t){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-t)}catch(e){throw new dr}for(var r=0;r<t;r++)e[r]=n[r]},e}(),Fa=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ba=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.estimatedModuleSize=r,o}return Fa(t,e),t.prototype.aboutEquals=function(e,t,n){if(Math.abs(t-this.getY())<=e&&Math.abs(n-this.getX())<=e){var r=Math.abs(e-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1},t.prototype.combineEstimate=function(e,n,r){return new t((this.getX()+n)/2,(this.getY()+e)/2,(this.estimatedModuleSize+r)/2)},t}(vo),Va=function(){function e(e,t,n,r,o,i,a){this.image=e,this.startX=t,this.startY=n,this.width=r,this.height=o,this.moduleSize=i,this.resultPointCallback=a,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return e.prototype.find=function(){for(var e=this.startX,t=this.height,n=e+this.width,r=this.startY+t/2,o=new Int32Array(3),i=this.image,a=0;a<t;a++){var s=r+(0==(1&a)?Math.floor((a+1)/2):-Math.floor((a+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var u=e;u<n&&!i.get(u,s);)u++;for(var l=0;u<n;){if(i.get(u,s))if(1===l)o[1]++;else if(2===l){var c;if(this.foundPatternCross(o)&&null!==(c=this.handlePossibleCenter(o,s,u)))return c;o[0]=o[2],o[1]=1,o[2]=0,l=1}else o[++l]++;else 1===l&&l++,o[l]++;u++}if(this.foundPatternCross(o)&&null!==(c=this.handlePossibleCenter(o,s,n)))return c}if(0!==this.possibleCenters.length)return this.possibleCenters[0];throw new Pr},e.centerFromEnd=function(e,t){return t-e[2]-e[1]/2},e.prototype.foundPatternCross=function(e){for(var t=this.moduleSize,n=t/2,r=0;r<3;r++)if(Math.abs(t-e[r])>=n)return!1;return!0},e.prototype.crossCheckVertical=function(t,n,r,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var u=t;u>=0&&i.get(n,u)&&s[1]<=r;)s[1]++,u--;if(u<0||s[1]>r)return NaN;for(;u>=0&&!i.get(n,u)&&s[0]<=r;)s[0]++,u--;if(s[0]>r)return NaN;for(u=t+1;u<a&&i.get(n,u)&&s[1]<=r;)s[1]++,u++;if(u===a||s[1]>r)return NaN;for(;u<a&&!i.get(n,u)&&s[2]<=r;)s[2]++,u++;if(s[2]>r)return NaN;var l=s[0]+s[1]+s[2];return 5*Math.abs(l-o)>=2*o?NaN:this.foundPatternCross(s)?e.centerFromEnd(s,u):NaN},e.prototype.handlePossibleCenter=function(t,n,r){var o,i,a=t[0]+t[1]+t[2],s=e.centerFromEnd(t,r),u=this.crossCheckVertical(n,s,2*t[1],a);if(!isNaN(u)){var l=(t[0]+t[1]+t[2])/3;try{for(var c=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.possibleCenters),d=c.next();!d.done;d=c.next()){var f=d.value;if(f.aboutEquals(l,u,s))return f.combineEstimate(u,s,l)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}var p=new Ba(s,u,l);this.possibleCenters.push(p),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(p)}return null},e}(),Ua=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ha=function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i.estimatedModuleSize=r,i.count=o,void 0===o&&(i.count=1),i}return Ua(t,e),t.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},t.prototype.getCount=function(){return this.count},t.prototype.aboutEquals=function(e,t,n){if(Math.abs(t-this.getY())<=e&&Math.abs(n-this.getX())<=e){var r=Math.abs(e-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1},t.prototype.combineEstimate=function(e,n,r){var o=this.count+1;return new t((this.count*this.getX()+n)/o,(this.count*this.getY()+e)/o,(this.count*this.estimatedModuleSize+r)/o,o)},t}(vo),za=function(){function e(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}return e.prototype.getBottomLeft=function(){return this.bottomLeft},e.prototype.getTopLeft=function(){return this.topLeft},e.prototype.getTopRight=function(){return this.topRight},e}(),Ga=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Wa=function(){function e(e,t){this.image=e,this.resultPointCallback=t,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=t}return e.prototype.getImage=function(){return this.image},e.prototype.getPossibleCenters=function(){return this.possibleCenters},e.prototype.find=function(t){var n=null!=t&&void 0!==t.get(Er.TRY_HARDER),r=null!=t&&void 0!==t.get(Er.PURE_BARCODE),o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*e.MAX_MODULES));(s<e.MIN_SKIP||n)&&(s=e.MIN_SKIP);for(var u=!1,l=new Int32Array(5),c=s-1;c<i&&!u;c+=s){l[0]=0,l[1]=0,l[2]=0,l[3]=0,l[4]=0;for(var d=0,f=0;f<a;f++)if(o.get(f,c))1==(1&d)&&d++,l[d]++;else if(0==(1&d))if(4===d)if(e.foundPatternCross(l)){if(!0!==this.handlePossibleCenter(l,c,f,r)){l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,d=3;continue}if(s=2,!0===this.hasSkipped)u=this.haveMultiplyConfirmedCenters();else{var p=this.findRowSkip();p>l[2]&&(c+=p-l[2]-s,f=a-1)}d=0,l[0]=0,l[1]=0,l[2]=0,l[3]=0,l[4]=0}else l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,d=3;else l[++d]++;else l[d]++;e.foundPatternCross(l)&&!0===this.handlePossibleCenter(l,c,a,r)&&(s=l[0],this.hasSkipped&&(u=this.haveMultiplyConfirmedCenters()))}var h=this.selectBestPatterns();return vo.orderBestPatterns(h),new za(h)},e.centerFromEnd=function(e,t){return t-e[4]-e[3]-e[2]/2},e.foundPatternCross=function(e){for(var t=0,n=0;n<5;n++){var r=e[n];if(0===r)return!1;t+=r}if(t<7)return!1;var o=t/7,i=o/2;return Math.abs(o-e[0])<i&&Math.abs(o-e[1])<i&&Math.abs(3*o-e[2])<3*i&&Math.abs(o-e[3])<i&&Math.abs(o-e[4])<i},e.prototype.getCrossCheckStateCount=function(){var e=this.crossCheckStateCount;return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e},e.prototype.crossCheckDiagonal=function(t,n,r,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;t>=a&&n>=a&&s.get(n-a,t-a);)i[2]++,a++;if(t<a||n<a)return!1;for(;t>=a&&n>=a&&!s.get(n-a,t-a)&&i[1]<=r;)i[1]++,a++;if(t<a||n<a||i[1]>r)return!1;for(;t>=a&&n>=a&&s.get(n-a,t-a)&&i[0]<=r;)i[0]++,a++;if(i[0]>r)return!1;var u=s.getHeight(),l=s.getWidth();for(a=1;t+a<u&&n+a<l&&s.get(n+a,t+a);)i[2]++,a++;if(t+a>=u||n+a>=l)return!1;for(;t+a<u&&n+a<l&&!s.get(n+a,t+a)&&i[3]<r;)i[3]++,a++;if(t+a>=u||n+a>=l||i[3]>=r)return!1;for(;t+a<u&&n+a<l&&s.get(n+a,t+a)&&i[4]<r;)i[4]++,a++;if(i[4]>=r)return!1;var c=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(c-o)<2*o&&e.foundPatternCross(i)},e.prototype.crossCheckVertical=function(t,n,r,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),u=t;u>=0&&i.get(n,u);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(n,u)&&s[1]<=r;)s[1]++,u--;if(u<0||s[1]>r)return NaN;for(;u>=0&&i.get(n,u)&&s[0]<=r;)s[0]++,u--;if(s[0]>r)return NaN;for(u=t+1;u<a&&i.get(n,u);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(n,u)&&s[3]<r;)s[3]++,u++;if(u===a||s[3]>=r)return NaN;for(;u<a&&i.get(n,u)&&s[4]<r;)s[4]++,u++;if(s[4]>=r)return NaN;var l=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(l-o)>=2*o?NaN:e.foundPatternCross(s)?e.centerFromEnd(s,u):NaN},e.prototype.crossCheckHorizontal=function(t,n,r,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),u=t;u>=0&&i.get(u,n);)s[2]++,u--;if(u<0)return NaN;for(;u>=0&&!i.get(u,n)&&s[1]<=r;)s[1]++,u--;if(u<0||s[1]>r)return NaN;for(;u>=0&&i.get(u,n)&&s[0]<=r;)s[0]++,u--;if(s[0]>r)return NaN;for(u=t+1;u<a&&i.get(u,n);)s[2]++,u++;if(u===a)return NaN;for(;u<a&&!i.get(u,n)&&s[3]<r;)s[3]++,u++;if(u===a||s[3]>=r)return NaN;for(;u<a&&i.get(u,n)&&s[4]<r;)s[4]++,u++;if(s[4]>=r)return NaN;var l=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(l-o)>=o?NaN:e.foundPatternCross(s)?e.centerFromEnd(s,u):NaN},e.prototype.handlePossibleCenter=function(t,n,r,o){var i=t[0]+t[1]+t[2]+t[3]+t[4],a=e.centerFromEnd(t,r),s=this.crossCheckVertical(n,Math.floor(a),t[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),t[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),t[2],i)))){for(var u=i/7,l=!1,c=this.possibleCenters,d=0,f=c.length;d<f;d++){var p=c[d];if(p.aboutEquals(u,s,a)){c[d]=p.combineEstimate(s,a,u),l=!0;break}}if(!l){var h=new Ha(a,s,u);c.push(h),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(h)}return!0}return!1},e.prototype.findRowSkip=function(){var t,n;if(this.possibleCenters.length<=1)return 0;var r=null;try{for(var o=Ga(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=e.CENTER_QUORUM){if(null!=r)return this.hasSkipped=!0,Math.floor((Math.abs(r.getX()-a.getX())-Math.abs(r.getY()-a.getY()))/2);r=a}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return 0},e.prototype.haveMultiplyConfirmedCenters=function(){var t,n,r,o,i=0,a=0,s=this.possibleCenters.length;try{for(var u=Ga(this.possibleCenters),l=u.next();!l.done;l=u.next())(h=l.value).getCount()>=e.CENTER_QUORUM&&(i++,a+=h.getEstimatedModuleSize())}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}if(i<3)return!1;var c=a/s,d=0;try{for(var f=Ga(this.possibleCenters),p=f.next();!p.done;p=f.next()){var h=p.value;d+=Math.abs(h.getEstimatedModuleSize()-c)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}return d<=.05*a},e.prototype.selectBestPatterns=function(){var e,t,n,r,o=this.possibleCenters.length;if(o<3)throw new Pr;var i,a=this.possibleCenters;if(o>3){var s=0,u=0;try{for(var l=Ga(this.possibleCenters),c=l.next();!c.done;c=l.next()){var d=c.value.getEstimatedModuleSize();s+=d,u+=d*d}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}i=s/o;var f=Math.sqrt(u/o-i*i);a.sort((function(e,t){var n=Math.abs(t.getEstimatedModuleSize()-i),r=Math.abs(e.getEstimatedModuleSize()-i);return n<r?-1:n>r?1:0}));for(var p=Math.max(.2*i,f),h=0;h<a.length&&a.length>3;h++){var m=a[h];Math.abs(m.getEstimatedModuleSize()-i)>p&&(a.splice(h,1),h--)}}if(a.length>3){s=0;try{for(var v=Ga(a),g=v.next();!g.done;g=v.next())s+=g.value.getEstimatedModuleSize()}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}i=s/a.length,a.sort((function(e,t){if(t.getCount()===e.getCount()){var n=Math.abs(t.getEstimatedModuleSize()-i),r=Math.abs(e.getEstimatedModuleSize()-i);return n<r?1:n>r?-1:0}return t.getCount()-e.getCount()})),a.splice(3)}return[a[0],a[1],a[2]]},e.CENTER_QUORUM=2,e.MIN_SKIP=3,e.MAX_MODULES=57,e}(),Xa=function(){function e(e){this.image=e}return e.prototype.getImage=function(){return this.image},e.prototype.getResultPointCallback=function(){return this.resultPointCallback},e.prototype.detect=function(e){this.resultPointCallback=null==e?null:e.get(Er.NEED_RESULT_POINT_CALLBACK);var t=new Wa(this.image,this.resultPointCallback).find(e);return this.processFinderPatternInfo(t)},e.prototype.processFinderPatternInfo=function(t){var n=t.getTopLeft(),r=t.getTopRight(),o=t.getBottomLeft(),i=this.calculateModuleSize(n,r,o);if(i<1)throw new Pr("No pattern found in proccess finder.");var a=e.computeDimension(n,r,o,i),s=Ca.getProvisionalVersionForDimension(a),u=s.getDimensionForVersion()-7,l=null;if(s.getAlignmentPatternCenters().length>0)for(var c=r.getX()-n.getX()+o.getX(),d=r.getY()-n.getY()+o.getY(),f=1-3/u,p=Math.floor(n.getX()+f*(c-n.getX())),h=Math.floor(n.getY()+f*(d-n.getY())),m=4;m<=16;m<<=1)try{l=this.findAlignmentInRegion(i,p,h,m);break}catch(e){if(!(e instanceof Pr))throw e}var v=e.createTransform(n,r,o,l,a),g=e.sampleGrid(this.image,v,a);return new go(g,null===l?[o,n,r]:[o,n,r,l])},e.createTransform=function(e,t,n,r,o){var i,a,s,u,l=o-3.5;return null!==r?(i=r.getX(),a=r.getY(),u=s=l-3):(i=t.getX()-e.getX()+n.getX(),a=t.getY()-e.getY()+n.getY(),s=l,u=l),Eo.quadrilateralToQuadrilateral(3.5,3.5,l,3.5,s,u,3.5,l,e.getX(),e.getY(),t.getX(),t.getY(),i,a,n.getX(),n.getY())},e.sampleGrid=function(e,t,n){return Co.getInstance().sampleGridWithTransform(e,n,n,t)},e.computeDimension=function(e,t,n,r){var o=ho.round(vo.distance(e,t)/r),i=ho.round(vo.distance(e,n)/r),a=Math.floor((o+i)/2)+7;switch(3&a){case 0:a++;break;case 2:a--;break;case 3:throw new Pr("Dimensions could be not found.")}return a},e.prototype.calculateModuleSize=function(e,t,n){return(this.calculateModuleSizeOneWay(e,t)+this.calculateModuleSizeOneWay(e,n))/2},e.prototype.calculateModuleSizeOneWay=function(e,t){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY())),r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?r/7:isNaN(r)?n/7:(n+r)/14},e.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,t,n,r){var o=this.sizeOfBlackWhiteBlackRun(e,t,n,r),i=1,a=e-(n-e);a<0?(i=e/(e-a),a=0):a>=this.image.getWidth()&&(i=(this.image.getWidth()-1-e)/(a-e),a=this.image.getWidth()-1);var s=Math.floor(t-(r-t)*i);return i=1,s<0?(i=t/(t-s),s=0):s>=this.image.getHeight()&&(i=(this.image.getHeight()-1-t)/(s-t),s=this.image.getHeight()-1),a=Math.floor(e+(a-e)*i),(o+=this.sizeOfBlackWhiteBlackRun(e,t,a,s))-1},e.prototype.sizeOfBlackWhiteBlackRun=function(e,t,n,r){var o=Math.abs(r-t)>Math.abs(n-e);if(o){var i=e;e=t,t=i,i=n,n=r,r=i}for(var a=Math.abs(n-e),s=Math.abs(r-t),u=-a/2,l=e<n?1:-1,c=t<r?1:-1,d=0,f=n+l,p=e,h=t;p!==f;p+=l){var m=o?h:p,v=o?p:h;if(1===d===this.image.get(m,v)){if(2===d)return ho.distance(p,h,e,t);d++}if((u+=s)>0){if(h===r)break;h+=c,u-=a}}return 2===d?ho.distance(n+l,r,e,t):NaN},e.prototype.findAlignmentInRegion=function(e,t,n,r){var o=Math.floor(r*e),i=Math.max(0,t-o),a=Math.min(this.image.getWidth()-1,t+o);if(a-i<3*e)throw new Pr("Alignment top exceeds estimated module size.");var s=Math.max(0,n-o),u=Math.min(this.image.getHeight()-1,n+o);if(u-s<3*e)throw new Pr("Alignment bottom exceeds estimated module size.");return new Va(this.image,i,s,a-i,u-s,e,this.resultPointCallback).find()},e}(),Ya=function(){function e(){this.decoder=new La}return e.prototype.getDecoder=function(){return this.decoder},e.prototype.decode=function(t,n){var r,o;if(null!=n&&void 0!==n.get(Er.PURE_BARCODE)){var i=e.extractPureBits(t.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,n),o=e.NO_POINTS}else{var a=new Xa(t.getBlackMatrix()).detect(n);r=this.decoder.decodeBitMatrix(a.getBits(),n),o=a.getPoints()}r.getOther()instanceof Pa&&r.getOther().applyMirroredCorrection(o);var s=new Kr(r.getText(),r.getRawBytes(),void 0,o,Jr.QR_CODE,void 0),u=r.getByteSegments();null!==u&&s.putMetadata(Qr.BYTE_SEGMENTS,u);var l=r.getECLevel();return null!==l&&s.putMetadata(Qr.ERROR_CORRECTION_LEVEL,l),r.hasStructuredAppend()&&(s.putMetadata(Qr.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),s.putMetadata(Qr.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),s},e.prototype.reset=function(){},e.extractPureBits=function(e){var t=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(null===t||null===n)throw new Pr;var r=this.moduleSize(t,e),o=t[1],i=n[1],a=t[0],s=n[0];if(a>=s||o>=i)throw new Pr;if(i-o!=s-a&&(s=a+(i-o))>=e.getWidth())throw new Pr;var u=Math.round((s-a+1)/r),l=Math.round((i-o+1)/r);if(u<=0||l<=0)throw new Pr;if(l!==u)throw new Pr;var c=Math.floor(r/2);o+=c;var d=(a+=c)+Math.floor((u-1)*r)-s;if(d>0){if(d>c)throw new Pr;a-=d}var f=o+Math.floor((l-1)*r)-i;if(f>0){if(f>c)throw new Pr;o-=f}for(var p=new jr(u,l),h=0;h<l;h++)for(var m=o+Math.floor(h*r),v=0;v<u;v++)e.get(a+Math.floor(v*r),m)&&p.set(v,h);return p},e.moduleSize=function(e,t){for(var n=t.getHeight(),r=t.getWidth(),o=e[0],i=e[1],a=!0,s=0;o<r&&i<n;){if(a!==t.get(o,i)){if(5==++s)break;a=!a}o++,i++}if(o===r||i===n)throw new Pr;return(o-e[0])/7},e.NO_POINTS=new Array,e}(),qa=function(){function e(){}return e.prototype.PDF417Common=function(){},e.getBitCountSum=function(e){return ho.sum(e)},e.toIntArray=function(t){var n,r;if(null==t||!t.length)return e.EMPTY_INT_ARRAY;var o=new Int32Array(t.length),i=0;try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),s=a.next();!s.done;s=a.next()){var u=s.value;o[i++]=u}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},e.getCodeword=function(t){var n=yr.binarySearch(e.SYMBOL_TABLE,262143&t);return n<0?-1:(e.CODEWORD_TABLE[n]-1)%e.NUMBER_OF_CODEWORDS},e.NUMBER_OF_CODEWORDS=929,e.MAX_CODEWORDS_IN_BARCODE=e.NUMBER_OF_CODEWORDS-1,e.MIN_ROWS_IN_BARCODE=3,e.MAX_ROWS_IN_BARCODE=90,e.MODULES_IN_CODEWORD=17,e.MODULES_IN_STOP_PATTERN=18,e.BARS_IN_MODULE=8,e.EMPTY_INT_ARRAY=new Int32Array([]),e.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),e.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),e}(),Ka=function(){function e(e,t){this.bits=e,this.points=t}return e.prototype.getBits=function(){return this.bits},e.prototype.getPoints=function(){return this.points},e}(),Za=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ja=function(){function e(){}return e.detectMultiple=function(t,n,r){var o=t.getBlackMatrix(),i=e.detect(r,o);return i.length||((o=o.clone()).rotate180(),i=e.detect(r,o)),new Ka(o,i)},e.detect=function(t,n){for(var r,o,i=new Array,a=0,s=0,u=!1;a<n.getHeight();){var l=e.findVertices(n,a,s);if(null!=l[0]||null!=l[3]){if(u=!0,i.push(l),!t)break;null!=l[2]?(s=Math.trunc(l[2].getX()),a=Math.trunc(l[2].getY())):(s=Math.trunc(l[4].getX()),a=Math.trunc(l[4].getY()))}else{if(!u)break;u=!1,s=0;try{for(var c=(r=void 0,Za(i)),d=c.next();!d.done;d=c.next()){var f=d.value;null!=f[1]&&(a=Math.trunc(Math.max(a,f[1].getY()))),null!=f[3]&&(a=Math.max(a,Math.trunc(f[3].getY())))}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}a+=e.ROW_STEP}}return i},e.findVertices=function(t,n,r){var o=t.getHeight(),i=t.getWidth(),a=new Array(8);return e.copyToResult(a,e.findRowsWithPattern(t,o,i,n,r,e.START_PATTERN),e.INDEXES_START_PATTERN),null!=a[4]&&(r=Math.trunc(a[4].getX()),n=Math.trunc(a[4].getY())),e.copyToResult(a,e.findRowsWithPattern(t,o,i,n,r,e.STOP_PATTERN),e.INDEXES_STOP_PATTERN),a},e.copyToResult=function(e,t,n){for(var r=0;r<n.length;r++)e[n[r]]=t[r]},e.findRowsWithPattern=function(t,n,r,o,i,a){for(var s=new Array(4),u=!1,l=new Int32Array(a.length);o<n;o+=e.ROW_STEP)if(null!=(p=e.findGuardPattern(t,i,o,r,!1,a,l))){for(;o>0;){if(null==(f=e.findGuardPattern(t,i,--o,r,!1,a,l))){o++;break}p=f}s[0]=new vo(p[0],o),s[1]=new vo(p[1],o),u=!0;break}var c=o+1;if(u){for(var d=0,f=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);c<n;c++){var p;if(null!=(p=e.findGuardPattern(t,f[0],c,r,!1,a,l))&&Math.abs(f[0]-p[0])<e.MAX_PATTERN_DRIFT&&Math.abs(f[1]-p[1])<e.MAX_PATTERN_DRIFT)f=p,d=0;else{if(d>e.SKIPPED_ROW_COUNT_MAX)break;d++}}c-=d+1,s[2]=new vo(f[0],c),s[3]=new vo(f[1],c)}return c-o<e.BARCODE_MIN_HEIGHT&&yr.fill(s,null),s},e.findGuardPattern=function(t,n,r,o,i,a,s){yr.fillWithin(s,0,s.length,0);for(var u=n,l=0;t.get(u,r)&&u>0&&l++<e.MAX_PIXEL_DRIFT;)u--;for(var c=u,d=0,f=a.length,p=i;c<o;c++)if(t.get(c,r)!==p)s[d]++;else{if(d===f-1){if(e.patternMatchVariance(s,a,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return new Int32Array([u,c]);u+=s[0]+s[1],pr.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,p=!p}return d===f-1&&e.patternMatchVariance(s,a,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE?new Int32Array([u,c-1]):null},e.patternMatchVariance=function(e,t,n){for(var r=e.length,o=0,i=0,a=0;a<r;a++)o+=e[a],i+=t[a];if(o<i)return 1/0;var s=o/i;n*=s;for(var u=0,l=0;l<r;l++){var c=e[l],d=t[l]*s,f=c>d?c-d:d-c;if(f>n)return 1/0;u+=f}return u/o},e.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),e.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),e.MAX_AVG_VARIANCE=.42,e.MAX_INDIVIDUAL_VARIANCE=.8,e.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),e.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),e.MAX_PIXEL_DRIFT=3,e.MAX_PATTERN_DRIFT=5,e.SKIPPED_ROW_COUNT_MAX=25,e.ROW_STEP=5,e.BARCODE_MIN_HEIGHT=10,e}(),$a=function(){function e(e,t){if(0===t.length)throw new ur;this.field=e;var n=t.length;if(n>1&&0===t[0]){for(var r=1;r<n&&0===t[r];)r++;r===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-r),pr.arraycopy(t,r,this.coefficients,0,this.coefficients.length))}else this.coefficients=t}return e.prototype.getCoefficients=function(){return this.coefficients},e.prototype.getDegree=function(){return this.coefficients.length-1},e.prototype.isZero=function(){return 0===this.coefficients[0]},e.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},e.prototype.evaluateAt=function(e){var t,n;if(0===e)return this.getCoefficient(0);if(1===e){var r=0;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.coefficients),i=o.next();!i.done;i=o.next()){var a=i.value;r=this.field.add(r,a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}for(var s=this.coefficients[0],u=this.coefficients.length,l=1;l<u;l++)s=this.field.add(this.field.multiply(e,s),this.coefficients[l]);return s},e.prototype.add=function(t){if(!this.field.equals(t.field))throw new ur("ModulusPolys do not have same ModulusGF field");if(this.isZero())return t;if(t.isZero())return this;var n=this.coefficients,r=t.coefficients;if(n.length>r.length){var o=n;n=r,r=o}var i=new Int32Array(r.length),a=r.length-n.length;pr.arraycopy(r,0,i,0,a);for(var s=a;s<r.length;s++)i[s]=this.field.add(n[s-a],r[s]);return new e(this.field,i)},e.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new ur("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())},e.prototype.multiply=function(t){return t instanceof e?this.multiplyOther(t):this.multiplyScalar(t)},e.prototype.multiplyOther=function(t){if(!this.field.equals(t.field))throw new ur("ModulusPolys do not have same ModulusGF field");if(this.isZero()||t.isZero())return new e(this.field,new Int32Array([0]));for(var n=this.coefficients,r=n.length,o=t.coefficients,i=o.length,a=new Int32Array(r+i-1),s=0;s<r;s++)for(var u=n[s],l=0;l<i;l++)a[s+l]=this.field.add(a[s+l],this.field.multiply(u,o[l]));return new e(this.field,a)},e.prototype.negative=function(){for(var t=this.coefficients.length,n=new Int32Array(t),r=0;r<t;r++)n[r]=this.field.subtract(0,this.coefficients[r]);return new e(this.field,n)},e.prototype.multiplyScalar=function(t){if(0===t)return new e(this.field,new Int32Array([0]));if(1===t)return this;for(var n=this.coefficients.length,r=new Int32Array(n),o=0;o<n;o++)r[o]=this.field.multiply(this.coefficients[o],t);return new e(this.field,r)},e.prototype.multiplyByMonomial=function(t,n){if(t<0)throw new ur;if(0===n)return new e(this.field,new Int32Array([0]));for(var r=this.coefficients.length,o=new Int32Array(r+t),i=0;i<r;i++)o[i]=this.field.multiply(this.coefficients[i],n);return new e(this.field,o)},e.prototype.toString=function(){for(var e=new Rr,t=this.getDegree();t>=0;t--){var n=this.getCoefficient(t);0!==n&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),0!==t&&1===n||e.append(n),0!==t&&(1===t?e.append("x"):(e.append("x^"),e.append(t))))}return e.toString()},e}(),Qa=function(){function e(){}return e.prototype.add=function(e,t){return(e+t)%this.modulus},e.prototype.subtract=function(e,t){return(this.modulus+e-t)%this.modulus},e.prototype.exp=function(e){return this.expTable[e]},e.prototype.log=function(e){if(0===e)throw new ur;return this.logTable[e]},e.prototype.inverse=function(e){if(0===e)throw new oo;return this.expTable[this.modulus-this.logTable[e]-1]},e.prototype.multiply=function(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.modulus-1)]},e.prototype.getSize=function(){return this.modulus},e.prototype.equals=function(e){return e===this},e}(),es=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ts=function(e){function t(t,n){var r=e.call(this)||this;r.modulus=t,r.expTable=new Int32Array(t),r.logTable=new Int32Array(t);for(var o=1,i=0;i<t;i++)r.expTable[i]=o,o=o*n%t;for(i=0;i<t-1;i++)r.logTable[r.expTable[i]]=i;return r.zero=new $a(r,new Int32Array([0])),r.one=new $a(r,new Int32Array([1])),r}return es(t,e),t.prototype.getZero=function(){return this.zero},t.prototype.getOne=function(){return this.one},t.prototype.buildMonomial=function(e,t){if(e<0)throw new ur;if(0===t)return this.zero;var n=new Int32Array(e+1);return n[0]=t,new $a(this,n)},t.PDF417_GF=new t(qa.NUMBER_OF_CODEWORDS,3),t}(Qa),ns=function(){function e(){this.field=ts.PDF417_GF}return e.prototype.decode=function(e,t,n){for(var r,o,i=new $a(this.field,e),a=new Int32Array(t),s=!1,u=t;u>0;u--){var l=i.evaluateAt(this.field.exp(u));a[t-u]=l,0!==l&&(s=!0)}if(!s)return 0;var c=this.field.getOne();if(null!=n)try{for(var d=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),f=d.next();!f.done;f=d.next()){var p=f.value,h=this.field.exp(e.length-1-p),m=new $a(this.field,new Int32Array([this.field.subtract(0,h),1]));c=c.multiply(m)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}var v=new $a(this.field,a),g=this.runEuclideanAlgorithm(this.field.buildMonomial(t,1),v,t),y=g[0],w=g[1],b=this.findErrorLocations(y),_=this.findErrorMagnitudes(w,y,b);for(u=0;u<b.length;u++){var E=e.length-1-this.field.log(b[u]);if(E<0)throw dr.getChecksumInstance();e[E]=this.field.subtract(e[E],_[u])}return b.length},e.prototype.runEuclideanAlgorithm=function(e,t,n){if(e.getDegree()<t.getDegree()){var r=e;e=t,t=r}for(var o=e,i=t,a=this.field.getZero(),s=this.field.getOne();i.getDegree()>=Math.round(n/2);){var u=o,l=a;if(a=s,(o=i).isZero())throw dr.getChecksumInstance();i=u;for(var c=this.field.getZero(),d=o.getCoefficient(o.getDegree()),f=this.field.inverse(d);i.getDegree()>=o.getDegree()&&!i.isZero();){var p=i.getDegree()-o.getDegree(),h=this.field.multiply(i.getCoefficient(i.getDegree()),f);c=c.add(this.field.buildMonomial(p,h)),i=i.subtract(o.multiplyByMonomial(p,h))}s=c.multiply(a).subtract(l).negative()}var m=s.getCoefficient(0);if(0===m)throw dr.getChecksumInstance();var v=this.field.inverse(m);return[s.multiply(v),i.multiply(v)]},e.prototype.findErrorLocations=function(e){for(var t=e.getDegree(),n=new Int32Array(t),r=0,o=1;o<this.field.getSize()&&r<t;o++)0===e.evaluateAt(o)&&(n[r]=this.field.inverse(o),r++);if(r!==t)throw dr.getChecksumInstance();return n},e.prototype.findErrorMagnitudes=function(e,t,n){for(var r=t.getDegree(),o=new Int32Array(r),i=1;i<=r;i++)o[r-i]=this.field.multiply(i,t.getCoefficient(i));var a=new $a(this.field,o),s=n.length,u=new Int32Array(s);for(i=0;i<s;i++){var l=this.field.inverse(n[i]),c=this.field.subtract(0,e.evaluateAt(l)),d=this.field.inverse(a.evaluateAt(l));u[i]=this.field.multiply(c,d)}return u},e}(),rs=function(){function e(t,n,r,o,i){t instanceof e?this.constructor_2(t):this.constructor_1(t,n,r,o,i)}return e.prototype.constructor_1=function(e,t,n,r,o){var i=null==t||null==n,a=null==r||null==o;if(i&&a)throw new Pr;i?(t=new vo(0,r.getY()),n=new vo(0,o.getY())):a&&(r=new vo(e.getWidth()-1,t.getY()),o=new vo(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=t,this.bottomLeft=n,this.topRight=r,this.bottomRight=o,this.minX=Math.trunc(Math.min(t.getX(),n.getX())),this.maxX=Math.trunc(Math.max(r.getX(),o.getX())),this.minY=Math.trunc(Math.min(t.getY(),r.getY())),this.maxY=Math.trunc(Math.max(n.getY(),o.getY()))},e.prototype.constructor_2=function(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()},e.merge=function(t,n){return null==t?n:null==n?t:new e(t.image,t.topLeft,t.bottomLeft,n.topRight,n.bottomRight)},e.prototype.addMissingRows=function(t,n,r){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(t>0){var u=r?this.topLeft:this.topRight,l=Math.trunc(u.getY()-t);l<0&&(l=0);var c=new vo(u.getX(),l);r?o=c:a=c}if(n>0){var d=r?this.bottomLeft:this.bottomRight,f=Math.trunc(d.getY()+n);f>=this.image.getHeight()&&(f=this.image.getHeight()-1);var p=new vo(d.getX(),f);r?i=p:s=p}return new e(this.image,o,i,a,s)},e.prototype.getMinX=function(){return this.minX},e.prototype.getMaxX=function(){return this.maxX},e.prototype.getMinY=function(){return this.minY},e.prototype.getMaxY=function(){return this.maxY},e.prototype.getTopLeft=function(){return this.topLeft},e.prototype.getTopRight=function(){return this.topRight},e.prototype.getBottomLeft=function(){return this.bottomLeft},e.prototype.getBottomRight=function(){return this.bottomRight},e}(),os=function(){function e(e,t,n,r){this.columnCount=e,this.errorCorrectionLevel=r,this.rowCountUpperPart=t,this.rowCountLowerPart=n,this.rowCount=t+n}return e.prototype.getColumnCount=function(){return this.columnCount},e.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},e.prototype.getRowCount=function(){return this.rowCount},e.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},e.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},e}(),is=function(){function e(){this.buffer=""}return e.form=function(e,t){var n=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(e,r,o,i,a,s){if("%%"===e)return"%";if(void 0!==t[++n]){e=i?parseInt(i.substr(1)):void 0;var u,l=a?parseInt(a.substr(1)):void 0;switch(s){case"s":u=t[n];break;case"c":u=t[n][0];break;case"f":u=parseFloat(t[n]).toFixed(e);break;case"p":u=parseFloat(t[n]).toPrecision(e);break;case"e":u=parseFloat(t[n]).toExponential(e);break;case"x":u=parseInt(t[n]).toString(l||16);break;case"d":u=parseFloat(parseInt(t[n],l||10).toPrecision(e)).toFixed(0)}u="object"==typeof u?JSON.stringify(u):(+u).toString(l);for(var c=parseInt(o),d=o&&o[0]+""=="0"?"0":" ";u.length<c;)u=void 0!==r?u+d:d+u;return u}}))},e.prototype.format=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.buffer+=e.form(t,n)},e.prototype.toString=function(){return this.buffer},e}(),as=function(){function e(e){this.boundingBox=new rs(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return e.prototype.getCodewordNearby=function(t){var n=this.getCodeword(t);if(null!=n)return n;for(var r=1;r<e.MAX_NEARBY_DISTANCE;r++){var o=this.imageRowToCodewordIndex(t)-r;if(o>=0&&null!=(n=this.codewords[o]))return n;if((o=this.imageRowToCodewordIndex(t)+r)<this.codewords.length&&null!=(n=this.codewords[o]))return n}return null},e.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()},e.prototype.setCodeword=function(e,t){this.codewords[this.imageRowToCodewordIndex(e)]=t},e.prototype.getCodeword=function(e){return this.codewords[this.imageRowToCodewordIndex(e)]},e.prototype.getBoundingBox=function(){return this.boundingBox},e.prototype.getCodewords=function(){return this.codewords},e.prototype.toString=function(){var e,t,n=new is,r=0;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.codewords),i=o.next();!i.done;i=o.next()){var a=i.value;null!=a?n.format("%3d: %3d|%3d%n",r++,a.getRowNumber(),a.getValue()):n.format("%3d:    |   %n",r++)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n.toString()},e.MAX_NEARBY_DISTANCE=5,e}(),ss=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},us=function(){function e(){this.values=new Map}return e.prototype.setValue=function(e){e=Math.trunc(e);var t=this.values.get(e);null==t&&(t=0),t++,this.values.set(e,t)},e.prototype.getValue=function(){var e,t,n=-1,r=new Array,o=function(e,t){var o=function(){return e},i=function(){return t};i()>n?(n=i(),(r=[]).push(o())):i()===n&&r.push(o())};try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.values.entries()),a=i.next();!a.done;a=i.next()){var s=ss(a.value,2);o(s[0],s[1])}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return qa.toIntArray(r)},e.prototype.getConfidence=function(e){return this.values.get(e)},e}(),ls=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cs=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ds=function(e){function t(t,n){var r=e.call(this,t)||this;return r._isLeft=n,r}return ls(t,e),t.prototype.setRowNumbers=function(){var e,t;try{for(var n=cs(this.getCodewords()),r=n.next();!r.done;r=n.next()){var o=r.value;null!=o&&o.setRowNumberAsRowIndicatorColumn()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t.prototype.adjustCompleteIndicatorColumnRowNumbers=function(e){var t=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(t,e);for(var n=this.getBoundingBox(),r=this._isLeft?n.getTopLeft():n.getTopRight(),o=this._isLeft?n.getBottomLeft():n.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=-1,u=1,l=0,c=i;c<a;c++)if(null!=t[c]){var d=t[c],f=d.getRowNumber()-s;if(0===f)l++;else if(1===f)u=Math.max(u,l),l=1,s=d.getRowNumber();else if(f<0||d.getRowNumber()>=e.getRowCount()||f>c)t[c]=null;else{for(var p,h=(p=u>2?(u-2)*f:f)>=c,m=1;m<=p&&!h;m++)h=null!=t[c-m];h?t[c]=null:(s=d.getRowNumber(),l=1)}}},t.prototype.getRowHeights=function(){var e,t,n=this.getBarcodeMetadata();if(null==n)return null;this.adjustIncompleteIndicatorColumnRowNumbers(n);var r=new Int32Array(n.getRowCount());try{for(var o=cs(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){var s=a.getRowNumber();if(s>=r.length)continue;r[s]++}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return r},t.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(e){for(var t=this.getBoundingBox(),n=this._isLeft?t.getTopLeft():t.getTopRight(),r=this._isLeft?t.getBottomLeft():t.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),a=this.getCodewords(),s=-1,u=o;u<i;u++)if(null!=a[u]){var l=a[u];l.setRowNumberAsRowIndicatorColumn();var c=l.getRowNumber()-s;0===c||(1===c?s=l.getRowNumber():l.getRowNumber()>=e.getRowCount()?a[u]=null:s=l.getRowNumber())}},t.prototype.getBarcodeMetadata=function(){var e,t,n=this.getCodewords(),r=new us,o=new us,i=new us,a=new us;try{for(var s=cs(n),u=s.next();!u.done;u=s.next()){var l=u.value;if(null!=l){l.setRowNumberAsRowIndicatorColumn();var c=l.getValue()%30,d=l.getRowNumber();switch(this._isLeft||(d+=2),d%3){case 0:o.setValue(3*c+1);break;case 1:a.setValue(c/3),i.setValue(c%3);break;case 2:r.setValue(c+1)}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}if(0===r.getValue().length||0===o.getValue().length||0===i.getValue().length||0===a.getValue().length||r.getValue()[0]<1||o.getValue()[0]+i.getValue()[0]<qa.MIN_ROWS_IN_BARCODE||o.getValue()[0]+i.getValue()[0]>qa.MAX_ROWS_IN_BARCODE)return null;var f=new os(r.getValue()[0],o.getValue()[0],i.getValue()[0],a.getValue()[0]);return this.removeIncorrectCodewords(n,f),f},t.prototype.removeIncorrectCodewords=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(null!=e[n]){var o=r.getValue()%30,i=r.getRowNumber();if(i>t.getRowCount())e[n]=null;else switch(this._isLeft||(i+=2),i%3){case 0:3*o+1!==t.getRowCountUpperPart()&&(e[n]=null);break;case 1:Math.trunc(o/3)===t.getErrorCorrectionLevel()&&o%3===t.getRowCountLowerPart()||(e[n]=null);break;case 2:o+1!==t.getColumnCount()&&(e[n]=null)}}}},t.prototype.isLeft=function(){return this._isLeft},t.prototype.toString=function(){return"IsLeft: "+this._isLeft+"\n"+e.prototype.toString.call(this)},t}(as),fs=function(){function e(e,t){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=t,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return e.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var e,t=qa.MAX_CODEWORDS_IN_BARCODE;do{e=t,t=this.adjustRowNumbersAndGetCount()}while(t>0&&t<e);return this.detectionResultColumns},e.prototype.adjustIndicatorColumnRowNumbers=function(e){null!=e&&e.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},e.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(0===e)return 0;for(var t=1;t<this.barcodeColumnCount+1;t++)for(var n=this.detectionResultColumns[t].getCodewords(),r=0;r<n.length;r++)null!=n[r]&&(n[r].hasValidRowNumber()||this.adjustRowNumbers(t,r,n));return e},e.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},e.prototype.adjustRowNumbersFromBothRI=function(){if(null!=this.detectionResultColumns[0]&&null!=this.detectionResultColumns[this.barcodeColumnCount+1])for(var e=this.detectionResultColumns[0].getCodewords(),t=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(null!=e[n]&&null!=t[n]&&e[n].getRowNumber()===t[n].getRowNumber())for(var r=1;r<=this.barcodeColumnCount;r++){var o=this.detectionResultColumns[r].getCodewords()[n];null!=o&&(o.setRowNumber(e[n].getRowNumber()),o.hasValidRowNumber()||(this.detectionResultColumns[r].getCodewords()[n]=null))}},e.prototype.adjustRowNumbersFromRRI=function(){if(null==this.detectionResultColumns[this.barcodeColumnCount+1])return 0;for(var t=0,n=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<n.length;r++)if(null!=n[r])for(var o=n[r].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[r];null!=s&&(i=e.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||t++)}return t},e.prototype.adjustRowNumbersFromLRI=function(){if(null==this.detectionResultColumns[0])return 0;for(var t=0,n=this.detectionResultColumns[0].getCodewords(),r=0;r<n.length;r++)if(null!=n[r])for(var o=n[r].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[r];null!=s&&(i=e.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||t++)}return t},e.adjustRowNumberIfValid=function(e,t,n){return null==n||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),t=0):++t),t},e.prototype.adjustRowNumbers=function(t,n,r){var o,i,a=r[n],s=this.detectionResultColumns[t-1].getCodewords(),u=s;null!=this.detectionResultColumns[t+1]&&(u=this.detectionResultColumns[t+1].getCodewords());var l=new Array(14);l[2]=s[n],l[3]=u[n],n>0&&(l[0]=r[n-1],l[4]=s[n-1],l[5]=u[n-1]),n>1&&(l[8]=r[n-2],l[10]=s[n-2],l[11]=u[n-2]),n<r.length-1&&(l[1]=r[n+1],l[6]=s[n+1],l[7]=u[n+1]),n<r.length-2&&(l[9]=r[n+2],l[12]=s[n+2],l[13]=u[n+2]);try{for(var c=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(l),d=c.next();!d.done;d=c.next()){var f=d.value;if(e.adjustRowNumber(a,f))return}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}},e.adjustRowNumber=function(e,t){return null!=t&&!(!t.hasValidRowNumber()||t.getBucket()!==e.getBucket())&&(e.setRowNumber(t.getRowNumber()),!0)},e.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},e.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},e.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},e.prototype.setBoundingBox=function(e){this.boundingBox=e},e.prototype.getBoundingBox=function(){return this.boundingBox},e.prototype.setDetectionResultColumn=function(e,t){this.detectionResultColumns[e]=t},e.prototype.getDetectionResultColumn=function(e){return this.detectionResultColumns[e]},e.prototype.toString=function(){var e=this.detectionResultColumns[0];null==e&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var t=new is,n=0;n<e.getCodewords().length;n++){t.format("CW %3d:",n);for(var r=0;r<this.barcodeColumnCount+2;r++)if(null!=this.detectionResultColumns[r]){var o=this.detectionResultColumns[r].getCodewords()[n];null!=o?t.format(" %3d|%3d",o.getRowNumber(),o.getValue()):t.format("    |   ")}else t.format("    |   ");t.format("%n")}return t.toString()},e}(),ps=function(){function e(t,n,r,o){this.rowNumber=e.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(t),this.endX=Math.trunc(n),this.bucket=Math.trunc(r),this.value=Math.trunc(o)}return e.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},e.prototype.isValidRowNumber=function(t){return t!==e.BARCODE_ROW_UNKNOWN&&this.bucket===t%3*3},e.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},e.prototype.getWidth=function(){return this.endX-this.startX},e.prototype.getStartX=function(){return this.startX},e.prototype.getEndX=function(){return this.endX},e.prototype.getBucket=function(){return this.bucket},e.prototype.getValue=function(){return this.value},e.prototype.getRowNumber=function(){return this.rowNumber},e.prototype.setRowNumber=function(e){this.rowNumber=e},e.prototype.toString=function(){return this.rowNumber+"|"+this.value},e.BARCODE_ROW_UNKNOWN=-1,e}(),hs=function(){function e(){}return e.initialize=function(){for(var t=0;t<qa.SYMBOL_TABLE.length;t++)for(var n=qa.SYMBOL_TABLE[t],r=1&n,o=0;o<qa.BARS_IN_MODULE;o++){for(var i=0;(1&n)===r;)i+=1,n>>=1;r=1&n,e.RATIOS_TABLE[t]||(e.RATIOS_TABLE[t]=new Array(qa.BARS_IN_MODULE)),e.RATIOS_TABLE[t][qa.BARS_IN_MODULE-o-1]=Math.fround(i/qa.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},e.getDecodedValue=function(t){var n=e.getDecodedCodewordValue(e.sampleBitCounts(t));return-1!==n?n:e.getClosestDecodedValue(t)},e.sampleBitCounts=function(e){for(var t=ho.sum(e),n=new Int32Array(qa.BARS_IN_MODULE),r=0,o=0,i=0;i<qa.MODULES_IN_CODEWORD;i++){var a=t/(2*qa.MODULES_IN_CODEWORD)+i*t/qa.MODULES_IN_CODEWORD;o+e[r]<=a&&(o+=e[r],r++),n[r]++}return n},e.getDecodedCodewordValue=function(t){var n=e.getBitValue(t);return-1===qa.getCodeword(n)?-1:n},e.getBitValue=function(e){for(var t=0,n=0;n<e.length;n++)for(var r=0;r<e[n];r++)t=t<<1|(n%2==0?1:0);return Math.trunc(t)},e.getClosestDecodedValue=function(t){var n=ho.sum(t),r=new Array(qa.BARS_IN_MODULE);if(n>1)for(var o=0;o<r.length;o++)r[o]=Math.fround(t[o]/n);var i=mo.MAX_VALUE,a=-1;this.bSymbolTableReady||e.initialize();for(var s=0;s<e.RATIOS_TABLE.length;s++){for(var u=0,l=e.RATIOS_TABLE[s],c=0;c<qa.BARS_IN_MODULE;c++){var d=Math.fround(l[c]-r[c]);if((u+=Math.fround(d*d))>=i)break}u<i&&(i=u,a=qa.SYMBOL_TABLE[s])}return a},e.bSymbolTableReady=!1,e.RATIOS_TABLE=new Array(qa.SYMBOL_TABLE.length).map((function(e){return new Array(qa.BARS_IN_MODULE)})),e}(),ms=function(){function e(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return e.prototype.getSegmentIndex=function(){return this.segmentIndex},e.prototype.setSegmentIndex=function(e){this.segmentIndex=e},e.prototype.getFileId=function(){return this.fileId},e.prototype.setFileId=function(e){this.fileId=e},e.prototype.getOptionalData=function(){return this.optionalData},e.prototype.setOptionalData=function(e){this.optionalData=e},e.prototype.isLastSegment=function(){return this.lastSegment},e.prototype.setLastSegment=function(e){this.lastSegment=e},e.prototype.getSegmentCount=function(){return this.segmentCount},e.prototype.setSegmentCount=function(e){this.segmentCount=e},e.prototype.getSender=function(){return this.sender||null},e.prototype.setSender=function(e){this.sender=e},e.prototype.getAddressee=function(){return this.addressee||null},e.prototype.setAddressee=function(e){this.addressee=e},e.prototype.getFileName=function(){return this.fileName},e.prototype.setFileName=function(e){this.fileName=e},e.prototype.getFileSize=function(){return this.fileSize},e.prototype.setFileSize=function(e){this.fileSize=e},e.prototype.getChecksum=function(){return this.checksum},e.prototype.setChecksum=function(e){this.checksum=e},e.prototype.getTimestamp=function(){return this.timestamp},e.prototype.setTimestamp=function(e){this.timestamp=e},e}(),vs=function(){function e(){}return e.parseLong=function(e,t){return void 0===t&&(t=void 0),parseInt(e,t)},e}(),gs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ys=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gs(t,e),t.kind="NullPointerException",t}(or),ws=function(){function e(){}return e.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},e.prototype.writeBytesOffset=function(e,t,n){if(null==e)throw new ys;if(t<0||t>e.length||n<0||t+n>e.length||t+n<0)throw new mr;if(0!==n)for(var r=0;r<n;r++)this.write(e[t+r])},e.prototype.flush=function(){},e.prototype.close=function(){},e}(),bs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return bs(t,e),t}(or),Es=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),xs=function(e){function t(t){void 0===t&&(t=32);var n=e.call(this)||this;if(n.count=0,t<0)throw new ur("Negative initial size: "+t);return n.buf=new Uint8Array(t),n}return Es(t,e),t.prototype.ensureCapacity=function(e){e-this.buf.length>0&&this.grow(e)},t.prototype.grow=function(e){var t=this.buf.length<<1;if(t-e<0&&(t=e),t<0){if(e<0)throw new _s;t=wr.MAX_VALUE}this.buf=yr.copyOfUint8Array(this.buf,t)},t.prototype.write=function(e){this.ensureCapacity(this.count+1),this.buf[this.count]=e,this.count+=1},t.prototype.writeBytesOffset=function(e,t,n){if(t<0||t>e.length||n<0||t+n-e.length>0)throw new mr;this.ensureCapacity(this.count+n),pr.arraycopy(e,t,this.buf,this.count,n),this.count+=n},t.prototype.writeTo=function(e){e.writeBytesOffset(this.buf,0,this.count)},t.prototype.reset=function(){this.count=0},t.prototype.toByteArray=function(){return yr.copyOfUint8Array(this.buf,this.count)},t.prototype.size=function(){return this.count},t.prototype.toString=function(e){return e?"string"==typeof e?this.toString_string(e):this.toString_number(e):this.toString_void()},t.prototype.toString_void=function(){return new String(this.buf).toString()},t.prototype.toString_string=function(e){return new String(this.buf).toString()},t.prototype.toString_number=function(e){return new String(this.buf).toString()},t.prototype.close=function(){},t}(ws);function Ss(){if("undefined"!=typeof window)return window.BigInt||null;if("undefined"!=typeof n.g)return n.g.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function Cs(e){if(void 0===Ra&&(Ra=Ss()),null===Ra)throw new Error("BigInt is not supported!");return Ra(e)}!function(e){e[e.ALPHA=0]="ALPHA",e[e.LOWER=1]="LOWER",e[e.MIXED=2]="MIXED",e[e.PUNCT=3]="PUNCT",e[e.ALPHA_SHIFT=4]="ALPHA_SHIFT",e[e.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(ka||(ka={}));var Is=function(){function e(){}return e.decode=function(t,n){var r=new Rr(""),o=Ar.ISO8859_1;r.enableDecoding(o);for(var i=1,a=t[i++],s=new ms;i<t[0];){switch(a){case e.TEXT_COMPACTION_MODE_LATCH:i=e.textCompaction(t,i,r);break;case e.BYTE_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH_6:i=e.byteCompaction(a,t,o,i,r);break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(t[i++]);break;case e.NUMERIC_COMPACTION_MODE_LATCH:i=e.numericCompaction(t,i,r);break;case e.ECI_CHARSET:Ar.getCharacterSetECIByValue(t[i++]);break;case e.ECI_GENERAL_PURPOSE:i+=2;break;case e.ECI_USER_DEFINED:i++;break;case e.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=e.decodeMacroBlock(t,i,s);break;case e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case e.MACRO_PDF417_TERMINATOR:throw new Sr;default:i--,i=e.textCompaction(t,i,r)}if(!(i<t.length))throw Sr.getFormatInstance();a=t[i++]}if(0===r.length())throw Sr.getFormatInstance();var u=new eo(null,r.toString(),null,n);return u.setOther(s),u},e.decodeMacroBlock=function(t,n,r){if(n+e.NUMBER_OF_SEQUENCE_CODEWORDS>t[0])throw Sr.getFormatInstance();for(var o=new Int32Array(e.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<e.NUMBER_OF_SEQUENCE_CODEWORDS;i++,n++)o[i]=t[n];r.setSegmentIndex(wr.parseInt(e.decodeBase900toBase10(o,e.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new Rr;n=e.textCompaction(t,n,a),r.setFileId(a.toString());var s=-1;for(t[n]===e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=n+1);n<t[0];)switch(t[n]){case e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(t[++n]){case e.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var u=new Rr;n=e.textCompaction(t,n+1,u),r.setFileName(u.toString());break;case e.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var l=new Rr;n=e.textCompaction(t,n+1,l),r.setSender(l.toString());break;case e.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var c=new Rr;n=e.textCompaction(t,n+1,c),r.setAddressee(c.toString());break;case e.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new Rr;n=e.numericCompaction(t,n+1,d),r.setSegmentCount(wr.parseInt(d.toString()));break;case e.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var f=new Rr;n=e.numericCompaction(t,n+1,f),r.setTimestamp(vs.parseLong(f.toString()));break;case e.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var p=new Rr;n=e.numericCompaction(t,n+1,p),r.setChecksum(wr.parseInt(p.toString()));break;case e.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var h=new Rr;n=e.numericCompaction(t,n+1,h),r.setFileSize(vs.parseLong(h.toString()));break;default:throw Sr.getFormatInstance()}break;case e.MACRO_PDF417_TERMINATOR:n++,r.setLastSegment(!0);break;default:throw Sr.getFormatInstance()}if(-1!==s){var m=n-s;r.isLastSegment()&&m--,r.setOptionalData(yr.copyOfRange(t,s,s+m))}return n},e.textCompaction=function(t,n,r){for(var o=new Int32Array(2*(t[0]-n)),i=new Int32Array(2*(t[0]-n)),a=0,s=!1;n<t[0]&&!s;){var u=t[n++];if(u<e.TEXT_COMPACTION_MODE_LATCH)o[a]=u/30,o[a+1]=u%30,a+=2;else switch(u){case e.TEXT_COMPACTION_MODE_LATCH:o[a++]=e.TEXT_COMPACTION_MODE_LATCH;break;case e.BYTE_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH_6:case e.NUMERIC_COMPACTION_MODE_LATCH:case e.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case e.MACRO_PDF417_TERMINATOR:n--,s=!0;break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,u=t[n++],i[a]=u,a++}}return e.decodeTextCompaction(o,i,a,r),n},e.decodeTextCompaction=function(t,n,r,o){for(var i=ka.ALPHA,a=ka.ALPHA,s=0;s<r;){var u=t[s],l="";switch(i){case ka.ALPHA:if(u<26)l=String.fromCharCode(65+u);else switch(u){case 26:l=" ";break;case e.LL:i=ka.LOWER;break;case e.ML:i=ka.MIXED;break;case e.PS:a=i,i=ka.PUNCT_SHIFT;break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case e.TEXT_COMPACTION_MODE_LATCH:i=ka.ALPHA}break;case ka.LOWER:if(u<26)l=String.fromCharCode(97+u);else switch(u){case 26:l=" ";break;case e.AS:a=i,i=ka.ALPHA_SHIFT;break;case e.ML:i=ka.MIXED;break;case e.PS:a=i,i=ka.PUNCT_SHIFT;break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case e.TEXT_COMPACTION_MODE_LATCH:i=ka.ALPHA}break;case ka.MIXED:if(u<e.PL)l=e.MIXED_CHARS[u];else switch(u){case e.PL:i=ka.PUNCT;break;case 26:l=" ";break;case e.LL:i=ka.LOWER;break;case e.AL:i=ka.ALPHA;break;case e.PS:a=i,i=ka.PUNCT_SHIFT;break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case e.TEXT_COMPACTION_MODE_LATCH:i=ka.ALPHA}break;case ka.PUNCT:if(u<e.PAL)l=e.PUNCT_CHARS[u];else switch(u){case e.PAL:i=ka.ALPHA;break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case e.TEXT_COMPACTION_MODE_LATCH:i=ka.ALPHA}break;case ka.ALPHA_SHIFT:if(i=a,u<26)l=String.fromCharCode(65+u);else switch(u){case 26:l=" ";break;case e.TEXT_COMPACTION_MODE_LATCH:i=ka.ALPHA}break;case ka.PUNCT_SHIFT:if(i=a,u<e.PAL)l=e.PUNCT_CHARS[u];else switch(u){case e.PAL:i=ka.ALPHA;break;case e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case e.TEXT_COMPACTION_MODE_LATCH:i=ka.ALPHA}}""!==l&&o.append(l),s++}},e.byteCompaction=function(t,n,r,o,i){var a=new xs,s=0,u=0,l=!1;switch(t){case e.BYTE_COMPACTION_MODE_LATCH:for(var c=new Int32Array(6),d=n[o++];o<n[0]&&!l;)switch(c[s++]=d,u=900*u+d,d=n[o++]){case e.TEXT_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH:case e.NUMERIC_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH_6:case e.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case e.MACRO_PDF417_TERMINATOR:o--,l=!0;break;default:if(s%5==0&&s>0){for(var f=0;f<6;++f)a.write(Number(Cs(u)>>Cs(8*(5-f))));u=0,s=0}}o===n[0]&&d<e.TEXT_COMPACTION_MODE_LATCH&&(c[s++]=d);for(var p=0;p<s;p++)a.write(c[p]);break;case e.BYTE_COMPACTION_MODE_LATCH_6:for(;o<n[0]&&!l;){var h=n[o++];if(h<e.TEXT_COMPACTION_MODE_LATCH)s++,u=900*u+h;else switch(h){case e.TEXT_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH:case e.NUMERIC_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH_6:case e.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case e.MACRO_PDF417_TERMINATOR:o--,l=!0}if(s%5==0&&s>0){for(f=0;f<6;++f)a.write(Number(Cs(u)>>Cs(8*(5-f))));u=0,s=0}}}return i.append(Tr.decode(a.toByteArray(),r)),o},e.numericCompaction=function(t,n,r){for(var o=0,i=!1,a=new Int32Array(e.MAX_NUMERIC_CODEWORDS);n<t[0]&&!i;){var s=t[n++];if(n===t[0]&&(i=!0),s<e.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case e.TEXT_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH:case e.BYTE_COMPACTION_MODE_LATCH_6:case e.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case e.MACRO_PDF417_TERMINATOR:n--,i=!0}(o%e.MAX_NUMERIC_CODEWORDS==0||s===e.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(r.append(e.decodeBase900toBase10(a,o)),o=0)}return n},e.decodeBase900toBase10=function(t,n){for(var r=Cs(0),o=0;o<n;o++)r+=e.EXP900[n-o-1]*Cs(t[o]);var i=r.toString();if("1"!==i.charAt(0))throw new Sr;return i.substring(1)},e.TEXT_COMPACTION_MODE_LATCH=900,e.BYTE_COMPACTION_MODE_LATCH=901,e.NUMERIC_COMPACTION_MODE_LATCH=902,e.BYTE_COMPACTION_MODE_LATCH_6=924,e.ECI_USER_DEFINED=925,e.ECI_GENERAL_PURPOSE=926,e.ECI_CHARSET=927,e.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,e.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,e.MACRO_PDF417_TERMINATOR=922,e.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,e.MAX_NUMERIC_CODEWORDS=15,e.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,e.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,e.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,e.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,e.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,e.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,e.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,e.PL=25,e.LL=27,e.AS=27,e.ML=28,e.AL=28,e.PS=29,e.PAL=29,e.PUNCT_CHARS=";<>@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",e.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",e.EXP900=Ss()?function(){var e=[];e[0]=Cs(1);var t=Cs(900);e[1]=t;for(var n=2;n<16;n++)e[n]=e[n-1]*t;return e}():[],e.NUMBER_OF_SEQUENCE_CODEWORDS=2,e}(),As=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Os=function(){function e(){}return e.decode=function(t,n,r,o,i,a,s){for(var u,l=new rs(t,n,r,o,i),c=null,d=null,f=!0;;f=!1){if(null!=n&&(c=e.getRowIndicatorColumn(t,l,n,!0,a,s)),null!=o&&(d=e.getRowIndicatorColumn(t,l,o,!1,a,s)),null==(u=e.merge(c,d)))throw Pr.getNotFoundInstance();var p=u.getBoundingBox();if(!f||null==p||!(p.getMinY()<l.getMinY()||p.getMaxY()>l.getMaxY()))break;l=p}u.setBoundingBox(l);var h=u.getBarcodeColumnCount()+1;u.setDetectionResultColumn(0,c),u.setDetectionResultColumn(h,d);for(var m=null!=c,v=1;v<=h;v++){var g=m?v:h-v;if(void 0===u.getDetectionResultColumn(g)){var y=void 0;y=0===g||g===h?new ds(l,0===g):new as(l),u.setDetectionResultColumn(g,y);for(var w=-1,b=w,_=l.getMinY();_<=l.getMaxY();_++){if((w=e.getStartColumn(u,g,_,m))<0||w>l.getMaxX()){if(-1===b)continue;w=b}var E=e.detectCodeword(t,l.getMinX(),l.getMaxX(),m,w,_,a,s);null!=E&&(y.setCodeword(_,E),b=w,a=Math.min(a,E.getWidth()),s=Math.max(s,E.getWidth()))}}}return e.createDecoderResult(u)},e.merge=function(t,n){if(null==t&&null==n)return null;var r=e.getBarcodeMetadata(t,n);if(null==r)return null;var o=rs.merge(e.adjustBoundingBox(t),e.adjustBoundingBox(n));return new fs(r,o)},e.adjustBoundingBox=function(t){var n,r;if(null==t)return null;var o=t.getRowHeights();if(null==o)return null;var i=e.getMax(o),a=0;try{for(var s=As(o),u=s.next();!u.done;u=s.next()){var l=u.value;if(a+=i-l,l>0)break}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}for(var c=t.getCodewords(),d=0;a>0&&null==c[d];d++)a--;var f=0;for(d=o.length-1;d>=0&&(f+=i-o[d],!(o[d]>0));d--);for(d=c.length-1;f>0&&null==c[d];d--)f--;return t.getBoundingBox().addMissingRows(a,f,t.isLeft())},e.getMax=function(e){var t,n,r=-1;try{for(var o=As(e),i=o.next();!i.done;i=o.next()){var a=i.value;r=Math.max(r,a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},e.getBarcodeMetadata=function(e,t){var n,r;return null==e||null==(n=e.getBarcodeMetadata())?null==t?null:t.getBarcodeMetadata():null==t||null==(r=t.getBarcodeMetadata())?n:n.getColumnCount()!==r.getColumnCount()&&n.getErrorCorrectionLevel()!==r.getErrorCorrectionLevel()&&n.getRowCount()!==r.getRowCount()?null:n},e.getRowIndicatorColumn=function(t,n,r,o,i,a){for(var s=new ds(n,o),u=0;u<2;u++)for(var l=0===u?1:-1,c=Math.trunc(Math.trunc(r.getX())),d=Math.trunc(Math.trunc(r.getY()));d<=n.getMaxY()&&d>=n.getMinY();d+=l){var f=e.detectCodeword(t,0,t.getWidth(),o,c,d,i,a);null!=f&&(s.setCodeword(d,f),c=o?f.getStartX():f.getEndX())}return s},e.adjustCodewordCount=function(t,n){var r=n[0][1],o=r.getValue(),i=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-e.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===o.length){if(i<1||i>qa.MAX_CODEWORDS_IN_BARCODE)throw Pr.getNotFoundInstance();r.setValue(i)}else o[0]!==i&&r.setValue(i)},e.createDecoderResult=function(t){var n=e.createBarcodeMatrix(t);e.adjustCodewordCount(t,n);for(var r=new Array,o=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<t.getBarcodeRowCount();s++)for(var u=0;u<t.getBarcodeColumnCount();u++){var l=n[s][u+1].getValue(),c=s*t.getBarcodeColumnCount()+u;0===l.length?r.push(c):1===l.length?o[c]=l[0]:(a.push(c),i.push(l))}for(var d=new Array(i.length),f=0;f<d.length;f++)d[f]=i[f];return e.createDecoderResultFromAmbiguousValues(t.getBarcodeECLevel(),o,qa.toIntArray(r),qa.toIntArray(a),d)},e.createDecoderResultFromAmbiguousValues=function(t,n,r,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var u=0;u<a.length;u++)n[o[u]]=i[u][a[u]];try{return e.decodeCodewords(n,t,r)}catch(e){if(!(e instanceof dr))throw e}if(0===a.length)throw dr.getChecksumInstance();for(u=0;u<a.length;u++){if(a[u]<i[u].length-1){a[u]++;break}if(a[u]=0,u===a.length-1)throw dr.getChecksumInstance()}}throw dr.getChecksumInstance()},e.createBarcodeMatrix=function(e){for(var t,n,r,o,i=Array.from({length:e.getBarcodeRowCount()},(function(){return new Array(e.getBarcodeColumnCount()+2)})),a=0;a<i.length;a++)for(var s=0;s<i[a].length;s++)i[a][s]=new us;var u=0;try{for(var l=As(e.getDetectionResultColumns()),c=l.next();!c.done;c=l.next()){var d=c.value;if(null!=d)try{for(var f=(r=void 0,As(d.getCodewords())),p=f.next();!p.done;p=f.next()){var h=p.value;if(null!=h){var m=h.getRowNumber();if(m>=0){if(m>=i.length)continue;i[m][u].setValue(h.getValue())}}}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}u++}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return i},e.isValidBarcodeColumn=function(e,t){return t>=0&&t<=e.getBarcodeColumnCount()+1},e.getStartColumn=function(t,n,r,o){var i,a,s=o?1:-1,u=null;if(e.isValidBarcodeColumn(t,n-s)&&(u=t.getDetectionResultColumn(n-s).getCodeword(r)),null!=u)return o?u.getEndX():u.getStartX();if(null!=(u=t.getDetectionResultColumn(n).getCodewordNearby(r)))return o?u.getStartX():u.getEndX();if(e.isValidBarcodeColumn(t,n-s)&&(u=t.getDetectionResultColumn(n-s).getCodewordNearby(r)),null!=u)return o?u.getEndX():u.getStartX();for(var l=0;e.isValidBarcodeColumn(t,n-s);){n-=s;try{for(var c=(i=void 0,As(t.getDetectionResultColumn(n).getCodewords())),d=c.next();!d.done;d=c.next()){var f=d.value;if(null!=f)return(o?f.getEndX():f.getStartX())+s*l*(f.getEndX()-f.getStartX())}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}l++}return o?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()},e.detectCodeword=function(t,n,r,o,i,a,s,u){i=e.adjustCodewordStartColumn(t,n,r,o,i,a);var l,c=e.getModuleBitCount(t,n,r,o,i,a);if(null==c)return null;var d=ho.sum(c);if(o)l=i+d;else{for(var f=0;f<c.length/2;f++){var p=c[f];c[f]=c[c.length-1-f],c[c.length-1-f]=p}i=(l=i)-d}if(!e.checkCodewordSkew(d,s,u))return null;var h=hs.getDecodedValue(c),m=qa.getCodeword(h);return-1===m?null:new ps(i,l,e.getCodewordBucketNumber(h),m)},e.getModuleBitCount=function(e,t,n,r,o,i){for(var a=o,s=new Int32Array(8),u=0,l=r?1:-1,c=r;(r?a<n:a>=t)&&u<s.length;)e.get(a,i)===c?(s[u]++,a+=l):(u++,c=!c);return u===s.length||a===(r?n:t)&&u===s.length-1?s:null},e.getNumberOfECCodeWords=function(e){return 2<<e},e.adjustCodewordStartColumn=function(t,n,r,o,i,a){for(var s=i,u=o?-1:1,l=0;l<2;l++){for(;(o?s>=n:s<r)&&o===t.get(s,a);){if(Math.abs(i-s)>e.CODEWORD_SKEW_SIZE)return i;s+=u}u=-u,o=!o}return s},e.checkCodewordSkew=function(t,n,r){return n-e.CODEWORD_SKEW_SIZE<=t&&t<=r+e.CODEWORD_SKEW_SIZE},e.decodeCodewords=function(t,n,r){if(0===t.length)throw Sr.getFormatInstance();var o=1<<n+1,i=e.correctErrors(t,r,o);e.verifyCodewordCount(t,o);var a=Is.decode(t,""+n);return a.setErrorsCorrected(i),a.setErasures(r.length),a},e.correctErrors=function(t,n,r){if(null!=n&&n.length>r/2+e.MAX_ERRORS||r<0||r>e.MAX_EC_CODEWORDS)throw dr.getChecksumInstance();return e.errorCorrection.decode(t,r,n)},e.verifyCodewordCount=function(e,t){if(e.length<4)throw Sr.getFormatInstance();var n=e[0];if(n>e.length)throw Sr.getFormatInstance();if(0===n){if(!(t<e.length))throw Sr.getFormatInstance();e[0]=e.length-t}},e.getBitCountForCodeword=function(e){for(var t=new Int32Array(8),n=0,r=t.length-1;!((1&e)!==n&&(n=1&e,--r<0));)t[r]++,e>>=1;return t},e.getCodewordBucketNumber=function(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)},e.getCodewordBucketNumber_number=function(t){return e.getCodewordBucketNumber(e.getBitCountForCodeword(t))},e.getCodewordBucketNumber_Int32Array=function(e){return(e[0]-e[2]+e[4]-e[6]+9)%9},e.toString=function(e){for(var t=new is,n=0;n<e.length;n++){t.format("Row %2d: ",n);for(var r=0;r<e[n].length;r++){var o=e[n][r];0===o.getValue().length?t.format("        ",null):t.format("%4d(%2d)",o.getValue()[0],o.getConfidence(o.getValue()[0]))}t.format("%n")}return t.toString()},e.CODEWORD_SKEW_SIZE=2,e.MAX_ERRORS=3,e.MAX_EC_CODEWORDS=512,e.errorCorrection=new ns,e}(),Ns=function(){function e(){}return e.prototype.decode=function(t,n){void 0===n&&(n=null);var r=e.decode(t,n,!1);if(null==r||0===r.length||null==r[0])throw Pr.getNotFoundInstance();return r[0]},e.prototype.decodeMultiple=function(t,n){void 0===n&&(n=null);try{return e.decode(t,n,!0)}catch(e){if(e instanceof Sr||e instanceof dr)throw Pr.getNotFoundInstance();throw e}},e.decode=function(t,n,r){var o,i,a=new Array,s=Ja.detectMultiple(t,n,r);try{for(var u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(s.getPoints()),l=u.next();!l.done;l=u.next()){var c=l.value,d=Os.decode(s.getBits(),c[4],c[5],c[6],c[7],e.getMinCodewordWidth(c),e.getMaxCodewordWidth(c)),f=new Kr(d.getText(),d.getRawBytes(),void 0,c,Jr.PDF_417);f.putMetadata(Qr.ERROR_CORRECTION_LEVEL,d.getECLevel());var p=d.getOther();null!=p&&f.putMetadata(Qr.PDF417_EXTRA_METADATA,p),a.push(f)}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a.map((function(e){return e}))},e.getMaxWidth=function(e,t){return null==e||null==t?0:Math.trunc(Math.abs(e.getX()-t.getX()))},e.getMinWidth=function(e,t){return null==e||null==t?wr.MAX_VALUE:Math.trunc(Math.abs(e.getX()-t.getX()))},e.getMaxCodewordWidth=function(t){return Math.floor(Math.max(Math.max(e.getMaxWidth(t[0],t[4]),e.getMaxWidth(t[6],t[2])*qa.MODULES_IN_CODEWORD/qa.MODULES_IN_STOP_PATTERN),Math.max(e.getMaxWidth(t[1],t[5]),e.getMaxWidth(t[7],t[3])*qa.MODULES_IN_CODEWORD/qa.MODULES_IN_STOP_PATTERN)))},e.getMinCodewordWidth=function(t){return Math.floor(Math.min(Math.min(e.getMinWidth(t[0],t[4]),e.getMinWidth(t[6],t[2])*qa.MODULES_IN_CODEWORD/qa.MODULES_IN_STOP_PATTERN),Math.min(e.getMinWidth(t[1],t[5]),e.getMinWidth(t[7],t[3])*qa.MODULES_IN_CODEWORD/qa.MODULES_IN_STOP_PATTERN)))},e.prototype.reset=function(){},e}(),Ts=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ks=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ts(t,e),t.kind="ReaderException",t}(or),Rs=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},js=function(){function e(){}return e.prototype.decode=function(e,t){return this.setHints(t),this.decodeInternal(e)},e.prototype.decodeWithState=function(e){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(e)},e.prototype.setHints=function(e){this.hints=e;var t=null!=e&&void 0!==e.get(Er.TRY_HARDER),n=null==e?null:e.get(Er.POSSIBLE_FORMATS),r=new Array;if(null!=n){var o=n.some((function(e){return e===Jr.UPC_A||e===Jr.UPC_E||e===Jr.EAN_13||e===Jr.EAN_8||e===Jr.CODABAR||e===Jr.CODE_39||e===Jr.CODE_93||e===Jr.CODE_128||e===Jr.ITF||e===Jr.RSS_14||e===Jr.RSS_EXPANDED}));o&&!t&&r.push(new na(e)),n.includes(Jr.QR_CODE)&&r.push(new Ya),n.includes(Jr.DATA_MATRIX)&&r.push(new ga),n.includes(Jr.AZTEC)&&r.push(new Oo),n.includes(Jr.PDF_417)&&r.push(new Ns),o&&t&&r.push(new na(e))}0===r.length&&(t||r.push(new na(e)),r.push(new Ya),r.push(new ga),r.push(new Oo),r.push(new Ns),t&&r.push(new na(e))),this.readers=r},e.prototype.reset=function(){var e,t;if(null!==this.readers)try{for(var n=Rs(this.readers),r=n.next();!r.done;r=n.next())r.value.reset()}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.decodeInternal=function(e){var t,n;if(null===this.readers)throw new ks("No readers where selected, nothing can be read.");try{for(var r=Rs(this.readers),o=r.next();!o.done;o=r.next()){var i=o.value;try{return i.decode(e,this.hints)}catch(e){if(e instanceof ks)continue}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}throw new Pr("No MultiFormat Readers were able to detect the code.")},e}(),Ds=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=500);var r=new js;return r.setHints(t),e.call(this,r,n)||this}Ds(t,e),t.prototype.decodeBitmap=function(e){return this.reader.decodeWithState(e)}}(qr);var Ps=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){Ps((function(t){return void 0===t&&(t=500),e.call(this,new Ns,t)||this}),e)}(qr);var Ms,Ls=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){Ls((function(t){return void 0===t&&(t=500),e.call(this,new Ya,t)||this}),e)}(qr),function(e){e[e.ERROR_CORRECTION=0]="ERROR_CORRECTION",e[e.CHARACTER_SET=1]="CHARACTER_SET",e[e.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",e[e.MIN_SIZE=3]="MIN_SIZE",e[e.MAX_SIZE=4]="MAX_SIZE",e[e.MARGIN=5]="MARGIN",e[e.PDF417_COMPACT=6]="PDF417_COMPACT",e[e.PDF417_COMPACTION=7]="PDF417_COMPACTION",e[e.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",e[e.AZTEC_LAYERS=9]="AZTEC_LAYERS",e[e.QR_VERSION=10]="QR_VERSION"}(Ms||(Ms={}));var Fs=Ms,Bs=function(){function e(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new no(e,Int32Array.from([1])))}return e.prototype.buildGenerator=function(e){var t=this.cachedGenerators;if(e>=t.length)for(var n=t[t.length-1],r=this.field,o=t.length;o<=e;o++){var i=n.multiply(new no(r,Int32Array.from([1,r.exp(o-1+r.getGeneratorBase())])));t.push(i),n=i}return t[e]},e.prototype.encode=function(e,t){if(0===t)throw new ur("No error correction bytes");var n=e.length-t;if(n<=0)throw new ur("No data bytes provided");var r=this.buildGenerator(t),o=new Int32Array(n);pr.arraycopy(e,0,o,0,n);for(var i=new no(this.field,o),a=(i=i.multiplyByMonomial(t,1)).divide(r)[1].getCoefficients(),s=t-a.length,u=0;u<s;u++)e[n+u]=0;pr.arraycopy(a,0,e,n+s,a.length)},e}(),Vs=function(){function e(){}return e.applyMaskPenaltyRule1=function(t){return e.applyMaskPenaltyRule1Internal(t,!0)+e.applyMaskPenaltyRule1Internal(t,!1)},e.applyMaskPenaltyRule2=function(t){for(var n=0,r=t.getArray(),o=t.getWidth(),i=t.getHeight(),a=0;a<i-1;a++)for(var s=r[a],u=0;u<o-1;u++){var l=s[u];l===s[u+1]&&l===r[a+1][u]&&l===r[a+1][u+1]&&n++}return e.N2*n},e.applyMaskPenaltyRule3=function(t){for(var n=0,r=t.getArray(),o=t.getWidth(),i=t.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var u=r[a];s+6<o&&1===u[s]&&0===u[s+1]&&1===u[s+2]&&1===u[s+3]&&1===u[s+4]&&0===u[s+5]&&1===u[s+6]&&(e.isWhiteHorizontal(u,s-4,s)||e.isWhiteHorizontal(u,s+7,s+11))&&n++,a+6<i&&1===r[a][s]&&0===r[a+1][s]&&1===r[a+2][s]&&1===r[a+3][s]&&1===r[a+4][s]&&0===r[a+5][s]&&1===r[a+6][s]&&(e.isWhiteVertical(r,s,a-4,a)||e.isWhiteVertical(r,s,a+7,a+11))&&n++}return n*e.N3},e.isWhiteHorizontal=function(e,t,n){t=Math.max(t,0),n=Math.min(n,e.length);for(var r=t;r<n;r++)if(1===e[r])return!1;return!0},e.isWhiteVertical=function(e,t,n,r){n=Math.max(n,0),r=Math.min(r,e.length);for(var o=n;o<r;o++)if(1===e[o][t])return!1;return!0},e.applyMaskPenaltyRule4=function(t){for(var n=0,r=t.getArray(),o=t.getWidth(),i=t.getHeight(),a=0;a<i;a++)for(var s=r[a],u=0;u<o;u++)1===s[u]&&n++;var l=t.getHeight()*t.getWidth();return Math.floor(10*Math.abs(2*n-l)/l)*e.N4},e.getDataMaskBit=function(e,t,n){var r,o;switch(e){case 0:r=n+t&1;break;case 1:r=1&n;break;case 2:r=t%3;break;case 3:r=(n+t)%3;break;case 4:r=Math.floor(n/2)+Math.floor(t/3)&1;break;case 5:r=(1&(o=n*t))+o%3;break;case 6:r=(1&(o=n*t))+o%3&1;break;case 7:r=(o=n*t)%3+(n+t&1)&1;break;default:throw new ur("Invalid mask pattern: "+e)}return 0===r},e.applyMaskPenaltyRule1Internal=function(t,n){for(var r=0,o=n?t.getHeight():t.getWidth(),i=n?t.getWidth():t.getHeight(),a=t.getArray(),s=0;s<o;s++){for(var u=0,l=-1,c=0;c<i;c++){var d=n?a[s][c]:a[c][s];d===l?u++:(u>=5&&(r+=e.N1+(u-5)),u=1,l=d)}u>=5&&(r+=e.N1+(u-5))}return r},e.N1=3,e.N2=3,e.N3=40,e.N4=10,e}(),Us=function(){function e(e,t){this.width=e,this.height=t;for(var n=new Array(t),r=0;r!==t;r++)n[r]=new Uint8Array(e);this.bytes=n}return e.prototype.getHeight=function(){return this.height},e.prototype.getWidth=function(){return this.width},e.prototype.get=function(e,t){return this.bytes[t][e]},e.prototype.getArray=function(){return this.bytes},e.prototype.setNumber=function(e,t,n){this.bytes[t][e]=n},e.prototype.setBoolean=function(e,t,n){this.bytes[t][e]=n?1:0},e.prototype.clear=function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.bytes),o=r.next();!o.done;o=r.next()){var i=o.value;yr.fill(i,e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.width!==n.width)return!1;if(this.height!==n.height)return!1;for(var r=0,o=this.height;r<o;++r)for(var i=this.bytes[r],a=n.bytes[r],s=0,u=this.width;s<u;++s)if(i[s]!==a[s])return!1;return!0},e.prototype.toString=function(){for(var e=new Rr,t=0,n=this.height;t<n;++t){for(var r=this.bytes[t],o=0,i=this.width;o<i;++o)switch(r[o]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append("  ")}e.append("\n")}return e.toString()},e}(),Hs=function(){function e(){this.maskPattern=-1}return e.prototype.getMode=function(){return this.mode},e.prototype.getECLevel=function(){return this.ecLevel},e.prototype.getVersion=function(){return this.version},e.prototype.getMaskPattern=function(){return this.maskPattern},e.prototype.getMatrix=function(){return this.matrix},e.prototype.toString=function(){var e=new Rr;return e.append("<<\n"),e.append(" mode: "),e.append(this.mode?this.mode.toString():"null"),e.append("\n ecLevel: "),e.append(this.ecLevel?this.ecLevel.toString():"null"),e.append("\n version: "),e.append(this.version?this.version.toString():"null"),e.append("\n maskPattern: "),e.append(this.maskPattern.toString()),this.matrix?(e.append("\n matrix:\n"),e.append(this.matrix.toString())):e.append("\n matrix: null\n"),e.append(">>\n"),e.toString()},e.prototype.setMode=function(e){this.mode=e},e.prototype.setECLevel=function(e){this.ecLevel=e},e.prototype.setVersion=function(e){this.version=e},e.prototype.setMaskPattern=function(e){this.maskPattern=e},e.prototype.setMatrix=function(e){this.matrix=e},e.isValidMaskPattern=function(t){return t>=0&&t<e.NUM_MASK_PATTERNS},e.NUM_MASK_PATTERNS=8,e}(),zs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zs(t,e),t.kind="WriterException",t}(or),Ws=function(){function e(){}return e.clearMatrix=function(e){e.clear(255)},e.buildMatrix=function(t,n,r,o,i){e.clearMatrix(i),e.embedBasicPatterns(r,i),e.embedTypeInfo(n,o,i),e.maybeEmbedVersionInfo(r,i),e.embedDataBits(t,o,i)},e.embedBasicPatterns=function(t,n){e.embedPositionDetectionPatternsAndSeparators(n),e.embedDarkDotAtLeftBottomCorner(n),e.maybeEmbedPositionAdjustmentPatterns(t,n),e.embedTimingPatterns(n)},e.embedTypeInfo=function(t,n,r){var o=new br;e.makeTypeInfoBits(t,n,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),u=e.TYPE_INFO_COORDINATES[i],l=u[0],c=u[1];if(r.setBoolean(l,c,s),i<8){var d=r.getWidth()-i-1,f=8;r.setBoolean(d,f,s)}else d=8,f=r.getHeight()-7+(i-8),r.setBoolean(d,f,s)}},e.maybeEmbedVersionInfo=function(t,n){if(!(t.getVersionNumber()<7)){var r=new br;e.makeVersionInfoBits(t,r);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=r.get(o);o--,n.setBoolean(i,n.getHeight()-11+a,s),n.setBoolean(n.getHeight()-11+a,i,s)}}},e.embedDataBits=function(t,n,r){for(var o=0,i=-1,a=r.getWidth()-1,s=r.getHeight()-1;a>0;){for(6===a&&(a-=1);s>=0&&s<r.getHeight();){for(var u=0;u<2;++u){var l=a-u;if(e.isEmpty(r.get(l,s))){var c=void 0;o<t.getSize()?(c=t.get(o),++o):c=!1,255!==n&&Vs.getDataMaskBit(n,l,s)&&(c=!c),r.setBoolean(l,s,c)}}s+=i}s+=i=-i,a-=2}if(o!==t.getSize())throw new Gs("Not all bits consumed: "+o+"/"+t.getSize())},e.findMSBSet=function(e){return 32-wr.numberOfLeadingZeros(e)},e.calculateBCHCode=function(t,n){if(0===n)throw new ur("0 polynomial");var r=e.findMSBSet(n);for(t<<=r-1;e.findMSBSet(t)>=r;)t^=n<<e.findMSBSet(t)-r;return t},e.makeTypeInfoBits=function(t,n,r){if(!Hs.isValidMaskPattern(n))throw new Gs("Invalid mask pattern");var o=t.getBits()<<3|n;r.appendBits(o,5);var i=e.calculateBCHCode(o,e.TYPE_INFO_POLY);r.appendBits(i,10);var a=new br;if(a.appendBits(e.TYPE_INFO_MASK_PATTERN,15),r.xor(a),15!==r.getSize())throw new Gs("should not happen but we got: "+r.getSize())},e.makeVersionInfoBits=function(t,n){n.appendBits(t.getVersionNumber(),6);var r=e.calculateBCHCode(t.getVersionNumber(),e.VERSION_INFO_POLY);if(n.appendBits(r,12),18!==n.getSize())throw new Gs("should not happen but we got: "+n.getSize())},e.isEmpty=function(e){return 255===e},e.embedTimingPatterns=function(t){for(var n=8;n<t.getWidth()-8;++n){var r=(n+1)%2;e.isEmpty(t.get(n,6))&&t.setNumber(n,6,r),e.isEmpty(t.get(6,n))&&t.setNumber(6,n,r)}},e.embedDarkDotAtLeftBottomCorner=function(e){if(0===e.get(8,e.getHeight()-8))throw new Gs;e.setNumber(8,e.getHeight()-8,1)},e.embedHorizontalSeparationPattern=function(t,n,r){for(var o=0;o<8;++o){if(!e.isEmpty(r.get(t+o,n)))throw new Gs;r.setNumber(t+o,n,0)}},e.embedVerticalSeparationPattern=function(t,n,r){for(var o=0;o<7;++o){if(!e.isEmpty(r.get(t,n+o)))throw new Gs;r.setNumber(t,n+o,0)}},e.embedPositionAdjustmentPattern=function(t,n,r){for(var o=0;o<5;++o)for(var i=e.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)r.setNumber(t+a,n+o,i[a])},e.embedPositionDetectionPattern=function(t,n,r){for(var o=0;o<7;++o)for(var i=e.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)r.setNumber(t+a,n+o,i[a])},e.embedPositionDetectionPatternsAndSeparators=function(t){var n=e.POSITION_DETECTION_PATTERN[0].length;e.embedPositionDetectionPattern(0,0,t),e.embedPositionDetectionPattern(t.getWidth()-n,0,t),e.embedPositionDetectionPattern(0,t.getWidth()-n,t),e.embedHorizontalSeparationPattern(0,7,t),e.embedHorizontalSeparationPattern(t.getWidth()-8,7,t),e.embedHorizontalSeparationPattern(0,t.getWidth()-8,t),e.embedVerticalSeparationPattern(7,0,t),e.embedVerticalSeparationPattern(t.getHeight()-7-1,0,t),e.embedVerticalSeparationPattern(7,t.getHeight()-7,t)},e.maybeEmbedPositionAdjustmentPatterns=function(t,n){if(!(t.getVersionNumber()<2))for(var r=t.getVersionNumber()-1,o=e.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[r],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var u=0;u!==a;u++){var l=o[u];l>=0&&e.isEmpty(n.get(l,s))&&e.embedPositionAdjustmentPattern(l-2,s-2,n)}}},e.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),e.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),e.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),e.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),e.VERSION_INFO_POLY=7973,e.TYPE_INFO_POLY=1335,e.TYPE_INFO_MASK_PATTERN=21522,e}(),Xs=function(){function e(e,t){this.dataBytes=e,this.errorCorrectionBytes=t}return e.prototype.getDataBytes=function(){return this.dataBytes},e.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},e}(),Ys=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(){}e.calculateMaskPenalty=function(e){return Vs.applyMaskPenaltyRule1(e)+Vs.applyMaskPenaltyRule2(e)+Vs.applyMaskPenaltyRule3(e)+Vs.applyMaskPenaltyRule4(e)},e.encode=function(t,n,r){void 0===r&&(r=null);var o=e.DEFAULT_BYTE_MODE_ENCODING,i=null!==r&&void 0!==r.get(Fs.CHARACTER_SET);i&&(o=r.get(Fs.CHARACTER_SET).toString());var a=this.chooseMode(t,o),s=new br;if(a===ja.BYTE&&(i||e.DEFAULT_BYTE_MODE_ENCODING!==o)){var u=Ar.getCharacterSetECIByName(o);void 0!==u&&this.appendECI(u,s)}this.appendModeInfo(a,s);var l,c=new br;if(this.appendBytes(t,a,c,o),null!==r&&void 0!==r.get(Fs.QR_VERSION)){var d=Number.parseInt(r.get(Fs.QR_VERSION).toString(),10);l=Ca.getVersionForNumber(d);var f=this.calculateBitsNeeded(a,s,c,l);if(!this.willFit(f,l,n))throw new Gs("Data too big for requested version")}else l=this.recommendVersion(n,a,s,c);var p=new br;p.appendBitArray(s);var h=a===ja.BYTE?c.getSizeInBytes():t.length;this.appendLengthInfo(h,l,a,p),p.appendBitArray(c);var m=l.getECBlocksForLevel(n),v=l.getTotalCodewords()-m.getTotalECCodewords();this.terminateBits(v,p);var g=this.interleaveWithECBytes(p,l.getTotalCodewords(),v,m.getNumBlocks()),y=new Hs;y.setECLevel(n),y.setMode(a),y.setVersion(l);var w=l.getDimensionForVersion(),b=new Us(w,w),_=this.chooseMaskPattern(g,n,l,b);return y.setMaskPattern(_),Ws.buildMatrix(g,n,l,_,b),y.setMatrix(b),y},e.recommendVersion=function(e,t,n,r){var o=this.calculateBitsNeeded(t,n,r,Ca.getVersionForNumber(1)),i=this.chooseVersion(o,e),a=this.calculateBitsNeeded(t,n,r,i);return this.chooseVersion(a,e)},e.calculateBitsNeeded=function(e,t,n,r){return t.getSize()+e.getCharacterCountBits(r)+n.getSize()},e.getAlphanumericCode=function(t){return t<e.ALPHANUMERIC_TABLE.length?e.ALPHANUMERIC_TABLE[t]:-1},e.chooseMode=function(t,n){if(void 0===n&&(n=null),Ar.SJIS.getName()===n&&this.isOnlyDoubleByteKanji(t))return ja.KANJI;for(var r=!1,o=!1,i=0,a=t.length;i<a;++i){var s=t.charAt(i);if(e.isDigit(s))r=!0;else{if(-1===this.getAlphanumericCode(s.charCodeAt(0)))return ja.BYTE;o=!0}}return o?ja.ALPHANUMERIC:r?ja.NUMERIC:ja.BYTE},e.isOnlyDoubleByteKanji=function(e){var t;try{t=Tr.encode(e,Ar.SJIS)}catch(e){return!1}var n=t.length;if(n%2!=0)return!1;for(var r=0;r<n;r+=2){var o=255&t[r];if((o<129||o>159)&&(o<224||o>235))return!1}return!0},e.chooseMaskPattern=function(e,t,n,r){for(var o=Number.MAX_SAFE_INTEGER,i=-1,a=0;a<Hs.NUM_MASK_PATTERNS;a++){Ws.buildMatrix(e,t,n,a,r);var s=this.calculateMaskPenalty(r);s<o&&(o=s,i=a)}return i},e.chooseVersion=function(t,n){for(var r=1;r<=40;r++){var o=Ca.getVersionForNumber(r);if(e.willFit(t,o,n))return o}throw new Gs("Data too big")},e.willFit=function(e,t,n){return t.getTotalCodewords()-t.getECBlocksForLevel(n).getTotalECCodewords()>=(e+7)/8},e.terminateBits=function(e,t){var n=8*e;if(t.getSize()>n)throw new Gs("data bits cannot fit in the QR Code"+t.getSize()+" > "+n);for(var r=0;r<4&&t.getSize()<n;++r)t.appendBit(!1);var o=7&t.getSize();if(o>0)for(r=o;r<8;r++)t.appendBit(!1);var i=e-t.getSizeInBytes();for(r=0;r<i;++r)t.appendBits(0==(1&r)?236:17,8);if(t.getSize()!==n)throw new Gs("Bits size does not equal capacity")},e.getNumDataBytesAndNumECBytesForBlockID=function(e,t,n,r,o,i){if(r>=n)throw new Gs("Block ID too large");var a=e%n,s=n-a,u=Math.floor(e/n),l=u+1,c=Math.floor(t/n),d=c+1,f=u-c,p=l-d;if(f!==p)throw new Gs("EC bytes mismatch");if(n!==s+a)throw new Gs("RS blocks mismatch");if(e!==(c+f)*s+(d+p)*a)throw new Gs("Total bytes mismatch");r<s?(o[0]=c,i[0]=f):(o[0]=d,i[0]=p)},e.interleaveWithECBytes=function(t,n,r,o){var i,a,s,u;if(t.getSizeInBytes()!==r)throw new Gs("Number of bits and data bytes does not match");for(var l=0,c=0,d=0,f=new Array,p=0;p<o;++p){var h=new Int32Array(1),m=new Int32Array(1);e.getNumDataBytesAndNumECBytesForBlockID(n,r,o,p,h,m);var v=h[0],g=new Uint8Array(v);t.toBytes(8*l,g,0,v);var y=e.generateECBytes(g,m[0]);f.push(new Xs(g,y)),c=Math.max(c,v),d=Math.max(d,y.length),l+=h[0]}if(r!==l)throw new Gs("Data bytes does not match offset");var w=new br;for(p=0;p<c;++p)try{for(var b=(i=void 0,Ys(f)),_=b.next();!_.done;_=b.next())p<(g=_.value.getDataBytes()).length&&w.appendBits(g[p],8)}catch(e){i={error:e}}finally{try{_&&!_.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}for(p=0;p<d;++p)try{for(var E=(s=void 0,Ys(f)),x=E.next();!x.done;x=E.next())p<(y=x.value.getErrorCorrectionBytes()).length&&w.appendBits(y[p],8)}catch(e){s={error:e}}finally{try{x&&!x.done&&(u=E.return)&&u.call(E)}finally{if(s)throw s.error}}if(n!==w.getSizeInBytes())throw new Gs("Interleaving error: "+n+" and "+w.getSizeInBytes()+" differ.");return w},e.generateECBytes=function(e,t){for(var n=e.length,r=new Int32Array(n+t),o=0;o<n;o++)r[o]=255&e[o];new Bs(ao.QR_CODE_FIELD_256).encode(r,t);var i=new Uint8Array(t);for(o=0;o<t;o++)i[o]=r[n+o];return i},e.appendModeInfo=function(e,t){t.appendBits(e.getBits(),4)},e.appendLengthInfo=function(e,t,n,r){var o=n.getCharacterCountBits(t);if(e>=1<<o)throw new Gs(e+" is bigger than "+((1<<o)-1));r.appendBits(e,o)},e.appendBytes=function(t,n,r,o){switch(n){case ja.NUMERIC:e.appendNumericBytes(t,r);break;case ja.ALPHANUMERIC:e.appendAlphanumericBytes(t,r);break;case ja.BYTE:e.append8BitBytes(t,r,o);break;case ja.KANJI:e.appendKanjiBytes(t,r);break;default:throw new Gs("Invalid mode: "+n)}},e.getDigit=function(e){return e.charCodeAt(0)-48},e.isDigit=function(t){var n=e.getDigit(t);return n>=0&&n<=9},e.appendNumericBytes=function(t,n){for(var r=t.length,o=0;o<r;){var i=e.getDigit(t.charAt(o));if(o+2<r){var a=e.getDigit(t.charAt(o+1)),s=e.getDigit(t.charAt(o+2));n.appendBits(100*i+10*a+s,10),o+=3}else o+1<r?(a=e.getDigit(t.charAt(o+1)),n.appendBits(10*i+a,7),o+=2):(n.appendBits(i,4),o++)}},e.appendAlphanumericBytes=function(t,n){for(var r=t.length,o=0;o<r;){var i=e.getAlphanumericCode(t.charCodeAt(o));if(-1===i)throw new Gs;if(o+1<r){var a=e.getAlphanumericCode(t.charCodeAt(o+1));if(-1===a)throw new Gs;n.appendBits(45*i+a,11),o+=2}else n.appendBits(i,6),o++}},e.append8BitBytes=function(e,t,n){var r;try{r=Tr.encode(e,n)}catch(e){throw new Gs(e)}for(var o=0,i=r.length;o!==i;o++){var a=r[o];t.appendBits(a,8)}},e.appendKanjiBytes=function(e,t){var n;try{n=Tr.encode(e,Ar.SJIS)}catch(e){throw new Gs(e)}for(var r=n.length,o=0;o<r;o+=2){var i=(255&n[o])<<8&4294967295|255&n[o+1],a=-1;if(i>=33088&&i<=40956?a=i-33088:i>=57408&&i<=60351&&(a=i-49472),-1===a)throw new Gs("Invalid byte sequence");var s=192*(a>>8)+(255&a);t.appendBits(s,13)}},e.appendECI=function(e,t){t.appendBits(ja.ECI.getBits(),4),t.appendBits(e.getValue(),8)},e.ALPHANUMERIC_TABLE=Int32Array.from([-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,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),e.DEFAULT_BYTE_MODE_ENCODING=Ar.UTF8.getName()}();var qs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){function t(t,n,r,o,i,a,s,u){var l=e.call(this,a,s)||this;if(l.yuvData=t,l.dataWidth=n,l.dataHeight=r,l.left=o,l.top=i,o+a>n||i+s>r)throw new ur("Crop rectangle does not fit within image data.");return u&&l.reverseHorizontal(a,s),l}qs(t,e),t.prototype.getRow=function(e,t){if(e<0||e>=this.getHeight())throw new ur("Requested row is outside the image: "+e);var n=this.getWidth();(null==t||t.length<n)&&(t=new Uint8ClampedArray(n));var r=(e+this.top)*this.dataWidth+this.left;return pr.arraycopy(this.yuvData,r,t,0,n),t},t.prototype.getMatrix=function(){var e=this.getWidth(),t=this.getHeight();if(e===this.dataWidth&&t===this.dataHeight)return this.yuvData;var n=e*t,r=new Uint8ClampedArray(n),o=this.top*this.dataWidth+this.left;if(e===this.dataWidth)return pr.arraycopy(this.yuvData,o,r,0,n),r;for(var i=0;i<t;i++){var a=i*e;pr.arraycopy(this.yuvData,o,r,a,e),o+=this.dataWidth}return r},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(e,n,r,o){return new t(this.yuvData,this.dataWidth,this.dataHeight,this.left+e,this.top+n,r,o,!1)},t.prototype.renderThumbnail=function(){for(var e=this.getWidth()/t.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/t.THUMBNAIL_SCALE_FACTOR,r=new Int32Array(e*n),o=this.yuvData,i=this.top*this.dataWidth+this.left,a=0;a<n;a++){for(var s=a*e,u=0;u<e;u++){var l=255&o[i+u*t.THUMBNAIL_SCALE_FACTOR];r[s+u]=4278190080|65793*l}i+=this.dataWidth*t.THUMBNAIL_SCALE_FACTOR}return r},t.prototype.getThumbnailWidth=function(){return this.getWidth()/t.THUMBNAIL_SCALE_FACTOR},t.prototype.getThumbnailHeight=function(){return this.getHeight()/t.THUMBNAIL_SCALE_FACTOR},t.prototype.reverseHorizontal=function(e,t){for(var n=this.yuvData,r=0,o=this.top*this.dataWidth+this.left;r<t;r++,o+=this.dataWidth)for(var i=o+e/2,a=o,s=o+e-1;a<i;a++,s--){var u=n[a];n[a]=n[s],n[s]=u}},t.prototype.invert=function(){return new Hr(this)},t.THUMBNAIL_SCALE_FACTOR=2}(Vr);var Ks=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){function t(t,n,r,o,i,a,s){var u=e.call(this,n,r)||this;if(u.dataWidth=o,u.dataHeight=i,u.left=a,u.top=s,4===t.BYTES_PER_ELEMENT){for(var l=n*r,c=new Uint8ClampedArray(l),d=0;d<l;d++){var f=t[d],p=f>>16&255,h=f>>7&510,m=255&f;c[d]=(p+h+m)/4&255}u.luminances=c}else u.luminances=t;if(void 0===o&&(u.dataWidth=n),void 0===i&&(u.dataHeight=r),void 0===a&&(u.left=0),void 0===s&&(u.top=0),u.left+n>u.dataWidth||u.top+r>u.dataHeight)throw new ur("Crop rectangle does not fit within image data.");return u}Ks(t,e),t.prototype.getRow=function(e,t){if(e<0||e>=this.getHeight())throw new ur("Requested row is outside the image: "+e);var n=this.getWidth();(null==t||t.length<n)&&(t=new Uint8ClampedArray(n));var r=(e+this.top)*this.dataWidth+this.left;return pr.arraycopy(this.luminances,r,t,0,n),t},t.prototype.getMatrix=function(){var e=this.getWidth(),t=this.getHeight();if(e===this.dataWidth&&t===this.dataHeight)return this.luminances;var n=e*t,r=new Uint8ClampedArray(n),o=this.top*this.dataWidth+this.left;if(e===this.dataWidth)return pr.arraycopy(this.luminances,o,r,0,n),r;for(var i=0;i<t;i++){var a=i*e;pr.arraycopy(this.luminances,o,r,a,e),o+=this.dataWidth}return r},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(e,n,r,o){return new t(this.luminances,r,o,this.dataWidth,this.dataHeight,this.left+e,this.top+n)},t.prototype.invert=function(){return new Hr(this)}}(Vr);var Zs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Zs(t,e),t.forName=function(e){return this.getCharacterSetECIByName(e)}}(Ar);var Js=function(){function e(e){this.previous=e}return e.prototype.getPrevious=function(){return this.previous},e}(),$s=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qs=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.value=n,o.bitCount=r,o}return $s(t,e),t.prototype.appendTo=function(e,t){e.appendBits(this.value,this.bitCount)},t.prototype.add=function(e,n){return new t(this,e,n)},t.prototype.addBinaryShift=function(e,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new t(this,e,n)},t.prototype.toString=function(){var e=this.value&(1<<this.bitCount)-1;return e|=1<<this.bitCount,"<"+wr.toBinaryString(e|1<<this.bitCount).substring(1)+">"},t}(Js),eu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){function t(t,n,r){var o=e.call(this,t,0,0)||this;return o.binaryShiftStart=n,o.binaryShiftByteCount=r,o}eu(t,e),t.prototype.appendTo=function(e,t){for(var n=0;n<this.binaryShiftByteCount;n++)(0===n||31===n&&this.binaryShiftByteCount<=62)&&(e.appendBits(31,5),this.binaryShiftByteCount>62?e.appendBits(this.binaryShiftByteCount-31,16):0===n?e.appendBits(Math.min(this.binaryShiftByteCount,31),5):e.appendBits(this.binaryShiftByteCount-31,5)),e.appendBits(t[this.binaryShiftStart+n],8)},t.prototype.addBinaryShift=function(e,n){return new t(this,e,n)},t.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}(Qs),new Qs(null,0,0);!function(e){var t,n;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=r.next();!o.done;o=r.next()){var i=o.value;yr.fill(i,-1)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e[0][4]=0,e[1][4]=0,e[1][0]=28,e[3][4]=0,e[2][4]=0,e[2][0]=15}(yr.createInt32Array(6,6)),function(e){var t=kr.getCharCode(" "),n=kr.getCharCode("."),r=kr.getCharCode(",");e[0][t]=1;for(var o=kr.getCharCode("Z"),i=kr.getCharCode("A"),a=i;a<=o;a++)e[0][a]=a-i+2;e[1][t]=1;var s=kr.getCharCode("z"),u=kr.getCharCode("a");for(a=u;a<=s;a++)e[1][a]=a-u+2;e[2][t]=1;var l=kr.getCharCode("9"),c=kr.getCharCode("0");for(a=c;a<=l;a++)e[2][a]=a-c+2;e[2][r]=12,e[2][n]=13;for(var d=["\0"," ","\x01","\x02","\x03","\x04","\x05","\x06","\x07","\b","\t","\n","\v","\f","\r","\x1b","\x1c","\x1d","\x1e","\x1f","@","\\","^","_","`","|","~","\x7f"],f=0;f<d.length;f++)e[3][kr.getCharCode(d[f])]=f;var p=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(f=0;f<p.length;f++)kr.getCharCode(p[f])>0&&(e[4][kr.getCharCode(p[f])]=f)}(yr.createInt32Array(5,256));var tu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),nu=function(e){function t(n){var r=e.call(this,n.width,n.height)||this;return r.canvas=n,r.buffer=t.makeBufferFromCanvasImageData(n),r}return tu(t,e),t.makeBufferFromCanvasImageData=function(e){var n=e.getContext("2d");if(!n)throw new Error("Couldn't get canvas context.");var r=n.getImageData(0,0,e.width,e.height);return t.toGrayscaleBuffer(r.data,e.width,e.height)},t.toGrayscaleBuffer=function(e,t,n){for(var r=new Uint8ClampedArray(t*n),o=0,i=0,a=e.length;o<a;o+=4,i++){var s=void 0;s=0===e[o+3]?255:306*e[o]+601*e[o+1]+117*e[o+2]+512>>10,r[i]=s}return r},t.prototype.getRow=function(e,t){if(e<0||e>=this.getHeight())throw new ur("Requested row is outside the image: "+e);var n=this.getWidth(),r=e*n;return null===t?t=this.buffer.slice(r,r+n):(t.length<n&&(t=new Uint8ClampedArray(n)),t.set(this.buffer.slice(r,r+n))),t},t.prototype.getMatrix=function(){return this.buffer},t.prototype.isCropSupported=function(){return!0},t.prototype.crop=function(t,n,r,o){return e.prototype.crop.call(this,t,n,r,o),this},t.prototype.isRotateSupported=function(){return!0},t.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},t.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},t.prototype.invert=function(){return new Hr(this)},t.prototype.getTempCanvasElement=function(){if(null===this.tempCanvasElement){var e=this.canvas.ownerDocument.createElement("canvas");e.width=this.canvas.width,e.height=this.canvas.height,this.tempCanvasElement=e}return this.tempCanvasElement},t.prototype.rotate=function(e){var n=this.getTempCanvasElement();if(!n)throw new Error("Could not create a Canvas element.");var r=e*t.DEGREE_TO_RADIANS,o=this.canvas.width,i=this.canvas.height,a=Math.ceil(Math.abs(Math.cos(r))*o+Math.abs(Math.sin(r))*i),s=Math.ceil(Math.abs(Math.sin(r))*o+Math.abs(Math.cos(r))*i);n.width=a,n.height=s;var u=n.getContext("2d");if(!u)throw new Error("Could not create a Convas Context element.");return u.translate(a/2,s/2),u.rotate(r),u.drawImage(this.canvas,o/-2,i/-2),this.buffer=t.makeBufferFromCanvasImageData(n),this},t.DEGREE_TO_RADIANS=Math.PI/180,t}(Vr);function ru(){return"undefined"!=typeof navigator}var ou=function(){return ou=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ou.apply(this,arguments)},iu=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},au=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},su=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},uu={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},lu=function(){function e(e,t,n){void 0===t&&(t=new Map),void 0===n&&(n={}),this.reader=e,this.hints=t,this.options=ou(ou({},uu),n)}return Object.defineProperty(e.prototype,"possibleFormats",{set:function(e){this.hints.set(Er.POSSIBLE_FORMATS,e)},enumerable:!1,configurable:!0}),e.addVideoSource=function(e,t){try{e.srcObject=t}catch(n){e.src=URL.createObjectURL(t)}},e.mediaStreamSetTorch=function(e,t){return iu(this,void 0,void 0,(function(){return au(this,(function(n){switch(n.label){case 0:return[4,e.applyConstraints({advanced:[{fillLightMode:t?"flash":"off",torch:!!t}]})];case 1:return n.sent(),[2]}}))}))},e.mediaStreamIsTorchCompatible=function(t){var n,r,o=t.getVideoTracks();try{for(var i=su(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(e.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e.mediaStreamIsTorchCompatibleTrack=function(e){try{return"torch"in e.getCapabilities()}catch(e){return console.error(e),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},e.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&e.readyState>2},e.getMediaElement=function(e,t){var n=document.getElementById(e);if(!n)throw new ar("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==t.toLowerCase())throw new ar("element with id '"+e+"' must be an "+t+" element");return n},e.createVideoElement=function(t){if(t instanceof HTMLVideoElement)return t;if("string"==typeof t)return e.getMediaElement(t,"video");if(!t&&"undefined"!=typeof document){var n=document.createElement("video");return n.width=200,n.height=200,n}throw new Error("Couldn't get videoElement from videoSource!")},e.prepareImageElement=function(t){if(t instanceof HTMLImageElement)return t;if("string"==typeof t)return e.getMediaElement(t,"img");if(void 0===t){var n=document.createElement("img");return n.width=200,n.height=200,n}throw new Error("Couldn't get imageElement from imageSource!")},e.prepareVideoElement=function(t){var n=e.createVideoElement(t);return n.setAttribute("autoplay","true"),n.setAttribute("muted","true"),n.setAttribute("playsinline","true"),n},e.isImageLoaded=function(e){return!!e.complete&&0!==e.naturalWidth},e.createBinaryBitmapFromCanvas=function(e){var t=new nu(e),n=new Br(t);return new lr(n)},e.drawImageOnCanvas=function(e,t){e.drawImage(t,0,0)},e.getMediaElementDimensions=function(e){if(e instanceof HTMLVideoElement)return{height:e.videoHeight,width:e.videoWidth};if(e instanceof HTMLImageElement)return{height:e.naturalHeight||e.height,width:e.naturalWidth||e.width};throw new Error("Couldn't find the Source's dimentions!")},e.createCaptureCanvas=function(t){if(!t)throw new ar("Cannot create a capture canvas without a media element.");if("undefined"==typeof document)throw new Error('The page "Document" is undefined, make sure you\'re running in a browser.');var n=document.createElement("canvas"),r=e.getMediaElementDimensions(t),o=r.width,i=r.height;return n.style.width=o+"px",n.style.height=i+"px",n.width=o,n.height=i,n},e.tryPlayVideo=function(t){return iu(this,void 0,void 0,(function(){var n;return au(this,(function(r){switch(r.label){case 0:if(null==t?void 0:t.ended)return console.error("Trying to play video that has ended."),[2,!1];if(e.isVideoPlaying(t))return console.warn("Trying to play video that is already playing."),[2,!0];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t.play()];case 2:return r.sent(),[2,!0];case 3:return n=r.sent(),console.warn("It was not possible to play the video.",n),[2,!1];case 4:return[2]}}))}))},e.createCanvasFromMediaElement=function(t){var n=e.createCaptureCanvas(t),r=n.getContext("2d");if(!r)throw new Error("Couldn't find Canvas 2D Context.");return e.drawImageOnCanvas(r,t),n},e.createBinaryBitmapFromMediaElem=function(t){var n=e.createCanvasFromMediaElement(t);return e.createBinaryBitmapFromCanvas(n)},e.destroyImageElement=function(e){e.src="",e.removeAttribute("src"),e=void 0},e.listVideoInputDevices=function(){return iu(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u,l,c,d;return au(this,(function(f){switch(f.label){case 0:if(!ru())throw new Error("Can't enumerate devices, navigator is not present.");if(!(ru()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices))throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=f.sent(),t=[];try{for(n=su(e),r=n.next();!r.done;r=n.next())o=r.value,"videoinput"===(i="video"===o.kind?"videoinput":o.kind)&&(a=o.deviceId||o.id,s=o.label||"Video device "+(t.length+1),u=o.groupId,l={deviceId:a,label:s,kind:i,groupId:u},t.push(l))}catch(e){c={error:e}}finally{try{r&&!r.done&&(d=n.return)&&d.call(n)}finally{if(c)throw c.error}}return[2,t]}}))}))},e.findDeviceById=function(t){return iu(this,void 0,void 0,(function(){var n;return au(this,(function(r){switch(r.label){case 0:return[4,e.listVideoInputDevices()];case 1:return(n=r.sent())?[2,n.find((function(e){return e.deviceId===t}))]:[2]}}))}))},e.cleanVideoSource=function(e){if(e){try{e.srcObject=null}catch(t){e.src=""}e&&e.removeAttribute("src")}},e.playVideoOnLoadAsync=function(t,n){return iu(this,void 0,void 0,(function(){return au(this,(function(r){switch(r.label){case 0:return[4,e.tryPlayVideo(t)];case 1:return r.sent()?[2,!0]:[2,new Promise((function(r,o){var i=setTimeout((function(){e.isVideoPlaying(t)||(o(!1),t.removeEventListener("canplay",a))}),n),a=function n(){e.tryPlayVideo(t).then((function(e){clearTimeout(i),t.removeEventListener("canplay",n),r(e)}))};t.addEventListener("canplay",a)}))]}}))}))},e.attachStreamToVideo=function(t,n,r){return void 0===r&&(r=5e3),iu(this,void 0,void 0,(function(){var o;return au(this,(function(i){switch(i.label){case 0:return o=e.prepareVideoElement(n),e.addVideoSource(o,t),[4,e.playVideoOnLoadAsync(o,r)];case 1:return i.sent(),[2,o]}}))}))},e._waitImageLoad=function(t){return new Promise((function(n,r){var o=setTimeout((function(){e.isImageLoaded(t)||(t.removeEventListener("load",i),r())}),1e4),i=function e(){clearTimeout(o),t.removeEventListener("load",e),n()};t.addEventListener("load",i)}))},e.checkCallbackFnOrThrow=function(e){if(!e)throw new ar("`callbackFn` is a required parameter, you cannot capture results without it.")},e.disposeMediaStream=function(e){e.getVideoTracks().forEach((function(e){return e.stop()})),e=void 0},e.prototype.decode=function(t){var n=e.createCanvasFromMediaElement(t);return this.decodeFromCanvas(n)},e.prototype.decodeBitmap=function(e){return this.reader.decode(e,this.hints)},e.prototype.decodeFromCanvas=function(t){var n=e.createBinaryBitmapFromCanvas(t);return this.decodeBitmap(n)},e.prototype.decodeFromImageElement=function(t){return iu(this,void 0,void 0,(function(){var n;return au(this,(function(r){switch(r.label){case 0:if(!t)throw new ar("An image element must be provided.");return n=e.prepareImageElement(t),[4,this._decodeOnLoadImage(n)];case 1:return[2,r.sent()]}}))}))},e.prototype.decodeFromImageUrl=function(t){return iu(this,void 0,void 0,(function(){var n;return au(this,(function(r){switch(r.label){case 0:if(!t)throw new ar("An URL must be provided.");(n=e.prepareImageElement()).src=t,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this.decodeFromImageElement(n)];case 2:return[2,r.sent()];case 3:return e.destroyImageElement(n),[7];case 4:return[2]}}))}))},e.prototype.decodeFromConstraints=function(t,n,r){return iu(this,void 0,void 0,(function(){var o,i;return au(this,(function(a){switch(a.label){case 0:return e.checkCallbackFnOrThrow(r),[4,navigator.mediaDevices.getUserMedia(t)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,n,r)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),e.disposeMediaStream(o),i;case 5:return[2]}}))}))},e.prototype.decodeFromStream=function(t,n,r){return iu(this,void 0,void 0,(function(){var o,i,a,s,u,l,c,d,f,p,h=this;return au(this,(function(m){switch(m.label){case 0:return e.checkCallbackFnOrThrow(r),o=this.options.tryPlayVideoTimeout,[4,e.attachStreamToVideo(t,n,o)];case 1:return i=m.sent(),a=function(){var e,n;try{for(var r=su(t.getVideoTracks()),o=r.next();!o.done;o=r.next())o.value.stop()}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t=void 0},s=function(){a(),e.cleanVideoSource(i)},u=this.scan(i,r,s),l=t.getVideoTracks(),c=ou(ou({},u),{stop:function(){u.stop()},streamVideoConstraintsApply:function(e,t){return iu(this,void 0,void 0,(function(){var n,r,o,i,a,s;return au(this,(function(u){switch(u.label){case 0:n=t?l.filter(t):l,u.label=1;case 1:u.trys.push([1,6,7,8]),r=su(n),o=r.next(),u.label=2;case 2:return o.done?[3,5]:[4,o.value.applyConstraints(e)];case 3:u.sent(),u.label=4;case 4:return o=r.next(),[3,2];case 5:return[3,8];case 6:return i=u.sent(),a={error:i},[3,8];case 7:try{o&&!o.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}return[7];case 8:return[2]}}))}))},streamVideoConstraintsGet:function(e){return l.find(e).getConstraints()},streamVideoSettingsGet:function(e){return l.find(e).getSettings()},streamVideoCapabilitiesGet:function(e){return l.find(e).getCapabilities()}}),e.mediaStreamIsTorchCompatible(t)&&(d=null==l?void 0:l.find((function(t){return e.mediaStreamIsTorchCompatibleTrack(t)})),f=function(t){return iu(h,void 0,void 0,(function(){return au(this,(function(n){switch(n.label){case 0:return[4,e.mediaStreamSetTorch(d,t)];case 1:return n.sent(),[2]}}))}))},c.switchTorch=f,p=function(){u.stop(),f(!1)},c.stop=p),[2,c]}}))}))},e.prototype.decodeFromVideoDevice=function(t,n,r){return iu(this,void 0,void 0,(function(){var o;return au(this,(function(i){switch(i.label){case 0:return e.checkCallbackFnOrThrow(r),o={video:t?{deviceId:{exact:t}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,n,r)];case 1:return[2,i.sent()]}}))}))},e.prototype.decodeFromVideoElement=function(t,n){return iu(this,void 0,void 0,(function(){var r,o;return au(this,(function(i){switch(i.label){case 0:if(e.checkCallbackFnOrThrow(n),!t)throw new ar("A video element must be provided.");return r=e.prepareVideoElement(t),o=this.options.tryPlayVideoTimeout,[4,e.playVideoOnLoadAsync(r,o)];case 1:return i.sent(),[2,this.scan(r,n)]}}))}))},e.prototype.decodeFromVideoUrl=function(t,n){return iu(this,void 0,void 0,(function(){var r,o,i;return au(this,(function(a){switch(a.label){case 0:if(e.checkCallbackFnOrThrow(n),!t)throw new ar("An URL must be provided.");return(r=e.prepareVideoElement()).src=t,o=function(){e.cleanVideoSource(r)},i=this.options.tryPlayVideoTimeout,[4,e.playVideoOnLoadAsync(r,i)];case 1:return a.sent(),[2,this.scan(r,n,o)]}}))}))},e.prototype.decodeOnceFromConstraints=function(e,t){return iu(this,void 0,void 0,(function(){var n;return au(this,(function(r){switch(r.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=r.sent(),[4,this.decodeOnceFromStream(n,t)];case 2:return[2,r.sent()]}}))}))},e.prototype.decodeOnceFromStream=function(t,n){return iu(this,void 0,void 0,(function(){var r,o;return au(this,(function(i){switch(i.label){case 0:return r=Boolean(n),[4,e.attachStreamToVideo(t,n)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return r||e.cleanVideoSource(o),[7];case 5:return[2]}}))}))},e.prototype.decodeOnceFromVideoDevice=function(e,t){return iu(this,void 0,void 0,(function(){var n;return au(this,(function(r){switch(r.label){case 0:return n={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(n,t)];case 1:return[2,r.sent()]}}))}))},e.prototype.decodeOnceFromVideoElement=function(t){return iu(this,void 0,void 0,(function(){var n,r;return au(this,(function(o){switch(o.label){case 0:if(!t)throw new ar("A video element must be provided.");return n=e.prepareVideoElement(t),r=this.options.tryPlayVideoTimeout,[4,e.playVideoOnLoadAsync(n,r)];case 1:return o.sent(),[4,this.scanOneResult(n)];case 2:return[2,o.sent()]}}))}))},e.prototype.decodeOnceFromVideoUrl=function(t){return iu(this,void 0,void 0,(function(){var n,r;return au(this,(function(o){switch(o.label){case 0:if(!t)throw new ar("An URL must be provided.");(n=e.prepareVideoElement()).src=t,r=this.decodeOnceFromVideoElement(n),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,r];case 2:return[2,o.sent()];case 3:return e.cleanVideoSource(n),[7];case 4:return[2]}}))}))},e.prototype.scanOneResult=function(e,t,n,r){var o=this;return void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),new Promise((function(i,a){o.scan(e,(function(e,o,s){if(e)return i(e),void s.stop();if(o){if(o instanceof Pr&&t)return;if(o instanceof dr&&n)return;if(o instanceof Sr&&r)return;s.stop(),a(o)}}))}))},e.prototype.scan=function(t,n,r){var o=this;e.checkCallbackFnOrThrow(n);var i=e.createCaptureCanvas(t),a=i.getContext("2d");if(!a)throw new Error("Couldn't create canvas for visual element scan.");var s,u=function(){a=void 0,i=void 0},l=!1,c={stop:function(){l=!0,clearTimeout(s),u(),r&&r()}};return function d(){if(!l)try{e.drawImageOnCanvas(a,t);var f=o.decodeFromCanvas(i);n(f,void 0,c),s=setTimeout(d,o.options.delayBetweenScanSuccess)}catch(e){if(n(void 0,e,c),e instanceof dr||e instanceof Sr||e instanceof Pr)return void(s=setTimeout(d,o.options.delayBetweenScanAttempts));u(),r&&r(e)}}(),c},e.prototype._decodeOnLoadImage=function(t){return iu(this,void 0,void 0,(function(){return au(this,(function(n){switch(n.label){case 0:return e.isImageLoaded(t)?[3,2]:[4,e._waitImageLoad(t)];case 1:n.sent(),n.label=2;case 2:return[2,this.decode(t)]}}))}))},e}(),cu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){cu((function(t,n){return e.call(this,new Oo,t,n)||this}),e)}(lu);var du=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){du((function(t,n){return e.call(this,new na(t),t,n)||this}),e)}(lu);var fu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){fu((function(t,n){return e.call(this,new ga,t,n)||this}),e)}(lu);var pu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){function t(t,n){var r=this,o=new js;return o.setHints(t),(r=e.call(this,o,t,n)||this).reader=o,r}pu(t,e),Object.defineProperty(t.prototype,"possibleFormats",{set:function(e){this.hints.set(Er.POSSIBLE_FORMATS,e),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),t.prototype.decodeBitmap=function(e){return this.reader.decodeWithState(e)},t.prototype.setHints=function(e){this.hints=e,this.reader.setHints(this.hints)}}(lu);var hu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();!function(e){hu((function(t,n){return e.call(this,new Ns,t,n)||this}),e)}(lu);var mu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vu=function(e){function t(t,n){return e.call(this,new Ya,t,n)||this}return mu(t,e),t}(lu),gu=function(e,t,n){var r=typeof e===n;return r||console.warn('[ReactQrReader]: Expected "'.concat(t,'" to be a of type "').concat(n,'".')),r},yu=function(){return yu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},yu.apply(this,arguments)},wu={width:"100%",paddingTop:"100%",overflow:"hidden",position:"relative"},bu={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden",position:"absolute",transform:void 0},_u=function(e){var n=e.videoContainerStyle,r=e.containerStyle,o=e.videoStyle,i=e.constraints,a=e.ViewFinder,s=e.scanDelay,u=e.className,l=e.onResult,c=e.videoId;return function(e){var n=e.scanDelay,r=e.constraints,o=e.onResult,i=e.videoId,a=(0,t.useRef)(null);(0,t.useEffect)((function(){var e=new vu(null,{delayBetweenScanAttempts:n});return!function(){var e="undefined"!=typeof navigator&&!!navigator.mediaDevices;return e||console.warn('[ReactQrReader]: MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),e}()&&gu(o,"onResult","function")&&o(null,new Error('MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),e),gu(r,"constraints","object")&&e.decodeFromConstraints({video:r},i,(function(t,n){gu(o,"onResult","function")&&o(t,n,e)})).then((function(e){return a.current=e})).catch((function(t){gu(o,"onResult","function")&&o(null,t,e)})),function(){var e;null===(e=a.current)||void 0===e||e.stop()}}),[])}({constraints:i,scanDelay:s,onResult:l,videoId:c}),t.createElement("section",{className:u,style:r},t.createElement("div",{style:yu(yu({},wu),n)},!!a&&t.createElement(a,null),t.createElement("video",{muted:!0,id:c,style:yu(yu(yu({},bu),o),{transform:"user"===(null==i?void 0:i.facingMode)&&"scaleX(-1)"})})))};_u.displayName="QrReader",_u.defaultProps={constraints:{facingMode:"user"},videoId:"video",scanDelay:500};var Eu=function(e,t){return Ge().get("".concat(Ye,"/global/download/")+e+"/"+t,function(){var e={"Content-Type":"application/json"},t=JSON.parse(localStorage.getItem("auth"));return t&&t.token&&(e=He(He({},e),{},{"X-Auth-Token":t.token})),{responseType:"blob",headers:e}}())},xu=function(e){return Ge().get("".concat(Ye,"/global/locations/")+e,Ke())},Su=function(e){return Ge().get("".concat(Ye,"/global/departments/")+e,Ke())},Cu=function(e){return Ge().get("".concat(Ye,"/global/product/documents/")+e,Ke())},Iu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"response",n="Er is een fout opgetreden met het ophalen/verwerken van de gegevens, excuses voor het ongemak";return null===e||void 0===e||"object"!==typeof e?e={status:"error",message:n}:"SESSION_EXPIRED"===e.status?(e.status="error",e.message="SESSION_EXPIRED"):void 0!==e.response&&null!==e.response&&403===e.response.status?(e.status="error",e.message="FORBIDDEN"):(500===e.status||404===e.status||"error"===e.status&&void 0===e.message||"error"!==e.status&&void 0===e[t])&&("error"===e.status&&void 0!==e[t]&&void 0!==e.message&&(n=e.message),"localhost:3000"===window.location.host&&(500===e.status||404===e.status?n+=" (http "+e.status+")":void 0===e[t]&&(n+=" (identifier mist in response: "+t+" )")),e={status:"error",message:n}),"error"!==e.status&&"success"!==e.status&&"localhost:3000"===window.location.host&&(e.status="error",e.message="De data response status wordt wordt niet in het juiste formaat verstuurd: "+e.status),e},Au=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==e&&-1!==e.indexOf(":")){var n={};e.split("/").forEach((function(e){if(0===e.indexOf(":")){var r,o=e.replace(":","");n[o]=null!==(r=t[o])&&void 0!==r?r:t[e]}})),Object.keys(n).forEach((function(t){var r=0===t.indexOf(":")?t.replace(":","",t):t;if(-1!==e.indexOf(r)){var o=n[t];e=e.replace(":"+r,o)}}))}return e},Ou=function(e){if(void 0!==e&&null!==e){if(4===e.indexOf("-")){var t=e.substring(0,10).split("-");return t[2]+"-"+t[1]+"-"+t[0]}return e}},Nu=function(e){var t=JSON.parse(localStorage.getItem("last-page"));return null!==t&&void 0!==t&&t.identifier===e?t.pageNr:1},Tu=function(e,t,n){localStorage.setItem("last-page",JSON.stringify({identifier:t,pageNr:e})),void 0!==n&&n(e)},ku=function(e,t,n){var r=JSON.parse(localStorage.getItem(e+t));void 0!==r&&null!==r&&"object"===typeof r?void 0!==r.name&&n(r.name):function(e,t){return Ge().get("".concat(Ye,"/global/pagetitle/")+e+"/"+t,Ke())}(e,t).then((function(o){var i=o.data;"success"===i.status&&(void 0!==r&&null!==r||(r={}),r.name=i.response,localStorage.setItem(e+t,JSON.stringify(r)),n(r.name))}))},Ru=function(e){return Ge().post("".concat(Ye,"/customer/articles/overview"),e,Ke())},ju=function(e){return Ge().post("".concat(Ye,"/customer/articles/product/repairs/overview"),e,Ke())},Du=function(e){return Ge().post("".concat(Ye,"/customer/articles/product/inspections/overview"),e,Ke())},Pu=function(e){return Ge().post("".concat(Ye,"/customer/depot/cases"),e,Ke())},Mu=function(e){return Ge().get("".concat(Ye,"/customer/articles/details/")+e,Ke())},Lu=function(e){return Ge().get("".concat(Ye,"/customer/articles/customfields/")+e,Ke())},Fu=function(e,t){var n=JSON.parse(localStorage.getItem("product-"+e));void 0!==n&&null!==n&&void 0!==n.barcode?t(n.barcode):function(e){return Ge().get("".concat(Ye,"/customer/articles/barcode/")+e,Ke())}(e).then((function(r){var o=r.data;if("success"===o.status){var i;void 0!==n&&null!==n||(n={});var a=null!==(i=o.barcode)&&void 0!==i?i:null;n.barcode=a,localStorage.setItem("product-"+e,JSON.stringify(n)),t(a)}}))},Bu=function(e){var t=JSON.parse(localStorage.getItem("product-"+e));if(void 0!==t&&null!==t&&void 0!==t.status||Mu(e).then((function(n){var r=n.data;"success"===r.status&&(t=r.details,localStorage.setItem("product-"+e,JSON.stringify(t)))})),void 0!==t&&null!==t&&void 0!==t.status)return console.log(t),1===t.enableReservation||"1"===t.enableReservation?"RESERVED":t.status},Vu=function(e,t,n){var r={},o=null;return Object.keys(e).forEach((function(i){var a=Uu(t[i],e[i].rules,n);"success"!==a.status?(r[i]=a.message,o="error"):null===o&&(o="success")})),{status:o,errors:r}},Uu=function(e,t,n){var r={status:"success"};return void 0===t||null===t||(void 0!==e&&null!==e&&0!==e.length||(e=null),t.forEach((function(t){switch(t){case"required":null===e&&!0===n&&(r.message="Verplicht veld",r.status="error");break;case"numeric":null!==e&&isNaN(e)&&(r.message="Ongeldige numerieke waarde",r.status="error");break;case"email":null!==e&&!0===n&&!1===Hu(e)&&(r.message="Ongeldig e-mail adres",r.status="error");break;default:console.log("no rule for "+t)}})),"success"!==r.status&&void 0===r.message&&(r.message="Ongeldige invoer")),r},Hu=function(e){return!!e.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/)},zu=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=null!==e&&void 0!==e?e:{};return null!==r?(void 0===o[r]&&(o[r]={}),o[r][t]=n):o[t]=n,o},Gu=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e;return e?(null!==n?void 0!==r[n]&&void 0!==r[n][t]&&delete r[n][t]:void 0!==r[t]&&delete r[t],r):r},Wu=function(e){if(Array.isArray(e))return e;var t=[];return Object.keys(e).map((function(n){return t.push({value:n,label:e[n]})})),t},Xu=function(e,t){var n,r=Wu(t);return Object.keys(r).forEach((function(t){r[t].value===e&&(n=r[t])})),n},Yu=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qu.apply(this,arguments)}var Ku=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Zu=Math.abs,Ju=String.fromCharCode,$u=Object.assign;function Qu(e){return e.trim()}function el(e,t,n){return e.replace(t,n)}function tl(e,t){return e.indexOf(t)}function nl(e,t){return 0|e.charCodeAt(t)}function rl(e,t,n){return e.slice(t,n)}function ol(e){return e.length}function il(e){return e.length}function al(e,t){return t.push(e),e}var sl=1,ul=1,ll=0,cl=0,dl=0,fl="";function pl(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:sl,column:ul,length:a,return:""}}function hl(e,t){return $u(pl("",null,null,"",null,null,0),e,{length:-e.length},t)}function ml(){return dl=cl>0?nl(fl,--cl):0,ul--,10===dl&&(ul=1,sl--),dl}function vl(){return dl=cl<ll?nl(fl,cl++):0,ul++,10===dl&&(ul=1,sl++),dl}function gl(){return nl(fl,cl)}function yl(){return cl}function wl(e,t){return rl(fl,e,t)}function bl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _l(e){return sl=ul=1,ll=ol(fl=e),cl=0,[]}function El(e){return fl="",e}function xl(e){return Qu(wl(cl-1,Il(91===e?e+2:40===e?e+1:e)))}function Sl(e){for(;(dl=gl())&&dl<33;)vl();return bl(e)>2||bl(dl)>3?"":" "}function Cl(e,t){for(;--t&&vl()&&!(dl<48||dl>102||dl>57&&dl<65||dl>70&&dl<97););return wl(e,yl()+(t<6&&32==gl()&&32==vl()))}function Il(e){for(;vl();)switch(dl){case e:return cl;case 34:case 39:34!==e&&39!==e&&Il(dl);break;case 40:41===e&&Il(e);break;case 92:vl()}return cl}function Al(e,t){for(;vl()&&e+dl!==57&&(e+dl!==84||47!==gl()););return"/*"+wl(t,cl-1)+"*"+Ju(47===e?e:vl())}function Ol(e){for(;!bl(gl());)vl();return wl(e,cl)}var Nl="-ms-",Tl="-moz-",kl="-webkit-",Rl="comm",jl="rule",Dl="decl",Pl="@keyframes";function Ml(e,t){for(var n="",r=il(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ll(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Dl:return e.return=e.return||e.value;case Rl:return"";case Pl:return e.return=e.value+"{"+Ml(e.children,r)+"}";case jl:e.value=e.props.join(",")}return ol(n=Ml(e.children,r))?e.return=e.value+"{"+n+"}":""}function Fl(e){return El(Bl("",null,null,null,[""],e=_l(e),0,[0],e))}function Bl(e,t,n,r,o,i,a,s,u){for(var l=0,c=0,d=a,f=0,p=0,h=0,m=1,v=1,g=1,y=0,w="",b=o,_=i,E=r,x=w;v;)switch(h=y,y=vl()){case 40:if(108!=h&&58==nl(x,d-1)){-1!=tl(x+=el(xl(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:x+=xl(y);break;case 9:case 10:case 13:case 32:x+=Sl(h);break;case 92:x+=Cl(yl()-1,7);continue;case 47:switch(gl()){case 42:case 47:al(Ul(Al(vl(),yl()),t,n),u);break;default:x+="/"}break;case 123*m:s[l++]=ol(x)*g;case 125*m:case 59:case 0:switch(y){case 0:case 125:v=0;case 59+c:-1==g&&(x=el(x,/\f/g,"")),p>0&&ol(x)-d&&al(p>32?Hl(x+";",r,n,d-1):Hl(el(x," ","")+";",r,n,d-2),u);break;case 59:x+=";";default:if(al(E=Vl(x,t,n,l,c,o,s,w,b=[],_=[],d),i),123===y)if(0===c)Bl(x,t,E,E,b,i,d,s,_);else switch(99===f&&110===nl(x,3)?100:f){case 100:case 108:case 109:case 115:Bl(e,E,E,r&&al(Vl(e,E,E,0,0,o,s,w,o,b=[],d),_),o,_,d,s,r?b:_);break;default:Bl(x,E,E,E,[""],_,0,s,_)}}l=c=p=0,m=g=1,w=x="",d=a;break;case 58:d=1+ol(x),p=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==ml())continue;switch(x+=Ju(y),y*m){case 38:g=c>0?1:(x+="\f",-1);break;case 44:s[l++]=(ol(x)-1)*g,g=1;break;case 64:45===gl()&&(x+=xl(vl())),f=gl(),c=d=ol(w=x+=Ol(yl())),y++;break;case 45:45===h&&2==ol(x)&&(m=0)}}return i}function Vl(e,t,n,r,o,i,a,s,u,l,c){for(var d=o-1,f=0===o?i:[""],p=il(f),h=0,m=0,v=0;h<r;++h)for(var g=0,y=rl(e,d+1,d=Zu(m=a[h])),w=e;g<p;++g)(w=Qu(m>0?f[g]+" "+y:el(y,/&\f/g,f[g])))&&(u[v++]=w);return pl(e,t,n,0===o?jl:s,u,l,c)}function Ul(e,t,n){return pl(e,t,n,Rl,Ju(dl),rl(e,2,-2),0)}function Hl(e,t,n,r){return pl(e,t,n,Dl,rl(e,0,r),rl(e,r+1,-1),r)}var zl=function(e,t,n){for(var r=0,o=0;r=o,o=gl(),38===r&&12===o&&(t[n]=1),!bl(o);)vl();return wl(e,cl)},Gl=function(e,t){return El(function(e,t){var n=-1,r=44;do{switch(bl(r)){case 0:38===r&&12===gl()&&(t[n]=1),e[n]+=zl(cl-1,t,n);break;case 2:e[n]+=xl(r);break;case 4:if(44===r){e[++n]=58===gl()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ju(r)}}while(r=vl());return e}(_l(e),t))},Wl=new WeakMap,Xl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Wl.get(n))&&!r){Wl.set(e,!0);for(var o=[],i=Gl(t,o),a=n.props,s=0,u=0;s<i.length;s++)for(var l=0;l<a.length;l++,u++)e.props[u]=o[s]?i[s].replace(/&\f/g,a[l]):a[l]+" "+i[s]}}},Yl=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ql(e,t){switch(function(e,t){return 45^nl(e,0)?(((t<<2^nl(e,0))<<2^nl(e,1))<<2^nl(e,2))<<2^nl(e,3):0}(e,t)){case 5103:return"-webkit-print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return kl+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return kl+e+Tl+e+Nl+e+e;case 6828:case 4268:return kl+e+Nl+e+e;case 6165:return kl+e+Nl+"flex-"+e+e;case 5187:return kl+e+el(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return kl+e+Nl+"flex-item-"+el(e,/flex-|-self/,"")+e;case 4675:return kl+e+Nl+"flex-line-pack"+el(e,/align-content|flex-|-self/,"")+e;case 5548:return kl+e+Nl+el(e,"shrink","negative")+e;case 5292:return kl+e+Nl+el(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+el(e,"-grow","")+kl+e+Nl+el(e,"grow","positive")+e;case 4554:return kl+el(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return el(el(el(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return el(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return el(el(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+kl+e+e;case 4095:case 3583:case 4068:case 2532:return el(e,/(.+)-inline(.+)/,"-webkit-$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ol(e)-1-t>6)switch(nl(e,t+1)){case 109:if(45!==nl(e,t+4))break;case 102:return el(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==nl(e,t+3)?"$3":"$2-$3"))+e;case 115:return~tl(e,"stretch")?ql(el(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==nl(e,t+1))break;case 6444:switch(nl(e,ol(e)-3-(~tl(e,"!important")&&10))){case 107:return el(e,":",":-webkit-")+e;case 101:return el(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===nl(e,14)?"inline-":"")+"box$3$1"+"-webkit-$2$3$1"+"-ms-$2box$3")+e}break;case 5936:switch(nl(e,t+11)){case 114:return kl+e+Nl+el(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return kl+e+Nl+el(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return kl+e+Nl+el(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return kl+e+Nl+e+e}return e}var Kl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Dl:e.return=ql(e.value,e.length);break;case Pl:return Ml([hl(e,{value:el(e.value,"@","@-webkit-")})],r);case jl:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ml([hl(e,{props:[el(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ml([hl(e,{props:[el(t,/:(plac\w+)/,":-webkit-input-$1")]}),hl(e,{props:[el(t,/:(plac\w+)/,":-moz-$1")]}),hl(e,{props:[el(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],Zl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||Kl;var o,i,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var u,l,c=[Ll,(l=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],d=function(e){var t=il(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([Xl,Yl].concat(r,c));i=function(e,t,n,r){u=n,Ml(Fl(e?e+"{"+t.styles+"}":t.styles),d),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Ku({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f};var Jl=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var $l={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ql(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var ec=/[A-Z]|^ms/g,tc=/_EMO_([^_]+?)_([^]*?)_EMO_/g,nc=function(e){return 45===e.charCodeAt(1)},rc=function(e){return null!=e&&"boolean"!==typeof e},oc=Ql((function(e){return nc(e)?e:e.replace(ec,"-$&").toLowerCase()})),ic=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(tc,(function(e,t,n){return sc={name:t,styles:n,next:sc},t}))}return 1===$l[e]||nc(e)||"number"!==typeof t||0===t?t:t+"px"};function ac(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return sc={name:n.name,styles:n.styles,next:sc},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)sc={name:r.name,styles:r.styles,next:sc},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ac(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!==typeof a)null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":rc(a)&&(r+=oc(i)+":"+ic(i,a)+";");else if(!Array.isArray(a)||"string"!==typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=ac(e,t,a);switch(i){case"animation":case"animationName":r+=oc(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var u=0;u<a.length;u++)rc(a[u])&&(r+=oc(i)+":"+ic(i,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var o=sc,i=n(e);return sc=o,ac(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var sc,uc=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var lc=function(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";sc=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ac(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=ac(n,t,e[a]),r&&(o+=i[a]);uc.lastIndex=0;for(var s,u="";null!==(s=uc.exec(o));)u+="-"+s[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+u;return{name:l,styles:o,next:sc}},cc=!!r.useInsertionEffect&&r.useInsertionEffect,dc=cc||function(e){return e()},fc=(cc||t.useLayoutEffect,{}.hasOwnProperty),pc=t.createContext("undefined"!==typeof HTMLElement?Zl({key:"css"}):null);pc.Provider;var hc=function(e){return(0,t.forwardRef)((function(n,r){var o=(0,t.useContext)(pc);return e(n,o,r)}))};var mc=t.createContext({});var vc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",gc=function(e,t){var n={};for(var r in t)fc.call(t,r)&&(n[r]=t[r]);return n[vc]=e,n},yc=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Jl(t,n,r),dc((function(){return function(e,t,n){Jl(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)})),null},wc=hc((function(e,n,r){var o=e.css;"string"===typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=e[vc],a=[o],s="";"string"===typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(n.registered,a,e.className):null!=e.className&&(s=e.className+" ");var u=lc(a,void 0,t.useContext(mc));s+=n.key+"-"+u.name;var l={};for(var c in e)fc.call(e,c)&&"css"!==c&&c!==vc&&(l[c]=e[c]);return l.ref=r,l.className=s,t.createElement(t.Fragment,null,t.createElement(yc,{cache:n,serialized:u,isStringTag:"string"===typeof i}),t.createElement(i,l))}));var bc=wc,_c=(n(2110),function(e,n){var r=arguments;if(null==n||!fc.call(n,"css"))return t.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=bc,i[1]=gc(e,n);for(var a=2;a<o;a++)i[a]=r[a];return t.createElement.apply(null,i)});function Ec(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return lc(t)}function xc(e){return He(He({},e),{},{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}Math.min,Math.max;var Sc=["top","right","bottom","left"];Sc.reduce((function(e,t){return e.concat(t,t+"-start",t+"-end")}),[]);function Cc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ic(e){return Cc(e).getComputedStyle(e)}function Ac(e){return e instanceof Cc(e).Node}function Oc(e){return Ac(e)?(e.nodeName||"").toLowerCase():"#document"}function Nc(e){return e instanceof Cc(e).HTMLElement}function Tc(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Cc(e).ShadowRoot||e instanceof ShadowRoot)}function kc(e){var t=Ic(e),n=t.overflow,r=t.overflowX,o=t.overflowY,i=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!["inline","contents"].includes(i)}function Rc(e){return["table","td","th"].includes(Oc(e))}function jc(e){var t=Dc(),n=Ic(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((function(e){return(n.willChange||"").includes(e)}))||["paint","layout","strict","content"].some((function(e){return(n.contain||"").includes(e)}))}function Dc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Pc(e){return["html","body","#document"].includes(Oc(e))}var Mc=Math.min,Lc=Math.max,Fc=Math.round,Bc=Math.floor,Vc=function(e){return{x:e,y:e}};function Uc(e){var t=Ic(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Nc(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Fc(n)!==i||Fc(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Hc(e){return e instanceof Cc(e).Element}function zc(e){return Hc(e)?e:e.contextElement}function Gc(e){var t=zc(e);if(!Nc(t))return Vc(1);var n=t.getBoundingClientRect(),r=Uc(t),o=r.width,i=r.height,a=r.$,s=(a?Fc(n.width):n.width)/o,u=(a?Fc(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),u&&Number.isFinite(u)||(u=1),{x:s,y:u}}var Wc=Vc(0);function Xc(e){var t=Cc(e);return Dc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Wc}function Yc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);var o=e.getBoundingClientRect(),i=zc(e),a=Vc(1);t&&(r?Hc(r)&&(a=Gc(r)):a=Gc(e));var s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Cc(e))&&t}(i,n,r)?Xc(i):Vc(0),u=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i)for(var f=Cc(i),p=r&&Hc(r)?Cc(r):r,h=f.frameElement;h&&r&&p!==f;){var m=Gc(h),v=h.getBoundingClientRect(),g=getComputedStyle(h),y=v.left+(h.clientLeft+parseFloat(g.paddingLeft))*m.x,w=v.top+(h.clientTop+parseFloat(g.paddingTop))*m.y;u*=m.x,l*=m.y,c*=m.x,d*=m.y,u+=y,l+=w,h=Cc(h).frameElement}return xc({width:c,height:d,x:u,y:l})}function qc(e){return Hc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Kc(e){return((Ac(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zc(e){return Yc(Kc(e)).left+qc(e).scrollLeft}function Jc(e){if("html"===Oc(e))return e;var t=e.assignedSlot||e.parentNode||Tc(e)&&e.host||Kc(e);return Tc(t)?t.host:t}function $c(e){var t=Jc(e);return Pc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nc(t)&&kc(t)?t:$c(t)}function Qc(e,t){var n;void 0===t&&(t=[]);var r=$c(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Cc(r);return o?t.concat(i,i.visualViewport||[],kc(r)?r:[]):t.concat(r,Qc(r))}function ed(e,t,n){var r;if("viewport"===t)(function(e,t){var n=Cc(e),r=Kc(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){o.width,o.height;var l=Dc();(!l||l&&"fixed"===t)&&(o.offsetLeft,o.offsetTop)}return{width:i,height:a,x:s,y:u}})(e,n);else if("document"===t)(function(e){var t=Kc(e),n=qc(e),r=e.ownerDocument.body,o=Lc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Lc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+Zc(e),s=-n.scrollTop;return"rtl"===Ic(r).direction&&Lc(t.clientWidth,r.clientWidth)-o,{width:o,height:i,x:a,y:s}})(Kc(e));else if(Hc(t))(function(e,t){var n=Yc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Nc(e)?Gc(e):Vc(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}})(t,n);else{var o=Xc(e);He(He({},t),{},{x:t.x-o.x,y:t.y-o.y})}return xc(r)}function td(e,t){var n=Jc(e);return!(n===t||!Hc(n)||Pc(n))&&("fixed"===Ic(n).position||td(n,t))}function nd(e,t,n){var r=Nc(t),o=Kc(t),i="fixed"===n,a=Yc(e,!0,i,t),s={scrollLeft:0,scrollTop:0},u=Vc(0);if(r||!r&&!i)if(("body"!==Oc(t)||kc(o))&&(s=qc(t)),Nc(t)){var l=Yc(t,!0,i,t);u.x=l.x+t.clientLeft,u.y=l.y+t.clientTop}else o&&(u.x=Zc(o));return{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function rd(e,t){return Nc(e)&&"fixed"!==Ic(e).position?t?t(e):e.offsetParent:null}function od(e,t){var n=Cc(e);if(!Nc(e))return n;for(var r=rd(e,t);r&&Rc(r)&&"static"===Ic(r).position;)r=rd(r,t);return r&&("html"===Oc(r)||"body"===Oc(r)&&"static"===Ic(r).position&&!jc(r))?n:r||function(e){for(var t=Jc(e);Nc(t)&&!Pc(t);){if(jc(t))return t;t=Jc(t)}return null}(e)||n}!function(){var e=tt(Qe().mark((function e(t){var n,r,o,i,a;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.reference,r=t.floating,o=t.strategy,i=this.getOffsetParent||od,a=this.getDimensions,e.t0=nd,e.t1=n,e.next=6,i(r);case 6:return e.t2=e.sent,e.t3=o,e.t4=(0,e.t0)(e.t1,e.t2,e.t3),e.t5=He,e.t6={x:0,y:0},e.next=13,a(r);case 13:return e.t7=e.sent,e.t8=(0,e.t5)(e.t6,e.t7),e.abrupt("return",{reference:e.t4,floating:e.t8});case 16:case"end":return e.stop()}}),e,this)})))}();var id=t.useLayoutEffect,ad=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],sd=function(){};function ud(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ld(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(ud(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var cd=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===v(e)&&null!==e?[e]:[];var t},dd=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,He({},rt(e,ad))},fd=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!==n&&void 0!==n?n:{},i(t,e),a)}};function pd(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function hd(e){return pd(e)?window.pageYOffset:e.scrollTop}function md(e,t){pd(e)?window.scrollTo(0,t):e.scrollTop=t}function vd(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function gd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:sd,o=hd(e),i=t-o,a=10,s=0;function u(){var t=vd(s+=a,o,i,n);md(e,t),s<n?window.requestAnimationFrame(u):r(e)}u()}function yd(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?md(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&md(e,Math.max(t.offsetTop-o,0))}function wd(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var bd=!1,_d={get passive(){return bd=!0}},Ed="undefined"!==typeof window?window:{};Ed.addEventListener&&Ed.removeEventListener&&(Ed.addEventListener("p",sd,_d),Ed.removeEventListener("p",sd,!1));var xd=bd;function Sd(e){return null!=e}function Cd(e,t,n){return e?t:n}var Id=["children","innerProps"],Ad=["children","innerProps"];function Od(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,u=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var c,d=u.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,h=f.height,m=f.top,v=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:pd(c=u)?window.innerHeight:c.clientHeight,y=hd(u),w=parseInt(getComputedStyle(n).marginBottom,10),b=parseInt(getComputedStyle(n).marginTop,10),_=v-b,E=g-m,x=_+y,S=d-y-m,C=p-g+y+w,I=y+m-b,A=160;switch(o){case"auto":case"bottom":if(E>=h)return{placement:"bottom",maxHeight:t};if(S>=h&&!a)return i&&gd(u,C,A),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&E>=r)return i&&gd(u,C,A),{placement:"bottom",maxHeight:a?E-w:S-w};if("auto"===o||a){var O=t,N=a?_:x;return N>=r&&(O=Math.min(N-w-s,t)),{placement:"top",maxHeight:O}}if("bottom"===o)return i&&md(u,C),{placement:"bottom",maxHeight:t};break;case"top":if(_>=h)return{placement:"top",maxHeight:t};if(x>=h&&!a)return i&&gd(u,I,A),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&_>=r){var T=t;return(!a&&x>=r||a&&_>=r)&&(T=a?_-b:x-b),i&&gd(u,I,A),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}var Nd,Td=function(e){return"auto"===e?"bottom":e},kd=(0,t.createContext)(null),Rd=function(e){var n=e.children,r=e.minMenuHeight,o=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,u=e.menuShouldScrollIntoView,l=e.theme,c=((0,t.useContext)(kd)||{}).setPortalPlacement,d=(0,t.useRef)(null),f=s((0,t.useState)(o),2),p=f[0],h=f[1],m=s((0,t.useState)(null),2),v=m[0],g=m[1],y=l.spacing.controlHeight;return id((function(){var e=d.current;if(e){var t="fixed"===a,n=Od({maxHeight:o,menuEl:e,minHeight:r,placement:i,shouldScroll:u&&!t,isFixedPosition:t,controlHeight:y});h(n.maxHeight),g(n.placement),null===c||void 0===c||c(n.placement)}}),[o,i,a,u,r,c,y]),n({ref:d,placerProps:He(He({},e),{},{placement:v||Td(i),maxHeight:p})})},jd=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return _c("div",qu({},fd(e,"menu",{menu:!0}),{ref:n},r),t)},Dd=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return He({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Pd=Dd,Md=Dd,Ld=["size"],Fd=["innerProps","isRtl","size"];var Bd,Vd,Ud={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Hd=function(e){var t=e.size,n=rt(e,Ld);return _c("svg",qu({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ud},n))},zd=function(e){return _c(Hd,qu({size:20},e),_c("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Gd=function(e){return _c(Hd,qu({size:20},e),_c("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Wd=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return He({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},Xd=Wd,Yd=Wd,qd=function(){var e=Ec.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Nd||(Bd=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Vd||(Vd=Bd.slice(0)),Nd=Object.freeze(Object.defineProperties(Bd,{raw:{value:Object.freeze(Vd)}})))),Kd=function(e){var t=e.delay,n=e.offset;return _c("span",{css:Ec({animation:"".concat(qd," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Zd=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return _c("div",qu({ref:o},fd(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},Jd=["data"],$d=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,u=e.label,l=e.theme,c=e.selectProps;return _c("div",qu({},fd(e,"group",{group:!0}),s),_c(i,qu({},a,{selectProps:c,theme:l,getStyles:r,getClassNames:o,cx:n}),u),_c("div",null,t))},Qd=["innerRef","isDisabled","isHidden","inputClassName"],ef={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},tf={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":He({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ef)},nf=function(e){return He({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},ef)},rf=function(e){var t=e.children,n=e.innerProps;return _c("div",n,t)};var of=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,u=n.Container,l=n.Label,c=n.Remove;return _c(u,{data:r,innerProps:He(He({},fd(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},_c(l,{data:r,innerProps:He({},fd(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),_c(c,{data:r,innerProps:He(He({},fd(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},af={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return _c("div",qu({},fd(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||_c(zd,null))},Control:Zd,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return _c("div",qu({},fd(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||_c(Gd,null))},DownChevron:Gd,CrossIcon:zd,Group:$d,GroupHeading:function(e){var t=dd(e);t.data;var n=rt(t,Jd);return _c("div",qu({},fd(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return _c("div",qu({},fd(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return _c("span",qu({},t,fd(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=dd(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,u=rt(r,Qd);return _c("div",qu({},fd(e,"input",{"input-container":!0}),{"data-value":n||""}),_c("input",qu({className:t({input:!0},s),ref:o,style:nf(a),disabled:i},u)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=rt(e,Fd);return _c("div",qu({},fd(He(He({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),_c(Kd,{delay:0,offset:n}),_c(Kd,{delay:160,offset:!0}),_c(Kd,{delay:320,offset:!n}))},Menu:jd,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return _c("div",qu({},fd(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var n=e.appendTo,r=e.children,i=e.controlElement,a=e.innerProps,l=e.menuPlacement,c=e.menuPosition,d=(0,t.useRef)(null),f=(0,t.useRef)(null),p=s((0,t.useState)(Td(l)),2),h=p[0],m=p[1],v=(0,t.useMemo)((function(){return{setPortalPlacement:m}}),[]),g=s((0,t.useState)(null),2),y=g[0],w=g[1],b=(0,t.useCallback)((function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===c?0:window.pageYOffset,n=e[h]+t;n===(null===y||void 0===y?void 0:y.offset)&&e.left===(null===y||void 0===y?void 0:y.rect.left)&&e.width===(null===y||void 0===y?void 0:y.rect.width)||w({offset:n,rect:e})}}),[i,c,h,null===y||void 0===y?void 0:y.offset,null===y||void 0===y?void 0:y.rect.left,null===y||void 0===y?void 0:y.rect.width]);id((function(){b()}),[b]);var _=(0,t.useCallback)((function(){"function"===typeof f.current&&(f.current(),f.current=null),i&&d.current&&(f.current=function(e,t,n,r){void 0===r&&(r={});var o=r,i=o.ancestorScroll,a=void 0===i||i,l=o.ancestorResize,c=void 0===l||l,d=o.elementResize,f=void 0===d?"function"==typeof ResizeObserver:d,p=o.layoutShift,h=void 0===p?"function"==typeof IntersectionObserver:p,m=o.animationFrame,v=void 0!==m&&m,g=zc(e),y=a||c?[].concat(u(g?Qc(g):[]),u(Qc(t))):[];y.forEach((function(e){a&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)}));var w,b=g&&h?function(e,t){var n,r=null,o=Kc(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function a(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),i();var l=e.getBoundingClientRect(),c=l.left,d=l.top,f=l.width,p=l.height;if(s||t(),f&&p){var h={rootMargin:-Bc(d)+"px "+-Bc(o.clientWidth-(c+f))+"px "+-Bc(o.clientHeight-(d+p))+"px "+-Bc(c)+"px",threshold:Lc(0,Mc(1,u))||1},m=!0;try{r=new IntersectionObserver(v,He(He({},h),{},{root:o.ownerDocument}))}catch(e){r=new IntersectionObserver(v,h)}r.observe(e)}function v(e){var t=e[0].intersectionRatio;if(t!==u){if(!m)return a();t?a(!1,t):n=setTimeout((function(){a(!1,1e-7)}),100)}m=!1}}(!0),i}(g,n):null,_=-1,E=null;f&&(E=new ResizeObserver((function(e){var r=s(e,1)[0];r&&r.target===g&&E&&(E.unobserve(t),cancelAnimationFrame(_),_=requestAnimationFrame((function(){E&&E.observe(t)}))),n()})),g&&!v&&E.observe(g),E.observe(t));var x=v?Yc(e):null;return v&&function t(){var r=Yc(e);!x||r.x===x.x&&r.y===x.y&&r.width===x.width&&r.height===x.height||n(),x=r,w=requestAnimationFrame(t)}(),n(),function(){y.forEach((function(e){a&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)})),b&&b(),E&&E.disconnect(),E=null,v&&cancelAnimationFrame(w)}}(i,d.current,b,{elementResize:"ResizeObserver"in window}))}),[i,b]);id((function(){_()}),[_]);var E=(0,t.useCallback)((function(e){d.current=e,_()}),[_]);if(!n&&"fixed"!==c||!y)return null;var x=_c("div",qu({ref:E},fd(He(He({},e),{},{offset:y.offset,position:c,rect:y.rect}),"menuPortal",{"menu-portal":!0}),a),r);return _c(kd.Provider,{value:v},n?(0,o.createPortal)(x,n):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=rt(e,Ad);return _c("div",qu({},fd(He(He({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=rt(e,Id);return _c("div",qu({},fd(He(He({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:of,MultiValueContainer:rf,MultiValueLabel:rf,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return _c("div",qu({role:"button"},n),t||_c(zd,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return _c("div",qu({},fd(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return _c("div",qu({},fd(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return _c("div",qu({},fd(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return _c("div",qu({},fd(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return _c("div",qu({},fd(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},sf=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function uf(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||sf(r)&&sf(o)))return!1;var r,o;return!0}for(var lf={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},cf=function(e){return _c("span",qu({css:lf},e))},df={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,u=e.isSelected,l=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&l){var d=s?" disabled":"",f="".concat(u?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ff=function(e){var n=e.ariaSelection,r=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,a=e.isFocused,s=e.selectValue,u=e.selectProps,l=e.id,c=e.isAppleDevice,d=u.ariaLiveMessages,f=u.getOptionLabel,p=u.inputValue,h=u.isMulti,m=u.isOptionDisabled,v=u.isSearchable,g=u.menuIsOpen,y=u.options,w=u.screenReaderStatus,b=u.tabSelectsValue,_=u.isLoading,E=u["aria-label"],x=u["aria-live"],S=(0,t.useMemo)((function(){return He(He({},df),d||{})}),[d]),C=(0,t.useMemo)((function(){var e,t="";if(n&&S.onChange){var r=n.option,o=n.options,i=n.removedValue,a=n.removedValues,u=n.value,l=i||r||(e=u,Array.isArray(e)?null:e),c=l?f(l):"",d=o||a||void 0,p=d?d.map(f):[],h=He({isDisabled:l&&m(l,s),label:c,labels:p},n);t=S.onChange(h)}return t}),[n,S,m,s,f]),I=(0,t.useMemo)((function(){var e="",t=r||o,n=!!(r&&s&&s.includes(r));if(t&&S.onFocus){var a={focused:t,label:f(t),isDisabled:m(t,s),isSelected:n,options:i,context:t===r?"menu":"value",selectValue:s,isAppleDevice:c};e=S.onFocus(a)}return e}),[r,o,f,m,S,i,s,c]),A=(0,t.useMemo)((function(){var e="";if(g&&y.length&&!_&&S.onFilter){var t=w({count:i.length});e=S.onFilter({inputValue:p,resultsMessage:t})}return e}),[i,p,g,S,y,w,_]),O="initial-input-focus"===(null===n||void 0===n?void 0:n.action),N=(0,t.useMemo)((function(){var e="";if(S.guidance){var t=o?"value":g?"menu":"input";e=S.guidance({"aria-label":E,context:t,isDisabled:r&&m(r,s),isMulti:h,isSearchable:v,tabSelectsValue:b,isInitialFocus:O})}return e}),[E,r,o,h,m,v,g,S,s,b,O]),T=_c(t.Fragment,null,_c("span",{id:"aria-selection"},C),_c("span",{id:"aria-focused"},I),_c("span",{id:"aria-results"},A),_c("span",{id:"aria-guidance"},N));return _c(t.Fragment,null,_c(cf,{id:l},O&&T),_c(cf,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!O&&T))},pf=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],hf=new RegExp("["+pf.map((function(e){return e.letters})).join("")+"]","g"),mf={},vf=0;vf<pf.length;vf++)for(var gf=pf[vf],yf=0;yf<gf.letters.length;yf++)mf[gf.letters[yf]]=gf.base;var wf=function(e){return e.replace(hf,(function(e){return mf[e]}))},bf=function(e,t){void 0===t&&(t=uf);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(wf),_f=function(e){return e.replace(/^\s+|\s+$/g,"")},Ef=function(e){return"".concat(e.label," ").concat(e.value)},xf=["innerRef"];function Sf(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=s(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=s(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(rt(e,xf),"onExited","in","enter","exit","appear");return _c("input",qu({ref:t},n,{css:Ec({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Cf=["boxSizing","height","overflow","paddingRight","position"],If={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Af(e){e.preventDefault()}function Of(e){e.stopPropagation()}function Nf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Tf(){return"ontouchstart"in window||navigator.maxTouchPoints}var kf=!("undefined"===typeof window||!window.document||!window.document.createElement),Rf=0,jf={capture:!1,passive:!1};var Df=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Pf={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Mf(e){var n=e.children,r=e.lockEnabled,o=e.captureEnabled,i=function(e){var n=e.isEnabled,r=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,s=(0,t.useRef)(!1),u=(0,t.useRef)(!1),l=(0,t.useRef)(0),c=(0,t.useRef)(null),d=(0,t.useCallback)((function(e,t){if(null!==c.current){var n=c.current,l=n.scrollTop,d=n.scrollHeight,f=n.clientHeight,p=c.current,h=t>0,m=d-f-l,v=!1;m>t&&s.current&&(o&&o(e),s.current=!1),h&&u.current&&(a&&a(e),u.current=!1),h&&t>m?(r&&!s.current&&r(e),p.scrollTop=d,v=!0,s.current=!0):!h&&-t>l&&(i&&!u.current&&i(e),p.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[r,o,i,a]),f=(0,t.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,t.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),h=(0,t.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;d(e,t)}),[d]),m=(0,t.useCallback)((function(e){if(e){var t=!!xd&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),v=(0,t.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return(0,t.useEffect)((function(){if(n){var e=c.current;return m(e),function(){v(e)}}}),[n,m,v]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var n=e.isEnabled,r=e.accountForScrollbars,o=void 0===r||r,i=(0,t.useRef)({}),a=(0,t.useRef)(null),s=(0,t.useCallback)((function(e){if(kf){var t=document.body,n=t&&t.style;if(o&&Cf.forEach((function(e){var t=n&&n[e];i.current[e]=t})),o&&Rf<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(If).forEach((function(e){var t=If[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Tf()&&(t.addEventListener("touchmove",Af,jf),e&&(e.addEventListener("touchstart",Nf,jf),e.addEventListener("touchmove",Of,jf))),Rf+=1}}),[o]),u=(0,t.useCallback)((function(e){if(kf){var t=document.body,n=t&&t.style;Rf=Math.max(Rf-1,0),o&&Rf<1&&Cf.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Tf()&&(t.removeEventListener("touchmove",Af,jf),e&&(e.removeEventListener("touchstart",Nf,jf),e.removeEventListener("touchmove",Of,jf)))}}),[o]);return(0,t.useEffect)((function(){if(n){var e=a.current;return s(e),function(){u(e)}}}),[n,s,u]),function(e){a.current=e}}({isEnabled:r});return _c(t.Fragment,null,r&&_c("div",{onClick:Df,css:Pf}),n((function(e){i(e),a(e)})))}var Lf={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Ff=function(e){var t=e.name,n=e.onFocus;return _c("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Lf,value:"",onChange:function(){}})};function Bf(e){var t;return"undefined"!==typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Vf(){return Bf(/^Mac/i)}function Uf(){return Bf(/^iPhone/i)||Bf(/^iPad/i)||Vf()&&navigator.maxTouchPoints>1}var Hf={clearIndicator:Yd,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return He({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:Xd,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return He({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return He({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return He(He({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},tf),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return He({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Md,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return He((Ve(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Ve(n,"position","absolute"),Ve(n,"width","100%"),Ve(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return He({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return He({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return He({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return He({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Pd,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return He({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return He({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return He({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return He({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var zf,Gf={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Wf={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:wd(),captureMenuScroll:!wd(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=He({ignoreCase:!0,ignoreAccents:!0,stringify:Ef,trim:!0,matchFrom:"any"},zf),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,u=a?_f(t):t,l=a?_f(i(e)):i(e);return r&&(u=u.toLowerCase(),l=l.toLowerCase()),o&&(u=bf(u),l=wf(l)),"start"===s?l.substr(0,u.length)===u:l.indexOf(u)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Xf(e,t,n,r){return{type:"option",data:t,isDisabled:ep(e,t,n),isSelected:tp(e,t,n),label:$f(e,t),value:Qf(e,t),index:r}}function Yf(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Xf(e,n,t,r)})).filter((function(t){return Zf(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Xf(e,n,t,r);return Zf(e,i)?i:void 0})).filter(Sd)}function qf(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,u(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Kf(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,u(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function Zf(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!rp(e)||!i)&&np(e,{label:a,value:s,data:o},r)}var Jf=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},$f=function(e,t){return e.getOptionLabel(t)},Qf=function(e,t){return e.getOptionValue(t)};function ep(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function tp(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Qf(e,t);return n.some((function(t){return Qf(e,t)===r}))}function np(e,t,n){return!e.filterOption||e.filterOption(t,n)}var rp=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},op=1,ip=function(e){p(r,e);var n=y(r);function r(e){var t;if(l(this,r),(t=n.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.isAppleDevice=Vf()||Uf(),t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,i=r.name;n.name=i,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(t.setState({inputIsHiddenAfterUpdate:!a}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,i=n.name,a=t.state.selectValue,s=o&&t.isOptionSelected(e,a),l=t.isOptionDisabled(e,a);if(s){var c=t.getOptionValue(e);t.setValue(a.filter((function(e){return t.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void t.ariaOnChange(e,{action:"select-option",option:e,name:i});o?t.setValue([].concat(u(a),[e]),"select-option",e):t.setValue(e,"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),i=r.filter((function(e){return t.getOptionValue(e)!==o})),a=Cd(n,i,i[0]||null);t.onChange(a,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange(Cd(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),i=Cd(e,o,o[0]||null);t.onChange(i,{action:"pop-value",removedValue:r})},t.getFocusedOptionId=function(e){return Jf(t.state.focusableOptionsWithIds,e)},t.getFocusableOptionsWithIds=function(){return Kf(Yf(t.props,t.state.selectValue),t.getElementId("option"))},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ld.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return $f(t.props,e)},t.getOptionValue=function(e){return Qf(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=Hf[e](n,r);o.boxSizing="border-box";var i=t.props.styles[e];return i?i(o,n):o},t.getClassNames=function(e,n){var r,o;return null===(r=(o=t.props.classNames)[e])||void 0===r?void 0:r.call(o,n)},t.getElementId=function(e){return"".concat(t.state.instancePrefix,"-").concat(e)},t.getComponents=function(){return e=t.props,He(He({},af),e.components);var e},t.buildCategorizedOptions=function(){return Yf(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return qf(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:He({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if((!e||"mousedown"!==e.type||0===e.button)&&!t.props.isDisabled){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"===typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&pd(e.target)&&t.props.onMenuClose():"function"===typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),i=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||i>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){if(!t.blockOptionHover&&t.state.focusedOption!==e){var n=t.getFocusableOptions().indexOf(e);t.setState({focusedOption:e,focusedOptionId:n>-1?t.getFocusedOptionId(e):null})}},t.shouldHideSelectedOptions=function(){return rp(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,i=n.escapeClearsValue,a=n.inputValue,s=n.isClearable,u=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,d=n.tabSelectsValue,f=n.openMenuOnFocus,p=t.state,h=p.focusedOption,m=p.focusedValue,v=p.selectValue;if(!u&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||a)return;t.focusValue("previous");break;case"ArrowRight":if(!r||a)return;t.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():s&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!l||!d||!h||f&&t.isOptionSelected(h,v))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":l?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:a}),t.onMenuClose()):s&&i&&t.clearValue();break;case" ":if(a)return;if(!l){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":l?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":l?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!l)return;t.focusOption("pageup");break;case"PageDown":if(!l)return;t.focusOption("pagedown");break;case"Home":if(!l)return;t.focusOption("first");break;case"End":if(!l)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.state.instancePrefix="react-select-"+(t.props.instanceId||++op),t.state.selectValue=cd(e.value),e.menuIsOpen&&t.state.selectValue.length){var o=t.getFocusableOptionsWithIds(),i=t.buildFocusableOptions(),a=i.indexOf(t.state.selectValue[0]);t.state.focusableOptionsWithIds=o,t.state.focusedOption=i[a],t.state.focusedOptionId=Jf(o,i[a])}return t}return d(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&yd(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(yd(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Gf):He(He({},Gf),this.props.theme):Gf}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,u=s.isMulti,l=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:u,isRtl:l,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ep(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return tp(this.props,e,t)}},{key:"filterOption",value:function(e,t){return np(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,n=e.isDisabled,r=e.isSearchable,o=e.inputId,i=e.inputValue,a=e.tabIndex,s=e.form,u=e.menuIsOpen,l=e.required,c=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),v=He(He(He({"aria-autocomplete":"list","aria-expanded":u,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},u&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===p||void 0===p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?t.createElement(c,qu({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:n,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):t.createElement(Sf,qu({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:sd,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,u=n.Placeholder,l=this.commonProps,c=this.props,d=c.controlShouldRenderValue,f=c.isDisabled,p=c.isMulti,h=c.inputValue,m=c.placeholder,v=this.state,g=v.selectValue,y=v.focusedValue,w=v.isFocused;if(!this.hasValue()||!d)return h?null:t.createElement(u,qu({},l,{key:"placeholder",isDisabled:f,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return g.map((function(n,s){var u=n===y,c="".concat(e.getOptionLabel(n),"-").concat(e.getOptionValue(n));return t.createElement(r,qu({},l,{components:{Container:o,Label:i,Remove:a},isFocused:u,isDisabled:f,key:c,index:s,removeProps:{onClick:function(){return e.removeValue(n)},onTouchEnd:function(){return e.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),e.formatOptionLabel(n,"value"))}));if(h)return null;var b=g[0];return t.createElement(s,qu({},l,{data:b,isDisabled:f}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return t.createElement(e,qu({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!e||!i)return null;return t.createElement(e,qu({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),n=e.DropdownIndicator,r=e.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return t.createElement(r,qu({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return t.createElement(e,qu({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,u=n.LoadingMessage,l=n.NoOptionsMessage,c=n.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,v=p.isLoading,g=p.loadingMessage,y=p.minMenuHeight,w=p.maxMenuHeight,b=p.menuIsOpen,_=p.menuPlacement,E=p.menuPosition,x=p.menuPortalTarget,S=p.menuShouldBlockScroll,C=p.menuShouldScrollIntoView,I=p.noOptionsMessage,A=p.onMenuScrollToTop,O=p.onMenuScrollToBottom;if(!b)return null;var N,T=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,u=n.label,l=n.value,p=f===i,h=a?void 0:function(){return e.onOptionHover(i)},m=a?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(r),g={id:v,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:s};return t.createElement(c,qu({},d,{innerProps:g,data:i,isDisabled:a,isSelected:s,key:v,label:u,type:o,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,u="".concat(e.getElementId("group"),"-").concat(s),l="".concat(u,"-heading");return t.createElement(r,qu({},d,{key:u,data:i,options:a,Heading:o,headingProps:{id:l,data:n.data},label:e.formatGroupLabel(n.data)}),n.options.map((function(e){return T(e,"".concat(s,"-").concat(e.index))})))}if("option"===n.type)return T(n,"".concat(n.index))}));else if(v){var k=g({inputValue:m});if(null===k)return null;N=t.createElement(u,d,k)}else{var R=I({inputValue:m});if(null===R)return null;N=t.createElement(l,d,R)}var j={minMenuHeight:y,maxMenuHeight:w,menuPlacement:_,menuPosition:E,menuShouldScrollIntoView:C},D=t.createElement(Rd,qu({},d,j),(function(n){var r=n.ref,o=n.placerProps,s=o.placement,u=o.maxHeight;return t.createElement(i,qu({},d,j,{innerRef:r,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:s}),t.createElement(Mf,{captureEnabled:h,onTopArrive:A,onBottomArrive:O,lockEnabled:S},(function(n){return t.createElement(a,qu({},d,{innerRef:function(t){e.getMenuListRef(t),n(t)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:u,focusedOption:f}),N)})))}));return x||"fixed"===E?t.createElement(s,qu({},d,{appendTo:x,controlElement:this.controlRef,menuPlacement:_,menuPosition:E}),D):D}},{key:"renderFormField",value:function(){var e=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,u=this.state.selectValue;if(s&&!this.hasValue()&&!o)return t.createElement(Ff,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var l=u.map((function(t){return e.getOptionValue(t)})).join(r);return t.createElement("input",{name:a,type:"hidden",value:l})}var c=u.length>0?u.map((function(n,r){return t.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:e.getOptionValue(n)})})):t.createElement("input",{name:a,type:"hidden",value:""});return t.createElement("div",null,c)}var d=u[0]?this.getOptionValue(u[0]):"";return t.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,u=this.getFocusableOptions();return t.createElement(ff,qu({},e,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:u,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),n=e.Control,r=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,a=this.props,s=a.className,u=a.id,l=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return t.createElement(o,qu({},f,{className:s,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:d}),this.renderLiveRegion(),t.createElement(n,qu({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:d,menuIsOpen:c}),t.createElement(i,qu({},f,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),t.createElement(r,qu({},f,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,u=t.instancePrefix,l=e.options,c=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=cd(c),m={};if(n&&(c!==n.value||l!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var v=d?function(e,t){return qf(Yf(e,t))}(e,h):[],g=d?Kf(Yf(e,h),"".concat(u,"-option")):[],y=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,w=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);m={selectValue:h,focusedOption:w,focusedOptionId:Jf(g,w),focusableOptionsWithIds:g,focusedValue:y,clearFocusValueOnUpdate:!1}}var b=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},_=i,E=a&&s;return a&&!E&&(_={value:Cd(p,h,h[0]||null),options:h,action:"initial-input-focus"},E=!s),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(_=null),He(He(He({},m),b),{},{prevProps:e,ariaSelection:_,prevWasFocused:E})}}]),r}(t.Component);ip.defaultProps=Wf;var ap=(0,t.forwardRef)((function(e,n){var r=function(e){var n=e.defaultInputValue,r=void 0===n?"":n,o=e.defaultMenuIsOpen,i=void 0!==o&&o,a=e.defaultValue,u=void 0===a?null:a,l=e.inputValue,c=e.menuIsOpen,d=e.onChange,f=e.onInputChange,p=e.onMenuClose,h=e.onMenuOpen,m=e.value,v=rt(e,Yu),g=s((0,t.useState)(void 0!==l?l:r),2),y=g[0],w=g[1],b=s((0,t.useState)(void 0!==c?c:i),2),_=b[0],E=b[1],x=s((0,t.useState)(void 0!==m?m:u),2),S=x[0],C=x[1],I=(0,t.useCallback)((function(e,t){"function"===typeof d&&d(e,t),C(e)}),[d]),A=(0,t.useCallback)((function(e,t){var n;"function"===typeof f&&(n=f(e,t)),w(void 0!==n?n:e)}),[f]),O=(0,t.useCallback)((function(){"function"===typeof h&&h(),E(!0)}),[h]),N=(0,t.useCallback)((function(){"function"===typeof p&&p(),E(!1)}),[p]),T=void 0!==l?l:y,k=void 0!==c?c:_,R=void 0!==m?m:S;return He(He({},v),{},{inputValue:T,menuIsOpen:k,onChange:I,onInputChange:A,onMenuClose:N,onMenuOpen:O,value:R})}(e);return t.createElement(ip,qu({ref:n},r))})),sp=ap,up=n(1276),lp=n.n(up);function cp(e){var n,r,o,i=e.setValues,a=e.fieldName,u=e.fieldValue,l=e.fieldLabel,c=e.fieldError,d=e.identifier,f=e.range,p=void 0===f?{min:null,max:null}:f;null===p.min&&null===p.max&&alert("Range is not set!");var h=a+(null!==d&&void 0!==d?d:"-form")+"-input",m=s((0,t.useState)({}),2),v=m[0],g=m[1],y=s((0,t.useState)(null!==u&&void 0!==u?u:null),2),w=y[0],b=y[1],_=function(e){if(void 0!==w&&null!==w){var t=w.split("-");return"Year"===e&&void 0!==t[0]?t[0]:"Month"===e&&void 0!==t[1]?t[1]:"Day"===e&&void 0!==t[2]?t[2]:void 0}},E=function(e){var t=e.target.dataset.name,n=e.target.value,r=v,o=null!==a&&void 0!==a?a:"date";if(!1===("Year"===t?/^[0-9]{4}$/:/^[0-9]{0,2}$/).test(n))return r[t]="Ongeldige waarde",void g(r);"Day"===t&&n.length>=2?document.querySelector("input#"+h+"-Month").focus():"Month"===t&&n.length>=2&&document.querySelector("input#"+h+"-Year").focus();var s=function(){var e=document.querySelector("input#"+h+"-Day").value,t=document.querySelector("input#"+h+"-Month").value,n=document.querySelector("input#"+h+"-Year").value,r={},o=null;return null===p.min?p.min=(new Date).getFullYear():"string"===typeof p.min&&!0===p.min.includes("+")?p.min=(new Date).getFullYear()+parseInt(p.replace("+","")):"string"===typeof p.min&&!0===p.min.includes("-")&&(p.min=(new Date).getFullYear()-parseInt(p.min.replace("-",""))),null===p.max?p.max=(new Date).getFullYear():"string"===typeof p.max&&!0===p.max.includes("+")?p.max=(new Date).getFullYear()+parseInt(p.max.replace("+","")):"string"===typeof p.max&&!0===p.max.includes("-")&&(p.max=(new Date).getFullYear()-parseInt(p.max.replace("-",""))),e.length>0&&e>31&&(r.Day="Ongeldige dag"),t.length>0&&t>12&&(r.Month="Ongeldige maand"),n.length>0&&(n<p.min||n>p.max)&&(r.Year="Ongeldig jaartal ("+p.min+" - "+p.max+")"),e&&t&&n&&(new Date(n,t,0).getDate()<e&&(r.Day="Ongeldige dag van de maand"),0===Object.keys(r).length&&(o=n+"-"+t+"-"+e)),g(r),o}();b(s),i(o,s,d)};return(0,Je.jsxs)("div",{className:"form__row form__row--fieldset form__row--date",children:[(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsxs)("div",{className:"form__label",children:[c&&(0,Je.jsxs)("span",{style:{color:"red"},children:[c,": "]}),l]})}),(0,Je.jsx)("div",{className:"form__component form__component--auto",children:(0,Je.jsxs)("div",{className:"form__element",children:[(0,Je.jsx)("div",{className:"form__input",children:(0,Je.jsx)("input",{type:"text",id:h+"-Day",placeholder:null!==(n=_("Day"))&&void 0!==n?n:"Dag","data-name":"Day",maxLength:2,onChange:E})}),v&&v.Day&&(0,Je.jsx)("span",{style:{color:"red"},children:v.Day})]})}),(0,Je.jsx)("div",{className:"form__component form__component--auto",children:(0,Je.jsxs)("div",{className:"form__element",children:[(0,Je.jsx)("div",{className:"form__input",children:(0,Je.jsx)("input",{type:"text",id:h+"-Month",placeholder:null!==(r=_("Month"))&&void 0!==r?r:"Maand","data-name":"Month",maxLength:2,onChange:E})}),v&&v.Month&&(0,Je.jsx)("span",{style:{color:"red"},children:v.Month})]})}),(0,Je.jsx)("div",{className:"form__component form__component--auto",children:(0,Je.jsxs)("div",{className:"form__element",children:[(0,Je.jsx)("div",{className:"form__input",children:(0,Je.jsx)("input",{type:"text",id:h+"-Year",placeholder:null!==(o=_("Year"))&&void 0!==o?o:"Jaar","data-name":"Year",maxLength:4,onChange:E})}),v&&v.Year&&(0,Je.jsx)("span",{style:{color:"red"},children:v.Year})]})}),"\xa0"]})}function dp(e){var n,r,o=e.fieldName,i=e.fieldValue,a=void 0===i?{}:i,u=e.setValues,l=e.fields,c=void 0===l?{category:"categoryId",article:"articleId"}:l,d=e.output;void 0!==c&&null!==c&&void 0!==c.category||alert("Fields are not set!"),"extern"===d&&(d="depot");var f=void 0!==c.article,p=s((0,t.useState)(!1),2),h=p[0],m=p[1],v=s((0,t.useState)(),2),g=v[0],y=v[1],w=s((0,t.useState)([]),2),b=w[0],_=w[1],E=s((0,t.useState)(null!==(n=a.categoryId)&&void 0!==n?n:0),2),x=E[0],S=E[1],C=s((0,t.useState)(null!==(r=a.categoryParents)&&void 0!==r?r:[]),2),I=C[0],A=C[1],O=s((0,t.useState)(),2),N=O[0],T=O[1];if(0===Object.keys(a).length&&x>0&&I.length>0&&(S(0),A([]),_([])),(0,t.useEffect)((function(){var e;(e={articleType:d},Ge().post("".concat(Ye,"/global/articles/categories"),e,Ke())).then((function(e){var t=Iu(e.data,"categories");if("error"===t.status)T(t.message);else{var n=[];for(var r in t.categories)n[r]=t.categories[r];y(n),m(!0)}})),(void 0===d||"catalog"!==d&&"intern"!==d&&"rental"!==d&&"depot"!==d)&&alert("output type undefined"+d)}),[d]),void 0!==N&&null!==N)return(0,Je.jsx)(Bn,{type:"error",message:N});if(!1===h)return null;var k,R=function(e){var t=[];return g.forEach((function(n){void 0!==n[0]&&parseInt(n[0].parentId)===parseInt(e)&&n.forEach((function(e){t.push(e)}))})),t};0===x?k=g[0][0].parentId:I.forEach((function(e){k=e.id}));var j=R(k),D=function(e){if(void 0!==c.article&&null!==c.article){var t,n=[];if(parseInt(e)>0)(t={categoryId:e,articleType:"depot"===d?"DEPOT":"RENTAL"},Ge().post("".concat(Ye,"/global/articles/list"),t,Ke())).then((function(e){var t=Iu(e.data,"articles");"error"===t.status?T(t.message):(t.articles.forEach((function(e){n.push(e)})),_(n))}))}},P=function(e){var t=e.target.value;""!==t&&L(t,j)},M=function(e){u(o,{categoryId:x,categoryParents:I,selected:e}),u(c.category,e)},L=function(e,t){var n;if(Object.values(t).forEach((function(t){(void 0!==t.id&&parseInt(t.id)===parseInt(e)||void 0!==t.categoryId&&parseInt(t.categoryId)===parseInt(e))&&(n=t)})),void 0!==n){var r=I;r.push({id:e,title:n.title,priceDisplay:n.priceDisplay,isRentable:n.isRentable}),A(r),S(e),_([]),D(e),u(o,{categoryId:e,categoryParents:r,article:null,articleId:null}),u(c.category,e),"catalog"===d&&0===R(e).length&&M(e)}else alert("Categorie niet gevonden")},F=function(e){var t=e.target.value;""===t&&u(c.article,null);var n=e.target[e.target.selectedIndex].getAttribute("data-name");null!==t&&(u(o,{categoryId:x,categoryParents:I,articleId:t,article:{articleId:t,name:n}}),u(c.article,t))};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{children:Object.values(I).map((function(e,t){var n;return(0,Je.jsxs)("span",{className:"categories-trail-wrapper",children:[(0,Je.jsx)("button",{className:"categories-trail",onClick:function(){return function(e){var t=0,n=[],r=I.length;I.forEach((function(o,i){o.id===e?r=i:i<r&&(n.push(o),t=o.id)})),S(t),A(n),_([]),!1===f&&D(t),u(o,{categoryId:t,categoryParents:n,articleId:null,article:null}),u(c.category,t)}(e.id)},children:e.title}),!0===e.isRentable&&t+1===Object.values(I).length&&(0,Je.jsx)("button",{className:"categories-trail selectable",onClick:function(){return M(e.id)},children:null!==(n=c.selectLabel)&&void 0!==n?n:"Selecteren"})]},"categories-trail-item-"+e.id)}))}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("div",{style:{clear:"both",height:"5px"}}),function(){if(0===j.length)return null;var e=0===x?"categorie":"subcategorie";return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{children:(0,Je.jsxs)("select",{onChange:P,children:[(0,Je.jsxs)("option",{"data-name":"select-"+e,value:"",children:["- Selecteer ",e," -"]},"select-"+e),Object.values(j).map((function(e){return(0,Je.jsx)("option",{value:e.categoryId,children:e.title},e.categoryId)}))]})}),(0,Je.jsx)("div",{style:{clear:"both",height:"12px"}})]})}(),function(){if(!0===f&&0!==b.length)return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{children:(0,Je.jsxs)("select",{onChange:F,children:[(0,Je.jsx)("option",{"data-name":"select-article",value:"",children:"- Selecteer Artikel -"},"select-article"),Object.values(b).map((function(e){return(0,Je.jsx)("option",{"data-name":e.name,value:e.id,children:e.name},e.id)}))]})}),(0,Je.jsx)("div",{style:{clear:"both",height:"12px"}})]})}()]})]})}var fp=function(e){var n=e.setValues,r=e.fieldType,o=e.fieldName,i=e.fieldValue,a=e.fieldLabel,l=e.placeholder,c=e.fieldError,d=e.identifier,f=e.fieldOptions,p=void 0===f?{}:f,h=e.info,m=Fn().control,v=s((0,t.useState)(i),2),g=v[0],y=v[1],w=s((0,t.useState)(),2),b=w[0],_=w[1],E=s((0,t.useState)(null),2),x=E[0],S=E[1],C=s((0,t.useState)([]),2),I=C[0],A=C[1],O=s((0,t.useState)(!1),2),N=O[0],T=O[1],k=(0,t.useRef)({}),R=x?u(x):[],j=o+(null!==d&&void 0!==d?d:"-form")+"-input",D="file"===r?"file-upload-button":"form__label";"select"!==r&&"radio"!==r||(void 0===p[0]&&(p=Wu(p)),"select"===r&&(p=[{label:"- Maak een keuze - ",value:null}].concat(p)));var P=function(e){var t=e.target.value;"checkbox"===e.target.type&&(t=e.target.checked),_(j),y(t),n(o,t,d)},M=function(e){if(_(j),void 0!==e&&null!==e){var t=e.value;y(t),n(o,t,d)}},L=function(e){_(j),y(e),n(o,e,d)};(0,t.useEffect)((function(){I.length>0&&(y(JSON.stringify(I)),n(o,JSON.stringify(I),d))}),[I,o,d,n]);var F,B=function(e,t){var n=new FileReader;n.readAsDataURL(e),n.onload=function(){t(n.result)},n.onerror=function(e){console.log("Error: ",e)}};b===j||null===g||void 0!==i&&0!==i||g===i||(y(null),null!==document.querySelector("#"+j)&&(document.querySelector("#"+j).value="")),"checkbox"===r&&(F=a,a=void 0!==p?p.label:null);var V=function(e,t){var n;if(void 0!==e)return Object.keys(t).forEach((function(r){String(t[r].value)===String(e)&&(n=t[r])})),n};return(0,Je.jsxs)(Je.Fragment,{children:["date"===r&&(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)(cp,{setValues:n,fieldName:o,fieldValue:i,fieldLabel:a,fieldError:c,identifier:d,range:p})}),"title"===r&&(0,Je.jsx)("div",{className:"form__element form__element--"+r,children:(0,Je.jsx)("h4",{children:a})}),"date"!==r&&"location"!==r&&"title"!==r&&"hidden"!==r&&(0,Je.jsxs)("div",{className:"form__component",children:[(c||a)&&(0,Je.jsxs)("label",{className:D,htmlFor:j,children:[c&&(0,Je.jsxs)("span",{style:{color:"red"},children:[c,": "]}),a,void 0!==h&&null!==h&&(0,Je.jsxs)("span",{className:"form-field-info",children:[(0,Je.jsx)("br",{}),h]})]}),(0,Je.jsxs)("div",{className:"form__element form__element--"+r,children:["text"===r&&(0,Je.jsx)("input",{id:j,type:"text",placeholder:l,onChange:P,defaultValue:i}),"select"===r&&(0,Je.jsx)(Wt,{control:m,id:j,name:o,render:function(e){var t=e.field;t.onChange,t.value,t.ref,t.name;return(0,Je.jsx)(sp,{defaultValue:V(i,p),isClearable:!0,placeholder:"- Maak een keuze -",name:o,options:p,onChange:M},"my_unique_select_key__".concat(i))}}),"checkbox"===r&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("input",{type:"checkbox",id:j,onChange:P,defaultChecked:i}),(0,Je.jsx)("label",{htmlFor:j,children:F})]}),"textarea"===r&&(0,Je.jsx)("textarea",{id:j,onChange:P,placeholder:l,children:i}),"radio"===r&&(0,Je.jsx)("div",{className:"form__row form__row--fieldset",children:p.map((function(e){return(0,Je.jsx)("div",{className:"form__component form__component--auto",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)("div",{className:"form__input",onClick:function(){return L(e.value)},children:[(0,Je.jsx)("input",{type:"radio",checked:g===e.value,onChange:function(){return L(e.value)}}),(0,Je.jsx)("label",{htmlFor:j,children:e.label})]})})},j+e.value)}))}),"file"===r&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("input",{id:j,type:"file",className:"file-upload",onChange:function(e){if(A([]),e.target.files){S(e.target.files);for(var t=function(){var t="",r=e.target.files[n];B(r,(function(e){if((t=e).length>1e7)return r.error="Bestand is te groot voor upload via de app",void T(!1===N);A((function(e){return[].concat(u(e),[{file:t,name:r.name}])}))}))},n=0;n<e.target.files.length;n++)t()}_(j)},multiple:!0}),(0,Je.jsx)("ul",{className:"file-upload-list",children:R.map((function(e,t){return(0,Je.jsxs)("li",{className:"file-upload "+(e.error?"file-upload-error":"file-upload-selected"),children:[void 0!==e.error&&(0,Je.jsxs)("strong",{children:[e.error,": "]}),e.name," - ",e.type]},t)}))})]}),"signature"===r&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(lp(),{ref:k,canvasProps:{className:"signatureCanvas",height:250},clearOnResize:!1,onEnd:function(){return function(){var e=null;void 0!==k.current&&!k.current.isEmpty()&&Object.keys(k.current).length>0&&(e=k.current.getCanvas().toDataURL("image/png")),n(o,e,d)}()}}),(0,Je.jsx)("div",{className:"form__row form__row--buttons",children:(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("button",{className:"button button--primary clear",onClick:function(e){return function(e){e.preventDefault(),Object.keys(k.current).length>0&&k.current.clear()}(e)},children:"Wissen"})})})})]}),"categories"===r&&(0,Je.jsx)(dp,{fieldName:o,fieldValue:null!==i&&void 0!==i?i:{},setValues:n,output:p.output,fields:p,identifier:d})]})]})]})};function pp(e){var n=e.fieldName,r=void 0===n?"inputOption":n,o=e.fieldValue,i=void 0===o?null:o,a=e.setValues,u=e.isSubmitted,l=void 0!==u&&u,c=e.identifier,d=void 0===c?null:c,f=e.required,p=void 0===f||f,h=e.options,m=void 0===h?{}:h,v=Fn().control,g=s((0,t.useState)(null),2),y=g[0],w=g[1],b=s((0,t.useState)(null),2),_=b[0],E=b[1],x=s((0,t.useState)(i),2),S=x[0],C=x[1],I={productId:"Bestaand serienummer",serialNumber:"Nieuw serienummer (serienummer is bekend)",serialUnknown:"Automatisch aanmaken (serienummer onbekend)"},A=function(e){var t=e.target.dataset.name,n=e.target.value;N(t,n)},O=function(e,t){var n=t.name,r=e.value;N(n,r)},N=function(e,t){var n={};n[e]=t,void 0===n.errors&&(n.errors={}),e===r?(w(t),E(null),C(i),"serialUnknown"===t?(delete n.errors,n.serialUnknown=!0):n.errors[t]="Verplicht veld"):"serialNumber"===e&&t?(E(t),delete n.errors):"productId"===e&&t&&(C(t),delete n.errors),a(e,t,d)},T=function(e){var t=null;if(e===r&&!0===l&&!0===p&&null===y&&(t="Verplicht veld"),"serialNumber"===e&&y===e&&!0===l&&null===_&&(t="Verplicht veld"),"productId"===e&&y===e&&!0===l&&null===S&&(t="Verplicht veld"),null!==t)return(0,Je.jsxs)("span",{style:{color:"red"},children:[t,": "]})};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:"form__row",children:(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsxs)("div",{className:"form__label",children:[T(r),"Invoer serienummer ",p&&(0,Je.jsx)("span",{children:"*"})]})})}),(0,Je.jsx)("div",{className:"form__row form__row--fieldset form__row--serialoptions",children:Object.keys(I).map((function(e){return(0,Je.jsx)("div",{className:"form__component form__component--auto",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsxs)("div",{className:"form__input",children:[(0,Je.jsx)("input",{type:"radio",id:"serial-input-option-"+d+e,value:e,"data-name":r,checked:y===e,onChange:A}),(0,Je.jsx)("label",{htmlFor:"serial-input-option-"+d+e,children:I[e]})]})})},"serial-input-"+d+e)}))}),"productId"===y&&(0,Je.jsx)("div",{className:"form__row col-12",id:"input-option-productId",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"",className:"form__label",children:[T(y),"Kies serienummer"]}),(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)(Wt,{control:v,name:"productId",render:function(e){var t=e.field;t.onChange,t.value,t.ref,t.name;return(0,Je.jsx)(sp,{defaultValue:Xu(i,m),placeholder:"Maak een keuze",name:"productId",options:Wu(m),onChange:O})}})})]})}),"serialNumber"===y&&(0,Je.jsx)("div",{className:"form__row col-12",id:"input-option-productId",children:(0,Je.jsxs)("div",{className:"form__component",children:[(0,Je.jsxs)("label",{htmlFor:"",className:"form__label",children:[T(y),"Nieuw serienummer invoeren"]}),(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("input",{type:"text",onChange:A,"data-name":"serialNumber"})})]})})]})}function hp(e){var n,r,o,i,a,u,l,c=e.setValues,d=e.fieldValue,f=void 0===d?{}:d,p=e.fieldLabel,h=void 0===p?{locationId:"Locatie",departmentId:"Afdeling",room:"Kamernr."}:p,m=e.identifier,v=e.fields,g=void 0===v?{locationId:"locationId",departmentId:"departmentId",room:"room",parentId:0}:v,y=s((0,t.useState)(),2),w=y[0],b=y[1],_=s((0,t.useState)([]),2),E=_[0],x=_[1],S=s((0,t.useState)([]),2),C=S[0],I=S[1],A=s((0,t.useState)(!1),2),O=A[0],N=A[1],T=null!==(n=g.parentId)&&void 0!==n?n:1,k=null!==(r=g.locationId)&&void 0!==r?r:null,R=null!==(o=g.departmentId)&&void 0!==o?o:null,j=null!==(i=g.room)&&void 0!==i?i:null,D=function(e){void 0!==g.departmentId&&Su(e).then((function(e){var t=Iu(e.data,"departments");"success"===t.status?I(t.departments):b(t.message)}))};(0,t.useEffect)((function(){xu(T).then((function(e){var t=Iu(e.data,"locations");"success"===t.status?(x(t.locations),void 0!==f[k]&&null!==f[k]&&D(f[k]),N(!0)):b(t.message)})).catch((function(e){var t=Iu(e,"status");b(t.message)}))}),[]);var P=function(e,t){void 0!==g.locationId&&e===g.locationId&&(null!==t&&t>0?D(t):0===C.length&&(I([]),void 0!==f[R]&&null!==f[R]&&void 0!==g.departmentId&&(I([]),c(null,g.departmentId,m)),void 0!==f[j]&&null!==f[j]&&void 0!==g.room&&c(null,g.room,m))),c(e,t,m)};return void 0!==w?(0,Je.jsx)(Bn,{type:"error",message:w}):!1===O?(0,Je.jsx)(Bn,{type:"loading"}):void 0===E||null===E||0===Object.keys(E).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[E.length>0&&(0,Je.jsx)(fp,{setValues:P,fieldType:"select",fieldName:g.locationId,fieldValue:null!==(a=f[k])&&void 0!==a?a:"",fieldLabel:h.locationId,identifier:m,fieldOptions:E}),void 0!==f[k]&&null!==f[k]&&C.length>0&&void 0!==g.departmentId&&(0,Je.jsxs)("div",{className:"form-fieldset",children:[(0,Je.jsx)("div",{className:"fieldset-element col-9",children:(0,Je.jsx)(fp,{setValues:P,fieldType:"select",fieldName:g.departmentId,fieldValue:null!==(u=f[R])&&void 0!==u?u:"",fieldLabel:h.departmentId+" / "+h.room,identifier:m,fieldOptions:C})}),(0,Je.jsx)("div",{className:"fieldset-element col-3",children:(0,Je.jsx)(fp,{setValues:P,fieldType:"text",fieldName:g.room,fieldValue:null!==(l=f[j])&&void 0!==l?l:"",fieldLabel:String.fromCharCode(160),identifier:m})})]})]})}function mp(e){var n=e.setValues,r=e.fieldValue,o=void 0===r?{}:r,i=e.fieldLabel,a=void 0===i?{warehouseId:"Magazijn"}:i,u=e.identifier,l=e.fields,c=void 0===l?{warehouseId:"warehouseId"}:l,d=s((0,t.useState)(),2),f=d[0],p=d[1],h=s((0,t.useState)([]),2),m=h[0],v=h[1],g=s((0,t.useState)(!1),2),y=g[0],w=g[1];(0,t.useEffect)((function(){Ge().get("".concat(Ye,"/global/warehouses"),Ke()).then((function(e){var t=Iu(e.data,"warehouses");"success"===t.status?(v(t.warehouses),w(!0)):p(t.message)})).catch((function(e){var t=Iu(e,"status");p(t.message)}))}),[]);return void 0!==f?(0,Je.jsx)(Bn,{type:"error",message:f}):!1===y?(0,Je.jsx)(Bn,{type:"loading"}):void 0===m||null===m||0===Object.keys(m).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsx)(Je.Fragment,{children:m.length>0&&(0,Je.jsx)(fp,{setValues:function(e,t){n(e,t,u)},fieldType:"select",fieldName:c.warehouseId,fieldValue:o.warehouseId,fieldLabel:a.warehouseId,identifier:u,fieldOptions:m})})}function vp(e){var n=e.setValues,r=e.fieldValue,o=void 0===r?{}:r,i=e.fieldLabel,a=void 0===i?{inspectionType:"Type keuring"}:i,u=e.identifier,l=e.fields,c=void 0===l?{inspectionType:"inspectionType"}:l,d=s((0,t.useState)(),2),f=d[0],p=d[1],h=s((0,t.useState)([]),2),m=h[0],v=h[1],g=s((0,t.useState)(!1),2),y=g[0],w=g[1];(0,t.useEffect)((function(){Ge().get("".concat(Ye,"/global/inspections/types"),Ke()).then((function(e){var t=Iu(e.data,"inspectionTypes");"success"===t.status?(v(t.inspectionTypes),w(!0)):p(t.message)})).catch((function(e){var t=Iu(e,"status");p(t.message)}))}),[]);return void 0!==f?(0,Je.jsx)(Bn,{type:"error",message:f}):!1===y?(0,Je.jsx)(Bn,{type:"loading"}):void 0===m||null===m||0===Object.keys(m).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsx)(Je.Fragment,{children:m.length>0&&(0,Je.jsx)(fp,{setValues:function(e,t){n(e,t,u)},fieldType:"select",fieldName:c.inspectionType,fieldValue:o.inspectionType,fieldLabel:a.inspectionType,identifier:u,fieldOptions:m})})}var gp=function(e){return Ge().get("".concat(Ye,"/customer/requests/checkpermission/")+e,Ke())},yp=function(){return Ge().get("".concat(Ye,"/global/contacts"),Ke())};function wp(e){var n,r=e.setValues,o=e.fieldValue,i=void 0===o?{}:o,a=e.fieldLabel,u=void 0===a?{contactId:"Conctactpersoon"}:a,l=e.identifier,c=e.fields,d=void 0===c?{contactId:"contactId"}:c,f=s((0,t.useState)(),2),p=f[0],h=f[1],m=s((0,t.useState)([]),2),v=m[0],g=m[1],y=s((0,t.useState)(!1),2),w=y[0],b=y[1];(0,t.useEffect)((function(){yp().then((function(e){var t=Iu(e.data,"contacts");"success"===t.status?(g(t.contacts),b(!0)):h(t.message)})).catch((function(e){var t=Iu(e,"status");h(t.message)}))}),[]);return void 0!==p?(0,Je.jsx)(Bn,{type:"error",message:p}):!1===w?(0,Je.jsx)(Je.Fragment,{}):(0,Je.jsx)(Je.Fragment,{children:v.length>0&&(0,Je.jsx)(fp,{setValues:function(e,t){r(e,t,l)},fieldType:"select",fieldName:d.contactId,fieldValue:null!==(n=i.contactId)&&void 0!==n?n:"",fieldLabel:u.contactId,identifier:l,fieldOptions:v})})}function bp(e){var t=e.formFields,n=e.setValues,r=e.setErrors,o=e.formValues,i=void 0===o?{}:o,a=e.formErrors,s=void 0===a?{}:a,u=e.identifier,l=void 0===u?null:u,c=e.isSubmitted,d=void 0!==c&&c,f=e.wrapper,p=void 0===f?"default":f,h=s,m=function(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(i[e]=o,void 0!==t[e]){var s=Uu(o,t[e].rules,!1),u="error"===s.status?s.message:null;r(e,u,a)}n(e,o,a)},v=function(e){var n=null;return void 0!==h&&void 0!==h[e]?n=h[e]:!0===d&&void 0===i[e]&&void 0!==t[e].rules&&t[e].rules.includes("required")&&(n="Verplicht veld"),null!==n?n:null},g=function(e,t,n){return e[t].label};return(0,Je.jsx)("div",{className:"form__"+p,children:Object.keys(t).map((function(e){var r,o,a,s;return(0,Je.jsxs)("div",{className:"form__row",children:["serialOptions"!==t[e].type&&"fieldset"!==t[e].type&&"location"!==t[e].type&&(0,Je.jsx)(fp,{setValues:m,fieldType:t[e].type,fieldName:e,fieldValue:null!==(r=i[e])&&void 0!==r?r:t[e].value,fieldLabel:t[e].label,fieldError:v(e),placeholder:null!==(o=t[e].placeholder)&&void 0!==o?o:null,identifier:l,fieldOptions:null!==(a=t[e].options)&&void 0!==a?a:{},info:t[e].info}),"location"===t[e].type&&(0,Je.jsx)(hp,{setValues:m,fieldValue:i,fieldLabel:t[e].label,fields:t[e].options,identifier:l}),"warehouse"===t[e].type&&(0,Je.jsx)(mp,{setValues:m,fieldValue:i,fieldLabel:t[e].label,fields:t[e].options,identifier:l}),"inspectionType"===t[e].type&&(0,Je.jsx)(vp,{setValues:m,fieldValue:i,fieldLabel:t[e].label,fields:t[e].options,identifier:l}),"contacts"===t[e].type&&(0,Je.jsx)(wp,{setValues:m,fieldValue:i,fieldLabel:t[e].label,fields:t[e].options,identifier:l}),"serialOptions"===t[e].type&&(0,Je.jsx)(pp,{setValues:m,fieldName:e,options:null!==(s=t[e].options)&&void 0!==s?s:{},defaultValue:i[e],isSubmitted:d,identifier:l}),"fieldset"===t[e].type&&(0,Je.jsx)("div",{className:"form-fieldset",children:Object.keys(t[e].options).map((function(r,o){var a,s,u,c;return(0,Je.jsx)("div",{className:"fieldset-element "+(null!==(a=t[e].options[r].className)&&void 0!==a?a:""),children:(0,Je.jsx)(fp,{setValues:n,fieldType:t[e].options[r].type,fieldName:r,fieldValue:null!==(s=i[r])&&void 0!==s?s:t[e].options[r].value,fieldLabel:g(t[e].options,r),fieldError:v(r),placeholder:null!==(u=t[e].options[r].placeholder)&&void 0!==u?u:null,identifier:l,fieldOptions:null!==(c=t[e].options[r].options)&&void 0!==c?c:{}})},(null!==l&&void 0!==l?l:"fieldset")+e+r)}))})]},l+e)}))})}function _p(e){var t=e.handleSubmit,n=e.cancelUri,r=e.cancelFunction,o=e.cancelLabel,i=void 0===o?"Annuleren":o,a=e.submitLabel,s=void 0===a?"Opslaan":a,u=e.className,l=void 0===u?"button--primary submit":u;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:"form__row--bb"}),(0,Je.jsxs)("div",{className:"form__row form__row--buttons",children:[(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("button",{type:"submit",onClick:t,className:"button "+l,children:s})})}),void 0!==n&&null!==n&&(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)(Me,{to:n,className:"button button--outline",children:(0,Je.jsx)("span",{children:i})})})}),void 0!==r&&(0,Je.jsx)("div",{className:"form__component",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("button",{onClick:r,className:"button button--outline",children:i})})})]})]})}function Ep(e){var n=e.method,r=void 0===n?"search":n,o=e.productId,i=e.returnPath,a=void 0===i?"/":i,u=e.title,l=fe(),c=s((0,t.useState)(),2),d=c[0],f=c[1],p=s((0,t.useState)({}),2),h=p[0],m=p[1],v=Am("/rentals/active/actions/:rentalCaseId"),g=Am("/articles/location/product/actions/:productId");void 0===d&&v+g===0&&f("U heeft geen rechten om gescande serienummers op te zoeken");var y=function(e,t){var n=h;n[e]=t,m(n)},w=function(e,t){f(t)},b=function(){void 0!==h.barcode&&h.barcode?_(h):f("Voer een barcode in")},_=function(e){var t=null;e&&e.text&&(t=e.text),e&&e.barcode&&(t=e.barcode),null!==t&&("add"===r?void 0===o?f("Er is geen product gevonden om de QR code te koppelen"):x(t,o):E(t))},E=function(e){var t;(t={barcode:e},Ge().post("".concat(Ye,"/customer/articles/qrcode/find"),t,Ke())).then((function(e){var t=Iu(e.data,"response");if("success"===t.status){var n=t.response,r=v>0?"actions/":"details/",o=g>0?"actions/":"details/";"rental"===n.type&&void 0!==n.rentalcaseId?l("/rentals/active/"+r+n.rentalcaseId):"depot-out"===n.type&&void 0!==n.productId?l("/articles/location/product/"+o+n.productId):"depot-in"===n.type&&void 0!==n.productId?l("/articles/depot/product/"+o+n.productId):f("Hulpmiddel niet gevonden")}else f(t.message)})).catch((function(e){var t=Iu(e);console.log(e),f(t.message)}))},x=function(e,t){null!==e?function(e){Ge().put("".concat(Ye,"/customer/articles/product/edit/qrcode"),e,Ke())}({barcode:e,productId:t}).then((function(e){var n,r=Iu(e.data,"status");"success"===r.status?l(a.replace(":productId",t),{replace:!0,state:{message:null!==(n=r.message)&&void 0!==n?n:"Qr code is succesvol gekoppeld"}}):f(r.message)})).catch((function(e){var t=Iu(e);f(t.message)})):f("Scan een code of vul deze handmatig in")};return(0,Je.jsxs)("div",{className:"main",children:[(0,Je.jsx)("div",{className:"main__left"}),(0,Je.jsx)("div",{className:"main__right",children:(0,Je.jsx)("div",{className:"components",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsx)("div",{className:"col-12 col-md-8 col-lg-6",children:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:"component",children:(0,Je.jsx)("h3",{children:u})}),(0,Je.jsx)("div",{className:"outline-boxes",children:(0,Je.jsx)("div",{className:"component w-100",children:"search"===r&&(0,Je.jsxs)("div",{className:"outline-box outline-box--form",children:[(0,Je.jsx)(bp,{formFields:{barcode:{type:"text",label:"handmatig zoeken op code/serienummer"}},setValues:y,setErrors:w}),(0,Je.jsx)(_p,{handleSubmit:b,submitLabel:"Opzoeken",cancelUri:a})]})})}),(0,Je.jsx)(Bn,{message:d,type:"inline-error"}),(0,Je.jsx)("div",{className:"outline-box outline-box--details","data-match":!0,children:(0,Je.jsx)("div",{className:"text-component",children:(0,Je.jsx)("div",{className:"form__component form__component--auto",children:(0,Je.jsx)("div",{className:"form__element",children:(0,Je.jsx)("div",{className:"form__scan",children:(0,Je.jsx)(_u,{onResult:_,showViewFinder:!0,style:{width:"100%"},constraints:{facingMode:"environment"}})})})})})}),"add"===r&&(0,Je.jsx)("div",{className:"outline-box outline-box--form",children:(0,Je.jsx)(Me,{to:a,className:"button button--outline",children:(0,Je.jsx)("span",{children:"Annuleren"})})})]})})})})})})]})}function xp(e){var t=e.parents,n=e.current;console.log(n),console.log(t);var r=void 0!==t?"/"+t:"/";return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(Ep,{method:"search",returnPath:r})]})}function Sp(){return(0,Je.jsx)(Vn,{type:"tiles-secondary",content:(0,Je.jsxs)("div",{className:"tiles__wrapper",children:[!0===Am("/rentals/actions/scan")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/rentals/actions/scan",className:"tile tile__scannen active",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Scannen"})]})}),!0===Am("/rentals/actions/request")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/rentals/actions/request",className:"tile tile__verhuur",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Nieuwe aanvraag verhuur"})]})})]})})}function Cp(e){var n,r=e.setFilterValues,o=e.fields,i=void 0===o?{}:o,a=e.identifier;void 0===a&&(a="filters");var u=null!==(n=localStorage.getItem("filters"+a))&&void 0!==n?n:"{}",l=s((0,t.useState)(JSON.parse(u)),2),c=l[0],d=l[1],f=s((0,t.useState)(!1),2),p=f[0],h=f[1],m=s((0,t.useState)(),2),v=m[0],g=m[1],y=s((0,t.useState)(!1),2),w=y[0],b=y[1],_=void 0!==i&&0!==Object.keys(i).length,E=void 0!==c&&0!==Object.keys(c).length;if(!1!==_){var x=function(){d({}),localStorage.removeItem("filters"+a),r({}),window.location.reload()};return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsxs)("div",{className:"col-auto buttons page-filters",children:[!0===E&&(0,Je.jsx)("button",{type:"button",onClick:function(){return x()},className:"button button--outline button--icon--filters",children:"Reset Filters"}),(0,Je.jsx)("button",{type:"button",onClick:function(){return h(!p)},className:"button button--outline button--icon button--icon--filters",children:"Filter"}),(0,Je.jsx)("div",{className:"overlays",children:(0,Je.jsx)("div",{className:"overlay overlay--primary overlay--filters-overlay"+(!0===p?" overlay--visible":""),id:"overlay-filters",children:(0,Je.jsxs)("div",{className:"overlay__inner",children:[(0,Je.jsx)("div",{className:"overlay__top",children:(0,Je.jsx)("div",{className:"topbar",children:(0,Je.jsx)("div",{className:"container-fluid",children:(0,Je.jsx)("div",{className:"row",children:(0,Je.jsx)("div",{className:"col-12",children:(0,Je.jsxs)("div",{className:"topbar__inner",children:[(0,Je.jsx)("div",{className:"topbar__title topbar__title--icon topbar__title--filters",children:"Filters"}),(0,Je.jsx)("div",{className:"topbar__right",children:(0,Je.jsx)("div",{className:"topbar__icons",children:(0,Je.jsx)("span",{className:"close-link",onClick:function(){return h(!1)},children:"Sluiten"})})})]})})})})})}),(0,Je.jsx)("div",{className:"overlay__center",children:(0,Je.jsx)("div",{className:"overlay__content text-component",children:(0,Je.jsx)(bp,{formFields:i,setValues:function(e,t){var n=c;n[e]=t,d(n),b(!0!==w)},setErrors:g,formValues:c,formErrors:v,identifier:a})})}),(0,Je.jsx)("div",{className:"overlay__footer",children:(0,Je.jsx)("div",{className:"buttons buttons--auto",children:!0===E&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("button",{type:"button",className:"button button--primary",onClick:function(){Object.keys(c).length>0?localStorage.setItem("filters"+a,JSON.stringify(c)):localStorage.removeItem("filters"+a),r(c),h(!1)},children:"Toepassen"}),(0,Je.jsx)("button",{type:"button",className:"button button--outline",onClick:function(){x()},children:"Reset Filters"})]})})})]})})})]})})}}function Ip(e){var t=e.title,n=e.filterFields,r=e.setFilterValues,o=e.identifier;return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)("div",{className:"components",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsx)("div",{className:"col-12",children:(0,Je.jsx)("div",{className:"text-component page-title",children:(0,Je.jsxs)("div",{className:"row align-items-center justify-content-between",children:[(0,Je.jsx)("h3",{children:t}),void 0!==n&&Object.keys(n).length>0&&(0,Je.jsx)(Cp,{fields:n,setFilterValues:r,identifier:o})]})})})})})})})}function Ap(e){e.parents;var t=e.tabGroup,n=e.variables,r=JSON.parse(localStorage.getItem("routes-tree")),o=[];void 0!==t&&null!==t&&Object.values(r).forEach((function(e){t===e.tabGroup&&o.push({path:Au(e.fullPath,n),title:e.pageTitle})}));var i=function(e){var t=e.path===window.location.pathname;return(0,Je.jsx)(Me,{className:"tab"+(t?" tab--active":""),to:e.path,children:e.title})};return(0,Je.jsx)(Je.Fragment,{children:void 0!==o&&Object.keys(o).length>0&&(0,Je.jsx)("div",{className:"components tabs",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsx)("div",{className:"col-12",children:(0,Je.jsx)("div",{className:"component",children:(0,Je.jsxs)("div",{className:"tab-bar",children:[(0,Je.jsx)("input",{id:"tab-mobile-change",type:"checkbox"}),(0,Je.jsx)("label",{htmlFor:"tab-mobile-change",className:"clicker",tabIndex:"1"}),Object.values(o).map((function(e,t){return(0,Je.jsx)("div",{children:i(e)},"tab-index-"+t)}))]})})})})})})})}function Op(e){var t,n=e.title,r=e.parents,o=e.current,i=e.tabGroup,a=e.variables,s=e.filterFields,u=e.setFilterValues,l=e.message,c=e.messageType,d=e.identifier;void 0!==r&&void 0!==o?d=null!==(t=d)&&void 0!==t?t:(r+o).replaceAll("/","-"):d="pageheader";var f=ce();return void 0!==l&&null!==l||(l=null!==f.state?f.state.message:null),void 0!==c&&null!==c||(c=null!==f.state?f.state.type:null),(0,Je.jsxs)("div",{className:"page-header",children:[(0,Je.jsx)(Ip,{title:n,filterFields:s,setFilterValues:u,identifier:d}),(0,Je.jsx)(Ap,{parents:r,tabGroup:i,variables:a}),(0,Je.jsx)(Bn,{message:l,type:c})]})}function Np(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:t,tabGroup:"rentals-overview",parents:n,current:r}),(0,Je.jsx)(Sp,{parents:n,current:r})]})}function Tp(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Ep,{method:"search",returnPath:"/"+n,title:t})]})}var kp=function(e){return Ge().post("".concat(Ye,"/customer/rentals/cases"),e,Ke())},Rp=function(e){return Ge().post("".concat(Ye,"/customer/rentals/documents"),e,Ke())};function jp(e){var n=e.parents,r=JSON.parse(localStorage.getItem("auth")),o=fe(),i=s((0,t.useState)(),2),a=i[0],l=i[1],c=s((0,t.useState)({}),2),d=c[0],f=c[1],p=s((0,t.useState)({contactId:r.userId}),2),h=p[0],m=p[1],v=s((0,t.useState)([]),2),g=v[0],y=v[1],w=s((0,t.useState)({}),2),b=w[0],_=w[1],E=s((0,t.useState)(!1),2),x=E[0],S=E[1],C="/"+n,I={deliverDate:{type:"date",label:"Gewenste afleverdatum",options:{min:null,max:"+1"},rules:["required"]},urgency:{type:"checkbox",label:"Spoed"},location:{type:"location",rules:["required"]},generalUse:{type:"checkbox",label:"Algemeen gebruik"},clientName:{type:"text",label:"Naam cli\xebnt"},birthDate:{type:"date",label:"Geboortedatum",options:{min:"-125",max:null}},customerReference:{type:"text",label:"Uw referentie"},contactId:{type:"contacts",label:"Contactpersoon",rules:["required"]},comments:{type:"textarea",label:"Opmerkingen"}},A=function(e,t){var n=h;n[e]=t,m(n),S(!1===x)},O=function(e,t){if(void 0!==t.selected||"articleCategory"!==e){if(void 0!==t.categoryParents){var n,r=t.selected,o=null,i="C"+r;t.categoryParents.forEach((function(e){null===o?o=e.title:o+=" | "+e.title,e.id===r&&(n=e.priceDisplay)})),y((function(e){return[].concat(u(e),[{categoryId:r,name:o,amount:1,key:i,priceDisplay:n}])})),l(null),_({})}}else _(t)},N=function(e){var t=e.target.value,n=e.target.dataset.key,r=[];g.forEach((function(e){e.categoryId===n&&(e.amount=t),r.push(e)})),y(r)},T=function(e,t){var n=d;n[e]=t,f(n)},k=function(){var e=[];if(0===g.length&&e.push("Selecteer een artikel"),(void 0===h.locationId||null===h.locationId||!h.locationId>0)&&e.push("Selecteer een locatie"),void 0!==h.deliverDate&&null!==h.deliverDate||e.push("Selecteer een gewenste leverdatum"),void 0!==h.contactId&&null!==h.contactId||e.push("Selecteer een contactpersoon"),e.length>0){var t=e.join(", ");l(t)}else{var n=h;n.articles=g,void 0!==n.generalUse&&(n.generalUse="Ja"),function(e){return Ge().put("".concat(Ye,"/customer/rentals/request/article"),e,Ke())}(n).then((function(e){var t=Iu(e.data,"status");"success"===t.status?o(C,{replace:!0,state:{message:t.message,type:t.status}}):l(t.message)})).catch((function(e){var t=Iu(e);l(t.message)}))}};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"error",message:a}),(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("label",{htmlFor:"",className:"form__label",children:"Hulpmiddel * "}),g.map((function(e,t){var n;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)("div",{style:{float:"left",minWidth:"70%",minHeight:"35px"},children:(0,Je.jsxs)("div",{style:{display:"table-cell",verticalAlign:"middle",padding:"10px 10px 10px 0"},children:[e.name," ",e.priceDisplay]})}),(0,Je.jsxs)("div",{style:{float:"left",minWidth:"30%",minHeight:"35px",textAlign:"right"},children:[(0,Je.jsx)("div",{style:{display:"table-cell",padding:"10px 10px 10px 0"},children:"Aantal:"}),(0,Je.jsx)("div",{style:{display:"table-cell",verticalAlign:"middle"},children:(0,Je.jsx)("input",{type:"text",style:{padding:"0px",textAlign:"center",width:"35px",height:"35px"},onKeyUp:N,"data-key":e.categoryId,name:e.key,maxLength:"2",defaultValue:null!==(n=e.amount)&&void 0!==n?n:1})}),(0,Je.jsx)("div",{style:{display:"table-cell"},children:(0,Je.jsx)("div",{style:{marginLeft:"10px"},className:"details-link details-link--icon details-link--icon--remove",onClick:function(){!function(e){var t=[];g.forEach((function(n,r){r!==e&&t.push(n)})),y(t),l(null)}(t)},children:"\xa0"})})]})]},"article"+t+e.key)})),(0,Je.jsx)(dp,{fieldName:"articleCategory",fieldValue:b,output:"catalog",fields:{category:"categoryId",selectLabel:"Toevoegen op aanvraag"},setValues:O,outputType:"rentacatalog"}),(0,Je.jsx)(bp,{formFields:I,setValues:A,setErrors:T,formValues:h,formErrors:d}),(0,Je.jsx)(_p,{handleSubmit:k,cancelUri:C,submitLabel:"Aanvragen"})]}),className:"outline-box--form"})]})}function Dp(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:t,parents:n,current:r}),(0,Je.jsx)(jp,{parents:n})]})}function Pp(e){var r,o,i,a=e.documentType,u=e.documentId,l=e.display,c=void 0===l?"button-download":l,d=e.fileName,f=e.documentName,p=e.mimeType,h=void 0===p?"application/pdf":p,m=e.label,v=e.setError,g=s((0,t.useState)(!1),2),y=g[0],w=g[1];if(-1!==c.indexOf("tile")){var b=c.split("-");r=b[0],o=b[1],i=n(9890)("./document-icon-"+o+".jpg")}else r=-1!==c.indexOf("icon")?"icon":"button",o=-1!==c.indexOf("pdf")?"pdf":"download";var _=(0,t.useRef)(null);void 0!==d&&null!==d||(d="download.pdf");var E=function(e){return new Promise((function(t){return setTimeout(t,e)}))},x=function(){var e=tt(Qe().mark((function e(){var t,n=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:2500,e.next=3,E(t);case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=tt(Qe().mark((function e(){return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w(!0),e.next=4,Eu(a,u).then((function(e){if(e.data.size<100)x(1),void 0!==v?v("Er is iets foutgegaan met het ophalen van het bestand"):alert("Er is iets foutgegaan met het ophalen van het bestand");else{var t=e.data,n=URL.createObjectURL(new Blob([t],{type:h})),r=_.current;r.href=n,r.setAttribute("download",d),r.click(),URL.revokeObjectURL(n)}x()}));case 4:e.next=11;break;case 6:e.prev=6,e.t0=e.catch(0),x(1),void 0!==v?v("Er is iets foutgegaan met het ophalen van het bestand"):alert("Er is iets foutgegaan met het ophalen van het bestand"),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return null===u||void 0===u?(0,Je.jsx)(Je.Fragment,{}):(0,Je.jsxs)(Je.Fragment,{children:[!0===y&&(0,Je.jsx)(Bn,{type:"downloading"}),(0,Je.jsx)("a",{href:window.location.href,className:"hidden",ref:_,children:"\xa0"}),"icon"===r&&(0,Je.jsxs)("button",{type:"button",onClick:function(){S()},className:"button button--transparant button--"+o,children:[f," "]}),"button"===r&&(0,Je.jsx)("button",{title:m,type:"button",onClick:function(){S()},className:"button button--outline button--white button--"+o+" justify-content-center",children:m}),"tile"===r&&(0,Je.jsxs)("button",{title:m,type:"button",onClick:function(){S()},className:"button button--outline button--tile",children:[(0,Je.jsx)("img",{className:"file-icon",src:i,alt:""}),(0,Je.jsx)("div",{className:"file-name",children:m})]})]})}function Mp(e){var t=e.columns,n=e.data,r=e.identifier,o=void 0===r?"view-component":r,i=e.handleAction,a=e.boxClass,s=void 0===a?"details-row":a,u=(e.setError,function(e,t){if("link"===e)return"";if("box"===e)return"outline-box";if("details-title"===e){var n="details-title";return void 0!==t&&null!==t&&(n+=" details-title--icon details-title--icon--"+t),n}var r=s;return r+=void 0!==t&&null!==t?" "+s+"--label-line":" "+s+"--no-label"});if(void 0===n||0===n.length)return(0,Je.jsx)(Bn,{type:"noData"});var l=function(e,t){var n,r;return null!==(n=t[e.key])&&void 0!==n?n:null!==(r=e.value)&&void 0!==r?r:null},c=function(e,t){var n="button",r=e.icon;return void 0!==e.variableIcon&&null!==t[e.variableIcon]&&void 0!==t[e.variableIcon]&&(r=t[e.variableIcon]),void 0!==r&&null!==r?n+=" button--icon--"+r:void 0===e.buttontext?n+=" button--hidden":n+=" button--transparant",n};return(0,Je.jsx)(Je.Fragment,{children:t.map((function(e,r){var a,s,d,f,p,h,m,v;return(0,Je.jsxs)("div",{className:u(e.type,e.label),children:["title"===e.type&&(0,Je.jsx)("div",{className:"title",children:(0,Je.jsx)("span",{className:u("details-title",e.icon),children:null!==(a=t[r].content)&&void 0!==a?a:null!==(s=n[t[r].key])&&void 0!==s?s:null})}),"link"===e.type&&(0,Je.jsx)(Me,{to:Au(e.path,n),className:"details-link details-link--arrow",children:null!==(d=n[t[r].key])&&void 0!==d?d:null!==(f=t[r].label)&&void 0!==f?f:null}),"box"===e.type&&(0,Je.jsx)("div",{className:"details-row",children:(0,Je.jsxs)("div",{className:"details-row__column",children:[(0,Je.jsx)("div",{className:"label",children:e.label}),(0,Je.jsx)("div",{className:"value",children:(0,Je.jsx)("div",{dangerouslySetInnerHTML:{__html:l(e,n)}})})]})}),"download"===e.type&&(0,Je.jsx)(Pp,{documentType:null!==(p=n.documentType)&&void 0!==p?p:e.documentType,documentId:n[e.key],display:null!==(h=e.display)&&void 0!==h?h:"button-download",fileName:e.fileName?n[e.fileName]:null,mimeType:e.mimeType&&n[e.mimeType]?n[e.mimeType]:"application/pdf",documentName:null!==(m=n[e.documentName])&&void 0!==m?m:null,label:null!==(v=n[e.documentName])&&void 0!==v?v:e.label}),"checkbox"===e.type&&(0,Je.jsx)(fp,{setValues:i,fieldType:"checkbox",fieldName:e.key+"__"+n[e.key],fieldValue:n[e.valueKey],identifier:o}),"button"===e.type&&(0,Je.jsx)("button",{title:e.label,type:"button",className:c(e,n),onClick:function(){return e.function(n)},children:e.buttontext}),"title"!==e.type&&"link"!==e.type&&"box"!==e.type&&"download"!==e.type&&"button"!==e.type&&"checkbox"!==e.type&&(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:"details-row__column",children:(0,Je.jsx)("div",{className:"label",children:e.label})}),(0,Je.jsx)("div",{className:"details-row__column",children:(0,Je.jsxs)("div",{className:"value",children:["text"===e.type&&(0,Je.jsx)("span",{children:l(e,n)}),"html"===e.type&&(0,Je.jsx)("span",{dangerouslySetInnerHTML:{__html:l(e,n)}}),"date"===e.type&&(0,Je.jsx)("span",{children:Ou(l(e,n))})]})})]})]},"details-item-"+o+e.key+"-"+r)}))})}function Lp(e){var n=e.columns,r=e.data,o=e.identifier,i=void 0===o?"list-component":o,a=e.handleAction,u=s((0,t.useState)(JSON.stringify(r)),2),l=u[0],c=u[1],d=s((0,t.useState)(),2),f=d[0],p=d[1];if(void 0===r||0===r.length)return(0,Je.jsx)(Bn,{type:"noData"});JSON.stringify(r)!==l&&c(JSON.stringify(r));var h=[],m=[];n.forEach((function(e){"small"===e.hideView?h.push(e):("large"===e.hideView||h.push(e),m.push(e))}));var v=function(e,t){var n="button",r=e.icon;return void 0!==e.variableIcon&&null!==t[e.variableIcon]&&void 0!==t[e.variableIcon]&&(r=t[e.variableIcon]),void 0!==r&&null!==r?n+=" button--icon--"+r:void 0===e.buttontext?n+=" button--hidden":n+=" button--transparant",n},g=function(e,t){var n,r=null!==(n=e.options[t])&&void 0!==n?n:null;if(null!==r)return(0,Je.jsx)("span",{class:"icon-text icon-text--"+r})};return(0,Je.jsx)(Vn,{content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{message:f,type:"error"}),(0,Je.jsx)("div",{className:"component d-none d-lg-block",children:(0,Je.jsxs)("table",{className:"table-list",cellSpacing:"0",cellPadding:"0",children:[(0,Je.jsx)("thead",{children:(0,Je.jsx)("tr",{children:h.map((function(e,t){return(0,Je.jsx)("th",{className:"list-data-"+e.type,children:e.label},"list-label-"+e.key+t)}))})}),(0,Je.jsx)("tbody",{children:r.map((function(e,t){return(0,Je.jsx)("tr",{children:h.map((function(n,r){var o,i,s,u,l;return(0,Je.jsxs)("td",{className:"list-data-"+n.type+(void 0!==n.className?" "+n.className:""),children:["text"===n.type&&(0,Je.jsx)("span",{children:null!==(o=e[n.key])&&void 0!==o?o:null}),"date"===n.type&&(0,Je.jsx)("span",{children:Ou(e[n.key])}),"link"===n.type&&(0,Je.jsx)(Me,{to:Au(n.path,e),className:"details-link details-link--arrow"}),"checkbox"===n.type&&(0,Je.jsx)(fp,{setValues:a,fieldType:"checkbox",fieldName:n.key+"__"+e[n.key],fieldValue:e[n.valueKey],setError:p}),"download"===n.type&&(0,Je.jsx)(Pp,{documentType:null!==(i=e.documentType)&&void 0!==i?i:n.documentType,documentId:e[n.key],display:null!==(s=n.display)&&void 0!==s?s:"button-download",fileName:n.fileName?e[n.fileName]:null,mimeType:n.mimeType&&e[n.mimeType]?e[n.mimeType]:"application/pdf",documentName:null!==(u=e[n.documentName])&&void 0!==u?u:null,label:null!==(l=e[n.documentName])&&void 0!==l?l:n.label}),"button"===n.type&&void 0!==n.function&&(0,Je.jsx)("button",{title:n.label,type:"button",className:v(n,e),onClick:function(){return n.function(e)},setError:p,children:n.buttontext}),"button"===n.type&&void 0===n.function&&(0,Je.jsx)("button",{title:n.label,type:"button",className:v(n,e),setError:p,children:n.buttontext}),"icon"===n.type&&(0,Je.jsx)(Je.Fragment,{children:g(n,e[n.key])})]},"list-data-"+n.key+t+"-"+r)}))},"list-view-table-"+i+t)}))})]})}),(0,Je.jsx)("div",{className:"outline-boxes d-lg-none",children:r.map((function(e,t){return(0,Je.jsx)("div",{className:"component",children:(0,Je.jsx)("div",{className:"outline-box outline-box--details",children:(0,Je.jsx)(Mp,{columns:m,data:e,identifier:"small-view-"+i,handleAction:a})})},"list-view-small-"+i+"-"+t)}))})]}),type:"page-component"})}var Fp=function(e,t){var n=t-e+1;return Array.from({length:n},(function(t,n){return n+e}))},Bp="...",Vp=function(e){var n=e.currentPage,r=e.setCurrentPage,o=e.totalCount,i=e.pageSize,a=e.siblingCount,s=void 0===a?1:a;n<1&&function(e){throw new TypeError('"'+e+'" is read-only')}("currentPage");var l=function(e){var n=e.totalCount,r=e.pageSize,o=e.siblingCount,i=void 0===o?1:o,a=e.currentPage;return(0,t.useMemo)((function(){var e=Math.ceil(n/r);if(i+5>=e)return Fp(1,e);var t=Math.max(a-i,1),o=Math.min(a+i,e),s=t>2,l=o<e-2,c=1,d=e;if(!s&&l){var f=Fp(1,1+2*i);return[].concat(u(f),[Bp,e])}if(s&&!l){var p=Fp(e-(1+2*i)+1,e);return[c,Bp].concat(u(p))}if(s&&l){var h=Fp(t+1,o-1);return[c,Bp].concat(u(h),[Bp,d])}return[]}),[n,r,i,a])}({currentPage:n,totalCount:o,siblingCount:s,pageSize:i}),c=0,d=l[l.length-1];return d<1&&(d=1),o<=i?(0,Je.jsx)("div",{}):(0,Je.jsxs)("ul",{className:"component pagination-container",children:[1!==n&&(0,Je.jsx)("li",{className:"pagination-item",onClick:function(){r(n-1)},children:(0,Je.jsx)("div",{className:"arrow left"})}),l.map((function(e){return e===Bp?(c++,(0,Je.jsx)("li",{className:"pagination-item dots",children:"\u2026"},e+c)):(0,Je.jsxs)("div",{children:[e!==n&&(0,Je.jsx)("li",{className:"pagination-item",onClick:function(){return r(e)},children:e}),e===n&&(0,Je.jsx)("li",{className:"pagination-item selected",onClick:function(){return r(e)},children:e})]},e)})),n!==d&&(0,Je.jsx)("li",{className:"pagination-item",onClick:function(){r(n+1)},children:(0,Je.jsx)("div",{className:"arrow right"})})]})};function Up(e){var n,r=e.current,o=e.setFilterFields,i=e.filterValues,a=void 0===i?{}:i,u=e.identifier,l=10,c=s((0,t.useState)(),2),d=c[0],f=c[1],p=s((0,t.useState)(!1),2),h=p[0],m=p[1],v=s((0,t.useState)(!0),2),g=v[0],y=v[1],w=s((0,t.useState)(Nu(r)),2),b=w[0],_=w[1],E=s((0,t.useState)(0),2),x=E[0],S=E[1],C=s((0,t.useState)(),2),I=C[0],A=C[1],O=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+u)))&&void 0!==n?n:{}),2),N=O[0],T=O[1],k=s((0,t.useState)("{}"),2),R=k[0],j=k[1],D=function(e){var t={location:{type:"location",label:{locationId:"Verhuurlocatie",departmentId:"Afdeling",room:"Kamernr."}},articleCategory:{type:"categories",label:"Artikelcategorie",options:{output:"rental",category:"categoryId",article:"articleId"}},contactId:{type:"select",label:"Contactpersoon",options:e},serialNumber:{type:"text",label:"Serienr."},frameNumber:{type:"text",label:"Framenr."},rentalCaseId:{type:"text",label:"Dossiernr."},endUser:{type:"text",label:"Eindgebruiker"},birthDate:{type:"date",label:"Geboortedatum",options:{min:"125",max:null}}};return o(t),t};JSON.stringify(a)!==R&&(j(JSON.stringify(a)),m(!1),T(a),Tu(1,r,_)),b!==Nu(r)&&_(Nu(r));var P=[{key:"displayName",type:"link",path:"details/:rentalCaseId",hideView:"large"},{key:"rentalCaseId",label:"Dossiernr.",type:"text"},{key:"displayName",label:"Artikelnaam",type:"text",hideView:"small"},{key:"startDate",label:"Startdatum",type:"date"},{key:"endDate",label:"Einddatum",type:"date"},{key:"departmentRoom",label:"Afdeling/ kamernr.",type:"text"},{key:"endUser",label:"Eindgebruiker",type:"text"},{key:"companyName",label:"locatie",type:"text"},{key:"details",type:"link",path:"details/:rentalCaseId",hideView:"small"}];return-1!==u.indexOf("active")&&delete P[4],-1!==u.indexOf("waiting")&&(delete P[4],delete P[5]),(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={tabType:r,filters:He({limitOffset:l*b-9,limitRows:l},N)},e.next=3,yp().then((function(e){var t=Iu(e.data,"contacts");"success"===t.status&&g!==r&&(D(t.contacts),y(r))}));case 3:return e.next=5,kp(t).then((function(e){var t=Iu(e.data,"cases");"success"===t.status?(void 0!==t.totalCount&&S(t.totalCount),t.cases.forEach((function(e){1===e.generalUse&&(e.endUser="Algemeen gebruik")})),f(t.cases),m(!0)):A(t.message)})).catch((function(e){var t=Iu(e);A(t.message)}));case 5:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[b,R,r,N,l]),void 0!==I?(0,Je.jsx)(Bn,{type:"error",message:I}):!1===h?(0,Je.jsx)(Bn,{type:"loading"}):void 0===d||null===d||0===Object.keys(d).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:P,data:d,identifier:u}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:b,setCurrentPage:function(e){Tu(e,r,_)},totalCount:x,pageSize:l}),(0,Je.jsx)("div",{className:"spacer"})]})}function Hp(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"rentals-overview",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(Up,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function zp(e){var t=e.rentalCaseId,n=e.parents;return(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(Vn,{type:"tiles-secondary",content:(0,Je.jsxs)("div",{className:"tiles__wrapper",children:[!0===Am(n+"/retour/:rentalCaseId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"../retour/"+t,className:"tile tile__retour",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Retour",(0,Je.jsx)("br",{}),"melden"]})]})}),!0===Am(n+"/repair/:rentalCaseId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"../repair/"+t,className:"tile tile__reparatie",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Reparatie",(0,Je.jsx)("br",{}),"melden"]})]})})]})})})}function Gp(e){var n=e.parents,r=e.current,o=he().rentalCaseId,i=s((0,t.useState)(null),2),a=i[0],u=i[1],l=n.replaceAll("/","-");return null===a&&ku("rental",o,u),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:a,parents:n,current:r,variables:{rentalCaseId:o},tabGroup:l}),(0,Je.jsx)(zp,{rentalCaseId:o,parents:n})]})}function Wp(e){var n=e.columns,r=e.data,o=e.identifier,i=void 0===o?"view-component":o,a=e.listToCheck,s=(0,t.useRef)(null);if(void 0===r||0===r.length)return(0,Je.jsx)(Bn,{type:"noData"});n.forEach((function(e,t){!0!==e.hideEmpty||void 0!==r[e.key]&&null!==r[e.key]||n.splice(t,1)}));var u,l=[[],[]],c=Math.ceil(n.length/2);return n.forEach((function(e,t){u=void 0!==e.gcId?"east"===e.gcId?1:0:t>=c?1:0,l[u].push(e)})),(0,Je.jsx)("div",{className:"main",children:(0,Je.jsx)("div",{className:"container",children:(0,Je.jsx)("div",{className:"row justify-content-center",children:(0,Je.jsx)("div",{className:"col-12",children:(0,Je.jsx)("div",{className:"components outline-boxes",children:l.map((function(e,t){return(0,Je.jsx)("div",{className:"component",children:(0,Je.jsx)("div",{className:"outline-box outline-box--details",ref:s,"data-match":!0,children:(0,Je.jsx)(Mp,{columns:e,data:r,identifier:i,listToCheck:a})})},i+"-outline-box-"+t)}))})})})})})}function Xp(e){var n=e.rentalCaseId,r=e.setTitle,o=s((0,t.useState)(),2),i=o[0],a=o[1],u=s((0,t.useState)(!1),2),l=u[0],c=u[1],d=s((0,t.useState)(),2),f=d[0],p=d[1];if((0,t.useEffect)((function(){(function(e){return Ge().get("".concat(Ye,"/customer/rentals/details/")+e,Ke())})(n).then((function(e){var t=Iu(e.data,"details");"error"===t.status?p(t.message,t.status):(a(t.details),c(!0),r(t.details.title))})).catch((function(e){var t=Iu(e);p(t.message)}))}),[n,r]),void 0!==f)return(0,Je.jsx)(Bn,{type:"error",message:f});if(!1===l)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===i||null===i||0===Object.keys(i).length)return(0,Je.jsx)(Bn,{type:"noData"});var h=[{content:"Verhuurdossier",type:"title",icon:"rent",gcId:"west"},{key:"articleName",label:"Artikelnaam",type:"text",gcId:"west"},{key:"serialNumber",label:"Serienummer",type:"text",gcId:"west"},{key:"barcode",label:"Qr code",type:"text",gcId:"west"},{key:"rentalCaseId",label:"Dossiernr.",type:"text",gcId:"west"},{key:"statusDisplay",label:"Status",type:"text",gcId:"west"},{key:"priceDisplay",label:"Huurprijs",type:"text",gcId:"west"},{key:"startDate",label:"Startdatum",type:"date",gcId:"west"},{key:"endDate",label:"Einddatum",type:"date",gcId:"west"},{key:"rentalExtensions",label:"Meegeleverde artikelen",type:"text",gcId:"west"},{content:"Contact-en locatiegegevens",type:"title",icon:"user",gcId:"east"},{key:"endUser",label:"Eindgebruiker",type:"text",gcId:"east"},{key:"birthDate",label:"Geboortedatum",type:"date",gcId:"east"},{key:"departmentRoom",label:"Afdeling/kamernr.",type:"text",gcId:"east"},{key:"generalUse",label:"Algemeen gebruik",type:"text",gcId:"east"},{key:"contactUser",label:"Contactpersoon",type:"text",gcId:"east"},{key:"contactPhone",label:"Contact telefoonnr.",type:"text",gcId:"east"},{key:"contactEmail",label:"Emailadres",type:"text",gcId:"east"},{key:"rentalAddress",label:"Verhuuradres",type:"box",gcId:"east"},{key:"invoiceAddress",label:"Factuuradres",type:"box",gcId:"east"}],m=["rentalExtensions","endUser","birthDate","departmentRoom","genaralUse","contactUser","contactPhone","contactEmail"];return h.forEach((function(e,t){!m.includes(e.key)||null!==i[e.key]&&""!==i[e.key]||delete h[t],"ACTIVE"===i.status&&"endDate"===e.key&&delete h[t],"WAITING"!==i.status||"startDate"!==e.key&&"endDate"!==e.key||delete h[t]})),(0,Je.jsx)(Je.Fragment,{children:(0,Je.jsx)(Wp,{columns:h,data:i,identifier:"details"})})}function Yp(e){var n=e.parents,r=e.current,o=he().rentalCaseId,i=s((0,t.useState)(null),2),a=i[0],u=i[1],l=n.replaceAll("/","-");return null===a&&ku("rental",o,u),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:a,parents:n,current:r,variables:{rentalCaseId:o},tabGroup:l}),(0,Je.jsx)(Xp,{rentalCaseId:o,setTitle:u})]})}function qp(e){var n=e.parents,r=e.rentalCaseId,o=e.identifier,i=fe(),a=s((0,t.useState)(1),2),u=a[0],l=a[1],c=s((0,t.useState)(!1),2),d=c[0],f=c[1],p=s((0,t.useState)(!0),2),h=p[0],m=p[1],v=s((0,t.useState)(),2),g=v[0],y=v[1],w=s((0,t.useState)({}),2),b=w[0],_=w[1],E=s((0,t.useState)({}),2),x=E[0],S=E[1],C=s((0,t.useState)(),2),I=C[0],A=C[1],O=s((0,t.useState)([]),2),N=O[0],T=O[1],k=s((0,t.useState)(),2),R=k[0],j=k[1];(0,t.useEffect)((function(){yp().then((function(e){var t=Iu(e.data,"contacts");"success"===t.status&&(j(t.contacts),t.contacts.forEach((function(e){if(void 0!==e.selected){var t=He(He({},x),{},{contactId:e.value});S(t)}})))}))}),[]);var D={retourDate:{type:"date",label:"Gewenste ophaaldatum",options:{min:null,max:"+1"}},contactId:{type:"select",label:"Contactpersoon",options:R},comments:{type:"textarea",label:"Opmerkingen"}},P=function(e,t,n,r){var o=x;if(-1!==e.indexOf("rentalCaseId__")){var i,a=null!==r&&void 0!==r?r:I,s=null!==(i=x.selectedCases)&&void 0!==i?i:[],u=e.replace("rentalCaseId__","");if(!0===t&&!1===s.includes(u))s.push(u);else if(!1===t&&!0===s.includes(u)){var l=s.indexOf(u);-1!==l&&s.splice(l,1)}a.forEach((function(e,n){e.rentalCaseId===u&&(a[n].isChecked=t)})),A(a),o.selectedCases=s}else o[e]=t;S(o)},M=function(e,t){var n=b;n[e]=t,_(n)};(0,t.useEffect)((function(){gp(r+"/RENTAL-STOP").then((function(e){var t=Iu(e.data,"status");"success"!==t.status&&y(t.message)}))}),[r]),(0,t.useEffect)((function(){var e,t=[{key:"rentalCaseId",type:"checkbox",valueKey:"isChecked"},{key:"rentalCaseId",type:"text",label:"Dossiernummer"},{key:"articleName",type:"text",label:"Naam hulpmiddel"},{key:"serialNumber",type:"text",label:"Serienummer"},{key:"startDate",type:"date",label:"Startdatum"},{key:"location",type:"text",label:"Locatie"},{key:"departmentRoom",type:"text",label:"Afdeling/kamernr."},{key:"endUser",type:"text",label:"Eindgebruiker"}];void 0===I&&(e={rentalCaseId:r},Ge().post("".concat(Ye,"/customer/rentals/request/retour/cases"),e,Ke())).then((function(e){var n=Iu(e.data,"cases");"success"===n.status?(A(n.cases),f(!0),T(t)):y(n.message)}))}),[r,I]),!0===d&&h!==o&&(P("rentalCaseId__"+r,!0,0,I),m(o));var L=function(){if(1===u&&void 0!==x.selectedCases&&x.selectedCases.length>0){var e=[];I.forEach((function(t){x.selectedCases.includes(t.rentalCaseId)&&e.push(t)}));var t=N;delete t[0],A(e),T(t),l(2)}else if(2===u){var o,a;(function(e){return Ge().put("".concat(Ye,"/customer/rentals/request/retour/process"),e,Ke())})({rentalCases:x.selectedCases,retourDate:null!==(o=x.retourDate)&&void 0!==o?o:null,comments:null!==(a=x.comments)&&void 0!==a?a:null,contactId:x.contactId}).then((function(e){var t=Iu(e.data,"status");"success"===t.status?i("/"+n+"/details/"+r,{replace:!0,state:{message:t.message,type:t.status}}):y(t.message)})).catch((function(e){var t=Iu(e);y(t.message)}))}};if(void 0!==g)return(0,Je.jsx)(Bn,{type:"error",message:g});if(!1===d)return(0,Je.jsx)(Bn,{type:"loading"});return(0,Je.jsx)(Vn,{type:"outline-box",content:function(){var e="/"+n+"/details/"+r,t="Volgende stap";return 2===u&&(e="/"+n+"/actions/"+r,t="Opslaan"),void 0!==I&&I.length>0?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{children:"Verhuurdossier(s) retour melden"}),2===u&&(0,Je.jsx)(bp,{formFields:D,setValues:P,setErrors:M,formValues:x,formErrors:b}),(0,Je.jsx)(Lp,{columns:N,data:I,identifier:o,handleAction:P}),(0,Je.jsx)(_p,{handleSubmit:L,redirectUri:e,submitLabel:t})]}):(0,Je.jsx)(Bn,{type:"noData"})}(),className:"outline-box--form"})}function Kp(e){var n=e.parents,r=e.current,o=e.tabGroup,i=he().rentalCaseId,a=s((0,t.useState)(null),2),u=a[0],l=a[1],c=o;return null===u&&ku("rental",i,l),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:u,parents:n,current:r,variables:{rentalCaseId:i},tabGroup:c}),(0,Je.jsx)(qp,{parents:n,rentalCaseId:i,setTitle:l})]})}function Zp(e){var n=e.sourceId,r=e.redirectUri,o=e.cancelUri,i=e.requestType,a=fe(),u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)({}),2),f=d[0],p=d[1],h=s((0,t.useState)({sourceId:n}),2),m=h[0],v=h[1],g=s((0,t.useState)(!1),2),y=g[0],w=g[1],b=s((0,t.useState)(),2),_=b[0],E=b[1];if((0,t.useEffect)((function(){gp(n+"/"+i).then((function(e){var t=Iu(e.data,"status");"success"!==t.status&&c(t.message),w(!0)}))}),[n,i,a]),(0,t.useEffect)((function(){yp().then((function(e){var t=Iu(e.data,"contacts");"success"===t.status&&(E(t.contacts),t.contacts.forEach((function(e){if(void 0!==e.selected){var t=He(He({},m),{},{contactId:e.value});v(t)}})))}))}),[]),!1===y)return(0,Je.jsx)(Bn,{type:"loading"});var x=function(e,t,n){var r=m;void 0!==n&&null!==n?(void 0===r[n]&&(r[n]={}),r[n][e]=t):r[e]=t,v(r)},S=function(){var e={};(["description","contactId"].forEach((function(t){void 0!==m[t]&&null!==m[t]&&0!==m[t].length||(e[t]="Verplicht veld")})),0===Object.keys(e).length)?function(e){return Ge().put("".concat(Ye,"/customer/articles/product/request/repair"),e,Ke())}({sourceId:n,requestType:i,description:m.description,files:m.files,contactId:m.contactId}).then((function(e){var t=Iu(e.data,"status");"success"===t.status?a(r,{replace:!0,state:{message:t.message,type:t.status}}):c(t.message)})).catch((function(e){var t=Iu(e);c(t.message)})):p(e)};if(void 0!==l)return(0,Je.jsx)(Bn,{type:"error",message:l});var C={description:{type:"textarea",label:"Beschrijving defect"},files:{type:"file",label:"Afbeelding toevoegen"},contactId:{type:"select",label:"Contactpersoon",options:_}};return(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Reparatieverzoek indienen"}),(0,Je.jsx)(bp,{formFields:C,setValues:x,setErrors:p,formValues:m,formErrors:f}),(0,Je.jsx)(_p,{handleSubmit:S,cancelUri:o})]}),className:"outline-box--form"})}function Jp(e){var n=e.parents,r=e.current,o=he().rentalCaseId,i=s((0,t.useState)(null),2),a=i[0],u=i[1],l=n.replaceAll("/","-");return null===a&&ku("rental",o,u),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:a,parents:n,current:r,variables:{rentalCaseId:o},tabGroup:l}),(0,Je.jsx)(Zp,{parents:n,redirectUri:"/"+n+"/details/"+o,cancelUri:"/"+n+"/details/"+o,requestType:"REPAIR-RENTAL",sourceId:o})]})}var $p=function(e){return Ge().post("".concat(Ye,"/customer/management/invoices"),e,Ke())},Qp=function(e){return Ge().post("".concat(Ye,"/customer/management/overviews/excel"),e,He({responseType:"arraybuffer"},Ke()))};function eh(e){var n,r=e.current,o=e.setFilterFields,i=e.filterValues,a=void 0===i?{}:i,u=e.viewType,l=e.typeId,c=e.identifier,d=10,f=s((0,t.useState)(),2),p=f[0],h=f[1],m=s((0,t.useState)(!1),2),v=m[0],g=m[1],y=s((0,t.useState)(!0),2),w=y[0],b=y[1],_=s((0,t.useState)(Nu(r)),2),E=_[0],x=_[1],S=s((0,t.useState)(0),2),C=S[0],I=S[1],A=s((0,t.useState)(),2),O=A[0],N=A[1],T=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+c)))&&void 0!==n?n:null),2),k=T[0],R=T[1],j=s((0,t.useState)("{}"),2),D=j[0],P=j[1],M=function(){if("rental-case"!==u){var e={invoiceEntity:{type:"location",options:{locationId:"locationId"},label:{locationId:"Financieel verantwoordelijke"}},shipmentEntity:{type:"location",options:{locationId:"shipmentLocationId"},label:{locationId:"Afleverlocatie"}},paymentStatus:{type:"select",label:"Betaalstatus",options:[{value:"OPEN",label:"Te betalen"},{value:"HANDLED",label:"Voldaan"}]},isCredit:{type:"select",label:"Type factuur",options:[{value:"0",label:"Debet"},{value:"1",label:"Credit"}]},originType:{type:"select",label:"Oorsprong",options:[{value:"SALE",label:"Verkoop"},{value:"RENTAL",label:"Verhuur (periodieke verzamelfactuur)"},{value:"Depot",label:"Depot"}]}};return o(e),e}};JSON.stringify(a)!==D&&(P(JSON.stringify(a)),g(!1),R(a),Tu(1,r,x)),E!==Nu(r)&&x(Nu(r));var L=[{key:"title",type:"title",hideView:"large"},{key:"invoiceNumber",type:"text",label:"Factuurnr.",hideView:"small"},{key:"invoiceDate",type:"date",label:"Datum"},{key:"priceDisplay",type:"text",label:"Totaalbedrag"},{key:"paymentStatus",type:"text",label:"Betaalstatus"},{key:"originType",type:"text",label:"Oorsprong"},{key:"location",type:"text",label:"Locatie"},{key:"invoiceId",label:"Download factuur",type:"download",display:"icon-download",documentType:"invoice",fileName:"documentName"}];return"rental-case"===u&&(delete L[5],delete L[6]),(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={tabType:r,viewType:null!==u&&void 0!==u?u:null,typeId:null!==l&&void 0!==l?l:null,filters:He({limitOffset:d*E-9,limitRows:d},k)},e.next=3,$p(t).then((function(e){var t=Iu(e.data,"invoices");"success"===t.status?(void 0!==t.totalCount&&(I(t.totalCount),w!==r&&(M(),b(r))),h(t.invoices),g(!0)):N(t.message)})).catch((function(e){var t=Iu(e);N(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[r,E,k,d,l,u]),void 0!==O?(0,Je.jsx)(Bn,{type:"error",message:O}):!1===v?(0,Je.jsx)(Bn,{type:"loading"}):void 0===p||null===p||0===Object.keys(p).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:L,data:p,identifier:c}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:E,setCurrentPage:function(e){Tu(e,r,x)},totalCount:C,pageSize:d}),(0,Je.jsx)("div",{className:"spacer"})]})}function th(e){var n,r=e.parents,o=e.current,i=(r+o).replaceAll("/","-"),a=r.replaceAll("/","-"),u=he().rentalCaseId,l=s((0,t.useState)(null),2),c=l[0],d=l[1],f=s((0,t.useState)([]),2),p=f[0],h=f[1],m=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+i)))&&void 0!==n?n:{}),2),v=m[0],g=m[1],y=s((0,t.useState)(!1),2),w=y[0],b=y[1];null===c&&ku("rental",u,d);return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:r,current:o}),(0,Je.jsx)(Op,{title:c,parents:r,current:o,variables:{rentalCaseId:u},tabGroup:a,filterFields:p,setFilterValues:function(e){g(e),b(!1===w)},identifier:i}),(0,Je.jsx)(eh,{current:o,filterValues:v,setFilterFields:h,identifier:i,viewType:"rental-case",typeId:u})]})}function nh(e){var n=e.rentalCaseId,r=e.current,o=e.identifier,i=10,a=s((0,t.useState)(),2),u=a[0],l=a[1],c=s((0,t.useState)(!1),2),d=c[0],f=c[1],p=s((0,t.useState)(Nu(r)),2),h=p[0],m=p[1],v=s((0,t.useState)(0),2),g=v[0],y=v[1],w=s((0,t.useState)(),2),b=w[0],_=w[1];h!==Nu(r)&&m(Nu(r));return(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={tabType:r,rentalCaseId:n,filters:{limitOffset:i*h-9,limitRows:i}},e.next=3,Rp(t).then((function(e){var t=Iu(e.data,"documents");"success"===t.status?(void 0!==t.totalCount&&y(t.totalCount),l(t.documents),f(!0)):_(t.message)})).catch((function(e){var t=Iu(e);_(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[h,r,i,n]),void 0!==b?(0,Je.jsx)(Bn,{type:"error",message:b}):!1===d?(0,Je.jsx)(Bn,{type:"loading"}):void 0===u||null===u||0===Object.keys(u).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:[{key:"documentNumber",type:"title",hideView:"large"},{key:"documentNumber",type:"text",label:"Documentnr.",hideView:"small"},{key:"documentName",type:"text",label:"Document"},{key:"createDate",type:"date",label:"Aanmaakdatum"},{key:"documentNumber",label:"Download document",type:"download",display:"icon-download",documentType:"documentType",mimeType:"mimeType",fileName:"fileName"}],data:u,identifier:o}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:h,setCurrentPage:function(e){Tu(e,r,m)},totalCount:g,pageSize:i}),(0,Je.jsx)("div",{className:"spacer"})]})}function rh(e){var n=e.parents,r=e.current,o=he().rentalCaseId,i=s((0,t.useState)(null),2),a=i[0],u=i[1],l=n.replaceAll("/","-");return null===a&&ku("rental",o,u),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:a,parents:n,current:r,variables:{rentalCaseId:o},tabGroup:l}),(0,Je.jsx)(nh,{rentalCaseId:o,current:r,identifier:l})]})}function oh(e){var n=e.current,r=e.setFilterFields,o=e.filterValues,i=e.identifier,a=10,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(!0),2),m=h[0],v=h[1],g=s((0,t.useState)(Nu(n)),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+i))),2),A=I[0],O=I[1],N=s((0,t.useState)("{}"),2),T=N[0],k=N[1];JSON.stringify(o)!==T&&(k(JSON.stringify(o)),p(!1),O(o),Tu(1,n,w)),y!==Nu(n)&&w(Nu(n));var R=[];[{key:"title",type:"link",path:"product/details/:productId",hideView:"large"},{key:"enableReservation",label:"",type:"icon",options:{1:"warning"}},{key:"articleName",label:"Artikelnaam",type:"text",hideView:"small"},{key:"serialNumber",label:"Serienr.",type:"text",hideView:"small"},{key:"productStatus",label:"Productstatus",type:"text"},{key:"startDate",label:"Startdatum depot",type:"date"},{key:"owner",label:"Locatie",type:"text"},{key:"departmentRoom",label:"Afdeling/kamernr.",type:"text"},{key:"registrationYear",label:"Bouwjaar",type:"text"},{key:"productBrand",label:"Merk",type:"text"},{key:"productType",label:"Type",type:"text"},{key:"quality",label:"Kwaliteit",type:"text"},{key:"productId",type:"link",path:"product/details/:productId",id:"productId",hideView:"small"}].forEach((function(e){("location"===n&&"productStatus"!==e.key&&"depotStatus"!==e.key&&"startDate"!==e.key&&"enableReservation"!==e.key||"depot"===n&&"owner"!==e.key&&"departmentRoom"!==e.key)&&R.push(e)}));var j=function(){var e={articleCategory:{type:"categories",label:"Artikelcategorie",options:{output:"depot",category:"categoryId",article:"articleId"}},location:{type:"location"},clientName:{type:"text",label:"Naam cli\xebnt"},serialNumber:{type:"text",label:"Serienr."},frameNumber:{type:"text",label:"Framenr."},registrationDateFrom:{type:"text",label:"Bouwjaar van"},registrationDateTo:{type:"text",label:"Bouwjaar tot"},quality:{type:"select",label:"Kwaliteit",options:[{label:"Goed",value:"GOOD"},{label:"Matig",value:"AVERAGE"},{label:"Slecht",value:"BAD"}]}};"depot"===n&&delete e.location,r(e)};return(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={filters:He({tabType:n,limitOffset:a*y-9,limitRows:a},A)},e.next=3,Ru(t).then((function(e){var t=Iu(e.data,"products");"success"===t.status?(void 0!==t.totalCount&&E(t.totalCount),c(t.products),p(!0),m!==n&&(j(),v(n))):C(t.message)})).catch((function(e){var t=Iu(e);C(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,y,A,T,a]),void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:R,data:l,identifier:i}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,setCurrentPage:function(e){Tu(e,n,w)},totalCount:_,pageSize:a}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function ih(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"product-overview",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(oh,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function ah(){return(0,Je.jsx)(Vn,{type:"tiles-secondary",content:(0,Je.jsxs)("div",{className:"tiles__wrapper",children:[!0===Am("/articles/actions/scan")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/articles/actions/scan",className:"tile tile__scannen active",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Scannen"})]})}),!0===Am("/articles/inspections")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/articles/inspections",className:"tile tile__inspections",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Keuringen"})]})}),!0===Am("/articles/repairs")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/articles/repairs",className:"tile tile__reparatie",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Reparaties"})]})}),!0===Am("/articles/add")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/articles/add",className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Hulpmiddel",(0,Je.jsx)("br",{}),"registreren"]})]})})]})})}function sh(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:t,tabGroup:"product-overview",parents:n,current:r}),(0,Je.jsx)(ah,{parents:n,current:r})]})}function uh(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Ep,{method:"search",returnPath:"/"+n,title:t})]})}function lh(e){var n=e.current,r=e.setFilterFields,o=e.filterValues,i=e.identifier,a=10,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(),2),m=h[0],v=h[1],g=s((0,t.useState)(Nu(n)),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+i))),2),A=I[0],O=I[1],N=s((0,t.useState)("{}"),2),T=N[0],k=N[1];JSON.stringify(o)!==T&&(k(JSON.stringify(o)),p(!1),O(o),Tu(1,n,w)),y!==Nu(n)&&w(Nu(n));var R=[{key:"statusLabel",label:"Status",type:"text"},{key:"plannedDate",label:"Te keuren voor",type:"date"},{key:"inspectDate",label:"Keuringsdatum",type:"date"},{key:"serialNumber",label:"Serienummer",type:"text"},{key:"name",label:"Artikelnaam",type:"text"},{key:"owner",label:"Locatie",type:"text"},{key:"inspectionNumber",label:"Keuringsrapport",type:"download",display:"icon",fileName:"Keuringsrapport-vdMark",documentType:"inspection"}];"open"===n?(delete R[2],delete R[6]):"archive"===n?delete R[1]:"inspections"===n&&delete R[5];var j={};if("inspections"===n){j={conclusion:{type:"select",label:"Status",options:[{value:"PENDING",label:"Te keuren"},{value:"COMPLETED",label:"Goedgekeurd"},{value:"REJECTED",label:"Afgekeurd"}]}}}else j={articleCategory:{type:"categories",label:"Artikelcategorie",options:{output:"depot",category:"categoryId",article:"articleId"}},location:{type:"location",options:{locationId:"locationId"},label:{locationId:"Locatie"}},serialNumber:{type:"text",label:"Serienummer"},dateFrom:{type:"date",label:"Vanaf keuringsdatum",options:{min:"2015",max:null}},dateTo:{type:"date",label:"Tot keuringsdatum",options:{min:"2015",max:null}}};return!0===f&&m!==n&&(r(j),v(n)),(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={context:"overview-"+n,filters:He({limitOffset:a*y-9,limitRows:a},A)},e.next=3,Du(t).then((function(e){var t=Iu(e.data,"inspections");"success"===t.status?(void 0!==t.totalCount&&E(t.totalCount),c(t.inspections),p(!0)):C(t.message)})).catch((function(e){var t=Iu(e);C(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,y,T,A,a]),void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:R,data:l,identifier:i}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,setCurrentPage:function(e){Tu(e,n,w)},totalCount:_,pageSize:a}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function ch(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"inspections",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(lh,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function dh(){var e=fe(),n=s((0,t.useState)("step1"),2),r=n[0],o=n[1],i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)({}),2),c=l[0],d=l[1],f=s((0,t.useState)({}),2),p=f[0],h=f[1],m=s((0,t.useState)(),2),v=m[0],g=m[1],y=function(e,t){var n,r=p;void 0===r.customFields&&(r.customFields={}),void 0!==v&&void 0!==v[e]?r.customFields[e]=t:r[e]=t,h(r),"articleCategory"===e&&void 0!==r.articleCategory.article&&null!==r.articleCategory.article&&r.articleCategory.articleId>0&&(n=r.articleCategory.articleId,Lu(n).then((function(e){var t=Iu(e.data);"success"===t.status?(g(t.response),o("step2")):u(t.message)})))},w=function(){var t=p;t.articleId=p.articleCategory.articleId;var n={};["articleId","locationId","serialNumber"].forEach((function(e){void 0===t[e]?(u("Veld niet gevonden: "+e),n[e]="Verplicht veld"):null!==t[e]&&0!==t[e].length||(n[e]="Verplicht veld")})),0===Object.keys(n).length?function(e){return Ge().put("".concat(Ye,"/customer/articles/product/add"),e,Ke())}(t).then((function(t){var n=Iu(t.data,"product");if("success"===n.status)e("/articles/location/product/actions/scan/"+n.product.productId,{replace:!0,state:{message:n.product.message,type:n.status}});else if(null!==n.response&&void 0!==p[n.response]){var r={};r[n.response]=n.message,d(r)}else u(n.message)})).catch((function(e){var t=Iu(e);u(t.message)})):d(n)},b={step1:{articleCategory:{type:"categories",label:"Selecteer artikel",options:{output:"depot",category:"categoryId",article:"articleId"}}},step2:{location:{type:"location"},clientName:{type:"text",label:"Naam cli\xebnt"},serialNumber:{type:"text",label:"Serienummer",rules:["required"],info:"Serienummer mag bestaan uit hoofdletters, cijfers,koppelteken (-) of punt (.). Andere leestekens, spaties of speciale tekens worden genegeerd."},frameNumber:{type:"text",label:"Framenummer"},registrationYear:{type:"text",label:"Bouwjaar"},productBrand:{type:"text",label:"Merk"},productType:{type:"text",label:"Type"},dimensions:{type:"text",label:"Afmetingen"},remarks:{type:"textarea",label:"Opmerkingen"}}};void 0!==v&&Object.keys(v).forEach((function(e){var t;b.step2[e]={type:v[e].type,label:v[e].properties.label,options:null!==(t=v[e].properties.options)&&void 0!==t?t:null}}));var _="Hulpmiddel registreren";void 0!==p.articleCategory&&void 0!==p.articleCategory.article&&null!==p.articleCategory.article&&(_+=" | "+p.articleCategory.article.name);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"error",message:a}),(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:_}),(0,Je.jsx)(bp,{formFields:b[r],setValues:y,setErrors:d,formValues:p,formErrors:c,identifier:"product-add"}),"step2"===r&&void 0!==v&&(0,Je.jsx)(_p,{handleSubmit:w,cancelUri:"/articles/actions",submitLabel:"step1"===r?"Volgende stap":"Verzenden"})]}),className:"outline-box--form"})]})}function fh(e){var t=e.parents,n=e.current;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:t,current:n}),(0,Je.jsx)(Vn,{type:"centred",content:(0,Je.jsx)(Bn,{type:"state"})}),(0,Je.jsx)(dh,{parents:t,current:n})]})}function ph(e){var n=e.current,r=e.setFilterFields,o=e.filterValues,i=e.identifier,a=10,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(),2),m=h[0],v=h[1],g=s((0,t.useState)(Nu(n)),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+i))),2),A=I[0],O=I[1],N=s((0,t.useState)("{}"),2),T=N[0],k=N[1];JSON.stringify(o)!==T&&(k(JSON.stringify(o)),p(!1),O(o),Tu(1,n,w)),y!==Nu(n)&&w(Nu(n));var R=[{key:"repairNumber",label:"Reparatienummer",type:"text"},{key:"serialNumber",label:"Serienummer",type:"text"},{key:"statusLabel",label:"Status",type:"text"},{key:"createDate",label:"Aanmaakdatum",type:"date"},{key:"repairDate",label:"Reparatiedatum",type:"date"},{key:"repairer",label:"Reparateur",type:"text"},{key:"repairNumber",label:"Reparatiebon",type:"download",display:"icon",fileName:"documentName",documentType:"repair"}];"open"===n&&(delete R[4],delete R[5],delete R[6]);return!0===f&&m!==n&&(r({repairId:{type:"text",label:"Repartienummer"},conclusion:{type:"select",label:"Reparatiestatus",options:[{value:"PROCESSING",label:"In behandeling"},{value:"FIXED",label:"Afgerond"}]}}),v(n)),(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={context:"overview-"+n,filters:He({limitOffset:a*y-9,limitRows:a},A)},e.next=3,ju(t).then((function(e){var t=Iu(e.data,"repairs");"success"===t.status?(void 0!==t.totalCount&&E(t.totalCount),c(t.repairs),p(!0)):C(t.message)})).catch((function(e){var t=Iu(e);C(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,y,T,A,a]),void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:R,data:l,identifier:i}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,setCurrentPage:function(e){Tu(e,n,w)},totalCount:_,pageSize:a}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function hh(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"repairs",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(ph,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function mh(e){var n=e.parents,r=e.productId,o="/"+n+"/",i=-1===n.indexOf("articles/depot")?"location":"depot",a=s((0,t.useState)(!1),2),u=a[0],l=a[1],c=s((0,t.useState)(),2),d=c[0],f=c[1];(0,t.useEffect)((function(){tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Bu(r);case 3:t=e.sent,f(t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log("Error catching product status");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))()}),[]),!1===u&&Fu(r,l),console.log(u);var p=function(){return(0,Je.jsxs)(Je.Fragment,{children:[(!1===u||null===u||""===u)&&!0===Am(o+"actions/scan/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/scan/"+r,className:"tile tile__scannen active",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Qr code",(0,Je.jsx)("br",{}),"koppelen"]})]})}),"depot"===i&&!0===Am(o+"actions/depotout/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/depotout/"+r,className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Leveren",(0,Je.jsx)("br",{}),"uit depot"]})]})}),"depot"===i&&!0===Am(o+"actions/reservation/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/reservation/"+r,className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Reservering"})]})}),"location"===i&&(0,Je.jsxs)(Je.Fragment,{children:[!0===Am(o+"actions/relocate/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/relocate/"+r,className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Locatie",(0,Je.jsx)("br",{}),"wijzigen"]})]})}),!0===Am(o+"actions/repair/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/repair/"+r,className:"tile tile__reparatie",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Reparatieverzoek",(0,Je.jsx)("br",{}),"indienen"]})]})}),!0===Am(o+"actions/clientrepair/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/clientrepair/"+r,className:"tile tile__reparatie",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Reparatie",(0,Je.jsx)("br",{}),"Registreren"]})]})}),!0===Am(o+"actions/depot/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/depot/"+r,className:"tile tile__depotopslag",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Aanvraag",(0,Je.jsx)("br",{}),"depotopslag"]})]})}),!0===Am(o+"actions/client/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/client/"+r,className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Naam",(0,Je.jsx)("br",{}),"cli\xebnt"]})]})})]}),!0===Am(o+"actions/edit/:productId")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:o+"actions/edit/"+r,className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsxs)("span",{className:"tile__title",children:["Gegevens",(0,Je.jsx)("br",{}),"hulpmiddel",(0,Je.jsx)("br",{}),"wijzigen"]})]})})]})};return"REMOVED"===d?(0,Je.jsx)(Bn,{type:"warning",message:"Hulpmiddel is afgevoerd"}):"RESERVED"===d?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",title:"Reservering actief",message:function(){var e="",t=JSON.parse(localStorage.getItem("product-"+r));return void 0!==t&&void 0!==t.reservationReason&&(e=t.reservationReason),e}()}),(0,Je.jsx)(Vn,{type:"tiles-secondary",content:p()})]}):(0,Je.jsx)(Vn,{type:"tiles-secondary",content:p()})}function vh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(mh,{productId:a,parents:n,identifier:o})]})}function gh(e){var n=e.title,r=e.parents,o=e.current,i=(r+o).replaceAll("/","-"),a=-1===r.indexOf("articles/depot")?"location":"depot",u=he().productId,l=s((0,t.useState)(null),2),c=l[0],d=l[1];return null===c&&ku("product",u,d),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{parents:r,current:o}),(0,Je.jsx)(Op,{title:c,parents:r,current:o,tabGroup:"product-details-"+a,variables:{productId:u},identifier:i}),(0,Je.jsx)(Ep,{productId:u,method:"add",title:n,returnPath:"/"+r+"/"+u,forward:"/"+r.replace("/actions","/details")+"/"+u})]})}function yh(e){var n=e.productId,r=e.parents,o=fe(),i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)(!1),2),c=l[0],d=l[1],f=s((0,t.useState)(!1),2),p=f[0],h=f[1],m=s((0,t.useState)(),2),v=m[0],g=m[1],y=s((0,t.useState)(),2),w=y[0],b=y[1],_=s((0,t.useState)(),2),E=_[0],x=_[1],S=s((0,t.useState)(),2),C=S[0],I=S[1],A=s((0,t.useState)(null),2),O=A[0],N=A[1],T=s((0,t.useState)({}),2),k=T[0],R=T[1],j=s((0,t.useState)({}),2),D=j[0],P=j[1],M=s((0,t.useState)(),2),L=M[0],F=M[1],B=function(e){b(e),Su(e).then((function(e){var t=Iu(e.data,"departments");"success"===t.status?I(t.departments):g(t.message)}))};(0,t.useEffect)((function(){yp().then((function(e){var t=Iu(e.data,"contacts");"success"===t.status&&(F(t.contacts),t.contacts.forEach((function(e){if(void 0!==e.selected){var t=He(He({},D),{},{contactId:e.value});P(t)}})))}))}),[]),(0,t.useEffect)((function(){gp(n+"/PRODUCT-LOCATION-UPDATE").then((function(e){var t=Iu(e.data,"status");"success"!==t.status&&g(t.message),h(!0)}))}),[n,o]),(0,t.useEffect)((function(){void 0!==w&&!1!==c||Mu(n).then((function(e){var t=Iu(e.data,"details");if("success"===t.status){if(u(t.details),void 0===w){var r=He(He({},D),{},{productId:n,locationId:t.details.ownerEntityId,departmentId:t.details.departmentId,room:t.details.room,handler:O});P(r),d(!0),B(t.details.ownerEntityId)}}else g(t.message)}))}),[n,O,w,c]),(0,t.useEffect)((function(){xu().then((function(e){var t=Iu(e.data,"locations");"success"===t.status?x(t.locations):g(t.message)}))}),[g]);var V=function(e,t,n){var r=D;void 0!==n&&null!==n?(void 0===r[n]&&(r[n]={}),r[n][e]=t):r[e]=t,"locationId"===e&&(B(t),r.room=null,r.departmentId=null),"handler"===e&&N(t),P(r)},U=function(){var e,t,i={};(["locationId","handler","contactId"].forEach((function(e){void 0!==D[e]&&null!==D[e]&&0!==D[e].length||(i[e]="Verplicht veld")})),0===Object.keys(i).length)?function(e){return Ge().put("".concat(Ye,"/customer/articles/product/edit/location"),e,Ke())}({productId:D.productId,toLocation:D.locationId,toDepartment:D.departmentId,toRoom:D.room,handler:D.handler,comment:null!==(e=D.comment)&&void 0!==e?e:null,deliverDate:null!==(t=D.deliverDate)&&void 0!==t?t:null,contactId:D.contactId}).then((function(e){var t=Iu(e.data,"status");"success"===t.status?o("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):g(t.message)})).catch((function(e){var t=Iu(e);g(t.message)})):R(i)};if(void 0!==v)return(0,Je.jsx)(Bn,{type:"error",message:v});if(!1===p||!1===c||void 0===E||void 0===C)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===a||null===a||0===Object.keys(a).length)return(0,Je.jsx)(Bn,{type:"noData"});var H={locationId:{type:"select",label:"Locatie",options:E},departmentRoom:{type:"fieldset",options:{departmentId:{type:"select",label:"Afdeling",options:C,className:"col-8"},room:{type:"text",label:"Kamer",className:"col-4"}}},handler:{type:"radio",label:"Uitvoeren door",options:[{label:"Van der Mark",value:"vdm"},{label:"Intern",value:"intern"}]},contactId:{type:"select",label:"Contactpersoon",options:L}},z={comment:{type:"textarea",label:"Opmerkingen"},deliverDate:{type:"date",label:"Gewenste uitvoerdatum",options:{min:null,max:"+1"}}};return(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Locatie wijzigen / verplaatsen"}),(0,Je.jsx)(bp,{formFields:H,setValues:V,setErrors:R,formValues:D,formErrors:k}),"vdm"===O&&(0,Je.jsx)(bp,{formFields:z,setValues:V,setErrors:R,formValues:D,formErrors:k}),(0,Je.jsx)(_p,{handleSubmit:U,cancelUri:"/"+r+"/"+n})]}),className:"outline-box--form"})}function wh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(yh,{parents:n,productId:a,identifier:o})]})}function bh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(Zp,{parents:n,redirectUri:"/"+n.replace("actions","details/")+a,cancelUri:"/"+n+"/"+a,requestType:"REPAIR-DEPOT",sourceId:a,identifier:o})]})}function _h(e){var n=e.productId,r=e.parents,o=JSON.parse(localStorage.getItem("auth")),i=fe(),a=s((0,t.useState)(),2),u=a[0],l=a[1],c=s((0,t.useState)(!1),2),d=c[0],f=c[1],p=s((0,t.useState)(!1),2),h=p[0],m=p[1],v=s((0,t.useState)(),2),g=v[0],y=v[1],w=s((0,t.useState)({}),2),b=w[0],_=w[1],E=s((0,t.useState)({contactId:o.userId}),2),x=E[0],S=E[1];(0,t.useEffect)((function(){gp(n+"/REPAIR-DEPOT").then((function(e){var t=Iu(e.data,"status");"success"!==t.status&&y(t.message),m(!0)}))}),[n,i]),(0,t.useEffect)((function(){Mu(n).then((function(e){var t=Iu(e.data,"details");if("success"===t.status){l(t.details);var r=He(He({},x),{},{productId:n});S(r),f(!0)}else y(t.message)}))}),[n]);var C=function(e,t,n){var r=x;void 0!==n&&null!==n?(void 0===r[n]&&(r[n]={}),r[n][e]=t):r[e]=t,S(r)},I=function(){var e={};(["comments","contactId"].forEach((function(t){void 0!==x[t]&&null!==x[t]&&0!==x[t].length||(e[t]="Verplicht veld")})),0===Object.keys(e).length)?function(e){return Ge().put("".concat(Ye,"/customer/articles/product/request/depot-in"),e,Ke())}({productId:x.productId,comments:x.comments,deliverDate:x.deliverDate,contactId:x.contactId}).then((function(e){var t=Iu(e.data,"status");"success"===t.status?i("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):y(t.message)})).catch((function(e){var t=Iu(e);y(t.message)})):_(e)};if(void 0!==g)return(0,Je.jsx)(Bn,{type:"error",message:g});if(!1===d||!1===h)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===u||null===u||0===Object.keys(u).length)return(0,Je.jsx)(Bn,{type:"noData"});var A={deliverDate:{type:"date",label:"Gewenste ophaaldatum",options:{min:null,max:"+1"}},contactId:{type:"contacts",label:"Contactpersoon",rules:["required"]},comments:{type:"textarea",label:"Opmerkingen"}};return(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Aanvraag depotopslag"}),(0,Je.jsx)(bp,{formFields:A,setValues:C,setErrors:_,formValues:x,formErrors:b}),(0,Je.jsx)(_p,{handleSubmit:I,cancelUri:"/"+r+"/"+n})]}),className:"outline-box--form"})}function Eh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(_h,{parents:n,productId:a,identifier:o})]})}function xh(e){var n=e.productId,r=e.parents,o=fe(),i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)(!1),2),c=l[0],d=l[1],f=s((0,t.useState)(!1),2),p=f[0],h=f[1],m=s((0,t.useState)(),2),v=m[0],g=m[1],y=s((0,t.useState)({}),2),w=y[0],b=y[1],_=s((0,t.useState)(),2),E=_[0],x=_[1];(0,t.useEffect)((function(){gp(n+"/PRODUCT-CLIENT-UPDATE").then((function(e){var t=Iu(e.data,"status");"success"!==t.status&&g(t.message),h(!0)}))}),[n,o]),(0,t.useEffect)((function(){Mu(n).then((function(e){var t=Iu(e.data,"details");"success"===t.status?(u(t.details),x({productId:n}),d(!0)):g(t.message)}))}),[n]);var S=function(e,t,n){var r=E;void 0!==n&&null!==n?(void 0===r[n]&&(r[n]={}),r[n][e]=t):r[e]=t,x(r)},C=function(){var e={};(["clientName"].forEach((function(t){void 0===E[t]?(g("Veld niet gevonden: "+t),e[t]="Verplicht veld"):null!==E[t]&&0!==E[t].length||(e[t]="Verplicht veld")})),0===Object.keys(e).length)?function(e){return Ge().put("".concat(Ye,"/customer/articles/product/edit/client"),e,Ke())}({productId:E.productId,clientName:E.clientName}).then((function(e){var t=Iu(e.data,"status");"success"===t.status?o("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):g(t.message)})).catch((function(e){var t=Iu(e);g(t.message)})):b(e)};if(void 0!==v)return(0,Je.jsx)(Bn,{type:"error",message:v});if(!1===c||!1===p)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===a||null===a||0===Object.keys(a).length)return(0,Je.jsx)(Bn,{type:"noData"});var I={clientName:{type:"text",label:"Naam cli\xebnt"}};return(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Naam cli\xebnt wijzigen"}),(0,Je.jsx)(bp,{formFields:I,setValues:S,setErrors:b,formValues:E,formErrors:w}),(0,Je.jsx)(_p,{handleSubmit:C,cancelUri:"/"+r+"/"+n})]}),className:"outline-box--form"})}function Sh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(xh,{parents:n,productId:a,identifier:o})]})}function Ch(e){var n=e.productId,r=e.parents,o=fe(),i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)(!1),2),c=l[0],d=l[1],f=s((0,t.useState)(),2),p=f[0],h=f[1],m=s((0,t.useState)({}),2),v=m[0],g=m[1],y=s((0,t.useState)({}),2),w=y[0],b=y[1],_=s((0,t.useState)(),2),E=_[0],x=_[1];(0,t.useEffect)((function(){null!==a&&void 0!==a&&Lu(a.productTemplateId).then((function(e){var t=Iu(e.data);"success"===t.status?x(t.response):h(t.message)}))}),[a]),(0,t.useEffect)((function(){Mu(n).then((function(e){var t=Iu(e.data,"details");if("success"===t.status){u(t.details);var r={productId:n,productBrand:t.details.productBrand,registrationDate:t.details.registrationDate,productType:t.details.productType,dimensions:t.details.dimensions,frameNumber:t.details.frameNumber,serialNumber:t.details.serialNumber,remarks:t.details.remarks};Object.keys(t.details.customFields).forEach((function(e){var n=t.details.customFields[e].id;r=He(He({},r),{},Ve({},n,t.details.customFields[e].valueRaw))})),b(r),d(!0)}else h(t.message)}))}),[n]);var S=function(e,t,n){var r=w;void 0===r.customFields&&(r.customFields={}),void 0!==E&&void 0!==E[e]?r.customFields[e]=t:r[e]=t,void 0!==n&&null!==n?(void 0===r[n]&&(r[n]={}),r[n][e]=t):r[e]=t,b(r)},C=function(){var e={};if([].forEach((function(t){void 0===w[t]?(h("Veld niet gevonden: "+t),e[t]="Verplicht veld"):null!==w[t]&&0!==w[t].length||(e[t]="Verplicht veld")})),0===Object.keys(e).length){var t={productId:n,customFields:w.customFields};Object.keys(w).forEach((function(e){Object.keys(I).forEach((function(n){n===e&&(t=He(He({},t),{},Ve({},e,w[e])))}))})),function(e){return Ge().put("".concat(Ye,"/customer/articles/product/edit/data"),e,Ke())}(t).then((function(e){var t=Iu(e.data,"status");"success"===t.status?o("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):h(t.message)})).catch((function(e){var t=Iu(e);h(t.message)}))}else g(e)};if(void 0!==p)return(0,Je.jsx)(Bn,{type:"error",message:p});if(!1===c)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===a||null===a||0===Object.keys(a).length)return(0,Je.jsx)(Bn,{type:"noData"});var I={productBrand:{type:"text",label:"Merk",value:w.productBrand},productType:{type:"text",label:"Type"},dimensions:{type:"text",label:"Afmetingen"},registrationDate:{type:"date",label:"Bouwjaar",options:{min:"-125",max:null}},remarks:{type:"textarea",label:"Opmerkingen"},serialNumber:{type:"text",label:"Serienummer"},frameNumber:{type:"text",label:"Framenummer"}};void 0!==E&&Object.keys(E).forEach((function(e){var t;I[e]={type:E[e].type,label:E[e].properties.label,options:null!==(t=E[e].properties.options)&&void 0!==t?t:null}}));return(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Artikelgegevens wijzigen"}),(0,Je.jsx)(bp,{formFields:I,setValues:S,setErrors:g,formValues:w,formErrors:v}),(0,Je.jsx)(_p,{handleSubmit:C,cancelUri:"/"+r+"/"+n})]}),className:"outline-box--form"})}function Ih(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(Ch,{parents:n,productId:a,identifier:o})]})}function Ah(e){var n=e.productId,r=e.parents,o=JSON.parse(localStorage.getItem("auth")),i=fe(),a=s((0,t.useState)(),2),u=a[0],l=a[1],c=s((0,t.useState)(!1),2),d=c[0],f=c[1],p=s((0,t.useState)(!1),2),h=p[0],m=p[1],v=s((0,t.useState)(),2),g=v[0],y=v[1],w=s((0,t.useState)(),2),b=w[0],_=w[1],E=s((0,t.useState)(),2),x=E[0],S=E[1],C=s((0,t.useState)({}),2),I=C[0],A=C[1],O=s((0,t.useState)({contactId:o.userId}),2),N=O[0],T=O[1],k=function(e){Su(e).then((function(e){var t=Iu(e.data,"departments");"success"===t.status?S(t.departments):y(t.message)}))};(0,t.useEffect)((function(){gp(n+"/DEPOT-OUT").then((function(e){var t=Iu(e.data,"status");"success"!==t.status&&y(t.message),m(!0)}))}),[n,i]),(0,t.useEffect)((function(){Mu(n).then((function(e){var t=Iu(e.data,"details");if("success"===t.status){l(t.details);var r=He(He({},N),{},{productId:n,locationId:t.details.ownerEntityId,departmentId:t.details.departmentId,room:t.details.room});T(r),f(!0),k(t.details.ownerEntityId)}else y(t.message)}))}),[n]),(0,t.useEffect)((function(){xu().then((function(e){var t=Iu(e.data,"locations");"success"===t.status?_(t.locations):y(t.message)}))}),[y]);var R=function(e,t,n){var r=N;void 0!==n&&null!==n?(void 0===r[n]&&(r[n]={}),r[n][e]=t):r[e]=t,"locationId"===e&&(k(t),r.room=null,r.departmentId=null),T(r)},j=function(){var e={};(["deliverDate","productId","locationId","contactId"].forEach((function(t){void 0!==N[t]&&null!==N[t]&&0!==N[t].length||(e[t]="Verplicht veld")})),0===Object.keys(e).length)?function(e){return Ge().put("".concat(Ye,"/customer/depot/request/depot-out"),e,Ke())}({productId:N.productId,departmentId:N.departmentId,locationId:N.locationId,room:N.room,deliverDate:N.deliverDate,client:N.client,comments:N.comments,contactId:N.contactId}).then((function(e){var t=Iu(e.data,"status");"success"===t.status?i("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):y(t.message)})).catch((function(e){var t=Iu(e);y(t.message)})):A(e)};if(void 0!==g)return(0,Je.jsx)(Bn,{type:"error",message:g});if(!1===d||!1===h)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===u||null===u||0===Object.keys(u).length)return(0,Je.jsx)(Bn,{type:"noData"});var D,P={deliverDate:{type:"date",label:"Gewenste ophaaldatum",options:{min:null,max:"+1"}},locationId:{type:"select",label:"Locatie",options:b},departmentRoom:{type:"fieldset",options:{departmentId:{type:"select",label:"Afdeling",options:x,className:"col-8"},room:{type:"text",label:"Kamer",className:"col-4"}}},client:{type:"text",label:"Naam client"},contactId:{type:"contacts",label:"Contactpersoon"},comments:{type:"textarea",label:"Opmerkingen"}};return"1"===u.enableReservation&&(D=u.reservationReason),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{message:D,title:"Reservering actief",type:"warning"}),(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Aanvraag levering uit depot"}),(0,Je.jsx)(bp,{formFields:P,setValues:R,setErrors:A,formValues:N,formErrors:I}),(0,Je.jsx)(_p,{handleSubmit:j,cancelUri:"/"+r+"/"+n})]}),className:"outline-box--form"})]})}function Oh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(Ah,{parents:n,productId:a,identifier:o})]})}function Nh(e){var n=e.productId,r=e.parents,o=JSON.parse(localStorage.getItem("auth")),i=new Date,a=i.getFullYear()+"-"+(i.getMonth()+1)+"-"+i.getDate(),u=fe(),l=s((0,t.useState)(),2),c=l[0],d=l[1],f=s((0,t.useState)({}),2),p=f[0],h=f[1],m=s((0,t.useState)({contactId:o.userId,repairDate:a}),2),v=m[0],g=m[1],y=function(e,t){var n=v;n[e]=t,g(n)},w=function(){var e=v;e.productId=n,e.repairUserId=v.contactId;var t={};["repairDate","conclusion","repairUserId"].forEach((function(n){void 0===e[n]?t[n]="Verplicht veld":null!==e[n]&&0!==e[n].length||(t[n]="Verplicht veld")})),0===Object.keys(t).length?function(e){return Ge().put("".concat(Ye,"/customer/articles/product/client/repair"),e,Ke())}(e).then((function(e){var t=Iu(e.data,"status");"success"===t.status?u("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):d(t.message)})).catch((function(e){var t=Iu(e);d(t.message)})):h(t)},b={repairDate:{type:"date",label:"Reparatiedatum"},conclusion:{type:"radio",label:"Resultaat reparatie",options:[{label:"Gerepareerd",value:"FIXED"},{label:"Niet te repareren (afgevoerd)",value:"BROKEN"}]},remark:{type:"textarea",label:"Omschrijving"},contactId:{type:"contacts",options:{contactId:"contactId"},label:"Reparateur"}};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"error",message:c}),(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Reparatie registreren"}),(0,Je.jsx)(bp,{formFields:b,setValues:y,setErrors:h,formValues:v,formErrors:p,identifier:"product-add"}),(0,Je.jsx)(_p,{handleSubmit:w,cancelUri:"/"+r+"/"+n,submitLabel:"Verzenden"})]}),className:"outline-box--form"})]})}function Th(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(Nh,{parents:n,productId:a,current:r,identifier:o})]})}function kh(e){var n=e.productId,r=e.parents,o=fe(),i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)({}),2),c=l[0],d=l[1],f=s((0,t.useState)({}),2),p=f[0],h=f[1],m=s((0,t.useState)(!1),2),v=m[0],g=m[1];(0,t.useEffect)((function(){Mu(n).then((function(e){var t=Iu(e.data,"details");if("success"===t.status){var r={productId:n,enableReservation:t.details.enableReservation,reservationReason:t.details.reservationReason};h(r),g(!0)}else u(t.message)}))}),[n]);var y=function(e,t){var n=p;n[e]=t,h(n)},w=function(){var e=p,t=[];e.productId=n,e.enableReservation=p.enableReservation,e.reservationReason=p.reservationReason,p.enableReservation&&(t=["reservationReason"]);var i={};t.forEach((function(t){void 0===e[t]?i[t]="Verplicht veld":null!==e[t]&&0!==e[t].length||(i[t]="Verplicht veld")})),0===Object.keys(i).length?function(e){return Ge().put("".concat(Ye,"/customer/depot/reservation"),e,Ke())}(e).then((function(e){var t=Iu(e.data,"status");"success"===t.status?o("/"+r.replace("actions","details/")+n,{replace:!0,state:{message:t.message,type:t.status}}):u(t.message)})).catch((function(e){var t=Iu(e);u(t.message)})):d(i)};if(!1===v)return(0,Je.jsx)(Bn,{type:"loading"});var b={enableReservation:{type:"checkbox",label:"Reservering actief"},reservationReason:{type:"textarea",label:"Uitleg/ reden reservering"}};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"error",message:a}),(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("h3",{className:"box-header",children:"Reparatie registreren"}),(0,Je.jsx)(bp,{formFields:b,setValues:y,setErrors:d,formValues:p,formErrors:c,identifier:"product-add"}),(0,Je.jsx)(_p,{handleSubmit:w,cancelUri:"/"+r+"/"+n,submitLabel:"Verzenden"})]}),className:"outline-box--form"})]})}function Rh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(kh,{parents:n,productId:a,current:r,identifier:o})]})}function jh(e){var n=e.productId,r=s((0,t.useState)(),2),o=r[0],i=r[1],a=s((0,t.useState)(!1),2),u=a[0],l=a[1],c=s((0,t.useState)(),2),d=c[0],f=c[1];if((0,t.useEffect)((function(){Mu(n).then((function(e){var t=Iu(e.data,"details");"error"===t.status?f(t.message,t.status):(i(t.details),l(!0),localStorage.setItem("product-"+n,JSON.stringify(t.details)))})).catch((function(e){var t=Iu(e);f(t.message)}))}),[n]),void 0!==d)return(0,Je.jsx)(Bn,{type:"error",message:d});if(!1===u)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===o||null===o||0===Object.keys(o).length)return(0,Je.jsx)(Bn,{type:"noData"});var p=[];[{key:"articleName",label:"Artikelnaam",type:"text",gcId:"west"},{key:"serialNumber",label:"Serienummer",type:"text",gcId:"west"},{key:"frameNumber",label:"Framenummer",type:"text",gcId:"west"},{key:"barcodeDisplay",label:"Qr code",type:"text",gcId:"west"},{key:"statusDisplay",label:"Productstatus",type:"text",gcId:"west"},{key:"depotStatus",label:"Status depot",type:"text",gcId:"west"},{key:"startDate",label:"Startdatum depot",type:"date",gcId:"west"},{key:"owner",label:"Locatie",type:"text",gcId:"west"},{key:"departmentRoom",label:"Afdeling/kamernr.",type:"text",gcId:"west"},{key:"productBrand",label:"Merk",type:"text",gcId:"east"},{key:"productType",label:"Type",type:"text",gcId:"east"},{key:"dimensions",label:"Afmetingen",type:"text",gcId:"east"},{key:"registrationYear",label:"Bouwjaar",type:"text",gcId:"east"}].forEach((function(e){void 0!==o.startDate&&null!==o.startDate||"depotStatus"===e.key||"startDate"===e.key?void 0!==o.startDate&&null!==o.startDate&&"owner"!==e.key&&"departmentRoom"!==e.key&&p.push(e):p.push(e)})),void 0!==o.customFields&&o.customFields.length>0&&o.customFields.forEach((function(e){p.push({label:e.label,value:e.value,type:"text",gcId:"east"})})),void 0!==o.currentValue&&null!==o.currentValue&&p.push({key:"currentValue",label:"Dagwaarde",type:"text",gcId:"east"}),p.push({key:"remarks",label:"Opmerkingen",type:"text",gcId:"east"});var h,m="REMOVED"===o.status?"Huplmiddel is afgevoerd":null;return"1"===o.enableReservation&&(h="Reservering actief",m=o.reservationReason),(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:m,title:h}),(0,Je.jsx)(Wp,{columns:p,data:o,identifier:"details"})]})}function Dh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(jh,{productId:a,identifier:o})]})}function Ph(e){var n=e.productId,r=e.current,o=e.setFilterFields,i=e.filterValues,a=e.identifier,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(!0),2),m=h[0],v=h[1],g=s((0,t.useState)(1),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+a))),2),A=I[0],O=I[1],N=s((0,t.useState)(),2),T=N[0],k=N[1];JSON.stringify(i)!==T&&(k(JSON.stringify(i)),p(!1),O(i),Tu(1,r,w)),y!==Nu(r)&&w(Nu(r));var R={repairId:{type:"text",label:"Repartienummer"},conclusion:{type:"select",label:"Reparatiestatus",options:[{value:"PROCESSING",label:"In behandeling"},{value:"FIXED",label:"Afgerond"}]}};(0,t.useEffect)((function(){var e={filters:He({productId:n,limitOffset:10*y-9,limitRows:10},A)};ju(e).then((function(e){var t=Iu(e.data,"repairs");"error"===t.status?C(t.message,t.status):(void 0!==t.totalCount&&(E(t.totalCount),m!==r&&(o(R),v(r))),c(t.repairs),p(!0))})).catch((function(e){var t=Iu(e);C(t.message)}))}),[n,A,o,y,10]);var j="REMOVED"===Bu(n)?"Huplmiddel is afgevoerd":null;return void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:j}),(0,Je.jsx)(Bn,{type:"noData"})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:j}),(0,Je.jsx)(Lp,{columns:[{key:"repairNumber",label:"Reparatienummer",type:"text"},{key:"statusLabel",label:"Status",type:"text"},{key:"createDate",label:"Aanmaakdatum",type:"date"},{key:"repairDate",label:"Reparatiedatum",type:"date"},{key:"repairer",label:"Reparateur",type:"text"},{key:"repairNumber",label:"Reparatiebon",type:"download",display:"icon",fileName:"documentName",documentType:"repair"}],data:l,identifier:a}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,totalCount:_,pageSize:10,setCurrentPage:function(e){Tu(e,r,w)}}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function Mh(e){var n,r=e.parents,o=e.current,i=(r+o).replaceAll("/","-"),a=-1===r.indexOf("articles/depot")?"location":"depot",u=he().productId,l=s((0,t.useState)([]),2),c=l[0],d=l[1],f=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+i)))&&void 0!==n?n:{}),2),p=f[0],h=f[1],m=s((0,t.useState)(!1),2),v=m[0],g=m[1],y=s((0,t.useState)(null),2),w=y[0],b=y[1];null===w&&ku("product",u,b);return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:r,current:o}),(0,Je.jsx)(Op,{title:w,tabGroup:"product-details-"+a,variables:{productId:u},parents:r,current:o,filterFields:c,setFilterValues:function(e){h(e),g(!1===v)},identifier:i}),(0,Je.jsx)(Ph,{productId:u,current:o,filterValues:p,setFilterFields:d,identifier:i})]})}function Lh(e){var n=e.productId,r=e.current,o=e.setFilterFields,i=e.filterValues,a=e.identifier,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(!0),2),m=h[0],v=h[1],g=s((0,t.useState)(1),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+a))),2),A=I[0],O=I[1],N=s((0,t.useState)(),2),T=N[0],k=N[1];JSON.stringify(i)!==T&&(k(JSON.stringify(i)),p(!1),O(i),Tu(1,r,w)),y!==Nu(r)&&w(Nu(r));var R={conclusion:{type:"select",label:"Status",options:[{value:"PENDING",label:"Te keuren"},{value:"COMPLETED",label:"Goedgekeurd"},{value:"REJECTED",label:"Afgekeurd"}]}};(0,t.useEffect)((function(){var e={productId:n,context:"product",filters:He({limitOffset:10*y-9,limitRows:10},A)};Du(e).then((function(e){var t=Iu(e.data,"inspections");"error"===t.status?C(t.message,t.status):(void 0!==t.totalCount&&(E(t.totalCount),m!==r&&(o(R),v(r))),c(t.inspections),p(!0))})).catch((function(e){var t=Iu(e);C(t.message)}))}),[n,A,o,y,10]);var j="REMOVED"===Bu(n)?"Huplmiddel is afgevoerd":null;return void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:j}),(0,Je.jsx)(Bn,{type:"noData"})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:j}),(0,Je.jsx)(Lp,{columns:[{key:"statusLabel",label:"Status",type:"text"},{key:"plannedDate",label:"Te keuren voor",type:"date"},{key:"inspectDate",label:"Keuringsdatum",type:"date"},{key:"inspectionNumber",label:"Keuringsrapport",type:"download",display:"icon",fileName:"documentName",documentType:"inspection"}],data:l,identifier:a}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,totalCount:_,pageSize:10,setCurrentPage:function(e){Tu(e,r,w)}}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function Fh(e){var n,r=e.parents,o=e.current,i=(r+o).replaceAll("/","-"),a=-1===r.indexOf("articles/depot")?"location":"depot",u=he().productId,l=s((0,t.useState)([]),2),c=l[0],d=l[1],f=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+i)))&&void 0!==n?n:{}),2),p=f[0],h=f[1],m=s((0,t.useState)(!1),2),v=m[0],g=m[1],y=s((0,t.useState)(null),2),w=y[0],b=y[1];null===w&&ku("product",u,b);return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:r,current:o}),(0,Je.jsx)(Op,{title:w,tabGroup:"product-details-"+a,variables:{productId:u},parents:r,current:o,filterFields:c,setFilterValues:function(e){h(e),g(!1===v)},identifier:i}),(0,Je.jsx)(Lh,{productId:u,current:o,filterValues:p,setFilterFields:d,identifier:i})]})}function Bh(e){var n=e.productId,r=e.current,o=e.setFilterFields,i=e.filterValues,a=e.identifier,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(!0),2),m=h[0],v=h[1],g=s((0,t.useState)(1),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+a))),2),A=I[0],O=I[1],N=s((0,t.useState)(),2),T=N[0],k=N[1];JSON.stringify(i)!==T&&(k(JSON.stringify(i)),p(!1),O(i),Tu(1,r,w)),y!==Nu(r)&&w(Nu(r));var R={conclusion:{type:"select",label:"Status",options:[{value:"PROCESSING",label:"In behandeling"},{value:"RELEASED",label:"Afgerond"},{value:"REPAIR",label:"Naar reparatie"}]}};(0,t.useEffect)((function(){var e,t={filters:He({productId:n,limitOffset:10*y-9,limitRows:10},A)};(e=t,Ge().post("".concat(Ye,"/customer/articles/product/cleanings/overview"),e,Ke())).then((function(e){var t=Iu(e.data,"cleanings");"error"===t.status?C(t.message,t.status):(void 0!==t.totalCount&&(E(t.totalCount),m!==r&&(o(R),v(r))),c(t.cleanings),p(!0))})).catch((function(e){var t=Iu(e);C(t.message)}))}),[n,y,10,A,o]);var j="REMOVED"===Bu(n)?"Huplmiddel is afgevoerd":null;return void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:j}),(0,Je.jsx)(Bn,{type:"noData"})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:j}),(0,Je.jsx)(Lp,{columns:[{key:"statusLabel",label:"Status",type:"text"},{key:"createDate",label:"Aanmaakdatum",type:"date"},{key:"cleanDate",label:"Datum reiniging",type:"date"}],data:l,identifier:a}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,totalCount:_,pageSize:10,setCurrentPage:function(e){Tu(e,r,w)}}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function Vh(e){var n,r=e.parents,o=e.current,i=(r+o).replaceAll("/","-"),a=-1===r.indexOf("articles/depot")?"location":"depot",u=he().productId,l=s((0,t.useState)([]),2),c=l[0],d=l[1],f=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+i)))&&void 0!==n?n:{}),2),p=f[0],h=f[1],m=s((0,t.useState)(!1),2),v=m[0],g=m[1],y=s((0,t.useState)(null),2),w=y[0],b=y[1];null===w&&ku("product",u,b);return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:r,current:o}),(0,Je.jsx)(Op,{title:w,tabGroup:"product-details-"+a,variables:{productId:u},parents:r,current:o,filterFields:c,setFilterValues:function(e){h(e),g(!1===v)},identifier:i}),(0,Je.jsx)(Bh,{productId:u,current:o,filterValues:p,setFilterFields:d,identifier:i})]})}function Uh(e){var n=e.productId,r=JSON.parse(localStorage.getItem("auth")),o=s((0,t.useState)([]),2),i=o[0],a=o[1],l=s((0,t.useState)(!1),2),c=l[0],d=l[1],f=s((0,t.useState)(),2),p=f[0],h=f[1],m=(0,t.useCallback)(tt(Qe().mark((function e(){return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Cu(n).then((function(e){var t=Iu(e.data,"documents");"error"===t.status?h(t.message,t.status):(0===t.documents.length&&d(!0),t.documents.forEach((function(e){if("IMAGE"===e.type){var t=new XMLHttpRequest;t.responseType="blob",t.onreadystatechange=function(){t.readyState===XMLHttpRequest.DONE&&200===t.status&&(e.src=URL.createObjectURL(t.response),a((function(t){return[].concat(u(t),[e])})),d(!0))},t.open("GET",qe+"?guid="+e.guid,!0),t.setRequestHeader("X-Auth-Token",r.token),t.send()}else a((function(t){return[].concat(u(t),[e])})),d(!0)})))})).catch((function(e){var t=Iu(e,"status");h(t.message,t.status)}));case 2:case"end":return e.stop()}}),e)}))),[n]);(0,t.useEffect)((function(){!1===c&&m()}),[m,a]);var v="REMOVED"===Bu(n)?"Huplmiddel is afgevoerd":null;return void 0!==p?(0,Je.jsx)(Bn,{type:"error",message:p}):!1===c||0==i.length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:v}),(0,Je.jsx)(Bn,{type:"noData"})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Bn,{type:"warning",message:v}),(0,Je.jsx)(Vn,{type:"tiles-secondary",content:(0,Je.jsx)("div",{className:"tiles__wrapper",children:i.map((function(e){var t;return(0,Je.jsx)("div",{className:"tiles__photo",children:(0,Je.jsxs)("div",{className:"tile tile__photo",children:["IMAGE"===e.type&&(0,Je.jsx)("img",{src:e.src,alt:e.fileName}),"IMAGE"!==e.type&&(0,Je.jsxs)("div",{className:"document-download",children:[(0,Je.jsx)("h3",{children:e.typeDisplay}),(0,Je.jsx)("div",{children:e.description}),(0,Je.jsx)(Pp,{documentType:"PRODUCT-DOCUMENT",display:null!==(t="tile-"+e.icon)&&void 0!==t?t:"file",documentId:e.documentId,fileName:e.fileName,mimeType:e.mimeType,label:e.fileName})]})]})},"product-photo-"+e.guid)}))})})]})}function Hh(e){var n=e.parents,r=e.current,o=-1===n.indexOf("articles/depot")?"location":"depot",i=he().productId,a=s((0,t.useState)(null),2),u=a[0],l=a[1];return null===u&&ku("product",i,l),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:u,parents:n,current:r,tabGroup:"product-details-"+o,variables:{productId:i}}),(0,Je.jsx)(Uh,{productId:i})]})}function zh(e){var n=e.productId,r=e.current,o=e.identifier,i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)(!1),2),c=l[0],d=l[1],f=s((0,t.useState)(1),2),p=f[0],h=f[1],m=s((0,t.useState)(0),2),v=m[0],g=m[1],y=s((0,t.useState)(),2),w=y[0],b=y[1];p!==Nu(r)&&h(Nu(r));(0,t.useEffect)((function(){var e;(e={productId:n,filters:{limitOffset:10*p-9,limitRows:10}},Ge().post("".concat(Ye,"/customer/articles/product/log/overview"),e,Ke())).then((function(e){var t=Iu(e.data,"log");"error"===t.status?b(t.message,t.status):(void 0!==t.totalCount&&g(t.totalCount),u(t.log),d(!0))})).catch((function(e){var t=Iu(e);b(t.message)}))}),[n,p,10]);var _="REMOVED"===Bu(n)?"Huplmiddel is afgevoerd":null;return void 0!==w?(0,Je.jsx)(Bn,{type:"error",message:w}):!1===c?(0,Je.jsx)(Bn,{type:"loading"}):void 0===a||null===a||0===Object.keys(a).length?(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:_}),(0,Je.jsx)(Bn,{type:"noData"})]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"warning",message:_}),(0,Je.jsx)(Lp,{columns:[{key:"createDate",label:"Datum",type:"date"},{key:"message",label:"Actie",type:"text"},{key:"specification",label:"Details",type:"text"},{key:"name",label:"Door",type:"text"}],data:a,identifier:o}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:p,totalCount:v,pageSize:10,setCurrentPage:function(e){Tu(e,r,h)}}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function Gh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=-1===n.indexOf("articles/depot")?"location":"depot",a=he().productId,u=s((0,t.useState)(null),2),l=u[0],c=u[1];return null===l&&ku("product",a,c),(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:l,parents:n,current:r,tabGroup:"product-details-"+i,variables:{productId:a},identifier:o}),(0,Je.jsx)(zh,{productId:a,identifier:o})]})}function Wh(e){var n=e.current,r=e.setFilterFields,o=e.filterValues,i=e.identifier,a=10,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(),2),m=h[0],v=h[1],g=s((0,t.useState)(Nu(n)),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+i))),2),A=I[0],O=I[1],N=s((0,t.useState)("{}"),2),T=N[0],k=N[1];JSON.stringify(o)!==T&&(k(JSON.stringify(o)),p(!1),O(o),Tu(1,n,w)),y!==Nu(n)&&w(Nu(n));var R=[{key:"name",type:"link",path:"details/:depotCaseId",hideView:"large"},{key:"name",label:"Opdracht",type:"text",hideView:"small"},{key:"formType",label:"Type opdracht",type:"text"},{key:"createDate",label:"Aanmaakdatum",type:"date"}];"depot-archive"===n&&R.push({key:"handleDate",label:"Verwerkingsdatum",type:"date"}),R.push({key:"depotCaseId",type:"link",path:"details/:depotCaseId",hideView:"small"});var j={categoryId:{type:"categories",label:"Artikelcategorie",options:{output:"depot",category:"categoryId",article:"articleId"}},formType:{type:"select",label:"Type opdracht",options:[{label:"In depot (ophalen)",value:"TRANSPORT-IN"},{label:"Leveren uit depot",value:"TRANSPORT-OUT"},{label:"Direct in depot",value:"DIRECT-IN"},{label:"Direct uit depot",value:"DIRECT-OUT"},{label:"Locatiewijziging",value:"TRANSPORT-TRANSFER"}]}};return(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={filters:He({tabType:n,limitOffset:a*y-9,limitRows:a},A)},e.next=3,Pu(t).then((function(e){var t,o=Iu(e.data,"cases");"success"===o.status?(E(null!==(t=o.totalCount)&&void 0!==t?t:0),c(o.cases),p(!0),m!==n&&o.totalCount>0&&(r(j),v(n))):C(o.message)})).catch((function(e){var t=Iu(e);C(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,y,A,T,a]),void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:R,data:l,identifier:i}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,setCurrentPage:function(e){Tu(e,n,w)},totalCount:_,pageSize:a}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function Xh(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"product-overview",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(Wh,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function Yh(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"product-overview",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(Wh,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function qh(e){var n,r=e.depotCaseId,o=e.setTitle,i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)(!1),2),c=l[0],d=l[1],f=s((0,t.useState)(),2),p=f[0],h=f[1];if((0,t.useEffect)((function(){(function(e){return Ge().get("".concat(Ye,"/customer/depot/details/")+e,Ke())})(r).then((function(e){var t=Iu(e.data,"details");"error"===t.status?h(t.message,t.status):(u(t.details),o(t.details.name),d(!0),localStorage.setItem("depotcase-"+r,JSON.stringify(t.details)))})).catch((function(e){var t=Iu(e);h(t.message)}))}),[r,o]),void 0!==p)return(0,Je.jsx)(Bn,{type:"error",message:p});if(!1===c)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===a||null===a||0===Object.keys(a).length)return(0,Je.jsx)(Bn,{type:"noData"});var m=[];[{key:"formType",label:"Type opdracht",type:"text",gcId:"west"},{key:"statusLabel",label:"Status",type:"text",gcId:"west"},{key:"createDate",label:"Aanmaakdatum",type:"date",gcId:"west"},{key:"handleDate",label:"Verwerkingsdatum",type:"date",gcId:"west"},{key:"pickupAddress",label:"Ophaaladres",type:"text",gcId:"west"},{key:"dropoffAddress",label:"Leveradres",type:"text",gcId:"west"},{key:"lastAction",label:"Laaste actie",type:"text",gcId:"east"},{key:"timeSpent",label:"Tijd op locatie",type:"text",gcId:"east"},{key:"priorityCall",label:"Spoedopdracht",type:"text",gcId:"east"},{key:"invoiceable",label:"Factureerbaar",type:"text",gcId:"east"},{key:"remarks",label:"Opmerkingen",type:"text",gcId:"east"}].forEach((function(e){null===a.pickupAddress&&"pickupAddress"===e.key||null===a.dropoffAddress&&"dropoffAddress"===e.key||"COMPLETED"!==a.depotStatus&&"handleDate"===e.key||m.push(e)}));return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Wp,{columns:m,data:a}),(0,Je.jsx)("div",{className:"spacer--line"}),(0,Je.jsx)(Vn,{content:"Hulpmiddelen",type:"title",className:"page-title"}),(0,Je.jsx)(Lp,{columns:[{key:"name",label:"Naam hulpmiddel",type:"text"},{key:"depotStatus",label:"Huidige depotstatus",type:"text"},{key:"productStatus",label:"Huidige productstatus",type:"text"}],data:null!==(n=a.products)&&void 0!==n?n:{}})]})}function Kh(e){var n=e.parents,r=e.current,o=(n+r).replaceAll("/","-"),i=he().depotCaseId,a=s((0,t.useState)(null),2),u=a[0],l=a[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:u,parents:n,current:r,variables:{depotCaseId:i},identifier:o}),(0,Je.jsx)(qh,{depotCaseId:i,identifier:o,setTitle:l})]})}var Zh=function(e){return Ge().post("".concat(Ye,"/customer/requests/overview"),e,Ke())};function Jh(e){var n=e.current,r=e.setFilterFields,o=e.filterValues,i=e.identifier,a=10,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=d[0],p=d[1],h=s((0,t.useState)(!0),2),m=h[0],v=h[1],g=s((0,t.useState)(Nu(n)),2),y=g[0],w=g[1],b=s((0,t.useState)(0),2),_=b[0],E=b[1],x=s((0,t.useState)(),2),S=x[0],C=x[1],I=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+i))),2),A=I[0],O=I[1],N=s((0,t.useState)("{}"),2),T=N[0],k=N[1];JSON.stringify(o)!==T&&(k(JSON.stringify(o)),p(!1),O(o),Tu(1,n,w)),y!==Nu(n)&&w(Nu(n));var R=function(e){r({location:{type:"location",options:{locationId:"locationId"},label:{locationId:"Locatie"}},requestType:{type:"select",label:"Type verzoek",options:[{label:"Aanvraag depotopslag",value:"DEPOT-IN"},{label:"Leveren uit depot",value:"DEPOT-OUT"},{label:"Aanvraag verhuur",value:"RENTAL-REQUEST"},{label:"Verhuur be\xebindigen",value:"RENTAL-STOP"},{label:"Reparatie depotartikel",value:"REPAIR-DEPOT"},{label:"Reparatie verhuurartikel",value:"REPAIR-RENTAL"}]},customerRequestId:{type:"text",label:"Verzoek ID"},contact:{type:"select",label:"Contactpersoon",options:e}})};return(0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={filters:He({tabType:n,limitOffset:a*y-9,limitRows:a},A)},e.next=3,yp().then((function(e){var t=Iu(e.data,"contacts");"success"===t.status&&m!==n&&(R(t.contacts),v(n))}));case 3:return e.next=5,Zh(t).then((function(e){var t=Iu(e.data,"requests");"success"===t.status?(void 0!==t.totalCount&&(E(t.totalCount),m!==n&&v(n)),c(t.requests),p(!0)):C(t.message)})).catch((function(e){var t=Iu(e);C(t.message)}));case 5:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,y,A,T,a]),void 0!==S?(0,Je.jsx)(Bn,{type:"error",message:S}):!1===f?(0,Je.jsx)(Bn,{type:"loading"}):void 0===l||null===l||0===Object.keys(l).length?(0,Je.jsx)(Bn,{type:"noData"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Lp,{columns:[{key:"customerRequestId",label:"Id",type:"text"},{key:"type",type:"link",path:"details/:customerRequestId",hideView:"large"},{key:"type",label:"Type verzoek",type:"text",hideView:"small"},{key:"createDate",label:"Datum",type:"date"},{key:"requestLocationFrom",label:"Locatie van",type:"text"},{key:"requestLocationTo",label:"Locatie naar",type:"text"},{key:"contact",label:"Contactpersoon",type:"text"},{key:"customerRequestId",type:"link",path:"details/:customerRequestId",hideView:"small"}],data:l,identifier:i}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:y,setCurrentPage:function(e){Tu(e,n,w)},totalCount:_,pageSize:a}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function $h(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"customer-requests",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(Jh,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function Qh(e){var n=e.customerRequestId,r=e.setTitle,o=s((0,t.useState)(),2),i=o[0],a=o[1],u=s((0,t.useState)(!1),2),l=u[0],c=u[1],d=s((0,t.useState)(),2),f=d[0],p=d[1];if((0,t.useEffect)((function(){(function(e){return Ge().get("".concat(Ye,"/customer/requests/details/")+e,Ke())})(n).then((function(e){var t=Iu(e.data,"details");"error"===t.status?p(t.message,t.status):(a(t.details),c(!0),r(t.details.title))})).catch((function(e){var t=Iu(e);p(t.message)}))}),[n,r]),void 0!==f)return(0,Je.jsx)(Bn,{type:"error",message:f});if(!1===l)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===i||null===i||0===Object.keys(i).length)return(0,Je.jsx)(Bn,{type:"noData"});var h=[{key:"status",label:"Status",type:"text",gcId:"west"},{key:"type",label:"Type aanvraag",type:"text",gcId:"west"},{key:"customerRequestId",label:"Aanvraag id",type:"text",gcId:"west"},{key:"createDate",label:"Aanmaakdatum",type:"text",gcId:"west"},{key:"user",label:"Ingevoerd door",type:"text",gcId:"west"},{key:"contact",label:"Contactpersoon",type:"text",gcId:"west"}],m=i;return void 0!==m.customData&&Object.keys(m.customData).forEach((function(e){h.push({key:e,label:m.customData[e].title,type:"html",gcId:"east"}),m[e]=m.customData[e].value})),(0,Je.jsx)(Wp,{columns:h,data:i,identifier:"details"})}function em(e){var n=e.parents,r=e.current,o=he().customerRequestId,i=s((0,t.useState)(null),2),a=i[0],u=i[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:a,parents:n,current:r}),(0,Je.jsx)(Qh,{customerRequestId:o,setTitle:u})]})}function tm(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,tabGroup:"management",parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(eh,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}function nm(){return(0,Je.jsx)(Vn,{type:"tiles-secondary",content:(0,Je.jsxs)("div",{className:"tiles__wrapper",children:[!0===Am("/management/overviews/rental")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/management/overviews/rental",className:"tile tile__scannen active",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Verhuur"})]})}),!0===Am("/management/overviews/repairs")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/management/overviews/repairs",className:"tile tile__inspections",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Reparaties"})]})}),!0===Am("/management/overviews/depot")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/management/overviews/depot",className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Depot opdrachten"})]})}),!0===Am("/management/overviews/productslocation")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/management/overviews/productslocation",className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Hulpmiddelen op locatie"})]})}),!0===Am("/management/overviews/productsdepot")&&(0,Je.jsx)("div",{className:"tiles__column",children:(0,Je.jsxs)(Me,{to:"/management/overviews/productsdepot",className:"tile tile__registreren",children:[(0,Je.jsx)("span",{className:"icon"}),(0,Je.jsx)("span",{className:"tile__title",children:"Hulpmiddelen in depot"})]})})]})})}function rm(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:t,tabGroup:"management",parents:n,current:r}),(0,Je.jsx)(nm,{current:r})]})}function om(e){var r,o,i,a=e.documentType,u=e.filters,l=e.display,c=void 0===l?"button-download":l,d=e.fileName,f=e.mimeType,p=void 0===f?"vnd.-msexcel":f,h=e.label,m=e.setError,v=s((0,t.useState)(!1),2),g=v[0],y=v[1];if(-1!==c.indexOf("tile")){var w=c.split("-");r=w[0],o=w[1],i=n(9890)("./document-icon-"+o+".jpg")}else r=-1!==c.indexOf("icon")?"icon":"button",o=-1!==c.indexOf("pdf")?"pdf":"download";var b=(0,t.useRef)(null);void 0!==d&&null!==d||(d="download.pdf");var _=function(e){return new Promise((function(t){return setTimeout(t,e)}))},E=function(){var e=tt(Qe().mark((function e(){var t,n=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:2500,e.next=3,_(t);case 3:y(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=tt(Qe().mark((function e(){var t,n;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,y(!0),t={documentType:a,filters:u},e.next=5,Qp(t).then((function(e){if(e.data.size<100&&void 0!==m)m("Er is iets foutgegaan met het ophalen van het bestand");else if(e.data.size<100)E(),alert("Er is iets foutgegaan met het ophalen van het bestand");else{var t=e.data,n=URL.createObjectURL(new Blob([t],{type:p})),r=b.current;r.href=n,r.setAttribute("download",d),r.click(),URL.revokeObjectURL(n)}E()}));case 5:e.next=12;break;case 7:e.prev=7,e.t0=e.catch(0),void 0!==m&&m(null!==(n=e.t0.message)&&void 0!==n?n:"Er is iets misgegaan met het ophalen van het bestand"),y(!1),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}();return(0,Je.jsxs)(Je.Fragment,{children:[!0===g&&(0,Je.jsx)(Bn,{type:"downloading"}),(0,Je.jsx)("a",{href:window.location.href,className:"hidden",ref:b,children:"\xa0"}),"icon"===r&&(0,Je.jsx)("button",{type:"button",onClick:function(){x()},className:"button button--transparant button--"+o}),"button"===r&&(0,Je.jsx)("button",{title:h,type:"button",onClick:function(){x()},className:"button button--outline button--white button--"+o+" justify-content-center",children:h}),"tile"===r&&(0,Je.jsxs)("button",{title:h,type:"button",onClick:function(){x()},className:"button button--outline button--tile",children:[(0,Je.jsx)("img",{className:"file-icon",src:i,alt:""}),(0,Je.jsx)("div",{className:"file-name",children:h})]})]})}function im(e){var n,r=e.current,o=e.identifier,i=e.filterValues,a=e.setFilterFields,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=(d[0],d[1]),p=s((0,t.useState)(!0),2),h=p[0],m=p[1],v=s((0,t.useState)(Nu(r)),2),g=v[0],y=v[1],w=s((0,t.useState)(0),2),b=w[0],_=w[1],E=s((0,t.useState)(),2),x=E[0],S=E[1],C=s((0,t.useState)(),2),I=C[0],A=C[1],O=s((0,t.useState)({}),2),N=O[0],T=O[1],k=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+o)))&&void 0!==n?n:{}),2),R=k[0],j=k[1],D=s((0,t.useState)("{}"),2),P=D[0],M=D[1],L=s((0,t.useState)(!1),2),F=L[0],B=L[1],V=s((0,t.useState)(),2),U=V[0],H=V[1],z={fromDate:{type:"date",label:"Van datum",options:{min:"-125",max:null},value:N.deliverDate},toDate:{type:"date",label:"Tot datum",options:{min:"-125",max:null},value:N.deliverDate},type:{type:"select",label:"Type overzicht",options:{DELIVER:"Verhuur leveringen",RETURN:"Verhuur innames"},value:N.type},location:{type:"location",label:{locationId:"Verhuurlocatie",departmentId:"Afdeling"}}},G=function(e,t){!0===F&&B(!1),I&&A(Gu(I,e,null)),T(zu(N,e,t,null)),j(zu(N,e,t,null)),localStorage.setItem("filters"+o,JSON.stringify(zu(N,e,t,null)))},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=I;r=void 0!==t&&null!==t?zu(I,e,t,n):Gu(I,e,n),A(r)};g!==Nu(r)&&y(Nu(r));var X=function(e){_(),c(),B(!0);var t,n={tabType:r,filters:He({limitOffset:10*e-9,limitRows:10},R)};(t=n,Ge().post("".concat(Ye,"/customer/management/overviews/rental"),t,Ke())).then((function(e){var t=Iu(e.data,"cases");"success"===t.status?(void 0!==t.documentName&&H(t.documentName),void 0!==t.totalCount&&(_(t.totalCount),h!==r&&(m(r),function(){var e={fromDate:{type:"date",label:"Van datum",options:{min:"-125",max:null}},toDate:{type:"date",label:"Tot datum",options:{min:"-125",max:null}},type:{type:"select",label:"Type overzicht",options:{DELIVER:"Verhuur leveringen",RETURN:"Verhuur innames"}},location:{type:"location",label:{locationId:"Verhuurlocatie",departmentId:"Afdeling"}}};a(e)}())),c(t.cases),f(!0)):S(t.message)})).catch((function(e){var t=Iu(e);S(t.message)}))};if(JSON.stringify(i)!==P&&(X(1),M(JSON.stringify(i)),f(!1),j(i),Tu(1,r,y)),void 0!==x)return(0,Je.jsx)(Bn,{type:"error",message:x});var Y=function(){Tu(1,r,y),B(!0);var e=Vu(z,N,!0);if("success"!==e.status||!N.formDate&&!N.toDate&&!N.type)return A(e.errors),void B(!1);X(1)};return(0,Je.jsxs)(Je.Fragment,{children:[0==F&&(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)("div",{className:"text-component",children:[(0,Je.jsx)(bp,{formFields:z,setValues:G,setErrors:W,formValues:N,formErrors:I,isSubmitted:F}),(0,Je.jsx)(_p,{handleSubmit:Y,submitLabel:"Zoeken"})]})}),"NULL"!==l&&void 0!==l&&(0,Je.jsxs)(Je.Fragment,{children:[Object.keys(l).length>0&&(0,Je.jsx)(Vn,{type:"page-component",className:"floating-button",content:(0,Je.jsx)(om,{documentType:"rental",filters:R,display:"button-download",fileName:U,mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",label:"Download excel"})}),(0,Je.jsx)(Lp,{columns:[{key:"displayName",type:"link",path:"",hideView:"large"},{key:"rentalCaseId",label:"Dossiernr.",type:"text"},{key:"displayName",label:"Artikelnaam",type:"text",hideView:"small"},{key:"startDate",label:"Startdatum",type:"date"},{key:"endDate",label:"Einddatum",type:"date"},{key:"departmentRoom",label:"Afdeling/ kamernr.",type:"text"},{key:"endUser",label:"Eindgebruiker",type:"text"},{key:"companyName",label:"Locatie",type:"text"}],data:l,identifier:"customers"}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{className:"pagination-bar",currentPage:g,totalCount:b,pageSize:10,setCurrentPage:function(e){Tu(e,r,y),X(e)}}),(0,Je.jsx)("div",{className:"spacer"})]})]})}function am(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)(!1),2),l=u[0],c=u[1],d=s((0,t.useState)([]),2),f=d[0],p=d[1],h=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,parents:o,current:i,identifier:a,filterFields:f,setFilterValues:function(e){v(e),c(!1===l)}}),(0,Je.jsx)(im,{current:i,identifier:a,filterValues:m,setFilterFields:p})]})}function sm(e){var n,r=e.current,o=e.identifier,i=e.filterValues,a=e.setFilterFields,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=(d[0],d[1]),p=s((0,t.useState)(!0),2),h=p[0],m=p[1],v=s((0,t.useState)(Nu(r)),2),g=v[0],y=v[1],w=s((0,t.useState)(0),2),b=w[0],_=w[1],E=s((0,t.useState)(),2),x=E[0],S=E[1],C=s((0,t.useState)(),2),I=C[0],A=C[1],O=s((0,t.useState)({}),2),N=O[0],T=O[1],k=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+o)))&&void 0!==n?n:{}),2),R=k[0],j=k[1],D=s((0,t.useState)("{}"),2),P=D[0],M=D[1],L=s((0,t.useState)(!1),2),F=L[0],B=L[1],V=s((0,t.useState)(),2),U=V[0],H=V[1],z={fromDate:{type:"date",label:"Van datum",options:{min:"-125",max:null},value:N.deliverDate},toDate:{type:"date",label:"Tot datum",options:{min:"-125",max:null},value:N.deliverDate}},G=function(e,t){!0===F&&B(!1),I&&A(Gu(I,e,null)),T(zu(N,e,t,null)),j(zu(N,e,t,null)),localStorage.setItem("filters"+o,JSON.stringify(zu(N,e,t,null)))},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=I;r=void 0!==t&&null!==t?zu(I,e,t,n):Gu(I,e,n),A(r)};g!==Nu(r)&&y(Nu(r));var X=function(e){_(),c(),B(!0);var t,n={tabType:r,filters:He({limitOffset:10*e-9,limitRows:10},R)};(t=n,Ge().post("".concat(Ye,"/customer/management/overviews/repairs"),t,Ke())).then((function(e){var t=Iu(e.data,"repairs");"success"===t.status?(void 0!==t.documentName&&H(t.documentName),void 0!==t.totalCount&&(_(t.totalCount),h!==r&&(m(r),function(){var e={fromDate:{type:"date",label:"Van datum",options:{min:"-125",max:null}},toDate:{type:"date",label:"Tot datum",options:{min:"-125",max:null}}};a(e)}())),c(t.repairs),f(!0)):S(t.message)})).catch((function(e){var t=Iu(e);S(t.message)}))};if(JSON.stringify(i)!==P&&(X(1),M(JSON.stringify(i)),f(!1),j(i),Tu(1,r,y)),void 0!==x)return(0,Je.jsx)(Bn,{type:"error",message:x});var Y=function(){Tu(1,r,y),B(!0);var e=Vu(z,N,!0);if("success"!==e.status||!N.formDate&&!N.toDate&&!N.type)return A(e.errors),void B(!1);X(1)};return(0,Je.jsxs)(Je.Fragment,{children:[0==F&&(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)("div",{className:"text-component",children:[(0,Je.jsx)(bp,{formFields:z,setValues:G,setErrors:W,formValues:N,formErrors:I,isSubmitted:F}),(0,Je.jsx)(_p,{handleSubmit:Y,submitLabel:"Zoeken"})]})}),"NULL"!==l&&void 0!==l&&(0,Je.jsxs)(Je.Fragment,{children:[Object.keys(l).length>0&&(0,Je.jsx)(Vn,{type:"page-component",className:"floating-button",content:(0,Je.jsx)("div",{children:(0,Je.jsx)(om,{documentType:"repairs",filters:R,display:"button-download",fileName:U,mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",label:"Download excel"})})}),(0,Je.jsx)(Lp,{columns:[{key:"repairNumber",label:"Dossiernr.",type:"text"},{key:"serialNumber",label:"Serienummer",type:"text"},{key:"location",label:"Locatie",type:"text"},{key:"customerReference",label:"Klant referentie",type:"text"},{key:"repairDate",label:"Reparatiedatum",type:"date"},{key:"repairNumber",label:"Reparatiebon",type:"download",display:"icon",fileName:"documentName",documentType:"repair"}],data:l,identifier:"customers"}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{className:"pagination-bar",currentPage:g,totalCount:b,pageSize:10,setCurrentPage:function(e){Tu(e,r,y),X(e)}}),(0,Je.jsx)("div",{className:"spacer"})]})]})}function um(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)(!1),2),l=u[0],c=u[1],d=s((0,t.useState)([]),2),f=d[0],p=d[1],h=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,parents:o,current:i,identifier:a,filterFields:f,setFilterValues:function(e){v(e),c(!1===l)}}),(0,Je.jsx)(sm,{current:i,identifier:a,filterValues:m,setFilterFields:p})]})}function lm(e){var n,r=e.current,o=e.identifier,i=e.filterValues,a=e.setFilterFields,u=s((0,t.useState)(),2),l=u[0],c=u[1],d=s((0,t.useState)(!1),2),f=(d[0],d[1]),p=s((0,t.useState)(!0),2),h=p[0],m=p[1],v=s((0,t.useState)(Nu(r)),2),g=v[0],y=v[1],w=s((0,t.useState)(0),2),b=w[0],_=w[1],E=s((0,t.useState)(),2),x=E[0],S=E[1],C=s((0,t.useState)(),2),I=C[0],A=C[1],O=s((0,t.useState)({}),2),N=O[0],T=O[1],k=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+o)))&&void 0!==n?n:{}),2),R=k[0],j=k[1],D=s((0,t.useState)("{}"),2),P=D[0],M=D[1],L=s((0,t.useState)(!1),2),F=L[0],B=L[1],V=s((0,t.useState)(),2),U=V[0],H=V[1],z={fromDate:{type:"date",label:"Van datum",options:{min:"-125",max:null},value:N.deliverDate},toDate:{type:"date",label:"Tot datum",options:{min:"-125",max:null},value:N.deliverDate}},G=function(e,t){!0===F&&B(!1),I&&A(Gu(I,e,null)),T(zu(N,e,t,null)),j(zu(N,e,t,null)),localStorage.setItem("filters"+o,JSON.stringify(zu(N,e,t,null)))},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=I;r=void 0!==t&&null!==t?zu(I,e,t,n):Gu(I,e,n),A(r)};g!==Nu(r)&&y(Nu(r));var X=function(e){_(),c(),B(!0);var t,n={tabType:r,filters:He({limitOffset:10*e-9,limitRows:10},R)};(t=n,Ge().post("".concat(Ye,"/customer/management/overviews/depot"),t,Ke())).then((function(e){var t=Iu(e.data,"cases");"success"===t.status?(void 0!==t.documentName&&H(t.documentName),void 0!==t.totalCount&&(_(t.totalCount),h!==r&&(m(r),function(){var e={fromDate:{type:"date",label:"Van datum",options:{min:"-125",max:null}},toDate:{type:"date",label:"Tot datum",options:{min:"-125",max:null}}};a(e)}())),c(t.cases),f(!0)):S(t.message)})).catch((function(e){var t=Iu(e);S(t.message)}))};if(JSON.stringify(i)!==P&&(X(1),M(JSON.stringify(i)),f(!1),j(i),Tu(1,r,y)),void 0!==x)return(0,Je.jsx)(Bn,{type:"error",message:x});var Y=function(){Tu(1,r,y),B(!0);var e=Vu(z,N,!0);if("success"!==e.status||!N.formDate&&!N.toDate&&!N.type)return A(e.errors),void B(!1);X(1)};return(0,Je.jsxs)(Je.Fragment,{children:[0==F&&(0,Je.jsx)(Vn,{type:"outline-box",content:(0,Je.jsxs)("div",{className:"text-component",children:[(0,Je.jsx)(bp,{formFields:z,setValues:G,setErrors:W,formValues:N,formErrors:I,isSubmitted:F}),(0,Je.jsx)(_p,{handleSubmit:Y,submitLabel:"Zoeken"})]})}),"NULL"!==l&&void 0!==l&&(0,Je.jsxs)(Je.Fragment,{children:[Object.keys(l).length>0&&(0,Je.jsx)(Vn,{type:"page-component",className:"floating-button",content:(0,Je.jsx)(om,{documentType:"depot",filters:R,display:"button-download",fileName:U,mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",label:"Download excel"})}),(0,Je.jsx)(Lp,{columns:[{key:"depotCaseId",label:"Opdracht nr.",type:"text"},{key:"handleDate",label:"Datum afgehandeld",type:"date"},{key:"customerName",label:"Aanvraag vanuit",type:"date"},{key:"articleGroup",label:"Artikelgroep",type:"text"},{key:"serialNumber",label:"Serienummer",type:"text"},{key:"formType",label:"Type opdracht",type:"text"},{key:"pickupAddress",label:"Ophaaladres",type:"text"},{key:"dropoffAddress",label:"Afleveradres",type:"text"}],data:l,identifier:"customers"}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{className:"pagination-bar",currentPage:g,totalCount:b,pageSize:10,setCurrentPage:function(e){Tu(e,r,y),X(e)}}),(0,Je.jsx)("div",{className:"spacer"})]})]})}function cm(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)(!1),2),l=u[0],c=u[1],d=s((0,t.useState)([]),2),f=d[0],p=d[1],h=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,parents:o,current:i,identifier:a,filterFields:f,setFilterValues:function(e){v(e),c(!1===l)}}),(0,Je.jsx)(lm,{current:i,identifier:a,filterValues:m,setFilterFields:p})]})}function dm(e){e.parents,e.current;var n=s((0,t.useState)(),2),r=n[0],o=n[1],i=s((0,t.useState)(),2),a=i[0],u=i[1],l=s((0,t.useState)(),2),c=l[0],d=l[1],f=s((0,t.useState)({}),2),p=f[0],h=f[1],m=s((0,t.useState)(!1),2),v=m[0],g=m[1],y=(0,t.useRef)(null),w={1:"Januari",2:"Februari",3:"Maart",4:"April",5:"Mei",6:"Juni",7:"Juli",8:"Augustus",9:"September",10:"Oktober",11:"November",12:"December"},b=function(e){for(var t={},n=(new Date).getFullYear();n>=e;n--)t=He(He({},t),{},Ve({},n,n));return t},_={location:{type:"location",options:{locationId:"locationId"},label:{locationId:"Organisatie/locatie"}},from:{type:"fieldset",options:{fromMonth:{type:"select",label:"Vanaf maand",options:w,value:p.fromMonth||"",rules:["required"],className:"col-6"},fromYear:{type:"select",label:"Vanaf jaar",options:b(2023),value:p.fromYear||"",rules:["required"],className:"col-6"}}},to:{type:"fieldset",options:{toMonth:{type:"select",label:"Tot en met maand",options:w,value:p.toMonth||"",rules:["required"],className:"col-6"},toYear:{type:"select",label:"Tot en met jaar",options:b(2023),value:p.toYear||"",rules:["required"],className:"col-6"}}},groupedOnLocation:{type:"checkbox",label:"Weergeven per locatie",value:p.groupedOnLocation},groupedOndDepartment:{type:"checkbox",label:"Weergeven per afdeling",value:p.groupedOndDepartment}},E=function(e,t){d(null),!0===v&&g(!1),a&&u(Gu(a,e,null)),h(zu(p,e,t,null))},x=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=a;r=void 0!==t&&null!==t?zu(a,e,t,n):Gu(a,e,n),u(r)},S=function(e){return new Promise((function(t){return setTimeout(t,e)}))},C=function(){var e=tt(Qe().mark((function e(){var t,n=arguments;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:2500,e.next=3,S(t);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t={documentType:"rentalcost",filters:p},e.next=4,Qp(t).then((function(e){if(e.data.size<100&&void 0!==o)o("Er is iets foutgegaan met het ophalen van het bestand");else if(e.data.size<100)C(),alert("Er is iets foutgegaan met het ophalen van het bestand");else{var t=e.data,n=URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),r=y.current;r.href=n,r.setAttribute("download","Verhuurkosten"),r.click(),URL.revokeObjectURL(n),d("Bestand verhuurkosten succesvol aangemaakt")}C()}));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),void 0!==o&&o("Er is iets misgegaan met het ophalen van het bestand");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),A=function(){g(!0),o();var e=Vu(_,p,!0),t=[];if((void 0===p.locationId||null===p.locationId||!p.locationId>0)&&t.push("Selecteer een locatie"),t.length>0){var n=t.join(", ");o(n)}if("success"!==e.status||t.length>0)return u(e.errors),void g(!1);h({}),I()};return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Bn,{type:"success",message:c}),(0,Je.jsx)(Bn,{type:"error",message:r}),(0,Je.jsx)(Vn,{type:"outline-box",content:function(){var e=v,t=p;return!0===v&&(e=!1,t={}),(0,Je.jsxs)("div",{className:"text-component",children:[(0,Je.jsx)(bp,{formFields:_,setValues:E,setErrors:x,formValues:t,formErrors:a,isSubmitted:e}),(0,Je.jsx)(_p,{handleSubmit:A,submitLabel:"Download excel"})]})}()}),(0,Je.jsx)("a",{href:window.location.href,className:"hidden",ref:y,children:"\xa0"})]})}function fm(e){var t=e.title,n=e.parents,r=e.current;return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:n,current:r}),(0,Je.jsx)(Op,{title:t,tabGroup:"management",parents:n,current:r}),(0,Je.jsx)(dm,{current:r,parents:n})]})}function pm(e){var n=e.current,r=e.setFilterFields,o=e.filterValues,i=e.identifier,a=10,u="productslocation"===n?"location":"depot",l=s((0,t.useState)(),2),c=l[0],d=l[1],f=s((0,t.useState)(!1),2),p=f[0],h=f[1],m=s((0,t.useState)(!0),2),v=m[0],g=m[1],y=s((0,t.useState)(Nu(u)),2),w=y[0],b=y[1],_=s((0,t.useState)(0),2),E=_[0],x=_[1],S=s((0,t.useState)(),2),C=S[0],I=S[1],A=s((0,t.useState)(JSON.parse(localStorage.getItem("filters"+i))),2),O=A[0],N=A[1],T=s((0,t.useState)("{}"),2),k=T[0],R=T[1],j=s((0,t.useState)(),2),D=j[0],P=j[1];JSON.stringify(o)!==k&&(R(JSON.stringify(o)),h(!1),N(o),Tu(1,u,b)),w!==Nu(u)&&b(Nu(u));var M=[];[{key:"title",type:"title",hideView:"large"},{key:"articleName",label:"Artikelnaam",type:"text",hideView:"small"},{key:"serialNumber",label:"Serienr.",type:"text",hideView:"small"},{key:"productStatus",label:"Productstatus",type:"text"},{key:"startDate",label:"Startdatum depot",type:"date"},{key:"owner",label:"Locatie",type:"text"},{key:"departmentRoom",label:"Afdeling/kamernr.",type:"text"},{key:"registrationYear",label:"Bouwjaar",type:"text"},{key:"productBrand",label:"Merk",type:"text"},{key:"productType",label:"Type",type:"text"},{key:"quality",label:"Kwaliteit",type:"text"}].forEach((function(e){("location"===u&&"productStatus"!==e.key&&"depotStatus"!==e.key&&"startDate"!==e.key||"depot"===u&&"owner"!==e.key&&"departmentRoom"!==e.key)&&M.push(e)}));var L=function(){var e={articleCategory:{type:"categories",label:"Artikelcategorie",options:{output:"depot",category:"categoryId",article:"articleId"}},location:{type:"location"},clientName:{type:"text",label:"Naam cli\xebnt"},serialNumber:{type:"text",label:"Serienr."},frameNumber:{type:"text",label:"Framenr."},registrationDateFrom:{type:"text",label:"Bouwjaar van"},registrationDateTo:{type:"text",label:"Bouwjaar tot"},quality:{type:"select",label:"Kwaliteit",options:[{label:"Goed",value:"GOOD"},{label:"Matig",value:"AVERAGE"},{label:"Slecht",value:"BAD"}]}};"depot"===u&&delete e.location,r(e)};if((0,t.useEffect)((function(){function e(){return e=tt(Qe().mark((function e(){var t;return Qe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={filters:He({tabType:u,limitOffset:a*w-9,limitRows:a},O)},e.next=3,Ru(t).then((function(e){var t=Iu(e.data,"products");"success"===t.status?(void 0!==t.totalCount&&x(t.totalCount),d(t.products),P(t.documentName),h(!0),v!==u&&(L(),g(u))):I(t.message)})).catch((function(e){var t=Iu(e);I(t.message)}));case 3:case"end":return e.stop()}}),e)}))),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[u,w,O,k,a]),void 0!==C)return(0,Je.jsx)(Bn,{type:"error",message:C});if(!1===p)return(0,Je.jsx)(Bn,{type:"loading"});if(void 0===c||null===c||0===Object.keys(c).length)return(0,Je.jsx)(Bn,{type:"noData"});return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Vn,{type:"page-component",className:"floating-button",content:(0,Je.jsx)(om,{documentType:"products"+u,filters:O,display:"button-download",fileName:D,mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",label:"Download excel"})}),(0,Je.jsx)(Lp,{columns:M,data:c,identifier:i}),(0,Je.jsx)("div",{className:"spacer"}),(0,Je.jsx)(Vp,{currentPage:w,setCurrentPage:function(e){Tu(e,u,b)},totalCount:E,pageSize:a}),(0,Je.jsx)("div",{style:{height:"30px"}})]})}function hm(e){var n,r=e.title,o=e.parents,i=e.current,a=(o+i).replaceAll("/","-"),u=s((0,t.useState)([]),2),l=u[0],c=u[1],d=s((0,t.useState)(null!==(n=JSON.parse(localStorage.getItem("filters"+a)))&&void 0!==n?n:{}),2),f=d[0],p=d[1],h=s((0,t.useState)(!1),2),m=h[0],v=h[1];return(0,Je.jsxs)("div",{children:[(0,Je.jsx)($e,{parents:o,current:i}),(0,Je.jsx)(Op,{title:r,parents:o,current:i,filterFields:l,setFilterValues:function(e){p(e),v(!1===m)},identifier:a}),(0,Je.jsx)(pm,{current:i,filterValues:f,setFilterFields:c,identifier:a})]})}var mm=[{path:"*",redirect:(0,Je.jsx)(Se,{to:"/home"})},{path:"/home",pageTitle:"Home",topMenu:!0,component:(0,Je.jsx)($n,{})},{path:"/scan",pageTitle:"Scan QR code",permissionLevel:1,topMenu:!0,component:(0,Je.jsx)(xp,{})},{path:"/rentals",pageTitle:"Verhuur",permissionLevel:1,topMenu:!0,redirect:(0,Je.jsx)(Se,{to:"/rentals/active"}),children:[{path:"/actions",pageTitle:"Acties",permissionLevel:1,tabGroup:"rentals-overview",component:(0,Je.jsx)(Np,{title:"Acties verhuur",parents:"rentals",current:"actions"})},{path:"/actions/scan",pageTitle:"Scan QR code",permissionLevel:1,component:(0,Je.jsx)(Tp,{title:"Scan QR code",parents:"rentals/actions",current:"scan"})},{path:"/actions/request",pageTitle:"Nieuwe aanvraag verhuur",permissionLevel:2,component:(0,Je.jsx)(Dp,{title:"Nieuwe aanvraag verhuur",parents:"rentals/actions",current:"request"})},{path:"/active",pageTitle:"Verhuurdossiers",permissionLevel:1,tabGroup:"rentals-overview",component:(0,Je.jsx)(Hp,{title:"Actieve verhuurdossiers",parents:"rentals",current:"active"}),children:[{path:"/actions/:rentalCaseId",pageTitle:"Acties",permissionLevel:2,tabGroup:"rentals-active",component:(0,Je.jsx)(Gp,{parents:"rentals/active",current:"actions"})},{path:"/retour/:rentalCaseId",pageTitle:"Retour melden",permissionLevel:2,component:(0,Je.jsx)(Kp,{parents:"rentals/active",current:"retour",tabGroup:"rentals-active"})},{path:"/details/:rentalCaseId",pageTitle:"Details",permissionLevel:1,tabGroup:"rentals-active",component:(0,Je.jsx)(Yp,{parents:"rentals/active",current:"details"})},{path:"/repair/:rentalCaseId",pageTitle:"Repartie melden",permissionLevel:2,component:(0,Je.jsx)(Jp,{parents:"rentals/active",current:"repair"})},{path:"/invoices/:rentalCaseId",pageTitle:"Facturen",permissionLevel:1,tabGroup:"rentals-active",component:(0,Je.jsx)(th,{parents:"rentals/active",current:"invoices"})},{path:"/documents/:rentalCaseId",pageTitle:"Verhuurdocumenten",permissionLevel:1,tabGroup:"rentals-active",component:(0,Je.jsx)(rh,{parents:"rentals/active",current:"documents"})}]},{path:"/waiting",pageTitle:"In behandeling",permissionLevel:1,tabGroup:"rentals-overview",component:(0,Je.jsx)(Hp,{title:"Verhuurdossiers in behandeling",parents:"rentals",current:"waiting"}),children:[{path:"/details/:rentalCaseId",pageTitle:"Details",permissionLevel:1,tabGroup:"rentals-waiting",component:(0,Je.jsx)(Yp,{parents:"rentals/waiting",current:"details"})},{path:"/invoices/:rentalCaseId",pageTitle:"Facturen",permissionLevel:1,tabGroup:"rentals-waiting",component:(0,Je.jsx)(th,{parents:"rentals/waiting",current:"invoices"})},{path:"/documents/:rentalCaseId",pageTitle:"Verhuurdocumenten",permissionLevel:1,tabGroup:"rentals-waiting",component:(0,Je.jsx)(rh,{parents:"rentals/waiting",current:"documents"})}]},{path:"/archive",pageTitle:"Archief",permissionLevel:1,tabGroup:"rentals-overview",component:(0,Je.jsx)(Hp,{title:"Archief verhuur",parents:"rentals",current:"archive"}),children:[{path:"/details/:rentalCaseId",pageTitle:"Details",permissionLevel:1,tabGroup:"rentals-archive",component:(0,Je.jsx)(Yp,{parents:"rentals/archive",current:"details"})},{path:"/invoices/:rentalCaseId",pageTitle:"Facturen",permissionLevel:1,tabGroup:"rentals-archive",component:(0,Je.jsx)(th,{parents:"rentals/archive",current:"invoices"})},{path:"/documents/:rentalCaseId",pageTitle:"Verhuurdocumenten",permissionLevel:1,tabGroup:"rentals-archive",component:(0,Je.jsx)(rh,{parents:"rentals/archive",current:"documents"})}]}]},{path:"/articles",pageTitle:"Hulpmiddelenbeheer",permissionLevel:1,topMenu:!0,redirect:(0,Je.jsx)(Se,{to:"/articles/location"}),children:[{path:"/actions",pageTitle:"Acties",permissionLevel:1,tabGroup:"product-overview",component:(0,Je.jsx)(sh,{title:"Acties hulpmiddelen",parents:"articles",current:"actions"})},{path:"/actions/scan",pageTitle:"Scan QR code",permissionLevel:1,component:(0,Je.jsx)(uh,{title:"Scan QR code",parents:"articles/actions",current:"scan"})},{path:"/location",pageTitle:"Op locatie",permissionLevel:1,tabGroup:"product-overview",component:(0,Je.jsx)(ih,{title:"Hulpmiddelen op locatie",parents:"articles",current:"location"})},{path:"/location/product",redirect:(0,Je.jsx)(Se,{to:"/location"}),children:[{path:"/actions/:productId",pageTitle:"Acties",permissionLevel:2,tabGroup:"product-details-location",component:(0,Je.jsx)(vh,{title:null,parents:"articles/location/product",current:"actions"})},{path:"/actions/scan/:productId",pageTitle:"Qr code koppelen",permissionLevel:2,component:(0,Je.jsx)(gh,{title:"Qr code koppelen",parents:"articles/location/product/actions",current:"scan"})},{path:"/actions/relocate/:productId",pageTitle:"Locatie wijzigen",permissionLevel:2,component:(0,Je.jsx)(wh,{title:null,parents:"articles/location/product/actions",current:"relocate"})},{path:"/actions/repair/:productId",pageTitle:"Reparatieverzoek",permissionLevel:2,component:(0,Je.jsx)(bh,{title:null,parents:"articles/location/product/actions",current:"repair"})},{path:"/actions/depot/:productId",pageTitle:"Aanvraag depotopslag",permissionLevel:2,component:(0,Je.jsx)(Eh,{title:null,parents:"articles/location/product/actions",current:"depot"})},{path:"/actions/client/:productId",pageTitle:"Cli\xebntgegevens",permissionLevel:2,component:(0,Je.jsx)(Sh,{title:null,parents:"articles/location/product/actions",current:"client"})},{path:"/actions/clientrepair/:productId",pageTitle:"Archief",permissionLevel:2,component:(0,Je.jsx)(Th,{title:null,parents:"articles/location/product/actions",current:"add"})},{path:"/actions/edit/:productId",pageTitle:"Artikelgegevens wijzigen",permissionLevel:2,component:(0,Je.jsx)(Ih,{title:null,parents:"articles/location/product/actions",current:"edit"})},{path:"/details/:productId",pageTitle:"Details",permissionLevel:1,tabGroup:"product-details-location",component:(0,Je.jsx)(Dh,{title:null,parents:"articles/location/product",current:"details"})},{path:"/repairs/:productId",pageTitle:"Reparaties",tabGroup:"product-details-location",permissionLevel:1,component:(0,Je.jsx)(Mh,{title:null,parents:"articles/location/product",current:"repairs"})},{path:"/inspections/:productId",pageTitle:"Keuringen",tabGroup:"product-details-location",permissionLevel:1,component:(0,Je.jsx)(Fh,{title:null,parents:"articles/location/product",current:"inspections"})},{path:"/cleanings/:productId",pageTitle:"Reinging",permissionLevel:1,tabGroup:"product-details-location",component:(0,Je.jsx)(Vh,{title:null,parents:"articles/location/product",current:"cleanings"})},{path:"/documents/:productId",pageTitle:"Documenten",permissionLevel:1,tabGroup:"product-details-location",component:(0,Je.jsx)(Hh,{title:null,parents:"articles/location/product",current:"documents"})},{path:"/log/:productId",pageTitle:"Product historie",permissionLevel:1,tabGroup:"product-details-location",component:(0,Je.jsx)(Gh,{title:null,parents:"articles/location/product",current:"log"})}]},{path:"/depot",pageTitle:"In depot",permissionLevel:1,topMenu:!0,tabGroup:"product-overview",component:(0,Je.jsx)(ih,{title:"Hulpmiddelen in depot",parents:"articles",current:"depot"})},{path:"/depot/product",redirect:(0,Je.jsx)(Se,{to:"/depot"}),children:[{path:"/actions/:productId",pageTitle:"Acties",permissionLevel:2,tabGroup:"product-details-depot",component:(0,Je.jsx)(vh,{title:null,parents:"articles/depot/product",current:"actions"})},{path:"/actions/scan/:productId",pageTitle:"Qr code koppelen",permissionLevel:2,component:(0,Je.jsx)(gh,{title:"Qr code koppelen",parents:"articles/depot/product/actions",current:"scan"})},{path:"/actions/depotout/:productId",pageTitle:"Leveren uit depot",permissionLevel:2,component:(0,Je.jsx)(Oh,{title:null,parents:"articles/depot/product/actions",current:"depotout"})},{path:"/actions/reservation/:productId",pageTitle:"Reservering registreren",permissionLevel:2,component:(0,Je.jsx)(Rh,{title:null,parents:"articles/depot/product/actions",current:"reservation"})},{path:"/actions/edit/:productId",pageTitle:"Artikelgegevens wijzigen",permissionLevel:2,component:(0,Je.jsx)(Ih,{title:null,parents:"articles/depot/product/actions",current:"edit"})},{path:"/details/:productId",pageTitle:"Details",permissionLevel:1,tabGroup:"product-details-depot",component:(0,Je.jsx)(Dh,{title:null,parents:"articles/depot/product",current:"details"})},{path:"/repairs/:productId",pageTitle:"Reparaties",permissionLevel:1,tabGroup:"product-details-depot",component:(0,Je.jsx)(Mh,{title:null,parents:"articles/depot/product",current:"repairs"})},{path:"/inspections/:productId",pageTitle:"Keuringen",permissionLevel:1,tabGroup:"product-details-depot",component:(0,Je.jsx)(Fh,{title:null,parents:"articles/depot/product",current:"inspections"})},{path:"/cleanings/:productId",pageTitle:"Reinging",permissionLevel:1,tabGroup:"product-details-depot",component:(0,Je.jsx)(Vh,{title:null,parents:"articles/depot/product",current:"cleanings"})},{path:"/documents/:productId",pageTitle:"Documenten",permissionLevel:1,tabGroup:"product-details-depot",component:(0,Je.jsx)(Hh,{title:null,parents:"articles/depot/product",current:"documents"})},{path:"/log/:productId",pageTitle:"Product historie",permissionLevel:1,tabGroup:"product-details-depot",component:(0,Je.jsx)(Gh,{title:null,parents:"articles/depot/product",current:"log"})}]},{path:"/depot-pending",pageTitle:"Opdrachten",permissionLevel:1,tabGroup:"product-overview",component:(0,Je.jsx)(Xh,{title:"Depot opdrachten",parents:"articles",current:"depot-pending"}),children:[{path:"/details/:depotCaseId",pageTitle:"Details",permissionLevel:1,component:(0,Je.jsx)(Kh,{title:null,parents:"articles/depot-pending",current:"details"})}]},{path:"/depot-archive",pageTitle:"Archief",permissionLevel:1,tabGroup:"product-overview",component:(0,Je.jsx)(Yh,{title:"Archief opdrachten",parents:"articles",current:"depot-archive"}),children:[{path:"/details/:depotCaseId",pageTitle:"Details",permissionLevel:1,component:(0,Je.jsx)(Kh,{title:null,parents:"articles/depot-archive",current:"details"})}]},{path:"/inspections",redirect:(0,Je.jsx)(Se,{to:"/articles/inspections/open"}),pageTitle:"Keuringen",permissionLevel:1,topMenu:!0,children:[{path:"/open",pageTitle:"Te keuren",permissionLevel:1,tabGroup:"inspections",component:(0,Je.jsx)(ch,{title:"Te keuren",parents:"articles/inspections",current:"open"})},{path:"/archive",pageTitle:"Archief",permissionLevel:1,tabGroup:"inspections",component:(0,Je.jsx)(ch,{title:"Archief keuringen",parents:"articles/inspections",current:"archive"})}]},{path:"/repairs",redirect:(0,Je.jsx)(Se,{to:"/articles/repairs/open"}),pageTitle:"Reparaties",permissionLevel:1,topMenu:!0,children:[{path:"/open",pageTitle:"Reparaties",permissionLevel:1,tabGroup:"repairs",component:(0,Je.jsx)(hh,{title:"Openstaande reparaties",parents:"articles/repairs",current:"open"})},{path:"/archive",pageTitle:"Archief",permissionLevel:1,tabGroup:"repairs",component:(0,Je.jsx)(hh,{title:"Archief reparaties",parents:"articles/repairs",current:"archive"})}]},{path:"/add",pageTitle:"Hulpmiddel registreren",permissionLevel:2,component:(0,Je.jsx)(fh,{title:"Hulpmiddel registreren",parents:"articles/actions",current:"add"})}]},{path:"/requests",pageTitle:"Aanvragen",permissionLevel:1,topMenu:!0,redirect:(0,Je.jsx)(Se,{to:"/requests/open"}),children:[{path:"/open",pageTitle:"Aanvragen",permissionLevel:1,tabGroup:"customer-requests",component:(0,Je.jsx)($h,{title:"Lopende aanvragen",parents:"requests",current:"open"}),children:[{path:"/details/:customerRequestId",pageTitle:"Details aanvraag",permissionLevel:1,component:(0,Je.jsx)(em,{parents:"requests",current:"details"})}]},{path:"/archive",pageTitle:"Archief",permissionLevel:1,tabGroup:"customer-requests",component:(0,Je.jsx)($h,{title:"Archief aanvragen",parents:"requests",current:"archive"}),children:[{path:"/details/:customerRequestId",pageTitle:"Details aanvraag",permissionLevel:1,component:(0,Je.jsx)(em,{parents:"requests/archive",current:"details"})}]}]},{path:"/management",pageTitle:"Management info",permissionLevel:1,topMenu:!0,redirect:(0,Je.jsx)(Se,{to:"/management/invoices"}),children:[{path:"/invoices",pageTitle:"Facturen",permissionLevel:1,tabGroup:"management",component:(0,Je.jsx)(tm,{title:"Facturen",parents:"management",current:"invoices"})},{path:"/overviews",pageTitle:"Overzichten",permissionLevel:1,tabGroup:"management",component:(0,Je.jsx)(rm,{title:"Overzichten",parents:"management",current:"overviews"})},{path:"/overviews/rental",pageTitle:"Verhuur",permissionLevel:1,component:(0,Je.jsx)(am,{title:"Overzicht verhuur",parents:"management/overviews",current:"rental"})},{path:"/overviews/repairs",pageTitle:"Reparaties",permissionLevel:1,component:(0,Je.jsx)(um,{title:"Overzicht reparaties",parents:"management/overviews",current:"repairs"})},{path:"/overviews/depot",pageTitle:"Depotopdrachten",permissionLevel:1,component:(0,Je.jsx)(cm,{title:"Overzicht depotopdrachten",parents:"management/overviews",current:"depot"})},{path:"/rentalcost",pageTitle:"Verhuurkosten",permissionLevel:1,tabGroup:"management",component:(0,Je.jsx)(fm,{title:"Verhuurkosten",parents:"management",current:"rentalcost"})},{path:"/overviews/productslocation",pageTitle:"Op locatie",permissionLevel:1,component:(0,Je.jsx)(hm,{title:"Hulpmiddelen op locatie",parents:"management/overviews",current:"productslocation"})},{path:"/overviews/productsdepot",pageTitle:"In depot",permissionLevel:1,topMenu:!0,component:(0,Je.jsx)(hm,{title:"Hulpmiddelen in depot",parents:"management/overviews",current:"productsdepot"})}]},{path:"/products",redirect:(0,Je.jsx)(Se,{to:"/articles/location/product/actions"})},{path:"/products/actions",redirect:(0,Je.jsx)(Se,{to:"/articles/actions"})},{path:"/products/all",redirect:(0,Je.jsx)(Se,{to:"/articles/location"})},{path:"/depot",redirect:(0,Je.jsx)(Se,{to:"/articles/depot"})},{path:"/depot/products",redirect:(0,Je.jsx)(Se,{to:"/articles/depot"})},{path:"/depot/tasks",redirect:(0,Je.jsx)(Se,{to:"/articles/depot-pending"})},{path:"/depot/tasksarchive",redirect:(0,Je.jsx)(Se,{to:"/articles/depot-archive"})},{path:"/products/addproduct",redirect:(0,Je.jsx)(Se,{to:"/articles/add"})},{path:"/invoices",redirect:(0,Je.jsx)(Se,{to:"/management/invoices"})},{path:"/scan/rental",redirect:(0,Je.jsx)(Se,{to:"/rentals/actions/scan"})},{path:"/rentals/requests",redirect:(0,Je.jsx)(Se,{to:"/rentals/actions/requests"})},{path:"/scan/default",redirect:(0,Je.jsx)(Se,{to:"/scan"})},{path:"/scan/products",redirect:(0,Je.jsx)(Se,{to:"/scan"})},{path:"/scan/rental",redirect:(0,Je.jsx)(Se,{to:"/scan"})}],vm=function(){return{public:[Zn],protected:[mm]}},gm=function(){return Ge().get("".concat(Ye,"/auth/identify"),Ke())},ym=function(e){return Ge().post("".concat(Ye,"/auth/login"),e,Ke())},wm=function(e){return Ge().post("".concat(Ye,"/auth/forgot"),e,Ke())},bm=function(e){return Ge().post("".concat(Ye,"/auth/checkGuid"),e,Ke())},_m=function(e){return Ge().post("".concat(Ye,"/auth/setPassword"),e,Ke())},Em=function(e){var t=e.replaceAll("/","_").replaceAll(":","_");return"_"===t.substr(0,1)&&(t=t.substr(1)),t},xm=function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0;return t.map((function(t){var i,a,s=1e7*Math.random(),u=null!==(i=t.fullPath)&&void 0!==i?i:r+t.path,l=(0,Je.jsx)(Ie,{path:u,element:(a=t.component,a&&(0,Je.jsx)(a.type,He(He({},a.props),o)))},s+1);return!t.component&&t.redirect&&(l=(0,Je.jsx)(Ie,{path:u,element:t.redirect},s+2)),!t.children||t.children.length<1?l:!0===n?(0,Je.jsxs)(Ie,{path:u,children:[l,e(t.children,n,u)]},s+3):void 0}))},Sm=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";void 0===n.routes&&(n.routes={}),void 0===n.menu&&(n.menu=[]);var o=JSON.parse(localStorage.getItem("auth"));return null===o||void 0===o||void 0===o.permissions||t.forEach((function(t){var o,i=r+t.path;if(Om(i)>=(null!==(o=t.permissionLevel)&&void 0!==o?o:1)){var a=Em(i);t.fullPath=i,n.routes[a]=t,!0===t.topMenu&&n.menu.push({path:i,title:t.pageTitle}),void 0!==t.children&&(n=e(t.children,n,i))}})),n},Cm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t={};if(null===e&&(e=JSON.parse(localStorage.getItem("auth"))),null===e||void 0===e||void 0===e.roles)return{};var n=vm();return n.protected.forEach((function(e){t=Sm(e,t)})),void 0!==t&&null!==t&&void 0!==t.routes&&(localStorage.setItem("main-menu",JSON.stringify(Object.values(t.menu))),localStorage.setItem("routes-tree",JSON.stringify(t.routes))),t},Im=function(e){var t=[],n=[],r=vm();return"public"!==e&&"all"!==e||r.public.forEach((function(e){var r,o=null!==(r=e[0].identifier)&&void 0!==r?r:null;!1===n.includes(o)&&(t=[].concat(u(t),u(e))),n.push(o)})),"protected"!==e&&"all"!==e||r.protected.forEach((function(e){var r,o=null!==(r=e[0].identifier)&&void 0!==r?r:null;!1===n.includes(o)&&(t=[].concat(u(t),u(e))),n.push(o)})),t},Am=function(e){return void 0!==JSON.parse(localStorage.getItem("routes-tree"))[Em(e)]},Om=function(e){var t=0,n=JSON.parse(localStorage.getItem("auth"));return void 0!==n&&null!==n&&(""===e||"/"===e||"*"===e||"/home"===e?t=1:Object.keys(n.permissions).forEach((function(r){if(-1!==r.indexOf("*")){var o=r.substring(0,r.indexOf("*"));if(e.substring(1,o.length+1)===o){var i=r.substring(r.indexOf("*")+1);-1!=e.substr(o.length).indexOf(i)&&(t=n.permissions[r])}}else{r===(e.substring(1)+"/").substring(0,r.length)&&(t=n.permissions[r])}}))),t},Nm=function(){var e=ce(),n=JSON.parse(localStorage.getItem("auth")),r=s((0,t.useState)(),2),o=r[0],i=r[1];return(0,t.useEffect)((function(){void 0===o&&gm().then((function(e){var t=Iu(e.data);"customer-portal"===t.response.environment||"success"===t.status&&"localhost:3000"===window.location.host&&null!==n&&n.environment===t.response.environment?i(t.status):(localStorage.clear(),console.log(t.response.environment+"customer-portal"),i("error"))})).catch((function(e){localStorage.clear(),console.log(e),Iu(e),i("error")}))}),[o]),void 0===o?(0,Je.jsx)(Je.Fragment,{}):n&&n.token&&"success"===o&&"customer-portal"===n.environment?(0,Je.jsx)(Ce,{}):(0,Je.jsx)(Se,{to:"/auth/login",replace:!0,state:{from:e}})};function Tm(){var e=s((0,t.useState)(),2),n=e[0],r=e[1],o=JSON.parse(localStorage.getItem("auth")),i=window.location.pathname;return(0,t.useEffect)((function(){gm().then((function(e){var t=Iu(e.data);r(t)})).catch((function(e){console.log(e);var t=Iu(e);r(t)}))}),[]),void 0!==n&&"success"===n.status&&null!==o&&void 0!==o?"/home"===i?(window.location.reload(),(0,Je.jsx)(Je.Fragment,{})):"/"===i?(0,Je.jsx)(Se,{to:"/home"}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)($e,{}),(0,Je.jsx)(Bn,{message:"Pagina niet gevonden"})]}):void 0!==n?(localStorage.clear(),(0,Je.jsx)(Se,{to:"/auth/login"})):(0,Je.jsx)(Je.Fragment,{})}var km=function(){var e=s((0,t.useState)(),2),n=e[0],r=e[1],o=s((0,t.useState)(),2),i=o[0],a=o[1],u=JSON.parse(localStorage.getItem("routes-tree"));return null!==JSON.parse(localStorage.getItem("main-menu"))&&null!==u||Cm(),void 0===i||void 0===n?(r(Im("protected")),a(Im("public")),(0,Je.jsx)(Je.Fragment,{})):(0,Je.jsx)(Pe,{children:(0,Je.jsxs)("div",{className:"outer-wrapper",children:[(0,Je.jsx)("div",{className:"inner-wrapper",children:(0,Je.jsxs)(Oe,{children:[xm(i),void 0!==n&&null!==n&&(0,Je.jsx)(Ie,{element:(0,Je.jsx)(Nm,{}),children:xm(n)}),(0,Je.jsx)(Ie,{path:"*",element:(0,Je.jsx)(Tm,{})})]})}),(0,Je.jsxs)("div",{className:"footer",children:["Versie: ","1.1.1"]})]})})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var Rm=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,o=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),r(e),o(e),i(e),a(e)}))};o.render((0,Je.jsx)(t.StrictMode,{children:(0,Je.jsx)(km,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)})),Rm()}()}();
//# sourceMappingURL=main.eeceaaf6.js.map