react-luminus-components 1.4.35 → 1.4.38
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.
- package/dist/.vite/manifest.json +26 -26
- package/dist/{FormDisabledProvider-D7ohrf6I.cjs → FormDisabledProvider-Ck3Wl-xT.cjs} +1 -1
- package/dist/{FormDisabledProvider-C4BJtnSl.js → FormDisabledProvider-prNEKV5X.js} +1 -1
- package/dist/components/Contacts/ContactButtonQrModal/ContactButtonQrModal.d.ts +2 -1
- package/dist/components/Form/ContactInput/comps/ContactInputContainer/ContactInputContainer.d.ts +8 -0
- package/dist/components/Form/ContactInput/comps/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +127 -115
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +37 -37
- package/dist/main.es.js +2643 -2646
- package/dist/models/types/PromptOptions.d.ts +3 -1
- package/dist/{nivo-bar.es-CAK_sBtK.js → nivo-bar.es-CTs3Ptar.js} +1 -1
- package/dist/{nivo-bar.es-C2UfrfEW.cjs → nivo-bar.es-Cz-_XfUi.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useLocalStorageState-DgnSxAxT.cjs → useLocalStorageState-CIf5aDoR.cjs} +1 -1
- package/dist/{useLocalStorageState-zVazoLpV.js → useLocalStorageState-rNuPqT1C.js} +6 -2
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +3 -2
|
@@ -250,7 +250,7 @@ to {
|
|
|
250
250
|
*
|
|
251
251
|
* This source code is licensed under the MIT license found in the
|
|
252
252
|
* LICENSE file in the root directory of this source tree.
|
|
253
|
-
*/var uv;function m8(){return uv||(uv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===a||R===i||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===v||R.$$typeof===_||R.$$typeof===w||R.$$typeof===p)}function T(R){if(typeof R=="object"&&R!==null){var Z=R.$$typeof;switch(Z){case t:var J=R.type;switch(J){case c:case l:case r:case a:case i:case d:return J;default:var ne=J&&J.$$typeof;switch(ne){case s:case u:case g:case h:case o:return ne;default:return Z}}case n:return Z}}}var b=c,k=l,j=s,M=o,S=t,E=u,C=r,O=g,$=h,A=n,P=a,N=i,F=d,z=!1;function q(R){return z||(z=!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.")),W(R)||T(R)===c}function W(R){return T(R)===l}function G(R){return T(R)===s}function ee(R){return T(R)===o}function ie(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Q(R){return T(R)===u}function X(R){return T(R)===r}function K(R){return T(R)===g}function te(R){return T(R)===h}function D(R){return T(R)===n}function I(R){return T(R)===a}function L(R){return T(R)===i}function V(R){return T(R)===d}_t.AsyncMode=b,_t.ConcurrentMode=k,_t.ContextConsumer=j,_t.ContextProvider=M,_t.Element=S,_t.ForwardRef=E,_t.Fragment=C,_t.Lazy=O,_t.Memo=$,_t.Portal=A,_t.Profiler=P,_t.StrictMode=N,_t.Suspense=F,_t.isAsyncMode=q,_t.isConcurrentMode=W,_t.isContextConsumer=G,_t.isContextProvider=ee,_t.isElement=ie,_t.isForwardRef=Q,_t.isFragment=X,_t.isLazy=K,_t.isMemo=te,_t.isPortal=D,_t.isProfiler=I,_t.isStrictMode=L,_t.isSuspense=V,_t.isValidElementType=x,_t.typeOf=T}()),_t}var dv;function g8(){return dv||(dv=1,process.env.NODE_ENV==="production"?Rc.exports=p8():Rc.exports=m8()),Rc.exports}var pf,fv;function v8(){if(fv)return pf;fv=1;var e=g8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(g,p,v){if(typeof p!="string"){if(f){var _=d(p);_&&_!==f&&h(g,_,v)}var w=c(p);l&&(w=w.concat(l(p)));for(var x=o(g),T=o(p),b=0;b<w.length;++b){var k=w[b];if(!n[k]&&!(v&&v[k])&&!(T&&T[k])&&!(x&&x[k])){var j=u(p,k);try{s(g,k,j)}catch{}}}}return g}return pf=h,pf}v8();function y8(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function nm(e,t){const n=m.useContext(h8);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=m.useState(()=>n.getAll(i));y8()&&m.useLayoutEffect(()=>{function u(){const d=n.getAll(i);b8(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=m.useMemo(()=>n.set.bind(n),[n]),c=m.useMemo(()=>n.remove.bind(n),[n]),l=m.useMemo(()=>n.update.bind(n),[n]);return[a,s,c,l]}function b8(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const x8=()=>{const{axiosOptions:e,cookieDomain:t}=m.useContext(Kt),[,n,r]=nm(["Authorization"]),i=zt.create(e),a=m.useCallback(()=>{const l=localStorage.getItem("token");return l?{token:l,expiresOn:mb(new Date(Date.now()),1)}:null},[]),o=m.useCallback(()=>{const l=a();return l!==null&&l.token.length>0},[a]),s=m.useCallback(async(l,u)=>i.post("/user/login",{kid:l,password:u}).then(d=>(localStorage.setItem("token",d.data),n("Authorization",d.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:fb(new Date(Date.now()),24)}),d.data)).catch(d=>(console.log(d),null)),[i,n,t]),c=m.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:o,login:s,logout:c,getToken:a}},_8=()=>{const[,,e]=nm(["Authorization"]),{msalScopes:t,msalExtraScopes:n}=m.useContext(om),{instance:r,inProgress:i}=r0.useMsal(),a=r0.useIsAuthenticated(),o=m.useCallback(async()=>{var h;const d=r.getActiveAccount(),f=d??((h=r.getAllAccounts())==null?void 0:h.at(0))??void 0;return f?(d||r.setActiveAccount(f),r.acquireTokenSilent({scopes:t,account:f}).then(g=>({token:g.accessToken,expiresOn:g.expiresOn??new Date(Date.now())})).catch(g=>{if(console.error("Error acquiring token",g),g instanceof n0.InteractionRequiredAuthError)return console.log("Silent token acquisition failed. Acquiring token using redirect"),r.acquireTokenRedirect({scopes:t,extraScopesToConsent:n}),null;throw g})):null},[r,t,n]),s=m.useCallback(()=>a,[a]),c=m.useCallback(()=>!s()&&i!==n0.InteractionStatus.None,[s,i]),l=m.useCallback(async()=>r.loginRedirect({scopes:t,extraScopesToConsent:n}).then(()=>"").catch(()=>null),[r,t,n]),u=m.useCallback(()=>{r.logout(),localStorage.removeItem("user"),e("Authorization")},[e,r]);return{isAuthenticated:s,isAuthenticating:c,login:l,logout:u,getToken:o}},V2=()=>{const{useMsal:e}=m.useContext(om),t=x8(),n=_8();return{isAuthenticated:e?n.isAuthenticated:t.isAuthenticated,isAuthenticating:e?n.isAuthenticating:()=>!1,getToken:e?n.getToken:t.getToken,login:e?n.login:t.login,logout:e?n.logout:t.logout}},w8="_toast_1s57i_1",jo={toast:w8},C8=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},Su=()=>({addNotification:m.useCallback((t,n)=>{const r=h2(t),i=C8(n),a=y.jsxs(y.Fragment,{children:[r,y.jsx(Jx,{onClick:()=>ba.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(oE,{size:12}),className:oe("luminus-toast-success rounded shadow bg-success",jo.toast)});break}case"danger":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(KS,{size:12}),className:oe("luminus-toast-danger rounded shadow bg-danger",jo.toast)});break}case"warning":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(qS,{size:12}),className:oe("luminus-toast-warning rounded shadow bg-warning",jo.toast)});break}case"info":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(GS,{size:12}),className:oe("luminus-toast-info rounded shadow bg-info",jo.toast)});break}case"prompt":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(ZS,{size:12}),className:oe("luminus-toast-prompt rounded shadow bg-light",jo.toast)});break}}},[])}),T8=zt.CancelToken,Eu=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:c,texts:{axios:l}}=m.useContext(Kt),{delegation:u}=m.useContext(o_),d=m.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:f}=Su(),{getToken:h}=V2(),g=m.useMemo(()=>zt.create(c),[c]),p=m.useCallback(async _=>{var w,x,T;if(t&&!_.headers.Authorization){const b=i?{token:i,expiresOn:fb(new Date(Date.now()),1)}:await h();if(!b)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(f6(b.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));_.headers.Authorization=`Bearer ${b.token}`}return d!==null&&!a&&(_.headers.DelegationId=d.toString()),(w=_.url)!=null&&w.includes("culture=")?_.url=(x=_.url)==null?void 0:x.replace(/culture=[a-z]{2}/,`culture=${s}`):_.url=`${_.url}${(T=_.url)!=null&&T.includes("?")?"&":"?"}culture=${s}`,_},[t,h,s,i,d,a]),v=m.useCallback(_=>{var T,b;if(console.log(_),zt.isCancel(_))return Promise.reject(_);const w=Gp(_);if(w.length>0){const k=w.find(j=>j.name.toLowerCase()==="others");return k?(!r&&f(k.errors,"danger"),Promise.reject(_)):(!r&&f(l.validationError,"warning"),Promise.reject(_))}const x=d2(_);return x!==null?(!r&&f(`${l.permissionError}: ${fs(", ",...x)}`,"danger"),Promise.reject(_)):(o??[]).includes((T=_.response)==null?void 0:T.status)?Promise.reject(_):((b=_.response)==null?void 0:b.status)===403?(!r&&f(l.forbiddenError,"danger"),Promise.reject(_)):_.message&&_.message==="Network Error"?(!r&&f(l.networkError,"danger"),Promise.reject(_)):(zt.isCancel(_)||(_.response||_.request)&&!r&&f(l.unexpectedError,"danger"),Promise.reject(_))},[f,l.forbiddenError,l.networkError,l.permissionError,l.unexpectedError,l.validationError,r,o]);return m.useEffect(()=>{n&&(g.defaults.baseURL=n),g.interceptors.request.clear(),g.interceptors.response.clear();const _=g.interceptors.request.use(p,x=>Promise.reject(x)),w=g.interceptors.response.use(x=>x,v);return()=>{g.interceptors.request.eject(_),g.interceptors.response.eject(w)}},[g.defaults,g.interceptors.request,g.interceptors.response,n,p,v]),g};let Po;const rm=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r,textSm:i}=m.useContext(t2),a=()=>{r()};return{confirm:async(l,u)=>(n(l,u),new Promise(d=>{Po=d})),onConfirm:()=>{a(),Po&&Po(!0)},onCancel:()=>{a(),Po&&Po(!1)},show:e,text:t,textSm:i}};var ut;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ut||(ut={}));var _h;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_h||(_h={}));const we=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},fe=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),k8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ln extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof Ln))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ln.create=e=>new Ln(e);const qa=(e,t)=>{let n;switch(e.code){case fe.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case fe.invalid_union:n="Invalid input";break;case fe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case fe.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:n="Invalid function arguments";break;case fe.invalid_return_type:n="Invalid function return type";break;case fe.invalid_date:n="Invalid date";break;case fe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case fe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case fe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case fe.custom:n="Invalid input";break;case fe.invalid_intersection_types:n="Intersection results could not be merged";break;case fe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let q2=qa;function S8(e){q2=e}function kl(){return q2}const Sl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},E8=[];function _e(e,t){const n=kl(),r=Sl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qa?void 0:qa].filter(i=>!!i)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ue;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ue;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Ea=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),wh=e=>e.status==="aborted",Ch=e=>e.status==="dirty",ps=e=>e.status==="valid",ms=e=>typeof Promise<"u"&&e instanceof Promise;function El(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Y2(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));var Go,Zo;class yr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const hv=(e,t)=>{if(ps(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ln(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class tt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ms(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},a=this._parseSync({data:t,path:i.path,parent:i});return hv(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ms(i)?i:Promise.resolve(i));return hv(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:fe.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new cr({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return gr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Ga.create(this,this._def)}or(t){return bs.create([this,t],this._def)}and(t){return xs.create(this,t,this._def)}transform(t){return new cr({...Ke(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ks({...Ke(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new im({typeName:Be.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ss({...Ke(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tc.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const O8=/^c[^\s-]{8,}$/i,M8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Z]{26}$/,A8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,R8=/^[a-z0-9_-]{21}$/i,j8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,P8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mf;const D8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,L8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G2="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F8=new RegExp(`^${G2}$`);function Z2(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function B8(e){return new RegExp(`^${Z2(e)}$`)}function K2(e){let t=`${G2}T${Z2(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function U8(e,t){return!!((t==="v4"||!t)&&D8.test(e)||(t==="v6"||!t)&&N8.test(e))}class ir extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.string,received:a.parsedType}),Ue}const r=new yn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")P8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")mf||(mf=new RegExp(I8,"u")),mf.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")A8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")R8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")O8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")M8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:fe.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:fe.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?K2(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?F8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?B8(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?j8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?U8(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?L8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:fe.invalid_string,message:a.message}),r.dirty()):ut.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:fe.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new ir({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new ir({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ir.create=e=>{var t;return new ir({checks:[],typeName:Be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};function W8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.number,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?W8(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_finite,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}hi.create=e=>new hi({checks:[],typeName:Be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class pi extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==we.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.bigint,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}pi.create=e=>{var t;return new pi({checks:[],typeName:Be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};class gs extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.boolean,received:r.parsedType}),Ue}return kn(t.data)}}gs.create=e=>new gs({typeName:Be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class Ki extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.date,received:a.parsedType}),Ue}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_date}),Ue}const r=new yn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ut.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Be.ZodDate,...Ke(e)});class Ol extends tt{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.symbol,received:r.parsedType}),Ue}return kn(t.data)}}Ol.create=e=>new Ol({typeName:Be.ZodSymbol,...Ke(e)});class vs extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.undefined,received:r.parsedType}),Ue}return kn(t.data)}}vs.create=e=>new vs({typeName:Be.ZodUndefined,...Ke(e)});class ys extends tt{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.null,received:r.parsedType}),Ue}return kn(t.data)}}ys.create=e=>new ys({typeName:Be.ZodNull,...Ke(e)});class Ya extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}Ya.create=e=>new Ya({typeName:Be.ZodAny,...Ke(e)});class zi extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}zi.create=e=>new zi({typeName:Be.ZodUnknown,...Ke(e)});class Vr extends tt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:fe.invalid_type,expected:we.never,received:n.parsedType}),Ue}}Vr.create=e=>new Vr({typeName:Be.ZodNever,...Ke(e)});class Ml extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.void,received:r.parsedType}),Ue}return kn(t.data)}}Ml.create=e=>new Ml({typeName:Be.ZodVoid,...Ke(e)});class or extends tt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return _e(n,{code:fe.invalid_type,expected:we.array,received:n.parsedType}),Ue;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?fe.too_big:fe.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:fe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:fe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new yr(n,o,n.path,s)))).then(o=>yn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new yr(n,o,n.path,s)));return yn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ke(t)});function Sa(e){if(e instanceof Zt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=gr.create(Sa(r))}return new Zt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:Sa(e.element)}):e instanceof gr?gr.create(Sa(e.unwrap())):e instanceof gi?gi.create(Sa(e.unwrap())):e instanceof br?br.create(e.items.map(t=>Sa(t))):e}class Zt extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return _e(l,{code:fe.invalid_type,expected:we.object,received:l.parsedType}),Ue}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new yr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(_e(i,{code:fe.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new yr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>yn.mergeObjectSync(r,l)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Zt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ae.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Zt({...this._def,unknownKeys:"strip"})}passthrough(){return new Zt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}deepPartial(){return Sa(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof gr;)a=a._def.innerType;n[r]=a}}),new Zt({...this._def,shape:()=>n})}keyof(){return X2(ut.objectKeys(this.shape))}}Zt.create=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.strictCreate=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.lazycreate=(e,t)=>new Zt({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});class bs extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Ln(s.ctx.common.issues));return _e(n,{code:fe.invalid_union,unionErrors:o}),Ue}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Ln(c));return _e(n,{code:fe.invalid_union,unionErrors:s}),Ue}}get options(){return this._def.options}}bs.create=(e,t)=>new bs({options:e,typeName:Be.ZodUnion,...Ke(t)});const Pr=e=>e instanceof ws?Pr(e.schema):e instanceof cr?Pr(e.innerType()):e instanceof Cs?[e.value]:e instanceof mi?e.options:e instanceof Ts?ut.objectValues(e.enum):e instanceof ks?Pr(e._def.innerType):e instanceof vs?[void 0]:e instanceof ys?[null]:e instanceof gr?[void 0,...Pr(e.unwrap())]:e instanceof gi?[null,...Pr(e.unwrap())]:e instanceof im||e instanceof Es?Pr(e.unwrap()):e instanceof Ss?Pr(e._def.innerType):[];class Ou extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return _e(n,{code:fe.invalid_type,expected:we.object,received:n.parsedType}),Ue;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Pr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Ou({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ke(r)})}}function Th(e,t){const n=ai(e),r=ai(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=ut.objectKeys(t),a=ut.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=Th(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=Th(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xs extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wh(a)||wh(o))return Ue;const s=Th(a.value,o.value);return s.valid?((Ch(a)||Ch(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:fe.invalid_intersection_types}),Ue)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}xs.create=(e,t,n)=>new xs({left:e,right:t,typeName:Be.ZodIntersection,...Ke(n)});class br extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return _e(r,{code:fe.invalid_type,expected:we.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return _e(r,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new yr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>yn.mergeArray(n,o)):yn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new br({...this._def,rest:t})}}br.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new br({items:e,typeName:Be.ZodTuple,rest:null,...Ke(t)})};class _s extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return _e(r,{code:fe.invalid_type,expected:we.object,received:r.parsedType}),Ue;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new yr(r,s,r.path,s)),value:o._parse(new yr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?yn.mergeObjectAsync(n,i):yn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof tt?new _s({keyType:t,valueType:n,typeName:Be.ZodRecord,...Ke(r)}):new _s({keyType:ir.create(),valueType:t,typeName:Be.ZodRecord,...Ke(n)})}}class $l extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.map)return _e(r,{code:fe.invalid_type,expected:we.map,received:r.parsedType}),Ue;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new yr(r,s,r.path,[l,"key"])),value:a._parse(new yr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}$l.create=(e,t,n)=>new $l({valueType:t,keyType:e,typeName:Be.ZodMap,...Ke(n)});class Xi extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return _e(r,{code:fe.invalid_type,expected:we.set,received:r.parsedType}),Ue;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:fe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:fe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Ue;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new yr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Xi({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new Xi({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xi.create=(e,t)=>new Xi({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ke(t)});class Ra extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return _e(n,{code:fe.invalid_type,expected:we.function,received:n.parsedType}),Ue;function r(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_arguments,argumentsError:c}})}function i(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ga){const s=this;return kn(async function(...c){const l=new Ln([]),u=await s._def.args.parseAsync(c,a).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw l.addIssue(i(d,h)),l})})}else{const s=this;return kn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Ln([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new Ln([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ra({...this._def,args:br.create(t).rest(zi.create())})}returns(t){return new Ra({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ra({args:t||br.create([]).rest(zi.create()),returns:n||zi.create(),typeName:Be.ZodFunction,...Ke(r)})}}class ws extends tt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ws.create=(e,t)=>new ws({getter:e,typeName:Be.ZodLazy,...Ke(t)});class Cs extends tt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:fe.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cs.create=(e,t)=>new Cs({value:e,typeName:Be.ZodLiteral,...Ke(t)});function X2(e,t){return new mi({values:e,typeName:Be.ZodEnum,...Ke(t)})}class mi extends tt{constructor(){super(...arguments),Go.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:ut.joinValues(r),received:n.parsedType,code:fe.invalid_type}),Ue}if(El(this,Go)||Y2(this,Go,new Set(this._def.values)),!El(this,Go).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:fe.invalid_enum_value,options:r}),Ue}return kn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Go=new WeakMap;mi.create=X2;class Ts extends tt{constructor(){super(...arguments),Zo.set(this,void 0)}_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=ut.objectValues(n);return _e(r,{expected:ut.joinValues(i),received:r.parsedType,code:fe.invalid_type}),Ue}if(El(this,Zo)||Y2(this,Zo,new Set(ut.getValidEnumValues(this._def.values))),!El(this,Zo).has(t.data)){const i=ut.objectValues(n);return _e(r,{received:r.data,code:fe.invalid_enum_value,options:i}),Ue}return kn(t.data)}get enum(){return this._def.values}}Zo=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:Be.ZodNativeEnum,...Ke(t)});class Ga extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return _e(n,{code:fe.invalid_type,expected:we.promise,received:n.parsedType}),Ue;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return kn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ga.create=(e,t)=>new Ga({type:e,typeName:Be.ZodPromise,...Ke(t)});class cr extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Ue;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Ue:c.status==="dirty"||n.value==="dirty"?Ea(c.value):c});{if(n.value==="aborted")return Ue;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Ue:s.status==="dirty"||n.value==="dirty"?Ea(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ps(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ps(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ut.assertNever(i)}}cr.create=(e,t,n)=>new cr({schema:e,typeName:Be.ZodEffects,effect:t,...Ke(n)});cr.createWithPreprocess=(e,t,n)=>new cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ke(n)});class gr extends tt{_parse(t){return this._getType(t)===we.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gr.create=(e,t)=>new gr({innerType:e,typeName:Be.ZodOptional,...Ke(t)});class gi extends tt{_parse(t){return this._getType(t)===we.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Be.ZodNullable,...Ke(t)});class ks extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class Ss extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ms(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ss.create=(e,t)=>new Ss({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class Al extends tt{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}Al.create=e=>new Al({typeName:Be.ZodNaN,...Ke(e)});const z8=Symbol("zod_brand");class im extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tc extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ue:a.status==="dirty"?(n.dirty(),Ea(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ue:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tc({in:t,out:n,typeName:Be.ZodPipeline})}}class Es extends tt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ps(i)&&(i.value=Object.freeze(i.value)),i);return ms(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Be.ZodReadonly,...Ke(t)});function Q2(e,t={},n){return e?Ya.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):Ya.create()}const H8={object:Zt.lazycreate};var Be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Be||(Be={}));const V8=(e,t={message:`Input not instance of ${e.name}`})=>Q2(n=>n instanceof e,t),J2=ir.create,e_=hi.create,q8=Al.create,Y8=pi.create,t_=gs.create,G8=Ki.create,Z8=Ol.create,K8=vs.create,X8=ys.create,Q8=Ya.create,J8=zi.create,e$=Vr.create,t$=Ml.create,n$=or.create,r$=Zt.create,i$=Zt.strictCreate,a$=bs.create,o$=Ou.create,s$=xs.create,c$=br.create,l$=_s.create,u$=$l.create,d$=Xi.create,f$=Ra.create,h$=ws.create,p$=Cs.create,m$=mi.create,g$=Ts.create,v$=Ga.create,pv=cr.create,y$=gr.create,b$=gi.create,x$=cr.createWithPreprocess,_$=tc.create,w$=()=>J2().optional(),C$=()=>e_().optional(),T$=()=>t_().optional(),k$={string:e=>ir.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>gs.create({...e,coerce:!0}),bigint:e=>pi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},S$=Ue;var sn=Object.freeze({__proto__:null,defaultErrorMap:qa,setErrorMap:S8,getErrorMap:kl,makeIssue:Sl,EMPTY_PATH:E8,addIssueToContext:_e,ParseStatus:yn,INVALID:Ue,DIRTY:Ea,OK:kn,isAborted:wh,isDirty:Ch,isValid:ps,isAsync:ms,get util(){return ut},get objectUtil(){return _h},ZodParsedType:we,getParsedType:ai,ZodType:tt,datetimeRegex:K2,ZodString:ir,ZodNumber:hi,ZodBigInt:pi,ZodBoolean:gs,ZodDate:Ki,ZodSymbol:Ol,ZodUndefined:vs,ZodNull:ys,ZodAny:Ya,ZodUnknown:zi,ZodNever:Vr,ZodVoid:Ml,ZodArray:or,ZodObject:Zt,ZodUnion:bs,ZodDiscriminatedUnion:Ou,ZodIntersection:xs,ZodTuple:br,ZodRecord:_s,ZodMap:$l,ZodSet:Xi,ZodFunction:Ra,ZodLazy:ws,ZodLiteral:Cs,ZodEnum:mi,ZodNativeEnum:Ts,ZodPromise:Ga,ZodEffects:cr,ZodTransformer:cr,ZodOptional:gr,ZodNullable:gi,ZodDefault:ks,ZodCatch:Ss,ZodNaN:Al,BRAND:z8,ZodBranded:im,ZodPipeline:tc,ZodReadonly:Es,custom:Q2,Schema:tt,ZodSchema:tt,late:H8,get ZodFirstPartyTypeKind(){return Be},coerce:k$,any:Q8,array:n$,bigint:Y8,boolean:t_,date:G8,discriminatedUnion:o$,effect:pv,enum:m$,function:f$,instanceof:V8,intersection:s$,lazy:h$,literal:p$,map:u$,nan:q8,nativeEnum:g$,never:e$,null:X8,nullable:b$,number:e_,object:r$,oboolean:T$,onumber:C$,optional:y$,ostring:w$,pipeline:_$,preprocess:x$,promise:v$,record:l$,set:d$,strictObject:i$,string:J2,symbol:Z8,transformer:pv,tuple:c$,undefined:K8,union:a$,unknown:J8,void:t$,NEVER:S$,ZodIssueCode:fe,quotelessJson:k8,ZodError:Ln});const Mu=()=>{const{texts:{formValidation:e}}=m.useContext(Kt),t=m.useCallback(p=>{let v=(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required});return p!=null&&p.email&&(v=v.email(e.invalidEmail)),p!=null&&p.length&&(v=v.min(p.length,e.length(p.length))),p!=null&&p.minLength&&(v=v.min(p.minLength,e.minLength(p.minLength))),p!=null&&p.maxLength&&(v=v.max(p.maxLength,e.maxLength(p.maxLength))),p!=null&&p.numeric&&(v=v.regex(/^\d+$/,e.noCharactersOtherThanNumbers)),p!=null&&p.regex&&(v=v.regex(p.regex,e.invalidFormat)),v.transform(_=>_??null)},[e]),n=m.useCallback(p=>t(p).nullable().optional().transform(v=>v??null),[t]),r=m.useCallback(p=>{const v=(p==null?void 0:p.min)??Number.MIN_SAFE_INTEGER,_=(p==null?void 0:p.max)??Number.MAX_SAFE_INTEGER,w=(p!=null&&p.useCoerce?sn.coerce:sn).number({invalid_type_error:e.required,required_error:e.required}).min(v,e.lessThanMin(v)).max(_,e.moreThanMax(_));return w.transform(x=>x??null),w},[e]),i=m.useCallback(p=>r(p).nullable().optional().transform(v=>v??null),[r]),a=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).boolean({invalid_type_error:e.required,required_error:e.required}).transform(v=>v??null),[e.required]),o=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required}).refine(m2,{message:e.invalidDate}).transform(_=>_??null),[e.invalidDate,e.required]),s=m.useCallback(p=>o(p).nullable().transform(v=>v??null),[o]),c=m.useCallback((p,v)=>sn.enum(p,{invalid_type_error:e.required,required_error:e.required}).transform(w=>w??null),[e.required]),l=m.useCallback((p,v)=>c(p,v).nullable().transform(_=>_??null),[c]),u=m.useCallback(p=>sn.object({id:i({useCoerce:!0})}).nullable().transform(_=>_??null),[i]),d=m.useCallback(p=>sn.object({id:r()}).transform(_=>_??null),[r]),f=m.useCallback(p=>sn.object({id:n({useCoerce:!0})}).nullable().transform(_=>_??null),[n]),h=m.useCallback(p=>sn.object({id:t()}).transform(_=>_??null),[t]),g=m.useCallback(({required:p,multiple:v,maxFileSize:_})=>sn.any().transform(x=>Array.from(x??[])).refine(x=>!p||(x==null?void 0:x.length)>0,"File is required.").refine(x=>v||(x==null?void 0:x.length)<=1,"Multiple files not allowed.").refine(x=>x.every(T=>T.size<=_),`Maximum file size is ${Ha(_)}.`).transform(x=>(v?x:x==null?void 0:x[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:i,zNumberRequired:r,zBool:a,zDate:s,zDateRequired:o,zEnum:l,zEnumRequired:c,zObjectIdInt:u,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:h,zFile:g}},n_=(e,t)=>{m.useEffect(()=>{const n=r=>{e.some(i=>i.current&&i.current.contains(r.target))||t()};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}},[e,t])},r_=()=>{const{user:e}=m.useContext(c2);return{checkUserHasPermissions:m.useCallback((n,r="any")=>n.length===0?!0:r==="any"?n.some(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}):n.every(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}),[e])}},i_=(e,t)=>{m.useEffect(()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),[e]),m.useEffect(()=>t===void 0?()=>{}:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),[t])},am=(e,t,n)=>m.useMemo(()=>n||e!=="date"&&e!=="datetime-local"&&e!=="time"||t?e:"text",[t,e,n]),a_=()=>{const{addNotification:e}=Su(),{texts:{clipboard:t}}=m.useContext(Kt);return{copyToClipboard:m.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},nc=()=>{const[e,t]=m.useState(window.innerWidth),[n,r]=m.useState(window.innerHeight),i=()=>{t(window.innerWidth),r(window.innerHeight)};return m.useEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),{width:e,height:n,isMobile:e<992}},om=m.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[]}),o_=m.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),s_=m.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),c_=m.createContext(void 0),mv={falseIfNotInit:!1},$u=({falseIfNotInit:e=mv.falseIfNotInit}=mv)=>{const t=m.useContext(c_);if(!e&&t===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return t??!1},E$="_button_1wjon_1",O$="_filled_1wjon_7",M$="_sm_1wjon_13",$$="_md_1wjon_18",A$="_lg_1wjon_23",xa={button:E$,filled:O$,sm:M$,md:$$,lg:A$},Qi=({variant:e="filled",color:t="primary",size:n="md",className:r,children:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):a.as==="button"||a.as===void 0?y.jsx("button",{type:"button",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):null,R$="_button_1r3i0_1",kh={button:R$},Au=({color:e="primary",icon:t,className:n,children:r,...i})=>i.as==="link"?y.jsxs(to.Link,{to:i.href??"/",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):i.as==="button"||i.as===void 0?y.jsxs("button",{type:"button",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):null,j$=m.forwardRef(({color:e="primary",icon:t=y.jsx(Qx,{size:12}),inputId:n="context-file-input",accept:r="*",onUpload:i,className:a,children:o,multiple:s,...c},l)=>{const u=d=>{d.target.files&&(i(d.target.files),d.target.value="")};return y.jsxs(y.Fragment,{children:[y.jsxs("label",{ref:l,htmlFor:n,className:oe(`luminus-context-button btn text-${e} ${a??""}`,kh.button),...c,children:[t,o]}),y.jsx("input",{id:n,type:"file",accept:r,onChange:u,hidden:!0,multiple:s})]})}),P$="_icon-button_15e26_1",I$="_sm_15e26_14",D$="_md_15e26_23",N$="_lg_15e26_32",jc={"icon-button":"_icon-button_15e26_1",iconButton:P$,sm:I$,md:D$,lg:N$},rc=({type:e="button",color:t="primary",size:n="md",children:r,className:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):a.as==="button"||a.as===void 0?y.jsx("button",{type:e,className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):null,L$="_avatar-icon_1axl6_1",F$={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:L$},l_=({name:e,fontSize:t,size:n})=>{const r=m.useMemo(()=>{const o=e.split(" ");return o.length<2?e:fs(" ",o.at(o.length-2),o.at(o.length-1))},[e]),i=m.useMemo(()=>{const o=r.split(" ");return fs("",...o.map(s=>s.at(0)??void 0))},[r]),a=o=>{let s=0,c;for(c=0;c<o.length;c+=1)s=o.charCodeAt(c)+((s<<5)-s);let l="#";for(c=0;c<3;c+=1){const u=s>>c*8&255;l+=`00${u.toString(16)}`.slice(-2)}return l};return y.jsx(Gx,{placement:"bottom",overlay:y.jsx(qx,{children:e}),children:y.jsx("div",{className:oe("luminus-avatar-icon",F$.avatarIcon),style:{backgroundColor:a(r),fontSize:t??void 0,minHeight:n??void 0,height:n??void 0,maxHeight:n??void 0,minWidth:n??void 0,width:n??void 0,maxWidth:n??void 0},children:y.jsx("div",{children:i})})})};var sm={},Rl={exports:{}};Rl.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",v="[object Number]",_="[object Null]",w="[object Object]",x="[object Promise]",T="[object Proxy]",b="[object RegExp]",k="[object Set]",j="[object String]",M="[object Symbol]",S="[object Undefined]",E="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",$="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",q="[object Uint8ClampedArray]",W="[object Uint16Array]",G="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ie=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,X={};X[$]=X[A]=X[P]=X[N]=X[F]=X[z]=X[q]=X[W]=X[G]=!0,X[s]=X[c]=X[C]=X[u]=X[O]=X[d]=X[f]=X[h]=X[p]=X[v]=X[w]=X[b]=X[k]=X[j]=X[E]=!1;var K=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,te=typeof self=="object"&&self&&self.Object===Object&&self,D=K||te||Function("return this")(),I=t&&!t.nodeType&&t,L=I&&!0&&e&&!e.nodeType&&e,V=L&&L.exports===I,R=V&&K.process,Z=function(){try{return R&&R.binding&&R.binding("util")}catch{}}(),J=Z&&Z.isTypedArray;function ne(B,Y){for(var le=-1,Te=B==null?0:B.length,Nt=0,Qe=[];++le<Te;){var Qt=B[le];Y(Qt,le,B)&&(Qe[Nt++]=Qt)}return Qe}function he(B,Y){for(var le=-1,Te=Y.length,Nt=B.length;++le<Te;)B[Nt+le]=Y[le];return B}function be(B,Y){for(var le=-1,Te=B==null?0:B.length;++le<Te;)if(Y(B[le],le,B))return!0;return!1}function ge(B,Y){for(var le=-1,Te=Array(B);++le<B;)Te[le]=Y(le);return Te}function We(B){return function(Y){return B(Y)}}function Re(B,Y){return B.has(Y)}function et(B,Y){return B==null?void 0:B[Y]}function qe(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te,Nt){le[++Y]=[Nt,Te]}),le}function pe(B,Y){return function(le){return B(Y(le))}}function Ee(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te){le[++Y]=Te}),le}var Oe=Array.prototype,Ce=Function.prototype,Le=Object.prototype,rt=D["__core-js_shared__"],Pt=Ce.toString,it=Le.hasOwnProperty,st=function(){var B=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return B?"Symbol(src)_1."+B:""}(),pt=Le.toString,It=RegExp("^"+Pt.call(it).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=V?D.Buffer:void 0,dt=D.Symbol,mt=D.Uint8Array,Ut=Le.propertyIsEnumerable,Ne=Oe.splice,je=dt?dt.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,lt=ct?ct.isBuffer:void 0,gt=pe(Object.keys,Object),kt=ma(D,"DataView"),Vt=ma(D,"Map"),At=ma(D,"Promise"),Dt=ma(D,"Set"),qt=ma(D,"WeakMap"),vt=ma(Object,"create"),Yt=ki(kt),rn=ki(Vt),Jt=ki(At),ve=ki(Dt),Se=ki(qt),Pe=dt?dt.prototype:void 0,Ge=Pe?Pe.valueOf:void 0;function ze(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function ft(){this.__data__=vt?vt(null):{},this.size=0}function U(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y}function ce(B){var Y=this.__data__;if(vt){var le=Y[B];return le===r?void 0:le}return it.call(Y,B)?Y[B]:void 0}function ae(B){var Y=this.__data__;return vt?Y[B]!==void 0:it.call(Y,B)}function se(B,Y){var le=this.__data__;return this.size+=this.has(B)?0:1,le[B]=vt&&Y===void 0?r:Y,this}ze.prototype.clear=ft,ze.prototype.delete=U,ze.prototype.get=ce,ze.prototype.has=ae,ze.prototype.set=se;function ye(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Me(){this.__data__=[],this.size=0}function xe(B){var Y=this.__data__,le=xc(Y,B);if(le<0)return!1;var Te=Y.length-1;return le==Te?Y.pop():Ne.call(Y,le,1),--this.size,!0}function ke(B){var Y=this.__data__,le=xc(Y,B);return le<0?void 0:Y[le][1]}function Fe(B){return xc(this.__data__,B)>-1}function Ie(B,Y){var le=this.__data__,Te=xc(le,B);return Te<0?(++this.size,le.push([B,Y])):le[Te][1]=Y,this}ye.prototype.clear=Me,ye.prototype.delete=xe,ye.prototype.get=ke,ye.prototype.has=Fe,ye.prototype.set=Ie;function Xe(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Wt(){this.size=0,this.__data__={hash:new ze,map:new(Vt||ye),string:new ze}}function Et(B){var Y=_c(this,B).delete(B);return this.size-=Y?1:0,Y}function Xt(B){return _c(this,B).get(B)}function me(B){return _c(this,B).has(B)}function ln(B,Y){var le=_c(this,B),Te=le.size;return le.set(B,Y),this.size+=le.size==Te?0:1,this}Xe.prototype.clear=Wt,Xe.prototype.delete=Et,Xe.prototype.get=Xt,Xe.prototype.has=me,Xe.prototype.set=ln;function Ot(B){var Y=-1,le=B==null?0:B.length;for(this.__data__=new Xe;++Y<le;)this.add(B[Y])}function Jn(B){return this.__data__.set(B,r),this}function yc(B){return this.__data__.has(B)}Ot.prototype.add=Ot.prototype.push=Jn,Ot.prototype.has=yc;function er(B){var Y=this.__data__=new ye(B);this.size=Y.size}function Ti(){this.__data__=new ye,this.size=0}function bc(B){var Y=this.__data__,le=Y.delete(B);return this.size=Y.size,le}function Mr(B){return this.__data__.get(B)}function qd(B){return this.__data__.has(B)}function $r(B,Y){var le=this.__data__;if(le instanceof ye){var Te=le.__data__;if(!Vt||Te.length<n-1)return Te.push([B,Y]),this.size=++le.size,this;le=this.__data__=new Xe(Te)}return le.set(B,Y),this.size=le.size,this}er.prototype.clear=Ti,er.prototype.delete=bc,er.prototype.get=Mr,er.prototype.has=qd,er.prototype.set=$r;function Co(B,Y){var le=wc(B),Te=!le&&qC(B),Nt=!le&&!Te&&Yd(B),Qe=!le&&!Te&&!Nt&&e0(B),Qt=le||Te||Nt||Qe,an=Qt?ge(B.length,String):[],un=an.length;for(var Gt in B)it.call(B,Gt)&&!(Qt&&(Gt=="length"||Nt&&(Gt=="offset"||Gt=="parent")||Qe&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||UC(Gt,un)))&&an.push(Gt);return an}function xc(B,Y){for(var le=B.length;le--;)if(Kg(B[le][0],Y))return le;return-1}function RC(B,Y,le){var Te=Y(B);return wc(B)?Te:he(Te,le(B))}function To(B){return B==null?B===void 0?S:_:je&&je in Object(B)?FC(B):VC(B)}function qg(B){return ko(B)&&To(B)==s}function Yg(B,Y,le,Te,Nt){return B===Y?!0:B==null||Y==null||!ko(B)&&!ko(Y)?B!==B&&Y!==Y:jC(B,Y,le,Te,Yg,Nt)}function jC(B,Y,le,Te,Nt,Qe){var Qt=wc(B),an=wc(Y),un=Qt?c:Zr(B),Gt=an?c:Zr(Y);un=un==s?w:un,Gt=Gt==s?w:Gt;var In=un==w,tr=Gt==w,fn=un==Gt;if(fn&&Yd(B)){if(!Yd(Y))return!1;Qt=!0,In=!1}if(fn&&!In)return Qe||(Qe=new er),Qt||e0(B)?Gg(B,Y,le,Te,Nt,Qe):NC(B,Y,un,le,Te,Nt,Qe);if(!(le&i)){var Bn=In&&it.call(B,"__wrapped__"),Un=tr&&it.call(Y,"__wrapped__");if(Bn||Un){var Kr=Bn?B.value():B,Ar=Un?Y.value():Y;return Qe||(Qe=new er),Nt(Kr,Ar,le,Te,Qe)}}return fn?(Qe||(Qe=new er),LC(B,Y,le,Te,Nt,Qe)):!1}function PC(B){if(!Jg(B)||zC(B))return!1;var Y=Xg(B)?It:ie;return Y.test(ki(B))}function IC(B){return ko(B)&&Qg(B.length)&&!!X[To(B)]}function DC(B){if(!HC(B))return gt(B);var Y=[];for(var le in Object(B))it.call(B,le)&&le!="constructor"&&Y.push(le);return Y}function Gg(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=B.length,un=Y.length;if(an!=un&&!(Qt&&un>an))return!1;var Gt=Qe.get(B);if(Gt&&Qe.get(Y))return Gt==Y;var In=-1,tr=!0,fn=le&a?new Ot:void 0;for(Qe.set(B,Y),Qe.set(Y,B);++In<an;){var Bn=B[In],Un=Y[In];if(Te)var Kr=Qt?Te(Un,Bn,In,Y,B,Qe):Te(Bn,Un,In,B,Y,Qe);if(Kr!==void 0){if(Kr)continue;tr=!1;break}if(fn){if(!be(Y,function(Ar,Si){if(!Re(fn,Si)&&(Bn===Ar||Nt(Bn,Ar,le,Te,Qe)))return fn.push(Si)})){tr=!1;break}}else if(!(Bn===Un||Nt(Bn,Un,le,Te,Qe))){tr=!1;break}}return Qe.delete(B),Qe.delete(Y),tr}function NC(B,Y,le,Te,Nt,Qe,Qt){switch(le){case O:if(B.byteLength!=Y.byteLength||B.byteOffset!=Y.byteOffset)return!1;B=B.buffer,Y=Y.buffer;case C:return!(B.byteLength!=Y.byteLength||!Qe(new mt(B),new mt(Y)));case u:case d:case v:return Kg(+B,+Y);case f:return B.name==Y.name&&B.message==Y.message;case b:case j:return B==Y+"";case p:var an=qe;case k:var un=Te&i;if(an||(an=Ee),B.size!=Y.size&&!un)return!1;var Gt=Qt.get(B);if(Gt)return Gt==Y;Te|=a,Qt.set(B,Y);var In=Gg(an(B),an(Y),Te,Nt,Qe,Qt);return Qt.delete(B),In;case M:if(Ge)return Ge.call(B)==Ge.call(Y)}return!1}function LC(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=Zg(B),un=an.length,Gt=Zg(Y),In=Gt.length;if(un!=In&&!Qt)return!1;for(var tr=un;tr--;){var fn=an[tr];if(!(Qt?fn in Y:it.call(Y,fn)))return!1}var Bn=Qe.get(B);if(Bn&&Qe.get(Y))return Bn==Y;var Un=!0;Qe.set(B,Y),Qe.set(Y,B);for(var Kr=Qt;++tr<un;){fn=an[tr];var Ar=B[fn],Si=Y[fn];if(Te)var t0=Qt?Te(Si,Ar,fn,Y,B,Qe):Te(Ar,Si,fn,B,Y,Qe);if(!(t0===void 0?Ar===Si||Nt(Ar,Si,le,Te,Qe):t0)){Un=!1;break}Kr||(Kr=fn=="constructor")}if(Un&&!Kr){var Cc=B.constructor,Tc=Y.constructor;Cc!=Tc&&"constructor"in B&&"constructor"in Y&&!(typeof Cc=="function"&&Cc instanceof Cc&&typeof Tc=="function"&&Tc instanceof Tc)&&(Un=!1)}return Qe.delete(B),Qe.delete(Y),Un}function Zg(B){return RC(B,ZC,BC)}function _c(B,Y){var le=B.__data__;return WC(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function ma(B,Y){var le=et(B,Y);return PC(le)?le:void 0}function FC(B){var Y=it.call(B,je),le=B[je];try{B[je]=void 0;var Te=!0}catch{}var Nt=pt.call(B);return Te&&(Y?B[je]=le:delete B[je]),Nt}var BC=Ye?function(B){return B==null?[]:(B=Object(B),ne(Ye(B),function(Y){return Ut.call(B,Y)}))}:KC,Zr=To;(kt&&Zr(new kt(new ArrayBuffer(1)))!=O||Vt&&Zr(new Vt)!=p||At&&Zr(At.resolve())!=x||Dt&&Zr(new Dt)!=k||qt&&Zr(new qt)!=E)&&(Zr=function(B){var Y=To(B),le=Y==w?B.constructor:void 0,Te=le?ki(le):"";if(Te)switch(Te){case Yt:return O;case rn:return p;case Jt:return x;case ve:return k;case Se:return E}return Y});function UC(B,Y){return Y=Y??o,!!Y&&(typeof B=="number"||Q.test(B))&&B>-1&&B%1==0&&B<Y}function WC(B){var Y=typeof B;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?B!=="__proto__":B===null}function zC(B){return!!st&&st in B}function HC(B){var Y=B&&B.constructor,le=typeof Y=="function"&&Y.prototype||Le;return B===le}function VC(B){return pt.call(B)}function ki(B){if(B!=null){try{return Pt.call(B)}catch{}try{return B+""}catch{}}return""}function Kg(B,Y){return B===Y||B!==B&&Y!==Y}var qC=qg(function(){return arguments}())?qg:function(B){return ko(B)&&it.call(B,"callee")&&!Ut.call(B,"callee")},wc=Array.isArray;function YC(B){return B!=null&&Qg(B.length)&&!Xg(B)}var Yd=lt||XC;function GC(B,Y){return Yg(B,Y)}function Xg(B){if(!Jg(B))return!1;var Y=To(B);return Y==h||Y==g||Y==l||Y==T}function Qg(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function Jg(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function ko(B){return B!=null&&typeof B=="object"}var e0=J?We(J):IC;function ZC(B){return YC(B)?Co(B):DC(B)}function KC(){return[]}function XC(){return!1}e.exports=GC})(Rl,Rl.exports);var B$=Rl.exports,u_={exports:{}};(function(e,t){var n=function(){var r=function(b,k){var j=236,M=17,S=b,E=a[k],C=null,O=0,$=null,A=[],P={},N=function(D,I){O=S*4+17,C=function(L){for(var V=new Array(L),R=0;R<L;R+=1){V[R]=new Array(L);for(var Z=0;Z<L;Z+=1)V[R][Z]=null}return V}(O),F(0,0),F(O-7,0),F(0,O-7),W(),q(),ee(D,I),S>=7&&G(D),$==null&&($=X(S,E,A)),ie($,I)},F=function(D,I){for(var L=-1;L<=7;L+=1)if(!(D+L<=-1||O<=D+L))for(var V=-1;V<=7;V+=1)I+V<=-1||O<=I+V||(0<=L&&L<=6&&(V==0||V==6)||0<=V&&V<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=V&&V<=4?C[D+L][I+V]=!0:C[D+L][I+V]=!1)},z=function(){for(var D=0,I=0,L=0;L<8;L+=1){N(!0,L);var V=s.getLostPoint(P);(L==0||D>V)&&(D=V,I=L)}return I},q=function(){for(var D=8;D<O-8;D+=1)C[D][6]==null&&(C[D][6]=D%2==0);for(var I=8;I<O-8;I+=1)C[6][I]==null&&(C[6][I]=I%2==0)},W=function(){for(var D=s.getPatternPosition(S),I=0;I<D.length;I+=1)for(var L=0;L<D.length;L+=1){var V=D[I],R=D[L];if(C[V][R]==null)for(var Z=-2;Z<=2;Z+=1)for(var J=-2;J<=2;J+=1)Z==-2||Z==2||J==-2||J==2||Z==0&&J==0?C[V+Z][R+J]=!0:C[V+Z][R+J]=!1}},G=function(D){for(var I=s.getBCHTypeNumber(S),L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[Math.floor(L/3)][L%3+O-8-3]=V}for(var L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[L%3+O-8-3][Math.floor(L/3)]=V}},ee=function(D,I){for(var L=E<<3|I,V=s.getBCHTypeInfo(L),R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<6?C[R][8]=Z:R<8?C[R+1][8]=Z:C[O-15+R][8]=Z}for(var R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<8?C[8][O-R-1]=Z:R<9?C[8][15-R-1+1]=Z:C[8][15-R-1]=Z}C[O-8][8]=!D},ie=function(D,I){for(var L=-1,V=O-1,R=7,Z=0,J=s.getMaskFunction(I),ne=O-1;ne>0;ne-=2)for(ne==6&&(ne-=1);;){for(var he=0;he<2;he+=1)if(C[V][ne-he]==null){var be=!1;Z<D.length&&(be=(D[Z]>>>R&1)==1);var ge=J(V,ne-he);ge&&(be=!be),C[V][ne-he]=be,R-=1,R==-1&&(Z+=1,R=7)}if(V+=L,V<0||O<=V){V-=L,L=-L;break}}},Q=function(D,I){for(var L=0,V=0,R=0,Z=new Array(I.length),J=new Array(I.length),ne=0;ne<I.length;ne+=1){var he=I[ne].dataCount,be=I[ne].totalCount-he;V=Math.max(V,he),R=Math.max(R,be),Z[ne]=new Array(he);for(var ge=0;ge<Z[ne].length;ge+=1)Z[ne][ge]=255&D.getBuffer()[ge+L];L+=he;var We=s.getErrorCorrectPolynomial(be),Re=l(Z[ne],We.getLength()-1),et=Re.mod(We);J[ne]=new Array(We.getLength()-1);for(var ge=0;ge<J[ne].length;ge+=1){var qe=ge+et.getLength()-J[ne].length;J[ne][ge]=qe>=0?et.getAt(qe):0}}for(var pe=0,ge=0;ge<I.length;ge+=1)pe+=I[ge].totalCount;for(var Ee=new Array(pe),Oe=0,ge=0;ge<V;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<Z[ne].length&&(Ee[Oe]=Z[ne][ge],Oe+=1);for(var ge=0;ge<R;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<J[ne].length&&(Ee[Oe]=J[ne][ge],Oe+=1);return Ee},X=function(D,I,L){for(var V=u.getRSBlocks(D,I),R=d(),Z=0;Z<L.length;Z+=1){var J=L[Z];R.put(J.getMode(),4),R.put(J.getLength(),s.getLengthInBits(J.getMode(),D)),J.write(R)}for(var ne=0,Z=0;Z<V.length;Z+=1)ne+=V[Z].dataCount;if(R.getLengthInBits()>ne*8)throw"code length overflow. ("+R.getLengthInBits()+">"+ne*8+")";for(R.getLengthInBits()+4<=ne*8&&R.put(0,4);R.getLengthInBits()%8!=0;)R.putBit(!1);for(;!(R.getLengthInBits()>=ne*8||(R.put(j,8),R.getLengthInBits()>=ne*8));)R.put(M,8);return Q(R,V)};P.addData=function(D,I){I=I||"Byte";var L=null;switch(I){case"Numeric":L=f(D);break;case"Alphanumeric":L=h(D);break;case"Byte":L=g(D);break;case"Kanji":L=p(D);break;default:throw"mode:"+I}A.push(L),$=null},P.isDark=function(D,I){if(D<0||O<=D||I<0||O<=I)throw D+","+I;return C[D][I]},P.getModuleCount=function(){return O},P.make=function(){if(S<1){for(var D=1;D<40;D++){for(var I=u.getRSBlocks(D,E),L=d(),V=0;V<A.length;V++){var R=A[V];L.put(R.getMode(),4),L.put(R.getLength(),s.getLengthInBits(R.getMode(),D)),R.write(L)}for(var Z=0,V=0;V<I.length;V++)Z+=I[V].dataCount;if(L.getLengthInBits()<=Z*8)break}S=D}N(!1,z())},P.createTableTag=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+I+"px;",L+='">',L+="<tbody>";for(var V=0;V<P.getModuleCount();V+=1){L+="<tr>";for(var R=0;R<P.getModuleCount();R+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+D+"px;",L+=" height: "+D+"px;",L+=" background-color: ",L+=P.isDark(V,R)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},P.createSvgTag=function(D,I,L,V){var R={};typeof arguments[0]=="object"&&(R=arguments[0],D=R.cellSize,I=R.margin,L=R.alt,V=R.title),D=D||2,I=typeof I>"u"?D*4:I,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var Z=P.getModuleCount()*D+I*2,J,ne,he,be,ge="",We;for(We="l"+D+",0 0,"+D+" -"+D+",0 0,-"+D+"z ",ge+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ge+=R.scalable?"":' width="'+Z+'px" height="'+Z+'px"',ge+=' viewBox="0 0 '+Z+" "+Z+'" ',ge+=' preserveAspectRatio="xMinYMin meet"',ge+=V.text||L.text?' role="img" aria-labelledby="'+K([V.id,L.id].join(" ").trim())+'"':"",ge+=">",ge+=V.text?'<title id="'+K(V.id)+'">'+K(V.text)+"</title>":"",ge+=L.text?'<description id="'+K(L.id)+'">'+K(L.text)+"</description>":"",ge+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ge+='<path d="',he=0;he<P.getModuleCount();he+=1)for(be=he*D+I,J=0;J<P.getModuleCount();J+=1)P.isDark(he,J)&&(ne=J*D+I,ge+="M"+ne+","+be+We);return ge+='" stroke="transparent" fill="black"/>',ge+="</svg>",ge},P.createDataURL=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L=P.getModuleCount()*D+I*2,V=I,R=L-I;return T(L,L,function(Z,J){if(V<=Z&&Z<R&&V<=J&&J<R){var ne=Math.floor((Z-V)/D),he=Math.floor((J-V)/D);return P.isDark(he,ne)?0:1}else return 1})},P.createImgTag=function(D,I,L){D=D||2,I=typeof I>"u"?D*4:I;var V=P.getModuleCount()*D+I*2,R="";return R+="<img",R+=' src="',R+=P.createDataURL(D,I),R+='"',R+=' width="',R+=V,R+='"',R+=' height="',R+=V,R+='"',L&&(R+=' alt="',R+=K(L),R+='"'),R+="/>",R};var K=function(D){for(var I="",L=0;L<D.length;L+=1){var V=D.charAt(L);switch(V){case"<":I+="<";break;case">":I+=">";break;case"&":I+="&";break;case'"':I+=""";break;default:I+=V;break}}return I},te=function(D){var I=1;D=typeof D>"u"?I*2:D;var L=P.getModuleCount()*I+D*2,V=D,R=L-D,Z,J,ne,he,be,ge={"██":"█","█ ":"▀"," █":"▄"," ":" "},We={"██":"▀","█ ":"▀"," █":" "," ":" "},Re="";for(Z=0;Z<L;Z+=2){for(ne=Math.floor((Z-V)/I),he=Math.floor((Z+1-V)/I),J=0;J<L;J+=1)be="█",V<=J&&J<R&&V<=Z&&Z<R&&P.isDark(ne,Math.floor((J-V)/I))&&(be=" "),V<=J&&J<R&&V<=Z+1&&Z+1<R&&P.isDark(he,Math.floor((J-V)/I))?be+=" ":be+="█",Re+=D<1&&Z+1>=R?We[be]:ge[be];Re+=`
|
|
253
|
+
*/var uv;function m8(){return uv||(uv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,_=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===a||R===i||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===v||R.$$typeof===_||R.$$typeof===w||R.$$typeof===p)}function T(R){if(typeof R=="object"&&R!==null){var Z=R.$$typeof;switch(Z){case t:var J=R.type;switch(J){case c:case l:case r:case a:case i:case d:return J;default:var ne=J&&J.$$typeof;switch(ne){case s:case u:case g:case h:case o:return ne;default:return Z}}case n:return Z}}}var b=c,k=l,j=s,M=o,S=t,E=u,C=r,O=g,$=h,A=n,P=a,N=i,F=d,z=!1;function q(R){return z||(z=!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.")),W(R)||T(R)===c}function W(R){return T(R)===l}function G(R){return T(R)===s}function ee(R){return T(R)===o}function ie(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Q(R){return T(R)===u}function X(R){return T(R)===r}function K(R){return T(R)===g}function te(R){return T(R)===h}function D(R){return T(R)===n}function I(R){return T(R)===a}function L(R){return T(R)===i}function V(R){return T(R)===d}_t.AsyncMode=b,_t.ConcurrentMode=k,_t.ContextConsumer=j,_t.ContextProvider=M,_t.Element=S,_t.ForwardRef=E,_t.Fragment=C,_t.Lazy=O,_t.Memo=$,_t.Portal=A,_t.Profiler=P,_t.StrictMode=N,_t.Suspense=F,_t.isAsyncMode=q,_t.isConcurrentMode=W,_t.isContextConsumer=G,_t.isContextProvider=ee,_t.isElement=ie,_t.isForwardRef=Q,_t.isFragment=X,_t.isLazy=K,_t.isMemo=te,_t.isPortal=D,_t.isProfiler=I,_t.isStrictMode=L,_t.isSuspense=V,_t.isValidElementType=x,_t.typeOf=T}()),_t}var dv;function g8(){return dv||(dv=1,process.env.NODE_ENV==="production"?Rc.exports=p8():Rc.exports=m8()),Rc.exports}var pf,fv;function v8(){if(fv)return pf;fv=1;var e=g8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(g,p,v){if(typeof p!="string"){if(f){var _=d(p);_&&_!==f&&h(g,_,v)}var w=c(p);l&&(w=w.concat(l(p)));for(var x=o(g),T=o(p),b=0;b<w.length;++b){var k=w[b];if(!n[k]&&!(v&&v[k])&&!(T&&T[k])&&!(x&&x[k])){var j=u(p,k);try{s(g,k,j)}catch{}}}}return g}return pf=h,pf}v8();function y8(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function nm(e,t){const n=m.useContext(h8);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=m.useState(()=>n.getAll(i));y8()&&m.useLayoutEffect(()=>{function u(){const d=n.getAll(i);b8(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=m.useMemo(()=>n.set.bind(n),[n]),c=m.useMemo(()=>n.remove.bind(n),[n]),l=m.useMemo(()=>n.update.bind(n),[n]);return[a,s,c,l]}function b8(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const x8=()=>{const{axiosOptions:e,cookieDomain:t}=m.useContext(Kt),[,n,r]=nm(["Authorization"]),i=zt.create(e),a=m.useCallback(()=>{const l=localStorage.getItem("token");return l?{token:l,expiresOn:mb(new Date(Date.now()),1)}:null},[]),o=m.useCallback(()=>{const l=a();return l!==null&&l.token.length>0},[a]),s=m.useCallback(async(l,u)=>i.post("/user/login",{kid:l,password:u}).then(d=>(localStorage.setItem("token",d.data),n("Authorization",d.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:fb(new Date(Date.now()),24)}),d.data)).catch(d=>(console.log(d),null)),[i,n,t]),c=m.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:o,login:s,logout:c,getToken:a}},_8=()=>{const[,,e]=nm(["Authorization"]),{msalScopes:t,msalExtraScopes:n}=m.useContext(om),{instance:r,inProgress:i}=r0.useMsal(),a=r0.useIsAuthenticated(),o=m.useCallback(async()=>{var h;const d=r.getActiveAccount(),f=d??((h=r.getAllAccounts())==null?void 0:h.at(0))??void 0;return f?(d||r.setActiveAccount(f),r.acquireTokenSilent({scopes:t,account:f}).then(g=>({token:g.accessToken,expiresOn:g.expiresOn??new Date(Date.now())})).catch(g=>{if(console.error("Error acquiring token",g),g instanceof n0.InteractionRequiredAuthError)return console.log("Silent token acquisition failed. Acquiring token using redirect"),r.acquireTokenRedirect({scopes:t,extraScopesToConsent:n}),null;throw g})):null},[r,t,n]),s=m.useCallback(()=>a,[a]),c=m.useCallback(()=>!s()&&i!==n0.InteractionStatus.None,[s,i]),l=m.useCallback(async()=>r.loginRedirect({scopes:t,extraScopesToConsent:n}).then(()=>"").catch(()=>null),[r,t,n]),u=m.useCallback(()=>{r.logout(),localStorage.removeItem("user"),e("Authorization")},[e,r]);return{isAuthenticated:s,isAuthenticating:c,login:l,logout:u,getToken:o}},V2=()=>{const{useMsal:e}=m.useContext(om),t=x8(),n=_8();return{isAuthenticated:e?n.isAuthenticated:t.isAuthenticated,isAuthenticating:e?n.isAuthenticating:()=>!1,getToken:e?n.getToken:t.getToken,login:e?n.login:t.login,logout:e?n.logout:t.logout}},w8="_toast_1s57i_1",jo={toast:w8},C8=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},Su=()=>({addNotification:m.useCallback((t,n)=>{const r=h2(t),i=C8(n),a=y.jsxs(y.Fragment,{children:[r,y.jsx(Jx,{onClick:()=>ba.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(oE,{size:12}),className:oe("luminus-toast-success rounded shadow bg-success",jo.toast)});break}case"danger":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(KS,{size:12}),className:oe("luminus-toast-danger rounded shadow bg-danger",jo.toast)});break}case"warning":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(qS,{size:12}),className:oe("luminus-toast-warning rounded shadow bg-warning",jo.toast)});break}case"info":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(GS,{size:12}),className:oe("luminus-toast-info rounded shadow bg-info",jo.toast)});break}case"prompt":{ba(a,{id:r,duration:i,position:"top-center",icon:y.jsx(ZS,{size:12}),className:oe("luminus-toast-prompt rounded shadow bg-light",jo.toast)});break}}},[])}),T8=zt.CancelToken,Eu=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:c,texts:{axios:l}}=m.useContext(Kt),{delegation:u}=m.useContext(o_),d=m.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:f}=Su(),{getToken:h}=V2(),g=m.useMemo(()=>zt.create(c),[c]),p=m.useCallback(async _=>{var w,x,T;if(t&&!_.headers.Authorization){const b=i?{token:i,expiresOn:fb(new Date(Date.now()),1)}:await h();if(!b)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(f6(b.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));_.headers.Authorization=`Bearer ${b.token}`}return d!==null&&!a&&(_.headers.DelegationId=d.toString()),(w=_.url)!=null&&w.includes("culture=")?_.url=(x=_.url)==null?void 0:x.replace(/culture=[a-z]{2}/,`culture=${s}`):_.url=`${_.url}${(T=_.url)!=null&&T.includes("?")?"&":"?"}culture=${s}`,_},[t,h,s,i,d,a]),v=m.useCallback(_=>{var T,b;if(console.log(_),zt.isCancel(_))return Promise.reject(_);const w=Gp(_);if(w.length>0){const k=w.find(j=>j.name.toLowerCase()==="others");return k?(!r&&f(k.errors,"danger"),Promise.reject(_)):(!r&&f(l.validationError,"warning"),Promise.reject(_))}const x=d2(_);return x!==null?(!r&&f(`${l.permissionError}: ${fs(", ",...x)}`,"danger"),Promise.reject(_)):(o??[]).includes((T=_.response)==null?void 0:T.status)?Promise.reject(_):((b=_.response)==null?void 0:b.status)===403?(!r&&f(l.forbiddenError,"danger"),Promise.reject(_)):_.message&&_.message==="Network Error"?(!r&&f(l.networkError,"danger"),Promise.reject(_)):(zt.isCancel(_)||(!r&&f(l.unexpectedError,"danger"),(_.response||_.request)&&!r&&f(l.unexpectedError,"danger")),Promise.reject(_))},[f,l.forbiddenError,l.networkError,l.permissionError,l.unexpectedError,l.validationError,r,o]);return m.useEffect(()=>{n&&(g.defaults.baseURL=n),g.interceptors.request.clear(),g.interceptors.response.clear();const _=g.interceptors.request.use(p,x=>Promise.reject(x)),w=g.interceptors.response.use(x=>x,v);return()=>{g.interceptors.request.eject(_),g.interceptors.response.eject(w)}},[g.defaults,g.interceptors.request,g.interceptors.response,n,p,v]),g};let Po;const rm=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r,textSm:i}=m.useContext(t2),a=()=>{r()};return{confirm:async(l,u)=>(n(l,u),new Promise(d=>{Po=d})),onConfirm:()=>{a(),Po&&Po(!0)},onCancel:()=>{a(),Po&&Po(!1)},show:e,text:t,textSm:i}};var ut;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ut||(ut={}));var _h;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(_h||(_h={}));const we=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=e=>{switch(typeof e){case"undefined":return we.undefined;case"string":return we.string;case"number":return isNaN(e)?we.nan:we.number;case"boolean":return we.boolean;case"function":return we.function;case"bigint":return we.bigint;case"symbol":return we.symbol;case"object":return Array.isArray(e)?we.array:e===null?we.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?we.promise:typeof Map<"u"&&e instanceof Map?we.map:typeof Set<"u"&&e instanceof Set?we.set:typeof Date<"u"&&e instanceof Date?we.date:we.object;default:return we.unknown}},fe=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),k8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ln extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof Ln))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ln.create=e=>new Ln(e);const qa=(e,t)=>{let n;switch(e.code){case fe.invalid_type:e.received===we.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case fe.invalid_union:n="Invalid input";break;case fe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case fe.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:n="Invalid function arguments";break;case fe.invalid_return_type:n="Invalid function return type";break;case fe.invalid_date:n="Invalid date";break;case fe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case fe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case fe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case fe.custom:n="Invalid input";break;case fe.invalid_intersection_types:n="Intersection results could not be merged";break;case fe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let q2=qa;function S8(e){q2=e}function kl(){return q2}const Sl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},E8=[];function _e(e,t){const n=kl(),r=Sl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qa?void 0:qa].filter(i=>!!i)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ue;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ue;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Ea=e=>({status:"dirty",value:e}),kn=e=>({status:"valid",value:e}),wh=e=>e.status==="aborted",Ch=e=>e.status==="dirty",ps=e=>e.status==="valid",ms=e=>typeof Promise<"u"&&e instanceof Promise;function El(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Y2(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));var Go,Zo;class yr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const hv=(e,t)=>{if(ps(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ln(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class tt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ms(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},a=this._parseSync({data:t,path:i.path,parent:i});return hv(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ms(i)?i:Promise.resolve(i));return hv(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:fe.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new cr({schema:this,typeName:Be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return gr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Ga.create(this,this._def)}or(t){return bs.create([this,t],this._def)}and(t){return xs.create(this,t,this._def)}transform(t){return new cr({...Ke(this._def),schema:this,typeName:Be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ks({...Ke(this._def),innerType:this,defaultValue:n,typeName:Be.ZodDefault})}brand(){return new im({typeName:Be.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ss({...Ke(this._def),innerType:this,catchValue:n,typeName:Be.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tc.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const O8=/^c[^\s-]{8,}$/i,M8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Z]{26}$/,A8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,R8=/^[a-z0-9_-]{21}$/i,j8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,P8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mf;const D8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,L8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G2="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F8=new RegExp(`^${G2}$`);function Z2(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function B8(e){return new RegExp(`^${Z2(e)}$`)}function K2(e){let t=`${G2}T${Z2(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function U8(e,t){return!!((t==="v4"||!t)&&D8.test(e)||(t==="v6"||!t)&&N8.test(e))}class ir extends tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==we.string){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.string,received:a.parsedType}),Ue}const r=new yn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:fe.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:fe.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")P8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")mf||(mf=new RegExp(I8,"u")),mf.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")A8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")R8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")O8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")M8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:fe.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:fe.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:fe.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?K2(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?F8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?B8(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?j8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?U8(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:fe.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?L8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:fe.invalid_string,message:a.message}),r.dirty()):ut.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:fe.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new ir({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...Ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new ir({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ir.create=e=>{var t;return new ir({checks:[],typeName:Be.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};function W8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==we.number){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.number,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="int"?ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?W8(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_finite,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}hi.create=e=>new hi({checks:[],typeName:Be.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class pi extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==we.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.bigint,received:a.parsedType}),Ue}let r;const i=new yn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:fe.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ut.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}pi.create=e=>{var t;return new pi({checks:[],typeName:Be.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};class gs extends tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==we.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.boolean,received:r.parsedType}),Ue}return kn(t.data)}}gs.create=e=>new gs({typeName:Be.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class Ki extends tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==we.date){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_type,expected:we.date,received:a.parsedType}),Ue}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:fe.invalid_date}),Ue}const r=new yn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:fe.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ut.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ki({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Ki.create=e=>new Ki({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Be.ZodDate,...Ke(e)});class Ol extends tt{_parse(t){if(this._getType(t)!==we.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.symbol,received:r.parsedType}),Ue}return kn(t.data)}}Ol.create=e=>new Ol({typeName:Be.ZodSymbol,...Ke(e)});class vs extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.undefined,received:r.parsedType}),Ue}return kn(t.data)}}vs.create=e=>new vs({typeName:Be.ZodUndefined,...Ke(e)});class ys extends tt{_parse(t){if(this._getType(t)!==we.null){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.null,received:r.parsedType}),Ue}return kn(t.data)}}ys.create=e=>new ys({typeName:Be.ZodNull,...Ke(e)});class Ya extends tt{constructor(){super(...arguments),this._any=!0}_parse(t){return kn(t.data)}}Ya.create=e=>new Ya({typeName:Be.ZodAny,...Ke(e)});class zi extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return kn(t.data)}}zi.create=e=>new zi({typeName:Be.ZodUnknown,...Ke(e)});class Vr extends tt{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:fe.invalid_type,expected:we.never,received:n.parsedType}),Ue}}Vr.create=e=>new Vr({typeName:Be.ZodNever,...Ke(e)});class Ml extends tt{_parse(t){if(this._getType(t)!==we.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.void,received:r.parsedType}),Ue}return kn(t.data)}}Ml.create=e=>new Ml({typeName:Be.ZodVoid,...Ke(e)});class or extends tt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==we.array)return _e(n,{code:fe.invalid_type,expected:we.array,received:n.parsedType}),Ue;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?fe.too_big:fe.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:fe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:fe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new yr(n,o,n.path,s)))).then(o=>yn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new yr(n,o,n.path,s)));return yn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Be.ZodArray,...Ke(t)});function Sa(e){if(e instanceof Zt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=gr.create(Sa(r))}return new Zt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:Sa(e.element)}):e instanceof gr?gr.create(Sa(e.unwrap())):e instanceof gi?gi.create(Sa(e.unwrap())):e instanceof br?br.create(e.items.map(t=>Sa(t))):e}class Zt extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==we.object){const l=this._getOrReturnCtx(t);return _e(l,{code:fe.invalid_type,expected:we.object,received:l.parsedType}),Ue}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new yr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(_e(i,{code:fe.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new yr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>yn.mergeObjectSync(r,l)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Zt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Ae.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Zt({...this._def,unknownKeys:"strip"})}passthrough(){return new Zt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Be.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zt({...this._def,catchall:t})}pick(t){const n={};return ut.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}omit(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}deepPartial(){return Sa(this)}partial(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zt({...this._def,shape:()=>n})}required(t){const n={};return ut.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof gr;)a=a._def.innerType;n[r]=a}}),new Zt({...this._def,shape:()=>n})}keyof(){return X2(ut.objectKeys(this.shape))}}Zt.create=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.strictCreate=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});Zt.lazycreate=(e,t)=>new Zt({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Be.ZodObject,...Ke(t)});class bs extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Ln(s.ctx.common.issues));return _e(n,{code:fe.invalid_union,unionErrors:o}),Ue}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Ln(c));return _e(n,{code:fe.invalid_union,unionErrors:s}),Ue}}get options(){return this._def.options}}bs.create=(e,t)=>new bs({options:e,typeName:Be.ZodUnion,...Ke(t)});const Pr=e=>e instanceof ws?Pr(e.schema):e instanceof cr?Pr(e.innerType()):e instanceof Cs?[e.value]:e instanceof mi?e.options:e instanceof Ts?ut.objectValues(e.enum):e instanceof ks?Pr(e._def.innerType):e instanceof vs?[void 0]:e instanceof ys?[null]:e instanceof gr?[void 0,...Pr(e.unwrap())]:e instanceof gi?[null,...Pr(e.unwrap())]:e instanceof im||e instanceof Es?Pr(e.unwrap()):e instanceof Ss?Pr(e._def.innerType):[];class Ou extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.object)return _e(n,{code:fe.invalid_type,expected:we.object,received:n.parsedType}),Ue;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=Pr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Ou({typeName:Be.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ke(r)})}}function Th(e,t){const n=ai(e),r=ai(t);if(e===t)return{valid:!0,data:e};if(n===we.object&&r===we.object){const i=ut.objectKeys(t),a=ut.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=Th(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===we.array&&r===we.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=Th(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===we.date&&r===we.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xs extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(wh(a)||wh(o))return Ue;const s=Th(a.value,o.value);return s.valid?((Ch(a)||Ch(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:fe.invalid_intersection_types}),Ue)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}xs.create=(e,t,n)=>new xs({left:e,right:t,typeName:Be.ZodIntersection,...Ke(n)});class br extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.array)return _e(r,{code:fe.invalid_type,expected:we.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return _e(r,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new yr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>yn.mergeArray(n,o)):yn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new br({...this._def,rest:t})}}br.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new br({items:e,typeName:Be.ZodTuple,rest:null,...Ke(t)})};class _s extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.object)return _e(r,{code:fe.invalid_type,expected:we.object,received:r.parsedType}),Ue;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new yr(r,s,r.path,s)),value:o._parse(new yr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?yn.mergeObjectAsync(n,i):yn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof tt?new _s({keyType:t,valueType:n,typeName:Be.ZodRecord,...Ke(r)}):new _s({keyType:ir.create(),valueType:t,typeName:Be.ZodRecord,...Ke(n)})}}class $l extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.map)return _e(r,{code:fe.invalid_type,expected:we.map,received:r.parsedType}),Ue;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new yr(r,s,r.path,[l,"key"])),value:a._parse(new yr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Ue;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}$l.create=(e,t,n)=>new $l({valueType:t,keyType:e,typeName:Be.ZodMap,...Ke(n)});class Xi extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==we.set)return _e(r,{code:fe.invalid_type,expected:we.set,received:r.parsedType}),Ue;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:fe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:fe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Ue;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new yr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Xi({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new Xi({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Xi.create=(e,t)=>new Xi({valueType:e,minSize:null,maxSize:null,typeName:Be.ZodSet,...Ke(t)});class Ra extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.function)return _e(n,{code:fe.invalid_type,expected:we.function,received:n.parsedType}),Ue;function r(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_arguments,argumentsError:c}})}function i(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,kl(),qa].filter(l=>!!l),issueData:{code:fe.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ga){const s=this;return kn(async function(...c){const l=new Ln([]),u=await s._def.args.parseAsync(c,a).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw l.addIssue(i(d,h)),l})})}else{const s=this;return kn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Ln([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new Ln([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ra({...this._def,args:br.create(t).rest(zi.create())})}returns(t){return new Ra({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ra({args:t||br.create([]).rest(zi.create()),returns:n||zi.create(),typeName:Be.ZodFunction,...Ke(r)})}}class ws extends tt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ws.create=(e,t)=>new ws({getter:e,typeName:Be.ZodLazy,...Ke(t)});class Cs extends tt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:fe.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cs.create=(e,t)=>new Cs({value:e,typeName:Be.ZodLiteral,...Ke(t)});function X2(e,t){return new mi({values:e,typeName:Be.ZodEnum,...Ke(t)})}class mi extends tt{constructor(){super(...arguments),Go.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:ut.joinValues(r),received:n.parsedType,code:fe.invalid_type}),Ue}if(El(this,Go)||Y2(this,Go,new Set(this._def.values)),!El(this,Go).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:fe.invalid_enum_value,options:r}),Ue}return kn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Go=new WeakMap;mi.create=X2;class Ts extends tt{constructor(){super(...arguments),Zo.set(this,void 0)}_parse(t){const n=ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==we.string&&r.parsedType!==we.number){const i=ut.objectValues(n);return _e(r,{expected:ut.joinValues(i),received:r.parsedType,code:fe.invalid_type}),Ue}if(El(this,Zo)||Y2(this,Zo,new Set(ut.getValidEnumValues(this._def.values))),!El(this,Zo).has(t.data)){const i=ut.objectValues(n);return _e(r,{received:r.data,code:fe.invalid_enum_value,options:i}),Ue}return kn(t.data)}get enum(){return this._def.values}}Zo=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:Be.ZodNativeEnum,...Ke(t)});class Ga extends tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==we.promise&&n.common.async===!1)return _e(n,{code:fe.invalid_type,expected:we.promise,received:n.parsedType}),Ue;const r=n.parsedType===we.promise?n.data:Promise.resolve(n.data);return kn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ga.create=(e,t)=>new Ga({type:e,typeName:Be.ZodPromise,...Ke(t)});class cr extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Ue;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Ue:c.status==="dirty"||n.value==="dirty"?Ea(c.value):c});{if(n.value==="aborted")return Ue;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Ue:s.status==="dirty"||n.value==="dirty"?Ea(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ue:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ps(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ps(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ut.assertNever(i)}}cr.create=(e,t,n)=>new cr({schema:e,typeName:Be.ZodEffects,effect:t,...Ke(n)});cr.createWithPreprocess=(e,t,n)=>new cr({schema:t,effect:{type:"preprocess",transform:e},typeName:Be.ZodEffects,...Ke(n)});class gr extends tt{_parse(t){return this._getType(t)===we.undefined?kn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gr.create=(e,t)=>new gr({innerType:e,typeName:Be.ZodOptional,...Ke(t)});class gi extends tt{_parse(t){return this._getType(t)===we.null?kn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Be.ZodNullable,...Ke(t)});class ks extends tt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===we.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class Ss extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ms(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ss.create=(e,t)=>new Ss({innerType:e,typeName:Be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class Al extends tt{_parse(t){if(this._getType(t)!==we.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:fe.invalid_type,expected:we.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}Al.create=e=>new Al({typeName:Be.ZodNaN,...Ke(e)});const z8=Symbol("zod_brand");class im extends tt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tc extends tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ue:a.status==="dirty"?(n.dirty(),Ea(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ue:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tc({in:t,out:n,typeName:Be.ZodPipeline})}}class Es extends tt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ps(i)&&(i.value=Object.freeze(i.value)),i);return ms(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Be.ZodReadonly,...Ke(t)});function Q2(e,t={},n){return e?Ya.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):Ya.create()}const H8={object:Zt.lazycreate};var Be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Be||(Be={}));const V8=(e,t={message:`Input not instance of ${e.name}`})=>Q2(n=>n instanceof e,t),J2=ir.create,e_=hi.create,q8=Al.create,Y8=pi.create,t_=gs.create,G8=Ki.create,Z8=Ol.create,K8=vs.create,X8=ys.create,Q8=Ya.create,J8=zi.create,e$=Vr.create,t$=Ml.create,n$=or.create,r$=Zt.create,i$=Zt.strictCreate,a$=bs.create,o$=Ou.create,s$=xs.create,c$=br.create,l$=_s.create,u$=$l.create,d$=Xi.create,f$=Ra.create,h$=ws.create,p$=Cs.create,m$=mi.create,g$=Ts.create,v$=Ga.create,pv=cr.create,y$=gr.create,b$=gi.create,x$=cr.createWithPreprocess,_$=tc.create,w$=()=>J2().optional(),C$=()=>e_().optional(),T$=()=>t_().optional(),k$={string:e=>ir.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>gs.create({...e,coerce:!0}),bigint:e=>pi.create({...e,coerce:!0}),date:e=>Ki.create({...e,coerce:!0})},S$=Ue;var sn=Object.freeze({__proto__:null,defaultErrorMap:qa,setErrorMap:S8,getErrorMap:kl,makeIssue:Sl,EMPTY_PATH:E8,addIssueToContext:_e,ParseStatus:yn,INVALID:Ue,DIRTY:Ea,OK:kn,isAborted:wh,isDirty:Ch,isValid:ps,isAsync:ms,get util(){return ut},get objectUtil(){return _h},ZodParsedType:we,getParsedType:ai,ZodType:tt,datetimeRegex:K2,ZodString:ir,ZodNumber:hi,ZodBigInt:pi,ZodBoolean:gs,ZodDate:Ki,ZodSymbol:Ol,ZodUndefined:vs,ZodNull:ys,ZodAny:Ya,ZodUnknown:zi,ZodNever:Vr,ZodVoid:Ml,ZodArray:or,ZodObject:Zt,ZodUnion:bs,ZodDiscriminatedUnion:Ou,ZodIntersection:xs,ZodTuple:br,ZodRecord:_s,ZodMap:$l,ZodSet:Xi,ZodFunction:Ra,ZodLazy:ws,ZodLiteral:Cs,ZodEnum:mi,ZodNativeEnum:Ts,ZodPromise:Ga,ZodEffects:cr,ZodTransformer:cr,ZodOptional:gr,ZodNullable:gi,ZodDefault:ks,ZodCatch:Ss,ZodNaN:Al,BRAND:z8,ZodBranded:im,ZodPipeline:tc,ZodReadonly:Es,custom:Q2,Schema:tt,ZodSchema:tt,late:H8,get ZodFirstPartyTypeKind(){return Be},coerce:k$,any:Q8,array:n$,bigint:Y8,boolean:t_,date:G8,discriminatedUnion:o$,effect:pv,enum:m$,function:f$,instanceof:V8,intersection:s$,lazy:h$,literal:p$,map:u$,nan:q8,nativeEnum:g$,never:e$,null:X8,nullable:b$,number:e_,object:r$,oboolean:T$,onumber:C$,optional:y$,ostring:w$,pipeline:_$,preprocess:x$,promise:v$,record:l$,set:d$,strictObject:i$,string:J2,symbol:Z8,transformer:pv,tuple:c$,undefined:K8,union:a$,unknown:J8,void:t$,NEVER:S$,ZodIssueCode:fe,quotelessJson:k8,ZodError:Ln});const Mu=()=>{const{texts:{formValidation:e}}=m.useContext(Kt),t=m.useCallback(p=>{let v=(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required});return p!=null&&p.email&&(v=v.email(e.invalidEmail)),p!=null&&p.length&&(v=v.min(p.length,e.length(p.length))),p!=null&&p.minLength&&(v=v.min(p.minLength,e.minLength(p.minLength))),p!=null&&p.maxLength&&(v=v.max(p.maxLength,e.maxLength(p.maxLength))),p!=null&&p.numeric&&(v=v.regex(/^\d+$/,e.noCharactersOtherThanNumbers)),p!=null&&p.regex&&(v=v.regex(p.regex,e.invalidFormat)),v.transform(_=>_??null)},[e]),n=m.useCallback(p=>t(p).nullable().optional().transform(v=>v??null),[t]),r=m.useCallback(p=>{const v=(p==null?void 0:p.min)??Number.MIN_SAFE_INTEGER,_=(p==null?void 0:p.max)??Number.MAX_SAFE_INTEGER,w=(p!=null&&p.useCoerce?sn.coerce:sn).number({invalid_type_error:e.required,required_error:e.required}).min(v,e.lessThanMin(v)).max(_,e.moreThanMax(_));return w.transform(x=>x??null),w},[e]),i=m.useCallback(p=>r(p).nullable().optional().transform(v=>v??null),[r]),a=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).boolean({invalid_type_error:e.required,required_error:e.required}).transform(v=>v??null),[e.required]),o=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required}).refine(m2,{message:e.invalidDate}).transform(_=>_??null),[e.invalidDate,e.required]),s=m.useCallback(p=>o(p).nullable().transform(v=>v??null),[o]),c=m.useCallback((p,v)=>sn.enum(p,{invalid_type_error:e.required,required_error:e.required}).transform(w=>w??null),[e.required]),l=m.useCallback((p,v)=>c(p,v).nullable().transform(_=>_??null),[c]),u=m.useCallback(p=>sn.object({id:i({useCoerce:!0})}).nullable().transform(_=>_??null),[i]),d=m.useCallback(p=>sn.object({id:r()}).transform(_=>_??null),[r]),f=m.useCallback(p=>sn.object({id:n({useCoerce:!0})}).nullable().transform(_=>_??null),[n]),h=m.useCallback(p=>sn.object({id:t()}).transform(_=>_??null),[t]),g=m.useCallback(({required:p,multiple:v,maxFileSize:_})=>sn.any().transform(x=>Array.from(x??[])).refine(x=>!p||(x==null?void 0:x.length)>0,"File is required.").refine(x=>v||(x==null?void 0:x.length)<=1,"Multiple files not allowed.").refine(x=>x.every(T=>T.size<=_),`Maximum file size is ${Ha(_)}.`).transform(x=>(v?x:x==null?void 0:x[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:i,zNumberRequired:r,zBool:a,zDate:s,zDateRequired:o,zEnum:l,zEnumRequired:c,zObjectIdInt:u,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:h,zFile:g}},n_=(e,t)=>{m.useEffect(()=>{const n=r=>{e.some(i=>i.current&&i.current.contains(r.target))||t()};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}},[e,t])},r_=()=>{const{user:e}=m.useContext(c2);return{checkUserHasPermissions:m.useCallback((n,r="any")=>n.length===0?!0:r==="any"?n.some(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}):n.every(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}),[e])}},i_=(e,t)=>{m.useEffect(()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),[e]),m.useEffect(()=>t===void 0?()=>{}:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),[t])},am=(e,t,n)=>m.useMemo(()=>n||e!=="date"&&e!=="datetime-local"&&e!=="time"||t?e:"text",[t,e,n]),a_=()=>{const{addNotification:e}=Su(),{texts:{clipboard:t}}=m.useContext(Kt);return{copyToClipboard:m.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},nc=()=>{const[e,t]=m.useState(window.innerWidth),[n,r]=m.useState(window.innerHeight),i=()=>{t(window.innerWidth),r(window.innerHeight)};return m.useEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),{width:e,height:n,isMobile:e<992}},om=m.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[]}),o_=m.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),s_=m.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),c_=m.createContext(void 0),mv={falseIfNotInit:!1},$u=({falseIfNotInit:e=mv.falseIfNotInit}=mv)=>{const t=m.useContext(c_);if(!e&&t===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return t??!1},E$="_button_1wjon_1",O$="_filled_1wjon_7",M$="_sm_1wjon_13",$$="_md_1wjon_18",A$="_lg_1wjon_23",xa={button:E$,filled:O$,sm:M$,md:$$,lg:A$},Qi=({variant:e="filled",color:t="primary",size:n="md",className:r,children:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):a.as==="button"||a.as===void 0?y.jsx("button",{type:"button",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,xa.button,xa[e],xa[n]),...a,children:i}):null,R$="_button_1r3i0_1",kh={button:R$},Au=({color:e="primary",icon:t,className:n,children:r,...i})=>i.as==="link"?y.jsxs(to.Link,{to:i.href??"/",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):i.as==="button"||i.as===void 0?y.jsxs("button",{type:"button",className:oe(`luminus-context-button btn text-${e} ${n??""}`,kh.button),...i,children:[t,r]}):null,j$=m.forwardRef(({color:e="primary",icon:t=y.jsx(Qx,{size:12}),inputId:n="context-file-input",accept:r="*",onUpload:i,className:a,children:o,multiple:s,...c},l)=>{const u=d=>{d.target.files&&(i(d.target.files),d.target.value="")};return y.jsxs(y.Fragment,{children:[y.jsxs("label",{ref:l,htmlFor:n,className:oe(`luminus-context-button btn text-${e} ${a??""}`,kh.button),...c,children:[t,o]}),y.jsx("input",{id:n,type:"file",accept:r,onChange:u,hidden:!0,multiple:s})]})}),P$="_icon-button_15e26_1",I$="_sm_15e26_14",D$="_md_15e26_23",N$="_lg_15e26_32",jc={"icon-button":"_icon-button_15e26_1",iconButton:P$,sm:I$,md:D$,lg:N$},rc=({type:e="button",color:t="primary",size:n="md",children:r,className:i,...a})=>a.as==="link"?y.jsx(to.Link,{to:a.href??"/",className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):a.as==="button"||a.as===void 0?y.jsx("button",{type:e,className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):null,L$="_avatar-icon_1axl6_1",F$={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:L$},l_=({name:e,fontSize:t,size:n})=>{const r=m.useMemo(()=>{const o=e.split(" ");return o.length<2?e:fs(" ",o.at(o.length-2),o.at(o.length-1))},[e]),i=m.useMemo(()=>{const o=r.split(" ");return fs("",...o.map(s=>s.at(0)??void 0))},[r]),a=o=>{let s=0,c;for(c=0;c<o.length;c+=1)s=o.charCodeAt(c)+((s<<5)-s);let l="#";for(c=0;c<3;c+=1){const u=s>>c*8&255;l+=`00${u.toString(16)}`.slice(-2)}return l};return y.jsx(Gx,{placement:"bottom",overlay:y.jsx(qx,{children:e}),children:y.jsx("div",{className:oe("luminus-avatar-icon",F$.avatarIcon),style:{backgroundColor:a(r),fontSize:t??void 0,minHeight:n??void 0,height:n??void 0,maxHeight:n??void 0,minWidth:n??void 0,width:n??void 0,maxWidth:n??void 0},children:y.jsx("div",{children:i})})})};var sm={},Rl={exports:{}};Rl.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",v="[object Number]",_="[object Null]",w="[object Object]",x="[object Promise]",T="[object Proxy]",b="[object RegExp]",k="[object Set]",j="[object String]",M="[object Symbol]",S="[object Undefined]",E="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",$="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",N="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",q="[object Uint8ClampedArray]",W="[object Uint16Array]",G="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ie=/^\[object .+?Constructor\]$/,Q=/^(?:0|[1-9]\d*)$/,X={};X[$]=X[A]=X[P]=X[N]=X[F]=X[z]=X[q]=X[W]=X[G]=!0,X[s]=X[c]=X[C]=X[u]=X[O]=X[d]=X[f]=X[h]=X[p]=X[v]=X[w]=X[b]=X[k]=X[j]=X[E]=!1;var K=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,te=typeof self=="object"&&self&&self.Object===Object&&self,D=K||te||Function("return this")(),I=t&&!t.nodeType&&t,L=I&&!0&&e&&!e.nodeType&&e,V=L&&L.exports===I,R=V&&K.process,Z=function(){try{return R&&R.binding&&R.binding("util")}catch{}}(),J=Z&&Z.isTypedArray;function ne(B,Y){for(var le=-1,Te=B==null?0:B.length,Nt=0,Qe=[];++le<Te;){var Qt=B[le];Y(Qt,le,B)&&(Qe[Nt++]=Qt)}return Qe}function he(B,Y){for(var le=-1,Te=Y.length,Nt=B.length;++le<Te;)B[Nt+le]=Y[le];return B}function be(B,Y){for(var le=-1,Te=B==null?0:B.length;++le<Te;)if(Y(B[le],le,B))return!0;return!1}function ge(B,Y){for(var le=-1,Te=Array(B);++le<B;)Te[le]=Y(le);return Te}function We(B){return function(Y){return B(Y)}}function Re(B,Y){return B.has(Y)}function et(B,Y){return B==null?void 0:B[Y]}function qe(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te,Nt){le[++Y]=[Nt,Te]}),le}function pe(B,Y){return function(le){return B(Y(le))}}function Ee(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te){le[++Y]=Te}),le}var Oe=Array.prototype,Ce=Function.prototype,Le=Object.prototype,rt=D["__core-js_shared__"],Pt=Ce.toString,it=Le.hasOwnProperty,st=function(){var B=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return B?"Symbol(src)_1."+B:""}(),pt=Le.toString,It=RegExp("^"+Pt.call(it).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ct=V?D.Buffer:void 0,dt=D.Symbol,mt=D.Uint8Array,Ut=Le.propertyIsEnumerable,Ne=Oe.splice,je=dt?dt.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,lt=ct?ct.isBuffer:void 0,gt=pe(Object.keys,Object),kt=ma(D,"DataView"),Vt=ma(D,"Map"),At=ma(D,"Promise"),Dt=ma(D,"Set"),qt=ma(D,"WeakMap"),vt=ma(Object,"create"),Yt=ki(kt),rn=ki(Vt),Jt=ki(At),ve=ki(Dt),Se=ki(qt),Pe=dt?dt.prototype:void 0,Ge=Pe?Pe.valueOf:void 0;function ze(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function ft(){this.__data__=vt?vt(null):{},this.size=0}function U(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y}function ce(B){var Y=this.__data__;if(vt){var le=Y[B];return le===r?void 0:le}return it.call(Y,B)?Y[B]:void 0}function ae(B){var Y=this.__data__;return vt?Y[B]!==void 0:it.call(Y,B)}function se(B,Y){var le=this.__data__;return this.size+=this.has(B)?0:1,le[B]=vt&&Y===void 0?r:Y,this}ze.prototype.clear=ft,ze.prototype.delete=U,ze.prototype.get=ce,ze.prototype.has=ae,ze.prototype.set=se;function ye(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Me(){this.__data__=[],this.size=0}function xe(B){var Y=this.__data__,le=xc(Y,B);if(le<0)return!1;var Te=Y.length-1;return le==Te?Y.pop():Ne.call(Y,le,1),--this.size,!0}function ke(B){var Y=this.__data__,le=xc(Y,B);return le<0?void 0:Y[le][1]}function Fe(B){return xc(this.__data__,B)>-1}function Ie(B,Y){var le=this.__data__,Te=xc(le,B);return Te<0?(++this.size,le.push([B,Y])):le[Te][1]=Y,this}ye.prototype.clear=Me,ye.prototype.delete=xe,ye.prototype.get=ke,ye.prototype.has=Fe,ye.prototype.set=Ie;function Xe(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Wt(){this.size=0,this.__data__={hash:new ze,map:new(Vt||ye),string:new ze}}function Et(B){var Y=_c(this,B).delete(B);return this.size-=Y?1:0,Y}function Xt(B){return _c(this,B).get(B)}function me(B){return _c(this,B).has(B)}function ln(B,Y){var le=_c(this,B),Te=le.size;return le.set(B,Y),this.size+=le.size==Te?0:1,this}Xe.prototype.clear=Wt,Xe.prototype.delete=Et,Xe.prototype.get=Xt,Xe.prototype.has=me,Xe.prototype.set=ln;function Ot(B){var Y=-1,le=B==null?0:B.length;for(this.__data__=new Xe;++Y<le;)this.add(B[Y])}function Jn(B){return this.__data__.set(B,r),this}function yc(B){return this.__data__.has(B)}Ot.prototype.add=Ot.prototype.push=Jn,Ot.prototype.has=yc;function er(B){var Y=this.__data__=new ye(B);this.size=Y.size}function Ti(){this.__data__=new ye,this.size=0}function bc(B){var Y=this.__data__,le=Y.delete(B);return this.size=Y.size,le}function Mr(B){return this.__data__.get(B)}function qd(B){return this.__data__.has(B)}function $r(B,Y){var le=this.__data__;if(le instanceof ye){var Te=le.__data__;if(!Vt||Te.length<n-1)return Te.push([B,Y]),this.size=++le.size,this;le=this.__data__=new Xe(Te)}return le.set(B,Y),this.size=le.size,this}er.prototype.clear=Ti,er.prototype.delete=bc,er.prototype.get=Mr,er.prototype.has=qd,er.prototype.set=$r;function Co(B,Y){var le=wc(B),Te=!le&&qC(B),Nt=!le&&!Te&&Yd(B),Qe=!le&&!Te&&!Nt&&e0(B),Qt=le||Te||Nt||Qe,an=Qt?ge(B.length,String):[],un=an.length;for(var Gt in B)it.call(B,Gt)&&!(Qt&&(Gt=="length"||Nt&&(Gt=="offset"||Gt=="parent")||Qe&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||UC(Gt,un)))&&an.push(Gt);return an}function xc(B,Y){for(var le=B.length;le--;)if(Kg(B[le][0],Y))return le;return-1}function RC(B,Y,le){var Te=Y(B);return wc(B)?Te:he(Te,le(B))}function To(B){return B==null?B===void 0?S:_:je&&je in Object(B)?FC(B):VC(B)}function qg(B){return ko(B)&&To(B)==s}function Yg(B,Y,le,Te,Nt){return B===Y?!0:B==null||Y==null||!ko(B)&&!ko(Y)?B!==B&&Y!==Y:jC(B,Y,le,Te,Yg,Nt)}function jC(B,Y,le,Te,Nt,Qe){var Qt=wc(B),an=wc(Y),un=Qt?c:Zr(B),Gt=an?c:Zr(Y);un=un==s?w:un,Gt=Gt==s?w:Gt;var In=un==w,tr=Gt==w,fn=un==Gt;if(fn&&Yd(B)){if(!Yd(Y))return!1;Qt=!0,In=!1}if(fn&&!In)return Qe||(Qe=new er),Qt||e0(B)?Gg(B,Y,le,Te,Nt,Qe):NC(B,Y,un,le,Te,Nt,Qe);if(!(le&i)){var Bn=In&&it.call(B,"__wrapped__"),Un=tr&&it.call(Y,"__wrapped__");if(Bn||Un){var Kr=Bn?B.value():B,Ar=Un?Y.value():Y;return Qe||(Qe=new er),Nt(Kr,Ar,le,Te,Qe)}}return fn?(Qe||(Qe=new er),LC(B,Y,le,Te,Nt,Qe)):!1}function PC(B){if(!Jg(B)||zC(B))return!1;var Y=Xg(B)?It:ie;return Y.test(ki(B))}function IC(B){return ko(B)&&Qg(B.length)&&!!X[To(B)]}function DC(B){if(!HC(B))return gt(B);var Y=[];for(var le in Object(B))it.call(B,le)&&le!="constructor"&&Y.push(le);return Y}function Gg(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=B.length,un=Y.length;if(an!=un&&!(Qt&&un>an))return!1;var Gt=Qe.get(B);if(Gt&&Qe.get(Y))return Gt==Y;var In=-1,tr=!0,fn=le&a?new Ot:void 0;for(Qe.set(B,Y),Qe.set(Y,B);++In<an;){var Bn=B[In],Un=Y[In];if(Te)var Kr=Qt?Te(Un,Bn,In,Y,B,Qe):Te(Bn,Un,In,B,Y,Qe);if(Kr!==void 0){if(Kr)continue;tr=!1;break}if(fn){if(!be(Y,function(Ar,Si){if(!Re(fn,Si)&&(Bn===Ar||Nt(Bn,Ar,le,Te,Qe)))return fn.push(Si)})){tr=!1;break}}else if(!(Bn===Un||Nt(Bn,Un,le,Te,Qe))){tr=!1;break}}return Qe.delete(B),Qe.delete(Y),tr}function NC(B,Y,le,Te,Nt,Qe,Qt){switch(le){case O:if(B.byteLength!=Y.byteLength||B.byteOffset!=Y.byteOffset)return!1;B=B.buffer,Y=Y.buffer;case C:return!(B.byteLength!=Y.byteLength||!Qe(new mt(B),new mt(Y)));case u:case d:case v:return Kg(+B,+Y);case f:return B.name==Y.name&&B.message==Y.message;case b:case j:return B==Y+"";case p:var an=qe;case k:var un=Te&i;if(an||(an=Ee),B.size!=Y.size&&!un)return!1;var Gt=Qt.get(B);if(Gt)return Gt==Y;Te|=a,Qt.set(B,Y);var In=Gg(an(B),an(Y),Te,Nt,Qe,Qt);return Qt.delete(B),In;case M:if(Ge)return Ge.call(B)==Ge.call(Y)}return!1}function LC(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=Zg(B),un=an.length,Gt=Zg(Y),In=Gt.length;if(un!=In&&!Qt)return!1;for(var tr=un;tr--;){var fn=an[tr];if(!(Qt?fn in Y:it.call(Y,fn)))return!1}var Bn=Qe.get(B);if(Bn&&Qe.get(Y))return Bn==Y;var Un=!0;Qe.set(B,Y),Qe.set(Y,B);for(var Kr=Qt;++tr<un;){fn=an[tr];var Ar=B[fn],Si=Y[fn];if(Te)var t0=Qt?Te(Si,Ar,fn,Y,B,Qe):Te(Ar,Si,fn,B,Y,Qe);if(!(t0===void 0?Ar===Si||Nt(Ar,Si,le,Te,Qe):t0)){Un=!1;break}Kr||(Kr=fn=="constructor")}if(Un&&!Kr){var Cc=B.constructor,Tc=Y.constructor;Cc!=Tc&&"constructor"in B&&"constructor"in Y&&!(typeof Cc=="function"&&Cc instanceof Cc&&typeof Tc=="function"&&Tc instanceof Tc)&&(Un=!1)}return Qe.delete(B),Qe.delete(Y),Un}function Zg(B){return RC(B,ZC,BC)}function _c(B,Y){var le=B.__data__;return WC(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function ma(B,Y){var le=et(B,Y);return PC(le)?le:void 0}function FC(B){var Y=it.call(B,je),le=B[je];try{B[je]=void 0;var Te=!0}catch{}var Nt=pt.call(B);return Te&&(Y?B[je]=le:delete B[je]),Nt}var BC=Ye?function(B){return B==null?[]:(B=Object(B),ne(Ye(B),function(Y){return Ut.call(B,Y)}))}:KC,Zr=To;(kt&&Zr(new kt(new ArrayBuffer(1)))!=O||Vt&&Zr(new Vt)!=p||At&&Zr(At.resolve())!=x||Dt&&Zr(new Dt)!=k||qt&&Zr(new qt)!=E)&&(Zr=function(B){var Y=To(B),le=Y==w?B.constructor:void 0,Te=le?ki(le):"";if(Te)switch(Te){case Yt:return O;case rn:return p;case Jt:return x;case ve:return k;case Se:return E}return Y});function UC(B,Y){return Y=Y??o,!!Y&&(typeof B=="number"||Q.test(B))&&B>-1&&B%1==0&&B<Y}function WC(B){var Y=typeof B;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?B!=="__proto__":B===null}function zC(B){return!!st&&st in B}function HC(B){var Y=B&&B.constructor,le=typeof Y=="function"&&Y.prototype||Le;return B===le}function VC(B){return pt.call(B)}function ki(B){if(B!=null){try{return Pt.call(B)}catch{}try{return B+""}catch{}}return""}function Kg(B,Y){return B===Y||B!==B&&Y!==Y}var qC=qg(function(){return arguments}())?qg:function(B){return ko(B)&&it.call(B,"callee")&&!Ut.call(B,"callee")},wc=Array.isArray;function YC(B){return B!=null&&Qg(B.length)&&!Xg(B)}var Yd=lt||XC;function GC(B,Y){return Yg(B,Y)}function Xg(B){if(!Jg(B))return!1;var Y=To(B);return Y==h||Y==g||Y==l||Y==T}function Qg(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function Jg(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function ko(B){return B!=null&&typeof B=="object"}var e0=J?We(J):IC;function ZC(B){return YC(B)?Co(B):DC(B)}function KC(){return[]}function XC(){return!1}e.exports=GC})(Rl,Rl.exports);var B$=Rl.exports,u_={exports:{}};(function(e,t){var n=function(){var r=function(b,k){var j=236,M=17,S=b,E=a[k],C=null,O=0,$=null,A=[],P={},N=function(D,I){O=S*4+17,C=function(L){for(var V=new Array(L),R=0;R<L;R+=1){V[R]=new Array(L);for(var Z=0;Z<L;Z+=1)V[R][Z]=null}return V}(O),F(0,0),F(O-7,0),F(0,O-7),W(),q(),ee(D,I),S>=7&&G(D),$==null&&($=X(S,E,A)),ie($,I)},F=function(D,I){for(var L=-1;L<=7;L+=1)if(!(D+L<=-1||O<=D+L))for(var V=-1;V<=7;V+=1)I+V<=-1||O<=I+V||(0<=L&&L<=6&&(V==0||V==6)||0<=V&&V<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=V&&V<=4?C[D+L][I+V]=!0:C[D+L][I+V]=!1)},z=function(){for(var D=0,I=0,L=0;L<8;L+=1){N(!0,L);var V=s.getLostPoint(P);(L==0||D>V)&&(D=V,I=L)}return I},q=function(){for(var D=8;D<O-8;D+=1)C[D][6]==null&&(C[D][6]=D%2==0);for(var I=8;I<O-8;I+=1)C[6][I]==null&&(C[6][I]=I%2==0)},W=function(){for(var D=s.getPatternPosition(S),I=0;I<D.length;I+=1)for(var L=0;L<D.length;L+=1){var V=D[I],R=D[L];if(C[V][R]==null)for(var Z=-2;Z<=2;Z+=1)for(var J=-2;J<=2;J+=1)Z==-2||Z==2||J==-2||J==2||Z==0&&J==0?C[V+Z][R+J]=!0:C[V+Z][R+J]=!1}},G=function(D){for(var I=s.getBCHTypeNumber(S),L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[Math.floor(L/3)][L%3+O-8-3]=V}for(var L=0;L<18;L+=1){var V=!D&&(I>>L&1)==1;C[L%3+O-8-3][Math.floor(L/3)]=V}},ee=function(D,I){for(var L=E<<3|I,V=s.getBCHTypeInfo(L),R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<6?C[R][8]=Z:R<8?C[R+1][8]=Z:C[O-15+R][8]=Z}for(var R=0;R<15;R+=1){var Z=!D&&(V>>R&1)==1;R<8?C[8][O-R-1]=Z:R<9?C[8][15-R-1+1]=Z:C[8][15-R-1]=Z}C[O-8][8]=!D},ie=function(D,I){for(var L=-1,V=O-1,R=7,Z=0,J=s.getMaskFunction(I),ne=O-1;ne>0;ne-=2)for(ne==6&&(ne-=1);;){for(var he=0;he<2;he+=1)if(C[V][ne-he]==null){var be=!1;Z<D.length&&(be=(D[Z]>>>R&1)==1);var ge=J(V,ne-he);ge&&(be=!be),C[V][ne-he]=be,R-=1,R==-1&&(Z+=1,R=7)}if(V+=L,V<0||O<=V){V-=L,L=-L;break}}},Q=function(D,I){for(var L=0,V=0,R=0,Z=new Array(I.length),J=new Array(I.length),ne=0;ne<I.length;ne+=1){var he=I[ne].dataCount,be=I[ne].totalCount-he;V=Math.max(V,he),R=Math.max(R,be),Z[ne]=new Array(he);for(var ge=0;ge<Z[ne].length;ge+=1)Z[ne][ge]=255&D.getBuffer()[ge+L];L+=he;var We=s.getErrorCorrectPolynomial(be),Re=l(Z[ne],We.getLength()-1),et=Re.mod(We);J[ne]=new Array(We.getLength()-1);for(var ge=0;ge<J[ne].length;ge+=1){var qe=ge+et.getLength()-J[ne].length;J[ne][ge]=qe>=0?et.getAt(qe):0}}for(var pe=0,ge=0;ge<I.length;ge+=1)pe+=I[ge].totalCount;for(var Ee=new Array(pe),Oe=0,ge=0;ge<V;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<Z[ne].length&&(Ee[Oe]=Z[ne][ge],Oe+=1);for(var ge=0;ge<R;ge+=1)for(var ne=0;ne<I.length;ne+=1)ge<J[ne].length&&(Ee[Oe]=J[ne][ge],Oe+=1);return Ee},X=function(D,I,L){for(var V=u.getRSBlocks(D,I),R=d(),Z=0;Z<L.length;Z+=1){var J=L[Z];R.put(J.getMode(),4),R.put(J.getLength(),s.getLengthInBits(J.getMode(),D)),J.write(R)}for(var ne=0,Z=0;Z<V.length;Z+=1)ne+=V[Z].dataCount;if(R.getLengthInBits()>ne*8)throw"code length overflow. ("+R.getLengthInBits()+">"+ne*8+")";for(R.getLengthInBits()+4<=ne*8&&R.put(0,4);R.getLengthInBits()%8!=0;)R.putBit(!1);for(;!(R.getLengthInBits()>=ne*8||(R.put(j,8),R.getLengthInBits()>=ne*8));)R.put(M,8);return Q(R,V)};P.addData=function(D,I){I=I||"Byte";var L=null;switch(I){case"Numeric":L=f(D);break;case"Alphanumeric":L=h(D);break;case"Byte":L=g(D);break;case"Kanji":L=p(D);break;default:throw"mode:"+I}A.push(L),$=null},P.isDark=function(D,I){if(D<0||O<=D||I<0||O<=I)throw D+","+I;return C[D][I]},P.getModuleCount=function(){return O},P.make=function(){if(S<1){for(var D=1;D<40;D++){for(var I=u.getRSBlocks(D,E),L=d(),V=0;V<A.length;V++){var R=A[V];L.put(R.getMode(),4),L.put(R.getLength(),s.getLengthInBits(R.getMode(),D)),R.write(L)}for(var Z=0,V=0;V<I.length;V++)Z+=I[V].dataCount;if(L.getLengthInBits()<=Z*8)break}S=D}N(!1,z())},P.createTableTag=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+I+"px;",L+='">',L+="<tbody>";for(var V=0;V<P.getModuleCount();V+=1){L+="<tr>";for(var R=0;R<P.getModuleCount();R+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+D+"px;",L+=" height: "+D+"px;",L+=" background-color: ",L+=P.isDark(V,R)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},P.createSvgTag=function(D,I,L,V){var R={};typeof arguments[0]=="object"&&(R=arguments[0],D=R.cellSize,I=R.margin,L=R.alt,V=R.title),D=D||2,I=typeof I>"u"?D*4:I,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,V=typeof V=="string"?{text:V}:V||{},V.text=V.text||null,V.id=V.text?V.id||"qrcode-title":null;var Z=P.getModuleCount()*D+I*2,J,ne,he,be,ge="",We;for(We="l"+D+",0 0,"+D+" -"+D+",0 0,-"+D+"z ",ge+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ge+=R.scalable?"":' width="'+Z+'px" height="'+Z+'px"',ge+=' viewBox="0 0 '+Z+" "+Z+'" ',ge+=' preserveAspectRatio="xMinYMin meet"',ge+=V.text||L.text?' role="img" aria-labelledby="'+K([V.id,L.id].join(" ").trim())+'"':"",ge+=">",ge+=V.text?'<title id="'+K(V.id)+'">'+K(V.text)+"</title>":"",ge+=L.text?'<description id="'+K(L.id)+'">'+K(L.text)+"</description>":"",ge+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ge+='<path d="',he=0;he<P.getModuleCount();he+=1)for(be=he*D+I,J=0;J<P.getModuleCount();J+=1)P.isDark(he,J)&&(ne=J*D+I,ge+="M"+ne+","+be+We);return ge+='" stroke="transparent" fill="black"/>',ge+="</svg>",ge},P.createDataURL=function(D,I){D=D||2,I=typeof I>"u"?D*4:I;var L=P.getModuleCount()*D+I*2,V=I,R=L-I;return T(L,L,function(Z,J){if(V<=Z&&Z<R&&V<=J&&J<R){var ne=Math.floor((Z-V)/D),he=Math.floor((J-V)/D);return P.isDark(he,ne)?0:1}else return 1})},P.createImgTag=function(D,I,L){D=D||2,I=typeof I>"u"?D*4:I;var V=P.getModuleCount()*D+I*2,R="";return R+="<img",R+=' src="',R+=P.createDataURL(D,I),R+='"',R+=' width="',R+=V,R+='"',R+=' height="',R+=V,R+='"',L&&(R+=' alt="',R+=K(L),R+='"'),R+="/>",R};var K=function(D){for(var I="",L=0;L<D.length;L+=1){var V=D.charAt(L);switch(V){case"<":I+="<";break;case">":I+=">";break;case"&":I+="&";break;case'"':I+=""";break;default:I+=V;break}}return I},te=function(D){var I=1;D=typeof D>"u"?I*2:D;var L=P.getModuleCount()*I+D*2,V=D,R=L-D,Z,J,ne,he,be,ge={"██":"█","█ ":"▀"," █":"▄"," ":" "},We={"██":"▀","█ ":"▀"," █":" "," ":" "},Re="";for(Z=0;Z<L;Z+=2){for(ne=Math.floor((Z-V)/I),he=Math.floor((Z+1-V)/I),J=0;J<L;J+=1)be="█",V<=J&&J<R&&V<=Z&&Z<R&&P.isDark(ne,Math.floor((J-V)/I))&&(be=" "),V<=J&&J<R&&V<=Z+1&&Z+1<R&&P.isDark(he,Math.floor((J-V)/I))?be+=" ":be+="█",Re+=D<1&&Z+1>=R?We[be]:ge[be];Re+=`
|
|
254
254
|
`}return L%2&&D>0?Re.substring(0,Re.length-L-1)+Array(L+1).join("▀"):Re.substring(0,Re.length-1)};return P.createASCII=function(D,I){if(D=D||1,D<2)return te(I);D-=1,I=typeof I>"u"?D*2:I;var L=P.getModuleCount()*D+I*2,V=I,R=L-I,Z,J,ne,he,be=Array(D+1).join("██"),ge=Array(D+1).join(" "),We="",Re="";for(Z=0;Z<L;Z+=1){for(ne=Math.floor((Z-V)/D),Re="",J=0;J<L;J+=1)he=1,V<=J&&J<R&&V<=Z&&Z<R&&P.isDark(ne,Math.floor((J-V)/D))&&(he=0),Re+=he?be:ge;for(ne=0;ne<D;ne+=1)We+=Re+`
|
|
255
255
|
`}return We.substring(0,We.length-1)},P.renderTo2dContext=function(D,I){I=I||2;for(var L=P.getModuleCount(),V=0;V<L;V++)for(var R=0;R<L;R++)D.fillStyle=P.isDark(V,R)?"black":"white",D.fillRect(V*I,R*I,I,I)},P};r.stringToBytesFuncs={default:function(b){for(var k=[],j=0;j<b.length;j+=1){var M=b.charCodeAt(j);k.push(M&255)}return k}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,k){var j=function(){for(var S=w(b),E=function(){var q=S.read();if(q==-1)throw"eof";return q},C=0,O={};;){var $=S.read();if($==-1)break;var A=E(),P=E(),N=E(),F=String.fromCharCode($<<8|A),z=P<<8|N;O[F]=z,C+=1}if(C!=k)throw C+" != "+k;return O}(),M=63;return function(S){for(var E=[],C=0;C<S.length;C+=1){var O=S.charCodeAt(C);if(O<128)E.push(O);else{var $=j[S.charAt(C)];typeof $=="number"?($&255)==$?E.push($):(E.push($>>>8),E.push($&255)):E.push(M)}}return E}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[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]],k=1335,j=7973,M=21522,S={},E=function(C){for(var O=0;C!=0;)O+=1,C>>>=1;return O};return S.getBCHTypeInfo=function(C){for(var O=C<<10;E(O)-E(k)>=0;)O^=k<<E(O)-E(k);return(C<<10|O)^M},S.getBCHTypeNumber=function(C){for(var O=C<<12;E(O)-E(j)>=0;)O^=j<<E(O)-E(j);return C<<12|O},S.getPatternPosition=function(C){return b[C-1]},S.getMaskFunction=function(C){switch(C){case o.PATTERN000:return function(O,$){return(O+$)%2==0};case o.PATTERN001:return function(O,$){return O%2==0};case o.PATTERN010:return function(O,$){return $%3==0};case o.PATTERN011:return function(O,$){return(O+$)%3==0};case o.PATTERN100:return function(O,$){return(Math.floor(O/2)+Math.floor($/3))%2==0};case o.PATTERN101:return function(O,$){return O*$%2+O*$%3==0};case o.PATTERN110:return function(O,$){return(O*$%2+O*$%3)%2==0};case o.PATTERN111:return function(O,$){return(O*$%3+(O+$)%2)%2==0};default:throw"bad maskPattern:"+C}},S.getErrorCorrectPolynomial=function(C){for(var O=l([1],0),$=0;$<C;$+=1)O=O.multiply(l([1,c.gexp($)],0));return O},S.getLengthInBits=function(C,O){if(1<=O&&O<10)switch(C){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+C}else if(O<27)switch(C){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+C}else if(O<41)switch(C){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+C}else throw"type:"+O},S.getLostPoint=function(C){for(var O=C.getModuleCount(),$=0,A=0;A<O;A+=1)for(var P=0;P<O;P+=1){for(var N=0,F=C.isDark(A,P),z=-1;z<=1;z+=1)if(!(A+z<0||O<=A+z))for(var q=-1;q<=1;q+=1)P+q<0||O<=P+q||z==0&&q==0||F==C.isDark(A+z,P+q)&&(N+=1);N>5&&($+=3+N-5)}for(var A=0;A<O-1;A+=1)for(var P=0;P<O-1;P+=1){var W=0;C.isDark(A,P)&&(W+=1),C.isDark(A+1,P)&&(W+=1),C.isDark(A,P+1)&&(W+=1),C.isDark(A+1,P+1)&&(W+=1),(W==0||W==4)&&($+=3)}for(var A=0;A<O;A+=1)for(var P=0;P<O-6;P+=1)C.isDark(A,P)&&!C.isDark(A,P+1)&&C.isDark(A,P+2)&&C.isDark(A,P+3)&&C.isDark(A,P+4)&&!C.isDark(A,P+5)&&C.isDark(A,P+6)&&($+=40);for(var P=0;P<O;P+=1)for(var A=0;A<O-6;A+=1)C.isDark(A,P)&&!C.isDark(A+1,P)&&C.isDark(A+2,P)&&C.isDark(A+3,P)&&C.isDark(A+4,P)&&!C.isDark(A+5,P)&&C.isDark(A+6,P)&&($+=40);for(var G=0,P=0;P<O;P+=1)for(var A=0;A<O;A+=1)C.isDark(A,P)&&(G+=1);var ee=Math.abs(100*G/O/O-50)/5;return $+=ee*10,$},S}(),c=function(){for(var b=new Array(256),k=new Array(256),j=0;j<8;j+=1)b[j]=1<<j;for(var j=8;j<256;j+=1)b[j]=b[j-4]^b[j-5]^b[j-6]^b[j-8];for(var j=0;j<255;j+=1)k[b[j]]=j;var M={};return M.glog=function(S){if(S<1)throw"glog("+S+")";return k[S]},M.gexp=function(S){for(;S<0;)S+=255;for(;S>=256;)S-=255;return b[S]},M}();function l(b,k){if(typeof b.length>"u")throw b.length+"/"+k;var j=function(){for(var S=0;S<b.length&&b[S]==0;)S+=1;for(var E=new Array(b.length-S+k),C=0;C<b.length-S;C+=1)E[C]=b[C+S];return E}(),M={};return M.getAt=function(S){return j[S]},M.getLength=function(){return j.length},M.multiply=function(S){for(var E=new Array(M.getLength()+S.getLength()-1),C=0;C<M.getLength();C+=1)for(var O=0;O<S.getLength();O+=1)E[C+O]^=c.gexp(c.glog(M.getAt(C))+c.glog(S.getAt(O)));return l(E,0)},M.mod=function(S){if(M.getLength()-S.getLength()<0)return M;for(var E=c.glog(M.getAt(0))-c.glog(S.getAt(0)),C=new Array(M.getLength()),O=0;O<M.getLength();O+=1)C[O]=M.getAt(O);for(var O=0;O<S.getLength();O+=1)C[O]^=c.gexp(c.glog(S.getAt(O))+E);return l(C,0).mod(S)},M}var u=function(){var b=[[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,7,37,13],[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]],k=function(S,E){var C={};return C.totalCount=S,C.dataCount=E,C},j={},M=function(S,E){switch(E){case a.L:return b[(S-1)*4+0];case a.M:return b[(S-1)*4+1];case a.Q:return b[(S-1)*4+2];case a.H:return b[(S-1)*4+3];default:return}};return j.getRSBlocks=function(S,E){var C=M(S,E);if(typeof C>"u")throw"bad rs block @ typeNumber:"+S+"/errorCorrectionLevel:"+E;for(var O=C.length/3,$=[],A=0;A<O;A+=1)for(var P=C[A*3+0],N=C[A*3+1],F=C[A*3+2],z=0;z<P;z+=1)$.push(k(N,F));return $},j}(),d=function(){var b=[],k=0,j={};return j.getBuffer=function(){return b},j.getAt=function(M){var S=Math.floor(M/8);return(b[S]>>>7-M%8&1)==1},j.put=function(M,S){for(var E=0;E<S;E+=1)j.putBit((M>>>S-E-1&1)==1)},j.getLengthInBits=function(){return k},j.putBit=function(M){var S=Math.floor(k/8);b.length<=S&&b.push(0),M&&(b[S]|=128>>>k%8),k+=1},j},f=function(b){var k=i.MODE_NUMBER,j=b,M={};M.getMode=function(){return k},M.getLength=function(C){return j.length},M.write=function(C){for(var O=j,$=0;$+2<O.length;)C.put(S(O.substring($,$+3)),10),$+=3;$<O.length&&(O.length-$==1?C.put(S(O.substring($,$+1)),4):O.length-$==2&&C.put(S(O.substring($,$+2)),7))};var S=function(C){for(var O=0,$=0;$<C.length;$+=1)O=O*10+E(C.charAt($));return O},E=function(C){if("0"<=C&&C<="9")return C.charCodeAt(0)-48;throw"illegal char :"+C};return M},h=function(b){var k=i.MODE_ALPHA_NUM,j=b,M={};M.getMode=function(){return k},M.getLength=function(E){return j.length},M.write=function(E){for(var C=j,O=0;O+1<C.length;)E.put(S(C.charAt(O))*45+S(C.charAt(O+1)),11),O+=2;O<C.length&&E.put(S(C.charAt(O)),6)};var S=function(E){if("0"<=E&&E<="9")return E.charCodeAt(0)-48;if("A"<=E&&E<="Z")return E.charCodeAt(0)-65+10;switch(E){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+E}};return M},g=function(b){var k=i.MODE_8BIT_BYTE,j=r.stringToBytes(b),M={};return M.getMode=function(){return k},M.getLength=function(S){return j.length},M.write=function(S){for(var E=0;E<j.length;E+=1)S.put(j[E],8)},M},p=function(b){var k=i.MODE_KANJI,j=r.stringToBytesFuncs.SJIS;if(!j)throw"sjis not supported.";(function(E,C){var O=j(E);if(O.length!=2||(O[0]<<8|O[1])!=C)throw"sjis not supported."})("友",38726);var M=j(b),S={};return S.getMode=function(){return k},S.getLength=function(E){return~~(M.length/2)},S.write=function(E){for(var C=M,O=0;O+1<C.length;){var $=(255&C[O])<<8|255&C[O+1];if(33088<=$&&$<=40956)$-=33088;else if(57408<=$&&$<=60351)$-=49472;else throw"illegal char at "+(O+1)+"/"+$;$=($>>>8&255)*192+($&255),E.put($,13),O+=2}if(O<C.length)throw"illegal char at "+(O+1)},S},v=function(){var b=[],k={};return k.writeByte=function(j){b.push(j&255)},k.writeShort=function(j){k.writeByte(j),k.writeByte(j>>>8)},k.writeBytes=function(j,M,S){M=M||0,S=S||j.length;for(var E=0;E<S;E+=1)k.writeByte(j[E+M])},k.writeString=function(j){for(var M=0;M<j.length;M+=1)k.writeByte(j.charCodeAt(M))},k.toByteArray=function(){return b},k.toString=function(){var j="";j+="[";for(var M=0;M<b.length;M+=1)M>0&&(j+=","),j+=b[M];return j+="]",j},k},_=function(){var b=0,k=0,j=0,M="",S={},E=function(O){M+=String.fromCharCode(C(O&63))},C=function(O){if(!(O<0)){if(O<26)return 65+O;if(O<52)return 97+(O-26);if(O<62)return 48+(O-52);if(O==62)return 43;if(O==63)return 47}throw"n:"+O};return S.writeByte=function(O){for(b=b<<8|O&255,k+=8,j+=1;k>=6;)E(b>>>k-6),k-=6},S.flush=function(){if(k>0&&(E(b<<6-k),b=0,k=0),j%3!=0)for(var O=3-j%3,$=0;$<O;$+=1)M+="="},S.toString=function(){return M},S},w=function(b){var k=b,j=0,M=0,S=0,E={};E.read=function(){for(;S<8;){if(j>=k.length){if(S==0)return-1;throw"unexpected end of file./"+S}var O=k.charAt(j);if(j+=1,O=="=")return S=0,-1;if(O.match(/^\s$/))continue;M=M<<6|C(O.charCodeAt(0)),S+=6}var $=M>>>S-8&255;return S-=8,$};var C=function(O){if(65<=O&&O<=90)return O-65;if(97<=O&&O<=122)return O-97+26;if(48<=O&&O<=57)return O-48+52;if(O==43)return 62;if(O==47)return 63;throw"c:"+O};return E},x=function(b,k){var j=b,M=k,S=new Array(b*k),E={};E.setPixel=function(A,P,N){S[P*j+A]=N},E.write=function(A){A.writeString("GIF87a"),A.writeShort(j),A.writeShort(M),A.writeByte(128),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(255),A.writeByte(255),A.writeByte(255),A.writeString(","),A.writeShort(0),A.writeShort(0),A.writeShort(j),A.writeShort(M),A.writeByte(0);var P=2,N=O(P);A.writeByte(P);for(var F=0;N.length-F>255;)A.writeByte(255),A.writeBytes(N,F,255),F+=255;A.writeByte(N.length-F),A.writeBytes(N,F,N.length-F),A.writeByte(0),A.writeString(";")};var C=function(A){var P=A,N=0,F=0,z={};return z.write=function(q,W){if(q>>>W)throw"length over";for(;N+W>=8;)P.writeByte(255&(q<<N|F)),W-=8-N,q>>>=8-N,F=0,N=0;F=q<<N|F,N=N+W},z.flush=function(){N>0&&P.writeByte(F)},z},O=function(A){for(var P=1<<A,N=(1<<A)+1,F=A+1,z=$(),q=0;q<P;q+=1)z.add(String.fromCharCode(q));z.add(String.fromCharCode(P)),z.add(String.fromCharCode(N));var W=v(),G=C(W);G.write(P,F);var ee=0,ie=String.fromCharCode(S[ee]);for(ee+=1;ee<S.length;){var Q=String.fromCharCode(S[ee]);ee+=1,z.contains(ie+Q)?ie=ie+Q:(G.write(z.indexOf(ie),F),z.size()<4095&&(z.size()==1<<F&&(F+=1),z.add(ie+Q)),ie=Q)}return G.write(z.indexOf(ie),F),G.write(N,F),G.flush(),W.toByteArray()},$=function(){var A={},P=0,N={};return N.add=function(F){if(N.contains(F))throw"dup key:"+F;A[F]=P,P+=1},N.size=function(){return P},N.indexOf=function(F){return A[F]},N.contains=function(F){return typeof A[F]<"u"},N};return E},T=function(b,k,j){for(var M=x(b,k),S=0;S<k;S+=1)for(var E=0;E<b;E+=1)M.setPixel(E,S,j(E,S));var C=v();M.write(C);for(var O=_(),$=C.toByteArray(),A=0;A<$.length;A+=1)O.writeByte($[A]);return O.flush(),"data:image/gif;base64,"+O};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(a){for(var o=[],s=0;s<a.length;s++){var c=a.charCodeAt(s);c<128?o.push(c):c<2048?o.push(192|c>>6,128|c&63):c<55296||c>=57344?o.push(224|c>>12,128|c>>6&63,128|c&63):(s++,c=65536+((c&1023)<<10|a.charCodeAt(s)&1023),o.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63))}return o}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(u_);var U$=u_.exports,W$=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sh=Hn&&Hn.__assign||function(){return Sh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Sh.apply(this,arguments)};Object.defineProperty(sm,"__esModule",{value:!0});exports.QRCode_1=sm.QRCode=void 0;var z$=B$,H$=U$,gf=m,V$=function(e){W$(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=gf.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var a=this.canvasRef.current.toDataURL(i,1),o=document.createElement("a");o.download=r??"react-qrcode-logo",o.href=a,o.click()}},t.prototype.utf16to8=function(n){var r="",i,a,o=n.length;for(i=0;i<o;i++)a=n.charCodeAt(i),a>=1&&a<=127?r+=n.charAt(i):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,a,o,s,c,l){l.lineWidth=n,l.fillStyle=o,l.strokeStyle=o,i+=n/2,r+=n/2,a-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(g){return g=Math.min(g,a/2),g<0?0:g});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;l.beginPath(),l.moveTo(r+u,i),l.lineTo(r+a-d,i),d&&l.quadraticCurveTo(r+a,i,r+a,i+d),l.lineTo(r+a,i+a-f),f&&l.quadraticCurveTo(r+a,i+a,r+a-f,i+a),l.lineTo(r+h,i+a),h&&l.quadraticCurveTo(r,i+a,r,i+a-h),l.lineTo(r,i+u),u&&l.quadraticCurveTo(r,i,r+u,i),l.closePath(),l.stroke(),c&&l.fill()},t.prototype.drawPositioningPattern=function(n,r,i,a,o,s,c){c===void 0&&(c=[0,0,0,0]);var l=Math.ceil(r),u,d;typeof c!="number"&&!Array.isArray(c)?(u=c.outer||0,d=c.inner||0):(u=c,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var g=a*r+i,p=o*r+i,v=r*7;this.drawRoundedSquare(l,p,g,v,f,u,!1,n),v=r*3,g+=r*2,p+=r*2,this.drawRoundedSquare(l,p,g,v,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(a){return r>=a.row&&r<=a.row+7&&n>=a.col&&n<=a.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,a,o,s,c,l){if(l){var u=2,d=this.transformPixelLengthIntoNumberOfCells(o,c),f=this.transformPixelLengthIntoNumberOfCells(s,c),h=this.transformPixelLengthIntoNumberOfCells(i,c)-1,g=this.transformPixelLengthIntoNumberOfCells(a,c)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+g+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!z$(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,a=r.ecLevel,o=r.enableCORS,s=r.bgColor,c=r.fgColor,l=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,g=r.eyeRadius,p=r.eyeColor,v=r.logoPaddingStyle,_=+this.props.size,w=+this.props.quietZone,x=this.props.logoWidth?+this.props.logoWidth:0,T=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,k=H$(0,a);k.addData(this.utf16to8(i)),k.make();var j=(n=this.canvasRef)===null||n===void 0?void 0:n.current,M=j.getContext("2d"),S=_+2*w,E=k.getModuleCount(),C=_/E,O=window.devicePixelRatio||1;j.height=j.width=S*O,M.scale(O,O),M.fillStyle=s,M.fillRect(0,0,S,S);var $=w,A=[{row:0,col:0},{row:0,col:E-7},{row:E-7,col:0}];if(M.strokeStyle=c,h==="dots"){M.fillStyle=c;for(var P=C/2,N=0;N<E;N++)for(var F=0;F<E;F++)k.isDark(N,F)&&!this.isInPositioninZone(N,F,A)&&(M.beginPath(),M.arc(Math.round(F*C)+P+$,Math.round(N*C)+P+$,P/100*75,0,2*Math.PI,!1),M.closePath(),M.fill())}else if(h==="fluid"){for(var P=Math.ceil(C/2),N=0;N<E;N++)for(var F=0;F<E;F++)if(k.isDark(N,F)&&!this.isInPositioninZone(N,F,A)){var z=[!1,!1,!1,!1];N>0&&!k.isDark(N-1,F)&&F>0&&!k.isDark(N,F-1)&&(z[0]=!0),N>0&&!k.isDark(N-1,F)&&F<E-1&&!k.isDark(N,F+1)&&(z[1]=!0),N<E-1&&!k.isDark(N+1,F)&&F<E-1&&!k.isDark(N,F+1)&&(z[2]=!0),N<E-1&&!k.isDark(N+1,F)&&F>0&&!k.isDark(N,F-1)&&(z[3]=!0);var q=Math.ceil((F+1)*C)-Math.floor(F*C),W=Math.ceil((N+1)*C)-Math.floor(N*C);M.fillStyle=c,M.beginPath(),M.arc(Math.round(F*C)+P+$,Math.round(N*C)+P+$,P,0,2*Math.PI,!1),M.closePath(),M.fill(),z[0]||M.fillRect(Math.round(F*C)+$,Math.round(N*C)+$,q/2,W/2),z[1]||M.fillRect(Math.round(F*C)+$+Math.floor(q/2),Math.round(N*C)+$,q/2,W/2),z[2]||M.fillRect(Math.round(F*C)+$+Math.floor(q/2),Math.round(N*C)+$+Math.floor(W/2),q/2,W/2),z[3]||M.fillRect(Math.round(F*C)+$,Math.round(N*C)+$+Math.floor(W/2),q/2,W/2)}}else for(var N=0;N<E;N++)for(var F=0;F<E;F++)if(k.isDark(N,F)&&!this.isInPositioninZone(N,F,A)){M.fillStyle=c;var q=Math.ceil((F+1)*C)-Math.floor(F*C),W=Math.ceil((N+1)*C)-Math.floor(N*C);M.fillRect(Math.round(F*C)+$,Math.round(N*C)+$,q,W)}for(var G=0;G<3;G++){var ee=A[G],N=ee.row,F=ee.col,ie=g,Q=void 0;Array.isArray(ie)&&(ie=ie[G]),typeof ie=="number"&&(ie=[ie,ie,ie,ie]),p?Array.isArray(p)?Q=p[G]:Q=p:Q=c,this.drawPositioningPattern(M,C,$,N,F,Q,ie)}if(l){var X=new Image;o&&(X.crossOrigin="Anonymous"),X.onload=function(K){M.save();var te=x||_*.2,D=T||te,I=(_-te)/2,L=(_-D)/2;if(f||b){M.beginPath(),M.strokeStyle=s,M.fillStyle=s;var V=te+2*b,R=D+2*b,Z=I+$-b,J=L+$-b;if(v==="circle"){var ne=Z+V/2,he=J+R/2;M.ellipse(ne,he,V/2,R/2,0,0,2*Math.PI),M.stroke(),M.fill()}else M.fillRect(Z,J,V,R)}M.globalAlpha=u,M.drawImage(X,I+$,L+$,te,D),M.restore(),d&&d(K)},X.src=l}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return gf.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:Sh({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(gf.Component);exports.QRCode_1=sm.QRCode=V$;const q$="_floating-label_3xm9u_1",Y$="_without-label_3xm9u_21",G$="_floating-label-check_3xm9u_184",vf={"floating-label":"_floating-label_3xm9u_1",floatingLabel:q$,"without-label":"_without-label_3xm9u_21",withoutLabel:Y$,"floating-label-check":"_floating-label-check_3xm9u_184",floatingLabelCheck:G$},Z$=({hint:e,children:t})=>e?y.jsx(Zp,{text:e,placement:"top",children:t}):t,Ru=m.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:i,inputContainerClassName:a,isForCheckInput:o,hint:s,required:c,disabled:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[u.label,c?y.jsx("span",{className:oe("fw-bold",{"text-danger":!l}),style:{fontSize:"16px"},children:"*"}):null,s?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return o?y.jsx("div",{className:oe("luminus-floating-label-check",vf.floatingLabelCheck),children:t}):y.jsx(Z$,{hint:s,children:y.jsx(Up,{ref:d,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:e??!1,className:oe(`luminus-floating-label ${n??""}`,vf.floatingLabel,{[a??""]:a},{[vf.withoutLabel]:u.withoutLabel}),children:t})})});Ru.displayName="FloatingLabelInput";const K$="_row-label-input_mqkkx_1",X$="_label_mqkkx_4",Q$="_input-container_mqkkx_9",J$="_invalid-feedback_mqkkx_104",e7="_keep-check-label_mqkkx_132",t7="_is-invalid_mqkkx_160",Io={"row-label-input":"_row-label-input_mqkkx_1",rowLabelInput:K$,label:X$,"input-container":"_input-container_mqkkx_9",inputContainer:Q$,"invalid-feedback":"_invalid-feedback_mqkkx_104",invalidFeedback:J$,"keep-check-label":"_keep-check-label_mqkkx_132",keepCheckLabel:e7,"is-invalid":"_is-invalid_mqkkx_160",isInvalid:t7},ic=m.forwardRef(({hidden:e,children:t,required:n,disabled:r,className:i,isInvalid:a,isForRadioInput:o,isForTextAreaInput:s,inputContainerClassName:c,hint:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:oe("label col-6",{"col-12":s},Io.label),children:y.jsxs(wn,{variant:"form-label",className:oe("d-flex gap-1 align-items-center",a?"text-danger":""),children:[u.label,n?y.jsx("span",{className:oe("fw-bold",{"text-danger":!r}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:d,className:oe("luminus-row-label row gx-0 gy-0",{"is-invalid":a},{[Io.isInvalid]:a},{[i??""]:i},{"d-none":e},Io.rowLabelInput),children:[l?y.jsx(Zp,{text:l,placement:"top",children:h}):h,y.jsx("div",{className:oe("input-container",Io.inputContainer,{"col-6":!u.withoutLabel&&!s},{"col-12":u.withoutLabel||s},{[Io.keepCheckLabel]:o},{[c??""]:c}),children:t})]})});ic.displayName="RowLabelInput";const d_=m.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));d_.displayName="NoInputContainer";const f_=({currentSelection:e,selectedItemNavigateTo:t,children:n})=>{if(!e||!e.id||!t)return y.jsx("div",{className:"luminus-input-container position-relative w-100",children:n});const r=t(e);return y.jsx(to.Link,{to:r,className:"luminus-input-container position-relative w-100 text-decoration-none",children:n})},h_=({InputContainer:e=Ru,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:c,hidden:l,disabled:u,showClearIcon:d,clearValue:f,list:h,className:g,step:p,minLength:v,maxLength:_,noSelectOnFocus:w,hint:x,onConfirm:T,autoComplete:b})=>{const k=t==="number",j=m.useCallback(()=>{if(!r)return;const F=f??null;r(k?F?Number(F):null:(F==null?void 0:F.toString())??"")},[f,k,r]),M=m.useRef(null),[S,E]=m.useState((n==null?void 0:n.toString())??""),C=m.useCallback(F=>{const z=F;r&&r(k?z==null||z===""?null:Number(z):z||null)},[k,r]),O=m.useCallback(F=>{var q;const z=(q=F.target)==null?void 0:q.value;if(!i){C(z);return}E(z),M.current!==null&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{C(z)},i)},[i,C]),$=m.useMemo(()=>{if(T!==void 0)return F=>{F.key==="Enter"&&T&&T()}},[T]);m.useEffect(()=>{E(n===null?"":n.toString())},[n]);const[A,P]=m.useState(!1),N=am(t,n?n.toString()??null:null,A);return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:l,className:g,hint:x,disabled:u,children:[y.jsx(kr.Control,{type:N,placeholder:s??a,size:c,value:i?S:(n==null?void 0:n.toString())??"",onChange:O,className:g??"",hidden:l,disabled:u??!1,list:h,onFocus:F=>{P(!0),!w&&F.target.select()},onBlur:()=>P(!1),onKeyDown:$,step:p,minLength:v,maxLength:_,autoComplete:b}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:j,children:y.jsx(Xs,{})})})]})},p_=({value:e,MiniDetailComponent:t,children:n,miniDetailPlacement:r})=>!e||!t?n:y.jsx(t,{id:e.toString(),placement:r,children:n}),m_=({InputContainer:e=Ru,value:t,options:n,onChange:r,label:i,withoutLabel:a,isNumber:o,size:s,hidden:c,disabled:l,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:g,dropdownWidth:p,hint:v,addNewOptionPath:_,refreshOptions:w,MiniDetailComponent:x,miniDetailPlacement:T,selectedItemNavigateTo:b})=>{const{texts:{customSelect:k}}=m.useContext(Kt),[j,M]=m.useState(!1),[S,E]=m.useState(""),C=m.useCallback(z=>{E(z)},[]),O=m.useMemo(()=>n.find(z=>z.id===t)??null,[n,t]),$=m.useCallback(z=>{var q;return z===null?"":!z.name||z.name.length===0?((q=z.id)==null?void 0:q.toString())??"":f?`${z.name} (${z.id})`:z.name},[f]),A=m.useMemo(()=>{const z=n?[...n]:[];return g!==void 0&&t!==void 0&&t!==null&&(z.some(q=>q.id===t)||z.push({id:t,name:g})),z.map(q=>({id:q.id,name:$(q)})).filter(q=>Kp(q.name,S)).sort((q,W)=>u?0:(q.name??"").localeCompare(W.name??""))},[n,u,S,$,g,t]),P=m.useCallback(z=>{var q;r&&r((z==null?void 0:z.id)===void 0||(z==null?void 0:z.id)===null?null:o?Number(z.id):(q=z.id)==null?void 0:q.toString())},[r,o]),N=m.useCallback(z=>{M(!1),P(z)},[P]),F=m.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:a,label:i??"",hidden:c,inputContainerClassName:oe({"luminus-dropdown-select-open":j}),className:d,hint:v,disabled:l,children:[y.jsx(f_,{currentSelection:O,selectedItemNavigateTo:b,children:y.jsx(p_,{value:t,MiniDetailComponent:x,miniDetailPlacement:T,children:y.jsxs(kr.Select,{ref:F,size:s,value:t??"",onMouseDown:z=>{z.currentTarget.focus(),z.preventDefault()},onClick:()=>{!l&&M(!0)},onChange:()=>{},className:oe("w-100",{"luminus-dropdown-picker-disabled":l}),hidden:c,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:$(O)})]})})}),F.current&&y.jsx(L_,{show:j,onCancel:()=>M(!1),items:A,currentSelection:O??null,onSelectionChange:N,onSearchQueryChange:C,texts:k,disabled:l,inputRef:F,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:p,addNewOptionPath:_,refreshOptions:w})]})})};function n7(e){return nt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function r7(e){return nt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function i7(e){return nt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function a7(e){return nt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const cm=({InputContainer:e=ic,formField:t,label:n,resetsFields:r,options:i,isNumber:a,size:o,showClearIcon:s,clearValue:c,noSortOptions:l,required:u,hidden:d,disabled:f,withoutLabel:h,hint:g,className:p})=>{const{register:v,formState:_,getValues:w,setValue:x,watch:T}=gn.useFormContext(),b=$u({falseIfNotInit:!0});console.log("disabled ",f),console.log("formDisabled ",b);const[k,j]=m.useState(void 0),[M,S]=m.useState(!1),E=m.useMemo(()=>i.toSorted((A,P)=>l?0:(A.name??"").localeCompare(P.name??"")),[i,l]),C=m.useCallback(()=>{const A=c??null;a?x(t,A===null?null:Number(A),{shouldDirty:!0,shouldValidate:M}):x(t,(A==null?void 0:A.toString())??"",{shouldDirty:!0,shouldValidate:M})},[c,a,x,t,M]);m.useEffect(()=>{const A=t.split(".");let P=_.errors;A.forEach(N=>{P!==void 0&&(P=P[N])}),j(P)},[_,t]);const O=m.useMemo(()=>f||b,[f,b]);console.log(O),m.useEffect(()=>{x(t,w(t))},[E,t,w,x]),m.useEffect(()=>{_.isSubmitted&&S(!0)},[_]);const $=k!==void 0;return y.jsx(y.Fragment,{children:y.jsxs(e,{label:n??"",required:u,disabled:O,hidden:d,withoutLabel:h,isInvalid:$,hint:g,className:p,children:[y.jsxs(kr.Select,{size:o,...v(t,{setValueAs:A=>a?A==null||A===""?null:parseInt(A,10):A==null||A===""?null:A,onChange:()=>{r&&r.forEach(A=>x(A,null,{shouldDirty:!0,shouldValidate:M}))}}),isInvalid:$,hidden:d,disabled:O,className:"w-100",children:[y.jsx("option",{value:""}),E.map(A=>y.jsx("option",{value:A.id??"",children:A.name},A.id))]}),s&&T(t)&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(rc,{color:"secondary",size:"sm",onClick:C,children:y.jsx(Xs,{})})}),k&&y.jsx(Pu,{message:k.message})]})})},lm=({InputContainer:e=ic,formField:t,label:n,resetsFields:r,size:i,showClearIcon:a,clearValue:o,required:s,hidden:c,disabled:l,rows:u,withoutLabel:d,customFormControlProps:f,minLength:h,maxLength:g,hint:p,onChange:v,className:_})=>{const{register:w,formState:x,setValue:T,watch:b}=gn.useFormContext(),k=$u({falseIfNotInit:!0}),[j,M]=m.useState(void 0),[S,E]=m.useState(!1),C=m.useCallback(()=>{const P=o??null;T(t,(P==null?void 0:P.toString())??"",{shouldDirty:!0,shouldValidate:S})},[o,T,t,S]),O=m.useCallback(()=>{const P=t.split(".");let N=x.errors;P.forEach(F=>{N!==void 0&&(N=N[F])}),M(N)},[x,t]),$=m.useMemo(()=>l||k,[l,k]);m.useEffect(()=>{O()},[O]),m.useEffect(()=>{x.isSubmitted&&E(!0)},[x]);const A=j!==void 0;return y.jsxs(e,{label:n??"",required:s,disabled:$,hidden:c,withoutLabel:d,isInvalid:A,className:_,hint:p,isForTextAreaInput:!0,children:[y.jsx(kr.Control,{as:"textarea",size:i,...w(t,{setValueAs:P=>P==null||P===""?null:P,onChange:P=>{var N;r&&r.forEach(F=>T(F,null,{shouldDirty:!0,shouldValidate:S})),v&&v((N=P.target)!=null&&N.value?P.target.value.toString():null)}}),isInvalid:A,hidden:c,disabled:$,rows:u??2,className:"w-100",minLength:h,maxLength:g,...f}),a&&b(t)&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(rc,{color:"secondary",size:"sm",onClick:C,children:y.jsx(Xs,{})})}),j&&y.jsx(Pu,{message:j.message})]})},Za=m.forwardRef(({InputContainer:e=ic,type:t,formField:n,label:r,placeholder:i,size:a,resetsFields:o,showClearIcon:s,clearValue:c,required:l,hidden:u,disabled:d,withoutLabel:f,list:h,step:g,CustomOnChangeComponent:p,noSelectOnFocus:v,minLength:_,maxLength:w,hint:x,onChange:T,className:b,autoComplete:k},j)=>{const{register:M,formState:S,setValue:E,watch:C}=gn.useFormContext(),O=$u({falseIfNotInit:!0}),[$,A]=m.useState(void 0),[P,N]=m.useState(!1),F=m.useCallback(()=>{const D=c??null;t==="number"?E(n,D!==null?Number(D):null,{shouldDirty:!0,shouldValidate:P}):E(n,(D==null?void 0:D.toString())??"",{shouldDirty:!0,shouldValidate:P})},[c,t,E,n,P]),z=m.useCallback(()=>{const D=n.split(".");let I=S.errors;D.forEach(L=>{I!==void 0&&(I=I[L])}),A(I)},[S,n]),q=m.useMemo(()=>d||O,[d,O]);m.useEffect(()=>{z()},[z]),m.useEffect(()=>{S.isSubmitted&&N(!0)},[S]);const W=$!==void 0,[G,ee]=m.useState(!1),ie=C(n),Q=am(t,ie??null,G),{ref:X,...K}=M(n,{setValueAs:D=>t==="number"?D==null||D===""?null:Number(D):D==null||D===""?null:D,onChange:D=>{var I;o&&o.forEach(L=>E(L,null,{shouldDirty:!0,shouldValidate:P})),T&&T((I=D.target)!=null&&I.value?t==="number"?Number(D.target.value)??null:D.target.value.toString():null)},onBlur:()=>ee(!1)}),te=m.useRef(null);return m.useImperativeHandle(j,()=>te.current,[te]),y.jsxs(e,{label:r??"",required:l,disabled:q,hidden:u,withoutLabel:f,isInvalid:W,hint:x,className:b,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(kr.Control,{type:Q,placeholder:i??r,size:a,onFocus:D=>{ee(!0),!v&&D.target.select()},...K,ref:D=>{X(D),te.current=D},isInvalid:W,hidden:u,disabled:q,list:h,className:"w-100",step:g,minLength:_,maxLength:w,autoComplete:k}),p&&y.jsx("div",{className:"custom-picker-button",children:p})]}),s&&C(n)&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:F,children:y.jsx(Xs,{})})}),$&&y.jsx(Pu,{message:$.message})]})}),o7="_item_1dy8x_1",g_={item:o7},ja=({color:e="primary",icon:t,className:n,children:r,to:i,as:a,...o})=>y.jsxs(ds.Item,{className:oe(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${n??""}`,g_.item),as:a==="link"?to.Link:void 0,to:i??"",...o,children:[t,r]}),s7="_button_qhwih_1",c7={button:s7},um=m.forwardRef(({color:e="primary",icon:t=y.jsx(e2,{size:21}),text:n,onClick:r,className:i,children:a,...o},s)=>y.jsxs("button",{type:"button",ref:s,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:oe(`btn luminus-context-button text-${e} ${i??""}`,c7.button),...o,children:[t,n]})),l7=m.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:i=>{i.preventDefault(),t(i)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(l_,{name:e}),n]})),dm=e=>y.jsx(ds.Toggle,{...e}),u7="_divider_1e6rk_1",d7={divider:u7},v_=({className:e})=>y.jsx(ds.Divider,{className:oe("luminus-dropdown-divider",e,d7.divider)}),f7="_dropdown_1lk66_1",h7={dropdown:f7},fm=({toggle:e,children:t,align:n,...r})=>y.jsxs(ds,{...r,align:n,children:[e,y.jsx(ds.Menu,{className:oe("luminus-dropdown rounded shadow",h7.dropdown),align:n,children:t})]}),p7="_wrapper_9omw0_1",m7="_controls_9omw0_16",g7="_explorerWindow_9omw0_20",v7="_folderList_9omw0_28",y7="_fileList_9omw0_35",b7="_dndText_9omw0_61",Ei={wrapper:p7,controls:m7,explorerWindow:g7,folderList:v7,fileList:y7,dndText:b7},tn=m.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),x7="_folderIcon_vxg2z_1",_7="_defaultFolder_vxg2z_5",w7="_names_vxg2z_9",C7="_folderType_vxg2z_13",Pc={folderIcon:x7,defaultFolder:_7,names:w7,folderType:C7},y_=({isActive:e,isDefault:t,folderName:n,typeName:r})=>{const{ProjectIconComponent:i}=m.useContext(Kt);return y.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[y.jsx(i,{icon:`folder${e?"-filled":""}`,className:oe("d-inline-block",t?Pc.defaultFolder:"text-primary"),iconProps:{className:Pc.folderIcon}}),y.jsxs("div",{className:oe("d-flex flex-column gap-0 align-items-start",Pc.names),children:[y.jsx("span",{className:e?"fw-bold":"",children:n}),r?y.jsxs("span",{className:Pc.folderType,children:["(",r,")"]}):null]})]})},T7=({customText:e})=>{const{reducer:[t,n]}=m.useContext(tn),r=m.useCallback(()=>{n({type:"select-folder",folderId:"root"})},[n]);return y.jsx("li",{children:y.jsx("button",{onClick:r,type:"button",className:oe("border-0 bg-transparent"),children:y.jsx(y_,{folderName:e??"root",isActive:t.activeFolder==="root",typeName:"",isDefault:!0})})})};function k7(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const b_=()=>{const e=Eu(),{startLoading:t,stopLoading:n}=m.useContext(bu),{reducer:[,r]}=m.useContext(tn),i=m.useCallback(async(o,s)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:o,name:s}),r({type:"update-folders",folderIds:[o],newProperties:{name:s}})}finally{n("documents-renameFolder")}},[e,r,t,n]),a=m.useCallback(async o=>{t("documentsFolderCreate");try{const s=await e.post("/documents/folder",o);r({type:"create-folder",folderData:o,folderId:s.data.id,isOnlyRead:s.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:i,createFolder:a}},gv=(e,t,n)=>{if(e&&"reportValidity"in e){const r=gn.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},x_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?gv(r.ref,n,e):r.refs&&r.refs.forEach(i=>gv(i,n,e))}},S7=(e,t)=>{t.shouldUseNativeValidation&&x_(e,t);const n={};for(const r in e){const i=gn.get(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(E7(t.names||Object.keys(e),r)){const o=Object.assign({},gn.get(n,r));gn.set(o,"root",a),gn.set(n,r,o)}else gn.set(n,r,a)}return n},E7=(e,t)=>e.some(n=>n.startsWith(t+"."));var O7=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=gn.appendErrors(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},ju=function(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return a.shouldUseNativeValidation&&x_({},a),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(o))return{values:{},errors:S7(O7(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}};const M7=()=>{const{reducer:[e],entityId:t,entityType:n}=m.useContext(tn),{zNumberRequired:r,zStringRequired:i}=Mu(),{createFolder:a}=b_(),o=sn.object({name:i(),documentTypeId:r()}),s=gn.useForm({resolver:ju(o)}),c=m.useCallback(async l=>{const u={...l,dbObjectId:t.toString(),entity:n,parentFolderId:e.activeFolder==="root"?null:e.activeFolder};await a(u)},[a,t,n,e.activeFolder]);return{formMethods:s,onSubmit:c}},$7=({handleClose:e})=>{var o;const{texts:{documents:t}}=m.useContext(Kt),{reducer:[n],entityType:r}=m.useContext(tn);if(k7(n),n.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:i,formMethods:a}=M7();return y.jsx(y.Fragment,{children:y.jsx(gn.FormProvider,{...a,children:y.jsxs(kr,{onSubmit:a.handleSubmit(i),children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsx(Mn.Title,{children:t.createFolderInFolder(((o=n.foldersMap.get(n.chosenFolderId))==null?void 0:o.name)??r)})}),y.jsxs(Mn.Body,{children:[y.jsx(Za,{formField:"name",type:"text",label:t.name,required:!0}),y.jsx(cm,{options:n.documentTypes,formField:"documentTypeId",label:t.folderType,isNumber:!0,required:!0})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Qi,{onClick:e,variant:"outlined",color:"secondary",children:t.cancel}),y.jsx(Qi,{type:"submit",children:t.createFolder})]})]})})})},__=100,A7=(e,t)=>{const n=Eu(),{startLoading:r,stopLoading:i}=m.useContext(bu),{loadDocuments:a}=m.useContext(tn),{zStringRequired:o,zString:s,zNumberRequired:c,zDateRequired:l}=Mu(),u=sn.object({name:o(),description:s(),validToDate:l(),documentTypeId:c()}),d=gn.useForm({resolver:ju(u),defaultValues:{...e,validToDate:xu(e.validToDate)}}),f=m.useCallback(async h=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,h),await a(),t()}finally{i("documents-updateProperties")}},[n,e.id,t,a,r,i]);return{formMethods:d,onSubmit:f}},R7=({handleClose:e,file:t})=>{const{texts:{documents:n}}=m.useContext(Kt),{reducer:[r]}=m.useContext(tn),{formMethods:i,onSubmit:a}=A7(t,e);return y.jsxs(y.Fragment,{children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsx(Mn.Title,{children:n.editFileProperties})}),y.jsx(gn.FormProvider,{...i,children:y.jsxs(kr,{onSubmit:i.handleSubmit(a),children:[y.jsxs(Mn.Body,{children:[y.jsx(Za,{formField:"name",type:"text",label:n.name,required:!0}),y.jsx(Za,{formField:"validToDate",type:"date",label:n.validSince,required:!0}),y.jsx(cm,{formField:"documentTypeId",label:n.category,options:r.documentTypes,isNumber:!0,required:!0}),y.jsx(lm,{formField:"description",label:n.description,customFormControlProps:{maxLength:__}})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Qi,{onClick:e,color:"secondary",variant:"outlined",children:n.cancel}),y.jsx(Qi,{type:"submit",children:n.save})]})]})})]})},j7=({handleClose:e})=>{const{reducer:[t]}=m.useContext(tn),n=m.useMemo(()=>{if(t.markedFiles.length===1)return t.constantFiles.find(r=>r.id===t.markedFiles[0])},[t.constantFiles,t.markedFiles]);return n===void 0?(e(),y.jsx(y.Fragment,{})):y.jsx(R7,{file:n,handleClose:e})},P7=()=>{const{reducer:[e,t]}=m.useContext(tn),n=m.useCallback(()=>{t({type:"close-modal"})},[t]),r=m.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx($7,{handleClose:n});case"edit-file-properties":return y.jsx(j7,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(Mn,{show:e.state==="openned-modal",onHide:n,children:r})},vv="documents_drag_image_element",Ic="drop-container-highlight-class",yv="data-drop-container-id",bv="data-draggable-id",I7=()=>{const e=document.getElementById(vv);if(e!==null)return e;const t=document.createElement("div");return t.id=vv,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},hm=()=>{const{apiActions:{moveDocuments:e},reducer:[t]}=m.useContext(tn),n=m.useCallback(l=>{var u;if(t.markedFiles.length>0){const d=I7();d.innerHTML=t.markedFiles.length.toString(),l.dataTransfer.setDragImage(d,0,0),l.dataTransfer.clearData(),l.dataTransfer.setData("application/json",JSON.stringify(t.markedFiles)),l.dataTransfer.dropEffect="none",l.dataTransfer.effectAllowed="move"}else l.dataTransfer.setData("application/json",JSON.stringify([parseInt(((u=l.currentTarget.attributes.getNamedItem(bv))==null?void 0:u.nodeValue)??"",10)])),l.dataTransfer.dropEffect="none",l.dataTransfer.effectAllowed="move"},[t.markedFiles]),r=m.useCallback(l=>({[bv]:l,draggable:t.markedFiles.length===0||t.markedFiles.includes(l),onDragStart:n}),[n,t.markedFiles]),i=m.useCallback(l=>u=>{var h;u.preventDefault(),u.stopPropagation(),u.currentTarget.classList.remove(Ic);const d=u.dataTransfer.files;if(l&&d&&d.length>0){l(d);return}const f=u.dataTransfer.getData("application/json");if(f){const g=JSON.parse(f),p=parseInt(((h=u.currentTarget.attributes.getNamedItem(yv))==null?void 0:h.value)??"",10);e(p,g)}},[e]),a=m.useCallback(()=>l=>{l.preventDefault(),l.stopPropagation()},[]),o=m.useCallback(l=>u=>{u.preventDefault(),u.stopPropagation(),u.dataTransfer.types.includes("Files")?(u.dataTransfer.dropEffect="copy",u.currentTarget.classList.add(Ic)):!l&&u.dataTransfer.types.includes("application/json")?(u.dataTransfer.dropEffect="move",u.currentTarget.classList.add(Ic)):u.dataTransfer.dropEffect="none"},[]),s=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),l.target===l.currentTarget&&(l.dataTransfer.dropEffect="none",l.currentTarget.classList.remove(Ic))},[]),c=m.useCallback((l,u)=>({onDrop:i(u==null?void 0:u.onFilesDrop),onDragOver:a(),onDragEnter:o(u==null?void 0:u.ignoreInner),onDragLeave:s,[yv]:l}),[i,a,o,s]);return{getDraggableProps:r,getDropProps:c}};function w_(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const i=e.childrenIds[r];if(i===t)return!0;const a=n.get(i);if(a&&w_(a,t,n))return!0}return!1}function D7(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}function C_(e,t){const n=t.get(e);return n===void 0?"":n.parentId===null?n.name:`${C_(n.parentId,t)}/${n.name}`}const N7=()=>{const{zString:e,zStringRequired:t,zNumberRequired:n}=Mu();return{formSchema:m.useMemo(()=>sn.object({validToDate:t(),description:e(),name:e(),documentTypeId:n()}),[n,e,t])}},pm=({handleClose:e,files:t,targetFolderId:n})=>{var f;const{texts:{documents:r}}=m.useContext(Kt),{reducer:[i],apiActions:{uploadFiles:a}}=m.useContext(tn),o=m.useMemo(()=>[...t],[t]),s=m.useMemo(()=>n??i.activeFolder,[i.activeFolder,n]),c=m.useMemo(()=>s==="root"?void 0:i.foldersMap.get(s),[s,i.foldersMap]),{formSchema:l}=N7(),u=gn.useForm({resolver:ju(l),defaultValues:{validToDate:xu(new Date().toISOString()),documentTypeId:(f=i.documentTypes.find(h=>{var g;return h.name===((g=i.foldersMap.get(s))==null?void 0:g.defaultDocType)}))==null?void 0:f.id}}),d=m.useCallback(async h=>{s!=="root"&&(await a(t,{folderId:s,...h}),e())},[t,e,s,a]);return y.jsxs(Mn,{show:!0,onHide:e,children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsxs("div",{children:[r.uploadFilesPrompt(t.length,c.name),y.jsx("ul",{children:o.map((h,g)=>y.jsxs("li",{children:[h.name," - ",Ha(h.size)]},`${h.name}-${g}`))})]})}),y.jsx(gn.FormProvider,{...u,children:y.jsxs(kr,{onSubmit:u.handleSubmit(d),children:[y.jsxs(Mn.Body,{children:[y.jsx(cm,{formField:"documentTypeId",label:r.documentType,options:i.documentTypes,isNumber:!0,required:!0}),y.jsx(Za,{formField:"validToDate",label:r.validSince,type:"date",required:!0}),o.length===1?y.jsx(Za,{formField:"name",label:r.name,type:"text"}):null,y.jsx(lm,{formField:"description",label:r.description,customFormControlProps:{maxLength:__}})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Qi,{variant:"outlined",color:"secondary",onClick:e,children:r.cancel}),y.jsx(Qi,{type:"submit",children:r.upload})]})]})})]})},L7="_folder_1cktt_1",F7="_collapseArrowDiv_1cktt_8",B7="_button_1cktt_20",U7="_nestedList_1cktt_24",W7="_numberOfFiles_1cktt_31",z7="_collapseArrow_1cktt_8",Oi={folder:L7,collapseArrowDiv:F7,button:B7,nestedList:U7,numberOfFiles:W7,collapseArrow:z7},T_=({dirId:e,writePermissions:t})=>{const{ProjectIconComponent:n}=m.useContext(Kt),{reducer:[r,i]}=m.useContext(tn),{getDropProps:a}=hm(),[o,s]=m.useState(null),[c,l]=m.useState(!0),u=m.useMemo(()=>{const p=r.foldersMap.get(e);if(p===void 0)throw new Error(`tried to get dir with id ${e}`);return p},[e,r.foldersMap]),d=m.useCallback(()=>{r.activeFolder!=="root"&&w_(u,r.activeFolder,r.foldersMap)&&i({type:"select-folder",folderId:e}),l(!0)},[e,u,i,r.activeFolder,r.foldersMap]),f=m.useMemo(()=>u.childrenIds.length>0,[u.childrenIds.length]),h=m.useCallback(()=>{i({type:"select-folder",folderId:e})},[e,i]),g=m.useMemo(()=>r.filteredFiles.filter(p=>p.folderId===e&&p.archive===!1).length,[e,r.filteredFiles]);return y.jsxs(y.Fragment,{children:[y.jsxs("li",{className:Oi.folder,children:[y.jsx("div",{className:Oi.collapseArrowDiv,children:f?c?y.jsx("button",{onClick:()=>l(!1),type:"button",children:y.jsx(n,{icon:"chevron-right",iconProps:{className:Oi.collapseArrow}})}):y.jsx("button",{onClick:d,type:"button",children:y.jsx(n,{icon:"chevron-down",iconProps:{className:Oi.collapseArrow}})}):null}),y.jsx("button",{className:oe(Oi.button),onClick:h,type:"button",...t&&!u.onlyRead?a(e,{onFilesDrop:p=>s(p)}):{},children:y.jsxs("div",{className:"d-flex align-items-center gap-2",children:[y.jsx(y_,{isDefault:u.isDefault,folderName:u.name,typeName:u.defaultDocType??"",isActive:e===r.activeFolder}),g>0?y.jsxs("span",{className:Oi.numberOfFiles,children:["[",g,"]"]}):void 0]})}),f?c?null:y.jsx("ul",{className:Oi.nestedList,children:u==null?void 0:u.childrenIds.map(p=>y.jsx(T_,{dirId:p,writePermissions:t},p))}):void 0]}),o!==null?y.jsx(pm,{files:o,handleClose:()=>s(null),targetFolderId:e}):null]})},H7="_wrapper_1th2u_1",V7="_downloadButton_1th2u_9",k_={wrapper:H7,downloadButton:V7};function q7(e){return nt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(e)}function Y7(e){return nt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"},child:[]}]})(e)}function G7(e){return nt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23 1.5q.41 0 .7.3.3.29.3.7v19q0 .41-.3.7-.29.3-.7.3H7q-.41 0-.7-.3-.3-.29-.3-.7V18H1q-.41 0-.7-.3-.3-.29-.3-.7V7q0-.41.3-.7Q.58 6 1 6h5V2.5q0-.41.3-.7.29-.3.7-.3zM6 13.28l1.42 2.66h2.14l-2.38-3.87 2.34-3.8H7.46l-1.3 2.4-.05.08-.04.09-.64-1.28-.66-1.29H2.59l2.27 3.82-2.48 3.85h2.16zM14.25 21v-3H7.5v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3H7.5v3zm8.25 15v-3h-6.75v3zm0-4.5v-3.75h-6.75v3.75zm0-5.25V7.5h-6.75v3.75zm0-5.25V3h-6.75v3Z"},child:[]}]})(e)}function Z7(e){return nt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.004 1.5q.41 0 .703.293t.293.703v19.008q0 .41-.293.703t-.703.293H6.996q-.41 0-.703-.293T6 21.504V18H.996q-.41 0-.703-.293T0 17.004V6.996q0-.41.293-.703T.996 6H6V2.496q0-.41.293-.703t.703-.293zM6.035 11.203l1.442 4.735h1.64l1.57-7.876H9.036l-.937 4.653-1.325-4.5H5.38l-1.406 4.523-.938-4.675H1.312l1.57 7.874h1.641zM22.5 21v-3h-15v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3h-15v3Z"},child:[]}]})(e)}const K7="_excel_18ggp_1",X7="_word_18ggp_5",Q7="_pdf_18ggp_9",J7="_image_18ggp_13",Dc={excel:K7,word:X7,pdf:Q7,image:J7},S_=({fileExtension:e,className:t,...n})=>{switch(e==null?void 0:e.toUpperCase()){case"JPG":case"JPEG":case"BMP":case"PNG":return y.jsx("span",{className:oe(t,Dc.image),children:y.jsx(Y7,{...n})});case"XLS":case"XLSX":case"CSV":return y.jsx(G7,{className:oe(t,Dc.excel),...n});case"DOC":case"DOCM":case"DOCX":return y.jsx(Z7,{className:oe(t,Dc.word),...n});case"PDF":return y.jsx(a7,{className:oe(t,Dc.pdf),...n});default:return y.jsx(q7,{})}},eA=()=>{const{ProjectIconComponent:e,texts:{documents:t}}=m.useContext(Kt),{apiActions:{downloadFile:n},reducer:[r]}=m.useContext(tn),i=m.useMemo(()=>r.activeFolder==="root",[r.activeFolder]);return{columns:m.useMemo(()=>[{fieldName:"id",caption:"id",type:"number",isVisible:!1},...i?[{fieldName:"folderName",caption:t.folder,type:"string"}]:[],{fieldName:"--icon",caption:"",type:"string",valueFormat:o=>y.jsx(S_,{fileExtension:o.row.original.fileExtension}),width:36,align:"center",filterType:"none",noSort:!0},{fieldName:"name",caption:t.name,type:"string"},{fieldName:"description",caption:t.description,type:"string"},{fieldName:"fileExtension",caption:t.fileExtension,type:"string",filterType:"select",width:50},{fieldName:"--downloadButton",caption:"",type:"number",filterType:"none",width:38,align:"center",noSort:!0,valueFormat:o=>y.jsx(Au,{className:k_.downloadButton,onClick:()=>n(o.row.original.id,!0),children:y.jsx(e,{icon:"file-download"})})},{fieldName:"documentTypeName",caption:t.documentType,type:"string",filterType:"select"},{fieldName:"validToDate",caption:t.validSince,type:"date"},{fieldName:"size",caption:t.size,type:"number",valueFormat:({cell:{value:o}})=>o!==void 0?Ha(o*1024*1024):"",filterType:"none"},{fieldName:"archive",caption:t.archived,type:"boolean",filterType:"select",valueFormat:({cell:{value:o}})=>o?t.yes[0]:t.no[0]}],[e,t.archived,t.description,t.documentType,t.fileExtension,t.folder,t.name,t.no,t.size,t.validSince,t.yes,n,i])}},tA=({BnfTableComponent:e,tableIdentifier:t,writePermissions:n})=>{const{reducer:[r,i]}=m.useContext(tn),{columns:a}=eA(),o=m.useCallback(h=>{i({type:"mark-files-by-action",setStateAction:h})},[i]),s=m.useMemo(()=>r.activeFolder==="root",[r.activeFolder]),c=m.useMemo(()=>{var h;return r.activeFolder==="root"?!1:((h=r.foldersMap.get(r.activeFolder))==null?void 0:h.onlyRead)??!1},[r.activeFolder,r.foldersMap]),l=m.useMemo(()=>({enabled:n&&!s,idField:"id",selectedRows:r.markedFiles,setSelectedRows:o}),[s,o,r.markedFiles,n]),u=m.useMemo(()=>r.activeFolder==="root"?r.filteredFiles:r.filteredFiles.filter(h=>h.folderId===r.activeFolder),[r.activeFolder,r.filteredFiles]),{getDraggableProps:d}=hm(),f=m.useCallback(h=>n===!1||c?{}:d(h.id),[d,c,n]);return y.jsx("div",{className:oe(k_.wrapper),children:y.jsx(e,{data:u,columnsDef:a,rowSelection:l,useScrollableContainer:!0,getRowProps:f,defaultConfig:{defaultFilters:[{id:"archive",value:"false"}]},tableId:t,searchStatePrefix:"docs",useSearchState:!0,hideBottomBar:!0},r.activeFolder)})},nA="_wrapper_1q562_1",rA="_divButtons_1q562_10",yf={wrapper:nA,divButtons:rA},iA="_wrapper_1bpdd_1",aA="_fileInput_1bpdd_5",xv={wrapper:iA,fileInput:aA},oA=({entityId:e,entityType:t,children:n,disabled:r})=>{const i=m.useRef(null),[a,o]=m.useState(null),{reducer:[s]}=m.useContext(tn),c=f=>{var h;(((h=f.target.files)==null?void 0:h.length)??0)>0&&o(f.target.files)},l=m.useCallback(()=>{o(null),i.current&&(i.current.value="")},[]),u=m.useMemo(()=>`documents-upload-${t}-${e}`,[e,t]),d=m.useMemo(()=>r||s.activeFolder==="root",[r,s.activeFolder]);return y.jsxs("div",{className:xv.wrapper,children:[y.jsx("label",{htmlFor:u,className:oe("btn btn-context luminus-context-button",d?"disabled":void 0),children:n}),y.jsx("input",{id:u,type:"file",multiple:!0,onChange:c,className:xv.fileInput,ref:i,disabled:d}),a!==null?y.jsx(pm,{handleClose:l,files:a}):void 0]})},dr=({children:e,onClick:t,className:n,disabled:r=!1})=>y.jsx(Au,{onClick:t,className:n,disabled:r,children:e}),sA=({className:e,entityId:t,entityType:n})=>{var j,M;const{texts:{documents:r}}=m.useContext(Kt),{prompt:i}=r2(),{confirm:a}=rm(),{apiActions:o,reducer:[s,c]}=m.useContext(tn),{deleteFiles:l,renameFiles:u,downloadAsZip:d,archivateFiles:f,deleteDirectory:h}=o,{renameFolder:g}=b_(),p=m.useMemo(()=>s.markedFiles.length===0,[s.markedFiles.length]),v=m.useMemo(()=>s.markedFiles.length===1,[s.markedFiles.length]),_=m.useCallback(async()=>{if(s.activeFolder==="root")return;const S=await i(r.enterNewFolderName,{input:"input"});S!==null&&g(s.activeFolder,S)},[r.enterNewFolderName,i,g,s.activeFolder]),w=m.useCallback(async()=>{if(s.activeFolder==="root")return;const S=await i(r.enterNewFileName,{input:"input"});S!==null&&u(S)},[r.enterNewFileName,i,u,s.activeFolder]),x=m.useMemo(()=>s.activeFolder==="root",[s.activeFolder]),T=m.useMemo(()=>{var S;return s.activeFolder==="root"?!1:((S=s.foldersMap.get(s.activeFolder))==null?void 0:S.onlyRead)??!1},[s.activeFolder,s.foldersMap]),b=m.useMemo(()=>s.markedFiles.every(S=>{var E;return((E=s.constantFiles.find(C=>C.id===S))==null?void 0:E.archive)===!1}),[s.constantFiles,s.markedFiles]),k=m.useMemo(()=>s.markedFiles.every(S=>{var E;return((E=s.constantFiles.find(C=>C.id===S))==null?void 0:E.archive)===!0}),[s.constantFiles,s.markedFiles]);return y.jsx("div",{className:oe(e,yf.wrapper,s.state==="folder-choosing"?"ignore-dim":void 0,"d-flex justify-content-between"),children:s.state!=="folder-choosing"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:yf.divButtons,children:[y.jsx(oA,{entityId:t,entityType:n,disabled:T,children:r.uploadFiles}),y.jsx(dr,{onClick:()=>{c({type:"open-modal",modalType:"create-folder",chosenFolderId:s.activeFolder??"root"})},disabled:T,children:r.createFolder}),y.jsx(dr,{disabled:s.activeFolder==="root"||((j=s.foldersMap.get(s.activeFolder))==null?void 0:j.isDefault),onClick:async()=>{var E;await a(`${r.deleteFolder} ${(E=s.foldersMap.get(s.activeFolder))==null?void 0:E.name}?`)&&h(s.activeFolder)},children:r.deleteFolder}),y.jsx(dr,{disabled:s.activeFolder==="root"||((M=s.foldersMap.get(s.activeFolder))==null?void 0:M.isDefault),onClick:_,children:r.renameFolder})]}),!x&&!T?y.jsxs("div",{className:yf.divButtons,children:[y.jsx(dr,{onClick:()=>{c({type:"open-modal",modalType:"edit-file-properties"})},disabled:!v,children:r.editFileProperties}),y.jsx(dr,{onClick:async()=>{await a(r.confirmDeleteFile(s.markedFiles.length))&&l(s.markedFiles)},disabled:p,children:r.delete}),k?y.jsx(dr,{onClick:async()=>{await a(r.confirmDearchiveFile(s.markedFiles.length))&&await f(!0)},disabled:p,children:r.dearchivate}):y.jsx(dr,{onClick:async()=>{await a(r.confirmArchiveFile(s.markedFiles.length))&&await f()},disabled:p||!b,children:r.archivate}),y.jsx(dr,{onClick:w,disabled:p,children:r.rename}),y.jsx(dr,{onClick:d,disabled:p,children:r.downloadZip})]}):null]}):s.state==="folder-choosing"?y.jsx(y.Fragment,{children:y.jsx(dr,{onClick:()=>c({type:"return-from-folder-choosing"}),className:oe("ignore-dim","body-background-color"),children:r.back})}):void 0})},cA=({file:e})=>{const{confirm:t}=rm(),{reducer:[n],apiActions:{downloadFile:r}}=m.useContext(tn),{texts:{documents:i}}=m.useContext(Kt),a=m.useCallback(async()=>{await t(i.confirmFileDownload(e.name,e.size==null?void 0:Ha(e.size*1024*1024)))&&r(e.id)},[t,i,r,e.id,e.name,e.size]);return y.jsxs(vu,{action:!0,onClick:a,children:[y.jsx(wn,{variant:"body",className:"text-muted",children:C_(e.folderId,n.foldersMap)}),y.jsxs("div",{className:"d-flex justify-content-between gap-2",children:[y.jsx(wn,{variant:"body",children:e.name}),y.jsx(wn,{variant:"body",children:e.size==null?null:Ha(e.size*1024*1024)})]})]})},lA="_typeSelect_m3myk_1",uA={typeSelect:lA},dA=()=>{const{reducer:[e]}=m.useContext(tn),{texts:{documents:t}}=m.useContext(Kt),[n,r]=m.useState(""),[i,a]=m.useState(null),o=m.useMemo(()=>{const c=new Map;return e.filteredFiles.forEach(u=>{c.get(u.documentTypeId)===void 0&&c.set(u.documentTypeId,u.documentTypeName)}),[{id:null,name:t.all},...Array.from(c).map(u=>({id:u[0],name:u[1]}))]},[t.all,e.filteredFiles]),s=m.useMemo(()=>e.filteredFiles.filter(c=>Kp(c.name,n)&&(i===null||c.documentTypeId===i)),[n,i,e.filteredFiles]);return y.jsxs("div",{className:"d-flex h-100 flex-column",children:[y.jsxs("div",{className:"d-flex gap-1 mb-1",children:[y.jsx(m_,{options:o,label:t.documentType,value:i,onChange:a,isNumber:!0,size:"sm",className:uA.typeSelect}),y.jsx(h_,{label:t.search,type:"text",value:n,onChange:c=>r(c===null?"":c),className:"flex-grow-1",size:"sm"})]}),y.jsx($x,{className:"overflow-y-auto",children:s.map(c=>y.jsx(cA,{file:c},c.id))})]})};function fA(e){return{name:e.name,defaultDocType:e.defaultDocType,childrenIds:[],parentId:e.parentId??null,isDefault:e.isDefault,onlyRead:e.onlyRead}}function hA(e){const t=[],n=new Map,r=new Map;return e.forEach(i=>{n.set(i.id,fA(i)),i.parentId===null?t.push(i.id):r.set(i.id,i.parentId)}),r.forEach((i,a)=>{const o=n.get(i);if(o===void 0)throw new Error(`Did not get folder with ID ${i}, which is supposed to be parent directory of folder with ID ${a}`);o.childrenIds.push(a)}),{dirsMap:n,rootIds:t}}function _v(e,t){const n=t.toUpperCase();return e.filter(r=>{var a;const i=(a=r.name)==null?void 0:a.toUpperCase();return i==null?void 0:i.includes(n)})}function pA(e,t){return e.map(n=>{var r;return{...n,folderName:((r=t.get(n.folderId))==null?void 0:r.name)??""}})}const mA=([e,t],n,r)=>{const{texts:{documents:i}}=m.useContext(Kt),{startLoading:a,stopLoading:o}=m.useContext(bu),{addNotification:s}=Su(),c=Eu(),l=m.useCallback(async x=>{a("documentList");try{const b=(await c.get(`/documents/${n}/${r}`)).data,{dirsMap:k,rootIds:j}=hA(b.folders),M=pA(b.documents,k);t({type:"load-data",files:M,foldersMap:k,rootFolderIds:j,setActiveFolder:x})}finally{o("documentList")}},[c,t,r,n,a,o]);m.useEffect(()=>{l(!0)},[l]);const u=m.useCallback(async()=>{a("documents-types");try{const x=await c.get(`/documents/types/${n}`);if(x.status!==200)throw new Error(`Unexpected status code: ${x.status}`);t({type:"load-document-types",documentTypes:x.data})}finally{o("documents-types")}},[c,t,n,a,o]);m.useEffect(()=>{u()},[u]);const d=m.useCallback(async(x,T)=>{const b=T??e.markedFiles;a("documentsMove");try{await c.put(`/documents/move-to-folder?folderId=${x}`,b),t({type:"update-files",fileIds:b,newProperties:{folderId:x}}),s(i.fileMoveSuccessful(b.length,e.foldersMap.get(x).name),"success")}finally{o("documentsMove")}},[e.markedFiles,e.foldersMap,a,c,t,s,i,o]),f=m.useCallback(async x=>{const T=x??e.markedFiles;a("documentsFilesDelete");try{const b=await c.delete(`/documents/delete?${hh(T,"documentIds")}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"delete-files",fileIds:T}),s(i.fileDeleteSuccessful(T.length),"success")}finally{o("documentsFilesDelete")}},[e.markedFiles,a,c,t,s,i,o]),h=m.useCallback(async x=>{var T;if(!(x==="root"||(T=e.foldersMap.get(x))!=null&&T.isDefault)){a("documentsFolderDelete");try{const b=await c.delete(`/documents/folder/${x}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"delete-folder",folderId:x}),s(i.folderDeleteSuccessful(e.foldersMap.get(x).name),"success")}finally{o("documentsFolderDelete")}}},[e.foldersMap,a,c,t,s,i,o]),g=m.useCallback(async x=>{a("documentsRename");try{const T=await c.put("/documents/update-name",{documentIds:e.markedFiles,name:x});if(T.status!==200)throw new Error(`Unexpected status code: ${T.status}`);l()}finally{o("documentsRename")}},[a,c,e.markedFiles,l,o]),p=m.useCallback(async x=>{a("documents-archivate");try{const T=await c.put(`/documents/${x?"dearchive":"archive"}`,e.markedFiles);if(T.status!==200)throw new Error(`Unexpected status code: ${T.status}`);t({type:"update-files",fileIds:e.markedFiles,newProperties:{archive:!x}}),s((x?i.dearchivateSuccessful:i.archivateSuccessful)(e.markedFiles.length),"success")}finally{o("documents-archivate")}},[a,c,e.markedFiles,t,s,i.archivateSuccessful,i.dearchivateSuccessful,o]),v=m.useCallback(async()=>{var T;if(e.activeFolder==="root")return;const x=e.markedFiles.length;s(i.downloadAsZip(x),"info"),a("documents-ZIP_download");try{const b=await c.get(`/documents/download-zip?${hh(e.markedFiles,"documentIds")}`,{responseType:"blob"});wl(b.data,(((T=e.foldersMap.get(e.activeFolder))==null?void 0:T.name)??"")+"_files")}finally{o("documents-ZIP_download")}},[e.activeFolder,e.markedFiles,e.foldersMap,s,i,a,c,o]),_=m.useCallback(async(x,T)=>{s(i.downloadingFile,"info"),a("documents-downloading_file");try{const b=await c.get(`/documents/${x}?isSmall=true`,{responseType:"blob"}),k=e.constantFiles.find(M=>M.id===x),j=`${(k==null?void 0:k.name)??x.toString()}.${k!=null&&k.fileExtension?k==null?void 0:k.fileExtension.toLowerCase():"unknown"}`;wl(b.data,j,T)}finally{o("documents-downloading_file")}},[s,i.downloadingFile,a,c,e.constantFiles,o]),w=m.useCallback(async(x,T)=>{a("documents-upload"),s(i.uploadingDocuments,"info");try{await c.postForm("/documents/upload",{files:x,...T}),await l()}finally{o("documents-upload")}},[a,s,i.uploadingDocuments,c,l,o]);return{loadDocuments:l,moveDocuments:d,deleteFiles:f,deleteDirectory:h,renameFiles:g,archivateFiles:p,downloadAsZip:v,downloadFile:_,uploadFiles:w}},gA=(e,t)=>{var n,r;switch(t.type){case"load-data":{const i={...e,constantFiles:t.files,filteredFiles:_v(t.files,e.searchString),foldersMap:t.foldersMap,rootFolderIds:t.rootFolderIds};if(t.setActiveFolder){const a=t.rootFolderIds.find(o=>t.files.some(s=>s.archive===!1&&s.folderId===o))??"root";i.activeFolder=a}return i}case"load-document-types":return{...e,documentTypes:t.documentTypes};case"select-folder":return{...e,activeFolder:t.folderId,markedFiles:[]};case"mark-file":{const i=e.markedFiles.includes(t.fileId)?[...e.markedFiles.filter(a=>a!==t.fileId)]:[...e.markedFiles,t.fileId];return{...e,state:i.length>0?"selection-file":"explorer",markedFiles:i}}case"mark-files-by-action":{const i=typeof t.setStateAction=="function"?t.setStateAction(e.markedFiles):t.setStateAction;return{...e,state:i.length>0?"selection-file":"explorer",markedFiles:i}}case"mark-all-files":return e.markedFiles.length<e.filteredFiles.filter(i=>i.folderId===e.activeFolder).length?{...e,markedFiles:e.filteredFiles.filter(i=>i.folderId===e.activeFolder).map(i=>i.id),state:"explorer"}:{...e,markedFiles:[],state:"explorer"};case"enter-folder-choosing":return e.state==="folder-choosing"||e.state==="openned-modal"?e:{...e,state:"folder-choosing",canTargetRoot:t.canTargetRoot??!1,previousState:e.state,choosingType:t.choosingType};case"return-from-folder-choosing":return e.state!=="folder-choosing"?e:{...e,state:e.previousState};case"update-files":return{...e,filteredFiles:[...e.filteredFiles.map(i=>t.fileIds.includes(i.id)?{...i,...t.newProperties}:i)],constantFiles:[...e.constantFiles.map(i=>t.fileIds.includes(i.id)?{...i,...t.newProperties}:i)],markedFiles:[],state:"explorer"};case"update-folders":{const i=new Map(e.foldersMap);return t.folderIds.forEach(a=>{i.set(a,{...e.foldersMap.get(a),...t.newProperties})}),{...e,foldersMap:i}}case"delete-files":return{...e,filteredFiles:[...e.filteredFiles.filter(i=>!t.fileIds.includes(i.id))],constantFiles:[...e.constantFiles.filter(i=>!t.fileIds.includes(i.id))],markedFiles:e.markedFiles.filter(i=>!t.fileIds.includes(i)),state:"explorer"};case"open-modal":switch(t.modalType){case"create-folder":return{...e,state:"openned-modal",modalType:t.modalType,chosenFolderId:t.chosenFolderId};default:return{...e,state:"openned-modal",modalType:t.modalType}}case"close-modal":return{...e,state:"explorer"};case"delete-folder":{const i=new Map(e.foldersMap),a=(n=i.get(t.folderId))==null?void 0:n.parentId;let o=[...e.rootFolderIds];if(a){const s=JSON.parse(JSON.stringify(i.get(a)));s.childrenIds=s.childrenIds.filter(c=>c!==t.folderId),i.set(a,s)}else o=o.filter(s=>s!==t.folderId);return i.delete(t.folderId),{...e,rootFolderIds:o,foldersMap:i,activeFolder:"root"}}case"create-folder":{const i=new Map(e.foldersMap);i.set(t.folderId,{name:t.folderData.name,defaultDocType:(r=e.documentTypes.find(o=>o.id===t.folderData.documentTypeId))==null?void 0:r.name,childrenIds:[],parentId:t.folderData.parentFolderId,isDefault:!1,onlyRead:t.isOnlyRead});const a=[...e.rootFolderIds];if(t.folderData.parentFolderId===null)a.push(t.folderId);else{const o=i.get(t.folderData.parentFolderId),s=JSON.parse(JSON.stringify(o));s.childrenIds.push(t.folderId),i.set(t.folderData.parentFolderId,s)}return{...e,state:"explorer",rootFolderIds:a,foldersMap:i}}case"search-files":{const i=_v(e.constantFiles,t.searchString);return{...e,searchString:t.searchString,filteredFiles:i,markedFiles:e.markedFiles.filter(a=>i.map(o=>o.id).includes(a))}}default:throw new Error("Wrong action.type specified.")}},vA=()=>{const e={state:"explorer",activeFolder:"root",searchString:"",filteredFiles:[],constantFiles:[],foldersMap:new Map,rootFolderIds:[],markedFiles:[],documentTypes:[]},[t,n]=m.useReducer(gA,e);return[t,n]},yA=m.memo(({entityType:e,entityId:t,className:n,BnfTableComponent:r,tableIdentifier:i,customRootFolderName:a,writePermissions:o=!0,...s})=>{const{isMobile:c}=nc(),{ProjectIconComponent:l,texts:{documents:u}}=m.useContext(Kt),[d,f]=vA(),[h,g]=m.useState(null),{loadDocuments:p,...v}=mA([d,f],e,t),_=m.useMemo(()=>({entityId:t,entityType:e,apiActions:v,loadDocuments:p,reducer:[d,f]}),[t,e,v,p,d,f]),{getDropProps:w}=hm();return c?y.jsx(tn.Provider,{value:_,children:y.jsx(dA,{})}):y.jsx("div",{...s,className:oe(Ei.wrapper,n),onDragOver:x=>{x.dataTransfer.dropEffect="none",x.stopPropagation(),x.preventDefault()},onDragEnter:x=>{x.dataTransfer.dropEffect="none",x.stopPropagation(),x.preventDefault()},children:y.jsxs(tn.Provider,{value:_,children:[y.jsx("div",{className:oe(d.state==="folder-choosing"?"dim-others":void 0,Ei.explorerWindow),children:y.jsxs("ul",{className:Ei.folderList,children:[y.jsx(T7,{customText:a??e}),d.rootFolderIds.map(x=>y.jsx(T_,{dirId:x,writePermissions:o},x))]})}),y.jsxs("div",{className:oe(Ei.explorerWindow,Ei.fileList),...o&&D7(d)?w(d.activeFolder,{onFilesDrop:x=>g(x),ignoreInner:!0}):{},children:[y.jsxs("div",{className:Ei.dndText,children:[y.jsx(l,{icon:"file-upload",iconProps:{style:{marginRight:0}}}),y.jsx("span",{children:u.dropToUpload})]}),y.jsx(tA,{tableIdentifier:i,BnfTableComponent:r,writePermissions:o},(d.activeFolder==="root").toString())]}),o?y.jsx(sA,{className:Ei.controls,entityType:e,entityId:t}):null,y.jsx(P7,{}),h!==null?y.jsx(pm,{files:h,handleClose:()=>g(null),targetFolderId:d.activeFolder==="root"?void 0:d.activeFolder}):null]})})}),bA="Left",xA="Right",_A="Up",wA="Down",Oa={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Eh={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},wv="mousemove",Cv="mouseup",CA="touchend",TA="touchmove",kA="touchstart";function SA(e,t,n,r){return e>t?n>0?xA:bA:r>0?wA:_A}function Tv(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function EA(e,t){const n=u=>{const d="touches"in u;d&&u.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(wv,r),document.addEventListener(Cv,o));const{clientX:g,clientY:p}=d?u.touches[0]:u,v=Tv([g,p],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},f),Eh),{initial:v.slice(),xy:v,start:u.timeStamp||0})})},r=u=>{e((d,f)=>{const h="touches"in u;if(h&&u.touches.length>1)return d;if(u.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:p}=h?u.touches[0]:u,[v,_]=Tv([g,p],f.rotationAngle),w=v-d.xy[0],x=_-d.xy[1],T=Math.abs(w),b=Math.abs(x),k=(u.timeStamp||0)-d.start,j=Math.sqrt(T*T+b*b)/(k||1),M=[w/(k||1),x/(k||1)],S=SA(T,b,w,x),E=typeof f.delta=="number"?f.delta:f.delta[S.toLowerCase()]||Oa.delta;if(T<E&&b<E&&!d.swiping)return d;const C={absX:T,absY:b,deltaX:w,deltaY:x,dir:S,event:u,first:d.first,initial:d.initial,velocity:j,vxvy:M};C.first&&f.onSwipeStart&&f.onSwipeStart(C),f.onSwiping&&f.onSwiping(C);let O=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${S}`])&&(O=!0),O&&f.preventScrollOnSwipe&&f.trackTouch&&u.cancelable&&u.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:C,swiping:!0})})},i=u=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(u.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:u}),f.onSwiped&&f.onSwiped(h);const g=f[`onSwiped${h.dir}`];g&&g(h)}}else f.onTap&&f.onTap({event:u});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:u}),Object.assign(Object.assign(Object.assign({},d),Eh),{eventData:h})})},a=()=>{document.removeEventListener(wv,r),document.removeEventListener(Cv,o)},o=u=>{a(),i(u)},s=(u,d)=>{let f=()=>{};if(u&&u.addEventListener){const h=Object.assign(Object.assign({},Oa.touchEventOptions),d.touchEventOptions),g=[[kA,n,h],[TA,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[CA,i,h]];g.forEach(([p,v,_])=>u.addEventListener(p,v,_)),f=()=>g.forEach(([p,v])=>u.removeEventListener(p,v))}return f},l={ref:u=>{u!==null&&e((d,f)=>{if(d.el===u)return d;const h={};return d.el&&d.el!==u&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&u&&(h.cleanUpTouch=s(u,f)),Object.assign(Object.assign(Object.assign({},d),{el:u}),h)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function OA(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function mm(e){const{trackMouse:t}=e,n=ue.useRef(Object.assign({},Eh)),r=ue.useRef(Object.assign({},Oa)),i=ue.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Oa),e);let a;for(a in Oa)r.current[a]===void 0&&(r.current[a]=Oa[a]);const[o,s]=ue.useMemo(()=>EA(c=>n.current=c(n.current,r.current),{trackMouse:t}),[t]);return n.current=OA(n.current,r.current,i.current,s),o}const MA="_side-content-bar_16o0s_1",$A="_mobile_16o0s_12",AA="_expanded_16o0s_20",RA="_content-container_16o0s_23",jA="_resizer_16o0s_31",PA="_expander_16o0s_46",IA="_icon_16o0s_65",jr={"side-content-bar":"_side-content-bar_16o0s_1",sideContentBar:MA,mobile:$A,expanded:AA,"content-container":"_content-container_16o0s_23",contentContainer:RA,resizer:jA,expander:PA,icon:IA},E_=({width:e,children:t,isExpandedOnMobileState:[n,r],resizeable:i=!0,onResize:a})=>{const{ProjectIconComponent:o}=m.useContext(Kt),{isMobile:s}=nc(),c=mm({onSwipedRight:d=>{d.velocity>.8&&r(!1)},delta:100}),[l,u]=m.useState(null);return y.jsxs(y.Fragment,{children:[y.jsxs("section",{className:oe("luminus-side-content-bar shadow",jr.sideContentBar,{[jr.mobile]:s},{[jr.expanded]:n}),style:{width:`${e}px`},...c,children:[i&&!s?y.jsx("div",{role:"button",className:oe(jr.resizer,"luminus-side-content-bar-resizer","shadow"),draggable:!0,onDragStart:d=>u({startX:d.clientX,widthStart:e}),onDrag:d=>a(((l==null?void 0:l.widthStart)??0)+(((l==null?void 0:l.startX)??0)-d.clientX)),onDragEnd:()=>u(null),children:y.jsx(o,{className:jr.icon,icon:"resizer-horizontal"})}):null,y.jsx("div",{className:jr.contentContainer,children:t})]}),s?y.jsx("div",{role:"button",onClick:()=>r(!n),className:oe(jr.expander,{[jr.expanded]:n},"luminus-side-content-bar-expander","shadow"),children:y.jsx(o,{className:jr.icon,icon:"chevron-left"})}):null]})},DA=({title:e})=>y.jsx("div",{className:"mb-3",children:typeof e=="string"?y.jsx(wn,{variant:"h3",children:e}):e}),NA="_full-screen-container_1rm4r_1",O_={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:NA},LA=oe("overflow-hidden luminus-full-screen-container",O_.fullScreenContainer),FA="container-fluid",BA=({title:e,children:t,sideContent:n,sideContentWidth:r=250,sideContentResizeable:i=!0,noPadding:a,className:o,variant:s="main",helmet:c,unavailableOnMobile:l})=>{const{addHelmet:u,removeHelmet:d}=m.useContext(s_),{texts:{container:f}}=m.useContext(Kt),[h,g]=m.useState(r),[p,v]=m.useState(!1),_=m.useMemo(()=>{switch(s){case"fullScreen":return LA;case"main":return FA;default:throw new Error(`PageContainer got incorrect variant type: ${s}`)}},[s]);m.useEffect(()=>(c?u(c):typeof e=="string"&&e&&u(e),()=>d()),[c,u,d,e]);const w=mm({onSwipedLeft:b=>{b.velocity>.8&&v(!0)},delta:100}),{isMobile:x}=nc(),T=m.useMemo(()=>x&&l,[x,l]);return m.useEffect(()=>{g(r)},[r]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe(_,a?"p-0":"p-3",o),style:s==="fullScreen"?{width:n?`calc(100% - ${h}px)`:"100%"}:void 0,...w,children:y.jsx("div",{className:s==="fullScreen"?O_.fullScreenContainer:void 0,style:s==="main"?{paddingRight:n?`${h}px`:void 0}:{height:"100%",width:"100%"},children:T?y.jsx(bm,{variant:"warning",children:f.unavailableOnMobile}):y.jsxs(y.Fragment,{children:[e?y.jsx(DA,{title:e}):null,t]})})}),n&&!T?y.jsx(E_,{width:h,isExpandedOnMobileState:[p,v],resizeable:i,onResize:b=>i?g(b):{},children:n}):null]})};var gm={};gm.match=qA;gm.parse=M_;var UA=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,WA=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,zA=/^(?:(min|max)-)?(.+)/,HA=/(em|rem|px|cm|mm|in|pt|pc)?$/,VA=/(dpi|dpcm|dppx)?$/;function qA(e,t){return M_(e).some(function(n){var r=n.inverse,i=n.type==="all"||t.type===n.type;if(i&&r||!(i||r))return!1;var a=n.expressions.every(function(o){var s=o.feature,c=o.modifier,l=o.value,u=t[s];if(!u)return!1;switch(s){case"orientation":case"scan":return u.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=Ev(l),u=Ev(u);break;case"resolution":l=Sv(l),u=Sv(u);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=kv(l),u=kv(u);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,u=parseInt(u,10)||0;break}switch(c){case"min":return u>=l;case"max":return u<=l;default:return u===l}});return a&&!r||!a&&r})}function M_(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(UA),r=n[1],i=n[2],a=n[3]||"",o={};return o.inverse=!!r&&r.toLowerCase()==="not",o.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map(function(s){var c=s.match(WA),l=c[1].toLowerCase().match(zA);return{modifier:l[1],feature:l[2],value:c[2]}}),o})}function kv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function Sv(e){var t=parseFloat(e),n=String(e).match(VA)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function Ev(e){var t=parseFloat(e),n=String(e).match(HA)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var YA=gm.match,Ov=typeof window<"u"?window.matchMedia:null;function GA(e,t,n){var r=this,i;Ov&&!n&&(i=Ov.call(window,e)),i?(this.matches=i.matches,this.media=i.media,i.addListener(s)):(this.matches=YA(e,t),this.media=e),this.addListener=a,this.removeListener=o,this.dispose=c;function a(l){i&&i.addListener(l)}function o(l){i&&i.removeListener(l)}function s(l){r.matches=l.matches,r.media=l.media}function c(){i&&i.removeListener(s)}}function ZA(e,t,n){return new GA(e,t,n)}var KA=ZA;const XA=Ht(KA);var QA=/[A-Z]/g,JA=/^ms-/,bf={};function eR(e){return"-"+e.toLowerCase()}function $_(e){if(bf.hasOwnProperty(e))return bf[e];var t=e.replace(QA,eR);return bf[e]=JA.test(t)?"-"+t:t}function tR(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(let a=0;a<i;a++){const o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}const _n=H.oneOfType([H.string,H.number]),vm={all:H.bool,grid:H.bool,aural:H.bool,braille:H.bool,handheld:H.bool,print:H.bool,projection:H.bool,screen:H.bool,tty:H.bool,tv:H.bool,embossed:H.bool},A_={orientation:H.oneOf(["portrait","landscape"]),scan:H.oneOf(["progressive","interlace"]),aspectRatio:H.string,deviceAspectRatio:H.string,height:_n,deviceHeight:_n,width:_n,deviceWidth:_n,color:H.bool,colorIndex:H.bool,monochrome:H.bool,resolution:_n,type:Object.keys(vm)},{type:Kne,...nR}=A_,R_={minAspectRatio:H.string,maxAspectRatio:H.string,minDeviceAspectRatio:H.string,maxDeviceAspectRatio:H.string,minHeight:_n,maxHeight:_n,minDeviceHeight:_n,maxDeviceHeight:_n,minWidth:_n,maxWidth:_n,minDeviceWidth:_n,maxDeviceWidth:_n,minColor:H.number,maxColor:H.number,minColorIndex:H.number,maxColorIndex:H.number,minMonochrome:H.number,maxMonochrome:H.number,minResolution:_n,maxResolution:_n,...nR},rR={...vm,...R_};var iR={all:rR,types:vm,matchers:A_,features:R_};const aR=e=>`not ${e}`,oR=(e,t)=>{const n=$_(e);return typeof t=="number"&&(t=`${t}px`),t===!0?n:t===!1?aR(n):`(${n}: ${t})`},sR=e=>e.join(" and "),cR=e=>{const t=[];return Object.keys(iR.all).forEach(n=>{const r=e[n];r!=null&&t.push(oR(n,r))}),sR(t)},lR=m.createContext(void 0),uR=e=>e.query||cR(e),Mv=e=>e?Object.keys(e).reduce((n,r)=>(n[$_(r)]=e[r],n),{}):void 0,j_=()=>{const e=m.useRef(!1);return m.useEffect(()=>{e.current=!0},[]),e.current},dR=e=>{const t=m.useContext(lR),n=()=>Mv(e)||Mv(t),[r,i]=m.useState(n);return m.useEffect(()=>{const a=n();tR(r,a)||i(a)},[e,t]),r},fR=e=>{const t=()=>uR(e),[n,r]=m.useState(t);return m.useEffect(()=>{const i=t();n!==i&&r(i)},[e]),n},hR=(e,t)=>{const n=()=>XA(e,t||{},!!t),[r,i]=m.useState(n),a=j_();return m.useEffect(()=>{if(a){const o=n();return i(o),()=>{o&&o.dispose()}}},[e,t]),r},pR=e=>{const[t,n]=m.useState(e.matches);return m.useEffect(()=>{const r=i=>{n(i.matches)};return e.addListener(r),n(e.matches),()=>{e.removeListener(r)}},[e]),t},xf=(e,t,n)=>{const r=dR(t),i=fR(e);if(!i)throw new Error("Invalid or missing MediaQuery!");const a=hR(i,r),o=pR(a),s=j_();return m.useEffect(()=>{s&&n&&n(o)},[o]),m.useEffect(()=>()=>{a&&a.dispose()},[]),o},mR=["sm","md","lg","always"],P_="ResponsiveContextDropdownItem",gR=e=>e.type.displayName===P_,ym=e=>({});ym.displayName=P_;function vR(e){return e.type&&e.type===m.Fragment}const I_=e=>{const t=[];Array.isArray(e)?t.push(...e):t.push(e);const n=[];return t.forEach(r=>{if(r){if(vR(r)){n.push(...I_(r.props.children));return}n.push(r)}}),n},yR=(e,t)=>{if(t===void 0)return e;const{searchQueryString:n,...r}=t;return to.generatePath(e,r)+"?"+n},bR="_disabled_9mp5v_1",xR={disabled:bR},_R=()=>{const{ProjectIconComponent:e}=m.useContext(Kt),{checkUserHasPermissions:t}=r_();return{getProcessedChildren:m.useCallback((r,i)=>{const a=[],o=[];let s=null;const c=u=>{const{hideOn:d,children:f,cKey:h,to:g,toRoute:p,disabled:v,icon:_,pathParams:w,...x}=u.props,T=(p==null?void 0:p.permissions)!=null,b=(p==null?void 0:p.permissions)!=null&&t(p==null?void 0:p.permissions),k=(v??!1)||T&&!b,j=g??(p==null?void 0:yR(p==null?void 0:p.route,w)),M=f??(p==null?void 0:p.name),S=_??(p!=null?y.jsx(e,{icon:"link"}):void 0);if(d==="always"||mR.indexOf(d)>=i){s&&o.length>0&&o.push(s),s=null;const E=oe(x.className,{[xR.disabled]:k});j!=null?o.push(y.jsx(ja,{...x,as:"link",to:j,disabled:k,icon:S,className:E,children:M},h)):o.push(y.jsx(ja,{...x,icon:S,className:E,children:M},h))}else{const E=j!=null?{as:"link",href:j}:{};a.push(y.jsx(Au,{...x,...E,icon:S,className:oe(k?"disabled":void 0,x.className),children:M},h))}};return I_(r).forEach(u=>{u&&m.isValidElement(u)&&(gR(u)?c(u):s=u)}),{buttons:a,dropdownItems:o}},[e,t])}},D_=({children:e})=>{const{getProcessedChildren:t}=_R(),n=xf({maxWidth:768}),r=xf({minWidth:769,maxWidth:1200}),i=xf({minWidth:1201}),a=[n,r,i].indexOf(!0),{buttons:o,dropdownItems:s}=t(e,a);return y.jsxs("div",{className:"d-flex gap-1",children:[y.jsx(y.Fragment,{children:o}),s.length>0?y.jsx(fm,{toggle:y.jsx(dm,{as:um}),children:s}):null]})};D_.Item=ym;const wR=m.createContext(void 0);function CR(e,t,n){var r=this,i=m.useRef(null),a=m.useRef(0),o=m.useRef(null),s=m.useRef([]),c=m.useRef(),l=m.useRef(),u=m.useRef(e),d=m.useRef(!0);u.current=e;var f=typeof window<"u",h=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,v="maxWait"in n,_="debounceOnServer"in n&&!!n.debounceOnServer,w=v?Math.max(+n.maxWait||0,t):null;m.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var x=m.useMemo(function(){var T=function(E){var C=s.current,O=c.current;return s.current=c.current=null,a.current=E,l.current=u.current.apply(O,C)},b=function(E,C){h&&cancelAnimationFrame(o.current),o.current=h?requestAnimationFrame(E):setTimeout(E,C)},k=function(E){if(!d.current)return!1;var C=E-i.current;return!i.current||C>=t||C<0||v&&E-a.current>=w},j=function(E){return o.current=null,p&&s.current?T(E):(s.current=c.current=null,l.current)},M=function E(){var C=Date.now();if(k(C))return j(C);if(d.current){var O=t-(C-i.current),$=v?Math.min(O,w-(C-a.current)):O;b(E,$)}},S=function(){if(f||_){var E=Date.now(),C=k(E);if(s.current=[].slice.call(arguments),c.current=r,i.current=E,C){if(!o.current&&d.current)return a.current=i.current,b(M,t),g?T(i.current):l.current;if(v)return b(M,t),T(i.current)}return o.current||b(M,t),l.current}};return S.cancel=function(){o.current&&(h?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,s.current=i.current=c.current=o.current=null},S.isPending=function(){return!!o.current},S.flush=function(){return o.current?j(Date.now()):l.current},S},[g,v,t,w,p,h,f,_]);return x}function TR(e,t){return e===t}function N_(e,t,n){var r=TR,i=m.useRef(e),a=m.useState({})[1],o=CR(m.useCallback(function(c){i.current=c,a({})},[a]),t,n),s=m.useRef(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}const kR="_feedback_esh1j_1",SR="_feedback-spacer_esh1j_8",$v={feedback:kR,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:SR},Pu=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe("invalid-feedback luminus-invalid-feedback",$v.feedback),children:e}),y.jsx("div",{className:oe("invalid-feedback-spacer",$v.feedbackSpacer),children:e})]}),ER="_wrapper_1mvyk_1",OR="_open_1mvyk_9",MR="_dropdown_1mvyk_13",$R="_search-input-container_1mvyk_19",AR="_search-input_1mvyk_19",RR="_loading-container_1mvyk_25",jR="_items-container_1mvyk_32",PR="_header-row_1mvyk_38",IR="_name_1mvyk_49",DR="_item_1mvyk_32",NR="_column-item_1mvyk_65",LR="_icon_1mvyk_69",FR="_action-buttons-container_1mvyk_89",BR="_reverse_1mvyk_97",UR="_action-button_1mvyk_89",WR="_actions-dropdown_1mvyk_110",on={wrapper:ER,open:OR,dropdown:MR,"search-input-container":"_search-input-container_1mvyk_19",searchInputContainer:$R,"search-input":"_search-input_1mvyk_19",searchInput:AR,"loading-container":"_loading-container_1mvyk_25",loadingContainer:RR,"items-container":"_items-container_1mvyk_32",itemsContainer:jR,"header-row":"_header-row_1mvyk_38",headerRow:PR,name:IR,item:DR,"column-item":"_column-item_1mvyk_65",columnItem:NR,icon:LR,"action-buttons-container":"_action-buttons-container_1mvyk_89",actionButtonsContainer:FR,reverse:BR,"action-button":"_action-button_1mvyk_89",actionButton:UR,"actions-dropdown":"_actions-dropdown_1mvyk_110",actionsDropdown:WR},L_=({show:e,onCancel:t,items:n,suggestedItems:r,suggestedItemsTitle:i,currentSelection:a,onSelectionChange:o,onSearchQueryChange:s,texts:c,itemsNameWidth:l,additionalColumns:u,displayIdAsName:d=!1,autoHideSearch:f=!1,allItemsLength:h,disabled:g,isLoading:p=!1,inputRef:v,archiveColumn:_="archive",addNewOptionPath:w,refreshOptions:x})=>{var qe;const{texts:{customSelect:T}}=m.useContext(Kt),b=m.useRef(null),k=m.useRef(null),j=m.useRef(null),M=m.useRef(null),S=m.useRef(null),[E,C]=m.useState(""),[O]=N_(E,500),[,$]=m.useState(!1),{copyToClipboard:A}=a_(),P=(qe=v.current)==null?void 0:qe.getBoundingClientRect(),N=(P==null?void 0:P.x)??0,F=((P==null?void 0:P.x)??0)+((P==null?void 0:P.width)??0),z=(P==null?void 0:P.y)??0,q=((P==null?void 0:P.y)??0)+((P==null?void 0:P.height)??0),W=(P==null?void 0:P.width)??0,G=(P==null?void 0:P.height)??0,ee=5,{isMobile:ie}=nc(),Q=8,X=m.useMemo(()=>N?N>window.innerWidth/2-Q:!1,[N]),K=m.useMemo(()=>z?z>window.innerHeight/2-Q:!1,[z]);m.useEffect(()=>{var pe;e&&((pe=j.current)==null||pe.focus())},[j,e]),m.useEffect(()=>{e||C("")},[e]),m.useEffect(()=>{s&&s(O)},[O,s]);const[te,D]=m.useState(null);m.useEffect(()=>{e&&n.length>0?D(0):D(null)},[n,e]);const I=m.useMemo(()=>te!==null?n.at(te)??null:null,[te,n]),L=m.useCallback((pe,Ee)=>{var Ce,Le;const Oe=document.getElementById(`item-${pe}`);if(Oe){const rt=Oe.clientHeight??0;Ee==="down"?(Ce=M.current)==null||Ce.scrollBy({left:0,top:rt,behavior:"smooth"}):(Le=M.current)==null||Le.scrollBy({left:0,top:-rt,behavior:"smooth"})}},[]),V=m.useCallback(pe=>{if(te===null||g)return;const Ee=te+pe;Ee<0||Ee>=n.length||D(Oe=>(Oe!==null&&L(Oe,pe>0?"down":"up"),Ee))},[te,n,g,L]),R=m.useCallback(pe=>{if(e)switch(pe.key){case"Escape":pe.stopPropagation(),pe.preventDefault(),t();break;case"Enter":pe.stopPropagation(),pe.preventDefault(),g||o(I);break;case"ArrowUp":pe.stopPropagation(),pe.preventDefault(),V(-1);break;case"ArrowDown":pe.stopPropagation(),pe.preventDefault(),V(1);break}},[t,e,V,I,g,o]),Z=m.useCallback(()=>{$(pe=>!pe)},[]);m.useEffect(()=>(window.addEventListener("scroll",Z),()=>{window.removeEventListener("scroll",Z)}),[Z]),m.useEffect(()=>(window.addEventListener("resize",Z),()=>{window.removeEventListener("resize",Z)}),[Z]),i_(R),n_([b,k,S],t);const J=l??(u&&u.length>0?250:0),ne=(u==null?void 0:u.reduce((pe,Ee)=>pe+(Ee.width??100),0))??0,he=m.useMemo(()=>(a&&e&&!g)??!1,[a,e,g]),be=m.useMemo(()=>(a&&e)??!1,[a,e]),ge=m.useMemo(()=>e&&(be||w!==void 0||x!==void 0),[e,be,w,x]),We=32,Re=ie?`calc(100vw - ${We}px)`:`calc(max(${W}px, calc(${J}px + ${ne}px)))`,et=m.useMemo(()=>(E.length<1&&r&&r.length>0?r:n).map(pe=>{var Ee,Oe;return d?((Ee=pe.id)==null?void 0:Ee.toString())??"":((Oe=pe.name)==null?void 0:Oe.toString())??""}).reduce((pe,Ee)=>pe.length>Ee.length?pe:Ee,""),[E,r,n,d]);return y.jsxs(y.Fragment,{children:[y.jsx(F_,{show:e,onClick:t}),y.jsxs("div",{className:oe("luminus-dropdown-picker-actions",on.actionButtonsContainer,{[on.reverse]:X}),style:{top:`calc(${z}px + ${G/2}px - 12px)`,left:X?he&&be?`calc(${N}px - 24px - 8px - 24px - 4px)`:`calc(${N}px - 24px - 8px)`:`calc(${F}px + 8px)`},children:[he&&y.jsx("button",{ref:k,type:"button",className:oe("luminus-dropdown-picker-clear-button",on.actionButton),onClick:()=>!g&&o(null),children:y.jsx(wn,{variant:"caption",className:"text-danger",children:y.jsx(Xx,{size:16})})}),ge?y.jsx("div",{ref:S,children:y.jsxs(fm,{toggle:y.jsx(dm,{as:um,className:oe("luminus-dropdown-picker-actions-dropdown",on.actionsDropdown),icon:y.jsx(wn,{variant:"caption",className:"text-primary",children:y.jsx(e2,{size:16})})}),children:[be?y.jsx(ja,{icon:y.jsx(JS,{}),onClick:()=>{var pe,Ee;A(d?((pe=a==null?void 0:a.id)==null?void 0:pe.toString())??"":((Ee=a==null?void 0:a.name)==null?void 0:Ee.toString())??"")},children:T.copySelection}):null,be&&(w||x)?y.jsx(v_,{}):null,w?y.jsx(ja,{icon:y.jsx(QS,{}),onClick:()=>{window.open(w,"_blank")},children:T.addNewOption}):null,x?y.jsx(ja,{icon:y.jsx(lE,{}),onClick:()=>{x()},children:T.refreshOptions}):null]})}):null]}),y.jsx("div",{className:oe("luminus-dropdown-picker",on.wrapper,{[on.open]:e}),style:{top:K?`calc(${z}px - 50vh - 8px)`:`calc(${q}px + 8px)`,left:ie?`${We/2}px`:X?`calc(${F}px - ${Re})`:N,right:ie?`${We/2}px`:X?`${F}px`:`calc(${N}px + ${Re})`,width:Re,justifyContent:K?"flex-end":"flex-start"},children:y.jsx("div",{ref:b,className:oe("shadow rounded",on.dropdown),children:!g&&y.jsxs(y.Fragment,{children:[!s||f&&(h??n.length)<=ee?null:y.jsx("div",{className:oe("search-input-container border-bottom",on.searchInputContainer),children:y.jsx(kr.Control,{ref:j,type:"search",size:"sm",className:on.searchInput,placeholder:c.searchPlaceholder,value:E,onChange:pe=>{var Ee;return C(((Ee=pe.target)==null?void 0:Ee.value)??"")}})}),E.length<1&&r&&r.length>0?y.jsx(bm,{variant:"info",size:"sm",children:i??T.suggestedItemsTitle}):null,p?y.jsx("div",{className:on.loadingContainer,children:y.jsx(Yp,{animation:"border",variant:"primary"})}):(E.length<1&&r&&(r==null?void 0:r.length)>0||n.length>0)&&y.jsxs("div",{ref:M,className:oe("items",on.itemsContainer),children:[u&&u.length>0&&y.jsxs("div",{className:oe("header-row border-bottom",on.headerRow),children:[y.jsx("div",{className:on.name,children:y.jsx(wn,{variant:"body2",children:et})}),u==null?void 0:u.filter(pe=>pe.key!==_).map(pe=>y.jsx("div",{className:on.columnItem,style:{width:`${pe.width??100}px`,minWidth:`${pe.width??100}px`,maxWidth:`${pe.width??100}px`},children:y.jsx(wn,{variant:"caption",children:pe.name})},pe.key))]}),(E.length<1&&r&&r.length>0?r:n).map((pe,Ee)=>y.jsxs("button",{id:`item-${Ee}`,type:"button",className:oe("item cursor-pointer",on.item,{[on.focused]:te===Ee},{focused:te===Ee},{archive:pe.additionalColumns?pe.additionalColumns[_]:!1}),onClick:()=>!g&&o(pe),onMouseEnter:()=>D(Ee),children:[y.jsx("div",{className:on.name,children:y.jsx(wn,{variant:"body2",children:d?pe.id:pe.name})}),u==null?void 0:u.filter(Oe=>Oe.key!==_).map(Oe=>y.jsx("div",{className:on.columnItem,style:{width:`${Oe.width??100}px`,minWidth:`${Oe.width??100}px`,maxWidth:`${Oe.width??100}px`},children:y.jsx(wn,{variant:"caption",className:oe("text-muted"),children:pe.additionalColumns&&pe.additionalColumns[Oe.key]})},Oe.key))]},pe.id))]})]})})})]})},zR="_backdrop_3huvf_1",HR="_show_3huvf_11",Av={backdrop:zR,show:HR},F_=({show:e,onClick:t})=>y.jsx("div",{className:oe("luminus-backdrop",Av.backdrop,{[Av.show]:e}),onClick:()=>t&&t()}),bm=e=>{const{variant:t,children:n,className:r,size:i="md",typographyVariant:a=i==="sm"?"body2":"body",...o}={...e};return y.jsx(p5,{variant:t,className:`text-center ${i==="sm"?"p-1":i==="md"?"p-3":"p-4"} bg-${t} bg-opacity-10 border-none ${r??""}`,...o,children:y.jsx(wn,{variant:a,children:n})})},VR=m.forwardRef(({onClick:e,text:t},n)=>y.jsx("div",{ref:n,onClick:r=>{r.preventDefault(),e(r)},role:"button",className:"middle-div",children:y.jsxs("div",{className:"d-flex flex-column align-items-center",children:[y.jsx("div",{className:"mt-",children:"…"}),y.jsx("div",{className:"mt-1 middle-letter",children:t})]})}));var xm=oc(),Ve=e=>ac(e,xm),_m=oc();Ve.write=e=>ac(e,_m);var Iu=oc();Ve.onStart=e=>ac(e,Iu);var wm=oc();Ve.onFrame=e=>ac(e,wm);var Cm=oc();Ve.onFinish=e=>ac(e,Cm);var Pa=[];Ve.setTimeout=(e,t)=>{const n=Ve.now()+t,r=()=>{const a=Pa.findIndex(o=>o.cancel==r);~a&&Pa.splice(a,1),ci-=~a?1:0},i={time:n,handler:e,cancel:r};return Pa.splice(B_(n),0,i),ci+=1,U_(),i};var B_=e=>~(~Pa.findIndex(t=>t.time>e)||~Pa.length);Ve.cancel=e=>{Iu.delete(e),wm.delete(e),Cm.delete(e),xm.delete(e),_m.delete(e)};Ve.sync=e=>{Oh=!0,Ve.batchedUpdates(e),Oh=!1};Ve.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Ve.onStart(n)}return r.handler=e,r.cancel=()=>{Iu.delete(n),t=null},r};var Tm=typeof window<"u"?window.requestAnimationFrame:()=>{};Ve.use=e=>Tm=e;Ve.now=typeof performance<"u"?()=>performance.now():Date.now;Ve.batchedUpdates=e=>e();Ve.catch=console.error;Ve.frameLoop="always";Ve.advance=()=>{Ve.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):z_()};var si=-1,ci=0,Oh=!1;function ac(e,t){Oh?(t.delete(e),e(0)):(t.add(e),U_())}function U_(){si<0&&(si=0,Ve.frameLoop!=="demand"&&Tm(W_))}function qR(){si=-1}function W_(){~si&&(Tm(W_),Ve.batchedUpdates(z_))}function z_(){const e=si;si=Ve.now();const t=B_(si);if(t&&(H_(Pa.splice(0,t),n=>n.handler()),ci-=t),!ci){qR();return}Iu.flush(),xm.flush(e?Math.min(64,si-e):16.667),wm.flush(),_m.flush(),Cm.flush()}function oc(){let e=new Set,t=e;return{add(n){ci+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ci-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ci-=t.size,H_(t,r=>r(n)&&e.add(r)),ci+=e.size,t=e)}}}function H_(e,t){e.forEach(n=>{try{t(n)}catch(r){Ve.catch(r)}})}var YR=Object.defineProperty,GR=(e,t)=>{for(var n in t)YR(e,n,{get:t[n],enumerable:!0})},lr={};GR(lr,{assign:()=>KR,colors:()=>ui,createStringInterpolator:()=>Sm,skipAnimation:()=>q_,to:()=>V_,willAdvance:()=>Em});function Mh(){}var ZR=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),de={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Ir(e,t){if(de.arr(e)){if(!de.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var He=(e,t)=>e.forEach(t);function xr(e,t,n){if(de.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Cn=e=>de.und(e)?[]:de.arr(e)?e:[e];function ts(e,t){if(e.size){const n=Array.from(e);e.clear(),He(n,t)}}var Ko=(e,...t)=>ts(e,n=>n(...t)),km=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Sm,V_,ui=null,q_=!1,Em=Mh,KR=e=>{e.to&&(V_=e.to),e.now&&(Ve.now=e.now),e.colors!==void 0&&(ui=e.colors),e.skipAnimation!=null&&(q_=e.skipAnimation),e.createStringInterpolator&&(Sm=e.createStringInterpolator),e.requestAnimationFrame&&Ve.use(e.requestAnimationFrame),e.batchedUpdates&&(Ve.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Em=e.willAdvance),e.frameLoop&&(Ve.frameLoop=e.frameLoop)},ns=new Set,zn=[],_f=[],jl=0,Du={get idle(){return!ns.size&&!zn.length},start(e){jl>e.priority?(ns.add(e),Ve.onStart(XR)):(Y_(e),Ve($h))},advance:$h,sort(e){if(jl)Ve.onFrame(()=>Du.sort(e));else{const t=zn.indexOf(e);~t&&(zn.splice(t,1),G_(e))}},clear(){zn=[],ns.clear()}};function XR(){ns.forEach(Y_),ns.clear(),Ve($h)}function Y_(e){zn.includes(e)||G_(e)}function G_(e){zn.splice(QR(zn,t=>t.priority>e.priority),0,e)}function $h(e){const t=_f;for(let n=0;n<zn.length;n++){const r=zn[n];jl=r.priority,r.idle||(Em(r),r.advance(e),r.idle||t.push(r))}return jl=0,_f=zn,_f.length=0,zn=t,zn.length>0}function QR(e,t){const n=e.findIndex(t);return n<0?e.length:n}var JR=(e,t,n)=>Math.min(Math.max(n,e),t),e9={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ar="[-+]?\\d*\\.?\\d+",Pl=ar+"%";function Nu(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var t9=new RegExp("rgb"+Nu(ar,ar,ar)),n9=new RegExp("rgba"+Nu(ar,ar,ar,ar)),r9=new RegExp("hsl"+Nu(ar,Pl,Pl)),i9=new RegExp("hsla"+Nu(ar,Pl,Pl,ar)),a9=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,o9=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,s9=/^#([0-9a-fA-F]{6})$/,c9=/^#([0-9a-fA-F]{8})$/;function l9(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=s9.exec(e))?parseInt(t[1]+"ff",16)>>>0:ui&&ui[e]!==void 0?ui[e]:(t=t9.exec(e))?(_a(t[1])<<24|_a(t[2])<<16|_a(t[3])<<8|255)>>>0:(t=n9.exec(e))?(_a(t[1])<<24|_a(t[2])<<16|_a(t[3])<<8|Pv(t[4]))>>>0:(t=a9.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=c9.exec(e))?parseInt(t[1],16)>>>0:(t=o9.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=r9.exec(e))?(Rv(jv(t[1]),Nc(t[2]),Nc(t[3]))|255)>>>0:(t=i9.exec(e))?(Rv(jv(t[1]),Nc(t[2]),Nc(t[3]))|Pv(t[4]))>>>0:null}function wf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rv(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=wf(i,r,e+1/3),o=wf(i,r,e),s=wf(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function _a(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function jv(e){return(parseFloat(e)%360+360)%360/360}function Pv(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Nc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Iv(e){let t=l9(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var Os=(e,t,n)=>{if(de.fun(e))return e;if(de.arr(e))return Os({range:e,output:t,extrapolate:n});if(de.str(e.output[0]))return Sm(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const u=d9(l,a);return u9(l,a[u],a[u+1],i[u],i[u+1],c,o,s,r.map)}};function u9(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o==="identity")return l;o==="clamp"&&(l=t)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l=l-t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l=l+r:l=l*(i-r)+r,l)}function d9(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var f9=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return JR(0,1,i/e)},Il=1.70158,Lc=Il*1.525,Dv=Il+1,Nv=2*Math.PI/3,Lv=2*Math.PI/4.5,Fc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,h9={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Dv*e*e*e-Il*e*e,easeOutBack:e=>1+Dv*Math.pow(e-1,3)+Il*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Lc+1)*2*e-Lc)/2:(Math.pow(2*e-2,2)*((Lc+1)*(e*2-2)+Lc)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Nv),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Nv)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Lv))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Lv)/2+1,easeInBounce:e=>1-Fc(1-e),easeOutBounce:Fc,easeInOutBounce:e=>e<.5?(1-Fc(1-2*e))/2:(1+Fc(2*e-1))/2,steps:f9},Ms=Symbol.for("FluidValue.get"),Ka=Symbol.for("FluidValue.observers"),Wn=e=>!!(e&&e[Ms]),En=e=>e&&e[Ms]?e[Ms]():e,Fv=e=>e[Ka]||null;function p9(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $s(e,t){const n=e[Ka];n&&n.forEach(r=>{p9(r,t)})}var Z_=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");m9(this,e)}},m9=(e,t)=>K_(e,Ms,t);function so(e,t){if(e[Ms]){let n=e[Ka];n||K_(e,Ka,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[Ka];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ka]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var K_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),il=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g9=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Bv=new RegExp(`(${il.source})(%|[a-z]+)`,"i"),v9=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Lu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,X_=e=>{const[t,n]=y9(e);if(!t||km())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&Lu.test(n))return X_(n);if(n)return n}return e},y9=e=>{const t=Lu.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Cf,b9=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Q_=e=>{Cf||(Cf=ui?new RegExp(`(${Object.keys(ui).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>En(a).replace(Lu,X_).replace(g9,Iv).replace(Cf,Iv)),n=t.map(a=>a.match(il).map(Number)),i=n[0].map((a,o)=>n.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Os({...e,output:a}));return a=>{var c;const o=!Bv.test(t[0])&&((c=t.find(l=>Bv.test(l)))==null?void 0:c.replace(il,""));let s=0;return t[0].replace(il,()=>`${i[s++](a)}${o||""}`).replace(v9,b9)}},Om="react-spring: ",J_=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Om}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},x9=J_(console.warn);function _9(){x9(`${Om}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var w9=J_(console.warn);function C9(){w9(`${Om}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Fu(e){return de.str(e)&&(e[0]=="#"||/\d/.test(e)||!km()&&Lu.test(e)||e in(ui||{}))}var Ii=km()?m.useEffect:m.useLayoutEffect,T9=()=>{const e=m.useRef(!1);return Ii(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Mm(){const e=m.useState()[1],t=T9();return()=>{t.current&&e(Math.random())}}function k9(e,t){const[n]=m.useState(()=>({inputs:t,result:e()})),r=m.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&S9(t,a.inputs)||(a={inputs:t,result:e()}):a=n,m.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function S9(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var $m=e=>m.useEffect(e,E9),E9=[];function Ah(e){const t=m.useRef();return m.useEffect(()=>{t.current=e}),t.current}var Rs=Symbol.for("Animated:node"),O9=e=>!!e&&e[Rs]===e,hr=e=>e&&e[Rs],Am=(e,t)=>ZR(e,Rs,t),Bu=e=>e&&e[Rs]&&e[Rs].getPayload(),ew=class{constructor(){Am(this,this)}getPayload(){return this.payload||[]}},sc=class extends ew{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,de.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new sc(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return de.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,de.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},js=class extends sc{constructor(e){super(0),this._string=null,this._toString=Os({output:[e,e]})}static create(e){return new js(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(de.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Os({output:[this.getValue(),e]})),this._value=0,super.reset()}},Dl={dependencies:null},Uu=class extends ew{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return xr(this.source,(n,r)=>{O9(n)?t[r]=n.getValue(e):Wn(n)?t[r]=En(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&He(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return xr(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Dl.dependencies&&Wn(e)&&Dl.dependencies.add(e);const t=Bu(e);t&&He(t,n=>this.add(n))}},tw=class extends Uu{constructor(e){super(e)}static create(e){return new tw(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(M9)),!0)}};function M9(e){return(Fu(e)?js:sc).create(e)}function Rh(e){const t=hr(e);return t?t.constructor:de.arr(e)?tw:Fu(e)?js:sc}var Uv=(e,t)=>{const n=!de.fun(e)||e.prototype&&e.prototype.isReactComponent;return m.forwardRef((r,i)=>{const a=m.useRef(null),o=n&&m.useCallback(g=>{a.current=R9(i,g)},[i]),[s,c]=A9(r,t),l=Mm(),u=()=>{const g=a.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,s.getValue(!0)):!1)===!1&&l()},d=new $9(u,c),f=m.useRef();Ii(()=>(f.current=d,He(c,g=>so(g,d)),()=>{f.current&&(He(f.current.deps,g=>As(g,f.current)),Ve.cancel(f.current.update))})),m.useEffect(u,[]),$m(()=>()=>{const g=f.current;He(g.deps,p=>As(p,g))});const h=t.getComponentProps(s.getValue());return ue.createElement(e,{...h,ref:o})})},$9=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ve.write(this.update)}};function A9(e,t){const n=new Set;return Dl.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Uu(e),Dl.dependencies=null,[e,n]}function R9(e,t){return e&&(de.fun(e)?e(t):e.current=t),t}var Wv=Symbol.for("AnimatedComponent"),j9=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Uu(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=o=>{const s=zv(o)||"Anonymous";return de.str(o)?o=a[o]||(a[o]=Uv(o,i)):o=o[Wv]||(o[Wv]=Uv(o,i)),o.displayName=`Animated(${s})`,o};return xr(e,(o,s)=>{de.arr(e)&&(s=zv(o)),a[s]=a(o)}),{animated:a}},zv=e=>de.str(e)?e:e&&de.str(e.displayName)?e.displayName:de.fun(e)&&e.name||null;function On(e,...t){return de.fun(e)?e(...t):e}var rs=(e,t)=>e===!0||!!(t&&e&&(de.fun(e)?e(t):Cn(e).includes(t))),nw=(e,t)=>de.obj(e)?t&&e[t]:e,rw=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,P9=e=>e,Wu=(e,t=P9)=>{let n=I9;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);de.und(a)||(r[i]=a)}return r},I9=["config","onProps","onStart","onChange","onPause","onResume","onRest"],D9={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function N9(e){const t={};let n=0;if(xr(e,(r,i)=>{D9[i]||(t[i]=r,n++)}),n)return t}function Rm(e){const t=N9(e);if(t){const n={to:t};return xr(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ps(e){return e=En(e),de.arr(e)?e.map(Ps):Fu(e)?lr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function iw(e){for(const t in e)return!0;return!1}function jh(e){return de.fun(e)||de.arr(e)&&de.obj(e[0])}function Ph(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function aw(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var jm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Ih={...jm.default,mass:1,damping:1,easing:h9.linear,clamp:!1},L9=class{constructor(){this.velocity=0,Object.assign(this,Ih)}};function F9(e,t,n){n&&(n={...n},Hv(n,t),t={...n,...t}),Hv(e,t),Object.assign(e,t);for(const o in Ih)e[o]==null&&(e[o]=Ih[o]);let{frequency:r,damping:i}=e;const{mass:a}=e;return de.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function Hv(e,t){if(!de.und(t.decay))e.duration=void 0;else{const n=!de.und(t.tension)||!de.und(t.friction);(n||!de.und(t.frequency)||!de.und(t.damping)||!de.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Vv=[],B9=class{constructor(){this.changed=!1,this.values=Vv,this.toValues=null,this.fromValues=Vv,this.config=new L9,this.immediate=!1}};function ow(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=rs(n.cancel??(r==null?void 0:r.cancel),t);if(u)h();else{de.und(n.pause)||(i.paused=rs(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=i.paused||rs(g,t)),c=On(n.delay||0,t),g?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-Ve.now()}function f(){c>0&&!lr.skipAnimation?(i.delayed=!0,l=Ve.setTimeout(h,c),i.pauseQueue.add(d),i.timeouts.add(l)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(g){s(g)}}})}var Pm=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ia(e.get()):t.every(n=>n.noop)?sw(e.get()):nr(e.get(),t.every(n=>n.finished)),sw=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ia=e=>({value:e,cancelled:!0,finished:!1});function cw(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const l=Wu(t,(v,_)=>_==="onRest"?void 0:v);let u,d;const f=new Promise((v,_)=>(u=v,d=_)),h=v=>{const _=i<=(n.cancelId||0)&&Ia(r)||i!==n.asyncId&&nr(r,!1);if(_)throw v.result=_,d(v),v},g=(v,_)=>{const w=new qv,x=new Yv;return(async()=>{if(lr.skipAnimation)throw Is(n),x.result=nr(r,!1),d(x),x;h(w);const T=de.obj(v)?{...v}:{..._,to:v};T.parentId=i,xr(l,(k,j)=>{de.und(T[j])&&(T[j]=k)});const b=await r.start(T);return h(w),n.paused&&await new Promise(k=>{n.resumeQueue.add(k)}),b})()};let p;if(lr.skipAnimation)return Is(n),nr(r,!1);try{let v;de.arr(e)?v=(async _=>{for(const w of _)await g(w)})(e):v=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([v.then(u),f]),p=nr(r.get(),!0,!1)}catch(v){if(v instanceof qv)p=v.result;else if(v instanceof Yv)p=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return de.fun(o)&&Ve.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function Is(e,t){ts(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var qv=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},Yv=class extends Error{constructor(){super("SkipAnimationSignal")}},Dh=e=>e instanceof Im,U9=1,Im=class extends Z_{constructor(){super(...arguments),this.id=U9++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=hr(this);return e&&e.getValue()}to(...e){return lr.to(this,e)}interpolate(...e){return _9(),lr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){$s(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Du.sort(this),$s(this,{type:"priority",parent:this,priority:e})}},Ji=Symbol.for("SpringPhase"),lw=1,Nh=2,Lh=4,Tf=e=>(e[Ji]&lw)>0,ei=e=>(e[Ji]&Nh)>0,Do=e=>(e[Ji]&Lh)>0,Gv=(e,t)=>t?e[Ji]|=Nh|lw:e[Ji]&=~Nh,Zv=(e,t)=>t?e[Ji]|=Lh:e[Ji]&=~Lh,W9=class extends Im{constructor(e,t){if(super(),this.animation=new B9,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!de.und(e)||!de.und(t)){const n=de.obj(e)?{...e}:{...t,from:e};de.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ei(this)||this._state.asyncTo)||Do(this)}get goal(){return En(this.animation.to)}get velocity(){const e=hr(this);return e instanceof sc?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Tf(this)}get isAnimating(){return ei(this)}get isPaused(){return Do(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,o=Bu(r.to);!o&&Wn(r.to)&&(i=Cn(En(r.to))),r.values.forEach((l,u)=>{if(l.done)return;const d=l.constructor==js?1:o?o[u].lastPosition:i[u];let f=r.immediate,h=d;if(!f){if(h=l.lastPosition,a.tension<=0){l.done=!0;return}let g=l.elapsedTime+=e;const p=r.fromValues[u],v=l.v0!=null?l.v0:l.v0=de.arr(a.velocity)?a.velocity[u]:a.velocity;let _;const w=a.precision||(p==d?.005:Math.min(1,Math.abs(d-p)*.001));if(de.und(a.duration))if(a.decay){const x=a.decay===!0?.998:a.decay,T=Math.exp(-(1-x)*g);h=p+v/(1-x)*(1-T),f=Math.abs(l.lastPosition-h)<=w,_=v*T}else{_=l.lastVelocity==null?v:l.lastVelocity;const x=a.restVelocity||w/10,T=a.clamp?0:a.bounce,b=!de.und(T),k=p==d?l.v0>0:p<d;let j,M=!1;const S=1,E=Math.ceil(e/S);for(let C=0;C<E&&(j=Math.abs(_)>x,!(!j&&(f=Math.abs(d-h)<=w,f)));++C){b&&(M=h==d||h>d==k,M&&(_=-_*T,h=d));const O=-a.tension*1e-6*(h-d),$=-a.friction*.001*_,A=(O+$)/a.mass;_=_+A*S,h=h+_*S}}else{let x=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,l.durationProgress>0&&(l.elapsedTime=a.duration*l.durationProgress,g=l.elapsedTime+=e)),x=(a.progress||0)+g/this._memoizedDuration,x=x>1?1:x<0?0:x,l.durationProgress=x),h=p+a.easing(x)*(d-p),_=(h-l.lastPosition)/e,f=x==1}l.lastVelocity=_,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?l.done=!0:t=!1,l.setValue(h,a.round)&&(n=!0)});const s=hr(this),c=s.getValue();if(t){const l=En(r.to);(c!==l||n)&&!a.decay?(s.setValue(l),this._onChange(l)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return Ve.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ei(this)){const{to:e,config:t}=this.animation;Ve.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return de.und(e)?(n=this.queue||[],this.queue=[]):n=[de.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Pm(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Is(this._state,e&&this._lastCallId),Ve.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=de.obj(n)?n[t]:n,(n==null||jh(n))&&(n=void 0),r=de.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Tf(this)||(e.reverse&&([n,r]=[r,n]),r=En(r),de.und(r)?hr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Wu(e,(o,s)=>/^on/.test(s)?nw(o,n):o)),Xv(this,e,"onProps"),Lo(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return ow(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Do(this)||(Zv(this,!0),Ko(a.pauseQueue),Lo(this,"onPause",nr(this,No(this,this.animation.to)),this))},resume:()=>{Do(this)&&(Zv(this,!1),ei(this)&&this._resume(),Ko(a.resumeQueue),Lo(this,"onResume",nr(this,No(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=uw(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ia(this));const r=!de.und(e.to),i=!de.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ia(this));const{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s;let{to:u=c,from:d=l}=e;i&&!r&&(!t.default||de.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Ir(d,l);f&&(s.from=d),d=En(d);const h=!Ir(u,c);h&&this._focus(u);const g=jh(t.to),{config:p}=s,{decay:v,velocity:_}=p;(r||i)&&(p.velocity=0),t.config&&!g&&F9(p,On(t.config,a),t.config!==o.config?On(o.config,a):void 0);let w=hr(this);if(!w||de.und(u))return n(nr(this,!0));const x=de.und(t.reset)?i&&!t.default:!de.und(d)&&rs(t.reset,a),T=x?d:this.get(),b=Ps(u),k=de.num(b)||de.arr(b)||Fu(b),j=!g&&(!k||rs(o.immediate||t.immediate,a));if(h){const C=Rh(u);if(C!==w.constructor)if(j)w=this._set(b);else throw Error(`Cannot animate between ${w.constructor.name} and ${C.name}, as the "to" prop suggests`)}const M=w.constructor;let S=Wn(u),E=!1;if(!S){const C=x||!Tf(this)&&f;(h||C)&&(E=Ir(Ps(T),b),S=!E),(!Ir(s.immediate,j)&&!j||!Ir(p.decay,v)||!Ir(p.velocity,_))&&(S=!0)}if(E&&ei(this)&&(s.changed&&!x?S=!0:S||this._stop(c)),!g&&((S||Wn(c))&&(s.values=w.getPayload(),s.toValues=Wn(u)?null:M==js?[1]:Cn(b)),s.immediate!=j&&(s.immediate=j,!j&&!x&&this._set(c)),S)){const{onRest:C}=s;He(H9,$=>Xv(this,t,$));const O=nr(this,No(this,c));Ko(this._pendingCalls,O),this._pendingCalls.add(n),s.changed&&Ve.batchedUpdates(()=>{var $;s.changed=!x,C==null||C(O,this),x?On(o.onRest,O):($=s.onStart)==null||$.call(s,O,this)})}x&&this._set(T),g?n(cw(t.to,t,this._state,this)):S?this._start():ei(this)&&!h?this._pendingCalls.add(n):n(sw(T))}_focus(e){const t=this.animation;e!==t.to&&(Fv(this)&&this._detach(),t.to=e,Fv(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Wn(t)&&(so(t,this),Dh(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Wn(e)&&As(e,this)}_set(e,t=!0){const n=En(e);if(!de.und(n)){const r=hr(this);if(!r||!Ir(n,r.getValue())){const i=Rh(n);!r||r.constructor!=i?Am(this,i.create(n)):r.setValue(n),r&&Ve.batchedUpdates(()=>{this._onChange(n,t)})}}return hr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Lo(this,"onStart",nr(this,No(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),On(this.animation.onChange,e,this)),On(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;hr(this).reset(En(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ei(this)||(Gv(this,!0),Do(this)||this._resume())}_resume(){lr.skipAnimation?this.finish():Du.start(this)}_stop(e,t){if(ei(this)){Gv(this,!1);const n=this.animation;He(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),$s(this,{type:"idle",parent:this});const r=t?Ia(this.get()):nr(this.get(),No(this,e??n.to));Ko(this._pendingCalls,r),n.changed&&(n.changed=!1,Lo(this,"onRest",r,this))}}};function No(e,t){const n=Ps(t),r=Ps(e.get());return Ir(r,n)}function uw(e,t=e.loop,n=e.to){const r=On(t);if(r){const i=r!==!0&&Rm(r),a=(i||e).reverse,o=!i||i.reset;return Ds({...e,loop:t,default:!1,pause:void 0,to:!a||jh(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ds(e){const{to:t,from:n}=e=Rm(e),r=new Set;return de.obj(t)&&Kv(t,r),de.obj(n)&&Kv(n,r),e.keys=r.size?Array.from(r):null,e}function z9(e){const t=Ds(e);return de.und(t.default)&&(t.default=Wu(t)),t}function Kv(e,t){xr(e,(n,r)=>n!=null&&t.add(r))}var H9=["onStart","onRest","onChange","onPause","onResume"];function Xv(e,t,n){e.animation[n]=t[n]!==rw(t,n)?nw(t[n],e.key):void 0}function Lo(e,t,...n){var r,i,a,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(a=e.defaultProps)[t])==null||o.call(a,...n)}var V9=["onStart","onChange","onRest"],q9=1,dw=class{constructor(e,t){this.id=q9++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];de.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ds(e)),this}start(e){let{queue:t}=this;return e?t=Cn(e).map(Ds):this.queue=[],this._flush?this._flush(this,t):(gw(this,t),Fh(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;He(Cn(t),r=>n[r].stop(!!e))}else Is(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(de.und(e))this.start({pause:!0});else{const t=this.springs;He(Cn(e),n=>t[n].pause())}return this}resume(e){if(de.und(e))this.start({pause:!1});else{const t=this.springs;He(Cn(e),n=>t[n].resume())}return this}each(e){xr(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,ts(e,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&ts(t,([s,c])=>{c.value=o,s(c,this,this._item)}),a&&(this._started=!1,ts(n,([s,c])=>{c.value=o,s(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ve.onFrame(this._onFrame)}};function Fh(e,t){return Promise.all(t.map(n=>fw(e,n))).then(n=>Pm(e,n))}async function fw(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=de.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const u=de.arr(i)||de.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):He(V9,p=>{const v=t[p];if(de.fun(v)){const _=e._events[p];t[p]=({finished:w,cancelled:x})=>{const T=_.get(v);T?(w||(T.finished=!1),x&&(T.cancelled=!0)):_.set(v,{value:null,finished:w||!1,cancelled:x||!1})},l&&(l[p]=t[p])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Ko(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),h=t.cancel===!0||rw(t,"cancel")===!0;(u||h&&d.asyncId)&&f.push(ow(++e._lastAsyncId,{props:t,state:d,actions:{pause:Mh,resume:Mh,start(p,v){h?(Is(d,e._lastAsyncId),v(Ia(e))):(p.onRest=s,v(cw(u,p,d,e)))}}})),d.paused&&await new Promise(p=>{d.resumeQueue.add(p)});const g=Pm(e,await Promise.all(f));if(o&&g.finished&&!(n&&g.noop)){const p=uw(t,o,i);if(p)return gw(e,[p]),fw(e,p,!0)}return c&&Ve.batchedUpdates(()=>c(g,e,e.item)),g}function Bh(e,t){const n={...e.springs};return t&&He(Cn(t),r=>{de.und(r.keys)&&(r=Ds(r)),de.obj(r.to)||(r={...r,to:void 0}),mw(n,r,i=>pw(i))}),hw(e,n),n}function hw(e,t){xr(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,so(n,e))})}function pw(e,t){const n=new W9;return n.key=e,t&&so(n,t),n}function mw(e,t,n){t.keys&&He(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function gw(e,t){He(t,n=>{mw(e.springs,n,r=>pw(r,e))})}var cc=({children:e,...t})=>{const n=m.useContext(Nl),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=k9(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Nl;return ue.createElement(a,{value:t},e)},Nl=Y9(cc,{});cc.Provider=Nl.Provider;cc.Consumer=Nl.Consumer;function Y9(e,t){return Object.assign(e,ue.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var vw=()=>{const e=[],t=function(r){C9();const i=[];return He(e,(a,o)=>{if(de.und(r))i.push(a.start());else{const s=n(r,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return He(e,r=>r.pause(...arguments)),this},t.resume=function(){return He(e,r=>r.resume(...arguments)),this},t.set=function(r){He(e,(i,a)=>{const o=de.fun(r)?r(a,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return He(e,(a,o)=>{if(de.und(r))i.push(a.start());else{const s=this._getProps(r,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return He(e,r=>r.stop(...arguments)),this},t.update=function(r){return He(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return de.fun(r)?r(a,i):r};return t._getProps=n,t};function G9(e,t,n){const r=de.fun(t)&&t;r&&!n&&(n=[]);const i=m.useMemo(()=>r||arguments.length==3?vw():void 0,[]),a=m.useRef(0),o=Mm(),s=m.useMemo(()=>({ctrls:[],queue:[],flush(_,w){const x=Bh(_,w);return a.current>0&&!s.queue.length&&!Object.keys(x).some(b=>!_.springs[b])?Fh(_,w):new Promise(b=>{hw(_,x),s.queue.push(()=>{b(Fh(_,w))}),o()})}}),[]),c=m.useRef([...s.ctrls]),l=[],u=Ah(e)||0;m.useMemo(()=>{He(c.current.slice(e,u),_=>{Ph(_,i),_.stop(!0)}),c.current.length=e,d(u,e)},[e]),m.useMemo(()=>{d(0,Math.min(u,e))},n);function d(_,w){for(let x=_;x<w;x++){const T=c.current[x]||(c.current[x]=new dw(null,s.flush)),b=r?r(x,T):t[x];b&&(l[x]=z9(b))}}const f=c.current.map((_,w)=>Bh(_,l[w])),h=m.useContext(cc),g=Ah(h),p=h!==g&&iw(h);Ii(()=>{a.current++,s.ctrls=c.current;const{queue:_}=s;_.length&&(s.queue=[],He(_,w=>w())),He(c.current,(w,x)=>{i==null||i.add(w),p&&w.start({default:h});const T=l[x];T&&(aw(w,T.ref),w.ref?w.queue.push(T):w.start(T))})}),$m(()=>()=>{He(s.ctrls,_=>_.stop(!0))});const v=f.map(_=>({..._}));return i?[v,i]:v}function Sr(e,t){const n=de.fun(e),[[r],i]=G9(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}function sa(e,t,n){const r=de.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:d}=r?r():t,f=m.useMemo(()=>r||arguments.length==3?vw():void 0,[]),h=Cn(e),g=[],p=m.useRef(null),v=i?null:p.current;Ii(()=>{p.current=g}),$m(()=>(He(g,A=>{f==null||f.add(A.ctrl),A.ctrl.ref=f}),()=>{He(p.current,A=>{A.expired&&clearTimeout(A.expirationId),Ph(A.ctrl,f),A.ctrl.stop(!0)})}));const _=K9(h,r?r():t,v),w=i&&p.current||[];Ii(()=>He(w,({ctrl:A,item:P,key:N})=>{Ph(A,f),On(l,P,N)}));const x=[];if(v&&He(v,(A,P)=>{A.expired?(clearTimeout(A.expirationId),w.push(A)):(P=x[P]=_.indexOf(A.key),~P&&(g[P]=A))}),He(h,(A,P)=>{g[P]||(g[P]={key:_[P],item:A,phase:"mount",ctrl:new dw},g[P].ctrl.item=A)}),x.length){let A=-1;const{leave:P}=r?r():t;He(x,(N,F)=>{const z=v[F];~N?(A=g.indexOf(z),g[A]={...z,item:h[N]}):P&&g.splice(++A,0,z)})}de.fun(a)&&g.sort((A,P)=>a(A.item,P.item));let T=-o;const b=Mm(),k=Wu(t),j=new Map,M=m.useRef(new Map),S=m.useRef(!1);He(g,(A,P)=>{const N=A.key,F=A.phase,z=r?r():t;let q,W;const G=On(z.delay||0,N);if(F=="mount")q=z.enter,W="enter";else{const X=_.indexOf(N)<0;if(F!="leave")if(X)q=z.leave,W="leave";else if(q=z.update)W="update";else return;else if(!X)q=z.enter,W="enter";else return}if(q=On(q,A.item,P),q=de.obj(q)?Rm(q):{to:q},!q.config){const X=d||k.config;q.config=On(X,A.item,P,W)}T+=o;const ee={...k,delay:G+T,ref:u,immediate:z.immediate,reset:!1,...q};if(W=="enter"&&de.und(ee.from)){const X=r?r():t,K=de.und(X.initial)||v?X.from:X.initial;ee.from=On(K,A.item,P)}const{onResolve:ie}=ee;ee.onResolve=X=>{On(ie,X);const K=p.current,te=K.find(D=>D.key===N);if(te&&!(X.cancelled&&te.phase!="update")&&te.ctrl.idle){const D=K.every(I=>I.ctrl.idle);if(te.phase=="leave"){const I=On(s,te.item);if(I!==!1){const L=I===!0?0:I;if(te.expired=!0,!D&&L>0){L<=2147483647&&(te.expirationId=setTimeout(b,L));return}}}D&&K.some(I=>I.expired)&&(M.current.delete(te),c&&(S.current=!0),b())}};const Q=Bh(A.ctrl,ee);W==="leave"&&c?M.current.set(A,{phase:W,springs:Q,payload:ee}):j.set(A,{phase:W,springs:Q,payload:ee})});const E=m.useContext(cc),C=Ah(E),O=E!==C&&iw(E);Ii(()=>{O&&He(g,A=>{A.ctrl.start({default:E})})},[E]),He(j,(A,P)=>{if(M.current.size){const N=g.findIndex(F=>F.key===P.key);g.splice(N,1)}}),Ii(()=>{He(M.current.size?M.current:j,({phase:A,payload:P},N)=>{const{ctrl:F}=N;N.phase=A,f==null||f.add(F),O&&A=="enter"&&F.start({default:E}),P&&(aw(F,P.ref),(F.ref||f)&&!S.current?F.update(P):(F.start(P),S.current&&(S.current=!1)))})},i?void 0:n);const $=A=>ue.createElement(ue.Fragment,null,g.map((P,N)=>{const{springs:F}=j.get(P)||P.ctrl,z=A({...F},P.item,P,N);return z&&z.type?ue.createElement(z.type,{...z.props,key:de.str(P.key)||de.num(P.key)?P.key:P.ctrl.id,ref:z.ref}):z}));return f?[$,f]:$}var Z9=1;function K9(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const o=r&&r.find(s=>s.item===a&&s.phase!=="leave"&&!i.has(s));return o?(i.add(o),o.key):Z9++})}return de.und(n)?e:de.fun(n)?e.map(n):Cn(n)}var yw=class extends Im{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Os(...t);const n=this._get(),r=Rh(n);Am(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Ir(t,n)||(hr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Qv(this._active)&&kf(this)}_get(){const e=de.arr(this.source)?this.source.map(En):Cn(En(this.source));return this.calc(...e)}_start(){this.idle&&!Qv(this._active)&&(this.idle=!1,He(Bu(this),e=>{e.done=!1}),lr.skipAnimation?(Ve.batchedUpdates(()=>this.advance()),kf(this)):Du.start(this))}_attach(){let e=1;He(Cn(this.source),t=>{Wn(t)&&so(t,this),Dh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){He(Cn(this.source),e=>{Wn(e)&&As(e,this)}),this._active.clear(),kf(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Cn(this.source).reduce((t,n)=>Math.max(t,(Dh(n)?n.priority:0)+1),0))}};function X9(e){return e.idle!==!1}function Qv(e){return!e.size||Array.from(e).every(X9)}function kf(e){e.idle||(e.idle=!0,He(Bu(e),t=>{t.done=!0}),$s(e,{type:"idle",parent:e}))}var vi=(e,...t)=>new yw(e,t);lr.assign({createStringInterpolator:Q_,to:(e,t)=>new yw(e,t)});var bw=/^--/;function Q9(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!bw.test(e)&&!(is.hasOwnProperty(e)&&is[e])?t+"px":(""+t).trim()}var Jv={};function J9(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(f=>n||e.hasAttribute(f)?f:Jv[f]||(Jv[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const h=Q9(f,i[f]);bw.test(f)?e.style.setProperty(f,h):e.style[f]=h}d.forEach((f,h)=>{e.setAttribute(f,u[h])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),c!==void 0&&e.setAttribute("viewBox",c)}var is={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ej=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),tj=["Webkit","Ms","Moz","O"];is=Object.keys(is).reduce((e,t)=>(tj.forEach(n=>e[ej(n,t)]=e[t]),e),is);var nj=/^(matrix|translate|scale|rotate|skew)/,rj=/^(translate)/,ij=/^(rotate|skew)/,Sf=(e,t)=>de.num(e)&&e!==0?e+t:e,al=(e,t)=>de.arr(e)?e.every(n=>al(n,t)):de.num(e)?e===t:parseFloat(e)===t,aj=class extends Uu{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(o=>[`translate3d(${o.map(s=>Sf(s,"px")).join(",")})`,al(o,0)])),xr(r,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(c=>[c,c===""]);else if(nj.test(s)){if(delete r[s],de.und(o))return;const c=rj.test(s)?"px":ij.test(s)?"deg":"";i.push(Cn(o)),a.push(s==="rotate3d"?([l,u,d,f])=>[`rotate3d(${l},${u},${d},${Sf(f,c)})`,al(f,0)]:l=>[`${s}(${l.map(u=>Sf(u,c)).join(",")})`,al(l,s.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new oj(i,a)),super(r)}},oj=class extends Z_{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return He(this.inputs,(n,r)=>{const i=En(n[0]),[a,o]=this.transforms[r](de.arr(i)?i:n.map(En));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&He(this.inputs,t=>He(t,n=>Wn(n)&&so(n,this)))}observerRemoved(e){e==0&&He(this.inputs,t=>He(t,n=>Wn(n)&&As(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),$s(this,e)}},sj=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];lr.assign({batchedUpdates:oi.unstable_batchedUpdates,createStringInterpolator:Q_,colors:e9});var cj=j9(sj,{applyAnimatedValues:J9,createAnimatedStyle:e=>new aj(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Ct=cj.animated;function ea(){return ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ea.apply(this,arguments)}var lj={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},e1=function(e,t){return"translate("+e+"px, "+t+"px)"},xw=m.memo(function(e){var t,n=e.position,r=e.anchor,i=e.children,a=Tt(),o=Sn(),s=o.animate,c=o.config,l=S3(),u=l[0],d=l[1],f=m.useRef(!1),h=void 0,g=!1,p=d.width>0&&d.height>0,v=Math.round(n[0]),_=Math.round(n[1]);p&&(r==="top"?(v-=d.width/2,_-=d.height+14):r==="right"?(v+=14,_-=d.height/2):r==="bottom"?(v-=d.width/2,_+=14):r==="left"?(v-=d.width+14,_-=d.height/2):r==="center"&&(v-=d.width/2,_-=d.height/2),h={transform:e1(v,_)},f.current||(g=!0),f.current=[v,_]);var w=Sr({to:h,config:c,immediate:!s||g}),x=ea({},lj,a.tooltip.wrapper,{transform:(t=w.transform)!=null?t:e1(v,_),opacity:w.transform?1:0});return y.jsx(Ct.div,{ref:u,style:x,children:i})});xw.displayName="TooltipWrapper";var _w=m.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return y.jsx("span",{style:ea({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),Dm=m.memo(function(e){var t,n=e.id,r=e.value,i=e.format,a=e.enableChip,o=a!==void 0&&a,s=e.color,c=e.renderContent,l=Tt(),u=eo(i);if(typeof c=="function")t=c();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=y.jsxs("div",{style:l.tooltip.basic,children:[o&&y.jsx(_w,{color:s,style:l.tooltip.chip}),d!==void 0?y.jsxs("span",{children:[n,": ",y.jsx("strong",{children:""+d})]}):n]})}return y.jsx("div",{style:l.tooltip.container,children:t})}),uj={width:"100%",borderCollapse:"collapse"},ww=m.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,a=e.renderContent,o=Tt();return i.length?(t=typeof a=="function"?a():y.jsxs("div",{children:[n&&n,y.jsx("table",{style:ea({},uj,o.tooltip.table),children:y.jsx("tbody",{children:i.map(function(s,c){return y.jsx("tr",{children:s.map(function(l,u){return y.jsx("td",{style:o.tooltip.tableCell,children:l},u)})},c)})})})]}),y.jsx("div",{style:o.tooltip.container,children:t})):null});ww.displayName="TableTooltip";var Uh=m.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,a=Tt(),o=Sn(),s=o.animate,c=o.config,l=m.useMemo(function(){return ea({},a.crosshair.line,{pointerEvents:"none"})},[a.crosshair.line]),u=Sr({x1:t,x2:n,y1:r,y2:i,config:c,immediate:!s});return y.jsx(Ct.line,ea({},u,{fill:"none",style:l}))});Uh.displayName="CrosshairLine";var Wh=m.memo(function(e){var t,n,r=e.width,i=e.height,a=e.type,o=e.x,s=e.y;return a==="cross"?(t={x0:o,x1:o,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):a==="top-left"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:0,x1:o,y0:s,y1:s}):a==="top"?t={x0:o,x1:o,y0:0,y1:s}:a==="top-right"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:o,x1:r,y0:s,y1:s}):a==="right"?n={x0:o,x1:r,y0:s,y1:s}:a==="bottom-right"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:o,x1:r,y0:s,y1:s}):a==="bottom"?t={x0:o,x1:o,y0:s,y1:i}:a==="bottom-left"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:0,x1:o,y0:s,y1:s}):a==="left"?n={x0:0,x1:o,y0:s,y1:s}:a==="x"?t={x0:o,x1:o,y0:0,y1:i}:a==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),y.jsxs(y.Fragment,{children:[t&&y.jsx(Uh,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&y.jsx(Uh,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Wh.displayName="Crosshair";var Cw=m.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),zh={isVisible:!1,position:[null,null],content:null,anchor:null},Tw=m.createContext(zh),dj=function(e){var t=m.useState(zh),n=t[0],r=t[1],i=m.useCallback(function(s,c,l){var u=c[0],d=c[1];l===void 0&&(l="top"),r({isVisible:!0,position:[u,d],anchor:l,content:s})},[r]),a=m.useCallback(function(s,c,l){l===void 0&&(l="top");var u=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===u.width?1:d/u.width,h="touches"in c?c.touches[0]:c,g=h.clientX,p=h.clientY,v=(g-u.left)*f,_=(p-u.top)*f;l!=="left"&&l!=="right"||(l=v<u.width/2?"right":"left"),r({isVisible:!0,position:[v,_],anchor:l,content:s})},[e,r]),o=m.useCallback(function(){r(zh)},[r]);return{actions:m.useMemo(function(){return{showTooltipAt:i,showTooltipFromEvent:a,hideTooltip:o}},[i,a,o]),state:n}},ca=function(){var e=m.useContext(Cw);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},fj=function(){var e=m.useContext(Tw);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},hj=function(e){return e.isVisible},pj=function(){var e=fj();return hj(e)?y.jsx(xw,{position:e.position,anchor:e.anchor,children:e.content}):null},mj=function(e){var t=e.container,n=e.children,r=dj(t),i=r.actions,a=r.state;return y.jsx(Cw.Provider,{value:i,children:y.jsx(Tw.Provider,{value:a,children:n})})};function gj(){this.__data__=[],this.size=0}var vj=gj;function yj(e,t){return e===t||e!==e&&t!==t}var lc=yj,bj=lc;function xj(e,t){for(var n=e.length;n--;)if(bj(e[n][0],t))return n;return-1}var zu=xj,_j=zu,wj=Array.prototype,Cj=wj.splice;function Tj(e){var t=this.__data__,n=_j(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Cj.call(t,n,1),--this.size,!0}var kj=Tj,Sj=zu;function Ej(e){var t=this.__data__,n=Sj(t,e);return n<0?void 0:t[n][1]}var Oj=Ej,Mj=zu;function $j(e){return Mj(this.__data__,e)>-1}var Aj=$j,Rj=zu;function jj(e,t){var n=this.__data__,r=Rj(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Pj=jj,Ij=vj,Dj=kj,Nj=Oj,Lj=Aj,Fj=Pj;function co(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}co.prototype.clear=Ij;co.prototype.delete=Dj;co.prototype.get=Nj;co.prototype.has=Lj;co.prototype.set=Fj;var Hu=co,Bj=Hu;function Uj(){this.__data__=new Bj,this.size=0}var Wj=Uj;function zj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Hj=zj;function Vj(e){return this.__data__.get(e)}var qj=Vj;function Yj(e){return this.__data__.has(e)}var Gj=Yj,Zj=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,kw=Zj,Kj=kw,Xj=typeof self=="object"&&self&&self.Object===Object&&self,Qj=Kj||Xj||Function("return this")(),Er=Qj,Jj=Er,eP=Jj.Symbol,lo=eP,t1=lo,Sw=Object.prototype,tP=Sw.hasOwnProperty,nP=Sw.toString,Fo=t1?t1.toStringTag:void 0;function rP(e){var t=tP.call(e,Fo),n=e[Fo];try{e[Fo]=void 0;var r=!0}catch{}var i=nP.call(e);return r&&(t?e[Fo]=n:delete e[Fo]),i}var iP=rP,aP=Object.prototype,oP=aP.toString;function sP(e){return oP.call(e)}var cP=sP,n1=lo,lP=iP,uP=cP,dP="[object Null]",fP="[object Undefined]",r1=n1?n1.toStringTag:void 0;function hP(e){return e==null?e===void 0?fP:dP:r1&&r1 in Object(e)?lP(e):uP(e)}var Gr=hP;function pP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Or=pP,mP=Gr,gP=Or,vP="[object AsyncFunction]",yP="[object Function]",bP="[object GeneratorFunction]",xP="[object Proxy]";function _P(e){if(!gP(e))return!1;var t=mP(e);return t==yP||t==bP||t==vP||t==xP}var Vu=_P;const Nm=Ht(Vu);var wP=Er,CP=wP["__core-js_shared__"],TP=CP,Ef=TP,i1=function(){var e=/[^.]+$/.exec(Ef&&Ef.keys&&Ef.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kP(e){return!!i1&&i1 in e}var SP=kP,EP=Function.prototype,OP=EP.toString;function MP(e){if(e!=null){try{return OP.call(e)}catch{}try{return e+""}catch{}}return""}var Ew=MP,$P=Vu,AP=SP,RP=Or,jP=Ew,PP=/[\\^$.*+?()[\]{}|]/g,IP=/^\[object .+?Constructor\]$/,DP=Function.prototype,NP=Object.prototype,LP=DP.toString,FP=NP.hasOwnProperty,BP=RegExp("^"+LP.call(FP).replace(PP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function UP(e){if(!RP(e)||AP(e))return!1;var t=$P(e)?BP:IP;return t.test(jP(e))}var WP=UP;function zP(e,t){return e==null?void 0:e[t]}var HP=zP,VP=WP,qP=HP;function YP(e,t){var n=qP(e,t);return VP(n)?n:void 0}var la=YP,GP=la,ZP=Er,KP=GP(ZP,"Map"),Lm=KP,XP=la,QP=XP(Object,"create"),qu=QP,a1=qu;function JP(){this.__data__=a1?a1(null):{},this.size=0}var eI=JP;function tI(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var nI=tI,rI=qu,iI="__lodash_hash_undefined__",aI=Object.prototype,oI=aI.hasOwnProperty;function sI(e){var t=this.__data__;if(rI){var n=t[e];return n===iI?void 0:n}return oI.call(t,e)?t[e]:void 0}var cI=sI,lI=qu,uI=Object.prototype,dI=uI.hasOwnProperty;function fI(e){var t=this.__data__;return lI?t[e]!==void 0:dI.call(t,e)}var hI=fI,pI=qu,mI="__lodash_hash_undefined__";function gI(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pI&&t===void 0?mI:t,this}var vI=gI,yI=eI,bI=nI,xI=cI,_I=hI,wI=vI;function uo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}uo.prototype.clear=yI;uo.prototype.delete=bI;uo.prototype.get=xI;uo.prototype.has=_I;uo.prototype.set=wI;var CI=uo,o1=CI,TI=Hu,kI=Lm;function SI(){this.size=0,this.__data__={hash:new o1,map:new(kI||TI),string:new o1}}var EI=SI;function OI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var MI=OI,$I=MI;function AI(e,t){var n=e.__data__;return $I(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Yu=AI,RI=Yu;function jI(e){var t=RI(this,e).delete(e);return this.size-=t?1:0,t}var PI=jI,II=Yu;function DI(e){return II(this,e).get(e)}var NI=DI,LI=Yu;function FI(e){return LI(this,e).has(e)}var BI=FI,UI=Yu;function WI(e,t){var n=UI(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var zI=WI,HI=EI,VI=PI,qI=NI,YI=BI,GI=zI;function fo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fo.prototype.clear=HI;fo.prototype.delete=VI;fo.prototype.get=qI;fo.prototype.has=YI;fo.prototype.set=GI;var Fm=fo,ZI=Hu,KI=Lm,XI=Fm,QI=200;function JI(e,t){var n=this.__data__;if(n instanceof ZI){var r=n.__data__;if(!KI||r.length<QI-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new XI(r)}return n.set(e,t),this.size=n.size,this}var eD=JI,tD=Hu,nD=Wj,rD=Hj,iD=qj,aD=Gj,oD=eD;function ho(e){var t=this.__data__=new tD(e);this.size=t.size}ho.prototype.clear=nD;ho.prototype.delete=rD;ho.prototype.get=iD;ho.prototype.has=aD;ho.prototype.set=oD;var Gu=ho,sD=la,cD=function(){try{var e=sD(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Ow=cD,s1=Ow;function lD(e,t,n){t=="__proto__"&&s1?s1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Bm=lD,uD=Bm,dD=lc;function fD(e,t,n){(n!==void 0&&!dD(e[t],n)||n===void 0&&!(t in e))&&uD(e,t,n)}var Mw=fD;function hD(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var pD=hD,mD=pD,gD=mD(),$w=gD,Ll={exports:{}};Ll.exports;(function(e,t){var n=Er,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var d=l.length,f=s?s(d):new l.constructor(d);return l.copy(f),f}e.exports=c})(Ll,Ll.exports);var Aw=Ll.exports,vD=Er,yD=vD.Uint8Array,Rw=yD,c1=Rw;function bD(e){var t=new e.constructor(e.byteLength);return new c1(t).set(new c1(e)),t}var Um=bD,xD=Um;function _D(e,t){var n=t?xD(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var jw=_D;function wD(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Pw=wD,CD=Or,l1=Object.create,TD=function(){function e(){}return function(t){if(!CD(t))return{};if(l1)return l1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),kD=TD;function SD(e,t){return function(n){return e(t(n))}}var Iw=SD,ED=Iw,OD=ED(Object.getPrototypeOf,Object),Wm=OD,MD=Object.prototype;function $D(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||MD;return e===n}var zm=$D,AD=kD,RD=Wm,jD=zm;function PD(e){return typeof e.constructor=="function"&&!jD(e)?AD(RD(e)):{}}var Dw=PD;function ID(e){return e!=null&&typeof e=="object"}var Qn=ID,DD=Gr,ND=Qn,LD="[object Arguments]";function FD(e){return ND(e)&&DD(e)==LD}var BD=FD,u1=BD,UD=Qn,Nw=Object.prototype,WD=Nw.hasOwnProperty,zD=Nw.propertyIsEnumerable,HD=u1(function(){return arguments}())?u1:function(e){return UD(e)&&WD.call(e,"callee")&&!zD.call(e,"callee")},Zu=HD,VD=Array.isArray,Pn=VD,qD=9007199254740991;function YD(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=qD}var Hm=YD,GD=Vu,ZD=Hm;function KD(e){return e!=null&&ZD(e.length)&&!GD(e)}var po=KD,XD=po,QD=Qn;function JD(e){return QD(e)&&XD(e)}var Lw=JD,Fl={exports:{}};function eN(){return!1}var tN=eN;Fl.exports;(function(e,t){var n=Er,r=tN,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l})(Fl,Fl.exports);var Ku=Fl.exports,nN=Gr,rN=Wm,iN=Qn,aN="[object Object]",oN=Function.prototype,sN=Object.prototype,Fw=oN.toString,cN=sN.hasOwnProperty,lN=Fw.call(Object);function uN(e){if(!iN(e)||nN(e)!=aN)return!1;var t=rN(e);if(t===null)return!0;var n=cN.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Fw.call(n)==lN}var Vm=uN;const qm=Ht(Vm);var dN=Gr,fN=Hm,hN=Qn,pN="[object Arguments]",mN="[object Array]",gN="[object Boolean]",vN="[object Date]",yN="[object Error]",bN="[object Function]",xN="[object Map]",_N="[object Number]",wN="[object Object]",CN="[object RegExp]",TN="[object Set]",kN="[object String]",SN="[object WeakMap]",EN="[object ArrayBuffer]",ON="[object DataView]",MN="[object Float32Array]",$N="[object Float64Array]",AN="[object Int8Array]",RN="[object Int16Array]",jN="[object Int32Array]",PN="[object Uint8Array]",IN="[object Uint8ClampedArray]",DN="[object Uint16Array]",NN="[object Uint32Array]",Ft={};Ft[MN]=Ft[$N]=Ft[AN]=Ft[RN]=Ft[jN]=Ft[PN]=Ft[IN]=Ft[DN]=Ft[NN]=!0;Ft[pN]=Ft[mN]=Ft[EN]=Ft[gN]=Ft[ON]=Ft[vN]=Ft[yN]=Ft[bN]=Ft[xN]=Ft[_N]=Ft[wN]=Ft[CN]=Ft[TN]=Ft[kN]=Ft[SN]=!1;function LN(e){return hN(e)&&fN(e.length)&&!!Ft[dN(e)]}var FN=LN;function BN(e){return function(t){return e(t)}}var mo=BN,Bl={exports:{}};Bl.exports;(function(e,t){var n=kw,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Bl,Bl.exports);var Xu=Bl.exports,UN=FN,WN=mo,d1=Xu,f1=d1&&d1.isTypedArray,zN=f1?WN(f1):UN,Ym=zN;function HN(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Bw=HN,VN=Bm,qN=lc,YN=Object.prototype,GN=YN.hasOwnProperty;function ZN(e,t,n){var r=e[t];(!(GN.call(e,t)&&qN(r,n))||n===void 0&&!(t in e))&&VN(e,t,n)}var Gm=ZN,KN=Gm,XN=Bm;function QN(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?XN(n,s,c):KN(n,s,c)}return n}var go=QN;function JN(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var eL=JN,tL=9007199254740991,nL=/^(?:0|[1-9]\d*)$/;function rL(e,t){var n=typeof e;return t=t??tL,!!t&&(n=="number"||n!="symbol"&&nL.test(e))&&e>-1&&e%1==0&&e<t}var Qu=rL,iL=eL,aL=Zu,oL=Pn,sL=Ku,cL=Qu,lL=Ym,uL=Object.prototype,dL=uL.hasOwnProperty;function fL(e,t){var n=oL(e),r=!n&&aL(e),i=!n&&!r&&sL(e),a=!n&&!r&&!i&&lL(e),o=n||r||i||a,s=o?iL(e.length,String):[],c=s.length;for(var l in e)(t||dL.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||cL(l,c)))&&s.push(l);return s}var Uw=fL;function hL(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var pL=hL,mL=Or,gL=zm,vL=pL,yL=Object.prototype,bL=yL.hasOwnProperty;function xL(e){if(!mL(e))return vL(e);var t=gL(e),n=[];for(var r in e)r=="constructor"&&(t||!bL.call(e,r))||n.push(r);return n}var _L=xL,wL=Uw,CL=_L,TL=po;function kL(e){return TL(e)?wL(e,!0):CL(e)}var uc=kL,SL=go,EL=uc;function OL(e){return SL(e,EL(e))}var ML=OL,h1=Mw,$L=Aw,AL=jw,RL=Pw,jL=Dw,p1=Zu,m1=Pn,PL=Lw,IL=Ku,DL=Vu,NL=Or,LL=Vm,FL=Ym,g1=Bw,BL=ML;function UL(e,t,n,r,i,a,o){var s=g1(e,n),c=g1(t,n),l=o.get(c);if(l){h1(e,n,l);return}var u=a?a(s,c,n+"",e,t,o):void 0,d=u===void 0;if(d){var f=m1(c),h=!f&&IL(c),g=!f&&!h&&FL(c);u=c,f||h||g?m1(s)?u=s:PL(s)?u=RL(s):h?(d=!1,u=$L(c,!0)):g?(d=!1,u=AL(c,!0)):u=[]:LL(c)||p1(c)?(u=s,p1(s)?u=BL(s):(!NL(s)||DL(s))&&(u=jL(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),h1(e,n,u)}var WL=UL,zL=Gu,HL=Mw,VL=$w,qL=WL,YL=Or,GL=uc,ZL=Bw;function Ww(e,t,n,r,i){e!==t&&VL(t,function(a,o){if(i||(i=new zL),YL(a))qL(e,t,o,n,Ww,r,i);else{var s=r?r(ZL(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),HL(e,o,s)}},GL)}var KL=Ww;function XL(e){return e}var Ju=XL;function QL(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var JL=QL,eF=JL,v1=Math.max;function tF(e,t,n){return t=v1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=v1(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),eF(e,this,s)}}var zw=tF;function nF(e){return function(){return e}}var rF=nF,iF=rF,y1=Ow,aF=Ju,oF=y1?function(e,t){return y1(e,"toString",{configurable:!0,enumerable:!1,value:iF(t),writable:!0})}:aF,sF=oF,cF=800,lF=16,uF=Date.now;function dF(e){var t=0,n=0;return function(){var r=uF(),i=lF-(r-n);if(n=r,i>0){if(++t>=cF)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var fF=dF,hF=sF,pF=fF,mF=pF(hF),Hw=mF,gF=Ju,vF=zw,yF=Hw;function bF(e,t){return yF(vF(e,t,gF),e+"")}var Zm=bF,xF=lc,_F=po,wF=Qu,CF=Or;function TF(e,t,n){if(!CF(n))return!1;var r=typeof t;return(r=="number"?_F(n)&&wF(t,n.length):r=="string"&&t in n)?xF(n[t],e):!1}var Vw=TF,kF=Zm,SF=Vw;function EF(e){return kF(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&SF(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var OF=EF,MF=KL,$F=OF,AF=$F(function(e,t,n){MF(e,t,n)}),RF=AF;const jF=Ht(RF);var PF=Gr,IF=Qn,DF="[object Symbol]";function NF(e){return typeof e=="symbol"||IF(e)&&PF(e)==DF}var ed=NF,LF=Pn,FF=ed,BF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,UF=/^\w*$/;function WF(e,t){if(LF(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||FF(e)?!0:UF.test(e)||!BF.test(e)||t!=null&&e in Object(t)}var Km=WF,qw=Fm,zF="Expected a function";function Xm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(zF);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Xm.Cache||qw),n}Xm.Cache=qw;var HF=Xm,VF=HF,qF=500;function YF(e){var t=VF(e,function(r){return n.size===qF&&n.clear(),r}),n=t.cache;return t}var GF=YF,ZF=GF,KF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XF=/\\(\\)?/g,QF=ZF(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(KF,function(n,r,i,a){t.push(i?a.replace(XF,"$1"):r||n)}),t}),JF=QF;function eB(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var td=eB,b1=lo,tB=td,nB=Pn,rB=ed,iB=1/0,x1=b1?b1.prototype:void 0,_1=x1?x1.toString:void 0;function Yw(e){if(typeof e=="string")return e;if(nB(e))return tB(e,Yw)+"";if(rB(e))return _1?_1.call(e):"";var t=e+"";return t=="0"&&1/e==-iB?"-0":t}var aB=Yw,oB=aB;function sB(e){return e==null?"":oB(e)}var Gw=sB,cB=Pn,lB=Km,uB=JF,dB=Gw;function fB(e,t){return cB(e)?e:lB(e,t)?[e]:uB(dB(e))}var vo=fB,hB=ed,pB=1/0;function mB(e){if(typeof e=="string"||hB(e))return e;var t=e+"";return t=="0"&&1/e==-pB?"-0":t}var yo=mB,gB=vo,vB=yo;function yB(e,t){t=gB(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[vB(t[n++])];return n&&n==r?e:void 0}var dc=yB,bB=dc;function xB(e,t,n){var r=e==null?void 0:bB(e,t);return r===void 0?n:r}var Zw=xB;const _r=Ht(Zw);var _B=Gm,wB=vo,CB=Qu,w1=Or,TB=yo;function kB(e,t,n,r){if(!w1(e))return e;t=wB(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=TB(t[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=w1(u)?u:CB(t[i+1])?[]:{})}_B(s,c,l),s=s[c]}return e}var Kw=kB,SB=Kw;function EB(e,t,n){return e==null?e:SB(e,t,n)}var OB=EB;const Xo=Ht(OB);function nd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Qm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bo(){}var ta=.7,Xa=1/ta,Da="\\s*([+-]?\\d+)\\s*",Ns="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",MB=/^#([0-9a-f]{3,8})$/,$B=new RegExp(`^rgb\\(${Da},${Da},${Da}\\)$`),AB=new RegExp(`^rgb\\(${vr},${vr},${vr}\\)$`),RB=new RegExp(`^rgba\\(${Da},${Da},${Da},${Ns}\\)$`),jB=new RegExp(`^rgba\\(${vr},${vr},${vr},${Ns}\\)$`),PB=new RegExp(`^hsl\\(${Ns},${vr},${vr}\\)$`),IB=new RegExp(`^hsla\\(${Ns},${vr},${vr},${Ns}\\)$`),C1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};nd(bo,Ls,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:T1,formatHex:T1,formatHex8:DB,formatHsl:NB,formatRgb:k1,toString:k1});function T1(){return this.rgb().formatHex()}function DB(){return this.rgb().formatHex8()}function NB(){return Qw(this).formatHsl()}function k1(){return this.rgb().formatRgb()}function Ls(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=MB.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?S1(t):n===3?new vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Bc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Bc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$B.exec(e))?new vn(t[1],t[2],t[3],1):(t=AB.exec(e))?new vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=RB.exec(e))?Bc(t[1],t[2],t[3],t[4]):(t=jB.exec(e))?Bc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PB.exec(e))?M1(t[1],t[2]/100,t[3]/100,1):(t=IB.exec(e))?M1(t[1],t[2]/100,t[3]/100,t[4]):C1.hasOwnProperty(e)?S1(C1[e]):e==="transparent"?new vn(NaN,NaN,NaN,0):null}function S1(e){return new vn(e>>16&255,e>>8&255,e&255,1)}function Bc(e,t,n,r){return r<=0&&(e=t=n=NaN),new vn(e,t,n,r)}function Xw(e){return e instanceof bo||(e=Ls(e)),e?(e=e.rgb(),new vn(e.r,e.g,e.b,e.opacity)):new vn}function Qa(e,t,n,r){return arguments.length===1?Xw(e):new vn(e,t,n,r??1)}function vn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}nd(vn,Qa,Qm(bo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vn(Hi(this.r),Hi(this.g),Hi(this.b),Ul(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E1,formatHex:E1,formatHex8:LB,formatRgb:O1,toString:O1}));function E1(){return`#${Di(this.r)}${Di(this.g)}${Di(this.b)}`}function LB(){return`#${Di(this.r)}${Di(this.g)}${Di(this.b)}${Di((isNaN(this.opacity)?1:this.opacity)*255)}`}function O1(){const e=Ul(this.opacity);return`${e===1?"rgb(":"rgba("}${Hi(this.r)}, ${Hi(this.g)}, ${Hi(this.b)}${e===1?")":`, ${e})`}`}function Ul(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Di(e){return e=Hi(e),(e<16?"0":"")+e.toString(16)}function M1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rr(e,t,n,r)}function Qw(e){if(e instanceof rr)return new rr(e.h,e.s,e.l,e.opacity);if(e instanceof bo||(e=Ls(e)),!e)return new rr;if(e instanceof rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new rr(o,s,c,e.opacity)}function FB(e,t,n,r){return arguments.length===1?Qw(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}nd(rr,FB,Qm(bo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new vn(Of(e>=240?e-240:e+120,i,r),Of(e,i,r),Of(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new rr($1(this.h),Uc(this.s),Uc(this.l),Ul(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ul(this.opacity);return`${e===1?"hsl(":"hsla("}${$1(this.h)}, ${Uc(this.s)*100}%, ${Uc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $1(e){return e=(e||0)%360,e<0?e+360:e}function Uc(e){return Math.max(0,Math.min(1,e||0))}function Of(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const BB=Math.PI/180,UB=180/Math.PI;var Jw=-.14861,Jm=1.78277,eg=-.29227,rd=-.90649,Fs=1.97294,A1=Fs*rd,R1=Fs*Jm,j1=Jm*eg-rd*Jw;function WB(e){if(e instanceof Vi)return new Vi(e.h,e.s,e.l,e.opacity);e instanceof vn||(e=Xw(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(j1*r+A1*t-R1*n)/(j1+A1-R1),a=r-i,o=(Fs*(n-i)-eg*a)/rd,s=Math.sqrt(o*o+a*a)/(Fs*i*(1-i)),c=s?Math.atan2(o,a)*UB-120:NaN;return new Vi(c<0?c+360:c,s,i,e.opacity)}function wr(e,t,n,r){return arguments.length===1?WB(e):new Vi(e,t,n,r??1)}function Vi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}nd(Vi,wr,Qm(bo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new Vi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ta:Math.pow(ta,e),new Vi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*BB,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new vn(255*(t+n*(Jw*r+Jm*i)),255*(t+n*(eg*r+rd*i)),255*(t+n*(Fs*r)),this.opacity)}}));function zB(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function HB(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return zB((n-r/t)*t,o,i,a,s)}}const id=e=>()=>e;function e4(e,t){return function(n){return e+n*t}}function VB(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function qB(e,t){var n=t-e;return n?e4(e,n>180||n<-180?n-360*Math.round(n/360):n):id(isNaN(e)?t:e)}function YB(e){return(e=+e)==1?Na:function(t,n){return n-t?VB(t,n,e):id(isNaN(t)?n:t)}}function Na(e,t){var n=t-e;return n?e4(e,n):id(isNaN(e)?t:e)}const P1=function e(t){var n=YB(t);function r(i,a){var o=n((i=Qa(i)).r,(a=Qa(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=Na(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function GB(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Qa(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=a(c),s+""}}}var ZB=GB(HB);function KB(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function XB(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function QB(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=tg(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function JB(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Wl(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function eU(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=tg(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Hh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mf=new RegExp(Hh.source,"g");function tU(e){return function(){return e}}function nU(e){return function(t){return e(t)+""}}function t4(e,t){var n=Hh.lastIndex=Mf.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=Hh.exec(e))&&(i=Mf.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Wl(r,i)})),n=Mf.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?nU(c[0].x):tU(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)s[(d=c[u]).i]=d.x(l);return s.join("")})}function tg(e,t){var n=typeof t,r;return t==null||n==="boolean"?id(t):(n==="number"?Wl:n==="string"?(r=Ls(t))?(t=r,P1):t4:t instanceof Ls?P1:t instanceof Date?JB:XB(t)?KB:Array.isArray(t)?QB:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?eU:Wl)(e,t)}function rU(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function n4(e){return function t(n){n=+n;function r(i,a){var o=e((i=wr(i)).h,(a=wr(a)).h),s=Na(i.s,a.s),c=Na(i.l,a.l),l=Na(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}n4(qB);var ng=n4(Na),iU=Gr,aU=Pn,oU=Qn,sU="[object String]";function cU(e){return typeof e=="string"||!aU(e)&&oU(e)&&iU(e)==sU}var lU=cU;const uU=Ht(lU);function dU(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var r4=dU;const $e=Ht(r4);function ol(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fU(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rg(e){let t,n,r;e.length!==2?(t=ol,n=(s,c)=>ol(e(s),c),r=(s,c)=>e(s)-c):(t=e===ol||e===fU?e:hU,n=e,r=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<0?l=d+1:u=d}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function o(s,c,l=0,u=s.length){const d=i(s,c,l,u-1);return d>l&&r(s[d-1],c)>-r(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function hU(){return 0}function pU(e){return e===null?NaN:+e}const mU=rg(ol),gU=mU.right;rg(pU).center;class I1 extends Map{constructor(t,n=bU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(D1(this,t))}has(t){return super.has(D1(this,t))}set(t,n){return super.set(vU(this,t),n)}delete(t){return super.delete(yU(this,t))}}function D1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function yU({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bU(e){return e!==null&&typeof e=="object"?e.valueOf():e}const xU=Math.sqrt(50),_U=Math.sqrt(10),wU=Math.sqrt(2);function zl(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=xU?10:a>=_U?5:a>=wU?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?zl(e,t,n*2):[s,c,l]}function Vh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?zl(t,e,n):zl(e,t,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function qh(e,t,n){return t=+t,e=+e,n=+n,zl(e,t,n)[2]}function Yh(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?qh(t,e,n):qh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function CU(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function ua(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const N1=Symbol("implicit");function Ni(){var e=new I1,t=[],n=[],r=N1;function i(a){let o=e.get(a);if(o===void 0){if(r!==N1)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new I1;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Ni(t,n).unknown(r)},ua.apply(i,arguments),i}function ig(){var e=Ni().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var f=t().length,h=i<r,g=h?i:r,p=h?r:i;a=(p-g)/Math.max(1,f-c+l*2),s&&(a=Math.floor(a)),g+=(p-g-a*(f-c))*u,o=a*(1-c),s&&(g=Math.round(g),o=Math.round(o));var v=CU(f).map(function(_){return g+a*_});return n(h?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),d()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),d()):c},e.paddingOuter=function(f){return arguments.length?(l=+f,d()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return ig(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},ua.apply(d(),arguments)}function i4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return i4(t())},e}function TU(){return i4(ig.apply(null,arguments).paddingInner(1))}function kU(e){return function(){return e}}function SU(e){return+e}var L1=[0,1];function Ma(e){return e}function Gh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:kU(isNaN(t)?NaN:.5)}function EU(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function OU(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Gh(i,r),a=n(o,a)):(r=Gh(r,i),a=n(a,o)),function(s){return a(r(s))}}function MU(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Gh(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var c=gU(e,s,1,r)-1;return a[c](i[c](s))}}function ad(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ag(){var e=L1,t=L1,n=tg,r,i,a,o=Ma,s,c,l;function u(){var f=Math.min(e.length,t.length);return o!==Ma&&(o=EU(e[0],e[f-1])),s=f>2?MU:OU,c=l=null,d}function d(f){return f==null||isNaN(f=+f)?a:(c||(c=s(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((l||(l=s(t,e.map(r),Wl)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,SU),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=rU,u()},d.clamp=function(f){return arguments.length?(o=f?!0:Ma,u()):o!==Ma},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,h){return r=f,i=h,u()}}function a4(){return ag()(Ma,Ma)}function $U(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Hl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ja(e){return e=Hl(Math.abs(e)),e?e[1]:NaN}function AU(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function RU(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var jU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bs(e){if(!(t=jU.exec(e)))throw new Error("invalid format: "+e);var t;return new og({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bs.prototype=og.prototype;function og(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}og.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function PU(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var o4;function IU(e,t){var n=Hl(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(o4=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Hl(e,Math.max(0,t+a-1))[0]}function F1(e,t){var n=Hl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const B1={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:$U,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return F1(e*100,t)},r:F1,s:IU,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function U1(e){return e}var W1=Array.prototype.map,z1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DU(e){var t=e.grouping===void 0||e.thousands===void 0?U1:AU(W1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?U1:RU(W1.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Bs(d);var f=d.fill,h=d.align,g=d.sign,p=d.symbol,v=d.zero,_=d.width,w=d.comma,x=d.precision,T=d.trim,b=d.type;b==="n"?(w=!0,b="g"):B1[b]||(x===void 0&&(x=12),T=!0,b="g"),(v||f==="0"&&h==="=")&&(v=!0,f="0",h="=");var k=p==="$"?n:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",j=p==="$"?r:/[%p]/.test(b)?o:"",M=B1[b],S=/[defgprs%]/.test(b);x=x===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(C){var O=k,$=j,A,P,N;if(b==="c")$=M(C)+$,C="";else{C=+C;var F=C<0||1/C<0;if(C=isNaN(C)?c:M(Math.abs(C),x),T&&(C=PU(C)),F&&+C==0&&g!=="+"&&(F=!1),O=(F?g==="("?g:s:g==="-"||g==="("?"":g)+O,$=(b==="s"?z1[8+o4/3]:"")+$+(F&&g==="("?")":""),S){for(A=-1,P=C.length;++A<P;)if(N=C.charCodeAt(A),48>N||N>57){$=(N===46?i+C.slice(A+1):C.slice(A))+$,C=C.slice(0,A);break}}}w&&!v&&(C=t(C,1/0));var z=O.length+C.length+$.length,q=z<_?new Array(_-z+1).join(f):"";switch(w&&v&&(C=t(q+C,q.length?_-$.length:1/0),q=""),h){case"<":C=O+C+$+q;break;case"=":C=O+q+C+$;break;case"^":C=q.slice(0,z=q.length>>1)+O+C+$+q.slice(z);break;default:C=q+O+C+$;break}return a(C)}return E.toString=function(){return d+""},E}function u(d,f){var h=l((d=Bs(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Ja(f)/3)))*3,p=Math.pow(10,-g),v=z1[8+g/3];return function(_){return h(p*_)+v}}return{format:l,formatPrefix:u}}var Wc,fc,s4;NU({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function NU(e){return Wc=DU(e),fc=Wc.format,s4=Wc.formatPrefix,Wc}function LU(e){return Math.max(0,-Ja(Math.abs(e)))}function FU(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ja(t)/3)))*3-Ja(Math.abs(e)))}function BU(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ja(t)-Ja(e))+1}function UU(e,t,n,r){var i=Yh(e,t,n),a;switch(r=Bs(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=FU(i,o))&&(r.precision=a),s4(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=BU(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=LU(i))&&(r.precision=a-(r.type==="%")*2);break}}return fc(r)}function c4(e){var t=e.domain;return e.ticks=function(n){var r=t();return Vh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return UU(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=qh(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function l4(){var e=a4();return e.copy=function(){return ad(e,l4())},ua.apply(e,arguments),c4(e)}function u4(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function H1(e){return Math.log(e)}function V1(e){return Math.exp(e)}function WU(e){return-Math.log(-e)}function zU(e){return-Math.exp(-e)}function HU(e){return isFinite(e)?+("1e"+e):e<0?0:e}function VU(e){return e===10?HU:e===Math.E?Math.exp:t=>Math.pow(e,t)}function qU(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function q1(e){return(t,n)=>-e(-t,n)}function YU(e){const t=e(H1,V1),n=t.domain;let r=10,i,a;function o(){return i=qU(r),a=VU(r),n()[0]<0?(i=q1(i),a=q1(a),e(WU,zU)):e(H1,V1),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let f=i(l),h=i(u),g,p;const v=s==null?10:+s;let _=[];if(!(r%1)&&h-f<v){if(f=Math.floor(f),h=Math.ceil(h),l>0){for(;f<=h;++f)for(g=1;g<r;++g)if(p=f<0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;_.push(p)}}else for(;f<=h;++f)for(g=r-1;g>=1;--g)if(p=f>0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;_.push(p)}_.length*2<v&&(_=Vh(l,u,v))}else _=Vh(f,h,Math.min(h-f,v)).map(a);return d?_.reverse():_},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Bs(c)).precision==null&&(c.trim=!0),c=fc(c)),s===1/0)return c;const l=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=l?c(u):""}},t.nice=()=>n(u4(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function d4(){const e=YU(ag()).domain([1,10]);return e.copy=()=>ad(e,d4()).base(e.base()),ua.apply(e,arguments),e}function Y1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function G1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function GU(e){var t=1,n=e(Y1(t),G1(t));return n.constant=function(r){return arguments.length?e(Y1(t=+r),G1(t)):t},c4(n)}function f4(){var e=GU(ag());return e.copy=function(){return ad(e,f4()).constant(e.constant())},ua.apply(e,arguments)}const $f=new Date,Af=new Date;function nn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let l;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=a=>nn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>($f.setTime(+a),Af.setTime(+o),e($f),e(Af),Math.floor(n($f,Af))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Vl=nn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Vl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?nn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Vl);Vl.range;const Fr=1e3,Vn=Fr*60,Br=Vn*60,qr=Br*24,sg=qr*7,Z1=qr*30,Rf=qr*365,Li=nn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCSeconds());Li.range;const cg=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fr)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getMinutes());cg.range;const lg=nn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getUTCMinutes());lg.range;const ug=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fr-e.getMinutes()*Vn)},(e,t)=>{e.setTime(+e+t*Br)},(e,t)=>(t-e)/Br,e=>e.getHours());ug.range;const dg=nn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Br)},(e,t)=>(t-e)/Br,e=>e.getUTCHours());dg.range;const fg=nn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vn)/qr,e=>e.getDate()-1);fg.range;const h4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>e.getUTCDate()-1);h4.range;const p4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>Math.floor(e/qr));p4.range;function da(e){return nn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vn)/sg)}const hg=da(0),ZU=da(1),KU=da(2),XU=da(3),QU=da(4),JU=da(5),eW=da(6);hg.range;ZU.range;KU.range;XU.range;QU.range;JU.range;eW.range;function fa(e){return nn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/sg)}const pg=fa(0),tW=fa(1),nW=fa(2),rW=fa(3),iW=fa(4),aW=fa(5),oW=fa(6);pg.range;tW.range;nW.range;rW.range;iW.range;aW.range;oW.range;const mg=nn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());mg.range;const gg=nn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());gg.range;const od=nn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());od.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});od.range;const sd=nn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());sd.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});sd.range;function m4(e,t,n,r,i,a){const o=[[Li,1,Fr],[Li,5,5*Fr],[Li,15,15*Fr],[Li,30,30*Fr],[a,1,Vn],[a,5,5*Vn],[a,15,15*Vn],[a,30,30*Vn],[i,1,Br],[i,3,3*Br],[i,6,6*Br],[i,12,12*Br],[r,1,qr],[r,2,2*qr],[n,1,sg],[t,1,Z1],[t,3,3*Z1],[e,1,Rf]];function s(l,u,d){const f=u<l;f&&([l,u]=[u,l]);const h=d&&typeof d.range=="function"?d:c(l,u,d),g=h?h.range(l,+u+1):[];return f?g.reverse():g}function c(l,u,d){const f=Math.abs(u-l)/d,h=rg(([,,v])=>v).right(o,f);if(h===o.length)return e.every(Yh(l/Rf,u/Rf,d));if(h===0)return Vl.every(Math.max(Yh(l,u,d),1));const[g,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return g.every(p)}return[s,c]}const[sW,cW]=m4(sd,gg,pg,p4,dg,lg),[lW,uW]=m4(od,mg,hg,fg,ug,cg);var jf=new Date,Pf=new Date;function en(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=function(a){return e(a=new Date(+a)),a},i.ceil=function(a){return e(a=new Date(a-1)),t(a,1),e(a),a},i.round=function(a){var o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=function(a,o){return t(a=new Date(+a),o==null?1:Math.floor(o)),a},i.range=function(a,o,s){var c=[],l;if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=function(a){return en(function(o){if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},function(o,s){if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););})},n&&(i.count=function(a,o){return jf.setTime(+a),Pf.setTime(+o),e(jf),e(Pf),Math.floor(n(jf,Pf))},i.every=function(a){return a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?function(o){return r(o)%a===0}:function(o){return i.count(0,o)%a===0}):i}),i}var Us=en(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Us.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?en(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Us};Us.range;var ql=1e3,na=6e4,Yl=36e5,g4=864e5,v4=6048e5,Zh=en(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*ql)},function(e,t){return(t-e)/ql},function(e){return e.getUTCSeconds()});Zh.range;var y4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ql)},function(e,t){e.setTime(+e+t*na)},function(e,t){return(t-e)/na},function(e){return e.getMinutes()});y4.range;var b4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ql-e.getMinutes()*na)},function(e,t){e.setTime(+e+t*Yl)},function(e,t){return(t-e)/Yl},function(e){return e.getHours()});b4.range;var vg=en(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*na)/g4},function(e){return e.getDate()-1});vg.range;function ha(e){return en(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*na)/v4})}var Gl=ha(0),Ws=ha(1),x4=ha(2),_4=ha(3),ra=ha(4),w4=ha(5),C4=ha(6);Gl.range;Ws.range;x4.range;_4.range;ra.range;w4.range;C4.range;var T4=en(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});T4.range;var yi=en(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});yi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};yi.range;var k4=en(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*na)},function(e,t){return(t-e)/na},function(e){return e.getUTCMinutes()});k4.range;var S4=en(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Yl)},function(e,t){return(t-e)/Yl},function(e){return e.getUTCHours()});S4.range;var yg=en(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/g4},function(e){return e.getUTCDate()-1});yg.range;function pa(e){return en(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/v4})}var Zl=pa(0),zs=pa(1),E4=pa(2),O4=pa(3),ia=pa(4),M4=pa(5),$4=pa(6);Zl.range;zs.range;E4.range;O4.range;ia.range;M4.range;$4.range;var A4=en(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});A4.range;var bi=en(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});bi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};bi.range;function If(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Df(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Bo(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function dW(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Uo(i),u=Wo(i),d=Uo(a),f=Wo(a),h=Uo(o),g=Wo(o),p=Uo(s),v=Wo(s),_=Uo(c),w=Wo(c),x={a:F,A:z,b:q,B:W,c:null,d:ty,e:ty,f:PW,g:HW,G:qW,H:AW,I:RW,j:jW,L:R4,m:IW,M:DW,p:G,q:ee,Q:iy,s:ay,S:NW,u:LW,U:FW,V:BW,w:UW,W:WW,x:null,X:null,y:zW,Y:VW,Z:YW,"%":ry},T={a:ie,A:Q,b:X,B:K,c:null,d:ny,e:ny,f:XW,g:sz,G:lz,H:GW,I:ZW,j:KW,L:P4,m:QW,M:JW,p:te,q:D,Q:iy,s:ay,S:ez,u:tz,U:nz,V:rz,w:iz,W:az,x:null,X:null,y:oz,Y:cz,Z:uz,"%":ry},b={a:E,A:C,b:O,B:$,c:A,d:J1,e:J1,f:EW,g:Q1,G:X1,H:ey,I:ey,j:CW,L:SW,m:wW,M:TW,p:S,q:_W,Q:MW,s:$W,S:kW,u:gW,U:vW,V:yW,w:mW,W:bW,x:P,X:N,y:Q1,Y:X1,Z:xW,"%":OW};x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),T.x=k(n,T),T.X=k(r,T),T.c=k(t,T);function k(I,L){return function(V){var R=[],Z=-1,J=0,ne=I.length,he,be,ge;for(V instanceof Date||(V=new Date(+V));++Z<ne;)I.charCodeAt(Z)===37&&(R.push(I.slice(J,Z)),(be=K1[he=I.charAt(++Z)])!=null?he=I.charAt(++Z):be=he==="e"?" ":"0",(ge=L[he])&&(he=ge(V,be)),R.push(he),J=Z+1);return R.push(I.slice(J,Z)),R.join("")}}function j(I,L){return function(V){var R=Bo(1900,void 0,1),Z=M(R,I,V+="",0),J,ne;if(Z!=V.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(L&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(J=Df(Bo(R.y,0,1)),ne=J.getUTCDay(),J=ne>4||ne===0?zs.ceil(J):zs(J),J=yg.offset(J,(R.V-1)*7),R.y=J.getUTCFullYear(),R.m=J.getUTCMonth(),R.d=J.getUTCDate()+(R.w+6)%7):(J=If(Bo(R.y,0,1)),ne=J.getDay(),J=ne>4||ne===0?Ws.ceil(J):Ws(J),J=vg.offset(J,(R.V-1)*7),R.y=J.getFullYear(),R.m=J.getMonth(),R.d=J.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ne="Z"in R?Df(Bo(R.y,0,1)).getUTCDay():If(Bo(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ne+5)%7:R.w+R.U*7-(ne+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Df(R)):If(R)}}function M(I,L,V,R){for(var Z=0,J=L.length,ne=V.length,he,be;Z<J;){if(R>=ne)return-1;if(he=L.charCodeAt(Z++),he===37){if(he=L.charAt(Z++),be=b[he in K1?L.charAt(Z++):he],!be||(R=be(I,V,R))<0)return-1}else if(he!=V.charCodeAt(R++))return-1}return R}function S(I,L,V){var R=l.exec(L.slice(V));return R?(I.p=u.get(R[0].toLowerCase()),V+R[0].length):-1}function E(I,L,V){var R=h.exec(L.slice(V));return R?(I.w=g.get(R[0].toLowerCase()),V+R[0].length):-1}function C(I,L,V){var R=d.exec(L.slice(V));return R?(I.w=f.get(R[0].toLowerCase()),V+R[0].length):-1}function O(I,L,V){var R=_.exec(L.slice(V));return R?(I.m=w.get(R[0].toLowerCase()),V+R[0].length):-1}function $(I,L,V){var R=p.exec(L.slice(V));return R?(I.m=v.get(R[0].toLowerCase()),V+R[0].length):-1}function A(I,L,V){return M(I,t,L,V)}function P(I,L,V){return M(I,n,L,V)}function N(I,L,V){return M(I,r,L,V)}function F(I){return o[I.getDay()]}function z(I){return a[I.getDay()]}function q(I){return c[I.getMonth()]}function W(I){return s[I.getMonth()]}function G(I){return i[+(I.getHours()>=12)]}function ee(I){return 1+~~(I.getMonth()/3)}function ie(I){return o[I.getUTCDay()]}function Q(I){return a[I.getUTCDay()]}function X(I){return c[I.getUTCMonth()]}function K(I){return s[I.getUTCMonth()]}function te(I){return i[+(I.getUTCHours()>=12)]}function D(I){return 1+~~(I.getUTCMonth()/3)}return{format:function(I){var L=k(I+="",x);return L.toString=function(){return I},L},parse:function(I){var L=j(I+="",!1);return L.toString=function(){return I},L},utcFormat:function(I){var L=k(I+="",T);return L.toString=function(){return I},L},utcParse:function(I){var L=j(I+="",!0);return L.toString=function(){return I},L}}}var K1={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,fW=/^%/,hW=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function pW(e){return e.replace(hW,"\\$&")}function Uo(e){return new RegExp("^(?:"+e.map(pW).join("|")+")","i")}function Wo(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function mW(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function gW(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function vW(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function yW(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function bW(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function X1(e,t,n){var r=cn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Q1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function xW(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function _W(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function wW(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function J1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function CW(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ey(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function TW(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function kW(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function SW(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function EW(e,t,n){var r=cn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function OW(e,t,n){var r=fW.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function MW(e,t,n){var r=cn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function $W(e,t,n){var r=cn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ty(e,t){return ht(e.getDate(),t,2)}function AW(e,t){return ht(e.getHours(),t,2)}function RW(e,t){return ht(e.getHours()%12||12,t,2)}function jW(e,t){return ht(1+vg.count(yi(e),e),t,3)}function R4(e,t){return ht(e.getMilliseconds(),t,3)}function PW(e,t){return R4(e,t)+"000"}function IW(e,t){return ht(e.getMonth()+1,t,2)}function DW(e,t){return ht(e.getMinutes(),t,2)}function NW(e,t){return ht(e.getSeconds(),t,2)}function LW(e){var t=e.getDay();return t===0?7:t}function FW(e,t){return ht(Gl.count(yi(e)-1,e),t,2)}function j4(e){var t=e.getDay();return t>=4||t===0?ra(e):ra.ceil(e)}function BW(e,t){return e=j4(e),ht(ra.count(yi(e),e)+(yi(e).getDay()===4),t,2)}function UW(e){return e.getDay()}function WW(e,t){return ht(Ws.count(yi(e)-1,e),t,2)}function zW(e,t){return ht(e.getFullYear()%100,t,2)}function HW(e,t){return e=j4(e),ht(e.getFullYear()%100,t,2)}function VW(e,t){return ht(e.getFullYear()%1e4,t,4)}function qW(e,t){var n=e.getDay();return e=n>=4||n===0?ra(e):ra.ceil(e),ht(e.getFullYear()%1e4,t,4)}function YW(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function ny(e,t){return ht(e.getUTCDate(),t,2)}function GW(e,t){return ht(e.getUTCHours(),t,2)}function ZW(e,t){return ht(e.getUTCHours()%12||12,t,2)}function KW(e,t){return ht(1+yg.count(bi(e),e),t,3)}function P4(e,t){return ht(e.getUTCMilliseconds(),t,3)}function XW(e,t){return P4(e,t)+"000"}function QW(e,t){return ht(e.getUTCMonth()+1,t,2)}function JW(e,t){return ht(e.getUTCMinutes(),t,2)}function ez(e,t){return ht(e.getUTCSeconds(),t,2)}function tz(e){var t=e.getUTCDay();return t===0?7:t}function nz(e,t){return ht(Zl.count(bi(e)-1,e),t,2)}function I4(e){var t=e.getUTCDay();return t>=4||t===0?ia(e):ia.ceil(e)}function rz(e,t){return e=I4(e),ht(ia.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function iz(e){return e.getUTCDay()}function az(e,t){return ht(zs.count(bi(e)-1,e),t,2)}function oz(e,t){return ht(e.getUTCFullYear()%100,t,2)}function sz(e,t){return e=I4(e),ht(e.getUTCFullYear()%100,t,2)}function cz(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function lz(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ia(e):ia.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function uz(){return"+0000"}function ry(){return"%"}function iy(e){return+e}function ay(e){return Math.floor(+e/1e3)}var wa,cd,D4,N4,L4;dz({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dz(e){return wa=dW(e),cd=wa.format,D4=wa.parse,N4=wa.utcFormat,L4=wa.utcParse,wa}function fz(e){return new Date(e)}function hz(e){return e instanceof Date?+e:+new Date(+e)}function bg(e,t,n,r,i,a,o,s,c,l){var u=a4(),d=u.invert,f=u.domain,h=l(".%L"),g=l(":%S"),p=l("%I:%M"),v=l("%I %p"),_=l("%a %d"),w=l("%b %d"),x=l("%B"),T=l("%Y");function b(k){return(c(k)<k?h:s(k)<k?g:o(k)<k?p:a(k)<k?v:r(k)<k?i(k)<k?_:w:n(k)<k?x:T)(k)}return u.invert=function(k){return new Date(d(k))},u.domain=function(k){return arguments.length?f(Array.from(k,hz)):f().map(fz)},u.ticks=function(k){var j=f();return e(j[0],j[j.length-1],k??10)},u.tickFormat=function(k,j){return j==null?b:l(j)},u.nice=function(k){var j=f();return(!k||typeof k.range!="function")&&(k=t(j[0],j[j.length-1],k??10)),k?f(u4(j,k)):u},u.copy=function(){return ad(u,bg(e,t,n,r,i,a,o,s,c,l))},u}function pz(){return ua.apply(bg(lW,uW,od,mg,hg,fg,ug,cg,Li,cd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mz(){return ua.apply(bg(sW,cW,sd,gg,pg,h4,dg,lg,Li,N4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Je(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const F4=Je("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),B4=Je("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),U4=Je("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),W4=Je("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),z4=Je("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),H4=Je("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),V4=Je("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),q4=Je("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),xg=Je("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),gz=Je("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$t=e=>ZB(e[e.length-1]);var ld=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Je);const vz=$t(ld);var ud=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Je);const yz=$t(ud);var dd=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Je);const bz=$t(dd);var fd=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Je);const xz=$t(fd);var hd=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Je);const _z=$t(hd);var pd=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Je);const wz=$t(pd);var md=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Je);const Cz=$t(md);var gd=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Je);const Tz=$t(gd);var vd=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Je);const kz=$t(vd);var yd=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Je);const Sz=$t(yd);var bd=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Je);const Ez=$t(bd);var xd=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Je);const Oz=$t(xd);var _d=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Je);const Mz=$t(_d);var wd=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Je);const $z=$t(wd);var Cd=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Je);const Az=$t(Cd);var Td=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Je);const Rz=$t(Td);var kd=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Je);const jz=$t(kd);var Sd=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Je);const Pz=$t(Sd);var Ed=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Je);const Iz=$t(Ed);var Od=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Je);const Dz=$t(Od);var Md=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Je);const Nz=$t(Md);var $d=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Je);const Lz=$t($d);var Ad=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Je);const Fz=$t(Ad);var Rd=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Je);const Bz=$t(Rd);var jd=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Je);const Uz=$t(jd);var Pd=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Je);const Wz=$t(Pd);var Id=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Je);const zz=$t(Id);function Hz(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const Vz=ng(wr(300,.5,0),wr(-240,.5,1));var qz=ng(wr(-100,.75,.35),wr(80,1.5,.8)),Yz=ng(wr(260,.75,.35),wr(80,1.5,.8)),zc=wr();function Gz(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return zc.h=360*e-100,zc.s=1.5-1.5*t,zc.l=.8-.9*t,zc+""}var Hc=Qa(),Zz=Math.PI/3,Kz=Math.PI*2/3;function Xz(e){var t;return e=(.5-e)*Math.PI,Hc.r=255*(t=Math.sin(e))*t,Hc.g=255*(t=Math.sin(e+Zz))*t,Hc.b=255*(t=Math.sin(e+Kz))*t,Hc+""}function Qz(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Dd(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const Jz=Dd(Je("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var eH=Dd(Je("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),tH=Dd(Je("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nH=Dd(Je("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),rH="__lodash_hash_undefined__";function iH(e){return this.__data__.set(e,rH),this}var aH=iH;function oH(e){return this.__data__.has(e)}var sH=oH,cH=Fm,lH=aH,uH=sH;function Kl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new cH;++t<n;)this.add(e[t])}Kl.prototype.add=Kl.prototype.push=lH;Kl.prototype.has=uH;var _g=Kl;function dH(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var fH=dH;function hH(e){return e!==e}var pH=hH;function mH(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var gH=mH,vH=fH,yH=pH,bH=gH;function xH(e,t,n){return t===t?bH(e,t,n):vH(e,yH,n)}var _H=xH,wH=_H;function CH(e,t){var n=e==null?0:e.length;return!!n&&wH(e,t,0)>-1}var Y4=CH;function TH(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var G4=TH;function kH(e,t){return e.has(t)}var wg=kH,SH=_g,EH=Y4,OH=G4,MH=td,$H=mo,AH=wg,RH=200;function jH(e,t,n,r){var i=-1,a=EH,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=MH(t,$H(n))),r?(a=OH,o=!1):t.length>=RH&&(a=AH,o=!1,t=new SH(t));e:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue e;c.push(u)}else a(t,d,r)||c.push(u)}return c}var PH=jH,IH=PH,DH=Zm,NH=Lw,LH=DH(function(e,t){return NH(e)?IH(e,t):[]}),FH=LH;const Z4=Ht(FH);function ot(e){return function(){return e}}const oy=Math.abs,hn=Math.atan2,Mi=Math.cos,BH=Math.max,Nf=Math.min,fr=Math.sin,$a=Math.sqrt,mn=1e-12,Hs=Math.PI,Xl=Hs/2,sl=2*Hs;function UH(e){return e>1?0:e<-1?Hs:Math.acos(e)}function sy(e){return e>=1?Xl:e<=-1?-Xl:Math.asin(e)}const Kh=Math.PI,Xh=2*Kh,Ai=1e-6,WH=Xh-Ai;function K4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function zH(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return K4;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let HH=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?K4:zH(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-t,l=i-n,u=o-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Ai)if(!(Math.abs(d*c-l*u)>Ai)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,g=i-s,p=c*c+l*l,v=h*h+g*g,_=Math.sqrt(p),w=Math.sqrt(f),x=a*Math.tan((Kh-Math.acos((p+f-v)/(2*_*w)))/2),T=x/w,b=x/_;Math.abs(T-1)>Ai&&this._append`L${t+T*u},${n+T*d}`,this._append`A${a},${a},0,0,${+(d*h>u*g)},${this._x1=t+b*c},${this._y1=n+b*l}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=t+s,u=n+c,d=1^o,f=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ai||Math.abs(this._y1-u)>Ai)&&this._append`L${l},${u}`,r&&(f<0&&(f=f%Xh+Xh),f>WH?this._append`A${r},${r},0,1,${d},${t-s},${n-c}A${r},${r},0,1,${d},${this._x1=l},${this._y1=u}`:f>Ai&&this._append`A${r},${r},0,${+(f>=Kh)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Cg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new HH(t)}function VH(e){return e.innerRadius}function qH(e){return e.outerRadius}function YH(e){return e.startAngle}function GH(e){return e.endAngle}function ZH(e){return e&&e.padAngle}function KH(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<mn))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Vc(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/$a(s*s+c*c),u=l*c,d=-l*s,f=e+u,h=t+d,g=n+u,p=r+d,v=(f+g)/2,_=(h+p)/2,w=g-f,x=p-h,T=w*w+x*x,b=i-a,k=f*p-g*h,j=(x<0?-1:1)*$a(BH(0,b*b*T-k*k)),M=(k*x-w*j)/T,S=(-k*w-x*j)/T,E=(k*x+w*j)/T,C=(-k*w+x*j)/T,O=M-v,$=S-_,A=E-v,P=C-_;return O*O+$*$>A*A+P*P&&(M=E,S=C),{cx:M,cy:S,x01:-u,y01:-d,x11:M*(i/b-1),y11:S*(i/b-1)}}function XH(){var e=VH,t=qH,n=ot(0),r=null,i=YH,a=GH,o=ZH,s=null,c=Cg(l);function l(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Xl,p=a.apply(this,arguments)-Xl,v=oy(p-g),_=p>g;if(s||(s=u=c()),h<f&&(d=h,h=f,f=d),!(h>mn))s.moveTo(0,0);else if(v>sl-mn)s.moveTo(h*Mi(g),h*fr(g)),s.arc(0,0,h,g,p,!_),f>mn&&(s.moveTo(f*Mi(p),f*fr(p)),s.arc(0,0,f,p,g,_));else{var w=g,x=p,T=g,b=p,k=v,j=v,M=o.apply(this,arguments)/2,S=M>mn&&(r?+r.apply(this,arguments):$a(f*f+h*h)),E=Nf(oy(h-f)/2,+n.apply(this,arguments)),C=E,O=E,$,A;if(S>mn){var P=sy(S/f*fr(M)),N=sy(S/h*fr(M));(k-=P*2)>mn?(P*=_?1:-1,T+=P,b-=P):(k=0,T=b=(g+p)/2),(j-=N*2)>mn?(N*=_?1:-1,w+=N,x-=N):(j=0,w=x=(g+p)/2)}var F=h*Mi(w),z=h*fr(w),q=f*Mi(b),W=f*fr(b);if(E>mn){var G=h*Mi(x),ee=h*fr(x),ie=f*Mi(T),Q=f*fr(T),X;if(v<Hs)if(X=KH(F,z,ie,Q,G,ee,q,W)){var K=F-X[0],te=z-X[1],D=G-X[0],I=ee-X[1],L=1/fr(UH((K*D+te*I)/($a(K*K+te*te)*$a(D*D+I*I)))/2),V=$a(X[0]*X[0]+X[1]*X[1]);C=Nf(E,(f-V)/(L-1)),O=Nf(E,(h-V)/(L+1))}else C=O=0}j>mn?O>mn?($=Vc(ie,Q,F,z,h,O,_),A=Vc(G,ee,q,W,h,O,_),s.moveTo($.cx+$.x01,$.cy+$.y01),O<E?s.arc($.cx,$.cy,O,hn($.y01,$.x01),hn(A.y01,A.x01),!_):(s.arc($.cx,$.cy,O,hn($.y01,$.x01),hn($.y11,$.x11),!_),s.arc(0,0,h,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),!_),s.arc(A.cx,A.cy,O,hn(A.y11,A.x11),hn(A.y01,A.x01),!_))):(s.moveTo(F,z),s.arc(0,0,h,w,x,!_)):s.moveTo(F,z),!(f>mn)||!(k>mn)?s.lineTo(q,W):C>mn?($=Vc(q,W,G,ee,f,-C,_),A=Vc(F,z,ie,Q,f,-C,_),s.lineTo($.cx+$.x01,$.cy+$.y01),C<E?s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn(A.y01,A.x01),!_):(s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn($.y11,$.x11),!_),s.arc(0,0,f,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),_),s.arc(A.cx,A.cy,C,hn(A.y11,A.x11),hn(A.y01,A.x01),!_))):s.arc(0,0,f,b,T,_)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Hs/2;return[Mi(d)*u,fr(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ot(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ot(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ot(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:ot(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:ot(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ot(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ot(+u),l):o},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function Nd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function X4(e){this._context=e}X4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Tg(e){return new X4(e)}function Q4(e){return e[0]}function J4(e){return e[1]}function kg(e,t){var n=ot(!0),r=null,i=Tg,a=null,o=Cg(s);e=typeof e=="function"?e:e===void 0?Q4:ot(e),t=typeof t=="function"?t:t===void 0?J4:ot(t);function s(c){var l,u=(c=Nd(c)).length,d,f=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(d=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,l,c),+t(d,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:ot(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:ot(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:ot(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function QH(e,t,n){var r=null,i=ot(!0),a=null,o=Tg,s=null,c=Cg(l);e=typeof e=="function"?e:e===void 0?Q4:ot(+e),t=typeof t=="function"?t:ot(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?J4:ot(+n);function l(d){var f,h,g,p=(d=Nd(d)).length,v,_=!1,w,x=new Array(p),T=new Array(p);for(a==null&&(s=o(w=c())),f=0;f<=p;++f){if(!(f<p&&i(v=d[f],f,d))===_)if(_=!_)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=h;--g)s.point(x[g],T[g]);s.lineEnd(),s.areaEnd()}_&&(x[f]=+e(v,f,d),T[f]=+t(v,f,d),s.point(r?+r(v,f,d):x[f],n?+n(v,f,d):T[f]))}if(w)return s=null,w+""||null}function u(){return kg().defined(i).curve(o).context(a)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:ot(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ot(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:ot(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:ot(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ot(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ot(+d),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:ot(!!d),l):i},l.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),l):o},l.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),l):a},l}function JH(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function eV(e){return e}function tV(){var e=eV,t=JH,n=null,r=ot(0),i=ot(sl),a=ot(0);function o(s){var c,l=(s=Nd(s)).length,u,d,f=0,h=new Array(l),g=new Array(l),p=+r.apply(this,arguments),v=Math.min(sl,Math.max(-sl,i.apply(this,arguments)-p)),_,w=Math.min(Math.abs(v)/l,a.apply(this,arguments)),x=w*(v<0?-1:1),T;for(c=0;c<l;++c)(T=g[h[c]=c]=+e(s[c],c,s))>0&&(f+=T);for(t!=null?h.sort(function(b,k){return t(g[b],g[k])}):n!=null&&h.sort(function(b,k){return n(s[b],s[k])}),c=0,d=f?(v-l*x)/f:0;c<l;++c,p=_)u=h[c],T=g[u],_=p+(T>0?T*d:0)+x,g[u]={data:s[u],index:c,value:T,startAngle:p,endAngle:_,padAngle:w};return g}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:ot(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,n=null,o):t},o.sort=function(s){return arguments.length?(n=s,t=null,o):n},o.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ot(+s),o):r},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ot(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:ot(+s),o):a},o}function xi(){}function Ql(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ld(e){this._context=e}Ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ql(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ql(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nV(e){return new Ld(e)}function e3(e){this._context=e}e3.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rV(e){return new e3(e)}function t3(e){this._context=e}t3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iV(e){return new t3(e)}function n3(e,t){this._basis=new Ld(e),this._beta=t}n3.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const aV=function e(t){function n(r){return t===1?new Ld(r):new n3(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Jl(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Sg(e,t){this._context=e,this._k=(1-t)/6}Sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Jl(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Jl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const oV=function e(t){function n(r){return new Sg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Eg(e,t){this._context=e,this._k=(1-t)/6}Eg.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Jl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sV=function e(t){function n(r){return new Eg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Og(e,t){this._context=e,this._k=(1-t)/6}Og.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Jl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cV=function e(t){function n(r){return new Og(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Mg(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>mn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>mn){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function r3(e,t){this._context=e,this._alpha=t}r3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Mg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const lV=function e(t){function n(r){return t?new r3(r,t):new Sg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function i3(e,t){this._context=e,this._alpha=t}i3.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Mg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const uV=function e(t){function n(r){return t?new i3(r,t):new Eg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function a3(e,t){this._context=e,this._alpha=t}a3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mg(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const dV=function e(t){function n(r){return t?new a3(r,t):new Og(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function o3(e){this._context=e}o3.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function fV(e){return new o3(e)}function cy(e){return e<0?-1:1}function ly(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(cy(a)+cy(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function uy(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Lf(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function eu(e){this._context=e}eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Lf(this,this._t0,uy(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Lf(this,uy(this,n=ly(this,e,t)),n);break;default:Lf(this,this._t0,n=ly(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function s3(e){this._context=new c3(e)}(s3.prototype=Object.create(eu.prototype)).point=function(e,t){eu.prototype.point.call(this,t,e)};function c3(e){this._context=e}c3.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function hV(e){return new eu(e)}function pV(e){return new s3(e)}function l3(e){this._context=e}l3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=dy(e),i=dy(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function dy(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function mV(e){return new l3(e)}function Fd(e,t){this._context=e,this._t=t}Fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function gV(e){return new Fd(e,.5)}function vV(e){return new Fd(e,0)}function yV(e){return new Fd(e,1)}function fy(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hy(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function bV(e,t){return e[t]}function xV(e){const t=[];return t.key=e,t}function _V(){var e=ot([]),t=hy,n=fy,r=bV;function i(a){var o=Array.from(e.apply(this,arguments),xV),s,c=o.length,l=-1,u;for(const d of a)for(s=0,++l;s<c;++s)(o[s][l]=[0,+r(d,o[s].key,l,a)]).data=d;for(s=0,u=Nd(t(o));s<c;++s)o[u[s]].index=s;return n(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:ot(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:ot(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?hy:typeof a=="function"?a:ot(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??fy,i):n},i}function wV(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}var CV=dc,TV=Kw,kV=vo;function SV(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=CV(e,o);n(s,o)&&TV(a,kV(o,e),s)}return a}var EV=SV;function OV(e,t){return e!=null&&t in Object(e)}var MV=OV,$V=vo,AV=Zu,RV=Pn,jV=Qu,PV=Hm,IV=yo;function DV(e,t,n){t=$V(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=IV(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&PV(i)&&jV(o,i)&&(RV(e)||AV(e)))}var NV=DV,LV=MV,FV=NV;function BV(e,t){return e!=null&&FV(e,t,LV)}var u3=BV,UV=EV,WV=u3;function zV(e,t){return UV(e,t,function(n,r){return WV(e,r)})}var HV=zV;function VV(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $g=VV,py=lo,qV=Zu,YV=Pn,my=py?py.isConcatSpreadable:void 0;function GV(e){return YV(e)||qV(e)||!!(my&&e&&e[my])}var ZV=GV,KV=$g,XV=ZV;function d3(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=XV),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?d3(s,t-1,n,r,i):KV(i,s):r||(i[i.length]=s)}return i}var f3=d3,QV=f3;function JV(e){var t=e==null?0:e.length;return t?QV(e,1):[]}var eq=JV,tq=eq,nq=zw,rq=Hw;function iq(e){return rq(nq(e,void 0,tq),e+"")}var h3=iq,aq=HV,oq=h3,sq=oq(function(e,t){return e==null?{}:aq(e,t)}),cq=sq;const lq=Ht(cq);function uq(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var dq=uq,fq=_g,hq=dq,pq=wg,mq=1,gq=2;function vq(e,t,n,r,i,a){var o=n&mq,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,h=n&gq?new fq:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],p=t[d];if(r)var v=o?r(p,g,d,t,e,a):r(g,p,d,e,t,a);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!hq(t,function(_,w){if(!pq(h,w)&&(g===_||i(g,_,n,r,a)))return h.push(w)})){f=!1;break}}else if(!(g===p||i(g,p,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var p3=vq;function yq(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var bq=yq;function xq(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ag=xq,gy=lo,vy=Rw,_q=lc,wq=p3,Cq=bq,Tq=Ag,kq=1,Sq=2,Eq="[object Boolean]",Oq="[object Date]",Mq="[object Error]",$q="[object Map]",Aq="[object Number]",Rq="[object RegExp]",jq="[object Set]",Pq="[object String]",Iq="[object Symbol]",Dq="[object ArrayBuffer]",Nq="[object DataView]",yy=gy?gy.prototype:void 0,Ff=yy?yy.valueOf:void 0;function Lq(e,t,n,r,i,a,o){switch(n){case Nq:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Dq:return!(e.byteLength!=t.byteLength||!a(new vy(e),new vy(t)));case Eq:case Oq:case Aq:return _q(+e,+t);case Mq:return e.name==t.name&&e.message==t.message;case Rq:case Pq:return e==t+"";case $q:var s=Cq;case jq:var c=r&kq;if(s||(s=Tq),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Sq,o.set(e,t);var u=wq(s(e),s(t),r,i,a,o);return o.delete(e),u;case Iq:if(Ff)return Ff.call(e)==Ff.call(t)}return!1}var Fq=Lq,Bq=$g,Uq=Pn;function Wq(e,t,n){var r=t(e);return Uq(e)?r:Bq(r,n(e))}var m3=Wq;function zq(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var g3=zq;function Hq(){return[]}var v3=Hq,Vq=g3,qq=v3,Yq=Object.prototype,Gq=Yq.propertyIsEnumerable,by=Object.getOwnPropertySymbols,Zq=by?function(e){return e==null?[]:(e=Object(e),Vq(by(e),function(t){return Gq.call(e,t)}))}:qq,Rg=Zq,Kq=Iw,Xq=Kq(Object.keys,Object),Qq=Xq,Jq=zm,eY=Qq,tY=Object.prototype,nY=tY.hasOwnProperty;function rY(e){if(!Jq(e))return eY(e);var t=[];for(var n in Object(e))nY.call(e,n)&&n!="constructor"&&t.push(n);return t}var iY=rY,aY=Uw,oY=iY,sY=po;function cY(e){return sY(e)?aY(e):oY(e)}var hc=cY,lY=m3,uY=Rg,dY=hc;function fY(e){return lY(e,dY,uY)}var y3=fY,xy=y3,hY=1,pY=Object.prototype,mY=pY.hasOwnProperty;function gY(e,t,n,r,i,a){var o=n&hY,s=xy(e),c=s.length,l=xy(t),u=l.length;if(c!=u&&!o)return!1;for(var d=c;d--;){var f=s[d];if(!(o?f in t:mY.call(t,f)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var p=!0;a.set(e,t),a.set(t,e);for(var v=o;++d<c;){f=s[d];var _=e[f],w=t[f];if(r)var x=o?r(w,_,f,t,e,a):r(_,w,f,e,t,a);if(!(x===void 0?_===w||i(_,w,n,r,a):x)){p=!1;break}v||(v=f=="constructor")}if(p&&!v){var T=e.constructor,b=t.constructor;T!=b&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof b=="function"&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p}var vY=gY,yY=la,bY=Er,xY=yY(bY,"DataView"),_Y=xY,wY=la,CY=Er,TY=wY(CY,"Promise"),kY=TY,SY=la,EY=Er,OY=SY(EY,"Set"),b3=OY,MY=la,$Y=Er,AY=MY($Y,"WeakMap"),RY=AY,Qh=_Y,Jh=Lm,ep=kY,tp=b3,np=RY,x3=Gr,xo=Ew,_y="[object Map]",jY="[object Object]",wy="[object Promise]",Cy="[object Set]",Ty="[object WeakMap]",ky="[object DataView]",PY=xo(Qh),IY=xo(Jh),DY=xo(ep),NY=xo(tp),LY=xo(np),Ri=x3;(Qh&&Ri(new Qh(new ArrayBuffer(1)))!=ky||Jh&&Ri(new Jh)!=_y||ep&&Ri(ep.resolve())!=wy||tp&&Ri(new tp)!=Cy||np&&Ri(new np)!=Ty)&&(Ri=function(e){var t=x3(e),n=t==jY?e.constructor:void 0,r=n?xo(n):"";if(r)switch(r){case PY:return ky;case IY:return _y;case DY:return wy;case NY:return Cy;case LY:return Ty}return t});var Bd=Ri,Bf=Gu,FY=p3,BY=Fq,UY=vY,Sy=Bd,Ey=Pn,Oy=Ku,WY=Ym,zY=1,My="[object Arguments]",$y="[object Array]",qc="[object Object]",HY=Object.prototype,Ay=HY.hasOwnProperty;function VY(e,t,n,r,i,a){var o=Ey(e),s=Ey(t),c=o?$y:Sy(e),l=s?$y:Sy(t);c=c==My?qc:c,l=l==My?qc:l;var u=c==qc,d=l==qc,f=c==l;if(f&&Oy(e)){if(!Oy(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new Bf),o||WY(e)?FY(e,t,n,r,i,a):BY(e,t,c,n,r,i,a);if(!(n&zY)){var h=u&&Ay.call(e,"__wrapped__"),g=d&&Ay.call(t,"__wrapped__");if(h||g){var p=h?e.value():e,v=g?t.value():t;return a||(a=new Bf),i(p,v,n,r,a)}}return f?(a||(a=new Bf),UY(e,t,n,r,i,a)):!1}var qY=VY,YY=qY,Ry=Qn;function _3(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ry(e)&&!Ry(t)?e!==e&&t!==t:YY(e,t,n,r,_3,i)}var jg=_3,GY=jg;function ZY(e,t){return GY(e,t)}var KY=ZY;const XY=Ht(KY);var QY={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}function rp(e,t){return rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},rp(e,t)}function Ud(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var JY=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],eG=function(e,t){return qn({},t,e)},tG=function(e,t){var n=jF({},e,t);return JY.forEach(function(r){Xo(n,r,eG(_r(n,r),n.text))}),n},w3=m.createContext(),C3=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,a=i===void 0?"default":i,o=m.useMemo(function(){var s=uU(a)?jm[a]:a;return{animate:r,config:s}},[r,a]);return y.jsx(w3.Provider,{value:o,children:t})},jy={animate:H.bool,motionConfig:H.oneOfType([H.oneOf(Object.keys(jm)),H.shape({mass:H.number,tension:H.number,friction:H.number,clamp:H.bool,precision:H.number,velocity:H.number,duration:H.number,easing:H.func})])};C3.propTypes={children:H.node.isRequired,animate:jy.animate,config:jy.motionConfig};var Sn=function(){return m.useContext(w3)},Pg=function(e){var t=Sn(),n=t.animate,r=t.config,i=function(s){var c=m.useRef();return m.useEffect(function(){c.current=s},[s]),c.current}(e),a=m.useMemo(function(){return t4(i,e)},[i,e]),o=Sr({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return vi(o,a)},nG={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:$e(ld),PRGn:$e(ud),PiYG:$e(dd),PuOr:$e(fd),RdBu:$e(hd),RdGy:$e(pd),RdYlBu:$e(md),RdYlGn:$e(gd),spectral:$e(vd),blues:$e($d),greens:$e(Ad),greys:$e(Rd),oranges:$e(Id),purples:$e(jd),reds:$e(Pd),BuGn:$e(yd),BuPu:$e(bd),GnBu:$e(xd),OrRd:$e(_d),PuBuGn:$e(wd),PuBu:$e(Cd),PuRd:$e(Td),RdPu:$e(kd),YlGnBu:$e(Sd),YlGn:$e(Ed),YlOrBr:$e(Od),YlOrRd:$e(Md)},rG=Object.keys(nG);$e(ld),$e(ud),$e(dd),$e(fd),$e(hd),$e(pd),$e(md),$e(gd),$e(vd),$e($d),$e(Ad),$e(Rd),$e(Id),$e(jd),$e(Pd),$e(yd),$e(bd),$e(xd),$e(_d),$e(wd),$e(Cd),$e(Td),$e(kd),$e(Sd),$e(Ed),$e(Od),$e(Md);H.oneOfType([H.oneOf(rG),H.func,H.arrayOf(H.string)]);var ip={basis:nV,basisClosed:rV,basisOpen:iV,bundle:aV,cardinal:oV,cardinalClosed:sV,cardinalOpen:cV,catmullRom:lV,catmullRomClosed:uV,catmullRomOpen:dV,linear:Tg,linearClosed:fV,monotoneX:hV,monotoneY:pV,natural:mV,step:gV,stepAfter:yV,stepBefore:vV},Ig=Object.keys(ip);Ig.filter(function(e){return e.endsWith("Closed")});Z4(Ig,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");Z4(Ig,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");var T3=function(e){if(!ip[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return ip[e]};H.shape({top:H.number,right:H.number,bottom:H.number,left:H.number}).isRequired;var iG=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];H.oneOf(iG);Ni(xg);var k3={top:0,right:0,bottom:0,left:0},pc=function(e,t,n){return n===void 0&&(n={}),m.useMemo(function(){var r=qn({},k3,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},S3=function(){var e=m.useRef(null),t=m.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=m.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(a){var o=a[0];return r(o.contentRect)})})[0];return m.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},aG=function(e){return m.useMemo(function(){return tG(QY,e)},[e])},oG=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?cd(e.slice("5")):fc(e):function(t){return""+t}},eo=function(e){return m.useMemo(function(){return oG(e)},[e])},E3=m.createContext(),sG={},O3=function(e){var t=e.theme,n=t===void 0?sG:t,r=e.children,i=aG(n);return y.jsx(E3.Provider,{value:i,children:r})};O3.propTypes={children:H.node.isRequired,theme:H.object};var Tt=function(){return m.useContext(E3)},cG=["outlineWidth","outlineColor","outlineOpacity"],Dg=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Ud(e,cG)},M3=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?m.cloneElement(r,{},t):t};M3.propTypes={children:H.node.isRequired,condition:H.bool.isRequired,wrapper:H.element.isRequired};var lG={position:"relative"},mc=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,a=e.isInteractive,o=a===void 0||a,s=e.animate,c=e.motionConfig,l=m.useRef(null);return y.jsx(O3,{theme:n,children:y.jsx(C3,{animate:s,config:c,children:y.jsx(mj,{container:l,children:y.jsxs(M3,{condition:i,wrapper:y.jsx("div",{style:lG,ref:l}),children:[t,o&&y.jsx(pj,{})]})})})})};mc.propTypes={children:H.element.isRequired,isInteractive:H.bool,renderWrapper:H.bool,theme:H.object,animate:H.bool,motionConfig:H.string};H.func.isRequired,H.bool,H.bool,H.object.isRequired,H.bool.isRequired,H.string;var _o=function(e){var t=e.children,n=S3(),r=n[0],i=n[1],a=i.width>0&&i.height>0;return y.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:a&&t({width:i.width,height:i.height})})};_o.propTypes={children:H.func.isRequired};var uG=["id","colors"],$3=function(e){var t=e.id,n=e.colors,r=Ud(e,uG);return y.jsx("linearGradient",qn({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var a=i.offset,o=i.color,s=i.opacity;return y.jsx("stop",{offset:a+"%",stopColor:o,stopOpacity:s!==void 0?s:1},a)})}))};$3.propTypes={id:H.string.isRequired,colors:H.arrayOf(H.shape({offset:H.number.isRequired,color:H.string.isRequired,opacity:H.number})).isRequired,gradientTransform:H.string};var A3={linearGradient:$3},zo={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},ap=m.memo(function(e){var t=e.id,n=e.background,r=n===void 0?zo.background:n,i=e.color,a=i===void 0?zo.color:i,o=e.size,s=o===void 0?zo.size:o,c=e.padding,l=c===void 0?zo.padding:c,u=e.stagger,d=u===void 0?zo.stagger:u,f=s+l,h=s/2,g=l/2;return d===!0&&(f=2*s+2*l),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:r}),y.jsx("circle",{cx:g+h,cy:g+h,r:h,fill:a}),d&&y.jsx("circle",{cx:1.5*l+s+h,cy:1.5*l+s+h,r:h,fill:a})]})});ap.displayName="PatternDots",ap.propTypes={id:H.string.isRequired,color:H.string.isRequired,background:H.string.isRequired,size:H.number.isRequired,padding:H.number.isRequired,stagger:H.bool.isRequired};var Yn=function(e){return e*Math.PI/180},Wd=function(e){return 180*e/Math.PI},dG=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},qi=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},fG=function(e){var t=e%360;return t<0&&(t+=360),t},hG={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},Ho={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},op=m.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?Ho.spacing:n,i=e.rotation,a=i===void 0?Ho.rotation:i,o=e.background,s=o===void 0?Ho.background:o,c=e.color,l=c===void 0?Ho.color:c,u=e.lineWidth,d=u===void 0?Ho.lineWidth:u,f=Math.round(a)%360,h=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var g,p=h,v=h;return f===0?g=`
|
|
256
256
|
M 0 0 L `+p+` 0
|