@scanupload/qr-code-generator 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react");function sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ae={exports:{}},re={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react");function Qt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var be={exports:{}},pe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ce;function fr(){if(Ce)return re;Ce=1;var e=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function n(s,v,a){var f=null;if(a!==void 0&&(f=""+a),v.key!==void 0&&(f=""+v.key),"key"in v){a={};for(var i in v)i!=="key"&&(a[i]=v[i])}else a=v;return v=a.ref,{$$typeof:e,type:s,key:f,ref:v!==void 0?v:null,props:a}}return re.Fragment=u,re.jsx=n,re.jsxs=n,re}var te={};/**
9
+ */var Ze;function Jt(){if(Ze)return pe;Ze=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:r,type:n,key:i,ref:s!==void 0?s:null,props:o}}return pe.Fragment=e,pe.jsx=t,pe.jsxs=t,pe}var _e={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,30 +14,110 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Se;function lr(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){function e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===Q?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case O:return"Fragment";case B:return"Profiler";case P:return"StrictMode";case $:return"Suspense";case Y:return"SuspenseList";case J:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case E:return"Portal";case D:return r.displayName||"Context";case L:return(r._context.displayName||"Context")+".Consumer";case m:var p=r.render;return r=r.displayName,r||(r=p.displayName||p.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case W:return p=r.displayName||null,p!==null?p:e(r.type)||"Memo";case X:p=r._payload,r=r._init;try{return e(r(p))}catch{}}return null}function u(r){return""+r}function n(r){try{u(r);var p=!1}catch{p=!0}if(p){p=console;var _=p.error,T=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return _.call(p,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",T),u(r)}}function s(r){if(r===O)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===X)return"<...>";try{var p=e(r);return p?"<"+p+">":"<...>"}catch{return"<...>"}}function v(){var r=F.A;return r===null?null:r.getOwner()}function a(){return Error("react-stack-top-frame")}function f(r){if(U.call(r,"key")){var p=Object.getOwnPropertyDescriptor(r,"key").get;if(p&&p.isReactWarning)return!1}return r.key!==void 0}function i(r,p){function _(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",p))}_.isReactWarning=!0,Object.defineProperty(r,"key",{get:_,configurable:!0})}function o(){var r=e(this.type);return V[r]||(V[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function t(r,p,_,T,S,w){var R=_.ref;return r={$$typeof:g,type:r,key:p,props:_,_owner:T},(R!==void 0?R:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:o}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:w}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function l(r,p,_,T,S,w){var R=p.children;if(R!==void 0)if(T)if(q(R)){for(T=0;T<R.length;T++)c(R[T]);Object.freeze&&Object.freeze(R)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(R);if(U.call(p,"key")){R=e(r);var C=Object.keys(p).filter(function(x){return x!=="key"});T=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",d[R+T]||(C=0<C.length?"{"+C.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var et;function Gt(){return et||(et=1,process.env.NODE_ENV!=="production"&&(function(){function r(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===B?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case P:return"Fragment";case N:return"Profiler";case k:return"StrictMode";case F:return"Suspense";case X:return"SuspenseList";case ee:return"Activity"}if(typeof u=="object")switch(typeof u.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),u.$$typeof){case _:return"Portal";case M:return u.displayName||"Context";case z:return(u._context.displayName||"Context")+".Consumer";case b:var w=u.render;return u=u.displayName,u||(u=w.displayName||w.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case ne:return w=u.displayName||null,w!==null?w:r(u.type)||"Memo";case se:w=u._payload,u=u._init;try{return r(u(w))}catch{}}return null}function e(u){return""+u}function t(u){try{e(u);var w=!1}catch{w=!0}if(w){w=console;var T=w.error,x=typeof Symbol=="function"&&Symbol.toStringTag&&u[Symbol.toStringTag]||u.constructor.name||"Object";return T.call(w,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",x),e(u)}}function n(u){if(u===P)return"<>";if(typeof u=="object"&&u!==null&&u.$$typeof===se)return"<...>";try{var w=r(u);return w?"<"+w+">":"<...>"}catch{return"<...>"}}function s(){var u=J.A;return u===null?null:u.getOwner()}function o(){return Error("react-stack-top-frame")}function i(u){if(te.call(u,"key")){var w=Object.getOwnPropertyDescriptor(u,"key").get;if(w&&w.isReactWarning)return!1}return u.key!==void 0}function a(u,w){function T(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",w))}T.isReactWarning=!0,Object.defineProperty(u,"key",{get:T,configurable:!0})}function c(){var u=r(this.type);return V[u]||(V[u]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),u=this.props.ref,u!==void 0?u:null}function l(u,w,T,x,D,I){var m=T.ref;return u={$$typeof:y,type:u,key:w,props:T,_owner:x},(m!==void 0?m:null)!==null?Object.defineProperty(u,"ref",{enumerable:!1,get:c}):Object.defineProperty(u,"ref",{enumerable:!1,value:null}),u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(u,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(u,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.defineProperty(u,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}function h(u,w,T,x,D,I){var m=w.children;if(m!==void 0)if(x)if(G(m)){for(x=0;x<m.length;x++)f(m[x]);Object.freeze&&Object.freeze(m)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(m);if(te.call(w,"key")){m=r(u);var E=Object.keys(w).filter(function(j){return j!=="key"});x=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",p[m+x]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,T,R,C,R),d[R+T]=!0)}if(R=null,_!==void 0&&(n(_),R=""+_),f(p)&&(n(p.key),R=""+p.key),"key"in p){_={};for(var A in p)A!=="key"&&(_[A]=p[A])}else _=p;return R&&i(_,typeof r=="function"?r.displayName||r.name||"Unknown":r),t(r,R,_,v(),S,w)}function c(r){h(r)?r._store&&(r._store.validated=1):typeof r=="object"&&r!==null&&r.$$typeof===X&&(r._payload.status==="fulfilled"?h(r._payload.value)&&r._payload.value._store&&(r._payload.value._store.validated=1):r._store&&(r._store.validated=1))}function h(r){return typeof r=="object"&&r!==null&&r.$$typeof===g}var b=N,g=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),D=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),Q=Symbol.for("react.client.reference"),F=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,q=Array.isArray,H=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(r){return r()}};var I,V={},K=b.react_stack_bottom_frame.bind(b,a)(),Z=H(s(a)),d={};te.Fragment=O,te.jsx=function(r,p,_){var T=1e4>F.recentlyCreatedOwnerStacks++;return l(r,p,_,!1,T?Error("react-stack-top-frame"):K,T?H(s(r)):Z)},te.jsxs=function(r,p,_){var T=1e4>F.recentlyCreatedOwnerStacks++;return l(r,p,_,!0,T?Error("react-stack-top-frame"):K,T?H(s(r)):Z)}})()),te}var xe;function cr(){return xe||(xe=1,process.env.NODE_ENV==="production"?ae.exports=fr():ae.exports=lr()),ae.exports}var k=cr(),ee={},oe={exports:{}},ie={exports:{}},M={};/** @license React v16.13.1
22
+ <%s key={someKey} {...props} />`,x,m,E,m),p[m+x]=!0)}if(m=null,T!==void 0&&(t(T),m=""+T),i(w)&&(t(w.key),m=""+w.key),"key"in w){T={};for(var R in w)R!=="key"&&(T[R]=w[R])}else T=w;return m&&a(T,typeof u=="function"?u.displayName||u.name||"Unknown":u),l(u,m,T,s(),D,I)}function f(u){g(u)?u._store&&(u._store.validated=1):typeof u=="object"&&u!==null&&u.$$typeof===se&&(u._payload.status==="fulfilled"?g(u._payload.value)&&u._payload.value._store&&(u._payload.value._store.validated=1):u._store&&(u._store.validated=1))}function g(u){return typeof u=="object"&&u!==null&&u.$$typeof===y}var S=O,y=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),M=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),B=Symbol.for("react.client.reference"),J=S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,G=Array.isArray,K=console.createTask?console.createTask:function(){return null};S={react_stack_bottom_frame:function(u){return u()}};var q,V={},ce=S.react_stack_bottom_frame.bind(S,o)(),le=K(n(o)),p={};_e.Fragment=P,_e.jsx=function(u,w,T){var x=1e4>J.recentlyCreatedOwnerStacks++;return h(u,w,T,!1,x?Error("react-stack-top-frame"):ce,x?K(n(u)):le)},_e.jsxs=function(u,w,T){var x=1e4>J.recentlyCreatedOwnerStacks++;return h(u,w,T,!0,x?Error("react-stack-top-frame"):ce,x?K(n(u)):le)}})()),_e}var tt;function Xt(){return tt||(tt=1,process.env.NODE_ENV==="production"?be.exports=Jt():be.exports=Gt()),be.exports}var v=Xt(),de={},we={exports:{}},Se={exports:{}},$={};/** @license React v16.13.1
23
23
  * react-is.production.min.js
24
24
  *
25
25
  * Copyright (c) Facebook, Inc. and its affiliates.
26
26
  *
27
27
  * This source code is licensed under the MIT license found in the
28
28
  * LICENSE file in the root directory of this source tree.
29
- */var Ae;function vr(){if(Ae)return M;Ae=1;var e=typeof Symbol=="function"&&Symbol.for,u=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,v=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,o=e?Symbol.for("react.async_mode"):60111,t=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function L(m){if(typeof m=="object"&&m!==null){var $=m.$$typeof;switch($){case u:switch(m=m.type,m){case o:case t:case s:case a:case v:case c:return m;default:switch(m=m&&m.$$typeof,m){case i:case l:case g:case b:case f:return m;default:return $}}case n:return $}}}function D(m){return L(m)===t}return M.AsyncMode=o,M.ConcurrentMode=t,M.ContextConsumer=i,M.ContextProvider=f,M.Element=u,M.ForwardRef=l,M.Fragment=s,M.Lazy=g,M.Memo=b,M.Portal=n,M.Profiler=a,M.StrictMode=v,M.Suspense=c,M.isAsyncMode=function(m){return D(m)||L(m)===o},M.isConcurrentMode=D,M.isContextConsumer=function(m){return L(m)===i},M.isContextProvider=function(m){return L(m)===f},M.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===u},M.isForwardRef=function(m){return L(m)===l},M.isFragment=function(m){return L(m)===s},M.isLazy=function(m){return L(m)===g},M.isMemo=function(m){return L(m)===b},M.isPortal=function(m){return L(m)===n},M.isProfiler=function(m){return L(m)===a},M.isStrictMode=function(m){return L(m)===v},M.isSuspense=function(m){return L(m)===c},M.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===s||m===t||m===a||m===v||m===c||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===g||m.$$typeof===b||m.$$typeof===f||m.$$typeof===i||m.$$typeof===l||m.$$typeof===O||m.$$typeof===P||m.$$typeof===B||m.$$typeof===E)},M.typeOf=L,M}var j={};/** @license React v16.13.1
29
+ */var rt;function Kt(){if(rt)return $;rt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,a=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,S=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,_=r?Symbol.for("react.block"):60121,P=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,N=r?Symbol.for("react.scope"):60119;function z(b){if(typeof b=="object"&&b!==null){var F=b.$$typeof;switch(F){case e:switch(b=b.type,b){case c:case l:case n:case o:case s:case f:return b;default:switch(b=b&&b.$$typeof,b){case a:case h:case y:case S:case i:return b;default:return F}}case t:return F}}}function M(b){return z(b)===l}return $.AsyncMode=c,$.ConcurrentMode=l,$.ContextConsumer=a,$.ContextProvider=i,$.Element=e,$.ForwardRef=h,$.Fragment=n,$.Lazy=y,$.Memo=S,$.Portal=t,$.Profiler=o,$.StrictMode=s,$.Suspense=f,$.isAsyncMode=function(b){return M(b)||z(b)===c},$.isConcurrentMode=M,$.isContextConsumer=function(b){return z(b)===a},$.isContextProvider=function(b){return z(b)===i},$.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},$.isForwardRef=function(b){return z(b)===h},$.isFragment=function(b){return z(b)===n},$.isLazy=function(b){return z(b)===y},$.isMemo=function(b){return z(b)===S},$.isPortal=function(b){return z(b)===t},$.isProfiler=function(b){return z(b)===o},$.isStrictMode=function(b){return z(b)===s},$.isSuspense=function(b){return z(b)===f},$.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===l||b===o||b===s||b===f||b===g||typeof b=="object"&&b!==null&&(b.$$typeof===y||b.$$typeof===S||b.$$typeof===i||b.$$typeof===a||b.$$typeof===h||b.$$typeof===P||b.$$typeof===k||b.$$typeof===N||b.$$typeof===_)},$.typeOf=z,$}var L={};/** @license React v16.13.1
30
30
  * react-is.development.js
31
31
  *
32
32
  * Copyright (c) Facebook, Inc. and its affiliates.
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var Me;function dr(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,u=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,v=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,o=e?Symbol.for("react.async_mode"):60111,t=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,c=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,O=e?Symbol.for("react.fundamental"):60117,P=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function L(y){return typeof y=="string"||typeof y=="function"||y===s||y===t||y===a||y===v||y===c||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===b||y.$$typeof===f||y.$$typeof===i||y.$$typeof===l||y.$$typeof===O||y.$$typeof===P||y.$$typeof===B||y.$$typeof===E)}function D(y){if(typeof y=="object"&&y!==null){var G=y.$$typeof;switch(G){case u:var ne=y.type;switch(ne){case o:case t:case s:case a:case v:case c:return ne;default:var Oe=ne&&ne.$$typeof;switch(Oe){case i:case l:case g:case b:case f:return Oe;default:return G}}case n:return G}}}var m=o,$=t,Y=i,W=f,X=u,J=l,Q=s,F=g,U=b,q=n,H=a,I=v,V=c,K=!1;function Z(y){return K||(K=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),d(y)||D(y)===o}function d(y){return D(y)===t}function r(y){return D(y)===i}function p(y){return D(y)===f}function _(y){return typeof y=="object"&&y!==null&&y.$$typeof===u}function T(y){return D(y)===l}function S(y){return D(y)===s}function w(y){return D(y)===g}function R(y){return D(y)===b}function C(y){return D(y)===n}function A(y){return D(y)===a}function x(y){return D(y)===v}function z(y){return D(y)===c}j.AsyncMode=m,j.ConcurrentMode=$,j.ContextConsumer=Y,j.ContextProvider=W,j.Element=X,j.ForwardRef=J,j.Fragment=Q,j.Lazy=F,j.Memo=U,j.Portal=q,j.Profiler=H,j.StrictMode=I,j.Suspense=V,j.isAsyncMode=Z,j.isConcurrentMode=d,j.isContextConsumer=r,j.isContextProvider=p,j.isElement=_,j.isForwardRef=T,j.isFragment=S,j.isLazy=w,j.isMemo=R,j.isPortal=C,j.isProfiler=A,j.isStrictMode=x,j.isSuspense=z,j.isValidElementType=L,j.typeOf=D})()),j}var je;function Ze(){return je||(je=1,process.env.NODE_ENV==="production"?ie.exports=vr():ie.exports=dr()),ie.exports}/*
36
+ */var nt;function Zt(){return nt||(nt=1,process.env.NODE_ENV!=="production"&&(function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,o=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,a=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,S=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,_=r?Symbol.for("react.block"):60121,P=r?Symbol.for("react.fundamental"):60117,k=r?Symbol.for("react.responder"):60118,N=r?Symbol.for("react.scope"):60119;function z(C){return typeof C=="string"||typeof C=="function"||C===n||C===l||C===o||C===s||C===f||C===g||typeof C=="object"&&C!==null&&(C.$$typeof===y||C.$$typeof===S||C.$$typeof===i||C.$$typeof===a||C.$$typeof===h||C.$$typeof===P||C.$$typeof===k||C.$$typeof===N||C.$$typeof===_)}function M(C){if(typeof C=="object"&&C!==null){var ae=C.$$typeof;switch(ae){case e:var ye=C.type;switch(ye){case c:case l:case n:case o:case s:case f:return ye;default:var Ke=ye&&ye.$$typeof;switch(Ke){case a:case h:case y:case S:case i:return Ke;default:return ae}}case t:return ae}}}var b=c,F=l,X=a,ne=i,se=e,ee=h,B=n,J=y,te=S,G=t,K=o,q=s,V=f,ce=!1;function le(C){return ce||(ce=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),p(C)||M(C)===c}function p(C){return M(C)===l}function u(C){return M(C)===a}function w(C){return M(C)===i}function T(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function x(C){return M(C)===h}function D(C){return M(C)===n}function I(C){return M(C)===y}function m(C){return M(C)===S}function E(C){return M(C)===t}function R(C){return M(C)===o}function j(C){return M(C)===s}function Q(C){return M(C)===f}L.AsyncMode=b,L.ConcurrentMode=F,L.ContextConsumer=X,L.ContextProvider=ne,L.Element=se,L.ForwardRef=ee,L.Fragment=B,L.Lazy=J,L.Memo=te,L.Portal=G,L.Profiler=K,L.StrictMode=q,L.Suspense=V,L.isAsyncMode=le,L.isConcurrentMode=p,L.isContextConsumer=u,L.isContextProvider=w,L.isElement=T,L.isForwardRef=x,L.isFragment=D,L.isLazy=I,L.isMemo=m,L.isPortal=E,L.isProfiler=R,L.isStrictMode=j,L.isSuspense=Q,L.isValidElementType=z,L.typeOf=M})()),L}var ot;function Nt(){return ot||(ot=1,process.env.NODE_ENV==="production"?Se.exports=Kt():Se.exports=Zt()),Se.exports}/*
37
37
  object-assign
38
38
  (c) Sindre Sorhus
39
39
  @license MIT
40
- */var le,De;function hr(){if(De)return le;De=1;var e=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function v(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var f={},i=0;i<10;i++)f["_"+String.fromCharCode(i)]=i;var o=Object.getOwnPropertyNames(f).map(function(l){return f[l]});if(o.join("")!=="0123456789")return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach(function(l){t[l]=l}),Object.keys(Object.assign({},t)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return le=v()?Object.assign:function(a,f){for(var i,o=s(a),t,l=1;l<arguments.length;l++){i=Object(arguments[l]);for(var c in i)u.call(i,c)&&(o[c]=i[c]);if(e){t=e(i);for(var h=0;h<t.length;h++)n.call(i,t[h])&&(o[t[h]]=i[t[h]])}}return o},le}var ce,Le;function we(){if(Le)return ce;Le=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ce=e,ce}var ve,Be;function er(){return Be||(Be=1,ve=Function.call.bind(Object.prototype.hasOwnProperty)),ve}var de,ke;function pr(){if(ke)return de;ke=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var u=we(),n={},s=er();e=function(a){var f="Warning: "+a;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}}}function v(a,f,i,o,t){if(process.env.NODE_ENV!=="production"){for(var l in a)if(s(a,l)){var c;try{if(typeof a[l]!="function"){var h=Error((o||"React class")+": "+i+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=a[l](f,l,o,i,null,u)}catch(g){c=g}if(c&&!(c instanceof Error)&&e((o||"React class")+": type specification of "+i+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var b=t?t():"";e("Failed "+i+" type: "+c.message+(b??""))}}}}return v.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},de=v,de}var he,Ie;function mr(){if(Ie)return he;Ie=1;var e=Ze(),u=hr(),n=we(),s=er(),v=pr(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}});function f(){return null}return he=function(i,o){var t=typeof Symbol=="function"&&Symbol.iterator,l="@@iterator";function c(d){var r=d&&(t&&d[t]||d[l]);if(typeof r=="function")return r}var h="<<anonymous>>",b={array:P("array"),bigint:P("bigint"),bool:P("boolean"),func:P("function"),number:P("number"),object:P("object"),string:P("string"),symbol:P("symbol"),any:B(),arrayOf:L,element:D(),elementType:m(),instanceOf:$,node:J(),objectOf:W,oneOf:Y,oneOfType:X,shape:F,exact:U};function g(d,r){return d===r?d!==0||1/d===1/r:d!==d&&r!==r}function E(d,r){this.message=d,this.data=r&&typeof r=="object"?r:{},this.stack=""}E.prototype=Error.prototype;function O(d){if(process.env.NODE_ENV!=="production")var r={},p=0;function _(S,w,R,C,A,x,z){if(C=C||h,x=x||R,z!==n){if(o){var y=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 y.name="Invariant Violation",y}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var G=C+":"+R;!r[G]&&p<3&&(a("You are manually calling a React.PropTypes validation function for the `"+x+"` prop on `"+C+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),r[G]=!0,p++)}}return w[R]==null?S?w[R]===null?new E("The "+A+" `"+x+"` is marked as required "+("in `"+C+"`, but its value is `null`.")):new E("The "+A+" `"+x+"` is marked as required in "+("`"+C+"`, but its value is `undefined`.")):null:d(w,R,C,A,x)}var T=_.bind(null,!1);return T.isRequired=_.bind(null,!0),T}function P(d){function r(p,_,T,S,w,R){var C=p[_],A=I(C);if(A!==d){var x=V(C);return new E("Invalid "+S+" `"+w+"` of type "+("`"+x+"` supplied to `"+T+"`, expected ")+("`"+d+"`."),{expectedType:d})}return null}return O(r)}function B(){return O(f)}function L(d){function r(p,_,T,S,w){if(typeof d!="function")return new E("Property `"+w+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var R=p[_];if(!Array.isArray(R)){var C=I(R);return new E("Invalid "+S+" `"+w+"` of type "+("`"+C+"` supplied to `"+T+"`, expected an array."))}for(var A=0;A<R.length;A++){var x=d(R,A,T,S,w+"["+A+"]",n);if(x instanceof Error)return x}return null}return O(r)}function D(){function d(r,p,_,T,S){var w=r[p];if(!i(w)){var R=I(w);return new E("Invalid "+T+" `"+S+"` of type "+("`"+R+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return O(d)}function m(){function d(r,p,_,T,S){var w=r[p];if(!e.isValidElementType(w)){var R=I(w);return new E("Invalid "+T+" `"+S+"` of type "+("`"+R+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return O(d)}function $(d){function r(p,_,T,S,w){if(!(p[_]instanceof d)){var R=d.name||h,C=Z(p[_]);return new E("Invalid "+S+" `"+w+"` of type "+("`"+C+"` supplied to `"+T+"`, expected ")+("instance of `"+R+"`."))}return null}return O(r)}function Y(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),f;function r(p,_,T,S,w){for(var R=p[_],C=0;C<d.length;C++)if(g(R,d[C]))return null;var A=JSON.stringify(d,function(z,y){var G=V(y);return G==="symbol"?String(y):y});return new E("Invalid "+S+" `"+w+"` of value `"+String(R)+"` "+("supplied to `"+T+"`, expected one of "+A+"."))}return O(r)}function W(d){function r(p,_,T,S,w){if(typeof d!="function")return new E("Property `"+w+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var R=p[_],C=I(R);if(C!=="object")return new E("Invalid "+S+" `"+w+"` of type "+("`"+C+"` supplied to `"+T+"`, expected an object."));for(var A in R)if(s(R,A)){var x=d(R,A,T,S,w+"."+A,n);if(x instanceof Error)return x}return null}return O(r)}function X(d){if(!Array.isArray(d))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),f;for(var r=0;r<d.length;r++){var p=d[r];if(typeof p!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+K(p)+" at index "+r+"."),f}function _(T,S,w,R,C){for(var A=[],x=0;x<d.length;x++){var z=d[x],y=z(T,S,w,R,C,n);if(y==null)return null;y.data&&s(y.data,"expectedType")&&A.push(y.data.expectedType)}var G=A.length>0?", expected one of type ["+A.join(", ")+"]":"";return new E("Invalid "+R+" `"+C+"` supplied to "+("`"+w+"`"+G+"."))}return O(_)}function J(){function d(r,p,_,T,S){return q(r[p])?null:new E("Invalid "+T+" `"+S+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return O(d)}function Q(d,r,p,_,T){return new E((d||"React class")+": "+r+" type `"+p+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+T+"`.")}function F(d){function r(p,_,T,S,w){var R=p[_],C=I(R);if(C!=="object")return new E("Invalid "+S+" `"+w+"` of type `"+C+"` "+("supplied to `"+T+"`, expected `object`."));for(var A in d){var x=d[A];if(typeof x!="function")return Q(T,S,w,A,V(x));var z=x(R,A,T,S,w+"."+A,n);if(z)return z}return null}return O(r)}function U(d){function r(p,_,T,S,w){var R=p[_],C=I(R);if(C!=="object")return new E("Invalid "+S+" `"+w+"` of type `"+C+"` "+("supplied to `"+T+"`, expected `object`."));var A=u({},p[_],d);for(var x in A){var z=d[x];if(s(d,x)&&typeof z!="function")return Q(T,S,w,x,V(z));if(!z)return new E("Invalid "+S+" `"+w+"` key `"+x+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(p[_],null," ")+`
41
- Valid keys: `+JSON.stringify(Object.keys(d),null," "));var y=z(R,x,T,S,w+"."+x,n);if(y)return y}return null}return O(r)}function q(d){switch(typeof d){case"number":case"string":case"undefined":return!0;case"boolean":return!d;case"object":if(Array.isArray(d))return d.every(q);if(d===null||i(d))return!0;var r=c(d);if(r){var p=r.call(d),_;if(r!==d.entries){for(;!(_=p.next()).done;)if(!q(_.value))return!1}else for(;!(_=p.next()).done;){var T=_.value;if(T&&!q(T[1]))return!1}}else return!1;return!0;default:return!1}}function H(d,r){return d==="symbol"?!0:r?r["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&r instanceof Symbol:!1}function I(d){var r=typeof d;return Array.isArray(d)?"array":d instanceof RegExp?"object":H(r,d)?"symbol":r}function V(d){if(typeof d>"u"||d===null)return""+d;var r=I(d);if(r==="object"){if(d instanceof Date)return"date";if(d instanceof RegExp)return"regexp"}return r}function K(d){var r=V(d);switch(r){case"array":case"object":return"an "+r;case"boolean":case"date":case"regexp":return"a "+r;default:return r}}function Z(d){return!d.constructor||!d.constructor.name?h:d.constructor.name}return b.checkPropTypes=v,b.resetWarningCache=v.resetWarningCache,b.PropTypes=b,b},he}var pe,Ne;function gr(){if(Ne)return pe;Ne=1;var e=we();function u(){}function n(){}return n.resetWarningCache=u,pe=function(){function s(f,i,o,t,l,c){if(c!==e){var h=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 h.name="Invariant Violation",h}}s.isRequired=s;function v(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:v,element:s,elementType:s,instanceOf:v,node:s,objectOf:v,oneOf:v,oneOfType:v,shape:v,exact:v,checkPropTypes:n,resetWarningCache:u};return a.PropTypes=a,a},pe}var $e;function rr(){if($e)return oe.exports;if($e=1,process.env.NODE_ENV!=="production"){var e=Ze(),u=!0;oe.exports=mr()(e.isElement,u)}else oe.exports=gr()();return oe.exports}var me,ze;function tr(){return ze||(ze=1,me={L:1,M:0,Q:3,H:2}),me}var ge,Ye;function nr(){return Ye||(Ye=1,ge={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),ge}var ye,qe;function yr(){if(qe)return ye;qe=1;var e=nr();function u(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return u.prototype={getLength:function(n){return this.data.length},write:function(n){for(var s=0;s<this.data.length;s++)n.put(this.data.charCodeAt(s),8)}},ye=u,ye}var be,Fe;function br(){if(Fe)return be;Fe=1;var e=tr();function u(n,s){this.totalCount=n,this.dataCount=s}return u.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],u.getRSBlocks=function(n,s){var v=u.getRsBlockTable(n,s);if(v==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+s);for(var a=v.length/3,f=new Array,i=0;i<a;i++)for(var o=v[i*3+0],t=v[i*3+1],l=v[i*3+2],c=0;c<o;c++)f.push(new u(t,l));return f},u.getRsBlockTable=function(n,s){switch(s){case e.L:return u.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return u.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return u.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return u.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},be=u,be}var Ee,He;function Er(){if(He)return Ee;He=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(u){var n=Math.floor(u/8);return(this.buffer[n]>>>7-u%8&1)==1},put:function(u,n){for(var s=0;s<n;s++)this.putBit((u>>>n-s-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(u){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),u&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Ee=e,Ee}var Te,We;function ar(){if(We)return Te;We=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},u=0;u<8;u++)e.EXP_TABLE[u]=1<<u;for(var u=8;u<256;u++)e.EXP_TABLE[u]=e.EXP_TABLE[u-4]^e.EXP_TABLE[u-5]^e.EXP_TABLE[u-6]^e.EXP_TABLE[u-8];for(var u=0;u<255;u++)e.LOG_TABLE[e.EXP_TABLE[u]]=u;return Te=e,Te}var _e,Qe;function or(){if(Qe)return _e;Qe=1;var e=ar();function u(n,s){if(n.length==null)throw new Error(n.length+"/"+s);for(var v=0;v<n.length&&n[v]==0;)v++;this.num=new Array(n.length-v+s);for(var a=0;a<n.length-v;a++)this.num[a]=n[a+v]}return u.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var s=new Array(this.getLength()+n.getLength()-1),v=0;v<this.getLength();v++)for(var a=0;a<n.getLength();a++)s[v+a]^=e.gexp(e.glog(this.get(v))+e.glog(n.get(a)));return new u(s,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var s=e.glog(this.get(0))-e.glog(n.get(0)),v=new Array(this.getLength()),a=0;a<this.getLength();a++)v[a]=this.get(a);for(var a=0;a<n.getLength();a++)v[a]^=e.gexp(e.glog(n.get(a))+s);return new u(v,0).mod(n)}},_e=u,_e}var Re,Ue;function Tr(){if(Ue)return Re;Ue=1;var e=nr(),u=or(),n=ar(),s={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},v={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(a){for(var f=a<<10;v.getBCHDigit(f)-v.getBCHDigit(v.G15)>=0;)f^=v.G15<<v.getBCHDigit(f)-v.getBCHDigit(v.G15);return(a<<10|f)^v.G15_MASK},getBCHTypeNumber:function(a){for(var f=a<<12;v.getBCHDigit(f)-v.getBCHDigit(v.G18)>=0;)f^=v.G18<<v.getBCHDigit(f)-v.getBCHDigit(v.G18);return a<<12|f},getBCHDigit:function(a){for(var f=0;a!=0;)f++,a>>>=1;return f},getPatternPosition:function(a){return v.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,f,i){switch(a){case s.PATTERN000:return(f+i)%2==0;case s.PATTERN001:return f%2==0;case s.PATTERN010:return i%3==0;case s.PATTERN011:return(f+i)%3==0;case s.PATTERN100:return(Math.floor(f/2)+Math.floor(i/3))%2==0;case s.PATTERN101:return f*i%2+f*i%3==0;case s.PATTERN110:return(f*i%2+f*i%3)%2==0;case s.PATTERN111:return(f*i%3+(f+i)%2)%2==0;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var f=new u([1],0),i=0;i<a;i++)f=f.multiply(new u([1,n.gexp(i)],0));return f},getLengthInBits:function(a,f){if(1<=f&&f<10)switch(a){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(f<27)switch(a){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else if(f<41)switch(a){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}else throw new Error("type:"+f)},getLostPoint:function(a){for(var f=a.getModuleCount(),i=0,o=0;o<f;o++)for(var t=0;t<f;t++){for(var l=0,c=a.isDark(o,t),h=-1;h<=1;h++)if(!(o+h<0||f<=o+h))for(var b=-1;b<=1;b++)t+b<0||f<=t+b||h==0&&b==0||c==a.isDark(o+h,t+b)&&l++;l>5&&(i+=3+l-5)}for(var o=0;o<f-1;o++)for(var t=0;t<f-1;t++){var g=0;a.isDark(o,t)&&g++,a.isDark(o+1,t)&&g++,a.isDark(o,t+1)&&g++,a.isDark(o+1,t+1)&&g++,(g==0||g==4)&&(i+=3)}for(var o=0;o<f;o++)for(var t=0;t<f-6;t++)a.isDark(o,t)&&!a.isDark(o,t+1)&&a.isDark(o,t+2)&&a.isDark(o,t+3)&&a.isDark(o,t+4)&&!a.isDark(o,t+5)&&a.isDark(o,t+6)&&(i+=40);for(var t=0;t<f;t++)for(var o=0;o<f-6;o++)a.isDark(o,t)&&!a.isDark(o+1,t)&&a.isDark(o+2,t)&&a.isDark(o+3,t)&&a.isDark(o+4,t)&&!a.isDark(o+5,t)&&a.isDark(o+6,t)&&(i+=40);for(var E=0,t=0;t<f;t++)for(var o=0;o<f;o++)a.isDark(o,t)&&E++;var O=Math.abs(100*E/f/f-50)/5;return i+=O*10,i}};return Re=v,Re}var Pe,Ve;function _r(){if(Ve)return Pe;Ve=1;var e=yr(),u=br(),n=Er(),s=Tr(),v=or();function a(i,o){this.typeNumber=i,this.errorCorrectLevel=o,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var f=a.prototype;return f.addData=function(i){var o=new e(i);this.dataList.push(o),this.dataCache=null},f.isDark=function(i,o){if(i<0||this.moduleCount<=i||o<0||this.moduleCount<=o)throw new Error(i+","+o);return this.modules[i][o]},f.getModuleCount=function(){return this.moduleCount},f.make=function(){if(this.typeNumber<1){var i=1;for(i=1;i<40;i++){for(var o=u.getRSBlocks(i,this.errorCorrectLevel),t=new n,l=0,c=0;c<o.length;c++)l+=o[c].dataCount;for(var c=0;c<this.dataList.length;c++){var h=this.dataList[c];t.put(h.mode,4),t.put(h.getLength(),s.getLengthInBits(h.mode,i)),h.write(t)}if(t.getLengthInBits()<=l*8)break}this.typeNumber=i}this.makeImpl(!1,this.getBestMaskPattern())},f.makeImpl=function(i,o){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var t=0;t<this.moduleCount;t++){this.modules[t]=new Array(this.moduleCount);for(var l=0;l<this.moduleCount;l++)this.modules[t][l]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(i,o),this.typeNumber>=7&&this.setupTypeNumber(i),this.dataCache==null&&(this.dataCache=a.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,o)},f.setupPositionProbePattern=function(i,o){for(var t=-1;t<=7;t++)if(!(i+t<=-1||this.moduleCount<=i+t))for(var l=-1;l<=7;l++)o+l<=-1||this.moduleCount<=o+l||(0<=t&&t<=6&&(l==0||l==6)||0<=l&&l<=6&&(t==0||t==6)||2<=t&&t<=4&&2<=l&&l<=4?this.modules[i+t][o+l]=!0:this.modules[i+t][o+l]=!1)},f.getBestMaskPattern=function(){for(var i=0,o=0,t=0;t<8;t++){this.makeImpl(!0,t);var l=s.getLostPoint(this);(t==0||i>l)&&(i=l,o=t)}return o},f.createMovieClip=function(i,o,t){var l=i.createEmptyMovieClip(o,t),c=1;this.make();for(var h=0;h<this.modules.length;h++)for(var b=h*c,g=0;g<this.modules[h].length;g++){var E=g*c,O=this.modules[h][g];O&&(l.beginFill(0,100),l.moveTo(E,b),l.lineTo(E+c,b),l.lineTo(E+c,b+c),l.lineTo(E,b+c),l.endFill())}return l},f.setupTimingPattern=function(){for(var i=8;i<this.moduleCount-8;i++)this.modules[i][6]==null&&(this.modules[i][6]=i%2==0);for(var o=8;o<this.moduleCount-8;o++)this.modules[6][o]==null&&(this.modules[6][o]=o%2==0)},f.setupPositionAdjustPattern=function(){for(var i=s.getPatternPosition(this.typeNumber),o=0;o<i.length;o++)for(var t=0;t<i.length;t++){var l=i[o],c=i[t];if(this.modules[l][c]==null)for(var h=-2;h<=2;h++)for(var b=-2;b<=2;b++)h==-2||h==2||b==-2||b==2||h==0&&b==0?this.modules[l+h][c+b]=!0:this.modules[l+h][c+b]=!1}},f.setupTypeNumber=function(i){for(var o=s.getBCHTypeNumber(this.typeNumber),t=0;t<18;t++){var l=!i&&(o>>t&1)==1;this.modules[Math.floor(t/3)][t%3+this.moduleCount-8-3]=l}for(var t=0;t<18;t++){var l=!i&&(o>>t&1)==1;this.modules[t%3+this.moduleCount-8-3][Math.floor(t/3)]=l}},f.setupTypeInfo=function(i,o){for(var t=this.errorCorrectLevel<<3|o,l=s.getBCHTypeInfo(t),c=0;c<15;c++){var h=!i&&(l>>c&1)==1;c<6?this.modules[c][8]=h:c<8?this.modules[c+1][8]=h:this.modules[this.moduleCount-15+c][8]=h}for(var c=0;c<15;c++){var h=!i&&(l>>c&1)==1;c<8?this.modules[8][this.moduleCount-c-1]=h:c<9?this.modules[8][15-c-1+1]=h:this.modules[8][15-c-1]=h}this.modules[this.moduleCount-8][8]=!i},f.mapData=function(i,o){for(var t=-1,l=this.moduleCount-1,c=7,h=0,b=this.moduleCount-1;b>0;b-=2)for(b==6&&b--;;){for(var g=0;g<2;g++)if(this.modules[l][b-g]==null){var E=!1;h<i.length&&(E=(i[h]>>>c&1)==1);var O=s.getMask(o,l,b-g);O&&(E=!E),this.modules[l][b-g]=E,c--,c==-1&&(h++,c=7)}if(l+=t,l<0||this.moduleCount<=l){l-=t,t=-t;break}}},a.PAD0=236,a.PAD1=17,a.createData=function(i,o,t){for(var l=u.getRSBlocks(i,o),c=new n,h=0;h<t.length;h++){var b=t[h];c.put(b.mode,4),c.put(b.getLength(),s.getLengthInBits(b.mode,i)),b.write(c)}for(var g=0,h=0;h<l.length;h++)g+=l[h].dataCount;if(c.getLengthInBits()>g*8)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+g*8+")");for(c.getLengthInBits()+4<=g*8&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=g*8||(c.put(a.PAD0,8),c.getLengthInBits()>=g*8));)c.put(a.PAD1,8);return a.createBytes(c,l)},a.createBytes=function(i,o){for(var t=0,l=0,c=0,h=new Array(o.length),b=new Array(o.length),g=0;g<o.length;g++){var E=o[g].dataCount,O=o[g].totalCount-E;l=Math.max(l,E),c=Math.max(c,O),h[g]=new Array(E);for(var P=0;P<h[g].length;P++)h[g][P]=255&i.buffer[P+t];t+=E;var B=s.getErrorCorrectPolynomial(O),L=new v(h[g],B.getLength()-1),D=L.mod(B);b[g]=new Array(B.getLength()-1);for(var P=0;P<b[g].length;P++){var m=P+D.getLength()-b[g].length;b[g][P]=m>=0?D.get(m):0}}for(var $=0,P=0;P<o.length;P++)$+=o[P].totalCount;for(var Y=new Array($),W=0,P=0;P<l;P++)for(var g=0;g<o.length;g++)P<h[g].length&&(Y[W++]=h[g][P]);for(var P=0;P<c;P++)for(var g=0;g<o.length;g++)P<b[g].length&&(Y[W++]=b[g][P]);return Y},Pe=a,Pe}var ue={},Ge;function Rr(){if(Ge)return ue;Ge=1,Object.defineProperty(ue,"__esModule",{value:!0});var e=Object.assign||function(t){for(var l=1;l<arguments.length;l++){var c=arguments[l];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(t[h]=c[h])}return t},u=rr(),n=a(u),s=N,v=a(s);function a(t){return t&&t.__esModule?t:{default:t}}function f(t,l){var c={};for(var h in t)l.indexOf(h)>=0||Object.prototype.hasOwnProperty.call(t,h)&&(c[h]=t[h]);return c}var i={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},o=(0,s.forwardRef)(function(t,l){var c=t.bgColor,h=t.bgD,b=t.fgD,g=t.fgColor,E=t.size,O=t.title,P=t.viewBoxSize,B=t.xmlns,L=B===void 0?"http://www.w3.org/2000/svg":B,D=f(t,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return v.default.createElement("svg",e({},D,{height:E,ref:l,viewBox:"0 0 "+P+" "+P,width:E,xmlns:L}),O?v.default.createElement("title",null,O):null,v.default.createElement("path",{d:h,fill:c}),v.default.createElement("path",{d:b,fill:g}))});return o.displayName="QRCodeSvg",o.propTypes=i,ue.default=o,ue}var Xe;function Pr(){if(Xe)return ee;Xe=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.QRCode=void 0;var e=Object.assign||function(E){for(var O=1;O<arguments.length;O++){var P=arguments[O];for(var B in P)Object.prototype.hasOwnProperty.call(P,B)&&(E[B]=P[B])}return E},u=rr(),n=c(u),s=tr(),v=c(s),a=_r(),f=c(a),i=N,o=c(i),t=Rr(),l=c(t);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,O){var P={};for(var B in E)O.indexOf(B)>=0||Object.prototype.hasOwnProperty.call(E,B)&&(P[B]=E[B]);return P}var b={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},g=(0,i.forwardRef)(function(E,O){var P=E.bgColor,B=P===void 0?"#FFFFFF":P,L=E.fgColor,D=L===void 0?"#000000":L,m=E.level,$=m===void 0?"L":m,Y=E.size,W=Y===void 0?256:Y,X=E.value,J=h(E,["bgColor","fgColor","level","size","value"]),Q=new f.default(-1,v.default[$]);Q.addData(X),Q.make();var F=Q.modules;return o.default.createElement(l.default,e({},J,{bgColor:B,bgD:F.map(function(U,q){return U.map(function(H,I){return H?"":"M "+I+" "+q+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:D,fgD:F.map(function(U,q){return U.map(function(H,I){return H?"M "+I+" "+q+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:O,size:W,viewBoxSize:F.length}))});return ee.QRCode=g,g.displayName="QRCode",g.propTypes=b,ee.default=g,ee}var wr=Pr();const Or=sr(wr);var ir={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Je=N.createContext&&N.createContext(ir),Cr=["attr","size","title"];function Sr(e,u){if(e==null)return{};var n=xr(e,u),s,v;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(v=0;v<a.length;v++)s=a[v],!(u.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function xr(e,u){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(u.indexOf(s)>=0)continue;n[s]=e[s]}return n}function se(){return se=Object.assign?Object.assign.bind():function(e){for(var u=1;u<arguments.length;u++){var n=arguments[u];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},se.apply(this,arguments)}function Ke(e,u){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);u&&(s=s.filter(function(v){return Object.getOwnPropertyDescriptor(e,v).enumerable})),n.push.apply(n,s)}return n}function fe(e){for(var u=1;u<arguments.length;u++){var n=arguments[u]!=null?arguments[u]:{};u%2?Ke(Object(n),!0).forEach(function(s){Ar(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Ar(e,u,n){return u=Mr(u),u in e?Object.defineProperty(e,u,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[u]=n,e}function Mr(e){var u=jr(e,"string");return typeof u=="symbol"?u:u+""}function jr(e,u){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,u);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(e)}function ur(e){return e&&e.map((u,n)=>N.createElement(u.tag,fe({key:n},u.attr),ur(u.child)))}function Dr(e){return u=>N.createElement(Lr,se({attr:fe({},e.attr)},u),ur(e.child))}function Lr(e){var u=n=>{var{attr:s,size:v,title:a}=e,f=Sr(e,Cr),i=v||n.size||"1em",o;return n.className&&(o=n.className),e.className&&(o=(o?o+" ":"")+e.className),N.createElement("svg",se({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,s,f,{className:o,style:fe(fe({color:e.color||n.color},n.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&N.createElement("title",null,a),e.children)};return Je!==void 0?N.createElement(Je.Consumer,null,n=>u(n)):u(ir)}function Br(e){return Dr({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM22 7h-2V4h-3V2h5v5zm0 15v-5h-2v3h-3v2h5zM2 22h5v-2H4v-3H2v5zM2 2v5h2V4h3V2H2z"},child:[]}]})(e)}const kr=({logoBackgroundCss:e="bg-gradient-to-br from-red-600 to-purple-500 rounded-xl flex items-center justify-center flex-col",logoCss:u="text-white",size:n="small"})=>{const[s,v]=N.useState("w-2 h-2"),[a,f]=N.useState("w-4 h-4");return N.useEffect(()=>{switch(n){case"small":f("w-2 h-2"),v("w-1 h-1");break;case"medium":f("w-6 h-6"),v("w-4 h-4");break;case"large":f("w-8 h-8"),v("w-6 h-6");break}return()=>{}},[n]),k.jsx("div",{className:"flex items-center space-x-2",children:k.jsx("div",{className:`${a} ${e}`,children:k.jsx(Br,{className:`${s} ${u}`})})})},Ir=({uploadUrl:e,header:u,showHeader:n=!1,showLogo:s=!0,size:v="large"})=>{const[a,f]=N.useState(160),[i,o]=N.useState("w-32 h-32 md:w-40 md:h-40"),[t,l]=N.useState("w-2 h-2");return N.useEffect(()=>{switch(v){case"small":o("w-16 h-16 md:w-20 md:h-20"),l("w-2 h-2"),f(200);break;case"medium":o("w-24 h-24 md:w-30 md:h-30"),l("w-4 h-4"),f(200);break;case"large":o("w-32 h-32 md:w-40 md:h-40"),l("w-6 h-6"),f(200);break}return()=>{}},[v]),k.jsx("section",{className:"mx-auto max-w-3xl p-6",children:k.jsxs("div",{className:"flex flex-col items-center text-center",children:[n&&k.jsx(k.Fragment,{children:k.jsx("header",{className:"mb-4",children:k.jsx("h1",{className:"text-xl font-semibold text-gray-900",children:u})})}),k.jsxs("div",{"aria-label":"QR Code for file upload",className:`bg-white p-2 rounded-2xl border-3 border-dashed ${i} flex
42
- border-gray-300 items-center justify-center transition-all duration-300 hover:shadow-lg hover:scale-105`,children:[k.jsxs("div",{className:"relative inline-block",children:[k.jsx(Or,{value:e,size:a,className:"w-full h-full"}),s&&k.jsx(k.Fragment,{children:k.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:k.jsx("div",{className:`bg-white ${t} rounded flex items-center justify-center`,children:k.jsx("span",{className:"text-xs font-bold",children:k.jsx(kr,{size:v})})})})})]}),k.jsxs("p",{className:"sr-only",children:["QR Code that allows uploads from ",e]})]})]})})};exports.QrCodeGenerator=Ir;
40
+ */var Ie,st;function er(){if(st)return Ie;st=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var c=Object.getOwnPropertyNames(i).map(function(h){return i[h]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(h){l[h]=h}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ie=s()?Object.assign:function(o,i){for(var a,c=n(o),l,h=1;h<arguments.length;h++){a=Object(arguments[h]);for(var f in a)e.call(a,f)&&(c[f]=a[f]);if(r){l=r(a);for(var g=0;g<l.length;g++)t.call(a,l[g])&&(c[l[g]]=a[l[g]])}}return c},Ie}var Ae,it;function Ye(){if(it)return Ae;it=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ae=r,Ae}var Oe,at;function $t(){return at||(at=1,Oe=Function.call.bind(Object.prototype.hasOwnProperty)),Oe}var je,ct;function tr(){if(ct)return je;ct=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=Ye(),t={},n=$t();r=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,a,c,l){if(process.env.NODE_ENV!=="production"){for(var h in o)if(n(o,h)){var f;try{if(typeof o[h]!="function"){var g=Error((c||"React class")+": "+a+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}f=o[h](i,h,c,a,null,e)}catch(y){f=y}if(f&&!(f instanceof Error)&&r((c||"React class")+": type specification of "+a+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var S=l?l():"";r("Failed "+a+" type: "+f.message+(S??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},je=s,je}var De,lt;function rr(){if(lt)return De;lt=1;var r=Nt(),e=er(),t=Ye(),n=$t(),s=tr(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var c="Warning: "+a;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return De=function(a,c){var l=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(p){var u=p&&(l&&p[l]||p[h]);if(typeof u=="function")return u}var g="<<anonymous>>",S={array:k("array"),bigint:k("bigint"),bool:k("boolean"),func:k("function"),number:k("number"),object:k("object"),string:k("string"),symbol:k("symbol"),any:N(),arrayOf:z,element:M(),elementType:b(),instanceOf:F,node:ee(),objectOf:ne,oneOf:X,oneOfType:se,shape:J,exact:te};function y(p,u){return p===u?p!==0||1/p===1/u:p!==p&&u!==u}function _(p,u){this.message=p,this.data=u&&typeof u=="object"?u:{},this.stack=""}_.prototype=Error.prototype;function P(p){if(process.env.NODE_ENV!=="production")var u={},w=0;function T(D,I,m,E,R,j,Q){if(E=E||g,j=j||m,Q!==t){if(c){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=E+":"+m;!u[ae]&&w<3&&(o("You are manually calling a React.PropTypes validation function for the `"+j+"` prop on `"+E+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),u[ae]=!0,w++)}}return I[m]==null?D?I[m]===null?new _("The "+R+" `"+j+"` is marked as required "+("in `"+E+"`, but its value is `null`.")):new _("The "+R+" `"+j+"` is marked as required in "+("`"+E+"`, but its value is `undefined`.")):null:p(I,m,E,R,j)}var x=T.bind(null,!1);return x.isRequired=T.bind(null,!0),x}function k(p){function u(w,T,x,D,I,m){var E=w[T],R=q(E);if(R!==p){var j=V(E);return new _("Invalid "+D+" `"+I+"` of type "+("`"+j+"` supplied to `"+x+"`, expected ")+("`"+p+"`."),{expectedType:p})}return null}return P(u)}function N(){return P(i)}function z(p){function u(w,T,x,D,I){if(typeof p!="function")return new _("Property `"+I+"` of component `"+x+"` has invalid PropType notation inside arrayOf.");var m=w[T];if(!Array.isArray(m)){var E=q(m);return new _("Invalid "+D+" `"+I+"` of type "+("`"+E+"` supplied to `"+x+"`, expected an array."))}for(var R=0;R<m.length;R++){var j=p(m,R,x,D,I+"["+R+"]",t);if(j instanceof Error)return j}return null}return P(u)}function M(){function p(u,w,T,x,D){var I=u[w];if(!a(I)){var m=q(I);return new _("Invalid "+x+" `"+D+"` of type "+("`"+m+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return P(p)}function b(){function p(u,w,T,x,D){var I=u[w];if(!r.isValidElementType(I)){var m=q(I);return new _("Invalid "+x+" `"+D+"` of type "+("`"+m+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return P(p)}function F(p){function u(w,T,x,D,I){if(!(w[T]instanceof p)){var m=p.name||g,E=le(w[T]);return new _("Invalid "+D+" `"+I+"` of type "+("`"+E+"` supplied to `"+x+"`, expected ")+("instance of `"+m+"`."))}return null}return P(u)}function X(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function u(w,T,x,D,I){for(var m=w[T],E=0;E<p.length;E++)if(y(m,p[E]))return null;var R=JSON.stringify(p,function(Q,C){var ae=V(C);return ae==="symbol"?String(C):C});return new _("Invalid "+D+" `"+I+"` of value `"+String(m)+"` "+("supplied to `"+x+"`, expected one of "+R+"."))}return P(u)}function ne(p){function u(w,T,x,D,I){if(typeof p!="function")return new _("Property `"+I+"` of component `"+x+"` has invalid PropType notation inside objectOf.");var m=w[T],E=q(m);if(E!=="object")return new _("Invalid "+D+" `"+I+"` of type "+("`"+E+"` supplied to `"+x+"`, expected an object."));for(var R in m)if(n(m,R)){var j=p(m,R,x,D,I+"."+R,t);if(j instanceof Error)return j}return null}return P(u)}function se(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var u=0;u<p.length;u++){var w=p[u];if(typeof w!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ce(w)+" at index "+u+"."),i}function T(x,D,I,m,E){for(var R=[],j=0;j<p.length;j++){var Q=p[j],C=Q(x,D,I,m,E,t);if(C==null)return null;C.data&&n(C.data,"expectedType")&&R.push(C.data.expectedType)}var ae=R.length>0?", expected one of type ["+R.join(", ")+"]":"";return new _("Invalid "+m+" `"+E+"` supplied to "+("`"+I+"`"+ae+"."))}return P(T)}function ee(){function p(u,w,T,x,D){return G(u[w])?null:new _("Invalid "+x+" `"+D+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return P(p)}function B(p,u,w,T,x){return new _((p||"React class")+": "+u+" type `"+w+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+x+"`.")}function J(p){function u(w,T,x,D,I){var m=w[T],E=q(m);if(E!=="object")return new _("Invalid "+D+" `"+I+"` of type `"+E+"` "+("supplied to `"+x+"`, expected `object`."));for(var R in p){var j=p[R];if(typeof j!="function")return B(x,D,I,R,V(j));var Q=j(m,R,x,D,I+"."+R,t);if(Q)return Q}return null}return P(u)}function te(p){function u(w,T,x,D,I){var m=w[T],E=q(m);if(E!=="object")return new _("Invalid "+D+" `"+I+"` of type `"+E+"` "+("supplied to `"+x+"`, expected `object`."));var R=e({},w[T],p);for(var j in R){var Q=p[j];if(n(p,j)&&typeof Q!="function")return B(x,D,I,j,V(Q));if(!Q)return new _("Invalid "+D+" `"+I+"` key `"+j+"` supplied to `"+x+"`.\nBad object: "+JSON.stringify(w[T],null," ")+`
41
+ Valid keys: `+JSON.stringify(Object.keys(p),null," "));var C=Q(m,j,x,D,I+"."+j,t);if(C)return C}return null}return P(u)}function G(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(G);if(p===null||a(p))return!0;var u=f(p);if(u){var w=u.call(p),T;if(u!==p.entries){for(;!(T=w.next()).done;)if(!G(T.value))return!1}else for(;!(T=w.next()).done;){var x=T.value;if(x&&!G(x[1]))return!1}}else return!1;return!0;default:return!1}}function K(p,u){return p==="symbol"?!0:u?u["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&u instanceof Symbol:!1}function q(p){var u=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":K(u,p)?"symbol":u}function V(p){if(typeof p>"u"||p===null)return""+p;var u=q(p);if(u==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return u}function ce(p){var u=V(p);switch(u){case"array":case"object":return"an "+u;case"boolean":case"date":case"regexp":return"a "+u;default:return u}}function le(p){return!p.constructor||!p.constructor.name?g:p.constructor.name}return S.checkPropTypes=s,S.resetWarningCache=s.resetWarningCache,S.PropTypes=S,S},De}var Me,ut;function nr(){if(ut)return Me;ut=1;var r=Ye();function e(){}function t(){}return t.resetWarningCache=e,Me=function(){function n(i,a,c,l,h,f){if(f!==r){var g=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 g.name="Invariant Violation",g}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return o.PropTypes=o,o},Me}var ht;function Lt(){if(ht)return we.exports;if(ht=1,process.env.NODE_ENV!=="production"){var r=Nt(),e=!0;we.exports=rr()(r.isElement,e)}else we.exports=nr()();return we.exports}var Ne,ft;function Bt(){return ft||(ft=1,Ne={L:1,M:0,Q:3,H:2}),Ne}var $e,dt;function zt(){return dt||(dt=1,$e={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),$e}var Le,gt;function or(){if(gt)return Le;gt=1;var r=zt();function e(t){this.mode=r.MODE_8BIT_BYTE,this.data=t}return e.prototype={getLength:function(t){return this.data.length},write:function(t){for(var n=0;n<this.data.length;n++)t.put(this.data.charCodeAt(n),8)}},Le=e,Le}var Be,pt;function sr(){if(pt)return Be;pt=1;var r=Bt();function e(t,n){this.totalCount=t,this.dataCount=n}return e.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e.getRSBlocks=function(t,n){var s=e.getRsBlockTable(t,n);if(s==null)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+n);for(var o=s.length/3,i=new Array,a=0;a<o;a++)for(var c=s[a*3+0],l=s[a*3+1],h=s[a*3+2],f=0;f<c;f++)i.push(new e(l,h));return i},e.getRsBlockTable=function(t,n){switch(n){case r.L:return e.RS_BLOCK_TABLE[(t-1)*4+0];case r.M:return e.RS_BLOCK_TABLE[(t-1)*4+1];case r.Q:return e.RS_BLOCK_TABLE[(t-1)*4+2];case r.H:return e.RS_BLOCK_TABLE[(t-1)*4+3];default:return}},Be=e,Be}var ze,_t;function ir(){if(_t)return ze;_t=1;function r(){this.buffer=new Array,this.length=0}return r.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},ze=r,ze}var He,mt;function Ht(){if(mt)return He;mt=1;for(var r={glog:function(t){if(t<1)throw new Error("glog("+t+")");return r.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return r.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},e=0;e<8;e++)r.EXP_TABLE[e]=1<<e;for(var e=8;e<256;e++)r.EXP_TABLE[e]=r.EXP_TABLE[e-4]^r.EXP_TABLE[e-5]^r.EXP_TABLE[e-6]^r.EXP_TABLE[e-8];for(var e=0;e<255;e++)r.LOG_TABLE[r.EXP_TABLE[e]]=e;return He=r,He}var Ue,vt;function Ut(){if(vt)return Ue;vt=1;var r=Ht();function e(t,n){if(t.length==null)throw new Error(t.length+"/"+n);for(var s=0;s<t.length&&t[s]==0;)s++;this.num=new Array(t.length-s+n);for(var o=0;o<t.length-s;o++)this.num[o]=t[o+s]}return e.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var n=new Array(this.getLength()+t.getLength()-1),s=0;s<this.getLength();s++)for(var o=0;o<t.getLength();o++)n[s+o]^=r.gexp(r.glog(this.get(s))+r.glog(t.get(o)));return new e(n,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var n=r.glog(this.get(0))-r.glog(t.get(0)),s=new Array(this.getLength()),o=0;o<this.getLength();o++)s[o]=this.get(o);for(var o=0;o<t.getLength();o++)s[o]^=r.gexp(r.glog(t.get(o))+n);return new e(s,0).mod(t)}},Ue=e,Ue}var We,yt;function ar(){if(yt)return We;yt=1;var r=zt(),e=Ut(),t=Ht(),n={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(o){for(var i=o<<10;s.getBCHDigit(i)-s.getBCHDigit(s.G15)>=0;)i^=s.G15<<s.getBCHDigit(i)-s.getBCHDigit(s.G15);return(o<<10|i)^s.G15_MASK},getBCHTypeNumber:function(o){for(var i=o<<12;s.getBCHDigit(i)-s.getBCHDigit(s.G18)>=0;)i^=s.G18<<s.getBCHDigit(i)-s.getBCHDigit(s.G18);return o<<12|i},getBCHDigit:function(o){for(var i=0;o!=0;)i++,o>>>=1;return i},getPatternPosition:function(o){return s.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,i,a){switch(o){case n.PATTERN000:return(i+a)%2==0;case n.PATTERN001:return i%2==0;case n.PATTERN010:return a%3==0;case n.PATTERN011:return(i+a)%3==0;case n.PATTERN100:return(Math.floor(i/2)+Math.floor(a/3))%2==0;case n.PATTERN101:return i*a%2+i*a%3==0;case n.PATTERN110:return(i*a%2+i*a%3)%2==0;case n.PATTERN111:return(i*a%3+(i+a)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var i=new e([1],0),a=0;a<o;a++)i=i.multiply(new e([1,t.gexp(a)],0));return i},getLengthInBits:function(o,i){if(1<=i&&i<10)switch(o){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:return 8;case r.MODE_KANJI:return 8;default:throw new Error("mode:"+o)}else if(i<27)switch(o){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+o)}else if(i<41)switch(o){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+o)}else throw new Error("type:"+i)},getLostPoint:function(o){for(var i=o.getModuleCount(),a=0,c=0;c<i;c++)for(var l=0;l<i;l++){for(var h=0,f=o.isDark(c,l),g=-1;g<=1;g++)if(!(c+g<0||i<=c+g))for(var S=-1;S<=1;S++)l+S<0||i<=l+S||g==0&&S==0||f==o.isDark(c+g,l+S)&&h++;h>5&&(a+=3+h-5)}for(var c=0;c<i-1;c++)for(var l=0;l<i-1;l++){var y=0;o.isDark(c,l)&&y++,o.isDark(c+1,l)&&y++,o.isDark(c,l+1)&&y++,o.isDark(c+1,l+1)&&y++,(y==0||y==4)&&(a+=3)}for(var c=0;c<i;c++)for(var l=0;l<i-6;l++)o.isDark(c,l)&&!o.isDark(c,l+1)&&o.isDark(c,l+2)&&o.isDark(c,l+3)&&o.isDark(c,l+4)&&!o.isDark(c,l+5)&&o.isDark(c,l+6)&&(a+=40);for(var l=0;l<i;l++)for(var c=0;c<i-6;c++)o.isDark(c,l)&&!o.isDark(c+1,l)&&o.isDark(c+2,l)&&o.isDark(c+3,l)&&o.isDark(c+4,l)&&!o.isDark(c+5,l)&&o.isDark(c+6,l)&&(a+=40);for(var _=0,l=0;l<i;l++)for(var c=0;c<i;c++)o.isDark(c,l)&&_++;var P=Math.abs(100*_/i/i-50)/5;return a+=P*10,a}};return We=s,We}var Fe,bt;function cr(){if(bt)return Fe;bt=1;var r=or(),e=sr(),t=ir(),n=ar(),s=Ut();function o(a,c){this.typeNumber=a,this.errorCorrectLevel=c,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var i=o.prototype;return i.addData=function(a){var c=new r(a);this.dataList.push(c),this.dataCache=null},i.isDark=function(a,c){if(a<0||this.moduleCount<=a||c<0||this.moduleCount<=c)throw new Error(a+","+c);return this.modules[a][c]},i.getModuleCount=function(){return this.moduleCount},i.make=function(){if(this.typeNumber<1){var a=1;for(a=1;a<40;a++){for(var c=e.getRSBlocks(a,this.errorCorrectLevel),l=new t,h=0,f=0;f<c.length;f++)h+=c[f].dataCount;for(var f=0;f<this.dataList.length;f++){var g=this.dataList[f];l.put(g.mode,4),l.put(g.getLength(),n.getLengthInBits(g.mode,a)),g.write(l)}if(l.getLengthInBits()<=h*8)break}this.typeNumber=a}this.makeImpl(!1,this.getBestMaskPattern())},i.makeImpl=function(a,c){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var l=0;l<this.moduleCount;l++){this.modules[l]=new Array(this.moduleCount);for(var h=0;h<this.moduleCount;h++)this.modules[l][h]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(a,c),this.typeNumber>=7&&this.setupTypeNumber(a),this.dataCache==null&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},i.setupPositionProbePattern=function(a,c){for(var l=-1;l<=7;l++)if(!(a+l<=-1||this.moduleCount<=a+l))for(var h=-1;h<=7;h++)c+h<=-1||this.moduleCount<=c+h||(0<=l&&l<=6&&(h==0||h==6)||0<=h&&h<=6&&(l==0||l==6)||2<=l&&l<=4&&2<=h&&h<=4?this.modules[a+l][c+h]=!0:this.modules[a+l][c+h]=!1)},i.getBestMaskPattern=function(){for(var a=0,c=0,l=0;l<8;l++){this.makeImpl(!0,l);var h=n.getLostPoint(this);(l==0||a>h)&&(a=h,c=l)}return c},i.createMovieClip=function(a,c,l){var h=a.createEmptyMovieClip(c,l),f=1;this.make();for(var g=0;g<this.modules.length;g++)for(var S=g*f,y=0;y<this.modules[g].length;y++){var _=y*f,P=this.modules[g][y];P&&(h.beginFill(0,100),h.moveTo(_,S),h.lineTo(_+f,S),h.lineTo(_+f,S+f),h.lineTo(_,S+f),h.endFill())}return h},i.setupTimingPattern=function(){for(var a=8;a<this.moduleCount-8;a++)this.modules[a][6]==null&&(this.modules[a][6]=a%2==0);for(var c=8;c<this.moduleCount-8;c++)this.modules[6][c]==null&&(this.modules[6][c]=c%2==0)},i.setupPositionAdjustPattern=function(){for(var a=n.getPatternPosition(this.typeNumber),c=0;c<a.length;c++)for(var l=0;l<a.length;l++){var h=a[c],f=a[l];if(this.modules[h][f]==null)for(var g=-2;g<=2;g++)for(var S=-2;S<=2;S++)g==-2||g==2||S==-2||S==2||g==0&&S==0?this.modules[h+g][f+S]=!0:this.modules[h+g][f+S]=!1}},i.setupTypeNumber=function(a){for(var c=n.getBCHTypeNumber(this.typeNumber),l=0;l<18;l++){var h=!a&&(c>>l&1)==1;this.modules[Math.floor(l/3)][l%3+this.moduleCount-8-3]=h}for(var l=0;l<18;l++){var h=!a&&(c>>l&1)==1;this.modules[l%3+this.moduleCount-8-3][Math.floor(l/3)]=h}},i.setupTypeInfo=function(a,c){for(var l=this.errorCorrectLevel<<3|c,h=n.getBCHTypeInfo(l),f=0;f<15;f++){var g=!a&&(h>>f&1)==1;f<6?this.modules[f][8]=g:f<8?this.modules[f+1][8]=g:this.modules[this.moduleCount-15+f][8]=g}for(var f=0;f<15;f++){var g=!a&&(h>>f&1)==1;f<8?this.modules[8][this.moduleCount-f-1]=g:f<9?this.modules[8][15-f-1+1]=g:this.modules[8][15-f-1]=g}this.modules[this.moduleCount-8][8]=!a},i.mapData=function(a,c){for(var l=-1,h=this.moduleCount-1,f=7,g=0,S=this.moduleCount-1;S>0;S-=2)for(S==6&&S--;;){for(var y=0;y<2;y++)if(this.modules[h][S-y]==null){var _=!1;g<a.length&&(_=(a[g]>>>f&1)==1);var P=n.getMask(c,h,S-y);P&&(_=!_),this.modules[h][S-y]=_,f--,f==-1&&(g++,f=7)}if(h+=l,h<0||this.moduleCount<=h){h-=l,l=-l;break}}},o.PAD0=236,o.PAD1=17,o.createData=function(a,c,l){for(var h=e.getRSBlocks(a,c),f=new t,g=0;g<l.length;g++){var S=l[g];f.put(S.mode,4),f.put(S.getLength(),n.getLengthInBits(S.mode,a)),S.write(f)}for(var y=0,g=0;g<h.length;g++)y+=h[g].dataCount;if(f.getLengthInBits()>y*8)throw new Error("code length overflow. ("+f.getLengthInBits()+">"+y*8+")");for(f.getLengthInBits()+4<=y*8&&f.put(0,4);f.getLengthInBits()%8!=0;)f.putBit(!1);for(;!(f.getLengthInBits()>=y*8||(f.put(o.PAD0,8),f.getLengthInBits()>=y*8));)f.put(o.PAD1,8);return o.createBytes(f,h)},o.createBytes=function(a,c){for(var l=0,h=0,f=0,g=new Array(c.length),S=new Array(c.length),y=0;y<c.length;y++){var _=c[y].dataCount,P=c[y].totalCount-_;h=Math.max(h,_),f=Math.max(f,P),g[y]=new Array(_);for(var k=0;k<g[y].length;k++)g[y][k]=255&a.buffer[k+l];l+=_;var N=n.getErrorCorrectPolynomial(P),z=new s(g[y],N.getLength()-1),M=z.mod(N);S[y]=new Array(N.getLength()-1);for(var k=0;k<S[y].length;k++){var b=k+M.getLength()-S[y].length;S[y][k]=b>=0?M.get(b):0}}for(var F=0,k=0;k<c.length;k++)F+=c[k].totalCount;for(var X=new Array(F),ne=0,k=0;k<h;k++)for(var y=0;y<c.length;y++)k<g[y].length&&(X[ne++]=g[y][k]);for(var k=0;k<f;k++)for(var y=0;y<c.length;y++)k<S[y].length&&(X[ne++]=S[y][k]);return X},Fe=o,Fe}var Ee={},wt;function lr(){if(wt)return Ee;wt=1,Object.defineProperty(Ee,"__esModule",{value:!0});var r=Object.assign||function(l){for(var h=1;h<arguments.length;h++){var f=arguments[h];for(var g in f)Object.prototype.hasOwnProperty.call(f,g)&&(l[g]=f[g])}return l},e=Lt(),t=o(e),n=O,s=o(n);function o(l){return l&&l.__esModule?l:{default:l}}function i(l,h){var f={};for(var g in l)h.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(l,g)&&(f[g]=l[g]);return f}var a={bgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,bgD:t.default.string.isRequired,fgColor:t.default.oneOfType([t.default.object,t.default.string]).isRequired,fgD:t.default.string.isRequired,size:t.default.number.isRequired,title:t.default.string,viewBoxSize:t.default.number.isRequired,xmlns:t.default.string},c=(0,n.forwardRef)(function(l,h){var f=l.bgColor,g=l.bgD,S=l.fgD,y=l.fgColor,_=l.size,P=l.title,k=l.viewBoxSize,N=l.xmlns,z=N===void 0?"http://www.w3.org/2000/svg":N,M=i(l,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return s.default.createElement("svg",r({},M,{height:_,ref:h,viewBox:"0 0 "+k+" "+k,width:_,xmlns:z}),P?s.default.createElement("title",null,P):null,s.default.createElement("path",{d:g,fill:f}),s.default.createElement("path",{d:S,fill:y}))});return c.displayName="QRCodeSvg",c.propTypes=a,Ee.default=c,Ee}var St;function ur(){if(St)return de;St=1,Object.defineProperty(de,"__esModule",{value:!0}),de.QRCode=void 0;var r=Object.assign||function(_){for(var P=1;P<arguments.length;P++){var k=arguments[P];for(var N in k)Object.prototype.hasOwnProperty.call(k,N)&&(_[N]=k[N])}return _},e=Lt(),t=f(e),n=Bt(),s=f(n),o=cr(),i=f(o),a=O,c=f(a),l=lr(),h=f(l);function f(_){return _&&_.__esModule?_:{default:_}}function g(_,P){var k={};for(var N in _)P.indexOf(N)>=0||Object.prototype.hasOwnProperty.call(_,N)&&(k[N]=_[N]);return k}var S={bgColor:t.default.oneOfType([t.default.object,t.default.string]),fgColor:t.default.oneOfType([t.default.object,t.default.string]),level:t.default.string,size:t.default.number,value:t.default.string.isRequired},y=(0,a.forwardRef)(function(_,P){var k=_.bgColor,N=k===void 0?"#FFFFFF":k,z=_.fgColor,M=z===void 0?"#000000":z,b=_.level,F=b===void 0?"L":b,X=_.size,ne=X===void 0?256:X,se=_.value,ee=g(_,["bgColor","fgColor","level","size","value"]),B=new i.default(-1,s.default[F]);B.addData(se),B.make();var J=B.modules;return c.default.createElement(h.default,r({},ee,{bgColor:N,bgD:J.map(function(te,G){return te.map(function(K,q){return K?"":"M "+q+" "+G+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:M,fgD:J.map(function(te,G){return te.map(function(K,q){return K?"M "+q+" "+G+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:P,size:ne,viewBoxSize:J.length}))});return de.QRCode=y,y.displayName="QRCode",y.propTypes=S,de.default=y,de}var hr=ur();const fr=Qt(hr);var Wt={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Et=O.createContext&&O.createContext(Wt),dr=["attr","size","title"];function gr(r,e){if(r==null)return{};var t=pr(r,e),n,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(s=0;s<o.length;s++)n=o[s],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function pr(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function xe(){return xe=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},xe.apply(this,arguments)}function Ct(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,n)}return t}function ke(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(t),!0).forEach(function(n){_r(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ct(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function _r(r,e,t){return e=mr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function mr(r){var e=vr(r,"string");return typeof e=="symbol"?e:e+""}function vr(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Ft(r){return r&&r.map((e,t)=>O.createElement(e.tag,ke({key:t},e.attr),Ft(e.child)))}function Qe(r){return e=>O.createElement(yr,xe({attr:ke({},r.attr)},e),Ft(r.child))}function yr(r){var e=t=>{var{attr:n,size:s,title:o}=r,i=gr(r,dr),a=s||t.size||"1em",c;return t.className&&(c=t.className),r.className&&(c=(c?c+" ":"")+r.className),O.createElement("svg",xe({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,i,{className:c,style:ke(ke({color:r.color||t.color},t.style),r.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&O.createElement("title",null,o),r.children)};return Et!==void 0?O.createElement(Et.Consumer,null,t=>e(t)):e(Wt)}function br(r){return Qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9.5 6.5v3h-3v-3h3M11 5H5v6h6V5zm-1.5 9.5v3h-3v-3h3M11 13H5v6h6v-6zm6.5-6.5v3h-3v-3h3M19 5h-6v6h6V5zm-6 8h1.5v1.5H13V13zm1.5 1.5H16V16h-1.5v-1.5zM16 13h1.5v1.5H16V13zm-3 3h1.5v1.5H13V16zm1.5 1.5H16V19h-1.5v-1.5zM16 16h1.5v1.5H16V16zm1.5-1.5H19V16h-1.5v-1.5zm0 3H19V19h-1.5v-1.5zM22 7h-2V4h-3V2h5v5zm0 15v-5h-2v3h-3v2h5zM2 22h5v-2H4v-3H2v5zM2 2v5h2V4h3V2H2z"},child:[]}]})(r)}const wr=({logoBackgroundCss:r="bg-gradient-to-br rounded-xl flex items-center justify-center flex-col",logoCss:e="text-white",size:t="small",isConnected:n=!1})=>{const[s,o]=O.useState("w-2 h-2"),[i,a]=O.useState("w-4 h-4"),[c,l]=O.useState(n?"from-green-200 to-green-600":"from-red-600 to-red-800");return O.useEffect(()=>{switch(t){case"small":a("w-2 h-2"),o("w-1 h-1");break;case"medium":a("w-6 h-6"),o("w-4 h-4");break;case"large":a("w-8 h-8"),o("w-6 h-6");break;case"xlarge":a("w-10 h-10"),o("w-8 h-8");break}return()=>{}},[t]),O.useEffect(()=>{l(n?"bg-gradient-to-r from-green-200 to-green-500":" bg-gradient-to-r from-red-600 to-red-800")},[n]),v.jsx("div",{className:"flex items-center space-x-2",children:v.jsx(br,{className:`${s} ${e} ${c} rounded-2xl p-1`})})};class qe extends Error{constructor(e,t,n){super(`HTTP ${e}: ${t}`),this.status=e,this.statusText=t,this.response=n,this.name="ApiError"}}async function Tt(r,e,t){const n=new AbortController,s=n.signal;t?.timeout&&setTimeout(()=>n.abort(),t.timeout);const o=t?.signal||s;try{const i=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:e?JSON.stringify(e):void 0,signal:o});if(!i.ok){let c;try{c=await i.json()}catch{c=await i.text()}throw new qe(i.status,i.statusText,c)}return i.headers.get("content-type")?.includes("application/json")?await i.json():await i.text()}catch(i){throw i instanceof qe?(console.error("API Error:",i.status,i.message),i):i instanceof qe&&i.name==="AbortError"?(console.error("Request was aborted"),new Error("Request timeout")):(console.error("Network error:",i),new Error("Network error occurred"))}}function Sr(r){return!r||r.trim().length===0}function Er(r,e){let t=null;return(...n)=>new Promise((s,o)=>{t&&clearTimeout(t),t=setTimeout(()=>{Promise.resolve(r(...n)).then(s).catch(o)},e)})}function Cr(r,e=30){if(!r)return!0;try{const n=JSON.parse(atob(r.split(".")[1])).exp;return n?Date.now()/1e3>=n-e:!0}catch{return!0}}function xt(r){return Qe({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"},child:[]}]})(r)}function Tr(r,e){try{localStorage.setItem(r,JSON.stringify(e))}catch(t){console.error("Error saving to localStorage",t)}}function xr(r){try{const e=localStorage.getItem(r);return e?JSON.parse(e):void 0}catch(e){console.error("Error reading from localStorage",e)}}const kr=(r,e)=>{const[t,n]=O.useState(()=>xr(r)??e);return O.useEffect(()=>{Tr(r,t),n(t)},[r,t]),O.useEffect(()=>{const s=o=>{o.key===r&&n(o.newValue?JSON.parse(o.newValue):e)};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[r,e]),[t,n]};class ue extends Error{constructor(e,t){const n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}}class Je extends Error{constructor(e="A timeout occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class ie extends Error{constructor(e="An abort occurred."){const t=new.target.prototype;super(e),this.__proto__=t}}class Pr extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}}class Rr extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}}class Ir extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}}class kt extends Error{constructor(e){const t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}}class Ar extends Error{constructor(e,t){const n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}}class qt{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}}class Re{get(e,t){return this.send({...t,method:"GET",url:e})}post(e,t){return this.send({...t,method:"POST",url:e})}delete(e,t){return this.send({...t,method:"DELETE",url:e})}getCookieString(e){return""}}var d;(function(r){r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None"})(d||(d={}));class me{constructor(){}log(e,t){}}me.instance=new me;const Or="10.0.0";class W{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}}class U{static get isBrowser(){return!U.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!U.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!U.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function ve(r,e){let t="";return fe(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${jr(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function jr(r){const e=new Uint8Array(r);let t="";return e.forEach(n=>{const s=n<16?"0":"";t+=`0x${s}${n.toString(16)} `}),t.substring(0,t.length-1)}function fe(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}async function Vt(r,e,t,n,s,o){const i={},[a,c]=ge();i[a]=c,r.log(d.Trace,`(${e} transport) sending data. ${ve(s,o.logMessageContent)}.`);const l=fe(s)?"arraybuffer":"text",h=await t.post(n,{content:s,headers:{...i,...o.headers},responseType:l,timeout:o.timeout,withCredentials:o.withCredentials});r.log(d.Trace,`(${e} transport) request complete. Response status: ${h.statusCode}.`)}function Dr(r){return r===void 0?new Pe(d.Information):r===null?me.instance:r.log!==void 0?r:new Pe(r)}class Mr{constructor(e,t){this._subject=e,this._observer=t}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}}class Pe{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){const n=`[${new Date().toISOString()}] ${d[e]}: ${t}`;switch(e){case d.Critical:case d.Error:this.out.error(n);break;case d.Warning:this.out.warn(n);break;case d.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function ge(){let r="X-SignalR-User-Agent";return U.isNode&&(r="User-Agent"),[r,Nr(Or,$r(),Br(),Lr())]}function Nr(r,e,t,n){let s="Microsoft SignalR/";const o=r.split(".");return s+=`${o[0]}.${o[1]}`,s+=` (${r}; `,e&&e!==""?s+=`${e}; `:s+="Unknown OS; ",s+=`${t}`,n?s+=`; ${n}`:s+="; Unknown Runtime Version",s+=")",s}function $r(){if(U.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Lr(){if(U.isNode)return process.versions.node}function Br(){return U.isNode?"NodeJS":"Browser"}function Ve(r){return r.stack?r.stack:r.message?r.message:`${r}`}function zr(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class Hr extends Re{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||U.isNode){const t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(zr());if(typeof AbortController>"u"){const t=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new ie;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const t=new this._abortControllerType;let n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new ie});let s=null;if(e.timeout){const c=e.timeout;s=setTimeout(()=>{t.abort(),this._logger.log(d.Warning,"Timeout from HTTP request."),n=new Je},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},fe(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let o;try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(c){throw n||(this._logger.log(d.Warning,`Error from HTTP request. ${c}.`),c)}finally{s&&clearTimeout(s),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const c=await Pt(o,"text");throw new ue(c||o.statusText,o.status)}const a=await Pt(o,e.responseType);return new qt(o.status,o.statusText,a)}getCookieString(e){let t="";return U.isNode&&this._jar&&this._jar.getCookies(e,(n,s)=>t=s.join("; ")),t}}function Pt(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}class Ur extends Re{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new ie):e.method?e.url?new Promise((t,n)=>{const s=new XMLHttpRequest;s.open(e.method,e.url,!0),s.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,s.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(fe(e.content)?s.setRequestHeader("Content-Type","application/octet-stream"):s.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach(i=>{s.setRequestHeader(i,o[i])}),e.responseType&&(s.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{s.abort(),n(new ie)}),e.timeout&&(s.timeout=e.timeout),s.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),s.status>=200&&s.status<300?t(new qt(s.status,s.statusText,s.response||s.responseText)):n(new ue(s.response||s.responseText||s.statusText,s.status))},s.onerror=()=>{this._logger.log(d.Warning,`Error from HTTP request. ${s.status}: ${s.statusText}.`),n(new ue(s.statusText,s.status))},s.ontimeout=()=>{this._logger.log(d.Warning,"Timeout from HTTP request."),n(new Je)},s.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class Wr extends Re{constructor(e){if(super(),typeof fetch<"u"||U.isNode)this._httpClient=new Hr(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new Ur(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new ie):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class re{static write(e){return`${e}${re.RecordSeparator}`}static parse(e){if(e[e.length-1]!==re.RecordSeparator)throw new Error("Message is incomplete.");const t=e.split(re.RecordSeparator);return t.pop(),t}}re.RecordSeparatorCode=30;re.RecordSeparator=String.fromCharCode(re.RecordSeparatorCode);class Fr{writeHandshakeRequest(e){return re.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(fe(e)){const a=new Uint8Array(e),c=a.indexOf(re.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,l))),n=a.byteLength>l?a.slice(l).buffer:null}else{const a=e,c=a.indexOf(re.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const l=c+1;t=a.substring(0,l),n=a.length>l?a.substring(l):null}const s=re.parse(t),o=JSON.parse(s[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[n,o]}}var A;(function(r){r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence"})(A||(A={}));class qr{constructor(){this.observers=[]}next(e){for(const t of this.observers)t.next(e)}error(e){for(const t of this.observers)t.error&&t.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new Mr(this,e)}}class Vr{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}async _send(e){const t=this._protocol.writeMessage(e);let n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let s=()=>{},o=()=>{};fe(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((i,a)=>{s=i,o=a})),this._messages.push(new Yr(t,this._totalMessageCount,s,o))}try{this._reconnectInProgress||await this._connection.send(t)}catch{this._disconnected()}await n}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){const s=this._messages[n];if(s._id<=e.sequenceId)t=n,fe(s._message)?this._bufferedByteCount-=s._message.byteLength:this._bufferedByteCount-=s._message.length,s._resolver();else if(this._bufferedByteCount<this._bufferSize)s._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==A.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:A.Sequence,sequenceId:e}));const t=this._messages;for(const n of t)await this._connection.send(n._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case A.Invocation:case A.StreamItem:case A.Completion:case A.StreamInvocation:case A.CancelInvocation:return!0;case A.Close:case A.Sequence:case A.Ping:case A.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:A.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class Yr{constructor(e,t,n,s){this._message=e,this._id=t,this._resolver=n,this._rejector=s}}const Qr=30*1e3,Jr=15*1e3,Gr=1e5;var H;(function(r){r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting"})(H||(H={}));class Ge{static create(e,t,n,s,o,i,a){return new Ge(e,t,n,s,o,i,a)}constructor(e,t,n,s,o,i,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(d.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},W.isRequired(e,"connection"),W.isRequired(t,"logger"),W.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=o??Qr,this.keepAliveIntervalInMilliseconds=i??Jr,this._statefulReconnectBufferSize=a??Gr,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=s,this._handshakeProtocol=new Fr,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=H.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:A.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==H.Disconnected&&this._connectionState!==H.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==H.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=H.Connecting,this._logger.log(d.Debug,"Starting HubConnection.");try{await this._startInternal(),U.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=H.Connected,this._connectionStarted=!0,this._logger.log(d.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=H.Disconnected,this._logger.log(d.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);const n={protocol:this._protocol.name,version:t};if(this._logger.log(d.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(d.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new Vr(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(t){throw this._logger.log(d.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(t),t}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===H.Disconnected)return this._logger.log(d.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===H.Disconnecting)return this._logger.log(d.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const t=this._connectionState;return this._connectionState=H.Disconnecting,this._logger.log(d.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(d.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===H.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new ie("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...t){const[n,s]=this._replaceStreamingParams(t),o=this._createStreamInvocation(e,t,s);let i;const a=new qr;return a.cancelCallback=()=>{const c=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],i.then(()=>this._sendWithProtocol(c))},this._callbacks[o.invocationId]=(c,l)=>{if(l){a.error(l);return}else c&&(c.type===A.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},i=this._sendWithProtocol(o).catch(c=>{a.error(c),delete this._callbacks[o.invocationId]}),this._launchStreams(n,i),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){const[n,s]=this._replaceStreamingParams(t),o=this._sendWithProtocol(this._createInvocation(e,t,!0,s));return this._launchStreams(n,o),o}invoke(e,...t){const[n,s]=this._replaceStreamingParams(t),o=this._createInvocation(e,t,!1,s);return new Promise((a,c)=>{this._callbacks[o.invocationId]=(h,f)=>{if(f){c(f);return}else h&&(h.type===A.Completion?h.error?c(new Error(h.error)):a(h.result):c(new Error(`Unexpected message type: ${h.type}`)))};const l=this._sendWithProtocol(o).catch(h=>{c(h),delete this._callbacks[o.invocationId]});this._launchStreams(n,l)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();const n=this._methods[e];if(n)if(t){const s=n.indexOf(t);s!==-1&&(n.splice(s,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const t=this._protocol.parseMessages(e,this._logger);for(const n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case A.Invocation:this._invokeClientMethod(n).catch(s=>{this._logger.log(d.Error,`Invoke client method threw error: ${Ve(s)}`)});break;case A.StreamItem:case A.Completion:{const s=this._callbacks[n.invocationId];if(s){n.type===A.Completion&&delete this._callbacks[n.invocationId];try{s(n)}catch(o){this._logger.log(d.Error,`Stream callback threw error: ${Ve(o)}`)}}break}case A.Ping:break;case A.Close:{this._logger.log(d.Information,"Close message received from server.");const s=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(s):this._stopPromise=this._stopInternal(s);break}case A.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case A.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(d.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(s){const o="Error parsing handshake response: "+s;this._logger.log(d.Error,o);const i=new Error(o);throw this._handshakeRejecter(i),i}if(t.error){const s="Server returned handshake error: "+t.error;this._logger.log(d.Error,s);const o=new Error(s);throw this._handshakeRejecter(o),o}else this._logger.log(d.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===H.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===H.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(d.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(d.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const s=n.slice(),o=!!e.invocationId;let i,a,c;for(const l of s)try{const h=i;i=await l.apply(this,e.arguments),o&&i&&h&&(this._logger.log(d.Error,`Multiple results provided for '${t}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(h){a=h,this._logger.log(d.Error,`A callback for the method '${t}' threw error '${h}'.`)}c?await this._sendWithProtocol(c):o?(a?c=this._createCompletionMessage(e.invocationId,`${a}`,null):i!==void 0?c=this._createCompletionMessage(e.invocationId,null,i):(this._logger.log(d.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):i&&this._logger.log(d.Error,`Result given for '${t}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(d.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new ie("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===H.Disconnecting?this._completeClose(e):this._connectionState===H.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===H.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=H.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),U.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(d.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}async _reconnect(e){const t=Date.now();let n=0,s=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(n,0,s);if(o===null){this._logger.log(d.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=H.Reconnecting,e?this._logger.log(d.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(d.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(i=>i.apply(this,[e]))}catch(i){this._logger.log(d.Error,`An onreconnecting callback called with error '${e}' threw error '${i}'.`)}if(this._connectionState!==H.Reconnecting){this._logger.log(d.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(d.Information,`Reconnect attempt number ${n+1} will start in ${o} ms.`),await new Promise(i=>{this._reconnectDelayHandle=setTimeout(i,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==H.Reconnecting){this._logger.log(d.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=H.Connected,this._logger.log(d.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(i=>i.apply(this,[this.connection.connectionId]))}catch(i){this._logger.log(d.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${i}'.`)}return}catch(i){if(this._logger.log(d.Information,`Reconnect attempt failed because of error '${i}'.`),this._connectionState!==H.Reconnecting){this._logger.log(d.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===H.Disconnecting&&this._completeClose();return}n++,s=i instanceof Error?i:new Error(i.toString()),o=this._getNextRetryDelay(n,Date.now()-t,s)}}this._logger.log(d.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(s){return this._logger.log(d.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${s}'.`),null}}_cancelCallbacksWithError(e){const t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{const s=t[n];try{s(null,e)}catch(o){this._logger.log(d.Error,`Stream 'error' callback called with '${e}' threw error: ${Ve(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,s){if(n)return s.length!==0?{target:e,arguments:t,streamIds:s,type:A.Invocation}:{target:e,arguments:t,type:A.Invocation};{const o=this._invocationId;return this._invocationId++,s.length!==0?{target:e,arguments:t,invocationId:o.toString(),streamIds:s,type:A.Invocation}:{target:e,arguments:t,invocationId:o.toString(),type:A.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(const n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:s=>{let o;s instanceof Error?o=s.message:s&&s.toString?o=s.toString():o="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,o)))},next:s=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,s)))}})}}_replaceStreamingParams(e){const t=[],n=[];for(let s=0;s<e.length;s++){const o=e[s];if(this._isObservable(o)){const i=this._invocationId;this._invocationId++,t[i]=o,n.push(i.toString()),e.splice(s,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){const s=this._invocationId;return this._invocationId++,n.length!==0?{target:e,arguments:t,invocationId:s.toString(),streamIds:n,type:A.StreamInvocation}:{target:e,arguments:t,invocationId:s.toString(),type:A.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:A.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:A.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:A.Completion}:{invocationId:e,result:n,type:A.Completion}}_createCloseMessage(){return{type:A.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const Xr=[0,2e3,1e4,3e4,null];class Rt{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Xr}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class he{}he.Authorization="Authorization";he.Cookie="Cookie";class Kr extends Re{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}async send(e){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const n=await this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):n}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[he.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[he.Authorization]&&delete e.headers[he.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var Y;(function(r){r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling"})(Y||(Y={}));var Z;(function(r){r[r.Text=1]="Text",r[r.Binary=2]="Binary"})(Z||(Z={}));let Zr=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class It{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new Zr,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,t){if(W.isRequired(e,"url"),W.isRequired(t,"transferFormat"),W.isIn(t,Z,"transferFormat"),this._url=e,this._logger.log(d.Trace,"(LongPolling transport) Connecting."),t===Z.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,s]=ge(),o={[n]:s,...this._options.headers},i={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};t===Z.Binary&&(i.responseType="arraybuffer");const a=`${e}&_=${Date.now()}`;this._logger.log(d.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,i);c.statusCode!==200?(this._logger.log(d.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new ue(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,i)}async _poll(e,t){try{for(;this._running;)try{const n=`${e}&_=${Date.now()}`;this._logger.log(d.Trace,`(LongPolling transport) polling: ${n}.`);const s=await this._httpClient.get(n,t);s.statusCode===204?(this._logger.log(d.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):s.statusCode!==200?(this._logger.log(d.Error,`(LongPolling transport) Unexpected response code: ${s.statusCode}.`),this._closeError=new ue(s.statusText||"",s.statusCode),this._running=!1):s.content?(this._logger.log(d.Trace,`(LongPolling transport) data received. ${ve(s.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(s.content)):this._logger.log(d.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof Je?this._logger.log(d.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(d.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(d.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?Vt(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(d.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(d.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[t,n]=ge();e[t]=n;const s={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,s)}catch(i){o=i}o?o instanceof ue&&(o.statusCode===404?this._logger.log(d.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(d.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(d.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(d.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(d.Trace,e),this.onclose(this._closeError)}}}class en{constructor(e,t,n,s){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=s,this.onreceive=null,this.onclose=null}async connect(e,t){return W.isRequired(e,"url"),W.isRequired(t,"transferFormat"),W.isIn(t,Z,"transferFormat"),this._logger.log(d.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,s)=>{let o=!1;if(t!==Z.Text){s(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let i;if(U.isBrowser||U.isWebWorker)i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(e),c={};c.Cookie=a;const[l,h]=ge();c[l]=h,i=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{i.onmessage=a=>{if(this.onreceive)try{this._logger.log(d.Trace,`(SSE transport) data received. ${ve(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},i.onerror=a=>{o?this._close():s(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},i.onopen=()=>{this._logger.log(d.Information,`SSE connected to ${this._url}`),this._eventSource=i,o=!0,n()}}catch(a){s(a);return}})}async send(e){return this._eventSource?Vt(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class tn{constructor(e,t,n,s,o,i){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=s,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=i}async connect(e,t){W.isRequired(e,"url"),W.isRequired(t,"transferFormat"),W.isIn(t,Z,"transferFormat"),this._logger.log(d.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((s,o)=>{e=e.replace(/^http/,"ws");let i;const a=this._httpClient.getCookieString(e);let c=!1;if(U.isNode||U.isReactNative){const l={},[h,f]=ge();l[h]=f,n&&(l[he.Authorization]=`Bearer ${n}`),a&&(l[he.Cookie]=a),i=new this._webSocketConstructor(e,void 0,{headers:{...l,...this._headers}})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);i||(i=new this._webSocketConstructor(e)),t===Z.Binary&&(i.binaryType="arraybuffer"),i.onopen=l=>{this._logger.log(d.Information,`WebSocket connected to ${e}.`),this._webSocket=i,c=!0,s()},i.onerror=l=>{let h=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?h=l.error:h="There was an error with the transport",this._logger.log(d.Information,`(WebSockets transport) ${h}.`)},i.onmessage=l=>{if(this._logger.log(d.Trace,`(WebSockets transport) data received. ${ve(l.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(l.data)}catch(h){this._close(h);return}},i.onclose=l=>{if(c)this._close(l);else{let h=null;typeof ErrorEvent<"u"&&l instanceof ErrorEvent?h=l.error:h="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",o(new Error(h))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(d.Trace,`(WebSockets transport) sending data. ${ve(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(d.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const At=100;class rn{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,W.isRequired(e,"url"),this._logger=Dr(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,s=null;if(U.isNode&&typeof require<"u"){const o=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=o("ws"),s=o("eventsource")}!U.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:U.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!U.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:U.isNode&&!t.EventSource&&typeof s<"u"&&(t.EventSource=s),this._httpClient=new Kr(t.httpClient||new Wr(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}async start(e){if(e=e||Z.Binary,W.isIn(e,Z,"transferFormat"),this._logger.log(d.Debug,`Starting connection with transfer format '${Z[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(d.Error,t),await this._stopPromise,Promise.reject(new ie(t))}else if(this._connectionState!=="Connected"){const t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(d.Error,t),Promise.reject(new ie(t))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Xe(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(d.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(d.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(t){this._logger.log(d.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(d.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Y.WebSockets)this.transport=this._constructTransport(Y.WebSockets),await this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,s=0;do{if(n=await this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ie("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){const o=n.accessToken;this._accessTokenFactory=()=>o,this._httpClient._accessToken=o,this._httpClient._accessTokenFactory=void 0}s++}while(n.url&&s<At);if(s===At&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(t,this._options.transport,n,e)}this.transport instanceof It&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(d.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(d.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(e){const t={},[n,s]=ge();t[n]=s;const o=this._resolveNegotiateUrl(e);this._logger.log(d.Debug,`Sending negotiation request: ${o}.`);try{const i=await this._httpClient.post(o,{content:"",headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(i.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${i.statusCode}'`));const a=JSON.parse(i.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new kt("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(i){let a="Failed to complete negotiation with the server: "+i;return i instanceof ue&&i.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(d.Error,a),Promise.reject(new kt(a))}}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}async _createTransport(e,t,n,s){let o=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(d.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,await this._startTransport(o,s),this.connectionId=n.connectionId;return}const i=[],a=n.availableTransports||[];let c=n;for(const l of a){const h=this._resolveTransportOrError(l,t,s,c?.useStatefulReconnect===!0);if(h instanceof Error)i.push(`${l.transport} failed:`),i.push(h);else if(this._isITransport(h)){if(this.transport=h,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}o=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(o,s),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(d.Error,`Failed to start the transport '${l.transport}': ${f}`),c=void 0,i.push(new Ir(`${l.transport} failed: ${f}`,Y[l.transport])),this._connectionState!=="Connecting"){const g="Failed to select transport before stop() was called.";return this._logger.log(d.Debug,g),Promise.reject(new ie(g))}}}}return i.length>0?Promise.reject(new Ar(`Unable to connect to the server with any of the available transports. ${i.join(" ")}`,i)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case Y.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new tn(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Y.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new en(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Y.LongPolling:return new It(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async n=>{let s=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,t),await this.features.resend()}catch{s=!0}else{this._stopConnection(n);return}s&&this._stopConnection(n)}:this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,s){const o=Y[e.transport];if(o==null)return this._logger.log(d.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(nn(t,o))if(e.transferFormats.map(a=>Z[a]).indexOf(n)>=0){if(o===Y.WebSockets&&!this._options.WebSocket||o===Y.ServerSentEvents&&!this._options.EventSource)return this._logger.log(d.Debug,`Skipping transport '${Y[o]}' because it is not supported in your environment.'`),new Pr(`'${Y[o]}' is not supported in your environment.`,o);this._logger.log(d.Debug,`Selecting transport '${Y[o]}'.`);try{return this.features.reconnect=o===Y.WebSockets?s:void 0,this._constructTransport(o)}catch(a){return a}}else return this._logger.log(d.Debug,`Skipping transport '${Y[o]}' because it does not support the requested transfer format '${Z[n]}'.`),new Error(`'${Y[o]}' does not support ${Z[n]}.`);else return this._logger.log(d.Debug,`Skipping transport '${Y[o]}' because it was disabled by the client.`),new Rr(`'${Y[o]}' is disabled by the client.`,o)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(d.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(d.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(d.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(d.Error,`Connection disconnected with error '${e}'.`):this._logger.log(d.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(d.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(d.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!U.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const t=window.document.createElement("a");return t.href=e,this._logger.log(d.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){const t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";const n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}}function nn(r,e){return!r||(e&r)!==0}class Xe{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new Ce,this._transportResult=new Ce,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new Ce),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Ce;const e=this._transportResult;this._transportResult=void 0;const t=typeof this._buffer[0]=="string"?this._buffer.join(""):Xe._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}}static _concatBuffers(e){const t=e.map(o=>o.byteLength).reduce((o,i)=>o+i),n=new Uint8Array(t);let s=0;for(const o of e)n.set(new Uint8Array(o),s),s+=o.byteLength;return n.buffer}}class Ce{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const on="json";class sn{constructor(){this.name=on,this.version=2,this.transferFormat=Z.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=me.instance);const n=re.parse(e),s=[];for(const o of n){const i=JSON.parse(o);if(typeof i.type!="number")throw new Error("Invalid payload.");switch(i.type){case A.Invocation:this._isInvocationMessage(i);break;case A.StreamItem:this._isStreamItemMessage(i);break;case A.Completion:this._isCompletionMessage(i);break;case A.Ping:break;case A.Close:break;case A.Ack:this._isAckMessage(i);break;case A.Sequence:this._isSequenceMessage(i);break;default:t.log(d.Information,"Unknown message type '"+i.type+"' ignored.");continue}s.push(i)}return s}writeMessage(e){return re.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}}const an={trace:d.Trace,debug:d.Debug,info:d.Information,information:d.Information,warn:d.Warning,warning:d.Warning,error:d.Error,critical:d.Critical,none:d.None};function cn(r){const e=an[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}class ln{configureLogging(e){if(W.isRequired(e,"logging"),un(e))this.logger=e;else if(typeof e=="string"){const t=cn(e);this.logger=new Pe(t)}else this.logger=new Pe(e);return this}withUrl(e,t){return W.isRequired(e,"url"),W.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...t}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:t},this}withHubProtocol(e){return W.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new Rt(e):this.reconnectPolicy=e:this.reconnectPolicy=new Rt,this}withServerTimeout(e){return W.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return W.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new rn(this.url,e);return Ge.create(t,this.logger||me.instance,this.protocol||new sn,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function un(r){return r.log!==void 0}/**
42
+ * @license lucide-react v0.562.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const hn=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fn=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ot=r=>{const e=fn(r);return e.charAt(0).toUpperCase()+e.slice(1)},Yt=(...r)=>r.filter((e,t,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===t).join(" ").trim(),dn=r=>{for(const e in r)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
47
+ * @license lucide-react v0.562.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */var gn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
52
+ * @license lucide-react v0.562.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const pn=O.forwardRef(({color:r="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},c)=>O.createElement("svg",{ref:c,...gn,width:e,height:e,stroke:r,strokeWidth:n?Number(t)*24/Number(e):t,className:Yt("lucide",s),...!o&&!dn(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,h])=>O.createElement(l,h)),...Array.isArray(o)?o:[o]]));/**
57
+ * @license lucide-react v0.562.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const oe=(r,e)=>{const t=O.forwardRef(({className:n,...s},o)=>O.createElement(pn,{ref:o,iconNode:e,className:Yt(`lucide-${hn(Ot(r))}`,`lucide-${r}`,n),...s}));return t.displayName=Ot(r),t};/**
62
+ * @license lucide-react v0.562.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const _n=[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]],mn=oe("file-archive",_n);/**
67
+ * @license lucide-react v0.562.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const vn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],yn=oe("file-braces",vn);/**
72
+ * @license lucide-react v0.562.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const bn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Te=oe("file-code",bn);/**
77
+ * @license lucide-react v0.562.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const wn=[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 16h2v6",key:"1bxocy"}],["path",{d:"M10 22h4",key:"ceow96"}],["rect",{x:"2",y:"16",width:"4",height:"6",rx:"2",key:"r45zd0"}]],Sn=oe("file-digit",wn);/**
82
+ * @license lucide-react v0.562.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const En=[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]],Cn=oe("file-headphone",En);/**
87
+ * @license lucide-react v0.562.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Tn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],xn=oe("file-image",Tn);/**
92
+ * @license lucide-react v0.562.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const kn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],Pn=oe("file-play",kn);/**
97
+ * @license lucide-react v0.562.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Rn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],jt=oe("file-spreadsheet",Rn);/**
102
+ * @license lucide-react v0.562.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const In=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Dt=oe("file-text",In);/**
107
+ * @license lucide-react v0.562.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const An=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]],On=oe("file-type",An);/**
112
+ * @license lucide-react v0.562.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const jn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Mt=oe("file",jn);/**
117
+ * @license lucide-react v0.562.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const Dn=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],Mn=oe("presentation",Dn);function Nn(r){return Qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Square_Remove"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M18.437,20.937H5.563a2.5,2.5,0,0,1-2.5-2.5V5.563a2.5,2.5,0,0,1,2.5-2.5H18.437a2.5,2.5,0,0,1,2.5,2.5V18.437A2.5,2.5,0,0,1,18.437,20.937ZM5.563,4.063a1.5,1.5,0,0,0-1.5,1.5V18.437a1.5,1.5,0,0,0,1.5,1.5H18.437a1.5,1.5,0,0,0,1.5-1.5V5.563a1.5,1.5,0,0,0-1.5-1.5Z"},child:[]},{tag:"path",attr:{d:"M13.767,14.477a.5.5,0,0,0,.71-.71L12.707,12l1.77-1.77a.5.5,0,0,0-.71-.7L12,11.3l-1.77-1.77a.5.5,0,0,0-.7.7c.59.59,1.17,1.18,1.77,1.77l-1.77,1.77c-.46.45.25,1.16.7.71L12,12.707Z"},child:[]}]}]}]})(r)}const $n=({progress:r=0})=>v.jsxs("div",{className:"mt-3 w-full",children:[v.jsxs("div",{className:"mb-2 flex justify-between",children:[v.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-500",children:"Uploading..."}),v.jsxs("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-500",children:[Math.round(r||0),"%"]})]}),v.jsx("div",{className:"h-2.5 w-full rounded-full bg-gray-200 dark:bg-gray-200",children:v.jsx("div",{className:"h-2.5 rounded-full bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.4)] transition-all duration-300 ease-out",style:{width:`${r||0}%`}})})]}),Ln=({file:r,size:e="md",className:t="",showExtension:n=!0,showRemoveButton:s=!1,removeFileMethod:o=()=>{}})=>{const i=y=>{const _=y.split(".");return _.length>1?_.pop().toLowerCase():""},a=y=>{const _={className:"text-gray-600"};switch(y){case"pdf":return v.jsx(Mt,{..._,className:"text-red-500"});case"doc":case"docx":return v.jsx(Dt,{..._,className:"text-blue-500"});case"xls":case"xlsx":return v.jsx(jt,{..._,className:"text-green-600"});case"csv":return v.jsx(jt,{..._,className:"text-green-500"});case"ppt":case"pptx":return v.jsx(Mn,{..._,className:"text-orange-500"});case"txt":case"rtf":return v.jsx(Dt,{..._,className:"text-gray-600"});case"md":return v.jsx(Sn,{..._});case"jpg":case"jpeg":case"png":case"gif":case"svg":case"bmp":case"webp":case"ico":return v.jsx(xn,{..._,className:"text-purple-500"});case"mp4":case"avi":case"mov":case"wmv":case"flv":case"webm":case"mkv":return v.jsx(Pn,{..._,className:"text-purple-600"});case"mp3":case"wav":case"ogg":case"flac":case"m4a":case"aac":return v.jsx(Cn,{..._,className:"text-pink-500"});case"zip":case"rar":case"7z":case"tar":case"gz":case"bz2":return v.jsx(mn,{..._,className:"text-yellow-600"});case"js":case"jsx":return v.jsx(Te,{..._,className:"text-yellow-500"});case"ts":case"tsx":return v.jsx(On,{..._,className:"text-blue-600"});case"html":case"htm":return v.jsx(Te,{..._,className:"text-orange-600"});case"css":return v.jsx(Te,{..._,className:"text-blue-400"});case"json":return v.jsx(yn,{..._,className:"text-gray-700"});case"xml":case"yml":case"yaml":return v.jsx(Te,{..._,className:"text-gray-600"});default:return v.jsx(Mt,{..._})}},c={sm:{iconSize:20,textSize:"text-xs",containerSize:"w-full max-w-40 h-auto",filenameSize:"text-xs",textTruncateSize:"90px",previewSize:"h-12 w-20"},md:{iconSize:32,textSize:"text-sm",containerSize:"w-full max-w-52 h-auto",filenameSize:"text-xs",textTruncateSize:"100px",previewSize:"h-16 w-20"},lg:{iconSize:45,textSize:"text-base",containerSize:"w-full max-w-60 h-auto",filenameSize:"text-xs",textTruncateSize:"100px",previewSize:"h-20 w-20"},xlg:{iconSize:56,textSize:"text-base",containerSize:"w-full max-w-70 h-auto",filenameSize:"text-xs",textTruncateSize:"100px",previewSize:"h-23 w-24"}},{iconSize:l,textSize:h,previewSize:f}=c[e],g=i(r.name),S=a(g);return v.jsx("div",{className:`flex flex-col items-center ${t} mt-2 gap-1`,children:v.jsxs("div",{className:"group flex max-w-[160px] cursor-default flex-col items-center justify-center rounded-lg border border-gray-200 bg-white p-3 shadow-sm transition-colors duration-200 hover:bg-gray-50 hover:shadow-md sm:max-w-[180px] md:max-w-[200px]",children:[r.thumbnailBase64?v.jsx("div",{className:`${f} w-20 transform overflow-hidden rounded transition-transform duration-200 group-hover:scale-110`,children:v.jsx("img",{src:`data:${r.type};base64,${r.thumbnailBase64}`,className:"h-full w-full object-cover"})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"mb-2 transform transition-transform duration-200 group-hover:scale-110",children:O.cloneElement(S,{size:l})}),n&&g&&v.jsx("div",{className:`${h} px-1 text-center font-medium break-all`,children:v.jsx("span",{className:"inline-block rounded bg-gray-100 px-2 py-0.5 text-gray-700",children:g.toUpperCase()})})]}),v.jsxs("div",{className:"flex flex-row items-center justify-between gap-1 p-2",children:[v.jsxs("div",{className:"mt-2",children:[v.jsx("p",{className:"w-25 truncate text-start text-xs font-medium text-gray-800",children:r.name}),v.jsxs("p",{className:"text-start text-xs text-gray-500",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),s&&v.jsx("button",{className:"h-6 w-6 rounded-md p-0 text-gray-400 transition hover:bg-gray-100 hover:text-gray-700","aria-label":"Remove File",onClick:()=>o(r.id),children:v.jsx(Nn,{className:"h-10 w-10 text-gray-400"})})]}),v.jsx($n,{progress:r.progress})]})})},Bn=({sessionUrl:r,refreshTokenUrl:e,header:t,showHeader:n=!1,showLogo:s=!0,clickQrCodeToReload:o=!1,size:i="large"})=>{const[a,c]=O.useState(!0),[l,h]=O.useState(160),[f,g]=O.useState(""),[S,y]=O.useState(""),[_,P]=O.useState("w-32 h-32 md:w-40 md:h-40"),[k,N]=O.useState("w-2 h-2"),[z,M]=O.useState("sm"),[b,F]=O.useState(!1),[X,ne]=kr("qrcode-last-session-ids",[]),[se,ee]=O.useState(!1),B=O.useRef(null),J=O.useRef(null),te=O.useRef(X),G=O.useRef(""),K=O.useRef(0),[q,V]=O.useState([]);O.useEffect(()=>{const m=[...new Set(X)];te.current=m},[X]);async function ce(){try{if(!G.current||Cr(G.current,60)){const m=await Tt(e,{timeout:16e4});G.current=m.access_token}return G.current}catch(m){throw console.error("Error fetching access token:",m),m}finally{}}const le=async()=>{if(!J.current){c(!0);try{const m=await Tt(r,{lastSessionIds:te.current},{timeout:3e5});J.current=m;const E=I(m);console.log("Generated Device login URL:",E),g(E),y(m.hubUrl),ne([m.sessionId])}catch{b||(console.log("Enabling retry button..."),F(!0),c(!1))}finally{}}},p=async()=>{J.current&&(ee(!1),F(!1),V([]),J.current=null,B.current=null)};function u(m){return typeof m=="string"&&m.trim().length===0}const w=async m=>{if(u(m)){console.log("Hub URL is empty, cannot create connection.");return}try{B.current=new ln().withUrl(m,{withCredentials:!1,transport:1,accessTokenFactory:()=>ce()}).configureLogging(d.Information).withAutomaticReconnect({nextRetryDelayInMilliseconds:E=>Math.min(16e3,Math.pow(2,E.previousRetryCount)*1e3)}).build(),B.current.on("FileAdded",E=>{console.log(E),V(R=>R.some(j=>j.name===E.name)?R:[...R,E])}),B.current.on("FileRemoved",E=>{V(R=>R.some(j=>j.name===E.name)?R.filter(j=>j.name!==E.name):R)}),B.current.on("FileProgress",(E,R)=>{console.log(E,R),V(j=>j.map(Q=>Q.id===E?{...Q,progress:R}:Q))}),B.current.on("FilesCleared",()=>{console.log("Files cleared"),V([])}),B.current.on("sessionDisconnected",E=>{console.log("Session disconnected:",E),p()}),B.current.on("sessionReset",E=>{console.log("Session reset:",E),V([])}),B.current.onreconnecting(E=>{console.log("Connection lost, attempting to reconnect...",E),K.current>=2?ee(!1):K.current+=1,console.log("Retry count:",K.current)}),B.current.onreconnected(E=>{console.log("Connection re-established:",E),ee(!0),K.current=0}),B.current.onclose(E=>{console.log("Connection closed",E),ee(!1),V([])}),B.current.serverTimeoutInMilliseconds=3e4,B.current.keepAliveIntervalInMilliseconds=15e3,await B.current.start(),ee(!0),c(!1),F(!1),console.log("SignalR Connected successfully")}catch(E){console.error("SignalR Connection failed:",E),c(!1),F(!0)}finally{}},T=async()=>{await le(),await w(J.current.hubUrl??"")},x=O.useCallback(Er(T,1e3),[]);O.useEffect(()=>{if(Sr(r)){console.log("No sessionUrl provided, skipping session creation.");return}return(async()=>await T())(),()=>{B.current&&(B.current.off("FileAdded",m=>{}),B.current.off("FileRemoved",m=>{}),B.current.stop().catch(console.error))}},[]);const D=async()=>{V([]),await p(),await x()};function I(m){return new URL(m.deviceLoginUrl).toString()}return O.useEffect(()=>{switch(i){case"small":P("w-16 h-16 md:w-20 md:h-20"),N("w-2 h-2"),h(200),M("xlg");break;case"medium":P("w-24 h-24 md:w-30 md:h-30"),N("w-2 h-2"),h(200),M("xlg");break;case"large":P("w-32 h-32 md:w-40 md:h-40"),N("w-2 h-2"),h(200),M("xlg");break;case"xlarge":P("w-40 h-40 md:w-48 md:h-48"),N("w-2 h-2"),h(200),M("xlg");break}return()=>{}},[i]),v.jsxs("section",{className:"relative mx-auto max-w-3xl p-6",children:[a&&v.jsx("div",{className:"absolute inset-0 bg-white/90 flex items-center justify-center rounded-md z-10",children:v.jsxs("div",{className:"flex flex-col items-center text-center mt-0 gap-2",children:[v.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-t-2 border-blue-800 border-dashed"}),v.jsx("div",{className:"text-center h-10 w-10",children:v.jsx("p",{className:"text-gray-900",children:"Loading..."})})]})}),!a&&b&&v.jsx("div",{className:"absolute inset-0 bg-white/90 flex items-center justify-center rounded-md z-10",children:v.jsxs("div",{className:"flex flex-col items-center text-center mt-5 gap-2",children:[v.jsx("div",{className:"text-center text-xs",children:v.jsx("p",{className:"text-gray-900",children:"Cannot create session"})}),v.jsx("button",{onClick:async()=>{await D()},className:"bg-blue-300 text-white py-1 px-2 rounded-md hover:bg-blue-500 transition-colors",children:v.jsx(xt,{className:"h-4 w-4"})})]})}),v.jsxs("div",{className:"flex flex-col items-center text-center",children:[n&&v.jsx(v.Fragment,{children:v.jsx("header",{className:"mb-2",children:v.jsx("h1",{className:"text-xl font-semibold text-gray-600",children:t})})}),v.jsxs("div",{"aria-label":"QR Code for file upload",onClick:async()=>{o&&await D()},className:`bg-white p-2 rounded-2xl border-2 border-dashed ${_} flex
122
+ border-gray-300 items-center justify-center transition-all duration-300 hover:shadow-lg hover:scale-105`,children:[v.jsxs("div",{className:"relative inline-block",children:[v.jsx(fr,{value:f,size:l,className:"w-full h-full"}),s&&v.jsx(v.Fragment,{children:v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:`bg-white ${k} rounded flex items-center justify-center`,children:v.jsx("span",{className:"text-xs font-bold",children:v.jsx(wr,{size:i,isConnected:se})})})})})]}),v.jsxs("p",{className:"sr-only",children:["QR Code that allows uploads from ",f]})]}),o?v.jsx("div",{className:"flex flex-row mt-3",children:v.jsx("p",{className:"text-gray-500",children:"Click QR code to reload"})}):v.jsx("div",{className:"flex flex-row mt-3",children:v.jsxs("button",{onClick:async()=>{await D()},className:"bg-gray-500 text-white py-2 px-4 rounded-md hover:bg-blue-800 transition-colors flex flex-row items-center",children:[v.jsx(xt,{className:"h-4 w-4"})," ",v.jsx("span",{className:"ml-3",children:"Reload"})]})}),v.jsx("div",{className:"p-2 w-max",children:v.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-2",children:q.map((m,E)=>v.jsx(Ln,{file:m,size:z},E))})})]})]})};exports.QrCodeGenerator=Bn;
43
123
  //# sourceMappingURL=qr-code-generator.cjs.js.map